halotools icon indicating copy to clipboard operation
halotools copied to clipboard

metadata fail the tests

Open SaraZahoor opened this issue 6 years ago • 2 comments

I have a rockstar catalog and when I try to retrieve the values of viral radius using columns_to_keep_dict, I get this:

The halo catalog and/or its associated metadata fail the following tests:

  1. All values of the halo_rvir column must be less than 50, crudely ensuring you used Mpc/h units.

Can anyone help here?

SaraZahoor avatar Mar 27 '19 20:03 SaraZahoor

The problem is most likely that your halo_rvir column data is stored in kpc, rather than Mpc, so the data in this column need to have their units converted because Halotools assumes all distances in a halo catalog will be in the same units. This is a very common issue when processing Rockstar hlist files, and so there is a mechanism dedicated to resolving this difference in convention. Have a look at the docstring to the RockstarHlistReader.read_halocat method. The first argument is columns_to_convert_from_kpc_to_mpc, a list of strings. For any column you wish to read in and convert from kpc to Mpc, the name of the column should appear in this list.

aphearin avatar Mar 27 '19 22:03 aphearin

Okay, I got it now. Thanks!

On Thu, Mar 28, 2019 at 3:17 AM Andrew Hearin [email protected] wrote:

The problem is most likely that your halo_rvir column data is stored in kpc, rather than Mpc, so the data in this column need to have their units converted because Halotools assumes all distances in a halo catalog will be in the same units. This is a very common issue when processing Rockstar hlist files, and so there is a mechanism dedicated to resolving this difference in convention. Have a look at the docstring to the RockstarHlistReader.read_halocat method. The first argument is columns_to_convert_from_kpc_to_mpc, a list of strings. For any column you wish to read in and convert from kpc to Mpc, the name of the column should appear in this list.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/astropy/halotools/issues/935#issuecomment-477368561, or mute the thread https://github.com/notifications/unsubscribe-auth/AUSPJh3U5gM7UZCdIISTuMhVbguAaxzAks5va-31gaJpZM4cOwrH .

SaraZahoor avatar Apr 01 '19 02:04 SaraZahoor