GaiaXPy 2.1.2__tar.gz → 2.1.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- gaiaxpy-2.1.3/.gitignore +24 -0
- gaiaxpy-2.1.3/PKG-INFO +46 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/README.md +1 -1
- gaiaxpy-2.1.3/pyproject.toml +84 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/__init__.py +6 -1
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/calibrator/calibrator.py +3 -3
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/calibrator/external_instrument_model.py +4 -2
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/cholesky/cholesky.py +5 -4
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/converter/converter.py +4 -3
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/core/generic_functions.py +0 -1
- gaiaxpy-2.1.3/src/gaiaxpy/core/version.py +4 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/file_parser/cast.py +1 -1
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/file_parser/parse_generic.py +4 -3
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/generator/generator.py +23 -17
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/generator/internal_photometric_system.py +12 -6
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/generator/multi_synthetic_photometry_generator.py +2 -2
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/generator/synthetic_photometry_generator.py +8 -6
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/input_reader/list_reader.py +4 -3
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/input_reader/query_reader.py +4 -3
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/output/output_data.py +4 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/output/sampled_spectra_data.py +2 -2
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/plotter/plotter.py +3 -1
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/spectrum/absolute_sampled_spectrum.py +2 -2
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/spectrum/single_synthetic_photometry.py +4 -2
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/spectrum/xp_sampled_spectrum.py +2 -2
- gaiaxpy-2.1.2/MANIFEST.in +0 -4
- gaiaxpy-2.1.2/PKG-INFO +0 -42
- gaiaxpy-2.1.2/pyproject.toml +0 -37
- gaiaxpy-2.1.2/setup.cfg +0 -4
- gaiaxpy-2.1.2/setup.py +0 -42
- gaiaxpy-2.1.2/src/GaiaXPy.egg-info/PKG-INFO +0 -42
- gaiaxpy-2.1.2/src/GaiaXPy.egg-info/SOURCES.txt +0 -173
- gaiaxpy-2.1.2/src/GaiaXPy.egg-info/dependency_links.txt +0 -1
- gaiaxpy-2.1.2/src/GaiaXPy.egg-info/requires.txt +0 -15
- gaiaxpy-2.1.2/src/GaiaXPy.egg-info/top_level.txt +0 -1
- gaiaxpy-2.1.2/src/gaiaxpy/core/version.py +0 -1
- /gaiaxpy-2.1.2/LICENCE → /gaiaxpy-2.1.3/LICENSE +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/calibrator/__init__.py +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/cholesky/__init__.py +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/colour_equation/__init__.py +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/colour_equation/xp_filter_system_colour_equation.py +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/OptimisedCalibratedBases_BpId32_RpId37_withNormalisation.xml +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/TabulatedDispersionFunction-DR3-v375wiv142r_20200610.csv +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/__init__.py +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/available_systems.txt +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/bpC03_v211w_bases.csv +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/bpC03_v211w_dispersion.csv +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/bpC03_v211w_response.csv +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/bpC03_v375wi_bases.csv +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/bpC03_v375wi_dispersion.csv +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/bpC03_v375wi_response.csv +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/colour_eq_files/JkcStd_colour_eq.ini +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/colour_eq_files/SdssStd_colour_eq.ini +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/config.ini +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/correction_tables/DIDREQ-465-ElsCustomW09S2-correction-factors.csv +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/correction_tables/DIDREQ-465-EuclidVis-correction-factors.csv +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/correction_tables/DIDREQ-465-Gaia2-correction-factors.csv +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/correction_tables/DIDREQ-465-GaiaDr3Vega-correction-factors.csv +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/correction_tables/DIDREQ-465-HipparcosTycho-correction-factors-old.csv +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/correction_tables/DIDREQ-465-HipparcosTycho-correction-factors.csv +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/correction_tables/DIDREQ-465-HstAcswfc-correction-factors.csv +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/correction_tables/DIDREQ-465-HstHugsStd-correction-factors.csv +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/correction_tables/DIDREQ-465-HstWfc3uvis-correction-factors.csv +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/correction_tables/DIDREQ-465-HstWfpc2-correction-factors.csv +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/correction_tables/DIDREQ-465-Iphas-correction-factors.csv +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/correction_tables/DIDREQ-465-Jkc-correction-factors.csv +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/correction_tables/DIDREQ-465-JkcStd-correction-factors.csv +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/correction_tables/DIDREQ-465-Jpas-correction-factors.csv +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/correction_tables/DIDREQ-465-Jplus-correction-factors.csv +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/correction_tables/DIDREQ-465-JwstNircam-correction-factors.csv +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/correction_tables/DIDREQ-465-Panstarrs1-correction-factors.csv +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/correction_tables/DIDREQ-465-Panstarrs1Std-correction-factors.csv +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/correction_tables/DIDREQ-465-Pristine-correction-factors.csv +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/correction_tables/DIDREQ-465-Sdss-correction-factors.csv +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/correction_tables/DIDREQ-465-SdssStd-correction-factors.csv +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/correction_tables/DIDREQ-465-SkyMapper-correction-factors.csv +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/correction_tables/DIDREQ-465-Stromgren-correction-factors.csv +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/correction_tables/DIDREQ-465-StromgrenStd-correction-factors.csv +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/correction_tables/DIDREQ-465-Wfirst-correction-factors.csv +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/filters/XpFilter_Decam_v375wiv142r.xml +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/filters/XpFilter_ElsCustomW09S2_v375wiv142r.xml +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/filters/XpFilter_EuclidVis_v375wiv142r.xml +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/filters/XpFilter_Gaia2_v375wiv142r.xml +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/filters/XpFilter_GaiaDr3Ab_v375wiv142r.xml +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/filters/XpFilter_GaiaDr3Vega_v375wiv142r.xml +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/filters/XpFilter_GaiaNominal_v375wiv142r.xml +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/filters/XpFilter_HCustom_v375wiv142r.xml +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/filters/XpFilter_HalphaCustomAb_v375wiv142r.xml +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/filters/XpFilter_HalphaCustom_v375wiv142r.xml +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/filters/XpFilter_HipparcosTycho_v375wiv142r.xml +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/filters/XpFilter_HstAcswfc_v375wiv142r.xml +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/filters/XpFilter_HstHugsStd_v375wiv142r.xml +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/filters/XpFilter_HstWfc3uvis_v375wiv142r.xml +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/filters/XpFilter_HstWfpc2_v375wiv142r.xml +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/filters/XpFilter_IphasCustomW09S2_v375wiv142r.xml +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/filters/XpFilter_IphasCustomW09_v375wiv142r.xml +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/filters/XpFilter_IphasCustom_v375wiv142r.xml +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/filters/XpFilter_Iphas_v375wiv142r.xml +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/filters/XpFilter_JkcStd_v375wiv142r.xml +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/filters/XpFilter_Jkc_v375wiv142r.xml +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/filters/XpFilter_Jpas_v375wiv142r.xml +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/filters/XpFilter_Jplus_v375wiv142r.xml +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/filters/XpFilter_JwstNircam_v375wiv142r.xml +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/filters/XpFilter_Lsst_v375wiv142r.xml +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/filters/XpFilter_Panstarrs1Std_v375wiv142r.xml +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/filters/XpFilter_Panstarrs1_v375wiv142r.xml +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/filters/XpFilter_Pristine_v375wiv142r.xml +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/filters/XpFilter_SdssStd_v375wiv142r.xml +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/filters/XpFilter_Sdss_v375wiv142r.xml +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/filters/XpFilter_SkyMapper_v375wiv142r.xml +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/filters/XpFilter_SscAb_v375wiv142r.xml +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/filters/XpFilter_StromgrenStd_v375wiv142r.xml +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/filters/XpFilter_Stromgren_v375wiv142r.xml +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/filters/XpFilter_Ucustom_v375wiv142r.xml +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/filters/XpFilter_Wfirst_v375wiv142r.xml +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/filters/XpFilter_v211wv142r.xml +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/filters/XpFilter_v375wiv142r.xml +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/fluxCal_20230901_renorm_bspline.xml +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/paths.py +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/rpC03_v142r_bases.csv +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/rpC03_v142r_dispersion.csv +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/config/rpC03_v142r_response.csv +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/converter/__init__.py +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/converter/config.py +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/core/__init__.py +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/core/config.py +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/core/custom_errors.py +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/core/dispersion_function.py +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/core/generic_variables.py +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/core/input_validator.py +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/core/nature.py +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/core/satellite.py +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/core/server.py +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/core/xml_utils.py +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/error_correction/__init__.py +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/error_correction/error_correction.py +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/file_parser/__init__.py +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/file_parser/parse_external.py +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/file_parser/parse_internal_continuous.py +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/file_parser/parse_internal_sampled.py +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/file_parser/parse_inverse.py +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/file_parser/utils.py +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/generator/__init__.py +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/generator/config.py +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/generator/photometric_system.py +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/generator/regular_photometric_system.py +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/generator/standardised_photometric_system.py +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/generator/utils.py +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/input_reader/__init__.py +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/input_reader/archive_reader.py +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/input_reader/dataframe_numpy_array_reader.py +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/input_reader/dataframe_reader.py +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/input_reader/dataframe_string_array_reader.py +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/input_reader/file_reader.py +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/input_reader/hdfs_reader.py +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/input_reader/input_reader.py +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/input_reader/local_file_reader.py +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/input_reader/required_columns.py +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/output/__init__.py +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/output/continuous_spectra_data.py +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/output/ecsv_headers/headers_dict.txt +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/output/photometry_data.py +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/output/utils.py +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/plotter/__init__.py +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/plotter/multi_absolute.py +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/plotter/multi_xp.py +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/plotter/plot_spectra.py +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/plotter/single.py +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/spectrum/__init__.py +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/spectrum/calibration_absolute_sampled_spectrum.py +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/spectrum/generic_spectrum.py +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/spectrum/multi_synthetic_photometry.py +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/spectrum/photometric_absolute_sampled_spectrum.py +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/spectrum/sampled_basis_functions.py +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/spectrum/sampled_spectrum.py +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/spectrum/spectral_energy_distribution.py +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/spectrum/utils.py +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/spectrum/xp_continuous_spectrum.py +0 -0
- {gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/spectrum/xp_spectrum.py +0 -0
gaiaxpy-2.1.3/.gitignore
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
*.pyc
|
|
2
|
+
.DS_Store
|
|
3
|
+
.coverage
|
|
4
|
+
coverage.xml
|
|
5
|
+
noxfile.py
|
|
6
|
+
src/gaiaxpy/_version.py
|
|
7
|
+
tox.ini
|
|
8
|
+
query_tests.py
|
|
9
|
+
.eggs/
|
|
10
|
+
.env/
|
|
11
|
+
.env10/
|
|
12
|
+
.idea/
|
|
13
|
+
.pytest_cache/
|
|
14
|
+
.svn/
|
|
15
|
+
.nox/
|
|
16
|
+
.tox/
|
|
17
|
+
__pycache__/
|
|
18
|
+
build/
|
|
19
|
+
dist/
|
|
20
|
+
docs/_build/
|
|
21
|
+
GaiaXPy.egg-info/
|
|
22
|
+
htmlcov/
|
|
23
|
+
junit/
|
|
24
|
+
tests_output_files/
|
gaiaxpy-2.1.3/PKG-INFO
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: GaiaXPy
|
|
3
|
+
Version: 2.1.3
|
|
4
|
+
Summary: Utilities to handle BP/RP (XP) Gaia low-resolution spectra as delivered via the Archive.
|
|
5
|
+
Project-URL: homepage, https://gaia-dpci.github.io/GaiaXPy-website/
|
|
6
|
+
Project-URL: documentation, https://gaiaxpy.readthedocs.io/en/latest/
|
|
7
|
+
Author: Zuzanna Kostrzewa-Rutkowska, Lovro Palaversa
|
|
8
|
+
Author-email: Francesca De Angeli <fda@ast.cam.ac.uk>, Paolo Montegriffo <paolo.montegriffo@inaf.it>, Daniela Ruz-Mieres <dr540@ast.cam.ac.uk>
|
|
9
|
+
Maintainer-email: Daniela Ruz-Mieres <dr540@ast.cam.ac.uk>
|
|
10
|
+
License-Expression: BSD-3-Clause
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Classifier: Operating System :: OS Independent
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Requires-Python: >=3.10
|
|
15
|
+
Requires-Dist: aenum
|
|
16
|
+
Requires-Dist: astropy!=7.0.0,!=7.0.1,>=5.3.3
|
|
17
|
+
Requires-Dist: astroquery
|
|
18
|
+
Requires-Dist: fastavro
|
|
19
|
+
Requires-Dist: hdfs
|
|
20
|
+
Requires-Dist: matplotlib
|
|
21
|
+
Requires-Dist: numpy
|
|
22
|
+
Requires-Dist: packaging
|
|
23
|
+
Requires-Dist: pandas>=1.5.0
|
|
24
|
+
Requires-Dist: scipy
|
|
25
|
+
Requires-Dist: tqdm>=4.66.3
|
|
26
|
+
Provides-Extra: dev
|
|
27
|
+
Requires-Dist: flake8; extra == 'dev'
|
|
28
|
+
Requires-Dist: pytest; extra == 'dev'
|
|
29
|
+
Requires-Dist: pytest-cov; extra == 'dev'
|
|
30
|
+
Requires-Dist: pytest-mock; extra == 'dev'
|
|
31
|
+
Provides-Extra: docs
|
|
32
|
+
Requires-Dist: hatch; extra == 'docs'
|
|
33
|
+
Requires-Dist: sphinx; extra == 'docs'
|
|
34
|
+
Requires-Dist: sphinx-rtd-theme; extra == 'docs'
|
|
35
|
+
Description-Content-Type: text/markdown
|
|
36
|
+
|
|
37
|
+
BP/RP (often shortened as XP) spectra became available for the first time in Gaia Data Release 3 (DR3). In their first release, only source mean spectra are available: these are spectra that have been generated from a number of single observations of the same object. Epoch spectra, i.e. spectra consisting of one single observation, will become available in future releases.
|
|
38
|
+
|
|
39
|
+
GaiaXPy is a Python library to facilitate handling Gaia BP/RP spectra as distributed from the Gaia archive.
|
|
40
|
+
|
|
41
|
+
To learn more about the package click [here](https://gaiaxpy.readthedocs.io/en/latest/description.html).
|
|
42
|
+
|
|
43
|
+
You can also check the [homepage](https://gaia-dpci.github.io/GaiaXPy-website/) for documentation, tutorials, and resources.
|
|
44
|
+
|
|
45
|
+
## Licence
|
|
46
|
+
[BSD 3-Clause](https://github.com/gaia-dpci/GaiaXPy/blob/main/LICENCE)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
BP/RP (often shortened as XP) spectra
|
|
1
|
+
BP/RP (often shortened as XP) spectra became available for the first time in Gaia Data Release 3 (DR3). In their first release, only source mean spectra are available: these are spectra that have been generated from a number of single observations of the same object. Epoch spectra, i.e. spectra consisting of one single observation, will become available in future releases.
|
|
2
2
|
|
|
3
3
|
GaiaXPy is a Python library to facilitate handling Gaia BP/RP spectra as distributed from the Gaia archive.
|
|
4
4
|
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ['hatchling', 'hatch-vcs']
|
|
3
|
+
build-backend = 'hatchling.build'
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = 'GaiaXPy'
|
|
7
|
+
dynamic = ['version']
|
|
8
|
+
description = 'Utilities to handle BP/RP (XP) Gaia low-resolution spectra as delivered via the Archive.'
|
|
9
|
+
readme = 'README.md'
|
|
10
|
+
requires-python = '>=3.10'
|
|
11
|
+
license = 'BSD-3-Clause' # SPDX identifier as a string. It must be 'license', not 'licence' according to PEP621
|
|
12
|
+
license-files = ['LICENSE']
|
|
13
|
+
authors = [
|
|
14
|
+
{name = 'Francesca De Angeli', email = 'fda@ast.cam.ac.uk'},
|
|
15
|
+
{name = 'Zuzanna Kostrzewa-Rutkowska'},
|
|
16
|
+
{name = 'Paolo Montegriffo', email = 'paolo.montegriffo@inaf.it'},
|
|
17
|
+
{name = 'Lovro Palaversa'},
|
|
18
|
+
{name = 'Daniela Ruz-Mieres', email = 'dr540@ast.cam.ac.uk'},
|
|
19
|
+
]
|
|
20
|
+
maintainers = [
|
|
21
|
+
{name = 'Daniela Ruz-Mieres', email = 'dr540@ast.cam.ac.uk'}
|
|
22
|
+
]
|
|
23
|
+
classifiers = [
|
|
24
|
+
'Programming Language :: Python :: 3',
|
|
25
|
+
'Operating System :: OS Independent'
|
|
26
|
+
]
|
|
27
|
+
dependencies = [
|
|
28
|
+
'aenum',
|
|
29
|
+
'astropy>=5.3.3,!=7.0.0,!=7.0.1',
|
|
30
|
+
'astroquery',
|
|
31
|
+
'fastavro',
|
|
32
|
+
'hdfs',
|
|
33
|
+
'matplotlib',
|
|
34
|
+
'numpy',
|
|
35
|
+
'packaging',
|
|
36
|
+
'pandas>=1.5.0',
|
|
37
|
+
'scipy',
|
|
38
|
+
'tqdm>=4.66.3'
|
|
39
|
+
]
|
|
40
|
+
|
|
41
|
+
[project.optional-dependencies]
|
|
42
|
+
dev = [
|
|
43
|
+
'pytest',
|
|
44
|
+
'pytest-cov',
|
|
45
|
+
'pytest-mock',
|
|
46
|
+
'flake8'
|
|
47
|
+
]
|
|
48
|
+
docs = [
|
|
49
|
+
'hatch',
|
|
50
|
+
'sphinx',
|
|
51
|
+
'sphinx-rtd-theme'
|
|
52
|
+
]
|
|
53
|
+
|
|
54
|
+
[pytest]
|
|
55
|
+
addopts = '--cov=gaiaxpy --cov-report=term-missing --cov-fail-under=85'
|
|
56
|
+
testpaths = 'tests'
|
|
57
|
+
|
|
58
|
+
# To build docs
|
|
59
|
+
[tool.hatch.envs.docs]
|
|
60
|
+
dependencies = []
|
|
61
|
+
|
|
62
|
+
[tool.hatch.envs.docs.scripts]
|
|
63
|
+
build = 'pip install -e .[docs] && sphinx-build docs docs/build'
|
|
64
|
+
|
|
65
|
+
[tool.hatch.metadata]
|
|
66
|
+
allow-direct-references = true
|
|
67
|
+
|
|
68
|
+
[tool.hatch.version]
|
|
69
|
+
path = 'src/gaiaxpy/core/__init__.py'
|
|
70
|
+
source = 'vcs'
|
|
71
|
+
raw-options = {version_scheme = 'guess-next-dev', local_scheme = 'node-and-date'}
|
|
72
|
+
|
|
73
|
+
[tool.hatch.build]
|
|
74
|
+
packages = ['src']
|
|
75
|
+
|
|
76
|
+
[tool.hatch.build.targets.sdist]
|
|
77
|
+
include = ['src/gaiaxpy']
|
|
78
|
+
|
|
79
|
+
[tool.hatch.build.targets.wheel]
|
|
80
|
+
packages = ['src/gaiaxpy']
|
|
81
|
+
|
|
82
|
+
[project.urls]
|
|
83
|
+
homepage = 'https://gaia-dpci.github.io/GaiaXPy-website/'
|
|
84
|
+
documentation = 'https://gaiaxpy.readthedocs.io/en/latest/'
|
|
@@ -3,8 +3,13 @@ from .calibrator.calibrator import calibrate
|
|
|
3
3
|
from .cholesky.cholesky import get_chi2, get_inverse_covariance_matrix, get_inverse_square_root_covariance_matrix
|
|
4
4
|
from .converter.converter import convert
|
|
5
5
|
from .core.dispersion_function import pwl_to_wl, wl_to_pwl, pwl_range, wl_range
|
|
6
|
+
from .core.version import __version__
|
|
6
7
|
from .error_correction.error_correction import apply_error_correction
|
|
7
8
|
from .generator.generator import generate
|
|
8
9
|
from .generator.photometric_system import PhotometricSystem, load_additional_systems, remove_additional_systems
|
|
9
10
|
from .plotter.plot_spectra import plot_spectra
|
|
10
|
-
|
|
11
|
+
|
|
12
|
+
__all__ = ['calibrate', 'get_chi2', 'get_inverse_covariance_matrix', 'get_inverse_square_root_covariance_matrix',
|
|
13
|
+
'convert', 'pwl_to_wl', 'wl_to_pwl', 'pwl_range', 'wl_range', 'apply_error_correction', 'generate',
|
|
14
|
+
'PhotometricSystem', 'load_additional_systems', 'remove_additional_systems', 'plot_spectra',
|
|
15
|
+
'__version__']
|
|
@@ -31,7 +31,7 @@ from ..spectrum.calibration_absolute_sampled_spectrum import CalibrationAbsolute
|
|
|
31
31
|
__FUNCTION_KEY = 'calibrator'
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
def calibrate(input_object: Union[list, Path, str], sampling: np.ndarray = None, truncation: bool = False,
|
|
34
|
+
def calibrate(input_object: Union[list, Path, pd.DataFrame, str], sampling: np.ndarray = None, truncation: bool = False,
|
|
35
35
|
output_path: Union[Path, str] = '.', output_file: str = 'output_spectra', output_format: str = None,
|
|
36
36
|
save_file: bool = True, with_correlation: bool = False, username: str = None, password: str = None) -> \
|
|
37
37
|
(pd.DataFrame, np.ndarray):
|
|
@@ -42,8 +42,8 @@ def calibrate(input_object: Union[list, Path, str], sampling: np.ndarray = None,
|
|
|
42
42
|
available data.
|
|
43
43
|
|
|
44
44
|
Args:
|
|
45
|
-
input_object (list/Path/str): Path to the file containing the mean spectra as downloaded from the
|
|
46
|
-
their continuous representation, a list of sources ids (string or long), or a pandas DataFrame.
|
|
45
|
+
input_object (list/Path/pd.DataFrame/str): Path to the file containing the mean spectra as downloaded from the
|
|
46
|
+
Archive in their continuous representation, a list of sources ids (string or long), or a pandas DataFrame.
|
|
47
47
|
sampling (ndarray): 1D array containing the desired sampling in absolute wavelengths [nm].
|
|
48
48
|
truncation (bool): Toggle truncation of the set of bases. The level of truncation to be applied is defined by
|
|
49
49
|
the recommended value in the input files.
|
|
@@ -56,8 +56,10 @@ class ExternalInstrumentModel(object):
|
|
|
56
56
|
bases, _ = InverseBasesParser().parse_file(bases_path)
|
|
57
57
|
bases = bases.iloc[0]
|
|
58
58
|
bases['inverseBasesCoefficients'] = bases['inverseBasesCoefficients'].reshape(bases['nBases'],
|
|
59
|
-
bases[
|
|
60
|
-
|
|
59
|
+
bases[
|
|
60
|
+
'nInverseBasesCoefficients'])
|
|
61
|
+
bases['transformationMatrix'] = bases['transformationMatrix'].reshape(bases['nBases'],
|
|
62
|
+
bases['nTransformedBases'])
|
|
61
63
|
return cls(dispersion, response, bases)
|
|
62
64
|
|
|
63
65
|
def get_response(self, wavelength: float) -> np.ndarray:
|
|
@@ -51,14 +51,15 @@ def __output_list_to_df(parsed_input_data: pd.DataFrame, bands_output: list, out
|
|
|
51
51
|
return pd.DataFrame(zip(*output_list), columns=output_columns)
|
|
52
52
|
|
|
53
53
|
|
|
54
|
-
def get_inverse_square_root_covariance_matrix(input_object: Union[list, Path,
|
|
54
|
+
def get_inverse_square_root_covariance_matrix(input_object: Union[list, Path, pd.DataFrame, str],
|
|
55
|
+
band: Optional[str] = None):
|
|
55
56
|
"""
|
|
56
57
|
Compute the inverse square root covariance matrix.
|
|
57
58
|
|
|
58
59
|
Args:
|
|
59
|
-
input_object (list/Path/str): Path to the file containing the mean spectra as downloaded from the
|
|
60
|
-
their continuous representation, a pandas DataFrame, a list of sources ids (string or long), or
|
|
61
|
-
query.
|
|
60
|
+
input_object (list/Path/pd.DataFrame/str): Path to the file containing the mean spectra as downloaded from the
|
|
61
|
+
Archive in their continuous representation, a pandas DataFrame, a list of sources ids (string or long), or
|
|
62
|
+
an ADQL query.
|
|
62
63
|
band (str): Chosen band: 'bp' or 'rp'. If no band is passed, the function will compute the inverse square root
|
|
63
64
|
covariance for both 'bp' and 'rp'.
|
|
64
65
|
|
|
@@ -28,7 +28,8 @@ from ..core.input_validator import validate_save_arguments
|
|
|
28
28
|
__FUNCTION_KEY = 'converter'
|
|
29
29
|
|
|
30
30
|
|
|
31
|
-
def convert(input_object: Union[list, Path,
|
|
31
|
+
def convert(input_object: Union[list, Path, pd.DataFrame, str],
|
|
32
|
+
sampling: Optional[np.ndarray] = np.linspace(0, 60, 600),
|
|
32
33
|
truncation: bool = False, with_correlation: bool = False, output_path: Union[Path, str] = '.',
|
|
33
34
|
output_file: str = 'output_spectra', output_format: str = None, save_file: bool = True,
|
|
34
35
|
username: str = None, password: str = None) -> (pd.DataFrame, np.ndarray):
|
|
@@ -39,8 +40,8 @@ def convert(input_object: Union[list, Path, str], sampling: Optional[np.ndarray]
|
|
|
39
40
|
that were considered not to be significant considering the errors on the reconstructed mean spectra.
|
|
40
41
|
|
|
41
42
|
Args:
|
|
42
|
-
input_object (list/Path/str): Path to the file containing the mean spectra as downloaded from the
|
|
43
|
-
their continuous representation, a list of sources ids (string or long), or a pandas DataFrame.
|
|
43
|
+
input_object (list/Path/pd.DataFrame/str): Path to the file containing the mean spectra as downloaded from the
|
|
44
|
+
Archive in their continuous representation, a list of sources ids (string or long), or a pandas DataFrame.
|
|
44
45
|
sampling (ndarray): 1D array containing the desired sampling in pseudo-wavelengths.
|
|
45
46
|
truncation (bool): Toggle truncation of the set of bases. The level of truncation to be applied is defined by
|
|
46
47
|
the recommended value in the input files.
|
|
@@ -18,7 +18,6 @@ import pandas as pd
|
|
|
18
18
|
from numpy import ndarray
|
|
19
19
|
|
|
20
20
|
from gaiaxpy.config.paths import filters_path, config_path
|
|
21
|
-
from gaiaxpy.core.config import ADDITIONAL_SYSTEM_PREFIX
|
|
22
21
|
from gaiaxpy.core.custom_errors import InvalidBandError
|
|
23
22
|
from gaiaxpy.core.satellite import BANDS
|
|
24
23
|
from gaiaxpy.generator.config import get_additional_filters_path
|
|
@@ -65,7 +65,7 @@ def _cast(df):
|
|
|
65
65
|
except KeyError:
|
|
66
66
|
continue # Not every key is available in every case
|
|
67
67
|
except ValueError as err:
|
|
68
|
-
if
|
|
68
|
+
if df[column].isna().any():
|
|
69
69
|
pass # There can be nan values, do nothing with them at this step
|
|
70
70
|
else:
|
|
71
71
|
# This is an actual error
|
|
@@ -6,6 +6,7 @@ Module to parse input files containing spectra.
|
|
|
6
6
|
from os.path import splitext
|
|
7
7
|
|
|
8
8
|
import pandas as pd
|
|
9
|
+
from astropy.io.votable import parse_single_table
|
|
9
10
|
from astropy.table import Table
|
|
10
11
|
|
|
11
12
|
from gaiaxpy.core.generic_functions import array_to_symmetric_matrix, str_to_array
|
|
@@ -146,9 +147,9 @@ class GenericParser(object):
|
|
|
146
147
|
Returns:
|
|
147
148
|
DataFrame: A pandas DataFrame representing the XML file.
|
|
148
149
|
"""
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
#
|
|
150
|
+
table = parse_single_table(xml_file).to_table()
|
|
151
|
+
# The columns argument of the parse_single_table function triggers an error in certain versions of Astropy,
|
|
152
|
+
# so all columns are read first, and then the unused ones are removed.
|
|
152
153
|
df = table.to_pandas()[_usecols] if _usecols else table.to_pandas()
|
|
153
154
|
if _matrix_columns:
|
|
154
155
|
for size_column, values_column in _matrix_columns:
|
|
@@ -14,7 +14,7 @@ from ..core.input_validator import validate_save_arguments
|
|
|
14
14
|
from ..file_parser.cast import _cast
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
def generate(input_object: Union[list, Path, str], photometric_system: Union[list, PhotometricSystem],
|
|
17
|
+
def generate(input_object: Union[list, Path, pd.DataFrame, str], photometric_system: Union[list, PhotometricSystem],
|
|
18
18
|
output_path: Union[Path, str] = '.', output_file: str = 'output_synthetic_photometry',
|
|
19
19
|
output_format: str = None, save_file: bool = True, error_correction: bool = False,
|
|
20
20
|
additional_columns: Optional[Union[dict, list, str]] = None, username: str = None, password: str = None) \
|
|
@@ -26,8 +26,9 @@ def generate(input_object: Union[list, Path, str], photometric_system: Union[lis
|
|
|
26
26
|
automatically when generating the corresponding synthetic photometry.
|
|
27
27
|
|
|
28
28
|
Args:
|
|
29
|
-
input_object (list/Path/str): Path to the file containing the mean spectra as downloaded from
|
|
30
|
-
their continuous representation, a list of sources ids (string or long), or a pandas
|
|
29
|
+
input_object (list/Path/pd.DataFrame/str): Path to the file containing the mean spectra as downloaded from
|
|
30
|
+
the archive in their continuous representation, a list of sources ids (string or long), or a pandas
|
|
31
|
+
DataFrame.
|
|
31
32
|
photometric_system (list/PhotometricSystem): Desired photometric system or list of photometric systems.
|
|
32
33
|
output_path (Path/str): Path where to save the output data.
|
|
33
34
|
output_file (str): Name of the output file without extension (e.g. 'my_file').
|
|
@@ -51,19 +52,23 @@ def generate(input_object: Union[list, Path, str], photometric_system: Union[lis
|
|
|
51
52
|
password=password)
|
|
52
53
|
|
|
53
54
|
|
|
54
|
-
def _generate(input_object: Union[list, Path, str], photometric_system: Union[list, PhotometricSystem],
|
|
55
|
-
output_path: Union[Path, str] = '.',
|
|
56
|
-
|
|
57
|
-
additional_columns: Optional[Union[dict, list, str]] = None,
|
|
58
|
-
|
|
55
|
+
def _generate(input_object: Union[list, Path, pd.DataFrame, str], photometric_system: Union[list, PhotometricSystem],
|
|
56
|
+
truncation: bool = False, output_path: Union[Path, str] = '.',
|
|
57
|
+
output_file: str = 'output_synthetic_photometry', output_format: str = None, save_file: bool = True,
|
|
58
|
+
error_correction: bool = False, additional_columns: Optional[Union[dict, list, str]] = None,
|
|
59
|
+
selector=None, username: str = None, password: str = None, bp_model: str = 'v375wi',
|
|
60
|
+
rp_model: str = 'v142r') -> pd.DataFrame:
|
|
59
61
|
"""
|
|
60
62
|
Internal function of the calibration utility. Refer to "generate".
|
|
61
63
|
|
|
62
64
|
Args:
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
truncation (bool): Toggle truncation of the set of bases. The level of truncation to be
|
|
66
|
+
applied is defined by the recommended value in the input files.
|
|
67
|
+
selector (function): Function to filter AVRO records. The records returned will be the
|
|
68
|
+
ones for which the function returns True. The field names used in the selector
|
|
69
|
+
function should match the ones in the AVRO schema as the filter is run before any
|
|
70
|
+
column renaming happens. If selector is not None and the input is not an AVRO file,
|
|
71
|
+
a SelectorNotImplementedError will be raised.
|
|
67
72
|
bp_model (str): The bp model.
|
|
68
73
|
rp_model (str): The rp model.
|
|
69
74
|
"""
|
|
@@ -94,15 +99,16 @@ def _generate(input_object: Union[list, Path, str], photometric_system: Union[li
|
|
|
94
99
|
internal_phot_system.append(gaia_system)
|
|
95
100
|
additional_columns = format_additional_columns(additional_columns)
|
|
96
101
|
# Read input data
|
|
97
|
-
parsed_input_data, extension = InputReader(input_object, generate,
|
|
98
|
-
selector=selector, user=username,
|
|
102
|
+
parsed_input_data, extension = InputReader(input_object, generate, truncation=truncation,
|
|
103
|
+
additional_columns=additional_columns, selector=selector, user=username,
|
|
104
|
+
password=password).read()
|
|
99
105
|
additional_data = parsed_input_data[list(additional_columns.keys())]
|
|
100
106
|
# Generate photometry
|
|
101
107
|
phot_generator = MultiSyntheticPhotometryGenerator(internal_phot_system, bp_model=bp_model, rp_model=rp_model)
|
|
102
108
|
photometry_df = phot_generator.generate(parsed_input_data, extension, output_file=None, output_format=None,
|
|
103
|
-
save_file=False)
|
|
104
|
-
photometry_df = _apply_colour_equation(photometry_df, photometric_system=internal_phot_system,
|
|
105
|
-
|
|
109
|
+
save_file=False, truncation=truncation)
|
|
110
|
+
photometry_df = _apply_colour_equation(photometry_df, photometric_system=internal_phot_system, save_file=False,
|
|
111
|
+
disable_info=True)
|
|
106
112
|
if error_correction:
|
|
107
113
|
photometry_df = _apply_error_correction(photometry_df, photometric_system=photometric_system, save_file=False,
|
|
108
114
|
disable_info=True)
|
|
@@ -9,12 +9,12 @@ from glob import glob
|
|
|
9
9
|
from os import remove
|
|
10
10
|
from os.path import exists, split, join
|
|
11
11
|
|
|
12
|
-
from gaiaxpy.core.version import __version__
|
|
13
12
|
from gaiaxpy.config.paths import config_ini_file
|
|
14
13
|
from gaiaxpy.core.config import (get_filter_version_from_config, replace_file_name, get_file_path,
|
|
15
14
|
ADDITIONAL_SYSTEM_PREFIX)
|
|
16
15
|
from gaiaxpy.core.generic_functions import _get_system_label
|
|
17
16
|
from gaiaxpy.core.satellite import BANDS
|
|
17
|
+
from gaiaxpy.core.version import __version__
|
|
18
18
|
from gaiaxpy.core.xml_utils import get_file_root, parse_array, get_array_text, get_xp_sampling_matrix, get_xp_merge
|
|
19
19
|
from .config import _CFG_FILE_PATH, _ADDITIONAL_SYSTEM_FILES_REGEX
|
|
20
20
|
|
|
@@ -116,16 +116,22 @@ class InternalPhotometricSystem(object):
|
|
|
116
116
|
"""
|
|
117
117
|
|
|
118
118
|
def _extract_matches(_actual_path, _system_name):
|
|
119
|
-
__is_built_in_name
|
|
120
|
-
|
|
121
|
-
|
|
119
|
+
def __is_built_in_name(f_name):
|
|
120
|
+
return f_name.startswith('XpFilter')
|
|
121
|
+
|
|
122
|
+
def __is_exact_match(f_name, sys_name):
|
|
123
|
+
return f_name.startswith(sys_name) and f'{sys_name}.' in f_name
|
|
124
|
+
|
|
125
|
+
def __matches_additional(f_name, _pattern):
|
|
126
|
+
return _pattern.match(f_name)
|
|
127
|
+
|
|
122
128
|
__split_paths = [split(p) for p in _actual_path]
|
|
123
129
|
__paths, __filenames = zip(*__split_paths)
|
|
124
130
|
pattern = re.compile(_ADDITIONAL_SYSTEM_FILES_REGEX, re.IGNORECASE)
|
|
125
131
|
if all(__is_built_in_name(f) for f in __filenames): # If system is built-in
|
|
126
132
|
return _actual_path
|
|
127
|
-
return [join(p, fn) for p, fn in __split_paths if not __is_built_in_name(fn) and
|
|
128
|
-
and __is_exact_match(fn, _system_name)] # If is additional
|
|
133
|
+
return [join(p, fn) for p, fn in __split_paths if not __is_built_in_name(fn) and
|
|
134
|
+
__matches_additional(fn, pattern) and __is_exact_match(fn, _system_name)] # If is additional
|
|
129
135
|
|
|
130
136
|
def _validate_path(_actual_path):
|
|
131
137
|
if len(actual_path) == 0:
|
{gaiaxpy-2.1.2 → gaiaxpy-2.1.3}/src/gaiaxpy/generator/multi_synthetic_photometry_generator.py
RENAMED
|
@@ -18,7 +18,7 @@ class MultiSyntheticPhotometryGenerator(SyntheticPhotometryGenerator):
|
|
|
18
18
|
self.bp_model = bp_model
|
|
19
19
|
self.rp_model = rp_model
|
|
20
20
|
|
|
21
|
-
def generate(self, parsed_input_data, extension, output_file, output_format, save_file):
|
|
21
|
+
def generate(self, parsed_input_data, extension, output_file, output_format, save_file, truncation):
|
|
22
22
|
__FUNCTION_KEY = 'photometry'
|
|
23
23
|
# Recover attributes
|
|
24
24
|
systems = self.photometric_system
|
|
@@ -33,7 +33,7 @@ class MultiSyntheticPhotometryGenerator(SyntheticPhotometryGenerator):
|
|
|
33
33
|
xp_sampling, xp_sampling_grid in zip(xp_sampling_list, xp_sampling_grid_list)]
|
|
34
34
|
# One list per system
|
|
35
35
|
photometry_list_of_lists = [self._create_photometry_list(parsed_input_data, phot_system,
|
|
36
|
-
sampled_basis_func, xp_merge)
|
|
36
|
+
sampled_basis_func, truncation, xp_merge)
|
|
37
37
|
for phot_system, sampled_basis_func, xp_merge
|
|
38
38
|
in zip(systems, sampled_basis_func_list, xp_merge_list)]
|
|
39
39
|
# Now the first list contains the photometries in all systems for the first source_id, and so on.
|
|
@@ -18,19 +18,19 @@ config_parser.read(config_ini_file)
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
class SyntheticPhotometryGenerator(object):
|
|
21
|
-
def generate(self, parsed_input_data, extension, output_file, output_format, save_file):
|
|
21
|
+
def generate(self, parsed_input_data, extension, output_file, output_format, save_file, truncation):
|
|
22
22
|
raise ValueError('Method not defined for base class.')
|
|
23
23
|
|
|
24
24
|
def _get_sampled_basis_functions(self, xp_sampling, xp_sampling_grid):
|
|
25
25
|
return {band: SampledBasisFunctions.from_design_matrix(xp_sampling_grid, xp_sampling[band]) for band in BANDS}
|
|
26
26
|
|
|
27
|
-
def _create_photometry_list(self, parsed_input_data, photometric_system, sampled_basis_func, xp_merge):
|
|
27
|
+
def _create_photometry_list(self, parsed_input_data, photometric_system, sampled_basis_func, truncation, xp_merge):
|
|
28
28
|
parsed_input_data_dict = parsed_input_data.to_dict('records')
|
|
29
|
-
return (_generate_synthetic_photometry(row, sampled_basis_func, xp_merge, photometric_system) for
|
|
30
|
-
parsed_input_data_dict)
|
|
29
|
+
return (_generate_synthetic_photometry(row, sampled_basis_func, xp_merge, truncation, photometric_system) for
|
|
30
|
+
row in parsed_input_data_dict)
|
|
31
31
|
|
|
32
32
|
|
|
33
|
-
def _generate_synthetic_photometry(row, design_matrix, merge, photometric_system):
|
|
33
|
+
def _generate_synthetic_photometry(row, design_matrix, merge, truncation, photometric_system):
|
|
34
34
|
"""
|
|
35
35
|
Create the synthetic photometry from the input continuously-represented mean spectrum and design matrix.
|
|
36
36
|
|
|
@@ -40,6 +40,7 @@ def _generate_synthetic_photometry(row, design_matrix, merge, photometric_system
|
|
|
40
40
|
design_matrix (ndarray): 2D array containing the basis functions sampled for the specific photometric system.
|
|
41
41
|
merge (dict): Dictionary containing an array of weights per BP and one for RP. These have one value per sample
|
|
42
42
|
and define the contributions from BP and RP to the joined absolute spectrum.
|
|
43
|
+
truncation (bool): Toggle truncation of the set of bases.
|
|
43
44
|
photometric_system (obj): Photometric system object containing the zero-points.
|
|
44
45
|
|
|
45
46
|
Returns:
|
|
@@ -48,4 +49,5 @@ def _generate_synthetic_photometry(row, design_matrix, merge, photometric_system
|
|
|
48
49
|
cont_dict = {band: XpContinuousSpectrum(row['source_id'], band.upper(), row[f'{band}_coefficients'],
|
|
49
50
|
get_covariance_matrix(row, band), row[f'{band}_standard_deviation'])
|
|
50
51
|
for band in BANDS}
|
|
51
|
-
|
|
52
|
+
truncation = {band: row[f'{band}_n_relevant_bases'] for band in BANDS} if truncation else None
|
|
53
|
+
return SingleSyntheticPhotometry(row['source_id'], cont_dict, design_matrix, merge, truncation, photometric_system)
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
from astroquery.gaia import GaiaClass
|
|
2
|
-
|
|
3
1
|
from gaiaxpy.core.server import data_release, gaia_server
|
|
4
2
|
from .archive_reader import ArchiveReader
|
|
5
3
|
from .dataframe_reader import DataFrameReader
|
|
@@ -34,6 +32,9 @@ class ListReader(ArchiveReader):
|
|
|
34
32
|
self.disable_info = disable_info
|
|
35
33
|
|
|
36
34
|
def read(self, _data_release=data_release):
|
|
35
|
+
# Import only when read is called, as this module is dependent on the Archive’s availability
|
|
36
|
+
from astroquery.gaia import GaiaClass
|
|
37
|
+
|
|
37
38
|
sources = self.content
|
|
38
39
|
function_name = self.function.__name__
|
|
39
40
|
if function_name in not_supported_functions:
|
|
@@ -50,7 +51,7 @@ class ListReader(ArchiveReader):
|
|
|
50
51
|
continuous_key = [key for key in result.keys() if 'continuous' in key.lower()][0]
|
|
51
52
|
data = result[continuous_key][0].to_pandas()
|
|
52
53
|
except (KeyError, IndexError):
|
|
53
|
-
raise ValueError('No continuous
|
|
54
|
+
raise ValueError('No continuous BP/RP data found for the given sources.')
|
|
54
55
|
if not self.disable_info:
|
|
55
56
|
self.show_info_msg(done=True)
|
|
56
57
|
return DataFrameReader(data, function_name, self.truncation, additional_columns=self.additional_columns,
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import re
|
|
2
2
|
|
|
3
|
-
from astroquery.gaia import GaiaClass
|
|
4
|
-
|
|
5
3
|
from gaiaxpy.core.server import data_release, gaia_server
|
|
6
4
|
from gaiaxpy.core.version import __version__
|
|
7
5
|
from .archive_reader import ArchiveReader
|
|
@@ -64,6 +62,9 @@ class QueryReader(ArchiveReader):
|
|
|
64
62
|
return query
|
|
65
63
|
|
|
66
64
|
def read(self, _data_release=data_release, _comment=f'This query was launched from within GaiaXPy {__version__}'):
|
|
65
|
+
# Import only when read is called, as this module is dependent on the Archive’s availability
|
|
66
|
+
from astroquery.gaia import GaiaClass
|
|
67
|
+
|
|
67
68
|
query = self.content
|
|
68
69
|
query = self._add_marker(query, _comment)
|
|
69
70
|
function_name = self.function.__name__
|
|
@@ -83,7 +84,7 @@ class QueryReader(ArchiveReader):
|
|
|
83
84
|
continuous_key = [key for key in result.keys() if 'continuous' in key.lower()][0]
|
|
84
85
|
data = result[continuous_key][0].to_pandas()
|
|
85
86
|
except KeyError:
|
|
86
|
-
raise ValueError('No continuous
|
|
87
|
+
raise ValueError('No continuous BP/RP data found for the requested query.')
|
|
87
88
|
if not self.disable_info:
|
|
88
89
|
self.show_info_msg(done=True)
|
|
89
90
|
return DataFrameReader(data, function_name, self.truncation, additional_columns=self.additional_columns,
|
|
@@ -6,9 +6,13 @@ Module to represent generic output data.
|
|
|
6
6
|
from ast import literal_eval
|
|
7
7
|
from os.path import dirname, abspath, join
|
|
8
8
|
|
|
9
|
+
from numpy import set_printoptions
|
|
10
|
+
|
|
9
11
|
from gaiaxpy.core.generic_functions import standardise_extension
|
|
10
12
|
from gaiaxpy.file_parser.parse_generic import InvalidExtensionError
|
|
11
13
|
|
|
14
|
+
set_printoptions(legacy='1.21')
|
|
15
|
+
|
|
12
16
|
|
|
13
17
|
def _initialise_header():
|
|
14
18
|
return ["# %ECSV 1.0", "# ---", "# delimiter: ','", "# datatype:"]
|
|
@@ -110,7 +110,7 @@ class SampledSpectraData(OutputData):
|
|
|
110
110
|
"""
|
|
111
111
|
data = self.data
|
|
112
112
|
positions = self.positions
|
|
113
|
-
modified_data = data.
|
|
113
|
+
modified_data = data.map(lambda x: _array_to_standard(x) if isinstance(x, ndarray) else x)
|
|
114
114
|
Path(output_path).mkdir(parents=True, exist_ok=True)
|
|
115
115
|
modified_data.to_csv(join(output_path, f'{output_file}.csv'), index=False)
|
|
116
116
|
# Assume the sampling is the same for all spectra
|
|
@@ -128,7 +128,7 @@ class SampledSpectraData(OutputData):
|
|
|
128
128
|
"""
|
|
129
129
|
data = self.data
|
|
130
130
|
positions = self.positions
|
|
131
|
-
modified_data = data.
|
|
131
|
+
modified_data = data.map(lambda x: _array_to_standard(x, 'ecsv') if isinstance(x, ndarray) else x)
|
|
132
132
|
header_lines = _build_ecsv_header(modified_data, positions)
|
|
133
133
|
Path(output_path).mkdir(parents=True, exist_ok=True)
|
|
134
134
|
modified_data.to_csv(join(output_path, f'{output_file}.ecsv'), index=False)
|
|
@@ -10,8 +10,10 @@ from pathlib import Path
|
|
|
10
10
|
import matplotlib.pyplot as plt
|
|
11
11
|
import pandas as pd
|
|
12
12
|
|
|
13
|
+
plt.rcParams['text.usetex'] = True
|
|
13
14
|
|
|
14
|
-
|
|
15
|
+
|
|
16
|
+
class Plotter:
|
|
15
17
|
|
|
16
18
|
def __init__(self, spectra, sampling, show_plot, output_path, output_file, _format, legend, save_file):
|
|
17
19
|
if isinstance(spectra, pd.Series):
|
|
@@ -91,11 +91,11 @@ class AbsoluteSampledSpectrum(SampledSpectrum):
|
|
|
91
91
|
|
|
92
92
|
@classmethod
|
|
93
93
|
def get_flux_label(cls):
|
|
94
|
-
return 'Flux [W
|
|
94
|
+
return r'Flux [$\mathrm{W\,nm^{-1}\,m^{-2}}$]'
|
|
95
95
|
|
|
96
96
|
@classmethod
|
|
97
97
|
def get_position_label(cls):
|
|
98
|
-
return 'Wavelength [nm]'
|
|
98
|
+
return r'Wavelength [$\mathrm{nm}$]'
|
|
99
99
|
|
|
100
100
|
def spectrum_to_dict(self, with_correlation):
|
|
101
101
|
"""
|
|
@@ -19,7 +19,7 @@ class SingleSyntheticPhotometry(PhotometricAbsoluteSampledSpectrum):
|
|
|
19
19
|
Synthetic photometry derived from Gaia spectra in one photometric system.
|
|
20
20
|
"""
|
|
21
21
|
|
|
22
|
-
def __init__(self, source_id, xp_spectra, sampled_bases, merge, photometric_system):
|
|
22
|
+
def __init__(self, source_id, xp_spectra, sampled_bases, merge, truncation, photometric_system):
|
|
23
23
|
"""
|
|
24
24
|
Initialise a synthetic photometry in a single photometric system.
|
|
25
25
|
|
|
@@ -30,9 +30,11 @@ class SingleSyntheticPhotometry(PhotometricAbsoluteSampledSpectrum):
|
|
|
30
30
|
sampled spectrum.
|
|
31
31
|
merge (dict): The weighting factors for BP and RP sampled onto the grid defining the resolution of the final
|
|
32
32
|
sampled spectrum.
|
|
33
|
+
truncation (dict): The number of relevant bases per band.
|
|
33
34
|
photometric_system (PhotometricSystem): The photometric system of the synthetic photometry.
|
|
34
35
|
"""
|
|
35
|
-
PhotometricAbsoluteSampledSpectrum.__init__(self, source_id, xp_spectra, sampled_bases, merge
|
|
36
|
+
PhotometricAbsoluteSampledSpectrum.__init__(self, source_id, xp_spectra, sampled_bases, merge,
|
|
37
|
+
truncation=truncation)
|
|
36
38
|
self.photometric_system = photometric_system.value
|
|
37
39
|
# Correct flux if necessary (regular Photometric systems return the original value)
|
|
38
40
|
aux_flux = self.flux
|
|
@@ -140,8 +140,8 @@ class XpSampledSpectrum(XpSpectrum, SampledSpectrum):
|
|
|
140
140
|
|
|
141
141
|
@classmethod
|
|
142
142
|
def get_flux_label(cls):
|
|
143
|
-
return
|
|
143
|
+
return r'Flux [$\mathrm{e^-\,s^{-1}}$]'
|
|
144
144
|
|
|
145
145
|
@classmethod
|
|
146
146
|
def get_position_label(cls):
|
|
147
|
-
return
|
|
147
|
+
return r'Pseudo\mbox{-}wavelength'
|