[yt-dev] Photon fields

Eric Hallman hallman13 at gmail.com
Fri Jun 15 11:59:30 PDT 2012

  so what you've done so far is part of the very tedious aspects of this I
was procrastinating to avoid.  So I am psyched you have already done a
bunch of that.  I'd love to try out what you have so far on some
simulations, but that can wait for the moment.

I tentatively will agree to do the rewrite of Unit 3 into python, since I
at the very least understand what the convolution entails. Maybe I spaced
this in the prior emails, but I presume you're intending to reproduce unit
2 using yt functionality?  Then we bypass the Unit 2 parts of the code
entirely, and frankly I'm sure yt's projection architecture works better
than theirs ;)

Unit 3 presumably works from projection data, I am forgetting whether it
does the spatial response of the telescope or just the spectral response?
 In any case, I think that could be grafted on to the pipeline in some
intelligent way.  Let's talk about this off line pretty soon and see what
we can come up with.



On Fri, Jun 15, 2012 at 1:04 PM, John ZuHone <jzuhone at gmail.com> wrote:

> John and Matt,
>   so this sort of thing was on my to do list for a Chandra theory grant
> I'm currently on.  If something is already working or in the works, I'm
> happy to defer, and even help implement it.  I have a copy of PHOX, which I
> can run and do things with, but had planned to eventually incorporate into
> yt (with Matt's help).
> I have largely rewrote PHOX's "unit 1" (which generates the photons and
> their energies coincident with the cell/particle positions) already. I'm
> currently doing some debugging. It takes a generic yt data container and
> generates the photon energies using the MeKaL or APEC models by calling the
> XSPEC Python bindings.
> In the more general sense of generating photon fields, I totally support
> this, and would find it useful for all kinds of projects with synthetic
> observations.  I think your intuition is right on, that even though
> observed photons are along an particular direction, a "photon emissivity"
> in 3d in some band or set of wavelengths could function exactly as other
> emissivity type grid fields.
> Except that they wouldn't be grid fields but more like particle fields,
> since they would be discrete samples of the spectrum at specific energies.
> Anyway, let me know what methodology you had in mind, and if you'd like an
> assistant ;)
> I have done a few of things with stand alone codes before, and they sort
> of worked.
> I indeed would. :) My first goal was to reproduce the unit 1
> functionality, which generates the photons themselves with a 1:1 mapping to
> the cells. Unit 2 is what projects the photons along a line of sight,
> randomly scattering their positions within the cell size on the sky. Unit 3
> performs the convolution with the telescope response, but it is written in
> IDL. :(
> I wrote this entire email sitting in the most ridiculous DC beltway
> traffic jam I have ever seen.
> Best,
> John
> On Fri, Jun 15, 2012 at 11:59 AM, Matthew Turk <matthewturk at gmail.com>wrote:
>> Hi John,
>> Hopefully our resident X-ray observation syntheticist Eric Hallman can
>> also chime in, but I have a few comments.
>> On Thu, Jun 14, 2012 at 3:33 PM, John ZuHone <jzuhone at gmail.com> wrote:
>> > Hi all,
>> >
>> > Just wanted to sort of poll all of you on an idea I've been kicking
>> around. I don't know how useful it will be for non X-ray people, but I
>> thought I'd give it a shot.
>> >
>> > There are a number of tools out there designed to create synthetic
>> X-ray observations from simulations, both AMR and SPH. Of the tools adapted
>> for AMR codes, they tend to be a little clunky and most of them use IDL to
>> extract data. Almost always, gas grid data is regridded to a uniform grid
>> before doing anything with it, making working on large volumes with small
>> resolution prohibitive.
>> >
>> > PHOX is a tool written by Veronica Biffi and Klaus Dolag to generate
>> X-ray observations from (primarily) Gadget simulations. You can find out
>> about it here:
>> >
>> > http://www.mpa-garching.mpg.de/~kdolag/Phox/
>> >
>> > The pipeline for most virtual X-ray observatories goes like this:
>> >
>> > 1) Using the gas properties (density, temperature, metallicity,
>> whatever), generate X-ray emissivity fields.
>> > 2) Project these fields along the chosen line of sight to give a 2D map
>> of surface brightness.
>> > 3) Using this map as a DF for the photons, generate simulated photons
>> which then may be processed later.
>> >
>> > PHOX's (in my estimation, better) approach is:
>> >
>> > 1) Using the gas properties (density, temperature, metallicity,
>> whatever), generate X-ray emissivity fields.
>> > 2) Generate simulated photons from the emissivity field, assuming a
>> fiducial instrument area and exposure time.
>> > 3) Project these photons along a given line of sight, which may be
>> processed later.
>> >
>> > The nice thing about doing things this way is that you can save the
>> photons to disk to be re-used for a variety of different projections and
>> X-ray instruments.
>> >
>> > I am writing a tool that uses yt to get data from AMR simulations to
>> generate photon files readable by PHOX. My intention is that this be a
>> standalone tool that I will make publically available, but it got me
>> thinking about the possible usefulness of "photon fields" in yt, akin to
>> the 3D fields of photons that are written to PHOX photon files. Basically,
>> these are akin to particle fields, with the (x,y,z) position of the photon,
>> its (unshifted) energy, and the (vx,vy,vz) velocity of the emitting gas for
>> Doppler shifting. I don't know if the more general concept of these photon
>> fields would be a useful construct to include in yt at some level or not
>> for constructing simulated observations.
>> Are the photon files not 1:1 mapping with the individual cells?
>> In general, I am 100% on board with this.  This speaks also to the
>> concept we've talked about in the past of 'sidecar' files in, say,
>> Grid Data Format.  You could specify a fallback file for IO, which can
>> also be written to.
>> I think this is a very valuable concept, and we can work within the
>> PHOX goals to make something that could accept, say, contour
>> identification or expensive derivative-based fields (looking at you,
>> baroclinic terms.)
>> >
>> > The main difference between these fields and others in yt is that these
>> entities are slightly more abstract than physical: real photons are of
>> course emitted in a particular direction and received by the observer. But
>> I would guess that this subtle point would not be much of an issue since
>> really the only thing you would be doing with them after generating them
>> would be projecting them along a line of sight.
>> No, I think it is fine, like you say.
>> This could be very exciting -- and in general, I'm really very much in
>> favor of making it easier to interoperate with other analysis codes.
>> This mailing list would be a good place to sound off on design ideas
>> as well as figure out how to fit it in together.  yt gets used a lot
>> by cluster simulators, so I could see this also having broad appeal.
>> -Matt
>> >
>> > So I guess my idea would be to build in the framework for photon
>> fields, along with capabilities for projecting them and doppler shifting
>> them, while letting the details of the generation of their positions and
>> energies up to the user. Would any of the rest of you or your colleagues
>> find such a thing useful? Thoughts?
>> >
>> > Best,
>> >
>> > John Z
>> > _______________________________________________
>> > yt-dev mailing list
>> > yt-dev at lists.spacepope.org
>> > http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
>> _______________________________________________
>> yt-dev mailing list
>> yt-dev at lists.spacepope.org
>> http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
> _______________________________________________
> yt-dev mailing list
> yt-dev at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
> _______________________________________________
> 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/20120615/73fd0a7f/attachment.html>

More information about the yt-dev mailing list