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.
Files changed (300) hide show
  1. gaiaxpy-2.1.1/MANIFEST.in +4 -0
  2. {GaiaXPy-2.0.1/GaiaXPy.egg-info → gaiaxpy-2.1.1}/PKG-INFO +19 -3
  3. gaiaxpy-2.1.1/pyproject.toml +37 -0
  4. gaiaxpy-2.1.1/setup.py +42 -0
  5. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src/GaiaXPy.egg-info}/PKG-INFO +19 -3
  6. gaiaxpy-2.1.1/src/GaiaXPy.egg-info/SOURCES.txt +173 -0
  7. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/GaiaXPy.egg-info/requires.txt +7 -3
  8. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/GaiaXPy.egg-info/top_level.txt +0 -1
  9. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/__init__.py +2 -1
  10. gaiaxpy-2.1.1/src/gaiaxpy/calibrator/calibrator.py +226 -0
  11. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/calibrator/external_instrument_model.py +20 -43
  12. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/cholesky/cholesky.py +69 -43
  13. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/colour_equation/xp_filter_system_colour_equation.py +114 -42
  14. gaiaxpy-2.1.1/src/gaiaxpy/config/OptimisedCalibratedBases_BpId32_RpId37_withNormalisation.xml +6073 -0
  15. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/config.ini +2 -1
  16. gaiaxpy-2.1.1/src/gaiaxpy/config/correction_tables/DIDREQ-465-HipparcosTycho-correction-factors.csv +18 -0
  17. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_Decam_v375wiv142r.xml +603 -0
  18. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_ElsCustomW09S2_v375wiv142r.xml +951 -0
  19. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_EuclidVis_v375wiv142r.xml +139 -0
  20. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_Gaia2_v375wiv142r.xml +2343 -0
  21. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_GaiaDr3Ab_v375wiv142r.xml +371 -0
  22. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_GaiaDr3Vega_v375wiv142r.xml +371 -0
  23. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_GaiaNominal_v375wiv142r.xml +371 -0
  24. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_HCustom_v375wiv142r.xml +5823 -0
  25. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_HalphaCustomAb_v375wiv142r.xml +1183 -0
  26. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_HalphaCustom_v375wiv142r.xml +1183 -0
  27. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_HipparcosTycho_v375wiv142r.xml +371 -0
  28. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_HstAcswfc_v375wiv142r.xml +1067 -0
  29. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_HstHugsStd_v375wiv142r.xml +371 -0
  30. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_HstWfc3uvis_v375wiv142r.xml +4083 -0
  31. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_HstWfpc2_v375wiv142r.xml +2111 -0
  32. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_IphasCustomW09S2_v375wiv142r.xml +951 -0
  33. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_IphasCustomW09_v375wiv142r.xml +951 -0
  34. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_IphasCustom_v375wiv142r.xml +719 -0
  35. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_Iphas_v375wiv142r.xml +371 -0
  36. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_JkcStd_v375wiv142r.xml +603 -0
  37. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_Jkc_v375wiv142r.xml +603 -0
  38. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_Jpas_v375wiv142r.xml +6983 -0
  39. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_Jplus_v375wiv142r.xml +1415 -0
  40. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_JwstNircam_v375wiv142r.xml +255 -0
  41. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_Lsst_v375wiv142r.xml +719 -0
  42. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_Panstarrs1Std_v375wiv142r.xml +603 -0
  43. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_Panstarrs1_v375wiv142r.xml +603 -0
  44. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_Pristine_v375wiv142r.xml +139 -0
  45. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_SdssStd_v375wiv142r.xml +603 -0
  46. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_Sdss_v375wiv142r.xml +603 -0
  47. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_SkyMapper_v375wiv142r.xml +835 -0
  48. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_SscAb_v375wiv142r.xml +951 -0
  49. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_StromgrenStd_v375wiv142r.xml +371 -0
  50. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_Stromgren_v375wiv142r.xml +487 -0
  51. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_Ucustom_v375wiv142r.xml +1299 -0
  52. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_Wfirst_v375wiv142r.xml +255 -0
  53. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_v211wv142r.xml +38776 -0
  54. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_v375wiv142r.xml +38776 -0
  55. gaiaxpy-2.1.1/src/gaiaxpy/config/fluxCal_20230901_renorm_bspline.xml +167 -0
  56. gaiaxpy-2.1.1/src/gaiaxpy/config/paths.py +13 -0
  57. gaiaxpy-2.1.1/src/gaiaxpy/converter/config.py +255 -0
  58. gaiaxpy-2.1.1/src/gaiaxpy/converter/converter.py +211 -0
  59. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/core/config.py +12 -10
  60. gaiaxpy-2.1.1/src/gaiaxpy/core/custom_errors.py +19 -0
  61. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/core/dispersion_function.py +2 -2
  62. gaiaxpy-2.1.1/src/gaiaxpy/core/generic_functions.py +603 -0
  63. gaiaxpy-2.1.1/src/gaiaxpy/core/generic_variables.py +11 -0
  64. gaiaxpy-2.1.1/src/gaiaxpy/core/input_validator.py +74 -0
  65. gaiaxpy-2.1.1/src/gaiaxpy/core/version.py +1 -0
  66. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/core/xml_utils.py +2 -3
  67. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/error_correction/error_correction.py +65 -64
  68. gaiaxpy-2.1.1/src/gaiaxpy/file_parser/cast.py +76 -0
  69. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/file_parser/parse_external.py +22 -6
  70. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/file_parser/parse_generic.py +47 -50
  71. gaiaxpy-2.1.1/src/gaiaxpy/file_parser/parse_internal_continuous.py +234 -0
  72. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/file_parser/parse_internal_sampled.py +1 -1
  73. gaiaxpy-2.1.1/src/gaiaxpy/file_parser/parse_inverse.py +26 -0
  74. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/file_parser/utils.py +3 -1
  75. gaiaxpy-2.1.1/src/gaiaxpy/generator/config.py +175 -0
  76. gaiaxpy-2.1.1/src/gaiaxpy/generator/generator.py +121 -0
  77. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/generator/internal_photometric_system.py +22 -11
  78. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/generator/multi_synthetic_photometry_generator.py +19 -14
  79. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/generator/photometric_system.py +6 -2
  80. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/generator/synthetic_photometry_generator.py +12 -18
  81. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/generator/utils.py +8 -0
  82. gaiaxpy-2.1.1/src/gaiaxpy/input_reader/archive_reader.py +35 -0
  83. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/input_reader/dataframe_numpy_array_reader.py +2 -2
  84. gaiaxpy-2.1.1/src/gaiaxpy/input_reader/dataframe_reader.py +97 -0
  85. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/input_reader/dataframe_string_array_reader.py +3 -4
  86. gaiaxpy-2.1.1/src/gaiaxpy/input_reader/file_reader.py +96 -0
  87. gaiaxpy-2.1.1/src/gaiaxpy/input_reader/hdfs_reader.py +56 -0
  88. gaiaxpy-2.1.1/src/gaiaxpy/input_reader/input_reader.py +63 -0
  89. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/input_reader/list_reader.py +17 -4
  90. gaiaxpy-2.1.1/src/gaiaxpy/input_reader/local_file_reader.py +8 -0
  91. gaiaxpy-2.1.1/src/gaiaxpy/input_reader/query_reader.py +72 -0
  92. gaiaxpy-2.1.1/src/gaiaxpy/input_reader/required_columns.py +38 -0
  93. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/output/continuous_spectra_data.py +48 -42
  94. gaiaxpy-2.1.1/src/gaiaxpy/output/ecsv_headers/headers_dict.txt +44 -0
  95. gaiaxpy-2.1.1/src/gaiaxpy/output/output_data.py +92 -0
  96. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/output/photometry_data.py +10 -9
  97. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/output/sampled_spectra_data.py +96 -78
  98. gaiaxpy-2.1.1/src/gaiaxpy/output/utils.py +157 -0
  99. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/plotter/multi_absolute.py +10 -9
  100. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/plotter/multi_xp.py +8 -8
  101. gaiaxpy-2.1.1/src/gaiaxpy/plotter/plot_spectra.py +62 -0
  102. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/plotter/plotter.py +20 -7
  103. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/plotter/single.py +12 -12
  104. gaiaxpy-2.1.1/src/gaiaxpy/spectrum/absolute_sampled_spectrum.py +124 -0
  105. gaiaxpy-2.1.1/src/gaiaxpy/spectrum/calibration_absolute_sampled_spectrum.py +47 -0
  106. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/spectrum/generic_spectrum.py +3 -3
  107. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/spectrum/multi_synthetic_photometry.py +2 -2
  108. gaiaxpy-2.1.1/src/gaiaxpy/spectrum/photometric_absolute_sampled_spectrum.py +35 -0
  109. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/spectrum/sampled_basis_functions.py +73 -56
  110. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/spectrum/sampled_spectrum.py +53 -27
  111. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/spectrum/single_synthetic_photometry.py +34 -28
  112. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/spectrum/utils.py +29 -18
  113. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/spectrum/xp_continuous_spectrum.py +13 -12
  114. gaiaxpy-2.1.1/src/gaiaxpy/spectrum/xp_sampled_spectrum.py +147 -0
  115. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/spectrum/xp_spectrum.py +1 -1
  116. GaiaXPy-2.0.1/GaiaXPy.egg-info/SOURCES.txt +0 -223
  117. GaiaXPy-2.0.1/MANIFEST.in +0 -5
  118. GaiaXPy-2.0.1/gaiaxpy/calibrator/calibrator.py +0 -199
  119. GaiaXPy-2.0.1/gaiaxpy/config/OptimisedCalibratedBases_BpId32_RpId37_withNormalisation.xml +0 -133
  120. GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_Decam_v375wiv142r.xml +0 -1
  121. GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_ElsCustomW09S2_v375wiv142r.xml +0 -1
  122. GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_EuclidVis_v375wiv142r.xml +0 -1
  123. GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_Gaia2_v375wiv142r.xml +0 -1
  124. GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_GaiaDr3Ab_v375wiv142r.xml +0 -1
  125. GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_GaiaDr3Vega_v375wiv142r.xml +0 -1
  126. GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_GaiaNominal_v375wiv142r.xml +0 -1
  127. GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_HCustom_v375wiv142r.xml +0 -1
  128. GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_HalphaCustomAb_v375wiv142r.xml +0 -1
  129. GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_HalphaCustom_v375wiv142r.xml +0 -1
  130. GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_HipparcosTycho_v375wiv142r.xml +0 -1
  131. GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_HstAcswfc_v375wiv142r.xml +0 -1
  132. GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_HstHugsStd_v375wiv142r.xml +0 -1
  133. GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_HstWfc3uvis_v375wiv142r.xml +0 -1
  134. GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_HstWfpc2_v375wiv142r.xml +0 -1
  135. GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_IphasCustomW09S2_v375wiv142r.xml +0 -1
  136. GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_IphasCustomW09_v375wiv142r.xml +0 -1
  137. GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_IphasCustom_v375wiv142r.xml +0 -1
  138. GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_Iphas_v375wiv142r.xml +0 -1
  139. GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_JkcStd_v375wiv142r.xml +0 -1
  140. GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_Jkc_v375wiv142r.xml +0 -1
  141. GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_Jpas_v375wiv142r.xml +0 -1
  142. GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_Jplus_v375wiv142r.xml +0 -1
  143. GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_JwstNircam_v375wiv142r.xml +0 -1
  144. GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_Lsst_v375wiv142r.xml +0 -1
  145. GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_Panstarrs1Std_v375wiv142r.xml +0 -1
  146. GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_Panstarrs1_v375wiv142r.xml +0 -1
  147. GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_Pristine_v375wiv142r.xml +0 -1
  148. GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_SdssStd_v375wiv142r.xml +0 -1
  149. GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_Sdss_v375wiv142r.xml +0 -1
  150. GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_SkyMapper_v375wiv142r.xml +0 -1
  151. GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_SscAb_v375wiv142r.xml +0 -1
  152. GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_StromgrenStd_v375wiv142r.xml +0 -1
  153. GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_Stromgren_v375wiv142r.xml +0 -1
  154. GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_Ucustom_v375wiv142r.xml +0 -1
  155. GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_Wfirst_v375wiv142r.xml +0 -1
  156. GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_v211wv142r.xml +0 -1
  157. GaiaXPy-2.0.1/gaiaxpy/config/filters/XpFilter_v375wiv142r.xml +0 -1
  158. GaiaXPy-2.0.1/gaiaxpy/config/paths.py +0 -4
  159. GaiaXPy-2.0.1/gaiaxpy/converter/config.py +0 -79
  160. GaiaXPy-2.0.1/gaiaxpy/converter/converter.py +0 -171
  161. GaiaXPy-2.0.1/gaiaxpy/core/generic_functions.py +0 -209
  162. GaiaXPy-2.0.1/gaiaxpy/core/generic_variables.py +0 -2
  163. GaiaXPy-2.0.1/gaiaxpy/core/version.py +0 -1
  164. GaiaXPy-2.0.1/gaiaxpy/file_parser/cast.py +0 -64
  165. GaiaXPy-2.0.1/gaiaxpy/file_parser/parse_internal_continuous.py +0 -155
  166. GaiaXPy-2.0.1/gaiaxpy/generator/config.py +0 -96
  167. GaiaXPy-2.0.1/gaiaxpy/generator/generator.py +0 -77
  168. GaiaXPy-2.0.1/gaiaxpy/input_reader/archive_reader.py +0 -14
  169. GaiaXPy-2.0.1/gaiaxpy/input_reader/dataframe_reader.py +0 -60
  170. GaiaXPy-2.0.1/gaiaxpy/input_reader/file_reader.py +0 -34
  171. GaiaXPy-2.0.1/gaiaxpy/input_reader/input_reader.py +0 -60
  172. GaiaXPy-2.0.1/gaiaxpy/input_reader/query_reader.py +0 -35
  173. GaiaXPy-2.0.1/gaiaxpy/output/ecsv_headers/headers_dict.txt +0 -21
  174. GaiaXPy-2.0.1/gaiaxpy/output/output_data.py +0 -136
  175. GaiaXPy-2.0.1/gaiaxpy/output/utils.py +0 -28
  176. GaiaXPy-2.0.1/gaiaxpy/plotter/plot_spectra.py +0 -43
  177. GaiaXPy-2.0.1/gaiaxpy/spectrum/absolute_sampled_spectrum.py +0 -137
  178. GaiaXPy-2.0.1/gaiaxpy/spectrum/xp_sampled_spectrum.py +0 -118
  179. GaiaXPy-2.0.1/requirements.txt +0 -11
  180. GaiaXPy-2.0.1/setup.py +0 -47
  181. GaiaXPy-2.0.1/tests/__init__.py +0 -0
  182. GaiaXPy-2.0.1/tests/files/__init__.py +0 -0
  183. GaiaXPy-2.0.1/tests/files/paths.py +0 -3
  184. GaiaXPy-2.0.1/tests/test_calibrator/__init__.py +0 -0
  185. GaiaXPy-2.0.1/tests/test_calibrator/test_calibrator.py +0 -287
  186. GaiaXPy-2.0.1/tests/test_calibrator/test_calibrator_missing_bp.py +0 -106
  187. GaiaXPy-2.0.1/tests/test_calibrator/test_external_instrument_model.py +0 -75
  188. GaiaXPy-2.0.1/tests/test_calibrator/test_truncation.py +0 -76
  189. GaiaXPy-2.0.1/tests/test_cholesky/__init__.py +0 -0
  190. GaiaXPy-2.0.1/tests/test_cholesky/test_cholesky.py +0 -236
  191. GaiaXPy-2.0.1/tests/test_cholesky/test_cholesky_missing_bp.py +0 -67
  192. GaiaXPy-2.0.1/tests/test_colour_equation/__init__.py +0 -0
  193. GaiaXPy-2.0.1/tests/test_colour_equation/test_xp_filter_system_colour_equation.py +0 -218
  194. GaiaXPy-2.0.1/tests/test_converter/__init__.py +0 -0
  195. GaiaXPy-2.0.1/tests/test_converter/test_config.py +0 -65
  196. GaiaXPy-2.0.1/tests/test_converter/test_converter_avro.py +0 -138
  197. GaiaXPy-2.0.1/tests/test_converter/test_converter_csv.py +0 -160
  198. GaiaXPy-2.0.1/tests/test_converter/test_converter_fits.py +0 -162
  199. GaiaXPy-2.0.1/tests/test_converter/test_converter_missing_bp.py +0 -107
  200. GaiaXPy-2.0.1/tests/test_converter/test_converter_xml.py +0 -159
  201. GaiaXPy-2.0.1/tests/test_converter/test_converter_xml_plain.py +0 -160
  202. GaiaXPy-2.0.1/tests/test_core/__init__.py +0 -0
  203. GaiaXPy-2.0.1/tests/test_core/test_config.py +0 -53
  204. GaiaXPy-2.0.1/tests/test_core/test_constants.py +0 -25
  205. GaiaXPy-2.0.1/tests/test_core/test_dispersion_function.py +0 -21
  206. GaiaXPy-2.0.1/tests/test_core/test_generic_functions.py +0 -102
  207. GaiaXPy-2.0.1/tests/test_error_correction/__init__.py +0 -0
  208. GaiaXPy-2.0.1/tests/test_error_correction/test_error_correction.py +0 -72
  209. GaiaXPy-2.0.1/tests/test_file_parser/__init__.py +0 -0
  210. GaiaXPy-2.0.1/tests/test_file_parser/test_parse_external.py +0 -37
  211. GaiaXPy-2.0.1/tests/test_file_parser/test_parse_generic.py +0 -55
  212. GaiaXPy-2.0.1/tests/test_file_parser/test_parse_internal_continuous.py +0 -340
  213. GaiaXPy-2.0.1/tests/test_file_parser/test_parse_internal_sampled.py +0 -49
  214. GaiaXPy-2.0.1/tests/test_generator/__init__.py +0 -0
  215. GaiaXPy-2.0.1/tests/test_generator/test_config.py +0 -50
  216. GaiaXPy-2.0.1/tests/test_generator/test_generator.py +0 -82
  217. GaiaXPy-2.0.1/tests/test_generator/test_generator_missing_bp.py +0 -80
  218. GaiaXPy-2.0.1/tests/test_generator/test_internal_photometric_system.py +0 -40
  219. GaiaXPy-2.0.1/tests/test_generator/test_multi_synthetic_photometry_generator.py +0 -71
  220. GaiaXPy-2.0.1/tests/test_generator/test_photometric_system.py +0 -111
  221. GaiaXPy-2.0.1/tests/test_generator/test_single_synthetic_photometry_generator.py +0 -111
  222. GaiaXPy-2.0.1/tests/test_generator/test_synthetic_photometry_generator.py +0 -142
  223. GaiaXPy-2.0.1/tests/test_input_reader/__init__.py +0 -0
  224. GaiaXPy-2.0.1/tests/test_input_reader/test_input_reader.py +0 -41
  225. GaiaXPy-2.0.1/tests/test_input_reader/test_input_reader_missing_bp.py +0 -73
  226. GaiaXPy-2.0.1/tests/test_output/__init__.py +0 -0
  227. GaiaXPy-2.0.1/tests/test_output/test_save_cont_raw.py +0 -114
  228. GaiaXPy-2.0.1/tests/test_plotter/__init__.py +0 -0
  229. GaiaXPy-2.0.1/tests/test_plotter/test_multi_absolute.py +0 -35
  230. GaiaXPy-2.0.1/tests/test_plotter/test_multi_xp.py +0 -26
  231. GaiaXPy-2.0.1/tests/test_plotter/test_single.py +0 -40
  232. GaiaXPy-2.0.1/tests/test_spectrum/__init__.py +0 -0
  233. GaiaXPy-2.0.1/tests/test_spectrum/test_absolute_sampled_spectrum.py +0 -64
  234. GaiaXPy-2.0.1/tests/test_spectrum/test_generic_spectrum.py +0 -12
  235. GaiaXPy-2.0.1/tests/test_spectrum/test_utils.py +0 -57
  236. GaiaXPy-2.0.1/tests/test_spectrum/test_xp_continuous_spectrum.py +0 -62
  237. GaiaXPy-2.0.1/tests/test_spectrum/test_xp_sampled_spectrum.py +0 -71
  238. GaiaXPy-2.0.1/tests/test_spectrum/test_xp_spectrum.py +0 -12
  239. GaiaXPy-2.0.1/tests/utils/__init__.py +0 -0
  240. GaiaXPy-2.0.1/tests/utils/utils.py +0 -35
  241. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1}/LICENCE +0 -0
  242. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1}/README.md +0 -0
  243. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1}/setup.cfg +0 -0
  244. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/GaiaXPy.egg-info/dependency_links.txt +0 -0
  245. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/calibrator/__init__.py +0 -0
  246. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/cholesky/__init__.py +0 -0
  247. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/colour_equation/__init__.py +0 -0
  248. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/TabulatedDispersionFunction-DR3-v375wiv142r_20200610.csv +0 -0
  249. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/__init__.py +0 -0
  250. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/available_systems.txt +0 -0
  251. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/bpC03_v211w_bases.csv +0 -0
  252. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/bpC03_v211w_dispersion.csv +0 -0
  253. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/bpC03_v211w_response.csv +0 -0
  254. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/bpC03_v375wi_bases.csv +0 -0
  255. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/bpC03_v375wi_dispersion.csv +0 -0
  256. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/bpC03_v375wi_response.csv +0 -0
  257. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/colour_eq_files/JkcStd_colour_eq.ini +0 -0
  258. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/colour_eq_files/SdssStd_colour_eq.ini +0 -0
  259. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-ElsCustomW09S2-correction-factors.csv +0 -0
  260. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-EuclidVis-correction-factors.csv +0 -0
  261. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-Gaia2-correction-factors.csv +0 -0
  262. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-GaiaDr3Vega-correction-factors.csv +0 -0
  263. /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
  264. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-HstAcswfc-correction-factors.csv +0 -0
  265. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-HstHugsStd-correction-factors.csv +0 -0
  266. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-HstWfc3uvis-correction-factors.csv +0 -0
  267. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-HstWfpc2-correction-factors.csv +0 -0
  268. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-Iphas-correction-factors.csv +0 -0
  269. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-Jkc-correction-factors.csv +0 -0
  270. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-JkcStd-correction-factors.csv +0 -0
  271. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-Jpas-correction-factors.csv +0 -0
  272. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-Jplus-correction-factors.csv +0 -0
  273. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-JwstNircam-correction-factors.csv +0 -0
  274. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-Panstarrs1-correction-factors.csv +0 -0
  275. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-Panstarrs1Std-correction-factors.csv +0 -0
  276. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-Pristine-correction-factors.csv +0 -0
  277. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-Sdss-correction-factors.csv +0 -0
  278. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-SdssStd-correction-factors.csv +0 -0
  279. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-SkyMapper-correction-factors.csv +0 -0
  280. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-Stromgren-correction-factors.csv +0 -0
  281. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-StromgrenStd-correction-factors.csv +0 -0
  282. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-Wfirst-correction-factors.csv +0 -0
  283. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/rpC03_v142r_bases.csv +0 -0
  284. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/rpC03_v142r_dispersion.csv +0 -0
  285. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/config/rpC03_v142r_response.csv +0 -0
  286. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/converter/__init__.py +0 -0
  287. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/core/__init__.py +0 -0
  288. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/core/nature.py +0 -0
  289. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/core/satellite.py +0 -0
  290. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/core/server.py +0 -0
  291. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/error_correction/__init__.py +0 -0
  292. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/file_parser/__init__.py +0 -0
  293. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/generator/__init__.py +0 -0
  294. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/generator/regular_photometric_system.py +0 -0
  295. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/generator/standardised_photometric_system.py +0 -0
  296. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/input_reader/__init__.py +0 -0
  297. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/output/__init__.py +0 -0
  298. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/plotter/__init__.py +0 -0
  299. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/spectrum/__init__.py +0 -0
  300. {GaiaXPy-2.0.1 → gaiaxpy-2.1.1/src}/gaiaxpy/spectrum/spectral_energy_distribution.py +0 -0
@@ -0,0 +1,4 @@
1
+ include LICENCE
2
+ include pyproject.toml
3
+ graft src/gaiaxpy
4
+ global-exclude __pycache__
@@ -1,18 +1,34 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: GaiaXPy
3
- Version: 2.0.1
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.6
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.0.1
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.6
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
@@ -2,10 +2,14 @@ aenum
2
2
  astropy
3
3
  astroquery
4
4
  fastavro
5
+ hdfs
5
6
  matplotlib
6
- numpy
7
+ numpy>1.23
7
8
  packaging
8
- pandas>=1.0.0
9
- PyQt5
9
+ pandas>=1.5.0
10
10
  scipy
11
11
  tqdm>=4.64.0
12
+
13
+ [tests]
14
+ pytest
15
+ pytest-mock
@@ -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)