pynbody / genetIC

The GM initial conditions generator
GNU General Public License v3.0
21 stars 8 forks source link

Recreating a MUSIC zoom within genetIC #68

Open Martin-Rey opened 4 years ago

Martin-Rey commented 4 years ago

Hi all,

I am posting this here, as this is likely a question which will come back several times and this issue can serve as documentation.

I would like to reconstruct a zoom simulation that was first generated with MUSIC, and start genetically modify it.

I believe that it is now potentially possible, by importing the white noise fields produced by MUSIC at the different levels using the “import_level_field” commands, with a syntax resembling

import_level_field 0 wnoise_00009.npy
import_level_field 1 wnoise_00010.npy
import_level_field 2 wnoise_00011.npy

where 00009 would correspond to the basegrid. The following are the zoom levels which need to be opened manually at the right spatial position, and by factors of 2 to match the inner workings of MUSIC. Would you agree with that?

Another problem is that MUSIC produces the white noise files in binary format, compared to the required 3D-numpy input format for genetIC. Do you know of an existing tool to convert between these two formats? If yes, we could include it as part of the distribution.

Thanks in advance, Martin

apontzen commented 4 years ago

Sadly it's not quite that simple, because MUSIC uses a different (real space) approach to combining different levels. So, one can only really import level 0 in this sense.

A tool to import MUSIC grids would certainly be useful, but it would need a bit more work; I imagine it essentially boils down to implementing a version of the $T^+$ operator as defined in the appendix.

Martin-Rey commented 4 years ago

Ah I see, thanks for the clarification!

To be clear, with the current implementation, the import_field commands can realistically be used to (i) reproduce the "volume box" from another IC generator and (ii) reproduce zoom initial conditions produced by genetIC.

But since genetIC implements zooms in a novel approach, we cannot reproduce zoom initial conditions from other IC codes (GRAFIC2, MUSIC or tipsy zooms) without significant implementations of method interfaces?

Martin

apontzen commented 4 years ago

Yes that’s correct!

Martin-Rey commented 4 years ago

Ok!

I don't have plans or time to implement such MUSIC interface soon, so I can either close this issue for now or leave it open to be flagged as a long-term improvement.

Martin