GaiaXPy 2.1.0__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 (296) hide show
  1. gaiaxpy-2.1.1/MANIFEST.in +4 -0
  2. {GaiaXPy-2.1.0/GaiaXPy.egg-info → gaiaxpy-2.1.1}/PKG-INFO +18 -2
  3. gaiaxpy-2.1.1/pyproject.toml +37 -0
  4. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1}/setup.py +10 -30
  5. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src/GaiaXPy.egg-info}/PKG-INFO +18 -2
  6. gaiaxpy-2.1.1/src/GaiaXPy.egg-info/SOURCES.txt +173 -0
  7. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/GaiaXPy.egg-info/requires.txt +7 -2
  8. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/GaiaXPy.egg-info/top_level.txt +0 -1
  9. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/__init__.py +2 -1
  10. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/calibrator/calibrator.py +18 -21
  11. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/calibrator/external_instrument_model.py +5 -5
  12. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/cholesky/cholesky.py +5 -6
  13. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/colour_equation/xp_filter_system_colour_equation.py +12 -8
  14. gaiaxpy-2.1.1/src/gaiaxpy/config/OptimisedCalibratedBases_BpId32_RpId37_withNormalisation.xml +6073 -0
  15. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/config/config.ini +2 -1
  16. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_Decam_v375wiv142r.xml +603 -0
  17. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_ElsCustomW09S2_v375wiv142r.xml +951 -0
  18. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_EuclidVis_v375wiv142r.xml +139 -0
  19. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_Gaia2_v375wiv142r.xml +2343 -0
  20. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_GaiaDr3Ab_v375wiv142r.xml +371 -0
  21. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_GaiaDr3Vega_v375wiv142r.xml +371 -0
  22. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_GaiaNominal_v375wiv142r.xml +371 -0
  23. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_HCustom_v375wiv142r.xml +5823 -0
  24. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_HalphaCustomAb_v375wiv142r.xml +1183 -0
  25. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_HalphaCustom_v375wiv142r.xml +1183 -0
  26. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_HipparcosTycho_v375wiv142r.xml +371 -0
  27. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_HstAcswfc_v375wiv142r.xml +1067 -0
  28. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_HstHugsStd_v375wiv142r.xml +371 -0
  29. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_HstWfc3uvis_v375wiv142r.xml +4083 -0
  30. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_HstWfpc2_v375wiv142r.xml +2111 -0
  31. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_IphasCustomW09S2_v375wiv142r.xml +951 -0
  32. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_IphasCustomW09_v375wiv142r.xml +951 -0
  33. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_IphasCustom_v375wiv142r.xml +719 -0
  34. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_Iphas_v375wiv142r.xml +371 -0
  35. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_JkcStd_v375wiv142r.xml +603 -0
  36. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_Jkc_v375wiv142r.xml +603 -0
  37. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_Jpas_v375wiv142r.xml +6983 -0
  38. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_Jplus_v375wiv142r.xml +1415 -0
  39. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_JwstNircam_v375wiv142r.xml +255 -0
  40. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_Lsst_v375wiv142r.xml +719 -0
  41. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_Panstarrs1Std_v375wiv142r.xml +603 -0
  42. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_Panstarrs1_v375wiv142r.xml +603 -0
  43. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_Pristine_v375wiv142r.xml +139 -0
  44. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_SdssStd_v375wiv142r.xml +603 -0
  45. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_Sdss_v375wiv142r.xml +603 -0
  46. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_SkyMapper_v375wiv142r.xml +835 -0
  47. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_SscAb_v375wiv142r.xml +951 -0
  48. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_StromgrenStd_v375wiv142r.xml +371 -0
  49. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_Stromgren_v375wiv142r.xml +487 -0
  50. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_Ucustom_v375wiv142r.xml +1299 -0
  51. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_Wfirst_v375wiv142r.xml +255 -0
  52. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_v211wv142r.xml +38776 -0
  53. gaiaxpy-2.1.1/src/gaiaxpy/config/filters/XpFilter_v375wiv142r.xml +38776 -0
  54. gaiaxpy-2.1.1/src/gaiaxpy/config/fluxCal_20230901_renorm_bspline.xml +167 -0
  55. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/config/paths.py +3 -2
  56. gaiaxpy-2.1.1/src/gaiaxpy/converter/config.py +255 -0
  57. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/converter/converter.py +31 -34
  58. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/core/config.py +5 -3
  59. gaiaxpy-2.1.1/src/gaiaxpy/core/custom_errors.py +19 -0
  60. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/core/dispersion_function.py +1 -0
  61. gaiaxpy-2.1.1/src/gaiaxpy/core/generic_functions.py +603 -0
  62. gaiaxpy-2.1.1/src/gaiaxpy/core/generic_variables.py +11 -0
  63. gaiaxpy-2.1.1/src/gaiaxpy/core/input_validator.py +74 -0
  64. gaiaxpy-2.1.1/src/gaiaxpy/core/version.py +1 -0
  65. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/core/xml_utils.py +0 -1
  66. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/error_correction/error_correction.py +13 -12
  67. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/file_parser/cast.py +15 -15
  68. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/file_parser/parse_external.py +9 -1
  69. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/file_parser/parse_generic.py +13 -6
  70. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/file_parser/parse_internal_continuous.py +83 -23
  71. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/file_parser/parse_internal_sampled.py +0 -1
  72. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/file_parser/parse_inverse.py +0 -1
  73. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/file_parser/utils.py +1 -1
  74. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/generator/config.py +4 -2
  75. gaiaxpy-2.1.1/src/gaiaxpy/generator/generator.py +121 -0
  76. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/generator/internal_photometric_system.py +17 -6
  77. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/generator/multi_synthetic_photometry_generator.py +11 -8
  78. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/generator/photometric_system.py +4 -1
  79. gaiaxpy-2.1.1/src/gaiaxpy/input_reader/archive_reader.py +35 -0
  80. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/input_reader/dataframe_numpy_array_reader.py +1 -1
  81. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/input_reader/dataframe_reader.py +42 -7
  82. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/input_reader/dataframe_string_array_reader.py +1 -1
  83. gaiaxpy-2.1.1/src/gaiaxpy/input_reader/file_reader.py +96 -0
  84. gaiaxpy-2.1.1/src/gaiaxpy/input_reader/hdfs_reader.py +56 -0
  85. gaiaxpy-2.1.1/src/gaiaxpy/input_reader/input_reader.py +63 -0
  86. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/input_reader/list_reader.py +15 -6
  87. gaiaxpy-2.1.1/src/gaiaxpy/input_reader/local_file_reader.py +8 -0
  88. gaiaxpy-2.1.1/src/gaiaxpy/input_reader/query_reader.py +72 -0
  89. gaiaxpy-2.1.1/src/gaiaxpy/input_reader/required_columns.py +38 -0
  90. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/output/ecsv_headers/headers_dict.txt +1 -9
  91. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/output/output_data.py +9 -40
  92. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/output/sampled_spectra_data.py +39 -29
  93. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/output/utils.py +30 -9
  94. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/plotter/plot_spectra.py +1 -1
  95. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/plotter/single.py +4 -1
  96. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/spectrum/absolute_sampled_spectrum.py +22 -50
  97. gaiaxpy-2.1.1/src/gaiaxpy/spectrum/calibration_absolute_sampled_spectrum.py +47 -0
  98. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/spectrum/generic_spectrum.py +2 -1
  99. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/spectrum/multi_synthetic_photometry.py +2 -2
  100. gaiaxpy-2.1.1/src/gaiaxpy/spectrum/photometric_absolute_sampled_spectrum.py +35 -0
  101. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/spectrum/sampled_basis_functions.py +60 -41
  102. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/spectrum/sampled_spectrum.py +10 -3
  103. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/spectrum/single_synthetic_photometry.py +27 -26
  104. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/spectrum/utils.py +8 -5
  105. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/spectrum/xp_continuous_spectrum.py +1 -4
  106. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/spectrum/xp_sampled_spectrum.py +42 -39
  107. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/spectrum/xp_spectrum.py +1 -1
  108. GaiaXPy-2.1.0/GaiaXPy.egg-info/SOURCES.txt +0 -235
  109. GaiaXPy-2.1.0/MANIFEST.in +0 -5
  110. GaiaXPy-2.1.0/gaiaxpy/config/OptimisedCalibratedBases_BpId32_RpId37_withNormalisation.xml +0 -133
  111. GaiaXPy-2.1.0/gaiaxpy/config/filters/XpFilter_Decam_v375wiv142r.xml +0 -1
  112. GaiaXPy-2.1.0/gaiaxpy/config/filters/XpFilter_ElsCustomW09S2_v375wiv142r.xml +0 -1
  113. GaiaXPy-2.1.0/gaiaxpy/config/filters/XpFilter_EuclidVis_v375wiv142r.xml +0 -1
  114. GaiaXPy-2.1.0/gaiaxpy/config/filters/XpFilter_Gaia2_v375wiv142r.xml +0 -1
  115. GaiaXPy-2.1.0/gaiaxpy/config/filters/XpFilter_GaiaDr3Ab_v375wiv142r.xml +0 -1
  116. GaiaXPy-2.1.0/gaiaxpy/config/filters/XpFilter_GaiaDr3Vega_v375wiv142r.xml +0 -1
  117. GaiaXPy-2.1.0/gaiaxpy/config/filters/XpFilter_GaiaNominal_v375wiv142r.xml +0 -1
  118. GaiaXPy-2.1.0/gaiaxpy/config/filters/XpFilter_HCustom_v375wiv142r.xml +0 -1
  119. GaiaXPy-2.1.0/gaiaxpy/config/filters/XpFilter_HalphaCustomAb_v375wiv142r.xml +0 -1
  120. GaiaXPy-2.1.0/gaiaxpy/config/filters/XpFilter_HalphaCustom_v375wiv142r.xml +0 -1
  121. GaiaXPy-2.1.0/gaiaxpy/config/filters/XpFilter_HipparcosTycho_v375wiv142r.xml +0 -1
  122. GaiaXPy-2.1.0/gaiaxpy/config/filters/XpFilter_HstAcswfc_v375wiv142r.xml +0 -1
  123. GaiaXPy-2.1.0/gaiaxpy/config/filters/XpFilter_HstHugsStd_v375wiv142r.xml +0 -1
  124. GaiaXPy-2.1.0/gaiaxpy/config/filters/XpFilter_HstWfc3uvis_v375wiv142r.xml +0 -1
  125. GaiaXPy-2.1.0/gaiaxpy/config/filters/XpFilter_HstWfpc2_v375wiv142r.xml +0 -1
  126. GaiaXPy-2.1.0/gaiaxpy/config/filters/XpFilter_IphasCustomW09S2_v375wiv142r.xml +0 -1
  127. GaiaXPy-2.1.0/gaiaxpy/config/filters/XpFilter_IphasCustomW09_v375wiv142r.xml +0 -1
  128. GaiaXPy-2.1.0/gaiaxpy/config/filters/XpFilter_IphasCustom_v375wiv142r.xml +0 -1
  129. GaiaXPy-2.1.0/gaiaxpy/config/filters/XpFilter_Iphas_v375wiv142r.xml +0 -1
  130. GaiaXPy-2.1.0/gaiaxpy/config/filters/XpFilter_JkcStd_v375wiv142r.xml +0 -1
  131. GaiaXPy-2.1.0/gaiaxpy/config/filters/XpFilter_Jkc_v375wiv142r.xml +0 -1
  132. GaiaXPy-2.1.0/gaiaxpy/config/filters/XpFilter_Jpas_v375wiv142r.xml +0 -1
  133. GaiaXPy-2.1.0/gaiaxpy/config/filters/XpFilter_Jplus_v375wiv142r.xml +0 -1
  134. GaiaXPy-2.1.0/gaiaxpy/config/filters/XpFilter_JwstNircam_v375wiv142r.xml +0 -1
  135. GaiaXPy-2.1.0/gaiaxpy/config/filters/XpFilter_Lsst_v375wiv142r.xml +0 -1
  136. GaiaXPy-2.1.0/gaiaxpy/config/filters/XpFilter_Panstarrs1Std_v375wiv142r.xml +0 -1
  137. GaiaXPy-2.1.0/gaiaxpy/config/filters/XpFilter_Panstarrs1_v375wiv142r.xml +0 -1
  138. GaiaXPy-2.1.0/gaiaxpy/config/filters/XpFilter_Pristine_v375wiv142r.xml +0 -1
  139. GaiaXPy-2.1.0/gaiaxpy/config/filters/XpFilter_SdssStd_v375wiv142r.xml +0 -1
  140. GaiaXPy-2.1.0/gaiaxpy/config/filters/XpFilter_Sdss_v375wiv142r.xml +0 -1
  141. GaiaXPy-2.1.0/gaiaxpy/config/filters/XpFilter_SkyMapper_v375wiv142r.xml +0 -1
  142. GaiaXPy-2.1.0/gaiaxpy/config/filters/XpFilter_SscAb_v375wiv142r.xml +0 -1
  143. GaiaXPy-2.1.0/gaiaxpy/config/filters/XpFilter_StromgrenStd_v375wiv142r.xml +0 -1
  144. GaiaXPy-2.1.0/gaiaxpy/config/filters/XpFilter_Stromgren_v375wiv142r.xml +0 -1
  145. GaiaXPy-2.1.0/gaiaxpy/config/filters/XpFilter_Ucustom_v375wiv142r.xml +0 -1
  146. GaiaXPy-2.1.0/gaiaxpy/config/filters/XpFilter_Wfirst_v375wiv142r.xml +0 -1
  147. GaiaXPy-2.1.0/gaiaxpy/config/filters/XpFilter_v211wv142r.xml +0 -1
  148. GaiaXPy-2.1.0/gaiaxpy/config/filters/XpFilter_v375wiv142r.xml +0 -1
  149. GaiaXPy-2.1.0/gaiaxpy/converter/config.py +0 -124
  150. GaiaXPy-2.1.0/gaiaxpy/core/custom_errors.py +0 -5
  151. GaiaXPy-2.1.0/gaiaxpy/core/generic_functions.py +0 -296
  152. GaiaXPy-2.1.0/gaiaxpy/core/generic_variables.py +0 -10
  153. GaiaXPy-2.1.0/gaiaxpy/core/version.py +0 -1
  154. GaiaXPy-2.1.0/gaiaxpy/generator/generator.py +0 -92
  155. GaiaXPy-2.1.0/gaiaxpy/input_reader/archive_reader.py +0 -15
  156. GaiaXPy-2.1.0/gaiaxpy/input_reader/file_reader.py +0 -36
  157. GaiaXPy-2.1.0/gaiaxpy/input_reader/input_reader.py +0 -61
  158. GaiaXPy-2.1.0/gaiaxpy/input_reader/query_reader.py +0 -36
  159. GaiaXPy-2.1.0/tests/__init__.py +0 -0
  160. GaiaXPy-2.1.0/tests/files/__init__.py +0 -0
  161. GaiaXPy-2.1.0/tests/files/paths.py +0 -146
  162. GaiaXPy-2.1.0/tests/test_calibrator/__init__.py +0 -0
  163. GaiaXPy-2.1.0/tests/test_calibrator/calibrator_solutions.py +0 -46
  164. GaiaXPy-2.1.0/tests/test_calibrator/test_calibrator.py +0 -96
  165. GaiaXPy-2.1.0/tests/test_calibrator/test_calibrator_archive.py +0 -58
  166. GaiaXPy-2.1.0/tests/test_calibrator/test_calibrator_missing_bp.py +0 -83
  167. GaiaXPy-2.1.0/tests/test_calibrator/test_calibrator_with_covariance.py +0 -51
  168. GaiaXPy-2.1.0/tests/test_calibrator/test_config.py +0 -42
  169. GaiaXPy-2.1.0/tests/test_calibrator/test_external_instrument_model.py +0 -64
  170. GaiaXPy-2.1.0/tests/test_calibrator/test_truncation.py +0 -55
  171. GaiaXPy-2.1.0/tests/test_cholesky/__init__.py +0 -0
  172. GaiaXPy-2.1.0/tests/test_cholesky/cholesky_solutions.py +0 -42
  173. GaiaXPy-2.1.0/tests/test_cholesky/test_cholesky.py +0 -142
  174. GaiaXPy-2.1.0/tests/test_cholesky/test_cholesky_archive.py +0 -37
  175. GaiaXPy-2.1.0/tests/test_cholesky/test_cholesky_missing_bp.py +0 -50
  176. GaiaXPy-2.1.0/tests/test_colour_equation/__init__.py +0 -0
  177. GaiaXPy-2.1.0/tests/test_colour_equation/colour_equation_paths.py +0 -11
  178. GaiaXPy-2.1.0/tests/test_colour_equation/test_xp_filter_system_colour_equation.py +0 -203
  179. GaiaXPy-2.1.0/tests/test_converter/__init__.py +0 -0
  180. GaiaXPy-2.1.0/tests/test_converter/converter_paths.py +0 -38
  181. GaiaXPy-2.1.0/tests/test_converter/test_config.py +0 -51
  182. GaiaXPy-2.1.0/tests/test_converter/test_converter.py +0 -137
  183. GaiaXPy-2.1.0/tests/test_converter/test_converter_archive.py +0 -47
  184. GaiaXPy-2.1.0/tests/test_converter/test_converter_missing_bp.py +0 -75
  185. GaiaXPy-2.1.0/tests/test_converter/test_converter_with_covariance.py +0 -22
  186. GaiaXPy-2.1.0/tests/test_core/__init__.py +0 -0
  187. GaiaXPy-2.1.0/tests/test_core/test_config.py +0 -48
  188. GaiaXPy-2.1.0/tests/test_core/test_constants.py +0 -25
  189. GaiaXPy-2.1.0/tests/test_core/test_dispersion_function.py +0 -21
  190. GaiaXPy-2.1.0/tests/test_core/test_generic_functions.py +0 -105
  191. GaiaXPy-2.1.0/tests/test_error_correction/__init__.py +0 -0
  192. GaiaXPy-2.1.0/tests/test_error_correction/error_correction_paths.py +0 -6
  193. GaiaXPy-2.1.0/tests/test_error_correction/test_error_correction.py +0 -76
  194. GaiaXPy-2.1.0/tests/test_file_parser/__init__.py +0 -0
  195. GaiaXPy-2.1.0/tests/test_file_parser/test_parse_external.py +0 -30
  196. GaiaXPy-2.1.0/tests/test_file_parser/test_parse_generic.py +0 -37
  197. GaiaXPy-2.1.0/tests/test_file_parser/test_parse_internal_continuous.py +0 -279
  198. GaiaXPy-2.1.0/tests/test_file_parser/test_parse_internal_sampled.py +0 -25
  199. GaiaXPy-2.1.0/tests/test_generator/__init__.py +0 -0
  200. GaiaXPy-2.1.0/tests/test_generator/generator_paths.py +0 -6
  201. GaiaXPy-2.1.0/tests/test_generator/test_config.py +0 -46
  202. GaiaXPy-2.1.0/tests/test_generator/test_generator.py +0 -56
  203. GaiaXPy-2.1.0/tests/test_generator/test_generator_archive.py +0 -60
  204. GaiaXPy-2.1.0/tests/test_generator/test_generator_missing_bp.py +0 -128
  205. GaiaXPy-2.1.0/tests/test_generator/test_internal_photometric_system.py +0 -32
  206. GaiaXPy-2.1.0/tests/test_generator/test_multi_synthetic_photometry_generator.py +0 -48
  207. GaiaXPy-2.1.0/tests/test_generator/test_photometric_system.py +0 -105
  208. GaiaXPy-2.1.0/tests/test_generator/test_single_synthetic_photometry_generator.py +0 -31
  209. GaiaXPy-2.1.0/tests/test_generator/test_synthetic_photometry_generator.py +0 -47
  210. GaiaXPy-2.1.0/tests/test_input_reader/__init__.py +0 -0
  211. GaiaXPy-2.1.0/tests/test_input_reader/test_input_reader.py +0 -30
  212. GaiaXPy-2.1.0/tests/test_input_reader/test_input_reader_archive.py +0 -31
  213. GaiaXPy-2.1.0/tests/test_input_reader/test_input_reader_missing_bp.py +0 -75
  214. GaiaXPy-2.1.0/tests/test_output/__init__.py +0 -0
  215. GaiaXPy-2.1.0/tests/test_output/test_save_cont_raw.py +0 -117
  216. GaiaXPy-2.1.0/tests/test_plotter/__init__.py +0 -0
  217. GaiaXPy-2.1.0/tests/test_plotter/test_multi_absolute.py +0 -38
  218. GaiaXPy-2.1.0/tests/test_plotter/test_multi_xp.py +0 -29
  219. GaiaXPy-2.1.0/tests/test_plotter/test_single.py +0 -43
  220. GaiaXPy-2.1.0/tests/test_spectrum/__init__.py +0 -0
  221. GaiaXPy-2.1.0/tests/test_spectrum/test_absolute_sampled_spectrum.py +0 -49
  222. GaiaXPy-2.1.0/tests/test_spectrum/test_generic_spectrum.py +0 -12
  223. GaiaXPy-2.1.0/tests/test_spectrum/test_utils.py +0 -32
  224. GaiaXPy-2.1.0/tests/test_spectrum/test_xp_continuous_spectrum.py +0 -49
  225. GaiaXPy-2.1.0/tests/test_spectrum/test_xp_sampled_spectrum.py +0 -54
  226. GaiaXPy-2.1.0/tests/test_spectrum/test_xp_spectrum.py +0 -12
  227. GaiaXPy-2.1.0/tests/utils/__init__.py +0 -0
  228. GaiaXPy-2.1.0/tests/utils/utils.py +0 -116
  229. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1}/LICENCE +0 -0
  230. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1}/README.md +0 -0
  231. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1}/setup.cfg +0 -0
  232. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/GaiaXPy.egg-info/dependency_links.txt +0 -0
  233. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/calibrator/__init__.py +0 -0
  234. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/cholesky/__init__.py +0 -0
  235. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/colour_equation/__init__.py +0 -0
  236. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/config/TabulatedDispersionFunction-DR3-v375wiv142r_20200610.csv +0 -0
  237. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/config/__init__.py +0 -0
  238. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/config/available_systems.txt +0 -0
  239. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/config/bpC03_v211w_bases.csv +0 -0
  240. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/config/bpC03_v211w_dispersion.csv +0 -0
  241. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/config/bpC03_v211w_response.csv +0 -0
  242. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/config/bpC03_v375wi_bases.csv +0 -0
  243. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/config/bpC03_v375wi_dispersion.csv +0 -0
  244. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/config/bpC03_v375wi_response.csv +0 -0
  245. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/config/colour_eq_files/JkcStd_colour_eq.ini +0 -0
  246. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/config/colour_eq_files/SdssStd_colour_eq.ini +0 -0
  247. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-ElsCustomW09S2-correction-factors.csv +0 -0
  248. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-EuclidVis-correction-factors.csv +0 -0
  249. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-Gaia2-correction-factors.csv +0 -0
  250. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-GaiaDr3Vega-correction-factors.csv +0 -0
  251. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-HipparcosTycho-correction-factors-old.csv +0 -0
  252. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-HipparcosTycho-correction-factors.csv +0 -0
  253. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-HstAcswfc-correction-factors.csv +0 -0
  254. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-HstHugsStd-correction-factors.csv +0 -0
  255. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-HstWfc3uvis-correction-factors.csv +0 -0
  256. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-HstWfpc2-correction-factors.csv +0 -0
  257. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-Iphas-correction-factors.csv +0 -0
  258. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-Jkc-correction-factors.csv +0 -0
  259. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-JkcStd-correction-factors.csv +0 -0
  260. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-Jpas-correction-factors.csv +0 -0
  261. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-Jplus-correction-factors.csv +0 -0
  262. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-JwstNircam-correction-factors.csv +0 -0
  263. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-Panstarrs1-correction-factors.csv +0 -0
  264. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-Panstarrs1Std-correction-factors.csv +0 -0
  265. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-Pristine-correction-factors.csv +0 -0
  266. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-Sdss-correction-factors.csv +0 -0
  267. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-SdssStd-correction-factors.csv +0 -0
  268. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-SkyMapper-correction-factors.csv +0 -0
  269. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-Stromgren-correction-factors.csv +0 -0
  270. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-StromgrenStd-correction-factors.csv +0 -0
  271. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/config/correction_tables/DIDREQ-465-Wfirst-correction-factors.csv +0 -0
  272. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/config/rpC03_v142r_bases.csv +0 -0
  273. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/config/rpC03_v142r_dispersion.csv +0 -0
  274. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/config/rpC03_v142r_response.csv +0 -0
  275. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/converter/__init__.py +0 -0
  276. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/core/__init__.py +0 -0
  277. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/core/nature.py +0 -0
  278. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/core/satellite.py +0 -0
  279. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/core/server.py +0 -0
  280. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/error_correction/__init__.py +0 -0
  281. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/file_parser/__init__.py +0 -0
  282. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/generator/__init__.py +0 -0
  283. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/generator/regular_photometric_system.py +0 -0
  284. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/generator/standardised_photometric_system.py +0 -0
  285. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/generator/synthetic_photometry_generator.py +0 -0
  286. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/generator/utils.py +0 -0
  287. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/input_reader/__init__.py +0 -0
  288. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/output/__init__.py +0 -0
  289. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/output/continuous_spectra_data.py +0 -0
  290. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/output/photometry_data.py +0 -0
  291. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/plotter/__init__.py +0 -0
  292. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/plotter/multi_absolute.py +0 -0
  293. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/plotter/multi_xp.py +0 -0
  294. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/plotter/plotter.py +0 -0
  295. {GaiaXPy-2.1.0 → gaiaxpy-2.1.1/src}/gaiaxpy/spectrum/__init__.py +0 -0
  296. {GaiaXPy-2.1.0 → 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.1.0
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
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.7
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'}
@@ -1,47 +1,27 @@
1
1
  """
2
2
  Setup module for GaiaXPy.
3
3
 
4
- Francesca De Angeli, Zuzanna Kostrzewa-Rutkowska, Paolo Montegriffo, Lovro Palaversa, Daniela Ruz-Mieres - 2023
4
+ Francesca De Angeli, Zuzanna Kostrzewa-Rutkowska, Paolo Montegriffo, Lovro Palaversa, Daniela Ruz-Mieres - 2024
5
5
 
6
6
  Based on:
7
7
  https://packaging.python.org/tutorials/packaging-projects
8
8
  """
9
9
  import re
10
- from os import path
11
-
10
+ from os.path import abspath, dirname, join
12
11
  from setuptools import setup, find_packages
13
12
 
14
- current_path = path.abspath(path.dirname(__file__))
15
-
16
-
17
- def get_property(prop):
18
- result = re.search(r'{}\s*=\s*[\'"]([^\'"]*)[\'"]'.format(prop), open('gaiaxpy' + '/core/version.py').read())
19
- return result.group(1)
20
-
21
-
22
13
  AUTHORS = 'Francesca De Angeli, Zuzanna Kostrzewa-Rutkowska, Paolo Montegriffo, Lovro Palaversa, Daniela Ruz-Mieres'
23
14
 
24
15
  CLASSIFIERS = ['Programming Language :: Python :: 3',
25
16
  'License :: OSI Approved :: BSD License',
26
17
  'Operating System :: OS Independent']
27
18
 
28
- INSTALL_REQUIRES = ['aenum',
29
- 'astropy',
30
- 'astroquery',
31
- 'fastavro',
32
- 'matplotlib',
33
- 'numpy>1.13',
34
- 'packaging',
35
- 'pandas>=1.0.0',
36
- 'scipy',
37
- 'tqdm>=4.64.0']
38
-
39
- SETUP_REQUIRES = INSTALL_REQUIRES + ['setuptools', 'setuptools_scm', 'wheel']
40
19
 
41
- EXTRAS_REQUIRE = {'tests': ['pytest', 'pytest-cov']}
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)
42
24
 
