jzuhone / pyxsim

Simulating X-ray observations from astrophysical sources.
http://hea-www.cfa.harvard.edu/~jzuhone/pyxsim
Other
20 stars 8 forks source link

How to create a yt dataset from IllustrisTNG simulation data? #20

Closed sandhya0892 closed 3 years ago

sandhya0892 commented 5 years ago

Hi John, I am trying to create mock X-ray observations of galaxy clusters and to this end, I have used IllustrisTNG simulations to extract galaxy cluster information. I began with creating mock X-ray observation of one particular cluster. I am using yt.create_uniform_grid to create a yt dataset consisting of density and temperature values. However, I am having issues with creating the box as the density and temperature is a one-dimensional array with N values where N is the number of cells.
How do I create a yt dataset from the IllustrisTNG data? Thank you.

sandhya0892 commented 5 years ago

Hi John, I am sorry to disturb. Was it possible for you to locate the script that you had mentioned? Could you please send it whenever it is convenient for you?

Thanks and regards, Sandhya

jzuhone commented 5 years ago

Hi @sandhya0892,

I can locate the script today, unfortunately I wasn't able to find time to do it over the long weekend. I'm back in the office today and I can do it in the afternoon.

sandhya0892 commented 5 years ago

Thanks a lot! -Sandhya

jzuhone commented 5 years ago

Hi @sandhya0892,

Here is an example script which downloads a halo from the TNG project and then adds the necessary header info to the file so you can load it in yt. Note that you will need to install yt-4.0 to read Arepo data. You will have to install yt from source from GitHub and switch to the yt-4.0 branch.

https://gist.github.com/ef08134ab51c611858f83d5bd4626214

sandhya0892 commented 5 years ago

Thanks a lot, John for the script.

-Sandhya

jzuhone commented 3 years ago

Closing this because yt now natively supports TNG data.