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 namespace - use that instead.

Galaxia_ananke.Output.shift_g_lon(lon)[source]#
class Galaxia_ananke.Output.Output(survey: Survey, parameters: dict)[source]#

Bases: object

__init__(survey: Survey, parameters: dict) None[source]#

Driver to exploit the output of Galaxia.

Call signature::

output = Output(survey, parameters)

Parameters:
  • survey (Survey) – Survey object that returned this output.

  • parameters (dict) – Dictionary all of parameters passed by Survey that were used to generate this output.

Notes

An Output object almost behaves as a vaex DataFrame, also please consult vaex online 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 method apply_post_process_pipeline_and_flush. Also if such Output object was generated by other software than Galaxia_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_filtername

where

  • photo_sys corresponds to the chosen photometric system

  • filtername corresponds to a filter name of that system

As an example, the photometry in filters gbp, grp & g of the Gaia DR2 system identified as GAIA__DR2 are respectively under keys gaia__dr2_gbp, gaia__dr2_grp & gaia__dr2_g.

With those are also always included the following properties:

  • Position coordinates in \(kpc\) via keys (px, py, pz)

  • Celestial equatorial coordinates in \(degrees\) via keys (ra, dec)

  • Radial velocity in \(km/s\) via key vr

  • Surface temperature in Kelvin and decimal logarithmic scale via key teff

  • Index of the data partition that contains the particle via key partitionid

  • Stellar luminosity in solar luminosities and decimal logarithmic scale via key lum

  • Flag = 1 if star not at center of its parent particle via key partid

  • Celestial galactic coordinates in \(degrees\) via keys (glon, glat)

  • Surface gravity in CGS units and decimal logarithmic scale via key grav

  • Current stellar mass in solar masses via key mact

  • Stellar metallicity \([Fe/H]\) in \(dex\) relative to solar via key feh

  • Zero Age Main Sequence stellar mass in solar masses via key smass

  • Distance modulus in magnitude units via key dmod

  • Distance in \(kpc\) via key rad

  • Tip of the Red Giant Branch stellar mass in solar masses via key mtip

  • Galactic proper motions in milliarcseconds per year via keys (mul, mub)

  • Equatorial proper motions in milliarcseconds per year via keys (mura, mudec)

  • Parallax in milliarcseconds via key pi

  • Index of parent particle via key parentid

  • Velocity coordinates in \(km/s\) via keys (vx, vy, vz)

  • Stellar ages in years and decimal logarithmic scale via key age

Additionally, depending on what optional properties were provided with the input particle data, the output can also include the following properties:

  • Calcium abundance \([Ca/H]\) in \(dex\) via key calcium

  • Oxygen abundance \([O/H]\) in \(dex\) via key oxygen

  • Magnesium abundance \([Mg/H]\) in \(dex\) via key magnesium

  • Helium abundance \([He/H]\) in \(dex\) via key helium

  • Neon abundance \([Ne/H]\) in \(dex\) via key neon

  • Index of parent particle population via key satid

  • Silicon abundance \([Si/H]\) in \(dex\) via key silicon

  • Carbon abundance \([C/H]\) in \(dex\) via key carbon

  • Formation distance of parent particle in kpc via key dform

  • Nitrogen abundance \([N/H]\) in \(dex\) via key nitrogen

  • Alpha abundance \([Mg/Fe]\) in \(dex\) via key alpha

  • Sulphur abundance \([S/H]\) in \(dex\) via key sulphur

apply_post_process_pipeline_and_flush(post_process: CallableDFtoNone, *args, flush_with_columns=(), hold_flush: bool = False) 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_process callable 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.

save(path)[source]#

Save output to new path

Danger

currently not implemented

property survey#
property photosystems#
property isochrones#
property export_keys: Tuple[str]#
property catalogue_keys: Tuple[str]#
property output_dir#
property output_name#
property rsun_skycoord#
flush_extra_columns_to_hdf5(with_columns: Iterable | 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.