galaxia_ananke.Survey module#
Contains the Survey class definition
Please note that this module is private. The Survey class is
available in the main galaxia_ananke namespace - use that instead.
- class galaxia_ananke.Survey.Survey(input: Input, photo_sys: str | List[str] = ['padova/GAIA__DR2'], surveyname: str = 'survey', verbose: bool = True)[source]#
Bases:
object- __init__(input: Input, photo_sys: str | List[str] = ['padova/GAIA__DR2'], surveyname: str = 'survey', verbose: bool = True) None[source]#
Driver to exploit the input object and run Galaxia with it.
Call signature:
survey = Survey(input, photo_sys=['padova/GAIA__DR2'], surveyname='survey')
- Parameters:
input (
Input) – Input object storing the particle data.photo_sys (string or list) – Name(s) of the photometric system(s) Galaxia should use to generate the survey. Default to [‘padova/GAIA__DR2’]. Available photometric systems can be found with the photometry submodule - please refer to its documentation for further details.
surveyname (string) – Optional name Galaxia should use for the output files. Default to ‘survey’.
- classmethod prepare_photosystems(photo_sys: str) list[PhotoSystem][source]#
- classmethod set_isochrones_from_photosys(photo_sys: str) list[PhotoSystem][source]#
- make_survey(*, verbose: bool = True, partitioning_rule: CallableDFtoInt | None = None, max_pp_workers: int = 1, pp_auto_flush: bool = True, **kwargs) Output[source]#
Driver to exploit the input object and run Galaxia with it.
Call signature:
output = self.make_survey(cmd_magnames= 'G,Gbp-Grp' , fsample=1, verbose=True, **kwargs)
- Parameters:
cmd_magnames (string) – Names of the filters Galaxia should use for the color- magnitude diagram box selection. The given string must meet the following format:
"band1,band2-band3"where
band1is the magnitude filter and(band2, band3)are the filters that define theband2-band3color index. The filter names must correspond to filters that are part of the first chosen photometric system in photo_sys. Default to'G,Gbp-Grp'fsample (float) – Sampling rate from 0 to 1 for the resulting synthetic star survey. 1 returns a full sample while any value under returns partial surveys. Default to 1.
input_sorter (array_like) – TODO
n_gens, n_jobs (int or iterable of int) – Number of independent catalog generations ran in parallel. Can also receive an iterable containing each generation number to run in parallel. Default to 1. Usage of n_jobs is deprecated and will be removed.
max_gen_workers (int) – CURRENTLY NOT PROPERLY IMPLEMENTED Maximum number of workers to parallelize the initial catalog generations. Default to the number of independent generations in n_gens.
max_pp_workers (int) – Maximum number of workers to parallelize the post-processing pipelines after the initial catalog generation. Default to 1.
pp_auto_flush (bool) – TODO
verbose (bool) – Verbose boolean flag to allow pipeline to print what it’s doing to stdout. Default to True.
partitioning_rule (TODO) – TODO
parfile (string) – Name of file where Input should save the parameters for Galaxia. Default to ‘survey_params’
output_dir (string or pathlib.Path) – Path to directory where to save the input/output files of Galaxia. Default to ‘/home/docs/checkouts/readthedocs.org/user_builds/py-galaxia-ananke/checkouts/main/docs/source’
app_mag_lim_lo, app_mag_lim_hi, abs_mag_lim_lo, abs_mag_lim_hi, color_lim_lo, color_lim_hi (float) – These allow to specify the limits of the chosen color-magnitude diagram box selection (
lofor lower andhifor upper).app_mag,abs_magandcolorrepresent respectively limits in apparent magnitudes, absolute magnitudes and color index. Default values follow those set in the dictionary:{'abs_mag': [-1000, 20], 'app_mag': [-1000, 1000], 'color': [-1000, 1000]}
rSun0, rSun1, rSun2 (float) – Coordinates for the observer position in kpc. Respectively default to:
-8.121973366106948, -1.4729444519452402e-11 & 0.020800000030482345
vSun0, vSun1, vSun2 (float) – Coordinates for the observer velocity in km/s. Respectively default to:
12.9, 245.6 & 7.78
r_max, r_min (float) – Extent of the shell of radii from observer location within which particles should be considered by Galaxia. Respectively default to:
500 & 0
rand_seed (int) – Seed to be used by Galaxia’s pseudorandom number generator. Default to 17052
nstart (int) – Index at which to start indexing synthetic stars. Default to 0
longitude, latitude (float) –
Currently not implemented. Respectively default to:
76.273 & 13.4725
star_type (int) – Currently not implemented. Default to 0
geometry_opt (int) – Currently not implemented. Default to 0
survey_area (float) – Currently not implemented. Default to 207.455
pop_id (int) – Currently not implemented. Default to 10
warp_flare_on (int) – Currently not implemented. Default to 0
photo_error (int) – Currently not implemented. Default to 0
- Returns:
output – Handler with utilities to utilize the output survey and its data.
- Return type:
Output
- property has_no_fileparam: bool#
- property fileparam: Dict[str, str | int | float]#
- property parameters: Dict[str, str | int | float]#
- property n_gens: List[int]#
- property fsample: float#
- property hash: str#
- property surveyname: str#
- property append_hash: bool#
- property surveyname_hash: str#
- property metadata: Dict[str, Any]#
- property photosystems: List[PhotoSystem]#
- property isochrones#
- property photo_sys: Set[str]#
- property verbose: bool#
- property has_no_output: bool#
- property output#
- property caching: bool#
- property hdim: int#
- property inputname_hash: str#
- property inputdir: Path#
- property ngb: int#
- property check_state_before_running#