Elizabeth,
There's code to calculate two-point functions (like structure functions and two-point correlation functions). That's almost what you want - you could calculate the 2-point correlation function and do a fourier transform of it with numpy to get the power spectrum of your desired quantity. See:
http://yt.enzotools.org/doc/extensions/two_point_functions.html
Let me add to Brian's response and say that, even as the author of the two-point functions framework, I often get confused on how to use it. It's very flexible and powerful, but not entirely intuitive (which are generally opposing things). I put two examples at the bottom of that page on how to do two-point correlations, where the second one is probably closer to what you want. Let me know if you want help on adapting the example to what you want.
Good luck!
Stephen Skory stephenskory@yahoo.com http://stephenskory.com/ 510.621.3687 (google voice)
Thank you! I'll give this a go and let you know how I get on.
Elizabeth
Stephen Skory wrote:
Elizabeth,
There's code to calculate two-point functions (like structure functions and two-point correlation functions). That's almost what you want - you could calculate the 2-point correlation function and do a fourier transform of it with numpy to get the power spectrum of your desired quantity. See:
http://yt.enzotools.org/doc/extensions/two_point_functions.html
Let me add to Brian's response and say that, even as the author of the two-point functions framework, I often get confused on how to use it. It's very flexible and powerful, but not entirely intuitive (which are generally opposing things). I put two examples at the bottom of that page on how to do two-point correlations, where the second one is probably closer to what you want. Let me know if you want help on adapting the example to what you want.
Good luck!
Stephen Skory stephenskory@yahoo.com http://stephenskory.com/ 510.621.3687 (google voice)
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Hi Elizabeth,
As a quick note, if it's a small enough dataset, you can extracted a fixed resolution grid of points and use the numpy built-in FFT.
-Matt
On Fri, Nov 12, 2010 at 1:18 PM, Elizabeth Tasker taskere@mcmaster.ca wrote:
Thank you! I'll give this a go and let you know how I get on.
Elizabeth
Stephen Skory wrote:
Elizabeth,
There's code to calculate two-point functions (like structure functions and two-point correlation functions). That's almost what you want - you could calculate the 2-point correlation function and do a fourier transform of it with numpy to get the power spectrum of your desired quantity. See:
http://yt.enzotools.org/doc/extensions/two_point_functions.html
Let me add to Brian's response and say that, even as the author of the two-point functions framework, I often get confused on how to use it. It's very flexible and powerful, but not entirely intuitive (which are generally opposing things). I put two examples at the bottom of that page on how to do two-point correlations, where the second one is probably closer to what you want. Let me know if you want help on adapting the example to what you want.
Good luck! Stephen Skory stephenskory@yahoo.com http://stephenskory.com/ 510.621.3687 (google voice)
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Hi Everyone,
I just got the Pyfftw3 wrappers to fftw3 going, and I'll be playing with some power spectra calculators in yt next week for a project using both them and the numpy FFT (if the former is not available). I'll let you know when I get them going, if you're still interested.
j
On Fri, Nov 12, 2010 at 1:47 PM, Matthew Turk matthewturk@gmail.com wrote:
Hi Elizabeth,
As a quick note, if it's a small enough dataset, you can extracted a fixed resolution grid of points and use the numpy built-in FFT.
-Matt
On Fri, Nov 12, 2010 at 1:18 PM, Elizabeth Tasker taskere@mcmaster.ca wrote:
Thank you! I'll give this a go and let you know how I get on.
Elizabeth
Stephen Skory wrote:
Elizabeth,
There's code to calculate two-point functions (like structure functions and two-point correlation functions). That's almost what you want - you could calculate the 2-point correlation function and do a fourier transform of it with numpy to get the power spectrum of your desired quantity. See:
http://yt.enzotools.org/doc/extensions/two_point_functions.html
Let me add to Brian's response and say that, even as the author of the two-point functions framework, I often get confused on how to use it. It's very flexible and powerful, but not entirely intuitive (which are generally opposing things). I put two examples at the bottom of that page on how to do two-point correlations, where the second one is probably closer to what you want. Let me know if you want help on adapting the example to what you want.
Good luck! Stephen Skory stephenskory@yahoo.com http://stephenskory.com/ 510.621.3687 (google voice)
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org