-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ensure that property importing and calculations use consistent catalogue #117
Comments
You could force this by implementing a custom handler I think -- take a look here https://pynbody.github.io/tangos/custom_input_handlers.html In your custom input handler, you'd want to override |
It feels to me like it should be easier than writing one's own custom handler. I don't think it is too hard to include it as a command line argument, but would that make things messy in some way? One could imagine someone wanting to create multiple database files for different halo finders. So long as those halo finders are already compatible with TANGOS it should be easy to tell it "use this one". I was also thinking more generally whether we'd want to ensure the stat_file handler always tries to be consistent with the input_handler, but that might introduce too many problems with the specific ways those different tools select halo catalogs. |
Yes, I do on balance think it would be a good idea for the pre-implemented input handlers to select a particular stat file if that is what they are expecting. Then we could add an input handler that you have to explicitly select if you want to use the IDL-generated catalogues? (I'm not sure why you'd want to incidentally?) |
I think I'm having this problem with one of the small cluster simulations: any "tangos write" fails with "ValueError: Halo 220 does not exist". The "...amiga.stat" file indeed does not have a halo numbered 220. Is there a way around this so I can get this simulation into tangos? |
…ok's toolset), or to insist on ignoring those catalogues. This is in response to issue #117, where it has become clear people have both types of catalogue on disk and this can cause severe confusion due to the automated search for catalogues and statistics files. To insist on using IDL-generated catalogues, use tangos add <name_of_sim> --handler=pynbody.ChangaUseIDLInputHandler To insist on ignoring IDL-generated catalogues, use tangos add <name_of_sim> --handler=pynbody.ChangaIgnoreIDLInputHandler
Currently, when importing halo properties from halo stat files generated by a halo finder, the HaloStatFile class iterates through all possibilities until it lands a subclass that works. However, if multiple catalog formats exist this can be a problem. An example is if AHF was run and the IDL post processing also exists (creating simname.amiga.grp, simname.amiga.stat, etc). The IDL version will often omit halos that exist in the full catalog for a zoom run. Yet, if the AHF stat file still exists, the HaloStatFile class will use this file to import halos. Then, when properties are calculated with, for example, pynbody and the user has it set to read the IDL files instead, it will attempt to run the calculations on halos that do not exist in that catalog. Either allowing the user to specify which catalog to use at runtime or including an option to set this in config.py would be useful to avoid these errors.
The text was updated successfully, but these errors were encountered: