GaiaXPy 2.0.1__tar.gz → 2.1.1__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.1/MANIFEST.in +4 -0
- {GaiaXPy-2.0.1/GaiaXPy.egg-info → gaiaxpy-2.1.1}/PKG-INFO +19 -3
- gaiaxpy-2.1.1/pyproject.toml +37 -0
- gaiaxpy-2.1.1/setup.py +42 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src/GaiaXPy.egg-info}/PKG-INFO +19 -3
- gaiaxpy-2.1.1/src/GaiaXPy.egg-info/SOURCES.txt +173 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/GaiaXPy.egg-info/requires.txt +7 -3
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/GaiaXPy.egg-info/top_level.txt +0 -1
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/__init__.py +2 -1
- gaiaxpy-2.1.1/src/gaiaxpy/calibrator/calibrator.py +226 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/calibrator/external_instrument_model.py +20 -43
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/cholesky/cholesky.py +69 -43
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/colour_equation/xp_filter_system_colour_equation.py +114 -42
- gaiaxpy-2.1.1/src/gaiaxpy/config/OptimisedCalibratedBases_BpId32_RpId37_withNormalisation.xml +6073 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/config.ini +2 -1
- gaiaxpy-2.1.1/src/gaiaxpy/config/correction_tables/DIDREQ-465-HipparcosTycho-correction-factors.csv +18 -0
- gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_Decam_v375wiv142r.xml +603 -0
- gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_ElsCustomW09S2_v375wiv142r.xml +951 -0
- gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_EuclidVis_v375wiv142r.xml +139 -0
- gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_Gaia2_v375wiv142r.xml +2343 -0
- gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_GaiaDr3Ab_v375wiv142r.xml +371 -0
- gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_GaiaDr3Vega_v375wiv142r.xml +371 -0
- gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_GaiaNominal_v375wiv142r.xml +371 -0
- gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_HCustom_v375wiv142r.xml +5823 -0
- gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_HalphaCustomAb_v375wiv142r.xml +1183 -0
- gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_HalphaCustom_v375wiv142r.xml +1183 -0
- gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_HipparcosTycho_v375wiv142r.xml +371 -0
- gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_HstAcswfc_v375wiv142r.xml +1067 -0
- gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_HstHugsStd_v375wiv142r.xml +371 -0
- gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_HstWfc3uvis_v375wiv142r.xml +4083 -0
- gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_HstWfpc2_v375wiv142r.xml +2111 -0
- gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_IphasCustomW09S2_v375wiv142r.xml +951 -0
- gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_IphasCustomW09_v375wiv142r.xml +951 -0
- gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_IphasCustom_v375wiv142r.xml +719 -0
- gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_Iphas_v375wiv142r.xml +371 -0
- gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_JkcStd_v375wiv142r.xml +603 -0
- gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_Jkc_v375wiv142r.xml +603 -0
- gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_Jpas_v375wiv142r.xml +6983 -0
- gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_Jplus_v375wiv142r.xml +1415 -0
- gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_JwstNircam_v375wiv142r.xml +255 -0
- gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_Lsst_v375wiv142r.xml +719 -0
- gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_Panstarrs1Std_v375wiv142r.xml +603 -0
- gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_Panstarrs1_v375wiv142r.xml +603 -0
- gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_Pristine_v375wiv142r.xml +139 -0
- gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_SdssStd_v375wiv142r.xml +603 -0
- gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_Sdss_v375wiv142r.xml +603 -0
- gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_SkyMapper_v375wiv142r.xml +835 -0
- gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_SscAb_v375wiv142r.xml +951 -0
- gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_StromgrenStd_v375wiv142r.xml +371 -0
- gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_Stromgren_v375wiv142r.xml +487 -0
- gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_Ucustom_v375wiv142r.xml +1299 -0
- gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_Wfirst_v375wiv142r.xml +255 -0
- gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_v211wv142r.xml +38776 -0
- gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_v375wiv142r.xml +38776 -0
- gaiaxpy-2.1.1/src/gaiaxpy/config/fluxCal_20230901_renorm_bspline.xml +167 -0
- gaiaxpy-2.1.1/src/gaiaxpy/config/paths.py +13 -0
- gaiaxpy-2.1.1/src/gaiaxpy/converter/config.py +255 -0
- gaiaxpy-2.1.1/src/gaiaxpy/converter/converter.py +211 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/core/config.py +12 -10
- gaiaxpy-2.1.1/src/gaiaxpy/core/custom_errors.py +19 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/core/dispersion_function.py +2 -2
- gaiaxpy-2.1.1/src/gaiaxpy/core/generic_functions.py +603 -0
- gaiaxpy-2.1.1/src/gaiaxpy/core/generic_variables.py +11 -0
- gaiaxpy-2.1.1/src/gaiaxpy/core/input_validator.py +74 -0
- gaiaxpy-2.1.1/src/gaiaxpy/core/version.py +1 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/core/xml_utils.py +2 -3
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/error_correction/error_correction.py +65 -64
- gaiaxpy-2.1.1/src/gaiaxpy/file_parser/cast.py +76 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/file_parser/parse_external.py +22 -6
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/file_parser/parse_generic.py +47 -50
- gaiaxpy-2.1.1/src/gaiaxpy/file_parser/parse_internal_continuous.py +234 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/file_parser/parse_internal_sampled.py +1 -1
- gaiaxpy-2.1.1/src/gaiaxpy/file_parser/parse_inverse.py +26 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/file_parser/utils.py +3 -1
- gaiaxpy-2.1.1/src/gaiaxpy/generator/config.py +175 -0
- gaiaxpy-2.1.1/src/gaiaxpy/generator/generator.py +121 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/generator/internal_photometric_system.py +22 -11
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/generator/multi_synthetic_photometry_generator.py +19 -14
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/generator/photometric_system.py +6 -2
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/generator/synthetic_photometry_generator.py +12 -18
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/generator/utils.py +8 -0
- gaiaxpy-2.1.1/src/gaiaxpy/input_reader/archive_reader.py +35 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/input_reader/dataframe_numpy_array_reader.py +2 -2
- gaiaxpy-2.1.1/src/gaiaxpy/input_reader/dataframe_reader.py +97 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/input_reader/dataframe_string_array_reader.py +3 -4
- gaiaxpy-2.1.1/src/gaiaxpy/input_reader/file_reader.py +96 -0
- gaiaxpy-2.1.1/src/gaiaxpy/input_reader/hdfs_reader.py +56 -0
- gaiaxpy-2.1.1/src/gaiaxpy/input_reader/input_reader.py +63 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/input_reader/list_reader.py +17 -4
- gaiaxpy-2.1.1/src/gaiaxpy/input_reader/local_file_reader.py +8 -0
- gaiaxpy-2.1.1/src/gaiaxpy/input_reader/query_reader.py +72 -0
- gaiaxpy-2.1.1/src/gaiaxpy/input_reader/required_columns.py +38 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/output/continuous_spectra_data.py +48 -42
- gaiaxpy-2.1.1/src/gaiaxpy/output/ecsv_headers/headers_dict.txt +44 -0
- gaiaxpy-2.1.1/src/gaiaxpy/output/output_data.py +92 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/output/photometry_data.py +10 -9
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/output/sampled_spectra_data.py +96 -78
- gaiaxpy-2.1.1/src/gaiaxpy/output/utils.py +157 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/plotter/multi_absolute.py +10 -9
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/plotter/multi_xp.py +8 -8
- gaiaxpy-2.1.1/src/gaiaxpy/plotter/plot_spectra.py +62 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/plotter/plotter.py +20 -7
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/plotter/single.py +12 -12
- gaiaxpy-2.1.1/src/gaiaxpy/spectrum/absolute_sampled_spectrum.py +124 -0
- gaiaxpy-2.1.1/src/gaiaxpy/spectrum/calibration_absolute_sampled_spectrum.py +47 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/spectrum/generic_spectrum.py +3 -3
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/spectrum/multi_synthetic_photometry.py +2 -2
- gaiaxpy-2.1.1/src/gaiaxpy/spectrum/photometric_absolute_sampled_spectrum.py +35 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/spectrum/sampled_basis_functions.py +73 -56
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/spectrum/sampled_spectrum.py +53 -27
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/spectrum/single_synthetic_photometry.py +34 -28
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/spectrum/utils.py +29 -18
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/spectrum/xp_continuous_spectrum.py +13 -12
- gaiaxpy-2.1.1/src/gaiaxpy/spectrum/xp_sampled_spectrum.py +147 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/spectrum/xp_spectrum.py +1 -1
- GaiaXPy-2.0.1/GaiaXPy.egg-info/SOURCES.txt +0 -223
- GaiaXPy-2.0.1/MANIFEST.in +0 -5
- GaiaXPy-2.0.1/gaiaxpy/calibrator/calibrator.py +0 -199
- GaiaXPy-2.0.1/gaiaxpy/config/OptimisedCalibratedBases_BpId32_RpId37_withNormalisation.xml +0 -133
- GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_Decam_v375wiv142r.xml +0 -1
- GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_ElsCustomW09S2_v375wiv142r.xml +0 -1
- GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_EuclidVis_v375wiv142r.xml +0 -1
- GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_Gaia2_v375wiv142r.xml +0 -1
- GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_GaiaDr3Ab_v375wiv142r.xml +0 -1
- GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_GaiaDr3Vega_v375wiv142r.xml +0 -1
- GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_GaiaNominal_v375wiv142r.xml +0 -1
- GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_HCustom_v375wiv142r.xml +0 -1
- GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_HalphaCustomAb_v375wiv142r.xml +0 -1
- GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_HalphaCustom_v375wiv142r.xml +0 -1
- GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_HipparcosTycho_v375wiv142r.xml +0 -1
- GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_HstAcswfc_v375wiv142r.xml +0 -1
- GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_HstHugsStd_v375wiv142r.xml +0 -1
- GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_HstWfc3uvis_v375wiv142r.xml +0 -1
- GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_HstWfpc2_v375wiv142r.xml +0 -1
- GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_IphasCustomW09S2_v375wiv142r.xml +0 -1
- GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_IphasCustomW09_v375wiv142r.xml +0 -1
- GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_IphasCustom_v375wiv142r.xml +0 -1
- GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_Iphas_v375wiv142r.xml +0 -1
- GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_JkcStd_v375wiv142r.xml +0 -1
- GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_Jkc_v375wiv142r.xml +0 -1
- GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_Jpas_v375wiv142r.xml +0 -1
- GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_Jplus_v375wiv142r.xml +0 -1
- GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_JwstNircam_v375wiv142r.xml +0 -1
- GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_Lsst_v375wiv142r.xml +0 -1
- GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_Panstarrs1Std_v375wiv142r.xml +0 -1
- GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_Panstarrs1_v375wiv142r.xml +0 -1
- GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_Pristine_v375wiv142r.xml +0 -1
- GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_SdssStd_v375wiv142r.xml +0 -1
- GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_Sdss_v375wiv142r.xml +0 -1
- GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_SkyMapper_v375wiv142r.xml +0 -1
- GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_SscAb_v375wiv142r.xml +0 -1
- GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_StromgrenStd_v375wiv142r.xml +0 -1
- GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_Stromgren_v375wiv142r.xml +0 -1
- GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_Ucustom_v375wiv142r.xml +0 -1
- GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_Wfirst_v375wiv142r.xml +0 -1
- GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_v211wv142r.xml +0 -1
- GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_v375wiv142r.xml +0 -1
- GaiaXPy-2.0.1/gaiaxpy/config/paths.py +0 -4
- GaiaXPy-2.0.1/gaiaxpy/converter/config.py +0 -79
- GaiaXPy-2.0.1/gaiaxpy/converter/converter.py +0 -171
- GaiaXPy-2.0.1/gaiaxpy/core/generic_functions.py +0 -209
- GaiaXPy-2.0.1/gaiaxpy/core/generic_variables.py +0 -2
- GaiaXPy-2.0.1/gaiaxpy/core/version.py +0 -1
- GaiaXPy-2.0.1/gaiaxpy/file_parser/cast.py +0 -64
- GaiaXPy-2.0.1/gaiaxpy/file_parser/parse_internal_continuous.py +0 -155
- GaiaXPy-2.0.1/gaiaxpy/generator/config.py +0 -96
- GaiaXPy-2.0.1/gaiaxpy/generator/generator.py +0 -77
- GaiaXPy-2.0.1/gaiaxpy/input_reader/archive_reader.py +0 -14
- GaiaXPy-2.0.1/gaiaxpy/input_reader/dataframe_reader.py +0 -60
- GaiaXPy-2.0.1/gaiaxpy/input_reader/file_reader.py +0 -34
- GaiaXPy-2.0.1/gaiaxpy/input_reader/input_reader.py +0 -60
- GaiaXPy-2.0.1/gaiaxpy/input_reader/query_reader.py +0 -35
- GaiaXPy-2.0.1/gaiaxpy/output/ecsv_headers/headers_dict.txt +0 -21
- GaiaXPy-2.0.1/gaiaxpy/output/output_data.py +0 -136
- GaiaXPy-2.0.1/gaiaxpy/output/utils.py +0 -28
- GaiaXPy-2.0.1/gaiaxpy/plotter/plot_spectra.py +0 -43
- GaiaXPy-2.0.1/gaiaxpy/spectrum/absolute_sampled_spectrum.py +0 -137
- GaiaXPy-2.0.1/gaiaxpy/spectrum/xp_sampled_spectrum.py +0 -118
- GaiaXPy-2.0.1/requirements.txt +0 -11
- GaiaXPy-2.0.1/setup.py +0 -47
- GaiaXPy-2.0.1/tests/__init__.py +0 -0
- GaiaXPy-2.0.1/tests/files/__init__.py +0 -0
- GaiaXPy-2.0.1/tests/files/paths.py +0 -3
- GaiaXPy-2.0.1/tests/test_calibrator/__init__.py +0 -0
- GaiaXPy-2.0.1/tests/test_calibrator/test_calibrator.py +0 -287
- GaiaXPy-2.0.1/tests/test_calibrator/test_calibrator_missing_bp.py +0 -106
- GaiaXPy-2.0.1/tests/test_calibrator/test_external_instrument_model.py +0 -75
- GaiaXPy-2.0.1/tests/test_calibrator/test_truncation.py +0 -76
- GaiaXPy-2.0.1/tests/test_cholesky/__init__.py +0 -0
- GaiaXPy-2.0.1/tests/test_cholesky/test_cholesky.py +0 -236
- GaiaXPy-2.0.1/tests/test_cholesky/test_cholesky_missing_bp.py +0 -67
- GaiaXPy-2.0.1/tests/test_colour_equation/__init__.py +0 -0
- GaiaXPy-2.0.1/tests/test_colour_equation/test_xp_filter_system_colour_equation.py +0 -218
- GaiaXPy-2.0.1/tests/test_converter/__init__.py +0 -0
- GaiaXPy-2.0.1/tests/test_converter/test_config.py +0 -65
- GaiaXPy-2.0.1/tests/test_converter/test_converter_avro.py +0 -138
- GaiaXPy-2.0.1/tests/test_converter/test_converter_csv.py +0 -160
- GaiaXPy-2.0.1/tests/test_converter/test_converter_fits.py +0 -162
- GaiaXPy-2.0.1/tests/test_converter/test_converter_missing_bp.py +0 -107
- GaiaXPy-2.0.1/tests/test_converter/test_converter_xml.py +0 -159
- GaiaXPy-2.0.1/tests/test_converter/test_converter_xml_plain.py +0 -160
- GaiaXPy-2.0.1/tests/test_core/__init__.py +0 -0
- GaiaXPy-2.0.1/tests/test_core/test_config.py +0 -53
- GaiaXPy-2.0.1/tests/test_core/test_constants.py +0 -25
- GaiaXPy-2.0.1/tests/test_core/test_dispersion_function.py +0 -21
- GaiaXPy-2.0.1/tests/test_core/test_generic_functions.py +0 -102
- GaiaXPy-2.0.1/tests/test_error_correction/__init__.py +0 -0
- GaiaXPy-2.0.1/tests/test_error_correction/test_error_correction.py +0 -72
- GaiaXPy-2.0.1/tests/test_file_parser/__init__.py +0 -0
- GaiaXPy-2.0.1/tests/test_file_parser/test_parse_external.py +0 -37
- GaiaXPy-2.0.1/tests/test_file_parser/test_parse_generic.py +0 -55
- GaiaXPy-2.0.1/tests/test_file_parser/test_parse_internal_continuous.py +0 -340
- GaiaXPy-2.0.1/tests/test_file_parser/test_parse_internal_sampled.py +0 -49
- GaiaXPy-2.0.1/tests/test_generator/__init__.py +0 -0
- GaiaXPy-2.0.1/tests/test_generator/test_config.py +0 -50
- GaiaXPy-2.0.1/tests/test_generator/test_generator.py +0 -82
- GaiaXPy-2.0.1/tests/test_generator/test_generator_missing_bp.py +0 -80
- GaiaXPy-2.0.1/tests/test_generator/test_internal_photometric_system.py +0 -40
- GaiaXPy-2.0.1/tests/test_generator/test_multi_synthetic_photometry_generator.py +0 -71
- GaiaXPy-2.0.1/tests/test_generator/test_photometric_system.py +0 -111
- GaiaXPy-2.0.1/tests/test_generator/test_single_synthetic_photometry_generator.py +0 -111
- GaiaXPy-2.0.1/tests/test_generator/test_synthetic_photometry_generator.py +0 -142
- GaiaXPy-2.0.1/tests/test_input_reader/__init__.py +0 -0
- GaiaXPy-2.0.1/tests/test_input_reader/test_input_reader.py +0 -41
- GaiaXPy-2.0.1/tests/test_input_reader/test_input_reader_missing_bp.py +0 -73
- GaiaXPy-2.0.1/tests/test_output/__init__.py +0 -0
- GaiaXPy-2.0.1/tests/test_output/test_save_cont_raw.py +0 -114
- GaiaXPy-2.0.1/tests/test_plotter/__init__.py +0 -0
- GaiaXPy-2.0.1/tests/test_plotter/test_multi_absolute.py +0 -35
- GaiaXPy-2.0.1/tests/test_plotter/test_multi_xp.py +0 -26
- GaiaXPy-2.0.1/tests/test_plotter/test_single.py +0 -40
- GaiaXPy-2.0.1/tests/test_spectrum/__init__.py +0 -0
- GaiaXPy-2.0.1/tests/test_spectrum/test_absolute_sampled_spectrum.py +0 -64
- GaiaXPy-2.0.1/tests/test_spectrum/test_generic_spectrum.py +0 -12
- GaiaXPy-2.0.1/tests/test_spectrum/test_utils.py +0 -57
- GaiaXPy-2.0.1/tests/test_spectrum/test_xp_continuous_spectrum.py +0 -62
- GaiaXPy-2.0.1/tests/test_spectrum/test_xp_sampled_spectrum.py +0 -71
- GaiaXPy-2.0.1/tests/test_spectrum/test_xp_spectrum.py +0 -12
- GaiaXPy-2.0.1/tests/utils/__init__.py +0 -0
- GaiaXPy-2.0.1/tests/utils/utils.py +0 -35
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1}/LICENCE +0 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1}/README.md +0 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1}/setup.cfg +0 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/GaiaXPy.egg-info/dependency_links.txt +0 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/calibrator/__init__.py +0 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/cholesky/__init__.py +0 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/colour_equation/__init__.py +0 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/TabulatedDispersionFunction-DR3-v375wiv142r_20200610.csv +0 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/__init__.py +0 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/available_systems.txt +0 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/bpC03_v211w_bases.csv +0 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/bpC03_v211w_dispersion.csv +0 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/bpC03_v211w_response.csv +0 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/bpC03_v375wi_bases.csv +0 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/bpC03_v375wi_dispersion.csv +0 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/bpC03_v375wi_response.csv +0 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/colour_eq_files/JkcStd_colour_eq.ini +0 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/colour_eq_files/SdssStd_colour_eq.ini +0 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-ElsCustomW09S2-correction-factors.csv +0 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-EuclidVis-correction-factors.csv +0 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-Gaia2-correction-factors.csv +0 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-GaiaDr3Vega-correction-factors.csv +0 -0
- /GaiaXPy-2.0.1/gaiaxpy/config/correction_tables/DIDREQ-465-HipparcosTycho-correction-factors.csv → /gaiaxpy-2.1.1/src/gaiaxpy/config/correction_tables/DIDREQ-465-HipparcosTycho-correction-factors-old.csv +0 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-HstAcswfc-correction-factors.csv +0 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-HstHugsStd-correction-factors.csv +0 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-HstWfc3uvis-correction-factors.csv +0 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-HstWfpc2-correction-factors.csv +0 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-Iphas-correction-factors.csv +0 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-Jkc-correction-factors.csv +0 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-JkcStd-correction-factors.csv +0 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-Jpas-correction-factors.csv +0 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-Jplus-correction-factors.csv +0 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-JwstNircam-correction-factors.csv +0 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-Panstarrs1-correction-factors.csv +0 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-Panstarrs1Std-correction-factors.csv +0 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-Pristine-correction-factors.csv +0 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-Sdss-correction-factors.csv +0 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-SdssStd-correction-factors.csv +0 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-SkyMapper-correction-factors.csv +0 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-Stromgren-correction-factors.csv +0 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-StromgrenStd-correction-factors.csv +0 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-Wfirst-correction-factors.csv +0 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/rpC03_v142r_bases.csv +0 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/rpC03_v142r_dispersion.csv +0 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/rpC03_v142r_response.csv +0 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/converter/__init__.py +0 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/core/__init__.py +0 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/core/nature.py +0 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/core/satellite.py +0 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/core/server.py +0 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/error_correction/__init__.py +0 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/file_parser/__init__.py +0 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/generator/__init__.py +0 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/generator/regular_photometric_system.py +0 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/generator/standardised_photometric_system.py +0 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/input_reader/__init__.py +0 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/output/__init__.py +0 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/plotter/__init__.py +0 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/spectrum/__init__.py +0 -0
- {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/spectrum/spectral_energy_distribution.py +0 -0
|
@@ -1,18 +1,34 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: GaiaXPy
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.1.1
|
|
4
4
|
Summary: Utilities to handle BP/RP (XP) Gaia low-resolution spectra as delivered via the archive
|
|
5
5
|
Home-page: https://gaia-dpci.github.io/GaiaXPy-website/
|
|
6
|
-
Author: Francesca De Angeli, Paolo Montegriffo, Lovro Palaversa, Daniela Ruz-Mieres
|
|
6
|
+
Author: Francesca De Angeli, Zuzanna Kostrzewa-Rutkowska, Paolo Montegriffo, Lovro Palaversa, Daniela Ruz-Mieres
|
|
7
7
|
Author-email: fda@ast.cam.ac.uk
|
|
8
8
|
Maintainer: Daniela Ruz-Mieres
|
|
9
9
|
Maintainer-email: d.ruzmieres@ast.cam.ac.uk
|
|
10
|
+
Project-URL: homepage, https://gaia-dpci.github.io/GaiaXPy-website/
|
|
11
|
+
Project-URL: documentation, https://gaiaxpy.readthedocs.io/en/latest/
|
|
10
12
|
Classifier: Programming Language :: Python :: 3
|
|
11
13
|
Classifier: License :: OSI Approved :: BSD License
|
|
12
14
|
Classifier: Operating System :: OS Independent
|
|
13
|
-
Requires-Python: >=3.
|
|
15
|
+
Requires-Python: >=3.8
|
|
14
16
|
Description-Content-Type: text/markdown
|
|
15
17
|
License-File: LICENCE
|
|
18
|
+
Requires-Dist: aenum
|
|
19
|
+
Requires-Dist: astropy
|
|
20
|
+
Requires-Dist: astroquery
|
|
21
|
+
Requires-Dist: fastavro
|
|
22
|
+
Requires-Dist: hdfs
|
|
23
|
+
Requires-Dist: matplotlib
|
|
24
|
+
Requires-Dist: numpy>1.23
|
|
25
|
+
Requires-Dist: packaging
|
|
26
|
+
Requires-Dist: pandas>=1.5.0
|
|
27
|
+
Requires-Dist: scipy
|
|
28
|
+
Requires-Dist: tqdm>=4.64.0
|
|
29
|
+
Provides-Extra: tests
|
|
30
|
+
Requires-Dist: pytest; extra == "tests"
|
|
31
|
+
Requires-Dist: pytest-mock; extra == "tests"
|
|
16
32
|
|
|
17
33
|
BP/RP (often shortened as XP) spectra will become available for the first time in Gaia Data Release 3 (DR3). In their first release, only source mean spectra will be 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.
|
|
18
34
|
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ['setuptools', 'wheel']
|
|
3
|
+
build-backend = 'setuptools.build_meta'
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = 'GaiaXPy'
|
|
7
|
+
dependencies = [
|
|
8
|
+
'aenum',
|
|
9
|
+
'astropy',
|
|
10
|
+
'astroquery',
|
|
11
|
+
'fastavro',
|
|
12
|
+
'hdfs',
|
|
13
|
+
'matplotlib',
|
|
14
|
+
'numpy>1.23',
|
|
15
|
+
'packaging',
|
|
16
|
+
'pandas>=1.5.0',
|
|
17
|
+
'scipy',
|
|
18
|
+
'tqdm>=4.64.0'
|
|
19
|
+
]
|
|
20
|
+
dynamic = [
|
|
21
|
+
'authors',
|
|
22
|
+
'classifiers',
|
|
23
|
+
'description',
|
|
24
|
+
'maintainers',
|
|
25
|
+
'optional-dependencies',
|
|
26
|
+
'readme',
|
|
27
|
+
'requires-python',
|
|
28
|
+
'version'
|
|
29
|
+
]
|
|
30
|
+
|
|
31
|
+
[project.urls]
|
|
32
|
+
homepage = 'https://gaia-dpci.github.io/GaiaXPy-website/'
|
|
33
|
+
documentation = 'https://gaiaxpy.readthedocs.io/en/latest/'
|
|
34
|
+
|
|
35
|
+
[tool.setuptools]
|
|
36
|
+
packages = ['gaiaxpy']
|
|
37
|
+
package-dir = {'' = 'src'}
|
gaiaxpy-2.1.1/setup.py
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Setup module for GaiaXPy.
|
|
3
|
+
|
|
4
|
+
Francesca De Angeli, Zuzanna Kostrzewa-Rutkowska, Paolo Montegriffo, Lovro Palaversa, Daniela Ruz-Mieres - 2024
|
|
5
|
+
|
|
6
|
+
Based on:
|
|
7
|
+
https://packaging.python.org/tutorials/packaging-projects
|
|
8
|
+
"""
|
|
9
|
+
import re
|
|
10
|
+
from os.path import abspath, dirname, join
|
|
11
|
+
from setuptools import setup, find_packages
|
|
12
|
+
|
|
13
|
+
AUTHORS = 'Francesca De Angeli, Zuzanna Kostrzewa-Rutkowska, Paolo Montegriffo, Lovro Palaversa, Daniela Ruz-Mieres'
|
|
14
|
+
|
|
15
|
+
CLASSIFIERS = ['Programming Language :: Python :: 3',
|
|
16
|
+
'License :: OSI Approved :: BSD License',
|
|
17
|
+
'Operating System :: OS Independent']
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def get_property(prop):
|
|
21
|
+
version_file_path = join(dirname(abspath(__file__)), 'src/gaiaxpy/core/version.py')
|
|
22
|
+
result = re.search(r'{}\s*=\s*[\'"]([^\'"]*)[\'"]'.format(prop), open(version_file_path).read())
|
|
23
|
+
return result.group(1)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
setup(
|
|
27
|
+
name='GaiaXPy',
|
|
28
|
+
version=get_property('__version__'),
|
|
29
|
+
author=AUTHORS,
|
|
30
|
+
author_email='fda@ast.cam.ac.uk',
|
|
31
|
+
maintainer='Daniela Ruz-Mieres',
|
|
32
|
+
maintainer_email='d.ruzmieres@ast.cam.ac.uk',
|
|
33
|
+
description='Utilities to handle BP/RP (XP) Gaia low-resolution spectra as delivered via the archive',
|
|
34
|
+
long_description=open('README.md', 'r').read(),
|
|
35
|
+
long_description_content_type='text/markdown',
|
|
36
|
+
url='https://gaia-dpci.github.io/GaiaXPy-website/',
|
|
37
|
+
python_requires='>=3.8',
|
|
38
|
+
packages=find_packages('src'),
|
|
39
|
+
extras_require={'tests': ['pytest', 'pytest-mock']},
|
|
40
|
+
include_package_data=True,
|
|
41
|
+
classifiers=CLASSIFIERS
|
|
42
|
+
)
|
|
@@ -1,18 +1,34 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: GaiaXPy
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.1.1
|
|
4
4
|
Summary: Utilities to handle BP/RP (XP) Gaia low-resolution spectra as delivered via the archive
|
|
5
5
|
Home-page: https://gaia-dpci.github.io/GaiaXPy-website/
|
|
6
|
-
Author: Francesca De Angeli, Paolo Montegriffo, Lovro Palaversa, Daniela Ruz-Mieres
|
|
6
|
+
Author: Francesca De Angeli, Zuzanna Kostrzewa-Rutkowska, Paolo Montegriffo, Lovro Palaversa, Daniela Ruz-Mieres
|
|
7
7
|
Author-email: fda@ast.cam.ac.uk
|
|
8
8
|
Maintainer: Daniela Ruz-Mieres
|
|
9
9
|
Maintainer-email: d.ruzmieres@ast.cam.ac.uk
|
|
10
|
+
Project-URL: homepage, https://gaia-dpci.github.io/GaiaXPy-website/
|
|
11
|
+
Project-URL: documentation, https://gaiaxpy.readthedocs.io/en/latest/
|
|
10
12
|
Classifier: Programming Language :: Python :: 3
|
|
11
13
|
Classifier: License :: OSI Approved :: BSD License
|
|
12
14
|
Classifier: Operating System :: OS Independent
|
|
13
|
-
Requires-Python: >=3.
|
|
15
|
+
Requires-Python: >=3.8
|
|
14
16
|
Description-Content-Type: text/markdown
|
|
15
17
|
License-File: LICENCE
|
|
18
|
+
Requires-Dist: aenum
|
|
19
|
+
Requires-Dist: astropy
|
|
20
|
+
Requires-Dist: astroquery
|
|
21
|
+
Requires-Dist: fastavro
|
|
22
|
+
Requires-Dist: hdfs
|
|
23
|
+
Requires-Dist: matplotlib
|
|
24
|
+
Requires-Dist: numpy>1.23
|
|
25
|
+
Requires-Dist: packaging
|
|
26
|
+
Requires-Dist: pandas>=1.5.0
|
|
27
|
+
Requires-Dist: scipy
|
|
28
|
+
Requires-Dist: tqdm>=4.64.0
|
|
29
|
+
Provides-Extra: tests
|
|
30
|
+
Requires-Dist: pytest; extra == "tests"
|
|
31
|
+
Requires-Dist: pytest-mock; extra == "tests"
|
|
16
32
|
|
|
17
33
|
BP/RP (often shortened as XP) spectra will become available for the first time in Gaia Data Release 3 (DR3). In their first release, only source mean spectra will be 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.
|
|
18
34
|
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
LICENCE
|
|
2
|
+
MANIFEST.in
|
|
3
|
+
README.md
|
|
4
|
+
pyproject.toml
|
|
5
|
+
setup.py
|
|
6
|
+
src/GaiaXPy.egg-info/PKG-INFO
|
|
7
|
+
src/GaiaXPy.egg-info/SOURCES.txt
|
|
8
|
+
src/GaiaXPy.egg-info/dependency_links.txt
|
|
9
|
+
src/GaiaXPy.egg-info/requires.txt
|
|
10
|
+
src/GaiaXPy.egg-info/top_level.txt
|
|
11
|
+
src/gaiaxpy/__init__.py
|
|
12
|
+
src/gaiaxpy/calibrator/__init__.py
|
|
13
|
+
src/gaiaxpy/calibrator/calibrator.py
|
|
14
|
+
src/gaiaxpy/calibrator/external_instrument_model.py
|
|
15
|
+
src/gaiaxpy/cholesky/__init__.py
|
|
16
|
+
src/gaiaxpy/cholesky/cholesky.py
|
|
17
|
+
src/gaiaxpy/colour_equation/__init__.py
|
|
18
|
+
src/gaiaxpy/colour_equation/xp_filter_system_colour_equation.py
|
|
19
|
+
src/gaiaxpy/config/OptimisedCalibratedBases_BpId32_RpId37_withNormalisation.xml
|
|
20
|
+
src/gaiaxpy/config/TabulatedDispersionFunction-DR3-v375wiv142r_20200610.csv
|
|
21
|
+
src/gaiaxpy/config/__init__.py
|
|
22
|
+
src/gaiaxpy/config/available_systems.txt
|
|
23
|
+
src/gaiaxpy/config/bpC03_v211w_bases.csv
|
|
24
|
+
src/gaiaxpy/config/bpC03_v211w_dispersion.csv
|
|
25
|
+
src/gaiaxpy/config/bpC03_v211w_response.csv
|
|
26
|
+
src/gaiaxpy/config/bpC03_v375wi_bases.csv
|
|
27
|
+
src/gaiaxpy/config/bpC03_v375wi_dispersion.csv
|
|
28
|
+
src/gaiaxpy/config/bpC03_v375wi_response.csv
|
|
29
|
+
src/gaiaxpy/config/config.ini
|
|
30
|
+
src/gaiaxpy/config/fluxCal_20230901_renorm_bspline.xml
|
|
31
|
+
src/gaiaxpy/config/paths.py
|
|
32
|
+
src/gaiaxpy/config/rpC03_v142r_bases.csv
|
|
33
|
+
src/gaiaxpy/config/rpC03_v142r_dispersion.csv
|
|
34
|
+
src/gaiaxpy/config/rpC03_v142r_response.csv
|
|
35
|
+
src/gaiaxpy/config/colour_eq_files/JkcStd_colour_eq.ini
|
|
36
|
+
src/gaiaxpy/config/colour_eq_files/SdssStd_colour_eq.ini
|
|
37
|
+
src/gaiaxpy/config/correction_tables/DIDREQ-465-ElsCustomW09S2-correction-factors.csv
|
|
38
|
+
src/gaiaxpy/config/correction_tables/DIDREQ-465-EuclidVis-correction-factors.csv
|
|
39
|
+
src/gaiaxpy/config/correction_tables/DIDREQ-465-Gaia2-correction-factors.csv
|
|
40
|
+
src/gaiaxpy/config/correction_tables/DIDREQ-465-GaiaDr3Vega-correction-factors.csv
|
|
41
|
+
src/gaiaxpy/config/correction_tables/DIDREQ-465-HipparcosTycho-correction-factors-old.csv
|
|
42
|
+
src/gaiaxpy/config/correction_tables/DIDREQ-465-HipparcosTycho-correction-factors.csv
|
|
43
|
+
src/gaiaxpy/config/correction_tables/DIDREQ-465-HstAcswfc-correction-factors.csv
|
|
44
|
+
src/gaiaxpy/config/correction_tables/DIDREQ-465-HstHugsStd-correction-factors.csv
|
|
45
|
+
src/gaiaxpy/config/correction_tables/DIDREQ-465-HstWfc3uvis-correction-factors.csv
|
|
46
|
+
src/gaiaxpy/config/correction_tables/DIDREQ-465-HstWfpc2-correction-factors.csv
|
|
47
|
+
src/gaiaxpy/config/correction_tables/DIDREQ-465-Iphas-correction-factors.csv
|
|
48
|
+
src/gaiaxpy/config/correction_tables/DIDREQ-465-Jkc-correction-factors.csv
|
|
49
|
+
src/gaiaxpy/config/correction_tables/DIDREQ-465-JkcStd-correction-factors.csv
|
|
50
|
+
src/gaiaxpy/config/correction_tables/DIDREQ-465-Jpas-correction-factors.csv
|
|
51
|
+
src/gaiaxpy/config/correction_tables/DIDREQ-465-Jplus-correction-factors.csv
|
|
52
|
+
src/gaiaxpy/config/correction_tables/DIDREQ-465-JwstNircam-correction-factors.csv
|
|
53
|
+
src/gaiaxpy/config/correction_tables/DIDREQ-465-Panstarrs1-correction-factors.csv
|
|
54
|
+
src/gaiaxpy/config/correction_tables/DIDREQ-465-Panstarrs1Std-correction-factors.csv
|
|
55
|
+
src/gaiaxpy/config/correction_tables/DIDREQ-465-Pristine-correction-factors.csv
|
|
56
|
+
src/gaiaxpy/config/correction_tables/DIDREQ-465-Sdss-correction-factors.csv
|
|
57
|
+
src/gaiaxpy/config/correction_tables/DIDREQ-465-SdssStd-correction-factors.csv
|
|
58
|
+
src/gaiaxpy/config/correction_tables/DIDREQ-465-SkyMapper-correction-factors.csv
|
|
59
|
+
src/gaiaxpy/config/correction_tables/DIDREQ-465-Stromgren-correction-factors.csv
|
|
60
|
+
src/gaiaxpy/config/correction_tables/DIDREQ-465-StromgrenStd-correction-factors.csv
|
|
61
|
+
src/gaiaxpy/config/correction_tables/DIDREQ-465-Wfirst-correction-factors.csv
|
|
62
|
+
src/gaiaxpy/config/filters/XpFilter_Decam_v375wiv142r.xml
|
|
63
|
+
src/gaiaxpy/config/filters/XpFilter_ElsCustomW09S2_v375wiv142r.xml
|
|
64
|
+
src/gaiaxpy/config/filters/XpFilter_EuclidVis_v375wiv142r.xml
|
|
65
|
+
src/gaiaxpy/config/filters/XpFilter_Gaia2_v375wiv142r.xml
|
|
66
|
+
src/gaiaxpy/config/filters/XpFilter_GaiaDr3Ab_v375wiv142r.xml
|
|
67
|
+
src/gaiaxpy/config/filters/XpFilter_GaiaDr3Vega_v375wiv142r.xml
|
|
68
|
+
src/gaiaxpy/config/filters/XpFilter_GaiaNominal_v375wiv142r.xml
|
|
69
|
+
src/gaiaxpy/config/filters/XpFilter_HCustom_v375wiv142r.xml
|
|
70
|
+
src/gaiaxpy/config/filters/XpFilter_HalphaCustomAb_v375wiv142r.xml
|
|
71
|
+
src/gaiaxpy/config/filters/XpFilter_HalphaCustom_v375wiv142r.xml
|
|
72
|
+
src/gaiaxpy/config/filters/XpFilter_HipparcosTycho_v375wiv142r.xml
|
|
73
|
+
src/gaiaxpy/config/filters/XpFilter_HstAcswfc_v375wiv142r.xml
|
|
74
|
+
src/gaiaxpy/config/filters/XpFilter_HstHugsStd_v375wiv142r.xml
|
|
75
|
+
src/gaiaxpy/config/filters/XpFilter_HstWfc3uvis_v375wiv142r.xml
|
|
76
|
+
src/gaiaxpy/config/filters/XpFilter_HstWfpc2_v375wiv142r.xml
|
|
77
|
+
src/gaiaxpy/config/filters/XpFilter_IphasCustomW09S2_v375wiv142r.xml
|
|
78
|
+
src/gaiaxpy/config/filters/XpFilter_IphasCustomW09_v375wiv142r.xml
|
|
79
|
+
src/gaiaxpy/config/filters/XpFilter_IphasCustom_v375wiv142r.xml
|
|
80
|
+
src/gaiaxpy/config/filters/XpFilter_Iphas_v375wiv142r.xml
|
|
81
|
+
src/gaiaxpy/config/filters/XpFilter_JkcStd_v375wiv142r.xml
|
|
82
|
+
src/gaiaxpy/config/filters/XpFilter_Jkc_v375wiv142r.xml
|
|
83
|
+
src/gaiaxpy/config/filters/XpFilter_Jpas_v375wiv142r.xml
|
|
84
|
+
src/gaiaxpy/config/filters/XpFilter_Jplus_v375wiv142r.xml
|
|
85
|
+
src/gaiaxpy/config/filters/XpFilter_JwstNircam_v375wiv142r.xml
|
|
86
|
+
src/gaiaxpy/config/filters/XpFilter_Lsst_v375wiv142r.xml
|
|
87
|
+
src/gaiaxpy/config/filters/XpFilter_Panstarrs1Std_v375wiv142r.xml
|
|
88
|
+
src/gaiaxpy/config/filters/XpFilter_Panstarrs1_v375wiv142r.xml
|
|
89
|
+
src/gaiaxpy/config/filters/XpFilter_Pristine_v375wiv142r.xml
|
|
90
|
+
src/gaiaxpy/config/filters/XpFilter_SdssStd_v375wiv142r.xml
|
|
91
|
+
src/gaiaxpy/config/filters/XpFilter_Sdss_v375wiv142r.xml
|
|
92
|
+
src/gaiaxpy/config/filters/XpFilter_SkyMapper_v375wiv142r.xml
|
|
93
|
+
src/gaiaxpy/config/filters/XpFilter_SscAb_v375wiv142r.xml
|
|
94
|
+
src/gaiaxpy/config/filters/XpFilter_StromgrenStd_v375wiv142r.xml
|
|
95
|
+
src/gaiaxpy/config/filters/XpFilter_Stromgren_v375wiv142r.xml
|
|
96
|
+
src/gaiaxpy/config/filters/XpFilter_Ucustom_v375wiv142r.xml
|
|
97
|
+
src/gaiaxpy/config/filters/XpFilter_Wfirst_v375wiv142r.xml
|
|
98
|
+
src/gaiaxpy/config/filters/XpFilter_v211wv142r.xml
|
|
99
|
+
src/gaiaxpy/config/filters/XpFilter_v375wiv142r.xml
|
|
100
|
+
src/gaiaxpy/converter/__init__.py
|
|
101
|
+
src/gaiaxpy/converter/config.py
|
|
102
|
+
src/gaiaxpy/converter/converter.py
|
|
103
|
+
src/gaiaxpy/core/__init__.py
|
|
104
|
+
src/gaiaxpy/core/config.py
|
|
105
|
+
src/gaiaxpy/core/custom_errors.py
|
|
106
|
+
src/gaiaxpy/core/dispersion_function.py
|
|
107
|
+
src/gaiaxpy/core/generic_functions.py
|
|
108
|
+
src/gaiaxpy/core/generic_variables.py
|
|
109
|
+
src/gaiaxpy/core/input_validator.py
|
|
110
|
+
src/gaiaxpy/core/nature.py
|
|
111
|
+
src/gaiaxpy/core/satellite.py
|
|
112
|
+
src/gaiaxpy/core/server.py
|
|
113
|
+
src/gaiaxpy/core/version.py
|
|
114
|
+
src/gaiaxpy/core/xml_utils.py
|
|
115
|
+
src/gaiaxpy/error_correction/__init__.py
|
|
116
|
+
src/gaiaxpy/error_correction/error_correction.py
|
|
117
|
+
src/gaiaxpy/file_parser/__init__.py
|
|
118
|
+
src/gaiaxpy/file_parser/cast.py
|
|
119
|
+
src/gaiaxpy/file_parser/parse_external.py
|
|
120
|
+
src/gaiaxpy/file_parser/parse_generic.py
|
|
121
|
+
src/gaiaxpy/file_parser/parse_internal_continuous.py
|
|
122
|
+
src/gaiaxpy/file_parser/parse_internal_sampled.py
|
|
123
|
+
src/gaiaxpy/file_parser/parse_inverse.py
|
|
124
|
+
src/gaiaxpy/file_parser/utils.py
|
|
125
|
+
src/gaiaxpy/generator/__init__.py
|
|
126
|
+
src/gaiaxpy/generator/config.py
|
|
127
|
+
src/gaiaxpy/generator/generator.py
|
|
128
|
+
src/gaiaxpy/generator/internal_photometric_system.py
|
|
129
|
+
src/gaiaxpy/generator/multi_synthetic_photometry_generator.py
|
|
130
|
+
src/gaiaxpy/generator/photometric_system.py
|
|
131
|
+
src/gaiaxpy/generator/regular_photometric_system.py
|
|
132
|
+
src/gaiaxpy/generator/standardised_photometric_system.py
|
|
133
|
+
src/gaiaxpy/generator/synthetic_photometry_generator.py
|
|
134
|
+
src/gaiaxpy/generator/utils.py
|
|
135
|
+
src/gaiaxpy/input_reader/__init__.py
|
|
136
|
+
src/gaiaxpy/input_reader/archive_reader.py
|
|
137
|
+
src/gaiaxpy/input_reader/dataframe_numpy_array_reader.py
|
|
138
|
+
src/gaiaxpy/input_reader/dataframe_reader.py
|
|
139
|
+
src/gaiaxpy/input_reader/dataframe_string_array_reader.py
|
|
140
|
+
src/gaiaxpy/input_reader/file_reader.py
|
|
141
|
+
src/gaiaxpy/input_reader/hdfs_reader.py
|
|
142
|
+
src/gaiaxpy/input_reader/input_reader.py
|
|
143
|
+
src/gaiaxpy/input_reader/list_reader.py
|
|
144
|
+
src/gaiaxpy/input_reader/local_file_reader.py
|
|
145
|
+
src/gaiaxpy/input_reader/query_reader.py
|
|
146
|
+
src/gaiaxpy/input_reader/required_columns.py
|
|
147
|
+
src/gaiaxpy/output/__init__.py
|
|
148
|
+
src/gaiaxpy/output/continuous_spectra_data.py
|
|
149
|
+
src/gaiaxpy/output/output_data.py
|
|
150
|
+
src/gaiaxpy/output/photometry_data.py
|
|
151
|
+
src/gaiaxpy/output/sampled_spectra_data.py
|
|
152
|
+
src/gaiaxpy/output/utils.py
|
|
153
|
+
src/gaiaxpy/output/ecsv_headers/headers_dict.txt
|
|
154
|
+
src/gaiaxpy/plotter/__init__.py
|
|
155
|
+
src/gaiaxpy/plotter/multi_absolute.py
|
|
156
|
+
src/gaiaxpy/plotter/multi_xp.py
|
|
157
|
+
src/gaiaxpy/plotter/plot_spectra.py
|
|
158
|
+
src/gaiaxpy/plotter/plotter.py
|
|
159
|
+
src/gaiaxpy/plotter/single.py
|
|
160
|
+
src/gaiaxpy/spectrum/__init__.py
|
|
161
|
+
src/gaiaxpy/spectrum/absolute_sampled_spectrum.py
|
|
162
|
+
src/gaiaxpy/spectrum/calibration_absolute_sampled_spectrum.py
|
|
163
|
+
src/gaiaxpy/spectrum/generic_spectrum.py
|
|
164
|
+
src/gaiaxpy/spectrum/multi_synthetic_photometry.py
|
|
165
|
+
src/gaiaxpy/spectrum/photometric_absolute_sampled_spectrum.py
|
|
166
|
+
src/gaiaxpy/spectrum/sampled_basis_functions.py
|
|
167
|
+
src/gaiaxpy/spectrum/sampled_spectrum.py
|
|
168
|
+
src/gaiaxpy/spectrum/single_synthetic_photometry.py
|
|
169
|
+
src/gaiaxpy/spectrum/spectral_energy_distribution.py
|
|
170
|
+
src/gaiaxpy/spectrum/utils.py
|
|
171
|
+
src/gaiaxpy/spectrum/xp_continuous_spectrum.py
|
|
172
|
+
src/gaiaxpy/spectrum/xp_sampled_spectrum.py
|
|
173
|
+
src/gaiaxpy/spectrum/xp_spectrum.py
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
# flake8: noqa
|
|
1
2
|
from .calibrator.calibrator import calibrate
|
|
2
3
|
from .cholesky.cholesky import get_chi2, get_inverse_covariance_matrix, get_inverse_square_root_covariance_matrix
|
|
3
4
|
from .converter.converter import convert
|
|
4
5
|
from .core.dispersion_function import pwl_to_wl, wl_to_pwl, pwl_range, wl_range
|
|
5
|
-
from .core.version import __version__
|
|
6
6
|
from .error_correction.error_correction import apply_error_correction
|
|
7
7
|
from .generator.generator import generate
|
|
8
8
|
from .generator.photometric_system import PhotometricSystem, load_additional_systems, remove_additional_systems
|
|
9
9
|
from .plotter.plot_spectra import plot_spectra
|
|
10
|
+
from .core.version import __version__
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
"""
|
|
2
|
+
calibrator.py
|
|
3
|
+
====================================
|
|
4
|
+
Module for the calibrator functionality.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from configparser import ConfigParser
|
|
8
|
+
from os.path import join
|
|
9
|
+
from pathlib import Path
|
|
10
|
+
from sys import stdout
|
|
11
|
+
from typing import Union
|
|
12
|
+
|
|
13
|
+
import numpy as np
|
|
14
|
+
import pandas as pd
|
|
15
|
+
from tqdm import tqdm
|
|
16
|
+
|
|
17
|
+
from gaiaxpy.config.paths import config_path, config_ini_file
|
|
18
|
+
from gaiaxpy.core.config import load_xpmerge_from_xml, load_xpsampling_from_xml
|
|
19
|
+
from gaiaxpy.core.generic_functions import cast_output, validate_wl_sampling, parse_band, format_sampled_output
|
|
20
|
+
from gaiaxpy.core.generic_variables import pbar_colour, pbar_units, pbar_message
|
|
21
|
+
from gaiaxpy.core.satellite import BANDS, BP_WL, RP_WL
|
|
22
|
+
from gaiaxpy.input_reader.input_reader import InputReader
|
|
23
|
+
from gaiaxpy.output.sampled_spectra_data import SampledSpectraData
|
|
24
|
+
from gaiaxpy.spectrum.sampled_basis_functions import SampledBasisFunctions
|
|
25
|
+
from gaiaxpy.spectrum.utils import get_covariance_matrix
|
|
26
|
+
from gaiaxpy.spectrum.xp_continuous_spectrum import XpContinuousSpectrum
|
|
27
|
+
from .external_instrument_model import ExternalInstrumentModel
|
|
28
|
+
from ..core.input_validator import validate_save_arguments
|
|
29
|
+
from ..spectrum.calibration_absolute_sampled_spectrum import CalibrationAbsoluteSampledSpectrum
|
|
30
|
+
|
|
31
|
+
__FUNCTION_KEY = 'calibrator'
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def calibrate(input_object: Union[list, Path, str], sampling: np.ndarray = None, truncation: bool = False,
|
|
35
|
+
output_path: Union[Path, str] = '.', output_file: str = 'output_spectra', output_format: str = None,
|
|
36
|
+
save_file: bool = True, with_correlation: bool = False, username: str = None, password: str = None) -> \
|
|
37
|
+
(pd.DataFrame, np.ndarray):
|
|
38
|
+
"""
|
|
39
|
+
Calibration utility: calibrates the input internally-calibrated continuously-represented mean spectra to the
|
|
40
|
+
absolute system. An absolute spectrum sampled on a user-defined or default wavelength grid is created for each set
|
|
41
|
+
of BP and RP input spectra. If either band is missing, the output spectrum will only cover the range covered by the
|
|
42
|
+
available data.
|
|
43
|
+
|
|
44
|
+
Args:
|
|
45
|
+
input_object (list/Path/str): Path to the file containing the mean spectra as downloaded from the archive in
|
|
46
|
+
their continuous representation, a list of sources ids (string or long), or a pandas DataFrame.
|
|
47
|
+
sampling (ndarray): 1D array containing the desired sampling in absolute wavelengths [nm].
|
|
48
|
+
truncation (bool): Toggle truncation of the set of bases. The level of truncation to be applied is defined by
|
|
49
|
+
the recommended value in the input files.
|
|
50
|
+
output_path (Path/str): Path where to save the output data.
|
|
51
|
+
output_file (str): Name of the output file without extension (e.g. 'my_file').
|
|
52
|
+
output_format (str): Desired output format. If no format is given, the output file format will be the same as
|
|
53
|
+
the input file (e.g. 'csv').
|
|
54
|
+
save_file (bool): Whether to save the output in a file. If false, output_format and output_file will be ignored.
|
|
55
|
+
with_correlation (bool): Whether correlation information should be generated.
|
|
56
|
+
username (str): Cosmos username, only suggested when input_object is a list or ADQL query.
|
|
57
|
+
password (str): Cosmos password, only suggested when input_object is a list or ADQL query.
|
|
58
|
+
|
|
59
|
+
Returns:
|
|
60
|
+
(tuple): tuple containing:
|
|
61
|
+
|
|
62
|
+
DataFrame: The values for all sampled absolute spectra.
|
|
63
|
+
ndarray: The sampling used to calibrate the input spectra (user-provided or default).
|
|
64
|
+
"""
|
|
65
|
+
return _calibrate(input_object, sampling, truncation, output_path, output_file, output_format, save_file,
|
|
66
|
+
with_correlation=with_correlation, username=username, password=password)
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
def _calibrate(input_object: Union[list, Path, str], sampling: np.ndarray = None, truncation: bool = False,
|
|
70
|
+
output_path: Union[Path, str] = '.', output_file: str = 'output_spectra', output_format: str = None,
|
|
71
|
+
save_file: bool = True, with_correlation: bool = False, username: str = None, password: str = None,
|
|
72
|
+
bp_model: str = 'v375wi', rp_model: str = 'v142r', disable_info: bool = False) -> \
|
|
73
|
+
(pd.DataFrame, np.ndarray):
|
|
74
|
+
"""
|
|
75
|
+
Internal function of the calibration utility. Refer to "calibrate".
|
|
76
|
+
|
|
77
|
+
Args:
|
|
78
|
+
bp_model (str): The bp model.
|
|
79
|
+
rp_model (str): The rp model.
|
|
80
|
+
|
|
81
|
+
Returns:
|
|
82
|
+
DataFrame: A list of all sampled absolute spectra.
|
|
83
|
+
ndarray: The sampling used to calibrate the spectra.
|
|
84
|
+
|
|
85
|
+
Raises:
|
|
86
|
+
ValueError: If the sampling is out of the expected boundaries.
|
|
87
|
+
"""
|
|
88
|
+
validate_wl_sampling(sampling)
|
|
89
|
+
validate_save_arguments(_calibrate.__defaults__[3], output_file, _calibrate.__defaults__[4], output_format,
|
|
90
|
+
save_file)
|
|
91
|
+
parsed_input_data, extension = InputReader(input_object, _calibrate, truncation=truncation,
|
|
92
|
+
disable_info=disable_info, user=username, password=password).read()
|
|
93
|
+
xp_design_matrices, xp_merge = __generate_xp_matrices_and_merge(__FUNCTION_KEY, sampling, bp_model, rp_model)
|
|
94
|
+
spectra_df, positions = __create_spectra(parsed_input_data, truncation, xp_design_matrices, xp_merge,
|
|
95
|
+
with_correlation=with_correlation, disable_info=disable_info)
|
|
96
|
+
spectra_df = cast_output(spectra_df)
|
|
97
|
+
output_data = SampledSpectraData(spectra_df, positions)
|
|
98
|
+
output_data.save(save_file, output_path, output_file, output_format, extension)
|
|
99
|
+
return spectra_df, positions
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
def __create_merge(xp: str, sampling: np.ndarray) -> np.ndarray:
|
|
103
|
+
"""
|
|
104
|
+
Create the weight information on the input sampling grid.
|
|
105
|
+
|
|
106
|
+
Args:
|
|
107
|
+
xp (str): Band (either 'bp' or 'rp').
|
|
108
|
+
sampling (ndarray): 1D array containing the sampling grid.
|
|
109
|
+
|
|
110
|
+
Returns:
|
|
111
|
+
ndarray: A numpy array containing an array with weights for the given band.
|
|
112
|
+
"""
|
|
113
|
+
xp = parse_band(xp)
|
|
114
|
+
wl_high = BP_WL.high
|
|
115
|
+
wl_low = RP_WL.low
|
|
116
|
+
return np.array([1.0 if wl < wl_low else 0.0 if wl > wl_high else (1.0 - (wl - wl_low) / (wl_high - wl_low)) for
|
|
117
|
+
wl in sampling]) \
|
|
118
|
+
if xp == BANDS.bp else np.array([0.0 if wl < wl_low else 1.0 if wl > wl_high else (wl - wl_low) /
|
|
119
|
+
(wl_high - wl_low)
|
|
120
|
+
for wl in sampling])
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
def __generate_xp_matrices_and_merge(label: str, sampling: np.ndarray, bp_model: str, rp_model: str) -> (dict, dict):
|
|
124
|
+
"""
|
|
125
|
+
Generates the xp_design_matrices and xp_merge from the input parameters.
|
|
126
|
+
|
|
127
|
+
Args:
|
|
128
|
+
label (str): The label for the data.
|
|
129
|
+
sampling (np.ndarray): The given sampling.
|
|
130
|
+
bp_model (str): The bp model.
|
|
131
|
+
rp_model (str): The rp model.
|
|
132
|
+
|
|
133
|
+
Returns:
|
|
134
|
+
tuple: A tuple containing two dictionaries, one for the xp_design_matrices and the other for the xp_merge.
|
|
135
|
+
"""
|
|
136
|
+
|
|
137
|
+
def __get_file_for_xp(xp: str, key: str, _bp_model: str = bp_model, _rp_model: str = rp_model) -> str:
|
|
138
|
+
"""
|
|
139
|
+
Retrieves the file for the specified xp band.
|
|
140
|
+
|
|
141
|
+
Args:
|
|
142
|
+
xp (str): The xp band, either 'bp' or 'rp'.
|
|
143
|
+
key (str): The key for the file in the config file.
|
|
144
|
+
_bp_model (str): The bp model.
|
|
145
|
+
_rp_model (str): The rp model.
|
|
146
|
+
|
|
147
|
+
Returns:
|
|
148
|
+
str: The file path for the specified xp band.
|
|
149
|
+
|
|
150
|
+
Raises:
|
|
151
|
+
ValueError: If the xp band is not 'bp' or 'rp'.
|
|
152
|
+
"""
|
|
153
|
+
xp = parse_band(xp)
|
|
154
|
+
config_parser = ConfigParser()
|
|
155
|
+
config_parser.read(config_ini_file)
|
|
156
|
+
file_name = config_parser.get(label, key)
|
|
157
|
+
model = _bp_model if xp == BANDS.bp else _rp_model
|
|
158
|
+
return join(config_path, f"{file_name.replace('xp', xp).replace('model', model)}")
|
|
159
|
+
|
|
160
|
+
if sampling is None:
|
|
161
|
+
xp_sampling_grid, xp_merge = load_xpmerge_from_xml(bp_model=bp_model)
|
|
162
|
+
xp_design_matrices = load_xpsampling_from_xml(bp_model=bp_model)
|
|
163
|
+
xp_design_matrices = {xp: SampledBasisFunctions.from_design_matrix(xp_sampling_grid, xp_design_matrices[xp])
|
|
164
|
+
for xp in BANDS}
|
|
165
|
+
else:
|
|
166
|
+
xp_merge = {xp: __create_merge(xp, sampling) for xp in BANDS}
|
|
167
|
+
xp_design_matrices = {xp: SampledBasisFunctions.from_external_instrument_model(
|
|
168
|
+
sampling, xp_merge[xp], ExternalInstrumentModel.from_config_csv(
|
|
169
|
+
__get_file_for_xp(xp, 'dispersion'), __get_file_for_xp(xp, 'response'),
|
|
170
|
+
__get_file_for_xp(xp, 'bases'))) for xp in BANDS}
|
|
171
|
+
return xp_design_matrices, xp_merge
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
def __create_spectra(parsed_input_data: pd.DataFrame, truncation: bool, design_matrices: dict,
|
|
175
|
+
merge: dict, with_correlation: bool = False, disable_info: bool = False):
|
|
176
|
+
"""
|
|
177
|
+
Create a DataFrame of absolute sampled spectra for each source in the parsed mean spectra file.
|
|
178
|
+
|
|
179
|
+
Args:
|
|
180
|
+
parsed_input_data (DataFrame): DataFrame containing information for each source in the mean spectra file.
|
|
181
|
+
This includes columns for both bands (although one band could be missing).
|
|
182
|
+
truncation (bool): If True, the set of bases is truncated.
|
|
183
|
+
design_matrices (dict): Dictionary containing 2D arrays of basis functions sampled on the pseudo-wavelength
|
|
184
|
+
grid (either user-defined or default) for both bands.
|
|
185
|
+
merge (dict): Dictionary containing arrays of weights for both bands. These define the contributions from each
|
|
186
|
+
band to the joined absolute spectrum.
|
|
187
|
+
with_correlation (bool, optional): If True, the covariance information is included in the resulting
|
|
188
|
+
AbsoluteSampledSpectrum objects. Defaults to False.
|
|
189
|
+
|
|
190
|
+
Returns:
|
|
191
|
+
tuple:
|
|
192
|
+
spectra_df (DataFrame): DataFrame of absolute sampled spectra, each represented as a dictionary with
|
|
193
|
+
attributes 'data_type' indicating the type of spectra and 'positions' indicating the sample positions.
|
|
194
|
+
positions (ndarray): 1D array of the sample positions.
|
|
195
|
+
"""
|
|
196
|
+
parsed_spectrum_file_dict = parsed_input_data.to_dict('records')
|
|
197
|
+
spectra_series = pd.Series([_create_spectrum(row, truncation, design_matrices, merge,
|
|
198
|
+
with_correlation=with_correlation) for row in tqdm(
|
|
199
|
+
parsed_spectrum_file_dict, desc=pbar_message[__FUNCTION_KEY], unit=pbar_units[__FUNCTION_KEY], leave=False,
|
|
200
|
+
colour=pbar_colour, disable=disable_info, file=stdout)])
|
|
201
|
+
return format_sampled_output(spectra_series, with_correlation=with_correlation)
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
def _create_spectrum(row, truncation, design_matrix, merge, with_correlation=False):
|
|
205
|
+
"""
|
|
206
|
+
Create a single sampled absolute spectrum from the input continuously-represented mean spectrum and design matrix.
|
|
207
|
+
|
|
208
|
+
Args:
|
|
209
|
+
row (DataFrame): Single row in a DataFrame containing the entry for one source in the mean spectra file. This
|
|
210
|
+
will include columns for both bands (although one could be missing).
|
|
211
|
+
truncation (bool): Toggle truncation of the set of bases.
|
|
212
|
+
design_matrix (ndarray): 2D array containing the basis functions sampled on the pseudo-wavelength grid (either
|
|
213
|
+
user-defined or default).
|
|
214
|
+
merge (dict): Dictionary containing an array of weights per BP and one for RP. These have one value per sample
|
|
215
|
+
and define the contributions from BP and RP to the joined absolute spectrum.
|
|
216
|
+
|
|
217
|
+
Returns:
|
|
218
|
+
CalibrationAbsoluteSampledSpectrum: The absolute sampled spectrum with calibration behaviour.
|
|
219
|
+
"""
|
|
220
|
+
source_id = row['source_id']
|
|
221
|
+
continuous_dict = {band: XpContinuousSpectrum(source_id, band, row[f'{band}_coefficients'],
|
|
222
|
+
get_covariance_matrix(row, band), row[f'{band}_standard_deviation'])
|
|
223
|
+
for band in BANDS}
|
|
224
|
+
recommended_truncation = {band: row[f'{band}_n_relevant_bases'] for band in BANDS} if truncation else dict()
|
|
225
|
+
return CalibrationAbsoluteSampledSpectrum(source_id, continuous_dict, design_matrix, merge,
|
|
226
|
+
truncation=recommended_truncation, with_correlation=with_correlation)
|