pynbody / genetIC

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

Import random field is incompatible with zooms #48

Closed Martin-Rey closed 5 years ago

Martin-Rey commented 5 years ago

Hi,

I am encountering a new error when using the new command import_level, and trying to open a zoom after it.

Since import_level initialise the random draw, opening a zoom then fails with the following error: Error "Trying to initialize a grid after the random field was already drawn" on line 25 ("zoomgrid 2 64")

This error should be reproducible by adding to parameter file of test11 the following.: import_level 0 ../test_11_import/reference_grid/grid-0.npy centre 12.5 12.8 34.5 select_sphere 2 zoomgrid 2 64

I am not sure how this fix this in a self-consistent way. Martin

apontzen commented 5 years ago

Just use import_level after you already defined the zoom regions?

Martin-Rey commented 5 years ago

Good point. This seems to do the trick.