Generator
- generate(input_object: list | Path | str, photometric_system: list | PhotometricSystem, output_path: Path | str = '.', output_file: str = 'output_synthetic_photometry', output_format: str | None = None, save_file: bool = True, error_correction: bool = False, additional_columns: str | list | dict | None = None, username: str | None = None, password: str | None = None) DataFrame [source]
Synthetic photometry utility: generates synthetic photometry in a set of available systems from the input internally-calibrated continuously-represented mean spectra. Some standardised photometric systems include a colour-correction to the U bands which will be applied automatically when generating the corresponding synthetic photometry.
- Parameters:
input_object (list/Path/str) – Path to the file containing the mean spectra as downloaded from the archive in their continuous representation, a list of sources ids (string or long), or a pandas DataFrame.
photometric_system (list/PhotometricSystem) – Desired photometric system or list of photometric systems.
output_path (Path/str) – Path where to save the output data.
output_file (str) – Name of the output file without extension (e.g. ‘my_file’).
output_format (str) – Desired output format. If no format is given, the output file format will be the same as the input file (e.g. ‘csv’).
save_file (bool) – Whether to save the output in a file or not. If false, output_format and output_file_name will be ignored.
error_correction (bool) – Whether to apply to the photometric errors the tabulated factors to mitigate underestimated errors (see Montegriffo et al., 2022, for more details).
additional_columns (str/list) – List of additional columns to include in the output. The columns must be requested columns must be available in the input (files, DataFrames) or in the Archive response (lists, queries).
username (str) – Cosmos username, only suggested when input_object is a list or ADQL query.
password (str) – Cosmos password, only suggested when input_object is a list or ADQL query.
- Returns:
A DataFrame of all synthetic photometry results.
- Return type:
DataFrame
internal_photometric_system.py
Module for the parent class of the standardised and regular photometric systems.
- class InternalPhotometricSystem(name: str, config_file: str | None = None, bp_model: str = 'v375wi', rp_model: str = 'v142r')[source]
Bases:
object
- get_bands()[source]
Get the bands of the photometric system.
- Returns:
List of bands.
- Return type:
list of str
- get_system_label()[source]
Get the label of the photometric system.
- Returns:
A short description of the photometric system.
- Return type:
str
- get_zero_points()[source]
Get the zero-points of the photometric system.
- Returns:
1D array containing the zero-points for all bands in this photometric system.
- Return type:
ndarray
- load_xpmerge_from_xml()[source]
Load the XpMerge table from the filter XML file.
- Returns:
Array containing the sampling grid values. dict: A dictionary containing the XpMerge table with one entry for BP and one for RP.
- Return type:
ndarray
- load_xpsampling_from_xml()[source]
Load the XpSampling table from the XML filter file.
- Returns:
A dictionary containing the XpSampling table with one entry for BP and one for RP.
- Return type:
dict
- class MultiSyntheticPhotometryGenerator(photometric_system, bp_model, rp_model)[source]
Bases:
SyntheticPhotometryGenerator
photometric_system.py
Module for the management of photometric systems.
- class AutoName(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
Enum
An enumeration.
- class PhotometricSystem(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
AutoName
An enumeration.
- DECam = <gaiaxpy.generator.regular_photometric_system.RegularPhotometricSystem object>
- Els_Custom_W09_S2 = <gaiaxpy.generator.regular_photometric_system.RegularPhotometricSystem object>
- Euclid_VIS = <gaiaxpy.generator.regular_photometric_system.RegularPhotometricSystem object>
- Gaia_2 = <gaiaxpy.generator.regular_photometric_system.RegularPhotometricSystem object>
- Gaia_DR3_Vega = <gaiaxpy.generator.regular_photometric_system.RegularPhotometricSystem object>
- HST_ACSWFC = <gaiaxpy.generator.regular_photometric_system.RegularPhotometricSystem object>
- HST_HUGS_Std = <gaiaxpy.generator.standardised_photometric_system.StandardisedPhotometricSystem object>
- HST_WFC3UVIS = <gaiaxpy.generator.regular_photometric_system.RegularPhotometricSystem object>
- HST_WFPC2 = <gaiaxpy.generator.regular_photometric_system.RegularPhotometricSystem object>
- H_Custom = <gaiaxpy.generator.regular_photometric_system.RegularPhotometricSystem object>
- Halpha_Custom_AB = <gaiaxpy.generator.regular_photometric_system.RegularPhotometricSystem object>
- Hipparcos_Tycho = <gaiaxpy.generator.regular_photometric_system.RegularPhotometricSystem object>
- IPHAS = <gaiaxpy.generator.regular_photometric_system.RegularPhotometricSystem object>
- JKC = <gaiaxpy.generator.regular_photometric_system.RegularPhotometricSystem object>
- JKC_Std = <gaiaxpy.generator.standardised_photometric_system.StandardisedPhotometricSystem object>
- JPAS = <gaiaxpy.generator.regular_photometric_system.RegularPhotometricSystem object>
- JPLUS = <gaiaxpy.generator.regular_photometric_system.RegularPhotometricSystem object>
- JWST_NIRCAM = <gaiaxpy.generator.regular_photometric_system.RegularPhotometricSystem object>
- LSST = <gaiaxpy.generator.regular_photometric_system.RegularPhotometricSystem object>
- PanSTARRS1 = <gaiaxpy.generator.regular_photometric_system.RegularPhotometricSystem object>
- PanSTARRS1_Std = <gaiaxpy.generator.standardised_photometric_system.StandardisedPhotometricSystem object>
- Pristine = <gaiaxpy.generator.regular_photometric_system.RegularPhotometricSystem object>
- SDSS = <gaiaxpy.generator.regular_photometric_system.RegularPhotometricSystem object>
- SDSS_Std = <gaiaxpy.generator.standardised_photometric_system.StandardisedPhotometricSystem object>
- Sky_Mapper = <gaiaxpy.generator.regular_photometric_system.RegularPhotometricSystem object>
- Stromgren = <gaiaxpy.generator.regular_photometric_system.RegularPhotometricSystem object>
- Stromgren_Std = <gaiaxpy.generator.standardised_photometric_system.StandardisedPhotometricSystem object>
- WFIRST = <gaiaxpy.generator.regular_photometric_system.RegularPhotometricSystem object>
- get_available_systems()
- load_additional_systems(_systems_path=None)[source]
Load additional photometric systems.
- Parameters:
_systems_path (str) – Path to directory containing the additional filter files. If not provided, the program
one. (will ask the user to input)
- Returns:
PhotometricSystem object corresponding to an enumeration of the updated available systems.
- Return type:
Enum
- remove_additional_systems()[source]
Remove previously loaded additional photometric systems. If no additional systems have been added, no changes will be made.
- Returns:
PhotometricSystem object corresponding to an enumeration of the updated available systems.
- Return type:
Enum
regular_photometric_system.py
Module to represent a regular photometric system.
- class RegularPhotometricSystem(name, config_file=None)[source]
Bases:
InternalPhotometricSystem
standardised_photometric_system.py
Module to represent a standardised photometric system.
- class StandardisedPhotometricSystem(name, config_file=None)[source]
Bases:
InternalPhotometricSystem
synthetic_photometry_generator.py
Module for the generation of synthetic photometry.