galaxia_ananke.Output module#
Contains the Output class definition
Please note that this module is private. The Output class is
available in the main galaxia_ananke namespace - use that instead.
- class galaxia_ananke.Output.Output(survey: Survey)[source]#
Bases:
object- __init__(survey: Survey) None[source]#
Driver to exploit the output of Galaxia.
- Call signature::
output = Output(survey)
- Parameters:
survey (
Survey) – Survey object that returned this output.
Notes
An Output object almost behaves as a vaex DataFrame, also please consult
vaexonline tutorials for more hands-on information:The DataFrame represents the catalogue with columns corresponding to properties of the stars from the synthetic stellar population it simulates.
Warning
When generated directly by
galaxia_ananke, the catalogue properties reflect directly the quantities as computed by Galaxia. However the catalogue can be modified/amended by applying post-processing routines using the methodapply_post_process_pipeline_and_flush. Also if suchOutputobject was generated by other software thangalaxia_ananke, post-processing may have been applied: also please refer to that software documentation for a more complete overview of the catalogue.The catalogue properties include the photometric magnitudes per filter, with each filter identified by a key in the following lowercase format:
photosys_filternamewhere
photo_syscorresponds to the chosen photometric systemfilternamecorresponds to a filter name of that system
As an example, the photometry in filters
gbp,grp&gof the Gaia DR2 system identified asGAIA__DR2are respectively under keysgaia__dr2_gbp,gaia__dr2_grp&gaia__dr2_g.With those are also always included the following properties:
Celestial equatorial coordinates in \(degrees\) via keys
(ra, dec)Surface temperature in Kelvin and decimal logarithmic scale via key
teffDistance modulus in magnitude units via key
dmodDistance in \(kpc\) via key
radRadial velocity in \(km/s\) via key
vrStellar metallicity \([Fe/H]\) in \(dex\) relative to solar via key
fehTip of the Red Giant Branch stellar mass in solar masses via key
mtipSurface gravity in CGS units and decimal logarithmic scale via key
gravEquatorial proper motions in milliarcseconds per year via keys
(mura, mudec)Zero Age Main Sequence stellar mass in solar masses via key
minitIndex of the data partition that contains the particle via key
partitionidStellar ages in years and decimal logarithmic scale via key
agePosition coordinates in \(kpc\) via keys
(px, py, pz)Flag = 1 if star not at center of its parent particle via key
partidGalactic proper motions in milliarcseconds per year via keys
(mul, mub)Velocity coordinates in \(km/s\) via keys
(vx, vy, vz)Stellar luminosity in solar luminosities and decimal logarithmic scale via key
lumParallax in milliarcseconds via key
piCelestial galactic coordinates in \(degrees\) via keys
(glon, glat)Current stellar mass in solar masses via key
mactIndex of parent particle via key
parentid
Additionally, depending on what optional properties were provided with the input particle data, the output can also include the following properties:
Oxygen abundance \([O/H]\) in \(dex\) via key
oxygenNitrogen abundance \([N/H]\) in \(dex\) via key
nitrogenSilicon abundance \([Si/H]\) in \(dex\) via key
siliconNeon abundance \([Ne/H]\) in \(dex\) via key
neonFormation distance of parent particle in kpc via key
dformIndex of parent particle population via key
satidSulphur abundance \([S/H]\) in \(dex\) via key
sulphurAlpha abundance \([Mg/Fe]\) in \(dex\) via key
alphaCarbon abundance \([C/H]\) in \(dex\) via key
carbonMagnesium abundance \([Mg/H]\) in \(dex\) via key
magnesiumCalcium abundance \([Ca/H]\) in \(dex\) via key
calciumHelium abundance \([He/H]\) in \(dex\) via key
helium
- read_galaxia_output(partitioning_rule: CallableDFtoInt | None, max_pp_workers: int, pp_auto_flush: bool) None[source]#
- apply_post_process_pipeline_and_flush(post_process: CallableDFtoNone, *args, flush_with_columns=(), hold_flush: bool = False, hold_reload: bool = False, consolidate_partitions_per_process: bool = False, update_metadata: Dict[str, str | int | float] | None = None) None[source]#
Apply a given post processing routine to the catalogue
- Parameters:
post_process (callable) – Post processing pipeline to apply to the catalogue. This must be defined as a callable that returns nothing, and take only positional arguments, the first of which being the DataFrame representing the catalogue.
*args (callable args) – Any other positinoal arguments that should be passed to the
post_processcallable pipeline, in the order they should be passed.flush_with_columns (iterable) – If given an iterable structure of existing column keys, the flushing done after application of the post-processing will also overwrite those in the backend file with their current in-memory values. Default to an empty tuple.
hold_flush (bool) – Flag to hold the flushing from being done after application of the post-processing. Default to False.
hold_reload (bool) – Flag to hold the reload from being done after application of the post-processing and flushing. Default to False.
consolidate_partitions_per_process (bool) – TODO
update_metadata (dict) – TODO
- property check_state_before_running#
- property caching#
- property verbose#
- property survey#
- property photosystems#
- property export_keys: Tuple[str]#
- property catalogue_keys: Tuple[str]#
- property output_dir#
- property output_name#
- property rsun_skycoord#
- property parameters: Dict[str, str | int | float]#
- property parameter_mag_color_names: str#
- property parameter_magnitude_name: str#
- property parameter_abs_mag_hi: str#
- property parameter_app_mag_hi: str#
- property all_metadata: Dict[str, Any]#
- flush_extra_columns_to_hdf5(with_columns: Iterable | None = (), update_metadata: Dict[str, str | int | float] | None = None) None[source]#
Flush the dataframe new columns to its backend memory-mapped file
- Parameters:
with_columns (iterable) – If given an iterable structure of existing column keys, the flushing will also overwrite those in the backend file with their current in-memory values. Default to an empty tuple.
update_metadata (dict) – TODO