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:
Stellar ages in years and decimal logarithmic scale via key
ageParallax in milliarcseconds via key
piPosition coordinates in \(kpc\) via keys
(px, py, pz)Stellar luminosity in solar luminosities and decimal logarithmic scale via key
lumEquatorial proper motions in milliarcseconds per year via keys
(mura, mudec)Celestial galactic coordinates in \(degrees\) via keys
(glon, glat)Velocity coordinates in \(km/s\) via keys
(vx, vy, vz)Current stellar mass in solar masses via key
mactRadial velocity in \(km/s\) via key
vrFlag = 1 if star not at center of its parent particle via key
partidStellar metallicity \([Fe/H]\) in \(dex\) relative to solar via key
fehGalactic proper motions in milliarcseconds per year via keys
(mul, mub)Surface gravity in CGS units and decimal logarithmic scale via key
gravZero Age Main Sequence stellar mass in solar masses via key
smassDistance modulus in magnitude units via key
dmodIndex of parent particle via key
parentidIndex of the data partition that contains the particle via key
partitionidTip of the Red Giant Branch stellar mass in solar masses via key
mtipDistance in \(kpc\) via key
radSurface temperature in Kelvin and decimal logarithmic scale via key
teffCelestial equatorial coordinates in \(degrees\) via keys
(ra, dec)
Additionally, depending on what optional properties were provided with the input particle data, the output can also include the following properties:
Nitrogen abundance \([N/H]\) in \(dex\) via key
nitrogenSilicon abundance \([Si/H]\) in \(dex\) via key
siliconCalcium abundance \([Ca/H]\) in \(dex\) via key
calciumSulphur abundance \([S/H]\) in \(dex\) via key
sulphurHelium abundance \([He/H]\) in \(dex\) via key
heliumMagnesium abundance \([Mg/H]\) in \(dex\) via key
magnesiumCarbon abundance \([C/H]\) in \(dex\) via key
carbonFormation distance of parent particle in kpc via key
dformAlpha abundance \([Mg/Fe]\) in \(dex\) via key
alphaOxygen abundance \([O/H]\) in \(dex\) via key
oxygenIndex of parent particle population via key
satidNeon abundance \([Ne/H]\) in \(dex\) via key
neon
- 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