pyreduce-astro 0.7a1__tar.gz → 0.7a3__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 (204) hide show
  1. pyreduce_astro-0.7a3/.gitattributes +1 -0
  2. pyreduce_astro-0.7a3/.pre-commit-config.yaml +33 -0
  3. pyreduce_astro-0.7a3/.pyup.yml +4 -0
  4. pyreduce_astro-0.7a3/.readthedocs.yaml +25 -0
  5. pyreduce_astro-0.7a3/AGENTS.md +1 -0
  6. pyreduce_astro-0.7a3/CHANGELOG.md +120 -0
  7. pyreduce_astro-0.7a3/CLAUDE.md +285 -0
  8. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/PKG-INFO +1 -9
  9. pyreduce_astro-0.7a3/README_METIS.md +130 -0
  10. pyreduce_astro-0.7a3/codemeta.json +56 -0
  11. pyreduce_astro-0.7a3/environment.yml +19 -0
  12. pyreduce_astro-0.7a3/examples/aj_example.py +165 -0
  13. pyreduce_astro-0.7a3/examples/crires_plus_example.py +59 -0
  14. pyreduce_astro-0.7a3/examples/custom_instrument_example.py +76 -0
  15. pyreduce_astro-0.7a3/examples/harpn_example.py +52 -0
  16. pyreduce_astro-0.7a3/examples/harps_example.py +47 -0
  17. pyreduce_astro-0.7a3/examples/harps_gridsearch.py +110 -0
  18. pyreduce_astro-0.7a3/examples/just_one_swath.py +111 -0
  19. pyreduce_astro-0.7a3/examples/jwst_miri_example.py +50 -0
  20. pyreduce_astro-0.7a3/examples/jwst_niriss_example.py +53 -0
  21. pyreduce_astro-0.7a3/examples/lick_apf_example.py +50 -0
  22. pyreduce_astro-0.7a3/examples/mcdonald_example.py +53 -0
  23. pyreduce_astro-0.7a3/examples/metis_ifu_example.py +77 -0
  24. pyreduce_astro-0.7a3/examples/metis_lss_example.py +77 -0
  25. pyreduce_astro-0.7a3/examples/micado_example.py +70 -0
  26. pyreduce_astro-0.7a3/examples/neid_example.py +52 -0
  27. pyreduce_astro-0.7a3/examples/nirspec_example.py +46 -0
  28. pyreduce_astro-0.7a3/examples/toes_example.py +159 -0
  29. pyreduce_astro-0.7a3/examples/uves_callfunc.py +170 -0
  30. pyreduce_astro-0.7a3/examples/uves_example.py +46 -0
  31. pyreduce_astro-0.7a3/examples/xshooter_example.py +55 -0
  32. pyreduce_astro-0.7a3/ipy_startup.py +19 -0
  33. pyreduce_astro-0.7a3/plots_for_paper/dimensionality.py +172 -0
  34. pyreduce_astro-0.7a3/plots_for_paper/settings_HARPS.json +47 -0
  35. pyreduce_astro-0.7a3/plots_for_paper/wavecal_plot.py +137 -0
  36. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyproject.toml +10 -23
  37. pyreduce_astro-0.7a3/pyproject.toml.sav +77 -0
  38. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/__main__.py +90 -5
  39. pyreduce_astro-0.7a3/tools/argon.line +133 -0
  40. pyreduce_astro-0.7a3/tools/bpm_creator.py +123 -0
  41. pyreduce_astro-0.7a3/tools/create_wavelength_guess.py +530 -0
  42. pyreduce_astro-0.7a3/tools/download_files.py +84 -0
  43. pyreduce_astro-0.7a3/tools/neon.lin +4180 -0
  44. pyreduce_astro-0.7a3/tools/neon.line +477 -0
  45. pyreduce_astro-0.7a3/tools/pymultispec.py +267 -0
  46. pyreduce_astro-0.7a3/tools/thar.npz +0 -0
  47. pyreduce_astro-0.7a3/tools/wavecal_creator.py +28 -0
  48. pyreduce_astro-0.7a3/tools/wavecal_creator_from_existing.py +103 -0
  49. pyreduce_astro-0.7a3/tools/xshooter_nir.json +74 -0
  50. pyreduce_astro-0.7a3/uv.lock +2211 -0
  51. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/.gitignore +0 -0
  52. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/LICENSE +0 -0
  53. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/README.md +0 -0
  54. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/hatch_build.py +0 -0
  55. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/__init__.py +0 -0
  56. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/cli.py +0 -0
  57. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/clib/__init__.py +0 -0
  58. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/clib/build_extract.py +0 -0
  59. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/clib/slit_func_2d_xi_zeta_bd.c +0 -0
  60. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/clib/slit_func_2d_xi_zeta_bd.h +0 -0
  61. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/clib/slit_func_bd.c +0 -0
  62. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/clib/slit_func_bd.h +0 -0
  63. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/clipnflip.py +0 -0
  64. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/combine_frames.py +0 -0
  65. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/configuration.py +0 -0
  66. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/continuum_normalization.py +0 -0
  67. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/cwrappers.py +0 -0
  68. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/datasets.py +0 -0
  69. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/echelle.py +0 -0
  70. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/estimate_background_scatter.py +0 -0
  71. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/extract.py +0 -0
  72. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/extraction_width.py +0 -0
  73. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/instruments/__init__.py +0 -0
  74. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/instruments/aj.py +0 -0
  75. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/instruments/aj.yaml +0 -0
  76. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/instruments/andes.py +0 -0
  77. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/instruments/andes.yaml +0 -0
  78. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/instruments/common.py +0 -0
  79. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/instruments/common.yaml +0 -0
  80. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/instruments/crires_plus.py +0 -0
  81. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/instruments/crires_plus.yaml +0 -0
  82. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/instruments/filters.py +0 -0
  83. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/instruments/harpn.py +0 -0
  84. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/instruments/harpn.yaml +0 -0
  85. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/instruments/harps.py +0 -0
  86. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/instruments/harps.yaml +0 -0
  87. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/instruments/instrument_info.py +0 -0
  88. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/instruments/jwst_miri.py +0 -0
  89. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/instruments/jwst_miri.yaml +0 -0
  90. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/instruments/jwst_niriss.py +0 -0
  91. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/instruments/jwst_niriss.yaml +0 -0
  92. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/instruments/lick_apf.py +0 -0
  93. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/instruments/lick_apf.yaml +0 -0
  94. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/instruments/mcdonald.py +0 -0
  95. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/instruments/mcdonald.yaml +0 -0
  96. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/instruments/metis_ifu.py +0 -0
  97. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/instruments/metis_ifu.yaml +0 -0
  98. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/instruments/metis_lss.py +0 -0
  99. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/instruments/metis_lss.yaml +0 -0
  100. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/instruments/micado.py +0 -0
  101. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/instruments/micado.yaml +0 -0
  102. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/instruments/models.py +0 -0
  103. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/instruments/neid.py +0 -0
  104. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/instruments/neid.yaml +0 -0
  105. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/instruments/nirspec.py +0 -0
  106. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/instruments/nirspec.yaml +0 -0
  107. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/instruments/nte.py +0 -0
  108. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/instruments/nte.yaml +0 -0
  109. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/instruments/uves.py +0 -0
  110. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/instruments/uves.yaml +0 -0
  111. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/instruments/xshooter.py +0 -0
  112. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/instruments/xshooter.yaml +0 -0
  113. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/make_shear.py +0 -0
  114. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/masks/mask_crires_plus_det1.fits.gz +0 -0
  115. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/masks/mask_crires_plus_det2.fits.gz +0 -0
  116. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/masks/mask_crires_plus_det3.fits.gz +0 -0
  117. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/masks/mask_ctio_chiron.fits.gz +0 -0
  118. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/masks/mask_elodie.fits.gz +0 -0
  119. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/masks/mask_feros3.fits.gz +0 -0
  120. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/masks/mask_flames_giraffe.fits.gz +0 -0
  121. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/masks/mask_harps_blue.fits.gz +0 -0
  122. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/masks/mask_harps_red.fits.gz +0 -0
  123. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/masks/mask_hds_blue.fits.gz +0 -0
  124. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/masks/mask_hds_red.fits.gz +0 -0
  125. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/masks/mask_het_hrs_2x5.fits.gz +0 -0
  126. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/masks/mask_jwst_miri_lrs_slitless.fits.gz +0 -0
  127. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/masks/mask_jwst_niriss_gr700xd.fits.gz +0 -0
  128. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/masks/mask_lick_apf_.fits.gz +0 -0
  129. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/masks/mask_mcdonald.fits.gz +0 -0
  130. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/masks/mask_nes.fits.gz +0 -0
  131. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/masks/mask_nirspec_nirspec.fits.gz +0 -0
  132. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/masks/mask_sarg.fits.gz +0 -0
  133. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/masks/mask_sarg_2x2a.fits.gz +0 -0
  134. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/masks/mask_sarg_2x2b.fits.gz +0 -0
  135. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/masks/mask_subaru_hds_red.fits.gz +0 -0
  136. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/masks/mask_uves_blue.fits.gz +0 -0
  137. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/masks/mask_uves_blue_binned_2_2.fits.gz +0 -0
  138. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/masks/mask_uves_middle.fits.gz +0 -0
  139. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/masks/mask_uves_middle_2x2_split.fits.gz +0 -0
  140. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/masks/mask_uves_middle_binned_2_2.fits.gz +0 -0
  141. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/masks/mask_uves_red.fits.gz +0 -0
  142. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/masks/mask_uves_red_2x2.fits.gz +0 -0
  143. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/masks/mask_uves_red_2x2_split.fits.gz +0 -0
  144. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/masks/mask_uves_red_binned_2_2.fits.gz +0 -0
  145. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/masks/mask_xshooter_nir.fits.gz +0 -0
  146. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/pipeline.py +0 -0
  147. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/rectify.py +0 -0
  148. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/reduce.py +0 -0
  149. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/settings/settings_AJ.json +0 -0
  150. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/settings/settings_ANDES.json +0 -0
  151. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/settings/settings_CRIRES_PLUS.json +0 -0
  152. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/settings/settings_HARPN.json +0 -0
  153. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/settings/settings_HARPS.json +0 -0
  154. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/settings/settings_JWST_MIRI.json +0 -0
  155. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/settings/settings_JWST_NIRISS.json +0 -0
  156. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/settings/settings_LICK_APF.json +0 -0
  157. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/settings/settings_MCDONALD.json +0 -0
  158. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/settings/settings_METIS_IFU.json +0 -0
  159. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/settings/settings_METIS_LSS.json +0 -0
  160. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/settings/settings_MICADO.json +0 -0
  161. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/settings/settings_NEID.json +0 -0
  162. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/settings/settings_NIRSPEC.json +0 -0
  163. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/settings/settings_NTE.json +0 -0
  164. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/settings/settings_UVES.json +0 -0
  165. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/settings/settings_XSHOOTER.json +0 -0
  166. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/settings/settings_pyreduce.json +0 -0
  167. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/settings/settings_schema.json +0 -0
  168. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/tools/__init__.py +0 -0
  169. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/tools/combine.py +0 -0
  170. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/trace.py +0 -0
  171. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/util.py +0 -0
  172. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/wavecal/MICADO_HK_3arcsec_chip5.npz +0 -0
  173. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/wavecal/atlas/thar.fits +0 -0
  174. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/wavecal/atlas/thar_list.txt +0 -0
  175. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/wavecal/atlas/une.fits +0 -0
  176. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/wavecal/convert.py +0 -0
  177. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/wavecal/crires_plus_J1228_Open_det1.npz +0 -0
  178. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/wavecal/crires_plus_J1228_Open_det2.npz +0 -0
  179. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/wavecal/crires_plus_J1228_Open_det3.npz +0 -0
  180. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/wavecal/harpn_harpn_2D.npz +0 -0
  181. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/wavecal/harps_blue_2D.npz +0 -0
  182. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/wavecal/harps_blue_pol_2D.npz +0 -0
  183. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/wavecal/harps_red_2D.npz +0 -0
  184. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/wavecal/harps_red_pol_2D.npz +0 -0
  185. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/wavecal/mcdonald.npz +0 -0
  186. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/wavecal/metis_lss_l_2D.npz +0 -0
  187. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/wavecal/metis_lss_m_2D.npz +0 -0
  188. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/wavecal/nirspec_K2.npz +0 -0
  189. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/wavecal/uves_blue_360nm_2D.npz +0 -0
  190. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/wavecal/uves_blue_390nm_2D.npz +0 -0
  191. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/wavecal/uves_blue_437nm_2D.npz +0 -0
  192. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/wavecal/uves_middle_2x2_2D.npz +0 -0
  193. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/wavecal/uves_middle_565nm_2D.npz +0 -0
  194. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/wavecal/uves_middle_580nm_2D.npz +0 -0
  195. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/wavecal/uves_middle_600nm_2D.npz +0 -0
  196. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/wavecal/uves_middle_665nm_2D.npz +0 -0
  197. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/wavecal/uves_middle_860nm_2D.npz +0 -0
  198. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/wavecal/uves_red_580nm_2D.npz +0 -0
  199. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/wavecal/uves_red_600nm_2D.npz +0 -0
  200. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/wavecal/uves_red_665nm_2D.npz +0 -0
  201. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/wavecal/uves_red_760nm_2D.npz +0 -0
  202. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/wavecal/uves_red_860nm_2D.npz +0 -0
  203. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/wavecal/xshooter_nir.npz +0 -0
  204. {pyreduce_astro-0.7a1 → pyreduce_astro-0.7a3}/pyreduce/wavelength_calibration.py +0 -0
