Skip to content

ENH: update to Volume.random() and Vertex.random() - #716

Open
marklescroart wants to merge 2 commits into
mainfrom
new_low_freq_noise_attempt2
Open

ENH: update to Volume.random() and Vertex.random()#716
marklescroart wants to merge 2 commits into
mainfrom
new_low_freq_noise_attempt2

Conversation

@marklescroart

Copy link
Copy Markdown
Contributor

make Volume.random() and Vertex.random() yield blobby (but still random) noise. This changes default behavior (to generate low frequency noise, which looks nicer and more like real data) but preserves old behavior if you change a keyword argument. Default can be reset, but part of the intent here is to change how demo data looks in the gallery (this setting should make for nicer looking plots for some gallery demos).

… random) noise that looks more like brain data.
@kroq-gar78

Copy link
Copy Markdown
Contributor

Thanks for making a new PR! I'll push some changes to make it work, if that's ok.

@kroq-gar78 kroq-gar78 self-assigned this Aug 24, 2026
@marklescroart

marklescroart commented Aug 24, 2026 via email

Copy link
Copy Markdown
Contributor Author

VertexData.random crashed on random_type='uniform' and swallowed invalid
random_type values instead of raising. _low_freq_noise returned
axis-swapped, DC-dominated (near-flat) data instead of the documented
mean-0/s.d.-1 blobby noise. Also promotes falloff_exponent/smooth_factor
from **kwargs to named parameters, and adds tests.
@kroq-gar78
kroq-gar78 force-pushed the new_low_freq_noise_attempt2 branch from 03ba8b6 to 6c3d1f2 Compare August 26, 2026 09:33
@kroq-gar78

kroq-gar78 commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

I fixed & tidied things up. I did change falloff_exponent and smooth_factor to be named args instead of kwargs, so they will never be passed onto the class constructor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants