galaxia_ananke package#
galaxia_ananke#
Provides a set of utilities to run a modified version of the synthetic star survey generator Galaxia (Sharma et al 2011 <http://ascl.net/1101.007>).
How to use#
galaxia_ananke comes with the function make_survey_from_particles, please refer to its documentation for further help.
- galaxia_ananke.make_survey_from_particles(*args, pname=None, kname=None, photo_sys=['padova/GAIA__DR2'], cmd_magnames='G,Gbp-Grp', simname='sim', surveyname='survey', fsample=1, ngb=64, k_factor=1, caching=False, **kwargs)[source]#
Returns a handler object representing the synthetic star survey generated by Galaxia given the properties of an input set of particles and various survey parameters.
Call signatures:
output = make_survey_from_particles(particles, kernels, photo_sys=DEFAULT_PSYS, cmd_magnames=DEFAULT_CMD, simname='sim', surveyname='survey', fsample=1, ngb=64, **kwargs) output = make_survey_from_particles(pname=None, kname=None, photo_sys=DEFAULT_PSYS, cmd_magnames=DEFAULT_CMD, surveyname='survey', fsample=1, **kwargs)
- Parameters:
particles (dict) – Dictionary where each elements represent the properties of the input particles, given as equal-length array_like objects. Refer to Input documentation for appropriate formatting. galaxia_ananke also comes packaged with a function make_dummy_particles_input to produce a dummy example for that dictionary.
kernels (array_like) – Array containing the kernel characteristic lengths for each input particle. Must be of equal length N as the arrays provided in the particles dictionary, as either a (N) or a (Nx2) array if representing respectively kernels in position space, or in phase space (using the same position and velocity unit as that of the corresponding particles dictionary entry).
pname (string) – Path to existing pre-formatted particles EBF files to use as input for Galaxia. This keyword argument must be used in conjunction with kname. Default to None if unused.
kname (string) – Path to existing pre-formatted kernel EBF files to use as input for Galaxia. This keyword argument must be used in conjunction with pname. Default to None if unused.
photo_sys (string or list) – Name(s) of the photometric system(s) Galaxia should use to generate the survey. Default to DEFAULT_PSYS - refer to the package constants. Available photometric systems can be found with the photometry submodule - please refer to its documentation for further details.
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: f”{band1},{band2}-{band3}” where band1 is the magnitude filter and (band2, band3) are the filters that define the band2-band3 color index. The filter names must correspond to filters that are part of the first chosen photometric system in photo_sys. Default to DEFAULT_CMD - refer to the package constants.
simname (string) – Optional name Galaxia should use for the input files. Default to ‘sim’.
surveyname (string) – Optional name Galaxia should use for the output files. Default to ‘survey’.
fsample (float) – Sampling rate from 0 to 1 for the resulting synthetic star survey. 1 returns a full sample while any value below returns partial surveys. Default to 1.
ngb (int) – Number of neighbouring particles Galaxia should consider. Default to 64.
k_factor (float) – Scaling factor applied to the kernels lengths to adjust all the kernels sizes uniformly. Lower values reduces the kernels extents, while higher values increases them. Default to 1 (no adjustment).
caching (bool) – TODO
**kwargs – Additional keyword arguments to customize the survey. Refer to constant PARFILE_TEMPLATE for all the possible keyword arguments.
- Returns:
output – Handler with utilities to utilize the output survey and its data.
- Return type:
Subpackages#
- galaxia_ananke.photometry package
- Submodules
- galaxia_ananke.photometry.Formatting module
FormattingFormatting.i_ageFormatting.i_miniFormatting.i_mactFormatting.i_lumFormatting.i_teffFormatting.i_gravFormatting.i_labelFormatting.lin_ageFormatting.feh_sunFormatting.format_mapperFormatting.nonmagnitude_itemgetterFormatting.metallicity_converter()Formatting.qtable_per_age_from_isochronefile()Formatting.__init__()
- galaxia_ananke.photometry.InterfaceSvoFpsDriver module
- galaxia_ananke.photometry.Isochrone module
IsochroneIsochrone.__init__()Isochrone.pathIsochrone.categoryIsochrone.nameIsochrone.file_descriptor_pathIsochrone.has_file_descriptorIsochrone.isochrone_filesIsochrone.file_descriptor_contentIsochrone.magnitude_itemgetterIsochrone.mag_namesIsochrone.formattingIsochrone.qtables_dictionaryIsochrone.qtables_unique_ages_dictionaryIsochrone.consolidated_points_and_values
- galaxia_ananke.photometry.IsochroneFile module
- galaxia_ananke.photometry.PhotoSystem module
PhotoSystemPhotoSystem.__init__()PhotoSystem.check_cmd_magnames()PhotoSystem.categoryPhotoSystem.namePhotoSystem.categ_and_namePhotoSystem.keyPhotoSystem.mag_namesPhotoSystem.effective_wavelengthsPhotoSystem.zeropointsPhotoSystem.to_export_keysPhotoSystem.mag_names_to_export_keys_mappingPhotoSystem.get_nearest_isochrone_track_for_age_and_metallicity()
- galaxia_ananke.photometry.Photometry module
- galaxia_ananke.photometry.SvoFpsDriver module
- galaxia_ananke.photometry.Formatting module
- Submodules
Submodules#
- galaxia_ananke.Input module
InputInput.__init__()Input.particles_dictionary_descriptionInput.all_possible_keys_in_particlesInput.cachingInput.particlesInput.lengthInput.hdimInput.nameInput.append_hashInput.name_hashInput.ngbInput.k_factorInput.kernelsInput.pnameInput.knameInput.keys()Input.optional_keys()Input.prepare_input()Input.input_sorterInput.hashInput.metadataInput.make_dummy_particles_input()Input.make_dummy_kernels_input()
- galaxia_ananke.Output module
shift_g_lon()OutputOutput.__init__()Output.read_galaxia_output()Output.apply_post_process_pipeline_and_flush()Output.post_process_output()Output.save()Output.check_state_before_runningOutput.cachingOutput.verboseOutput.surveyOutput.photosystemsOutput.export_keysOutput.catalogue_keysOutput.output_dirOutput.output_nameOutput.rsun_skycoordOutput.parametersOutput.parameter_mag_color_namesOutput.parameter_magnitude_nameOutput.parameter_abs_mag_hiOutput.parameter_app_mag_hiOutput.all_metadataOutput.flush_extra_columns_to_hdf5()
- galaxia_ananke.Survey module
SurveySurvey.__init__()Survey.prepare_photosystems()Survey.set_isochrones_from_photosys()Survey.make_survey()Survey.has_no_fileparamSurvey.fileparamSurvey.parametersSurvey.n_gensSurvey.fsampleSurvey.hashSurvey.surveynameSurvey.append_hashSurvey.surveyname_hashSurvey.metadataSurvey.inputSurvey.photosystemsSurvey.isochronesSurvey.photo_sysSurvey.verboseSurvey.has_no_outputSurvey.outputSurvey.cachingSurvey.hdimSurvey.inputname_hashSurvey.inputdirSurvey.ngbSurvey.check_state_before_running
- galaxia_ananke.utils module