Study and projects

SimulationStudy

class astrophysix.simdm.SimulationStudy(project=None)

HDF5 simulation study file for Project tree structure persistency

Parameters

project (Project) – study main project

property creation_time

Study creation date/time (datetime.datetime).

property last_modification_time

Study last modification date/time (datetime.datetime).

classmethod load_HDF5(study_file_path)

Loads a new or existing SimulationStudy from a HDF5 (*.h5) file

Parameters

study_file_path (string) – SimulationStudy HDF5 (existing) file path

Returns

study – Study loaded from HDF5 file.

Return type

SimulationStudy

property project

Study main project

save_HDF5(study_fname=None, dry_run=False, callback=None, galactica_checks=False)

Save the SimulationStudy into a HDF5 (*.h5) file

Parameters
  • study_fname (string) – Simulation study HDF5 filename.

  • dry_run (bool) – perform a dry run ? Default False.

  • callback (callable) – method to execute upon saving each item of the study.

  • galactica_checks (bool) – Perform Galactica database validity checks and display warning in case of invalid content for upload on Galactica. Default False (quiet mode).

property study_filepath

Simulation study HDF5 file path

property uid

Study UUID

Project and ProjectCategory

class astrophysix.simdm.ProjectCategory(value)

Project category enum

Example

>>> cat = ProjectCategory.PlanetaryAtmospheres
>>> cat.verbose_name
"Planetary atmospheres"
Cosmology = ('COSMOLOGY', 'Cosmology')
GalaxyFormation = ('GAL_FORMATION', 'Galaxy formation')
GalaxyMergers = ('GAL_MERGERS', 'Galaxy mergers')
PlanetaryAtmospheres = ('PLANET_ATMO', 'Planetary atmospheres')
SolarMHD = ('SOLAR_MHD', 'Solar Magnetohydrodynamics')
StarFormation = ('STAR_FORM', 'Star formation')
StarPlanetInteractions = ('STAR_PLANET_INT', 'Star-planet interactions')
StellarEnvironments = ('STELLAR_ENVS', 'Stellar environments')
Supernovae = ('SUPERNOVAE', 'Supernovae')
property alias

Project category alias

classmethod from_alias(alias)
Parameters

alias (string) – project category alias

Returns

c – Project category matching the requested alias.

Return type

ProjectCategory

Raises

ValueError – if requested alias does not match any project category.

Example

>>> c = ProjectCategory.from_alias("STAR_FORM")
>>> c.verbose_name
"Star formation"
>>> c2 = ProjectCategory.from_alias("MY_UNKNOWN_CATEGORY")
ValuerError: No ProjectCategory defined with the alias 'MY_UNKNOWN_CATEGORY'.
property verbose_name

Project category verbose name

class astrophysix.simdm.Project(*args, **kwargs)
__eq__(other)

Project comparison method

other: Project

project to compare to.

__unicode__()

String representation of the instance

property acknowledgement

How to acknowledge this project.

New in version 0.5.0.

property alias

Project alias

property category

ProjectCategory or ProjectCategory.alias (string). Can be edited.

property data_description

Data description available in this project

property directory_path

Project data directory path

galactica_validity_check(**kwargs)

Perform validity checks on this instance and eventually log warning messages.

Parameters

kwargs (dict) – keyword arguments (optional)

property general_description

General description of the project

property project_title

Project title

property short_description

Short description of the project

property simulations

Project Simulation list (ObjectList)