Command Line Scripts and Conversion Tools ========================================= One of the main intents of the IRATE format is to unify the variety of formats currently used for simulations into a standard format that many tools can access efficiently. Hence, the IRATE package provides a number of conversion tools from various formats IRATE Utilities --------------- Validate IRATE File Structure ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. program:: iratevalidate The ``iratevalidate`` script tests whether or not a file conforms to the IRATE format. It can also be used to show the general structure of a supplied file (or files). Options: .. cmdoption:: -v, --verbose Prints detailed messages during validation .. cmdoption:: -i, --immediate Causes the script to immediately exit on first validaton error instead of reporting all errors. .. cmdoption:: -c, --print-cosmology Print cosmology information from the supplied IRATE file(s) in addition to validating. .. cmdoption:: -p, --print-structure Print group and dataset structure information for the supplied IRATE file(s) in addition to validating. .. cmdoption:: -t, --type The type of IRATE file to assume for validation - used to load custom validators. .. cmdoption:: -l, --list-types Lists all valid types and immediately exits. .. cmdoption:: -s, --skips Skips the validation stage. Gather IRATE File ~~~~~~~~~~~~~~~~~ .. program:: irategather The ``irategather`` script takes an IRATE file (or really any HDF5 file) and combines any externally linked datasets or groups into a single monolithic file. See :func:`irate.core.gather_files` for additional information. Options: .. cmdoption:: -o, --output File to output gathered file to. If not given, the input file will be overwritten. .. cmdoption:: -d, --delete-gathered Delete all files that were combined to make the output file after gathering is complete. .. cmdoption:: -v, --validate Validate before gathering. If validation fails, gathering will not occur. Format Converters ----------------- Tipsy Binary -> IRATE ~~~~~~~~~~~~~~~~~~~~~ .. program:: tipsy2irate The ``tipsy2irate`` script converts files in the tipsy binary format to IRATE. Use it as ``tipsy2irate [options] infile [outfile]``. If `outfile` is not specified, it will be the same as `infile` with '.h5' added. Options: *add options* Gadget Binary -> IRATE ~~~~~~~~~~~~~~~~~~~~~~ .. program:: gadget2irate The ``gadget2irate`` script converts files in the Gadget format to IRATE. Use it as ``gadget2irate input-file output-file [options]``. Options: .. cmdoption:: -i, --inits Specifies that the input file is an initial conditions file, in which case gas densities and smoothing lengths are skipped. .. cmdoption:: -p, --potential Specifies that the gravitational potential is contained in the GADGET file, which is controlled via the Makefile of GADGET2. Has no effect if --type2 is enabled. .. cmdoption:: -a, --acceleration Specifies that the acceleration is contained in the GADGET file, which is controlled via the Makefile of GADGET2. No effect if --type2 is enabled. .. cmdoption:: -s, --entropy Specifies that the rate of change of entropy of gas particles is included in the GADGET file, which is controlled via the Makefile of GADGET2. Has no effect if --type2 is enabled. .. cmdoption:: -t, --timestep Specifies that the timestep of each particle is contained in the GADGET file, which is controlled via the Makefile of GADGET2. Has no effect if --type2 is enabled. .. cmdoption:: --t0name, --gasname Name of the group that the particles in the gas group of the GADGET file is given, under the specified tree. .. cmdoption:: --t1name, --haloname Name of the group that the particles in the halo group of the GADGET file is given, under the specified tree. .. cmdoption:: --t2name, --diskname Name of the group that the particles in the disk group of the GADGET file is given, under the specified tree. .. cmdoption:: --t3name, --bulgename Name of the group that the particles in the bulge group of the GADGET file is given, under the specified tree. .. cmdoption:: --t4name, --starname Name of the group that the particles in the star group of the GADGET file is given, under the specified tree. .. cmdoption:: --t5name, --bndryname Name of the group that the particles in the boundary group of the GADGET file is given, under the specified tree. .. cmdoption:: --s8, --sigma8 Specify the cosmology parameter sigma8 for inclusion in the Cosmology group .. cmdoption:: --ns, --n_s Specify the Power Spectrum Index for inclusion in the Cosmology group .. cmdoption:: --snap, --snapshot Explicitely identify the snapshot number that data will be saved under in the IRATE file, rather than using the GADGET convention .. cmdoption:: -L Human readable string the specifies the units of length in the file .. cmdoption:: -v Human readable string the specifies the units of velocity in the file .. cmdoption:: -M Human readable string the specifies the units of mass in the file .. cmdoption:: --_unit Factor to convert units for the property given by the underscore to CGS .. cmdoption:: --_hfact The exponent of the reduced Hubble Parameter as it appears in the units for the quantity given by the underscore .. cmdoption:: --_afact The exponent of the scale factor as it appears in the units for the quantity given by the underscore EnBiD -> IRATE ~~~~~~~~~~~~~~ .. program:: enbid2irate The ``enbid2irate`` script adds the data from files produced by EnBiD in the GADGET format to existing IRATE files. Use it as ``enbid2irate enbid-file irate-file [output-file] [options]``. If `outfile` is not specified, it defaults to irate-file with '-wenbid.hdf5' added. enbid-file should be a binary file as produced by EnBiD, and irate-file should be an existing IRATE file. All data is saved under /Analysis .. warning:: This script hasn't been updated to conform to the new IRATE standard, and, as such, should probably not be used yet. Options: .. cmdoption:: --t0tree, --gastree Tree (either gas, dark, or star) that the particles in the gas group of the GADGET file will be saved under. .. cmdoption:: --t1tree, --halotree Tree (either gas, dark, or star) that the particles in the halo group of the GADGET file will be saved under. .. cmdoption:: --t2tree, --disktree Tree (either gas, dark, or star) that the particles in the disk group of the GADGET file will be saved under. .. cmdoption:: --t3tree, --bulgetree Tree (either gas, dark, or star) that the particles in the bulge group of the GADGET file will be saved under. .. cmdoption:: --t4tree, --startree Tree (either gas, dark, or star) that the particles in the star group of the GADGET file will be saved under. .. cmdoption:: --t5tree, --bndrytree Tree (either gas, dark, or star) that the particles in the boundary group of the GADGET file will be saved under. .. cmdoption:: --t0name, --gasname Name of the group that the particles in the gas group of the GADGET file is given, under the specified tree. .. cmdoption:: --t1name, --haloname Name of the group that the particles in the halo group of the GADGET file is given, under the specified tree. .. cmdoption:: --t2name, --diskname Name of the group that the particles in the disk group of the GADGET file is given, under the specified tree. .. cmdoption:: --t3name, --bulgename Name of the group that the particles in the bulge group of the GADGET file is given, under the specified tree. .. cmdoption:: --t4name, --starname Name of the group that the particles in the star group of the GADGET file is given, under the specified tree. .. cmdoption:: --t5name, --bndryname Name of the group that the particles in the boundary group of the GADGET file is given, under the specified tree. Gadget Binary + EnBiD -> IRATE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. program:: gb-enbid2irate The ``gb2-enbid2irate`` script combines the gb2irate and enbid2irate scripts into one step. Use it as ``gb-enbid2irate gadget-file enbid-file [output-file] [options]``. If `outfile` isn't specified, it defaults to gadget-file with '-enbid-irate.hdf5' added. Takes the same options as gb2irate. .. warning:: This script hasn't been updated to conform to the new IRATE standard, and, as such, should probably not be used yet. AHF ASCII -> IRATE ~~~~~~~~~~~~~~~~~~ .. program:: ahf2irate The ``ahf2irate`` script converts files in the AHF ASCII format to IRATE. Use it as ``ahf2irate input-file-base output-file snapshot-number [options]``. The input file base should be provided as ``*.AHF_``; i.e. everything up to the "halos" or "particles" or "profiles" part of the filename. Options: .. cmdoption:: --name The name that will be used for the group that the halo catalog is saved in. .. cmdoption:: --particles Include particle data from input-file-base + 'particles'. If given, the data will be saved in a second HDF5 file that will be linked to the main IRATE catalog file. .. cmdoption:: --profiles Include radial profiles from input-file-base + 'profiles'. Data will be saved under /Catalog/RadialProfiles/ .. cmdoption:: -p Include both particles and profiles data; i.e. enables both --particles and --particles. .. cmdoption:: --nogas Enable if AHF was not compiled with -DGAS_PARTICLES or code will fail in trying to combine spatial datasets related to gas and star particles. .. cmdoption:: --paramfile= Specify an AHF parameter file to be saved as attributes to the group that contains the halo catalog. .. cmdoption:: -s, --size Maximum size that particle data will be in memory before writing to a file, in GB. Note that this only has an effect if using HDF5 1.8; otherwise, all the particles will be read before anything is written. .. cmdoption:: --hdf5-16 Force the usage of HDF5 1.6 API, even if 1.8 is found. At present, the benefits that 1.8 provides aren't working, so this is always enabled. .. cmdoption:: --pos Human readable string that identifies the units used for position .. cmdoption:: --vel Human readable string that identifies the units used for velocity .. cmdoption:: --mass Human readable string that identifies the units used for mass .. cmdoption:: --rad Human readable string that identifies the units used for radius .. cmdoption:: --energy Human readable string that identifies the units used for energy .. cmdoption:: --phi Human readable string that identifies the units used for Phi0 .. cmdoption:: --ang Human readable string that identifies the units used for angular momentum .. cmdoption:: --___unit Factor to convert the units for the quantity given by the underscore to CGS .. cmdoption:: --___hfact The exponent of the reduced Hubble Parameter as it appears in the units for the quantity given by the underscore .. cmdoption:: --___afact The exponent of the scale factor as it appears in the units for the quantity given by the underscore AHF Particles -> IRATE ~~~~~~~~~~~~~~~~~~~~~~ .. program:: ahfparticles2irate The ``ahfparticles2irate`` script reads an AHF _particles file, saves it to an HDF5 file, then links the resulting datasets to an existing IRATE catalog file. Use it as ``ahfparticles2irate particle-file irate-file output-file snapshot-number [options]``. If `output-file` isn't specified, it defaults to irate-file + '-{snapshot number}particles.hdf5'. Options: .. cmdoption:: -o, --overwrite Overwrite the existing output file, if it exists. .. cmdoption:: -s, --size Maximum size that particle data will be in memory before writing to a file, in GB. Note that this only has an effect if using HDF5 1.8; otherwise, all the particles will be read before anything is written. .. cmdoption:: --hdf5-16 Force the usage of HDF5 1.6 API, even if 1.8 is found. At present, the benefits that 1.8 provides aren't working, so this is always enabled. .. cmdoption:: --name The name of the group that the halo catalog is saved under. Must match what is already in the file. Rockstar -> IRATE ------------------ .. program:: rockstar2irate The ``rockstar2irate`` script converts Rockstar halo catalogs to IRATE catalog files. Use it as ``rockstar2irate input-file output-file snapshot-number [format] [options]``. If `output-file` isn't specified, it defaults to input-file with '-irate.hdf5' added. Options: .. cmdoption:: -b Specifies that the input file is a Rockstar binary file. .. cmdoption:: -a Specifies that the input file is a Rockstar ASCII file. .. cmdoption:: -n, --name Specify the name of the group that the halo catalog is to be saved under. .. cmdoption:: --ns, --n_s Specify the Power Spectrum Index for inclusion in the Cosmology group .. cmdoption:: --s8, --sigma8 Specify the cosmological parameter sigma8 for inclusion in the Cosmology group.