@@ -0,0 +1 @@
1
+ pyreduce/_version.py export-subst
@@ -0,0 +1,33 @@
1
+ repos:
2
+ - repo: https://github.com/pre-commit/pre-commit-hooks
3
+ rev: v6.0.0
4
+ hooks:
5
+ # Identify invalid files
6
+ - id: check-ast
7
+ - id: check-yaml
8
+ - id: check-json
9
+ - id: check-toml
10
+ # git checks
11
+ - id: check-merge-conflict
12
+ - id: check-added-large-files
13
+ - id: detect-private-key
14
+ - id: check-case-conflict
15
+ # Python checks
16
+ - id: check-docstring-first
17
+ - id: debug-statements
18
+ # General checks
19
+ - id: mixed-line-ending
20
+ exclude: ".fits"
21
+ - id: trailing-whitespace
22
+ exclude: ".fits"
23
+ - id: end-of-file-fixer
24
+
25
+ # Ruff - Modern Python linter and formatter (replaces isort, black, flake8, pyupgrade)
26
+ - repo: https://github.com/astral-sh/ruff-pre-commit
27
+ rev: v0.13.2
28
+ hooks:
29
+ # Run the linter
30
+ - id: ruff
31
+ args: [--fix]
32
+ # Run the formatter
33
+ - id: ruff-format
@@ -0,0 +1,4 @@
1
+ # autogenerated pyup.io config file
2
+ # see https://pyup.io/docs/configuration/ for all available options
3
+
4
+ schedule: every month
@@ -0,0 +1,25 @@
1
+ # .readthedocs.yaml
2
+ # Read the Docs configuration file
3
+ # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4
+
5
+ # Required
6
+ version: 2
7
+
8
+ # Build documentation in the docs/ directory with Sphinx
9
+ sphinx:
10
+ configuration: docs/conf.py
11
+
12
+ # Optionally build your docs in additional formats such as PDF and ePub
13
+ formats: all
14
+
15
+ # Set the version of Python and install from pyproject.toml
16
+ build:
17
+ os: ubuntu-22.04
18
+ tools:
19
+ python: "3.13"
20
+
21
+ python:
22
+ install:
23
+ - method: pip
24
+ path: .
25
+ - requirements: docs/requirements.txt
@@ -0,0 +1 @@
1
+ CLAUDE.md
@@ -0,0 +1,120 @@
1
+ # Changelog
2
+
3
+
4
+ ## [0.7a3] - 2025-12-23
5
+
6
+ ### Added
7
+ - `reduce examples` command to list/download examples from GitHub matching installed version
8
+
9
+ ### Changed
10
+ - CLI startup 12x faster via lazy imports (1.2s -> 0.1s)
11
+
12
+ ## [0.7a2] - 2025-12-23
13
+
14
+ ### Added
15
+ - Manual API calls documentation (manual_calls.md)
16
+
17
+ ### Fixed
18
+ - ReadTheDocs build failing due to missing myst_parser
19
+ - Trace module reference in documentation
20
+
21
+ ### Changed
22
+ - Docs Makefile now uses uv
23
+ - pyproject.toml cleanup
24
+
25
+ ## [0.7a1] - 2025-12-22
26
+
27
+ ### Added
28
+ - New Pipeline API with `Pipeline.from_instrument()` for simplified usage
29
+ - Click-based CLI replacing argparse (`uv run reduce run UVES HD132205`)
30
+ - Pydantic models for instrument configuration validation
31
+ - YAML instrument configs replacing JSON
32
+ - IPython startup script for interactive development
33
+ - `plot_dir` option to save plots as PNG files
34
+ - Fiber bundle tracing support for multi-fiber instruments
35
+ - `filter_x` and `filter_type` options for order tracing
36
+
37
+ ### Changed
38
+ - Rename `mode` to `arm` terminology throughout
39
+ - Output extension changed from `.ech` to `.fits`
40
+ - Documentation converted from RST to Markdown
41
+ - Trace detection parameters renamed (`opower` -> `degree`, `filter_size` -> `filter_y`)
42
+
43
+ ### Fixed
44
+ - Plotting issues with non-finite values
45
+ - Use `interpolate_replace_nans` for masked pixels
46
+
47
+ ## [0.6.0] - 2025-12-22
48
+
49
+ ### Added
50
+ - JSON schema validation test for instrument configurations
51
+ - GitHub workflow creates GitHub Release on tag push
52
+
53
+ ### Fixed
54
+ - Fix test_wavecal to match WavelengthCalibration.execute() signature
55
+ - Fix spec fixture to match ScienceExtraction.run() signature
56
+ - Fix instrument schema: replace invalid 'value' keyword with standard JSON Schema 'type'
57
+
58
+ ## [0.6.0b5] - 2025-10-04
59
+
60
+ ### Fixed
61
+ - Include *.pyd files for Windows builds
62
+ - Remove redundant build test from workflow
63
+
64
+ ## [0.6.0b4] - 2025-10-03
65
+
66
+ ### Changed
67
+ - workflow builds multi-arch wheels
68
+ - minor fixes to make build pass
69
+
70
+ ## [0.6.0b3] - 2025-10-02
71
+
72
+ ### Added
73
+ - Test organization with pytest markers (unit, instrument, slow, downloads)
74
+ - ANDES instrument configuration and settings
75
+
76
+ ### Changed
77
+ - CI now runs fast tests (~7s) on every push to master
78
+ - Test suite optimized with slow marker for tests >3s
79
+
80
+ ### Fixed
81
+ - ANDES instrument configuration errors (missing decker fields, regex pattern)
82
+ - NIRSPEC FITS header errors with illegal keywords containing dots
83
+ - Pre-commit hooks now documented and working correctly
84
+
85
+ ## [0.6.0b2] - 2025-10-02
86
+
87
+ ### Changed
88
+ - lazy imports
89
+ - cosmetic fixes like version string
90
+
91
+ ## [0.6.0b1] - 2025-10-02
92
+
93
+ ### Changed
94
+ - Modern build system using uv package manager
95
+ - Minimum Python version now 3.11, default 3.13
96
+ - Migrated build system from setuptools to Hatchling (PEP 517)
97
+ - Replaced black, isort, flake8, and pyupgrade with Ruff
98
+ - Improved code formatting across entire codebase using Ruff
99
+ - Modernized GitHub Actions workflow (uv-based, Python 3.11-3.13 matrix)
100
+ - Updated documentation to reflect modern installation with uv
101
+ - Consolidated legacy build files (setup.py, requirements.txt) into pyproject.toml
102
+ - Removed automatic PyPI publishing from GitHub Actions (now manual)
103
+ - GitHub Actions tests now manual-only on master branch
104
+ - Modernized ReadTheDocs build configuration
105
+
106
+ ### Fixed
107
+ - Close FITS file handles after reading to prevent resource leaks ([#28](https://github.com/ivh/PyReduce/pull/28))
108
+ - Store wavelength calibration in double precision instead of single ([#30](https://github.com/ivh/PyReduce/pull/30))
109
+ - Add fallback value for E_ORIENT header keyword ([#31](https://github.com/ivh/PyReduce/pull/31))
110
+ - Return final wavelength linelist with flags from calibration ([#33](https://github.com/ivh/PyReduce/pull/33))
111
+ - Fix MaskedArray filling in normflat routine
112
+ - Fix undefined TypeFilter import in NEID instrument
113
+ - Fix Sphinx documentation build warnings
114
+ - Fix pre-commit hook configuration issues
115
+
116
+ ### Documentation
117
+ - Updated README badges for GitHub Actions and Python versions
118
+ - Updated installation instructions to use uv instead of pip
119
+ - Improved documentation build process
120
+ - CLAUDE.md / AGENTS.md for AI-assisted development guidance
@@ -0,0 +1,285 @@
1
+ # CLAUDE.md
2
+
3
+ This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4
+
5
+ ## Overview
6
+
7
+ PyReduce is a Python port of the REDUCE echelle spectrograph data reduction pipeline. It processes raw astronomical observations from instruments like HARPS, UVES, XSHOOTER, CRIRES+, JWST/NIRISS and others into calibrated 1D spectra.
8
+
9
+ ## Quick Start
10
+
11
+ ```bash
12
+ # Install
13
+ uv sync
14
+
15
+ # Download example data
16
+ uv run reduce download UVES
17
+
18
+ # Run example
19
+ PYREDUCE_PLOT=0 uv run python examples/uves_example.py
20
+
21
+ # Or use CLI
22
+ uv run reduce run UVES HD132205 --steps bias,flat,orders,science
23
+ ```
24
+
25
+ ## Package Structure
26
+
27
+ ```
28
+ pyreduce/
29
+ ├── __main__.py # Click CLI entry point
30
+ ├── pipeline.py # Pipeline API (recommended entry point)
31
+ ├── reduce.py # Step class implementations
32
+ ├── configuration.py # Config loading (settings JSON)
33
+ ├── extract.py # Optimal extraction algorithm
34
+ ├── trace_orders.py # Order detection and tracing
35
+ ├── wavelength_calibration.py # Wavelength solution fitting
36
+ ├── combine_frames.py # Frame combination/calibration
37
+ ├── echelle.py # Echelle spectrum I/O
38
+ ├── util.py # Utilities, plotting helpers
39
+ ├── cwrappers.py # CFFI C extension wrappers
40
+
41
+ ├── instruments/ # Instrument definitions
42
+ │ ├── common.py # Base Instrument class
43
+ │ ├── models.py # Pydantic config models
44
+ │ ├── instrument_info.py # Instrument loader
45
+ │ ├── *.yaml # Instrument configs (one per instrument)
46
+ │ └── *.py # Custom instrument logic (optional)
47
+
48
+ ├── settings/ # Reduction parameters
49
+ │ ├── settings_default.json
50
+ │ └── settings_*.json # Per-instrument settings
51
+
52
+ └── clib/ # C source for extraction
53
+ ├── slit_func_bd.c
54
+ └── slit_func_2d_xi_zeta_bd.c
55
+ ```
56
+
57
+ ## Pipeline Steps
58
+
59
+ The reduction pipeline consists of these steps (in typical order):
60
+
61
+ | Step | Class | Description |
62
+ |------|-------|-------------|
63
+ | `mask` | `Mask` | Load bad pixel mask for detector |
64
+ | `bias` | `Bias` | Combine bias frames into master bias |
65
+ | `flat` | `Flat` | Combine flat frames, subtract bias |
66
+ | `orders` | `OrderTracing` | Trace echelle order positions on flat |
67
+ | `curvature` | `SlitCurvatureDetermination` | Measure slit tilt/shear from arc lamp |
68
+ | `scatter` | `BackgroundScatter` | Model inter-order scattered light |
69
+ | `norm_flat` | `NormalizeFlatField` | Normalize flat, extract blaze function |
70
+ | `wavecal_master` | `WavelengthCalibrationMaster` | Extract wavelength calibration spectrum |
71
+ | `wavecal_init` | `WavelengthCalibrationInitialize` | Initial line identification |
72
+ | `wavecal` | `WavelengthCalibrationFinalize` | Refine wavelength solution |
73
+ | `freq_comb_master` | `LaserFrequencyCombMaster` | Extract frequency comb spectrum |
74
+ | `freq_comb` | `LaserFrequencyCombFinalize` | Apply frequency comb calibration |
75
+ | `science` | `ScienceExtraction` | Optimally extract science spectra |
76
+ | `continuum` | `ContinuumNormalization` | Fit and normalize continuum |
77
+ | `finalize` | `Finalize` | Write final FITS output |
78
+
79
+ Each step class has:
80
+ - `run(files, **dependencies)` - Execute the step
81
+ - `save(...)` - Save results to disk
82
+ - `load(...)` - Load previous results
83
+ - `dependsOn` - List of required prior steps
84
+ - `savefile` - Output file path
85
+
86
+ ## Configuration System
87
+
88
+ ### Instrument Configs (YAML)
89
+
90
+ Location: `pyreduce/instruments/*.yaml`
91
+
92
+ Defines what the instrument IS - hardware properties and header mappings:
93
+
94
+ ```yaml
95
+ # Basic identification
96
+ instrument: HARPS
97
+ telescope: ESO-3.6m
98
+ arms: [red, blue]
99
+
100
+ # Detector properties
101
+ naxis: [4096, 4096]
102
+ orientation: 4
103
+ extension: 0
104
+ gain: ESO DET OUT1 CONAD # Header keyword or literal value
105
+ readnoise: ESO DET OUT1 RON
106
+ dark: 0
107
+
108
+ # Header keyword mappings (instrument → internal name)
109
+ date: DATE-OBS
110
+ target: ESO OBS TARG NAME
111
+ instrument_mode: ESO INS MODE
112
+ exposure_time: EXPTIME
113
+ ra: RA
114
+ dec: DEC
115
+ jd: MJD-OBS
116
+
117
+ # File classification keywords
118
+ kw_bias: ESO DPR TYPE
119
+ kw_flat: ESO DPR TYPE
120
+ kw_wave: ESO DPR TYPE
121
+ kw_spec: ESO DPR TYPE
122
+ id_bias: BIAS
123
+ id_flat: FLAT.*
124
+ id_wave: WAVE,THAR
125
+ id_spec: OBJECT
126
+ ```
127
+
128
+ Validated by Pydantic model `InstrumentConfig` in `models.py`.
129
+
130
+ ### Reduction Settings (JSON)
131
+
132
+ Location: `pyreduce/settings/settings_*.json`
133
+
134
+ Defines HOW to reduce - algorithm parameters per step:
135
+
136
+ ```json
137
+ {
138
+ "bias": {
139
+ "degree": 0
140
+ },
141
+ "orders": {
142
+ "degree": 4,
143
+ "noise": 100,
144
+ "min_cluster": 500,
145
+ "filter_size": 120
146
+ },
147
+ "norm_flat": {
148
+ "extraction_width": 0.5,
149
+ "smooth_slitfunction": 1,
150
+ "oversampling": 10
151
+ },
152
+ "wavecal": {
153
+ "degree": [6, 6],
154
+ "threshold": 100,
155
+ "iterations": 3
156
+ },
157
+ "science": {
158
+ "extraction_method": "optimal",
159
+ "extraction_width": 0.5,
160
+ "oversampling": 10
161
+ }
162
+ }
163
+ ```
164
+
165
+ Settings cascade: `settings_default.json` < `settings_INSTRUMENT.json` < runtime overrides.
166
+
167
+ ## Python API
168
+
169
+ ### Recommended: Pipeline.from_instrument()
170
+
171
+ ```python
172
+ from pyreduce.pipeline import Pipeline
173
+
174
+ result = Pipeline.from_instrument(
175
+ instrument="UVES",
176
+ target="HD132205",
177
+ night="2010-04-01",
178
+ arm="middle",
179
+ steps=("bias", "flat", "orders", "science"),
180
+ base_dir="/data",
181
+ plot=1,
182
+ ).run()
183
+ ```
184
+
185
+ This handles:
186
+ - Loading instrument config
187
+ - Finding and sorting input files
188
+ - Setting up output directory
189
+ - Running requested steps
190
+
191
+ ### Manual Pipeline Construction
192
+
193
+ ```python
194
+ from pyreduce.pipeline import Pipeline
195
+
196
+ pipe = Pipeline(
197
+ instrument="UVES",
198
+ output_dir="/output",
199
+ arm="middle",
200
+ plot=0,
201
+ )
202
+ pipe.bias(bias_files)
203
+ pipe.flat(flat_files)
204
+ pipe.trace_orders()
205
+ pipe.extract(science_files)
206
+ result = pipe.run()
207
+ ```
208
+
209
+ ### Legacy API (deprecated)
210
+
211
+ ```python
212
+ import pyreduce
213
+ pyreduce.reduce.main(
214
+ instrument="UVES",
215
+ target="HD132205",
216
+ ...
217
+ ) # Shows deprecation warning
218
+ ```
219
+
220
+ ## CLI Commands
221
+
222
+ ```bash
223
+ # Full pipeline
224
+ uv run reduce run UVES HD132205 --steps bias,flat,orders
225
+
226
+ # Individual steps (top-level commands)
227
+ uv run reduce bias UVES HD132205
228
+ uv run reduce orders UVES HD132205
229
+ uv run reduce wavecal UVES HD132205
230
+
231
+ # Combine reduced spectra
232
+ uv run reduce combine --output combined.fits *.final.fits
233
+
234
+ # Download sample data
235
+ uv run reduce download UVES
236
+
237
+ # List steps
238
+ uv run reduce list-steps
239
+ ```
240
+
241
+ ## Environment Variables
242
+
243
+ - `REDUCE_DATA` - Base data directory (default: `~/REDUCE_DATA`)
244
+ - `PYREDUCE_PLOT` - Override plot level (0, 1, 2)
245
+ - `PYREDUCE_PLOT_DIR` - Save plots to directory instead of displaying
246
+
247
+ ## Development
248
+
249
+ ### Commands
250
+
251
+ ```bash
252
+ uv sync # Install dependencies
253
+ uv run pre-commit install # Setup hooks (once)
254
+ uv run pytest -m unit # Fast unit tests
255
+ uv run pytest --instrument=UVES # Test single instrument
256
+ uv run ruff check --fix . # Lint and fix
257
+ ```
258
+
259
+ ### Adding Instruments
260
+
261
+ 1. Create `pyreduce/instruments/name.yaml` with detector/header config
262
+ 2. Create `pyreduce/instruments/name.py` if custom logic needed (optional)
263
+ 3. Create `pyreduce/settings/settings_NAME.json` for reduction parameters
264
+ 4. Add example script to `examples/name_example.py`
265
+
266
+ ### Test Organization
267
+
268
+ - `@pytest.mark.unit` - Fast tests with synthetic data (~40 tests)
269
+ - `@pytest.mark.instrument` - Integration tests with real data (~70 tests)
270
+ - `@pytest.mark.slow` - Long-running tests (wavecal, continuum)
271
+
272
+ ## Key Files
273
+
274
+ | File | Purpose |
275
+ |------|---------|
276
+ | `pyreduce/__main__.py` | Click CLI entry point |
277
+ | `pyreduce/pipeline.py` | Fluent Pipeline API, `from_instrument()` |
278
+ | `pyreduce/reduce.py` | Step class implementations |
279
+ | `pyreduce/extract.py` | Optimal extraction algorithm |
280
+ | `pyreduce/wavelength_calibration.py` | Wavelength solution fitting |
281
+ | `pyreduce/trace_orders.py` | Order detection and tracing |
282
+ | `pyreduce/instruments/common.py` | Base Instrument class |
283
+ | `pyreduce/instruments/models.py` | Pydantic config models |
284
+ | `pyreduce/clib/*.c` | C code for slit function decomposition |
285
+ | `hatch_build.py` | CFFI extension build hook |
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyreduce-astro
3
- Version: 0.7a1
3
+ Version: 0.7a3
4
4
  Summary: A data reduction package for echelle spectrographs
5
5
  Project-URL: Homepage, https://github.com/ivh/PyReduce
6
6
  Project-URL: Documentation, https://pyreduce-astro.readthedocs.io
@@ -40,14 +40,6 @@ Requires-Dist: scipy>=1.11.0
40
40
  Requires-Dist: spectres>=2.2.0
41
41
  Requires-Dist: tqdm>=4.66.0
42
42
  Requires-Dist: wget>=3.2
43
- Provides-Extra: dev
44
- Requires-Dist: myst-parser>=3.0.0; extra == 'dev'
45
- Requires-Dist: pre-commit>=3.5.0; extra == 'dev'
46
- Requires-Dist: pytest-cov>=4.1.0; extra == 'dev'
47
- Requires-Dist: pytest>=7.4.0; extra == 'dev'
48
- Requires-Dist: ruff>=0.8.0; extra == 'dev'
49
- Requires-Dist: setuptools; extra == 'dev'
50
- Requires-Dist: sphinx>=7.2.0; extra == 'dev'
51
43
  Description-Content-Type: text/markdown
52
44
 
53
45
  [![CI](https://github.com/ivh/PyReduce/actions/workflows/python-publish.yml/badge.svg)](https://github.com/ivh/PyReduce/actions/workflows/python-publish.yml)
@@ -0,0 +1,130 @@
1
+ ![Python application](https://github.com/nadsabha/PyReduce_ELT/workflows/Python%20application/badge.svg)
2
+ [![Documentation Status](https://readthedocs.org/projects/pyreduce-astro/badge/?version=latest)](https://pyreduce-astro.readthedocs.io/en/latest/?badge=latest)
3
+ [![Updates](https://pyup.io/repos/github/nadsabha/PyReduce_ELT/shield.svg)](https://pyup.io/repos/github/nadsabha/PyReduce_ELT/)
4
+
5
+ # PyREDUCE_ELT
6
+
7
+ PyReduce_ELT is an adapted branch of the PyReduce package optimised to handle ScopeSim-simulated ELT data for MICADO and METIS (optimized for LSS_M mode only for now) instruments. Only the relevant information pertaining to operating PyReduce on ELT MICADO and METIS data are addressed in this README file, while all details of the original PyReduce package can be found in this [README.md](https://github.com/AWehrhahn/PyReduce/blob/master/README.md).
8
+
9
+
10
+ Installation
11
+ ------------
12
+
13
+ The most up-to-date version can be installed using python 3 command:
14
+ ```
15
+ pip install git+https://github.com/nadsabha/PyReduce_ELT
16
+ ```
17
+
18
+ PyReduce uses CFFI to link to the C code, on non-linux platforms you might have to install libffi.
19
+ See also https://cffi.readthedocs.io/en/latest/installation.html#platform-specific-instructions for details.
20
+
21
+ Output Format
22
+ -------------
23
+ PyReduce will create ``.ech`` files when run. Despite the name those are just regular ``.fits`` files and can be opened with any programm that can read ``.fits``. The data is contained in a table extension. The header contains all the keywords of the input science file, plus some extra PyReduce specific keyword, all of which start with ``e_``.
24
+
25
+ Other PyReduce outputs are ``.npz`` files. These are numpy recarrays and can be opened as in the example copied below:
26
+ ```
27
+ file_py_wave='metis_lss_m.thar.npz'
28
+ data_npz_py_wave = np.load(file_py_wave, allow_pickle=True)
29
+ #load wave_cal npz file
30
+ lst = data_npz_py_wave.files
31
+ print(lst)
32
+ for item in lst:
33
+ print(item)
34
+ print(data_npz_py_wave[item])
35
+ # or
36
+ wave=data_npz_py_wave['wave']
37
+ coef=data_npz_py_wave['coef']
38
+ ```
39
+
40
+ How To
41
+ ------
42
+ PyReduce can be run using the provided example files, e.g.:
43
+ for MICADO ``examples/micado_example.py``,
44
+ for METIS ``examples/metis_example.py``.
45
+
46
+ In this example script, we first define the instrument and instrument mode (``LSS_M`` for METIS). Then the path to where the data are located is defined, as well as the output directory. Lastly, all the specific settings of the reduction (e.g. polynomial degrees of various fits) are defined in the json configuration files [settings_MICADO.json](https://github.com/nadsabha/PyReduce_ELT/blob/master/pyreduce/settings/settings_MICADO.json), [settings_METIS.json](https://github.com/nadsabha/PyReduce_ELT/blob/master/pyreduce/settings/settings_METIS.json), or alternatively directly within the script by adding, e.g. ``config["curvature"]["extraction_width"] = 0.77``, ``config["wavecal"]["dimensionality"] = "1D"``, etc.
47
+
48
+ Explanation of the settings paratemters can be found in [settings_schema.json](https://github.com/nadsabha/PyReduce_ELT/blob/master/pyreduce/settings/settings_schema.json).
49
+
50
+ The steps of the reduction desired to be performed are then specified. Steps that are not specified, but are still required, will be loaded from previous runs if possible, or executed otherwise.
51
+ All of this is then passed to pyreduce.reduce.main to start the reduction.
52
+
53
+ In this example, PyReduce will plot all intermediary results, and also plot the progres during some of the steps. Close them to continue calculations. Once you are statisified with the results you can disable them in [settings_MICADO.json](https://github.com/nadsabha/PyReduce_ELT/blob/master/pyreduce/settings/settings_MICADO.json) or [settings_METIS.json](https://github.com/nadsabha/PyReduce_ELT/blob/master/pyreduce/settings/settings_METIS.json) (with ``plot : false`` in each step) to speed up the computation.
54
+
55
+ Relevant for MICADO:
56
+
57
+ Please note that in the micado example file it is specified to return only the order trace corresponding to the center of the order on MICADO (HK band) files, i.e. fit number 4 (or 3 as per Python convention counted from bottom to up) of the traces on the pinhole frame.
58
+
59
+ Relevant for METIS:
60
+
61
+ Please note that reduce.py main script is modified to return only the order trace corresponding to the center of the slit trace on METIS LSS files, i.e. fit number 17 (or 16 as per Python convention counted from bottom to up) of the traces on the pinhole frame.
62
+
63
+ Input Data
64
+ ------
65
+
66
+ MICADO data:
67
+
68
+ Input simulated MICADO 'raw' data can be downloaded directly from this [link](https://www.dropbox.com/sh/e3lnvtkmyjveajk/AABPHxeUdDO5AnkWCAjbM0e1a?dl=0) and placed in the input file path defined in [micado_example.py](https://github.com/nadsabha/PyReduce_ELT/blob/master/examples/micado_example.py). The files include:
69
+
70
+ • FF_detector_SPEC_3000x20_Spec_HK.fits: spectroscopic flatfield
71
+
72
+ • PINHOLE_detector_SPEC_3000x20_Spec_HK.fits: pinhole frame with the flatfiled lamp
73
+
74
+ • LL_detector_SPEC_3000x20_Spec_HK.fits: linelamp spectrum full slit
75
+
76
+ • detector_final_delta.fits: linelamp spectrum that acts as a "science" target to make pyreduce run
77
+
78
+ METIS data:
79
+
80
+ Input simulated METIS 'raw' data can be downloaded directly from this [link](https://www.dropbox.com/sh/h1dz80vsw4lwoel/AAAqJD_FGDGC-t12wgnPXVR8a?dl=0) and placed in the input file path defined in [metis_example.py](https://github.com/nadsabha/PyReduce_ELT/blob/master/examples/metis_example.py). The files include:
81
+
82
+ • lss_m_thermal.fits: spectroscopic flat field
83
+
84
+ • lss_m_pinholes.fits: pinhole frame with the flat field, used for order/trace detection and fit
85
+
86
+ • lss_m_sky.fits: sky emission line spectrum covering the full slit, used for curvature determination and the wavelength calibration
87
+
88
+ • lss_m_star.fits: sky emission line spectrum covering the full slit with a star spectrum "science" frame
89
+
90
+ Reference Papers
91
+ ------
92
+ The original REDUCE paper: [doi:10.1051/0004-6361:20020175](https://doi.org/10.1051/0004-6361:20020175)
93
+
94
+ A paper describing the changes and updates of PyReduce can be found here: [https://ui.adsabs.harvard.edu/abs/2021A%26A...646A..32P/abstract](https://ui.adsabs.harvard.edu/abs/2021A%26A...646A..32P/abstract)
95
+
96
+
97
+ Diff to reduce.py that was removed when merging
98
+ ------
99
+
100
+ diff --git a/pyreduce/reduce.py b/pyreduce/reduce.py
101
+ index ba2c639..f7c2772 100755
102
+ --- a/pyreduce/reduce.py
103
+ +++ b/pyreduce/reduce.py
104
+ @@ -764,6 +764,26 @@ class OrderTracing(CalibrationStep):
105
+ plot_title=self.plot_title,
106
+ )
107
+
108
+ + # NBS: BEGINNING of fix for MICADO and METIS pinholes
109
+ + print('#NBS:here!!!')
110
+ + print(orders.shape) #NBS
111
+ +
112
+ + # if len(orders) == 7:
113
+ + # orders=orders[3] #NBS: MICADO fix if only 1 order on the detector, use [3::7] if 2 orders present
114
+ + # orders = orders.reshape((1, 5))#NBS: to reshape it
115
+ + # print(orders.shape) #NBS
116
+ +
117
+ + # if len(orders) == 14:
118
+ + # orders=orders[3::7] #NBS: MICADO fix if 2 orders on the detector
119
+ + # print(orders.shape) #NBS
120
+ +
121
+ + if len(orders) == 33:
122
+ + orders=orders[16] #NBS: METIS fix For MICADO if only 1 order on the detector, use [3::7] if 2 orders present
123
+ + orders = orders.reshape((1, 5))#NBS: to reshape it
124
+ + print(orders.shape) #NBS
125
+ +
126
+ + # NBS: END of fix for MICADO and METIS pinholes
127
+ +
128
+ self.save(orders, column_range)
129
+
130
+ return orders, column_range
@@ -0,0 +1,56 @@
1
+ {
2
+ "@context": [
3
+ "https://w3id.org/codemeta/2.0",
4
+ "http://schema.org"
5
+ ],
6
+ "@type": "SoftwareSourceCode",
7
+ "identifier": "pyreduce-astro",
8
+ "name": "pyreduce-astro",
9
+ "version": "0.6-dev",
10
+ "description": "A data reduction package for echelle spectrographs",
11
+ "license": "GPL-3.0",
12
+ "author": [{
13
+ "@type": "Person",
14
+ "givenName": "Thomas",
15
+ "familyName": "Marquart",
16
+ "email": "thomas.marquart@astro.uu.se"
17
+ },{
18
+ "@type": "Person",
19
+ "givenName": "Ansgar",
20
+ "familyName": "Wehrhahn",
21
+ "email": "ansgar.wehrhahn@physics.uu.se"
22
+ },
23
+ {
24
+ "@type": "Person",
25
+ "givenName": "Nikolai",
26
+ "familyName": "Piskunov",
27
+ "email": "nikolai.piskunov@physics.uu.se"
28
+ }],
29
+ "provider": {
30
+ "@id": "https://pypi.org",
31
+ "@type": "Organization",
32
+ "name": "The Python Package Index",
33
+ "url": "https://pypi.org"
34
+ },
35
+ "runtimePlatform": "Python 3",
36
+ "url": "https://github.com/ivh/PyReduce",
37
+ "codeRepository": "https://github.com/ivh/PyReduce",
38
+ "programmingLanguage": {
39
+ "@type": "ComputerLanguage",
40
+ "name": "Python",
41
+ "version": "3"
42
+ },
43
+ "operatingSystem": "POSIX :: Linux",
44
+ "interfaceType": "library",
45
+ "developmentStatus": "active",
46
+ "dateCreated": "2019-01-01",
47
+ "dateModified": "2025-02-19",
48
+ "keywords": [
49
+ "astronomy",
50
+ "spectroscopy",
51
+ "data reduction",
52
+ "echelle"
53
+ ],
54
+ "contIntegration": "https://github.com/ivh/PyReduce/actions",
55
+ "issueTracker": "https://github.com/ivh/PyReduce/issues"
56
+ }