save_initC¶
- cosmic.output.save_initC(filename, initC, key='initC', settings_key='initC_settings', force_save_all=False)[source]¶
Save an initC table to an HDF5 file.
Any column where every binary has the same value (setting) is saved separately with only a single copy to save space.
This will take slightly longer (a few seconds instead of 1 second) to run but will save you around a kilobyte per binary, which adds up!
- Parameters:
- filenamestr
Filename/path to the HDF5 file
- initCpandas.DataFrame
Initial conditions table
- keystr, optional
Dataset key to use for main table, by default “initC”
- settings_keystr, optional
Dataset key to use for settings table, by default “initC_settings”
- force_save_allbool, optional
If true, force all settings columns to be saved in the main table, by default False