
Hi, Charles-- I think you want to write a new callback. Check out what's done in yt/visualizations/plot_modifications.py. (raven/PlotCallbacks if you're not o yt2.0) Basically, you: 1.) Subclass PlotCallback 2.) Give it a _type_name 3.) it needs an __init__ with whatever args you want 4.) it needs a __call__ that takes (self, plot). This does the work 5.) Most everything you need is hung off plot.image and plot._axis. There are a ton of good examples in the file I mentioned above 6.) You can add the callback by doing
ploot= pc.add_projection(whatevz) ploot.modify['ConvolveCharles']() (this might require registering your callback somewhere, I can't remember)
From there, make sure your convolution is done before other callbacks, and you're set.
The MarkerAnnotateCallback is a good one to look at for callback syntax. d. On Thu, Feb 24, 2011 at 4:02 PM, Charles Hansen <chansen@astro.berkeley.edu> wrote:
Does anyone know a way to convolve a yt image (preferably pc.add_projection) with a telescope psf? This would be useful for simulated observations. At the moment, the best I can do is make an image in yt and then convolve that image in pixel space, but this ends up blurring out things I do not want blurred (like particle markers, or velocity arrows). The psf does not need to be fancy, I just want a 2D gaussian with an adjustable width.
Ideally, there would be a call pc.add_projection("Density", 0, psf_width = 1.5e13) #create a projection with a psf width of 1 AU at the observed distance
Charles
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
-- Sent from my Stone Tablet and carried by my Pterodactyl.