[yt-dev] power spectra in yt

Nathan Goldbaum nathan12343 at gmail.com
Wed Apr 16 19:09:22 PDT 2014


On Wednesday, April 16, 2014, Nathan Goldbaum <nathan12343 at gmail.com> wrote:

>
>
> On Wednesday, April 16, 2014, John ZuHone <jzuhone at gmail.com<javascript:_e(%7B%7D,'cvml','jzuhone at gmail.com');>>
> wrote:
>
>> Hi Mike,
>>
>> I am interested in using yt to do power spectra for analyzing turbulence
>> in our simulations.  I quickly coded up a script to do this (warning: I
>> haven't verified this, so some of the normalization may be wrong, but it
>> doesn't assume a cubic domain, and it looked ok by eye):
>>
>>
>> I think this is a very good idea. I have coded up something similar
>> myself recently:
>>
>> http://paste.yt-project.org/show/4529/
>>
>> It creates a "FourierSpace" class that can be used to create power
>> spectra and potentially other useful things from FFTs. It needs some work.
>>
>> The caveat is that we need to put this onto a uniform grid to do the FFT,
>> but then we can use the numpy FFT routines.
>>
>>
>> Or you could use pyFFTW, which is probably faster:
>>
>> http://hgomersall.github.io/pyFFTW/
>>
>
> Linking to FFTW is tempting since ostensibly it allows Fourier transforms
> of arbitrarily huge arrays, while numpy will fall over once you run out of
> memory on one node.
>
> That said, it would require a new dependency.  We do have analysis modules
> that require separate dependencies from the rest of yt, but it's not
> optimal and adds some friction to new users who want to use the analysis
> module.
>

Although that said it looks like pyfftw currently has no MPI support, so
this is probably a moot point.

https://github.com/hgomersall/pyFFTW/issues/38


>
>
>>
>> The other thing is what sort of interface and where should this live in
>> yt?  Ideally we'd compute some other properties (integral scales, etc.),
>> but it would be nice to have some discussion about what people use and then
>> we can start woth some basic functionality.
>>
>>
>> I think something like this should live in yt/analysis_modules.
>>
>
> Agreed.
>
>
>>
>> Best,
>>
>> John
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-dev-spacepope.org/attachments/20140416/b5c84b13/attachment.html>


More information about the yt-dev mailing list