43
- with open("README.md", "r") as fh:
44
- LONG_DESCRIPTION = fh.read()
45
25
 
46
26
  setup(
47
27
  name='GaiaXPy',
@@ -51,12 +31,12 @@ setup(
51
31
  maintainer='Daniela Ruz-Mieres',
52
32
  maintainer_email='d.ruzmieres@ast.cam.ac.uk',
53
33
  description='Utilities to handle BP/RP (XP) Gaia low-resolution spectra as delivered via the archive',
54
- long_description=LONG_DESCRIPTION,
34
+ long_description=open('README.md', 'r').read(),
55
35
  long_description_content_type='text/markdown',
56
36
  url='https://gaia-dpci.github.io/GaiaXPy-website/',
57
- python_requires='>=3.7',
58
- packages=find_packages(),
59
- install_requires=INSTALL_REQUIRES,
37
+ python_requires='>=3.8',
38
+ packages=find_packages('src'),
39
+ extras_require={'tests': ['pytest', 'pytest-mock']},
60
40
  include_package_data=True,
61
41
  classifiers=CLASSIFIERS
62
42
  )
@@ -1,18 +1,34 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: GaiaXPy
3
- Version: 2.1.0
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
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.7
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,9 +2,14 @@ aenum
2
2
  astropy
3
3
  astroquery
4
4
  fastavro
5
+ hdfs
5
6
  matplotlib
6
- numpy>1.13
7
+ numpy>1.23
7
8
  packaging
8
- pandas>=1.0.0
9
+ pandas>=1.5.0
9
10
  scipy
10
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__
@@ -7,6 +7,7 @@ Module for the calibrator functionality.
7
7
  from configparser import ConfigParser
8
8
  from os.path import join
9
9
  from pathlib import Path
10
+ from sys import stdout
10
11
  from typing import Union
11
12
 
12
13
  import numpy as np
@@ -15,24 +16,24 @@ from tqdm import tqdm
15
16
 
16
17
  from gaiaxpy.config.paths import config_path, config_ini_file
17
18
  from gaiaxpy.core.config import load_xpmerge_from_xml, load_xpsampling_from_xml
18
- from gaiaxpy.core.generic_functions import cast_output, get_spectra_type, validate_arguments, validate_wl_sampling, \
19
- parse_band
19
+ from gaiaxpy.core.generic_functions import cast_output, validate_wl_sampling, parse_band, format_sampled_output
20
20
  from gaiaxpy.core.generic_variables import pbar_colour, pbar_units, pbar_message
21
21
  from gaiaxpy.core.satellite import BANDS, BP_WL, RP_WL
22
22
  from gaiaxpy.input_reader.input_reader import InputReader
23
23
  from gaiaxpy.output.sampled_spectra_data import SampledSpectraData
24
- from gaiaxpy.spectrum.absolute_sampled_spectrum import AbsoluteSampledSpectrum
25
24
  from gaiaxpy.spectrum.sampled_basis_functions import SampledBasisFunctions
26
25
  from gaiaxpy.spectrum.utils import get_covariance_matrix
27
26
  from gaiaxpy.spectrum.xp_continuous_spectrum import XpContinuousSpectrum
28
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
29
30
 
30
31
  __FUNCTION_KEY = 'calibrator'
31
32
 
32
33
 
33
34
  def calibrate(input_object: Union[list, Path, str], sampling: np.ndarray = None, truncation: bool = False,
34
35
  output_path: Union[Path, str] = '.', output_file: str = 'output_spectra', output_format: str = None,
35
- save_file: bool = True, with_correlation: bool = False, username: str = None, password: str = None) ->\
36
+ save_file: bool = True, with_correlation: bool = False, username: str = None, password: str = None) -> \
36
37
  (pd.DataFrame, np.ndarray):
