Hello yt. I'm trying to generate plots like the ones in Frenk 1999, the Santa Barbara Cluster Comparison Project. I would like to reproduce the plots of projections of the dark matter density, gas density, and temperature at z = 0. The first step is pretty easy - just make a plotcollection and add a projection. The part I'm not sure about is the smoothing. I need to apply Gaussian smoothing to this 256^3 data. I figure I do something like what is in AMRSmoothedCoveringGridBase, but I'm really not sure. Has anyone done anything similar with yt?
Hi Casey, You might try adding a gaussian filter from scipy: http://docs.scipy.org/doc/scipy/reference/generated/scipy.ndimage.filters.ga... Once you make the projection, you can get N^2 image data by creating a FixedResolutionBuffer like this: frb = FixedResolutionBuffer(projection, (x_left, x_right, y_left, y_right), (N, N), antialias=False) where projection is your projection object (like pc.plots[-1]) The actual data for a field can be accessed by frb[field]. You should be able to take that NxN array and apply whatever filter you like. Britton On Mon, Jun 27, 2011 at 11:59 PM, Casey W. Stark <caseywstark@gmail.com>wrote:
Hello yt.
I'm trying to generate plots like the ones in Frenk 1999, the Santa Barbara Cluster Comparison Project. I would like to reproduce the plots of projections of the dark matter density, gas density, and temperature at z = 0.
The first step is pretty easy - just make a plotcollection and add a projection. The part I'm not sure about is the smoothing. I need to apply Gaussian smoothing to this 256^3 data. I figure I do something like what is in AMRSmoothedCoveringGridBase, but I'm really not sure.
Has anyone done anything similar with yt?
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Ah thanks Britton. Didn't think to snoop around the scipy stuff. With that and a custom colormap, I should be able to do this just fine. What's the best place to post examples like this? Best, Casey On Tue, Jun 28, 2011 at 7:30 AM, Britton Smith <brittonsmith@gmail.com>wrote:
Hi Casey,
You might try adding a gaussian filter from scipy:
http://docs.scipy.org/doc/scipy/reference/generated/scipy.ndimage.filters.ga... Once you make the projection, you can get N^2 image data by creating a FixedResolutionBuffer like this: frb = FixedResolutionBuffer(projection, (x_left, x_right, y_left, y_right), (N, N), antialias=False) where projection is your projection object (like pc.plots[-1]) The actual data for a field can be accessed by frb[field].
You should be able to take that NxN array and apply whatever filter you like.
Britton
On Mon, Jun 27, 2011 at 11:59 PM, Casey W. Stark <caseywstark@gmail.com>wrote:
Hello yt.
I'm trying to generate plots like the ones in Frenk 1999, the Santa Barbara Cluster Comparison Project. I would like to reproduce the plots of projections of the dark matter density, gas density, and temperature at z = 0.
The first step is pretty easy - just make a plotcollection and add a projection. The part I'm not sure about is the smoothing. I need to apply Gaussian smoothing to this 256^3 data. I figure I do something like what is in AMRSmoothedCoveringGridBase, but I'm really not sure.
Has anyone done anything similar with yt?
_______________________________________________ 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 Casey, That is a very good question. I think we need a place user-submitted recipes. I know that one of the major long term goals of yt as a project is to be a hub for astrophysicists running simulations and analyzing data. I think a page where people can upload recipes for doing various clever things and browse what others have submitted would be very useful. This doesn't seem to exist yet, but maybe it's worth putting in the effort to set up. Thoughts anyone? Britton On Tue, Jun 28, 2011 at 7:25 PM, Casey W. Stark <caseywstark@gmail.com>wrote:
Ah thanks Britton.
Didn't think to snoop around the scipy stuff. With that and a custom colormap, I should be able to do this just fine.
What's the best place to post examples like this?
Best, Casey
On Tue, Jun 28, 2011 at 7:30 AM, Britton Smith <brittonsmith@gmail.com>wrote:
Hi Casey,
You might try adding a gaussian filter from scipy:
http://docs.scipy.org/doc/scipy/reference/generated/scipy.ndimage.filters.ga... Once you make the projection, you can get N^2 image data by creating a FixedResolutionBuffer like this: frb = FixedResolutionBuffer(projection, (x_left, x_right, y_left, y_right), (N, N), antialias=False) where projection is your projection object (like pc.plots[-1]) The actual data for a field can be accessed by frb[field].
You should be able to take that NxN array and apply whatever filter you like.
Britton
On Mon, Jun 27, 2011 at 11:59 PM, Casey W. Stark <caseywstark@gmail.com>wrote:
Hello yt.
I'm trying to generate plots like the ones in Frenk 1999, the Santa Barbara Cluster Comparison Project. I would like to reproduce the plots of projections of the dark matter density, gas density, and temperature at z = 0.
The first step is pretty easy - just make a plotcollection and add a projection. The part I'm not sure about is the smoothing. I need to apply Gaussian smoothing to this 256^3 data. I figure I do something like what is in AMRSmoothedCoveringGridBase, but I'm really not sure.
Has anyone done anything similar with yt?
_______________________________________________ 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
Hi Casey, This is something Britton and I have thought about and worked on in a couple ways over the last several years. One effort was to start "the barn", which was pretty popular for a while, but was designed for scripts and tools that lived outside yt: http://barn.enzotools.org/ Another thing we have tried is an instance of a piece of software called "RhodeCode," but that was never really able to take off, and furthermore seemed too heavyweight for individual scripts and recipes. It seems more like something that works for full projects. For the smallest of scripts, that fit somewhere between a pastebin and a recipe for the cookbook, one option would be to use the pasteboard. It's not super functional just yet, and it's still cordoned off into individual domains (I don't yet know how to unify them) but you can do this with yt pasteboard --desc="Santa Barbara Cluster stuff" sbcluster.py if you've run "yt bootstrap_dev". This issue, of having both decentralized control but a centralized place for snippets, is something I think we should be thinking about longer term. Something like djangosnippets.com might be interesting. But in order for it to be both useful and productive, it would have to have a very low buy-in, be populated with a number of useful things, and be the kind of thing that people would use. I think I would shy away from having a specific DVCS component to it, but rather instead have updateable, distinct pieces of code. Anyway, those are are my thoughts on the sharing aspect... Good luck on the SB Cluster stuff! Best, Matt On Wed, Jun 29, 2011 at 6:10 AM, Britton Smith <brittonsmith@gmail.com> wrote:
Hi Casey,
That is a very good question. I think we need a place user-submitted recipes. I know that one of the major long term goals of yt as a project is to be a hub for astrophysicists running simulations and analyzing data. I think a page where people can upload recipes for doing various clever things and browse what others have submitted would be very useful. This doesn't seem to exist yet, but maybe it's worth putting in the effort to set up. Thoughts anyone?
Britton
On Tue, Jun 28, 2011 at 7:25 PM, Casey W. Stark <caseywstark@gmail.com> wrote:
Ah thanks Britton. Didn't think to snoop around the scipy stuff. With that and a custom colormap, I should be able to do this just fine. What's the best place to post examples like this? Best, Casey
On Tue, Jun 28, 2011 at 7:30 AM, Britton Smith <brittonsmith@gmail.com> wrote:
Hi Casey,
You might try adding a gaussian filter from scipy:
http://docs.scipy.org/doc/scipy/reference/generated/scipy.ndimage.filters.ga... Once you make the projection, you can get N^2 image data by creating a FixedResolutionBuffer like this: frb = FixedResolutionBuffer(projection, (x_left, x_right, y_left, y_right), (N, N), antialias=False) where projection is your projection object (like pc.plots[-1]) The actual data for a field can be accessed by frb[field].
You should be able to take that NxN array and apply whatever filter you like.
Britton
On Mon, Jun 27, 2011 at 11:59 PM, Casey W. Stark <caseywstark@gmail.com> wrote:
Hello yt. I'm trying to generate plots like the ones in Frenk 1999, the Santa Barbara Cluster Comparison Project. I would like to reproduce the plots of projections of the dark matter density, gas density, and temperature at z = 0. The first step is pretty easy - just make a plotcollection and add a projection. The part I'm not sure about is the smoothing. I need to apply Gaussian smoothing to this 256^3 data. I figure I do something like what is in AMRSmoothedCoveringGridBase, but I'm really not sure. Has anyone done anything similar with yt? _______________________________________________ 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
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
participants (3)
-
Britton Smith
-
Casey W. Stark
-
Matthew Turk