[yt-dev] power spectra in yt

Britton Smith brittonsmith at gmail.com
Thu Apr 17 02:44:52 PDT 2014


I just wanted to add something to Nathan's point about adding dependencies.
 I agree we should only add a dependency when absolutely necessary.
 However, in my opinion, I think it is ok have optional dependencies for
analysis modules as long as the following are true:
1. The documentation for the feature mentions the dependency and how to get
and build it.
2. All yt modules other than the module in question still import correctly
in the absence of that dependency.

Britton


On Thu, Apr 17, 2014 at 3:09 AM, Nathan Goldbaum <nathan12343 at gmail.com>wrote:

>
>
> On Wednesday, April 16, 2014, Nathan Goldbaum <nathan12343 at gmail.com>
> wrote:
>
>>
>>
>> On Wednesday, April 16, 2014, John ZuHone <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
>>>
>>
> _______________________________________________
> yt-dev mailing list
> yt-dev at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-dev-spacepope.org/attachments/20140417/cb6e5cbb/attachment.html>


More information about the yt-dev mailing list