37
38
  """
38
39
  Calibration utility: calibrates the input internally-calibrated continuously-represented mean spectra to the
@@ -68,10 +69,10 @@ def calibrate(input_object: Union[list, Path, str], sampling: np.ndarray = None,
68
69
  def _calibrate(input_object: Union[list, Path, str], sampling: np.ndarray = None, truncation: bool = False,
69
70
  output_path: Union[Path, str] = '.', output_file: str = 'output_spectra', output_format: str = None,
70
71
  save_file: bool = True, with_correlation: bool = False, username: str = None, password: str = None,
71
- bp_model: str = 'v375wi', rp_model: str = 'v142r', disable_info: bool = False) ->\
72
+ bp_model: str = 'v375wi', rp_model: str = 'v142r', disable_info: bool = False) -> \
72
73
  (pd.DataFrame, np.ndarray):
73
74
  """
74
- Internal method of the calibration utility. Refer to "calibrate".
75
+ Internal function of the calibration utility. Refer to "calibrate".
75
76
 
76
77
  Args:
77
78
  bp_model (str): The bp model.
@@ -85,9 +86,10 @@ def _calibrate(input_object: Union[list, Path, str], sampling: np.ndarray = None
85
86
  ValueError: If the sampling is out of the expected boundaries.
86
87
  """
87
88
  validate_wl_sampling(sampling)
88
- validate_arguments(_calibrate.__defaults__[3], output_file, save_file)
89
- parsed_input_data, extension = InputReader(input_object, _calibrate, disable_info=disable_info, user=username,
90
- password=password).read()
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()
91
93
  xp_design_matrices, xp_merge = __generate_xp_matrices_and_merge(__FUNCTION_KEY, sampling, bp_model, rp_model)
92
94
  spectra_df, positions = __create_spectra(parsed_input_data, truncation, xp_design_matrices, xp_merge,
93
95
  with_correlation=with_correlation, disable_info=disable_info)
@@ -164,8 +166,8 @@ def __generate_xp_matrices_and_merge(label: str, sampling: np.ndarray, bp_model:
164
166
  xp_merge = {xp: __create_merge(xp, sampling) for xp in BANDS}
165
167
  xp_design_matrices = {xp: SampledBasisFunctions.from_external_instrument_model(
166
168
  sampling, xp_merge[xp], ExternalInstrumentModel.from_config_csv(
167
- __get_file_for_xp(xp, 'dispersion'), __get_file_for_xp(xp, 'response'), __get_file_for_xp(xp, 'bases')))
168
- for xp in BANDS}
169
+ __get_file_for_xp(xp, 'dispersion'), __get_file_for_xp(xp, 'response'),
170
+ __get_file_for_xp(xp, 'bases'))) for xp in BANDS}
169
171
  return xp_design_matrices, xp_merge
170
172
 
171
173
 
@@ -195,13 +197,8 @@ def __create_spectra(parsed_input_data: pd.DataFrame, truncation: bool, design_m
195
197
  spectra_series = pd.Series([_create_spectrum(row, truncation, design_matrices, merge,
196
198
  with_correlation=with_correlation) for row in tqdm(
197
199
  parsed_spectrum_file_dict, desc=pbar_message[__FUNCTION_KEY], unit=pbar_units[__FUNCTION_KEY], leave=False,
198
- colour=pbar_colour, disable=disable_info)])
199
- positions = spectra_series.iloc[0].get_positions()
200
- spectra_type = get_spectra_type(spectra_series.iloc[0])
201
- spectra_series = spectra_series.map(lambda x: x.spectrum_to_dict())
202
- spectra_df = pd.DataFrame(spectra_series.tolist())
203
- spectra_df.attrs['data_type'] = spectra_type
204
- return spectra_df, positions
200
+ colour=pbar_colour, disable=disable_info, file=stdout)])
201
+ return format_sampled_output(spectra_series, with_correlation=with_correlation)
205
202
 
206
203
 
207
204
  def _create_spectrum(row, truncation, design_matrix, merge, with_correlation=False):
@@ -218,12 +215,12 @@ def _create_spectrum(row, truncation, design_matrix, merge, with_correlation=Fal
218
215
  and define the contributions from BP and RP to the joined absolute spectrum.
219
216
 
220
217
  Returns:
221
- AbsoluteSampledSpectrum: The absolute sampled spectrum.
218
+ CalibrationAbsoluteSampledSpectrum: The absolute sampled spectrum with calibration behaviour.
222
219
  """
223
220
  source_id = row['source_id']
224
221
  continuous_dict = {band: XpContinuousSpectrum(source_id, band, row[f'{band}_coefficients'],
225
222
  get_covariance_matrix(row, band), row[f'{band}_standard_deviation'])
226
223
  for band in BANDS}
227
224
  recommended_truncation = {band: row[f'{band}_n_relevant_bases'] for band in BANDS} if truncation else dict()
228
- return AbsoluteSampledSpectrum(source_id, continuous_dict, design_matrix, merge, truncation=recommended_truncation,
229
- with_correlation=with_correlation)
225
+ return CalibrationAbsoluteSampledSpectrum(source_id, continuous_dict, design_matrix, merge,
226
+ truncation=recommended_truncation, with_correlation=with_correlation)
@@ -53,11 +53,11 @@ class ExternalInstrumentModel(object):
53
53
  _resp = np.genfromtxt(response_path, delimiter=',')
54
54
  response = dict(zip(['wavelength', 'response'], [_resp[0], _resp[1]]))
55
55
  # Bases
56
- bases, _ = InverseBasesParser()._parse(bases_path)
57
- bases['inverseBasesCoefficients'][0] = bases['inverseBasesCoefficients'][0].reshape(
58
- bases['nBases'][0], bases['nInverseBasesCoefficients'][0])
59
- bases['transformationMatrix'][0] = bases['transformationMatrix'][0].reshape(
60
- bases['nBases'][0], bases['nTransformedBases'][0])
56
+ bases, _ = InverseBasesParser().parse_file(bases_path)
57
+ bases = bases.iloc[0]
58
+ bases['inverseBasesCoefficients'] = bases['inverseBasesCoefficients'].reshape(bases['nBases'],
59
+ bases['nInverseBasesCoefficients'])
60
+ bases['transformationMatrix'] = bases['transformationMatrix'].reshape(bases['nBases'], bases['nTransformedBases'])
61
61
  return cls(dispersion, response, bases)
62
62
 
63
63
  def get_response(self, wavelength: float) -> np.ndarray:
@@ -51,8 +51,7 @@ def __output_list_to_df(parsed_input_data: pd.DataFrame, bands_output: list, out
51
51
  return pd.DataFrame(zip(*output_list), columns=output_columns)
52
52
 
53
53
 
54
- def get_inverse_square_root_covariance_matrix(input_object: Union[list, Path, str],
55
- band: Optional[Union[list, str]] = None):
54
+ def get_inverse_square_root_covariance_matrix(input_object: Union[list, Path, str], band: Optional[str] = None):
56
55
  """
57
56
  Compute the inverse square root covariance matrix.
58
57
 
@@ -72,7 +71,7 @@ def get_inverse_square_root_covariance_matrix(input_object: Union[list, Path, st
72
71
  """
73
72
  if band is not None:
74
73
  band = parse_band(band)
75
- parsed_input_data, extension = InputReader(input_object, get_inverse_square_root_covariance_matrix).read()
74
+ parsed_input_data, extension = InputReader(input_object, get_inverse_square_root_covariance_matrix, False).read()
76
75
  if band is None:
77
76
  bands_to_process = BANDS
78
77
  output_columns = ['source_id', 'bp_inverse_square_root_covariance_matrix',
@@ -117,7 +116,7 @@ def _get_inverse_square_root_covariance_matrix_aux(xp_errors: np.ndarray, xp_cor
117
116
  return None
118
117
 
119
118
 
120
- def get_inverse_covariance_matrix(input_object: Union[list, Path, str], band: str = None):
119
+ def get_inverse_covariance_matrix(input_object: Union[list, Path, str], band: Optional[str] = None):
121
120
  """
122
121
  Compute the inverse covariance matrix.
123
122
 
@@ -134,7 +133,7 @@ def get_inverse_covariance_matrix(input_object: Union[list, Path, str], band: st
134
133
  and a single band is selected.
135
134
  """
136
135
  band = band if band is None else parse_band(band)
137
- parsed_input_data, extension = InputReader(input_object, get_inverse_covariance_matrix).read()
136
+ parsed_input_data, extension = InputReader(input_object, get_inverse_covariance_matrix, False).read()
138
137
  bands_output = []
139
138
  if band is None:
140
139
  bands_to_process = BANDS
@@ -169,7 +168,7 @@ def get_chi2(_L_inv: np.ndarray, residuals: np.ndarray) -> np.ndarray:
169
168
  Returns:
170
169
  float: Chi-squared value.
171
170
  """
172
- if _L_inv is None or residuals is None: # Cannot be checked with 'not' as the truth value of an array is ambiguous.
171
+ if _L_inv is None or residuals is None:
173
172
  raise ValueError('Input parameters cannot be None.')
174
173
  if _L_inv.shape != (55, 55):
175
174
  raise ValueError('Inverse covariance matrix shape must be (55, 55).')
@@ -9,6 +9,7 @@ from ast import literal_eval
9
9
  from configparser import ConfigParser
10
10
  from os import listdir
11
11
  from pathlib import Path
12
+ from sys import stdout
12
13
  from typing import Union, Optional
13
14
 
14
15
  import numpy as np
@@ -17,10 +18,11 @@ from numpy import poly1d
17
18
  from tqdm import tqdm
18
19
 
19
20
  from gaiaxpy.config.paths import filters_path
20
- from gaiaxpy.core.generic_functions import cast_output, validate_arguments
21
- from gaiaxpy.core.generic_variables import pbar_colour, pbar_units
21
+ from gaiaxpy.core.generic_functions import cast_output
22
+ from gaiaxpy.core.generic_variables import pbar_colour, pbar_units, pbar_message
23
+ from gaiaxpy.core.input_validator import validate_save_arguments
22
24
  from gaiaxpy.generator.photometric_system import PhotometricSystem
23
- from gaiaxpy.input_reader.input_reader import InputReader
25
+ from gaiaxpy.input_reader.dataframe_reader import DataFrameReader
24
26
  from gaiaxpy.output.photometry_data import PhotometryData
25
27
 
26
28
  colour_eq_dir = Path(filters_path, '..', 'colour_eq_files')
@@ -96,12 +98,14 @@ def __create_rows(single_system_df, system, colour_band_0, colour_band_1, system
96
98
 
97
99
 
98
100
  def _generate_output_df(input_synthetic_photometry, systems_details, disable_info=False):
101
+ __FUNCTION_KEY = 'colour_eq'
99
102
  synth_phot_df = input_synthetic_photometry.copy()
100
103
  column_names = synth_phot_df.columns
101
104
  # Extract columns corresponding to one system
102
105
  system_keys = systems_details.keys()
103
- for label in tqdm(system_keys, desc='Applying colour equation', total=len(system_keys),
104
- unit=pbar_units['colour_eq'], colour=pbar_colour, leave=False, disable=disable_info):
106
+ for label in tqdm(system_keys, desc=pbar_message[__FUNCTION_KEY], total=len(system_keys),
107
+ unit=pbar_units[__FUNCTION_KEY], colour=pbar_colour, leave=False, disable=disable_info,
108
+ file=stdout):
105
109
  filter_to_correct = systems_details[label]['filter']
106
110
  colour_band_0, colour_band_1 = _get_colour_bands(systems_details[label]['colour_index'])
107
111
  system_columns_with_colour = [column for column in column_names if column.startswith(f'{label}_') and
@@ -243,9 +247,9 @@ def _apply_colour_equation(input_synthetic_photometry: pd.DataFrame,
243
247
  output_file: str = 'corrected_photometry', output_format: Optional[str] = None,
244
248
  save_file: bool = True, disable_info=False):
245
249
  function = apply_colour_equation
246
- validate_arguments(function.__defaults__[2], output_file, save_file)
247
- input_synthetic_photometry, extension = InputReader(input_synthetic_photometry, function,
248
- disable_info=disable_info).read()
250
+ validate_save_arguments(function.__defaults__[2], output_file, function.__defaults__[3], output_format, save_file)
251
+ input_synthetic_photometry, extension = DataFrameReader(input_synthetic_photometry, function, False,
252
+ disable_info=disable_info).read()
249
253
  systems_to_correct = __get_systems_to_correct(photometric_system)
250
254
  systems_details = __fill_systems_details(systems_to_correct)
251
255
  output_df = _generate_output_df(input_synthetic_photometry, systems_details, disable_info=disable_info)