pyreduce-astro 0.7a6__tar.gz → 0.7a7__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 (197) hide show
  1. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/CHANGELOG.md +9 -0
  2. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/CLAUDE.md +52 -2
  3. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/PKG-INFO +2 -2
  4. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/README.md +1 -1
  5. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/examples/aj_example.py +43 -3
  6. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/examples/crires_plus_example.py +1 -1
  7. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/examples/custom_instrument_example.py +1 -1
  8. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/examples/harpn_example.py +1 -1
  9. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/examples/harps_example.py +1 -1
  10. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/examples/harps_gridsearch.py +2 -2
  11. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/examples/just_one_swath.py +1 -1
  12. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/examples/jwst_miri_example.py +1 -1
  13. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/examples/jwst_niriss_example.py +1 -1
  14. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/examples/lick_apf_example.py +1 -1
  15. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/examples/mcdonald_example.py +1 -1
  16. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/examples/metis_ifu_example.py +1 -1
  17. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/examples/metis_lss_example.py +1 -1
  18. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/examples/micado_example.py +3 -3
  19. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/examples/neid_example.py +1 -1
  20. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/examples/nirspec_example.py +1 -1
  21. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/examples/toes_example.py +3 -3
  22. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/examples/uves_callfunc.py +1 -1
  23. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/examples/uves_example.py +1 -1
  24. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/examples/xshooter_example.py +1 -1
  25. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyproject.toml +1 -1
  26. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/__main__.py +34 -4
  27. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/configuration.py +20 -0
  28. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/estimate_background_scatter.py +8 -8
  29. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/extract.py +126 -126
  30. pyreduce_astro-0.7a6/pyreduce/extraction_width.py → pyreduce_astro-0.7a7/pyreduce/extraction_height.py +4 -4
  31. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/make_shear.py +12 -12
  32. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/rectify.py +10 -10
  33. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/reduce.py +9 -9
  34. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/settings/settings_AJ.json +1 -1
  35. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/settings/settings_ANDES.json +6 -6
  36. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/settings/settings_CRIRES_PLUS.json +6 -6
  37. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/settings/settings_HARPN.json +6 -6
  38. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/settings/settings_HARPS.json +6 -6
  39. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/settings/settings_JWST_MIRI.json +6 -6
  40. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/settings/settings_JWST_NIRISS.json +6 -6
  41. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/settings/settings_LICK_APF.json +6 -6
  42. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/settings/settings_MCDONALD.json +6 -6
  43. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/settings/settings_METIS_IFU.json +6 -6
  44. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/settings/settings_METIS_LSS.json +6 -6
  45. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/settings/settings_MICADO.json +6 -6
  46. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/settings/settings_NEID.json +6 -6
  47. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/settings/settings_NIRSPEC.json +6 -6
  48. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/settings/settings_NTE.json +5 -5
  49. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/settings/settings_UVES.json +3 -3
  50. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/settings/settings_XSHOOTER.json +4 -4
  51. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/settings/settings_pyreduce.json +7 -7
  52. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/settings/settings_schema.json +7 -7
  53. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/uv.lock +1 -1
  54. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/.gitattributes +0 -0
  55. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/.gitignore +0 -0
  56. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/.pre-commit-config.yaml +0 -0
  57. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/.python-version +0 -0
  58. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/.readthedocs.yaml +0 -0
  59. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/AGENTS.md +0 -0
  60. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/LICENSE +0 -0
  61. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/hatch_build.py +0 -0
  62. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/__init__.py +0 -0
  63. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/cli.py +0 -0
  64. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/clib/__init__.py +0 -0
  65. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/clib/build_extract.py +0 -0
  66. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/clib/slit_func_2d_xi_zeta_bd.c +0 -0
  67. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/clib/slit_func_2d_xi_zeta_bd.h +0 -0
  68. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/clib/slit_func_bd.c +0 -0
  69. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/clib/slit_func_bd.h +0 -0
  70. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/clipnflip.py +0 -0
  71. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/combine_frames.py +0 -0
  72. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/continuum_normalization.py +0 -0
  73. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/cwrappers.py +0 -0
  74. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/datasets.py +0 -0
  75. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/echelle.py +0 -0
  76. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/instruments/__init__.py +0 -0
  77. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/instruments/aj.py +0 -0
  78. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/instruments/aj.yaml +0 -0
  79. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/instruments/andes.py +0 -0
  80. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/instruments/andes.yaml +0 -0
  81. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/instruments/common.py +0 -0
  82. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/instruments/common.yaml +0 -0
  83. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/instruments/crires_plus.py +0 -0
  84. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/instruments/crires_plus.yaml +0 -0
  85. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/instruments/filters.py +0 -0
  86. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/instruments/harpn.py +0 -0
  87. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/instruments/harpn.yaml +0 -0
  88. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/instruments/harps.py +0 -0
  89. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/instruments/harps.yaml +0 -0
  90. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/instruments/instrument_info.py +0 -0
  91. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/instruments/jwst_miri.py +0 -0
  92. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/instruments/jwst_miri.yaml +0 -0
  93. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/instruments/jwst_niriss.py +0 -0
  94. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/instruments/jwst_niriss.yaml +0 -0
  95. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/instruments/lick_apf.py +0 -0
  96. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/instruments/lick_apf.yaml +0 -0
  97. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/instruments/mcdonald.py +0 -0
  98. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/instruments/mcdonald.yaml +0 -0
  99. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/instruments/metis_ifu.py +0 -0
  100. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/instruments/metis_ifu.yaml +0 -0
  101. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/instruments/metis_lss.py +0 -0
  102. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/instruments/metis_lss.yaml +0 -0
  103. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/instruments/micado.py +0 -0
  104. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/instruments/micado.yaml +0 -0
  105. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/instruments/models.py +0 -0
  106. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/instruments/neid.py +0 -0
  107. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/instruments/neid.yaml +0 -0
  108. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/instruments/nirspec.py +0 -0
  109. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/instruments/nirspec.yaml +0 -0
  110. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/instruments/nte.py +0 -0
  111. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/instruments/nte.yaml +0 -0
  112. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/instruments/uves.py +0 -0
  113. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/instruments/uves.yaml +0 -0
  114. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/instruments/xshooter.py +0 -0
  115. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/instruments/xshooter.yaml +0 -0
  116. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/masks/mask_crires_plus_det1.fits.gz +0 -0
  117. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/masks/mask_crires_plus_det2.fits.gz +0 -0
  118. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/masks/mask_crires_plus_det3.fits.gz +0 -0
  119. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/masks/mask_ctio_chiron.fits.gz +0 -0
  120. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/masks/mask_elodie.fits.gz +0 -0
  121. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/masks/mask_feros3.fits.gz +0 -0
  122. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/masks/mask_flames_giraffe.fits.gz +0 -0
  123. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/masks/mask_harps_blue.fits.gz +0 -0
  124. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/masks/mask_harps_red.fits.gz +0 -0
  125. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/masks/mask_hds_blue.fits.gz +0 -0
  126. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/masks/mask_hds_red.fits.gz +0 -0
  127. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/masks/mask_het_hrs_2x5.fits.gz +0 -0
  128. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/masks/mask_jwst_miri_lrs_slitless.fits.gz +0 -0
  129. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/masks/mask_jwst_niriss_gr700xd.fits.gz +0 -0
  130. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/masks/mask_lick_apf_.fits.gz +0 -0
  131. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/masks/mask_mcdonald.fits.gz +0 -0
  132. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/masks/mask_nes.fits.gz +0 -0
  133. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/masks/mask_nirspec_nirspec.fits.gz +0 -0
  134. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/masks/mask_sarg.fits.gz +0 -0
  135. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/masks/mask_sarg_2x2a.fits.gz +0 -0
  136. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/masks/mask_sarg_2x2b.fits.gz +0 -0
  137. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/masks/mask_subaru_hds_red.fits.gz +0 -0
  138. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/masks/mask_uves_blue.fits.gz +0 -0
  139. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/masks/mask_uves_blue_binned_2_2.fits.gz +0 -0
  140. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/masks/mask_uves_middle.fits.gz +0 -0
  141. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/masks/mask_uves_middle_2x2_split.fits.gz +0 -0
  142. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/masks/mask_uves_middle_binned_2_2.fits.gz +0 -0
  143. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/masks/mask_uves_red.fits.gz +0 -0
  144. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/masks/mask_uves_red_2x2.fits.gz +0 -0
  145. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/masks/mask_uves_red_2x2_split.fits.gz +0 -0
  146. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/masks/mask_uves_red_binned_2_2.fits.gz +0 -0
  147. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/masks/mask_xshooter_nir.fits.gz +0 -0
  148. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/pipeline.py +0 -0
  149. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/tools/__init__.py +0 -0
  150. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/tools/combine.py +0 -0
  151. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/trace.py +0 -0
  152. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/util.py +0 -0
  153. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/wavecal/MICADO_HK_3arcsec_chip5.npz +0 -0
  154. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/wavecal/atlas/thar.fits +0 -0
  155. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/wavecal/atlas/thar_list.txt +0 -0
  156. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/wavecal/atlas/une.fits +0 -0
  157. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/wavecal/convert.py +0 -0
  158. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/wavecal/crires_plus_J1228_det1.npz +0 -0
  159. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/wavecal/crires_plus_J1228_det2.npz +0 -0
  160. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/wavecal/crires_plus_J1228_det3.npz +0 -0
  161. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/wavecal/harpn_harpn_2D.npz +0 -0
  162. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/wavecal/harps_blue_2D.npz +0 -0
  163. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/wavecal/harps_blue_pol_2D.npz +0 -0
  164. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/wavecal/harps_red_2D.npz +0 -0
  165. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/wavecal/harps_red_pol_2D.npz +0 -0
  166. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/wavecal/mcdonald.npz +0 -0
  167. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/wavecal/metis_lss_l_2D.npz +0 -0
  168. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/wavecal/metis_lss_m_2D.npz +0 -0
  169. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/wavecal/nirspec_K2.npz +0 -0
  170. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/wavecal/uves_blue_360nm_2D.npz +0 -0
  171. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/wavecal/uves_blue_390nm_2D.npz +0 -0
  172. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/wavecal/uves_blue_437nm_2D.npz +0 -0
  173. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/wavecal/uves_middle_2x2_2D.npz +0 -0
  174. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/wavecal/uves_middle_565nm_2D.npz +0 -0
  175. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/wavecal/uves_middle_580nm_2D.npz +0 -0
  176. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/wavecal/uves_middle_600nm_2D.npz +0 -0
  177. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/wavecal/uves_middle_665nm_2D.npz +0 -0
  178. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/wavecal/uves_middle_860nm_2D.npz +0 -0
  179. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/wavecal/uves_red_580nm_2D.npz +0 -0
  180. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/wavecal/uves_red_600nm_2D.npz +0 -0
  181. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/wavecal/uves_red_665nm_2D.npz +0 -0
  182. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/wavecal/uves_red_760nm_2D.npz +0 -0
  183. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/wavecal/uves_red_860nm_2D.npz +0 -0
  184. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/wavecal/xshooter_nir.npz +0 -0
  185. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/pyreduce/wavelength_calibration.py +0 -0
  186. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/tools/argon.line +0 -0
  187. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/tools/bpm_creator.py +0 -0
  188. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/tools/create_wavelength_guess.py +0 -0
  189. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/tools/download_files.py +0 -0
  190. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/tools/ipy_startup.py +0 -0
  191. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/tools/neon.lin +0 -0
  192. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/tools/neon.line +0 -0
  193. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/tools/pymultispec.py +0 -0
  194. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/tools/thar.npz +0 -0
  195. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/tools/wavecal_creator.py +0 -0
  196. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/tools/wavecal_creator_from_existing.py +0 -0
  197. {pyreduce_astro-0.7a6 → pyreduce_astro-0.7a7}/tools/xshooter_nir.json +0 -0
@@ -1,6 +1,15 @@
1
1
  # Changelog
2
2
 
3
3
 
4
+ ## [0.7a7] - 2026-01-04
5
+
6
+ ### Added
7
+ - `--settings` option for CLI to override reduction parameters from JSON file
8
+
9
+ ### Changed
10
+ - Rename `extraction_width` to `extraction_height` in settings (clarifies coordinate system)
11
+ - Rename `orders` to `traces` in extract.py internal API
12
+
4
13
  ## [0.7a6] - 2026-01-03
5
14
 
6
15
  ### Added
@@ -54,6 +54,16 @@ pyreduce/
54
54
  └── slit_func_2d_xi_zeta_bd.c
55
55
  ```
56
56
 
57
+ ## Image Coordinate Convention
58
+
59
+ PyReduce uses the convention that **dispersion runs horizontally (along x-axis)** and **cross-dispersion runs vertically (along y-axis)**. The `clipnflip()` function in `instruments/common.py` rotates and flips raw images to ensure this orientation.
60
+
61
+ This means:
62
+ - **Columns (x)** = wavelength/dispersion direction
63
+ - **Rows (y)** = spatial/cross-dispersion direction
64
+ - **Traces** are polynomial functions of x, giving y-position
65
+ - **`extraction_height`** refers to pixels above/below each trace (in y)
66
+
57
67
  ## Pipeline Steps
58
68
 
59
69
  The reduction pipeline consists of these steps (in typical order):
@@ -145,7 +155,7 @@ Defines HOW to reduce - algorithm parameters per step:
145
155
  "filter_size": 120
146
156
  },
147
157
  "norm_flat": {
148
- "extraction_width": 0.5,
158
+ "extraction_height": 0.5,
149
159
  "smooth_slitfunction": 1,
150
160
  "oversampling": 10
151
161
  },
@@ -156,7 +166,7 @@ Defines HOW to reduce - algorithm parameters per step:
156
166
  },
157
167
  "science": {
158
168
  "extraction_method": "optimal",
159
- "extraction_width": 0.5,
169
+ "extraction_height": 0.5,
160
170
  "oversampling": 10
161
171
  }
162
172
  }
@@ -283,3 +293,43 @@ uv run ruff check --fix . # Lint and fix
283
293
  | `pyreduce/instruments/models.py` | Pydantic config models |
284
294
  | `pyreduce/clib/*.c` | C code for slit function decomposition |
285
295
  | `hatch_build.py` | CFFI extension build hook |
296
+
297
+ ## Release Process
298
+
299
+ To release a new version (e.g., `0.7a6`):
300
+
301
+ 1. **Update documentation** for any renamed steps, new CLI options, etc:
302
+ - `README.md` - Quick start examples
303
+ - `docs/cli.md` - CLI reference
304
+ - `docs/index.md`, `docs/howto.md`, `docs/examples.md` - Usage examples
305
+ - `docs/configuration_file.md` - Config key names
306
+
307
+ 2. **Update CHANGELOG.md** with release date and changes
308
+
309
+ 3. **Update version** in `pyproject.toml`
310
+
311
+ 3a. **sync** - run `uv sync` to get the new version into uv.lock
312
+
313
+ 4. **Update example headers** - all `examples/*.py` have PEP 723 metadata:
314
+ ```python
315
+ # /// script
316
+ # dependencies = ["pyreduce-astro>=0.7a6"]
317
+ # ///
318
+ ```
319
+
320
+ 5. **Commit, tag, and push**:
321
+ ```bash
322
+ git add -A && git commit -m "Release v0.7a6"
323
+ git tag v0.7a6
324
+ git push && git push --tags
325
+ ```
326
+
327
+ 6. **Monitor GitHub Actions** - the tag push triggers:
328
+ - Tests on Python 3.13
329
+ - Wheel builds (Linux, Windows, macOS)
330
+ - PyPI upload
331
+ - GitHub Release creation
332
+
333
+ ```bash
334
+ gh run watch # watch the triggered workflow
335
+ ```
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyreduce-astro
3
- Version: 0.7a6
3
+ Version: 0.7a7
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
@@ -101,4 +101,4 @@ Full documentation at [ReadTheDocs](https://pyreduce-astro.readthedocs.io/).
101
101
 
102
102
  ## Output
103
103
 
104
- PyReduce creates `.ech` files (standard FITS with binary table extension). Headers include original keywords plus PyReduce-specific ones prefixed with `e_`.
104
+ PyReduce creates `.fits` files (standard FITS with binary table extension). Headers include original keywords plus PyReduce-specific ones prefixed with `e_`.
@@ -59,4 +59,4 @@ Full documentation at [ReadTheDocs](https://pyreduce-astro.readthedocs.io/).
59
59
 
60
60
  ## Output
61
61
 
62
- PyReduce creates `.ech` files (standard FITS with binary table extension). Headers include original keywords plus PyReduce-specific ones prefixed with `e_`.
62
+ PyReduce creates `.fits` files (standard FITS with binary table extension). Headers include original keywords plus PyReduce-specific ones prefixed with `e_`.
@@ -1,6 +1,6 @@
1
1
  # /// script
2
2
  # requires-python = ">=3.13"
3
- # dependencies = ["pyreduce-astro>=0.7a6"]
3
+ # dependencies = ["pyreduce-astro>=0.7a7"]
4
4
  # ///
5
5
  """
6
6
  AJ instrument example: Fiber bundle tracing with direct function calls.
@@ -26,6 +26,7 @@ import os
26
26
 
27
27
  import numpy as np
28
28
 
29
+ from pyreduce.extract import extract
29
30
  from pyreduce.instruments.instrument_info import load_instrument
30
31
  from pyreduce.trace import group_and_refit, merge_traces, trace
31
32
 
@@ -41,6 +42,7 @@ orders_file = os.path.join(raw_dir, "ANDES_75fibre_J_orders.npz")
41
42
  # Output
42
43
  output_dir = os.path.expanduser("~/REDUCE_DATA/AJ/reduced")
43
44
  output_file = os.path.join(output_dir, "fiber_traces.npz")
45
+ output_blaze = os.path.join(output_dir, "fiber_blaze.npz")
44
46
 
45
47
  # Load order centers from npz file
46
48
  orders_data = np.load(orders_file)
@@ -65,7 +67,7 @@ trace_params = {
65
67
  "border_width": 0,
66
68
  "manual": False,
67
69
  "auto_merge_threshold": 1.0,
68
- "merge_min_threshold": 0.1,
70
+ "merge_min_threshold": 1.0, # 1.0 disables merging entirely
69
71
  "sigma": 0,
70
72
  "plot": 1,
71
73
  }
@@ -90,6 +92,10 @@ print(f" Shape: {img_even.shape}, dtype: {img_even.dtype}")
90
92
  print(f"Loading {file_odd}...")
91
93
  img_odd, head_odd = instrument.load_fits(file_odd, channel=channel, extension=0)
92
94
 
95
+ # Combine even and odd flats for extraction
96
+ img_combined = img_even.astype(np.float64) + img_odd.astype(np.float64)
97
+ print(f"Combined flat shape: {img_combined.shape}")
98
+
93
99
  # --- Step 2: Trace each flat independently ---
94
100
  print("\nTracing even-illuminated fibers...")
95
101
  traces_even, cr_even = trace(
@@ -166,4 +172,38 @@ else:
166
172
  save_dict["column_range"] = all_cr
167
173
 
168
174
  np.savez(output_file, **save_dict)
169
- print(f"\nSaved to: {output_file}")
175
+ print(f"\nSaved traces to: {output_file}")
176
+
177
+ # --- Step 6: Extract spectra from all fiber traces ---
178
+ # Flatten all traces into a single orders array for extraction
179
+ all_traces = np.vstack([traces_by_order[k] for k in sorted(traces_by_order.keys())])
180
+ all_cr = np.vstack([cr_by_order[k] for k in sorted(cr_by_order.keys())])
181
+ print(f"\nExtracting {len(all_traces)} fiber traces...")
182
+
183
+ # Extraction parameters
184
+ extract_params = {
185
+ "extraction_height": 0.5,
186
+ "lambda_sf": 0.1, # smooth_slitfunction
187
+ "lambda_sp": 0, # smooth_spectrum
188
+ "osample": 10, # oversampling
189
+ "swath_width": 200,
190
+ "plot": 1,
191
+ }
192
+
193
+ norm, spec, blaze, unc = extract(
194
+ img_combined,
195
+ all_traces,
196
+ column_range=all_cr,
197
+ extraction_type="normalize",
198
+ gain=1.0,
199
+ readnoise=0.0,
200
+ dark=0.0,
201
+ **extract_params,
202
+ )
203
+
204
+ print(f" Extracted blaze shape: {blaze.shape}")
205
+ print(f" Normalized flat shape: {norm.shape}")
206
+
207
+ # Save extraction results
208
+ np.savez(output_blaze, blaze=blaze, norm=norm, spec=spec, unc=unc)
209
+ print(f"Saved blaze to: {output_blaze}")
@@ -1,6 +1,6 @@
1
1
  # /// script
2
2
  # requires-python = ">=3.13"
3
- # dependencies = ["pyreduce-astro>=0.7a6"]
3
+ # dependencies = ["pyreduce-astro>=0.7a7"]
4
4
  # ///
5
5
  """
6
6
  Simple usage example for PyReduce
@@ -1,6 +1,6 @@
1
1
  # /// script
2
2
  # requires-python = ">=3.13"
3
- # dependencies = ["pyreduce-astro>=0.7a6"]
3
+ # dependencies = ["pyreduce-astro>=0.7a7"]
4
4
  # ///
5
5
  """
6
6
  Simple usage example for PyReduce
@@ -1,6 +1,6 @@
1
1
  # /// script
2
2
  # requires-python = ">=3.13"
3
- # dependencies = ["pyreduce-astro>=0.7a6"]
3
+ # dependencies = ["pyreduce-astro>=0.7a7"]
4
4
  # ///
5
5
  """
6
6
  Simple usage example for PyReduce
@@ -1,6 +1,6 @@
1
1
  # /// script
2
2
  # requires-python = ">=3.13"
3
- # dependencies = ["pyreduce-astro>=0.7a6"]
3
+ # dependencies = ["pyreduce-astro>=0.7a7"]
4
4
  # ///
5
5
  """
6
6
  Simple usage example for PyReduce
@@ -1,6 +1,6 @@
1
1
  # /// script
2
2
  # requires-python = ">=3.13"
3
- # dependencies = ["pyreduce-astro>=0.7a6"]
3
+ # dependencies = ["pyreduce-astro>=0.7a7"]
4
4
  # ///
5
5
  import os.path
6
6
 
@@ -71,7 +71,7 @@ kwargs_comb["nstep"] = 0
71
71
  kwargs["plot"] = False
72
72
 
73
73
 
74
- for key in ["extraction_method", "extraction_width", "extraction_cutoff"]:
74
+ for key in ["extraction_method", "extraction_height", "extraction_cutoff"]:
75
75
  del kwargs_comb[key]
76
76
  del kwargs[key]
77
77
 
@@ -1,6 +1,6 @@
1
1
  # /// script
2
2
  # requires-python = ">=3.13"
3
- # dependencies = ["pyreduce-astro>=0.7a6"]
3
+ # dependencies = ["pyreduce-astro>=0.7a7"]
4
4
  # ///
5
5
  import matplotlib.pyplot as plt
6
6
  import numpy as np
@@ -1,6 +1,6 @@
1
1
  # /// script
2
2
  # requires-python = ">=3.13"
3
- # dependencies = ["pyreduce-astro>=0.7a6"]
3
+ # dependencies = ["pyreduce-astro>=0.7a7"]
4
4
  # ///
5
5
  """
6
6
  Simple usage example for PyReduce
@@ -1,6 +1,6 @@
1
1
  # /// script
2
2
  # requires-python = ">=3.13"
3
- # dependencies = ["pyreduce-astro>=0.7a6"]
3
+ # dependencies = ["pyreduce-astro>=0.7a7"]
4
4
  # ///
5
5
  """
6
6
  Simple usage example for PyReduce
@@ -1,6 +1,6 @@
1
1
  # /// script
2
2
  # requires-python = ">=3.13"
3
- # dependencies = ["pyreduce-astro>=0.7a6"]
3
+ # dependencies = ["pyreduce-astro>=0.7a7"]
4
4
  # ///
5
5
  """
6
6
  Simple usage example for PyReduce
@@ -1,6 +1,6 @@
1
1
  # /// script
2
2
  # requires-python = ">=3.13"
3
- # dependencies = ["pyreduce-astro>=0.7a6"]
3
+ # dependencies = ["pyreduce-astro>=0.7a7"]
4
4
  # ///
5
5
  """
6
6
  Simple usage example for PyReduce
@@ -1,6 +1,6 @@
1
1
  # /// script
2
2
  # requires-python = ">=3.13"
3
- # dependencies = ["pyreduce-astro>=0.7a6"]
3
+ # dependencies = ["pyreduce-astro>=0.7a7"]
4
4
  # ///
5
5
  """
6
6
  Simple usage example for PyReduce
@@ -1,6 +1,6 @@
1
1
  # /// script
2
2
  # requires-python = ">=3.13"
3
- # dependencies = ["pyreduce-astro>=0.7a6"]
3
+ # dependencies = ["pyreduce-astro>=0.7a7"]
4
4
  # ///
5
5
  """
6
6
  Simple usage example for PyReduce
@@ -1,6 +1,6 @@
1
1
  # /// script
2
2
  # requires-python = ">=3.13"
3
- # dependencies = ["pyreduce-astro>=0.7a6"]
3
+ # dependencies = ["pyreduce-astro>=0.7a7"]
4
4
  # ///
5
5
  """
6
6
  Simple usage example for PyReduce
@@ -48,11 +48,11 @@ config = pyreduce.configuration.get_configuration_for_instrument(instrument)
48
48
 
49
49
 
50
50
  # config["trace"]["noise"] = 100
51
- # config["curvature"]["extraction_width"] = 350 # curvature can still be improved with this and the following parameters
51
+ # config["curvature"]["extraction_height"] = 350 # curvature can still be improved with this and the following parameters
52
52
  # config["curvature"]["peak_threshold"] =10
53
53
  # config["curvature"]["peak_width"] =2 #CHECK 6 also works and detects one less line
54
54
  # config["curvature"]["window_width"] = 5
55
- # config["wavecal"]["extraction_width"] = 350
55
+ # config["wavecal"]["extraction_height"] = 350
56
56
 
57
57
  # NOTE: micado.thar_master.fits (created and controlled by wavecal_master) is NOT overwritten if any parameter in the steps in or before it are changed. Thus it has to be deleted before running PyReduce again.
58
58
 
@@ -1,6 +1,6 @@
1
1
  # /// script
2
2
  # requires-python = ">=3.13"
3
- # dependencies = ["pyreduce-astro>=0.7a6"]
3
+ # dependencies = ["pyreduce-astro>=0.7a7"]
4
4
  # ///
5
5
  """
6
6
  NEID reduction example
@@ -1,6 +1,6 @@
1
1
  # /// script
2
2
  # requires-python = ">=3.13"
3
- # dependencies = ["pyreduce-astro>=0.7a6"]
3
+ # dependencies = ["pyreduce-astro>=0.7a7"]
4
4
  # ///
5
5
  """
6
6
  Simple usage example for PyReduce
@@ -1,6 +1,6 @@
1
1
  # /// script
2
2
  # requires-python = ">=3.13"
3
- # dependencies = ["pyreduce-astro>=0.7a6"]
3
+ # dependencies = ["pyreduce-astro>=0.7a7"]
4
4
  # ///
5
5
  import numpy as np
6
6
 
@@ -90,7 +90,7 @@ config["trace"]["min_width"] = 200
90
90
  config["trace"]["manual"] = True
91
91
  config["norm_flat"]["oversampling"] = 8 # Subpixel scale for slit function modelling
92
92
  config["norm_flat"]["swath_width"] = 400 # Extraction swath width (columns)
93
- config["wavecal_master"]["extraction_width"] = 2
93
+ config["wavecal_master"]["extraction_height"] = 2
94
94
  config["wavecal_master"]["collapse_function"] = "sum"
95
95
  config["wavecal_master"]["bias_scaling"] = "number_of_files"
96
96
  config["wavecal"]["medium"] = "vac"
@@ -102,7 +102,7 @@ config["science"]["oversampling"] = 8 # Subpixel scale for slit function modell
102
102
  config["science"]["swath_width"] = 400 # Extraction swath width (columns)
103
103
  config["science"]["smooth_slitfunction"] = 1.0 # Smoothing of the slit function
104
104
  config["science"]["smooth_spectrum"] = 1.0e-6 # Smoothing in spectral direction
105
- config["science"]["extraction_width"] = [5, 5] # Extraction slit height (rows)
105
+ config["science"]["extraction_height"] = [5, 5] # Extraction slit height (rows)
106
106
  config["science"]["bias_scaling"] = "number_of_files"
107
107
 
108
108
  # Since we can't find the files ourselves (at least not without defining the criteria we are looking for)
@@ -1,6 +1,6 @@
1
1
  # /// script
2
2
  # requires-python = ">=3.13"
3
- # dependencies = ["pyreduce-astro>=0.7a6"]
3
+ # dependencies = ["pyreduce-astro>=0.7a7"]
4
4
  # ///
5
5
  """
6
6
  Example showing direct function calls for each step.
@@ -1,6 +1,6 @@
1
1
  # /// script
2
2
  # requires-python = ">=3.13"
3
- # dependencies = ["pyreduce-astro>=0.7a6"]
3
+ # dependencies = ["pyreduce-astro>=0.7a7"]
4
4
  # ///
5
5
  """
6
6
  Simple usage example for PyReduce
@@ -1,6 +1,6 @@
1
1
  # /// script
2
2
  # requires-python = ">=3.13"
3
- # dependencies = ["pyreduce-astro>=0.7a6"]
3
+ # dependencies = ["pyreduce-astro>=0.7a7"]
4
4
  # ///
5
5
  """
6
6
  Simple usage example for PyReduce
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "pyreduce-astro"
3
- version = "0.7a6"
3
+ version = "0.7a7"
4
4
  requires-python = ">=3.13"
5
5
  description = "A data reduction package for echelle spectrographs"
6
6
  readme = "README.md"
@@ -67,6 +67,12 @@ def cli():
67
67
  default=None,
68
68
  help="Order range to process (e.g., '1,21')",
69
69
  )
70
+ @click.option(
71
+ "--settings",
72
+ default=None,
73
+ type=click.Path(exists=True),
74
+ help="JSON file with settings overrides",
75
+ )
70
76
  def run(
71
77
  instrument,
72
78
  target,
@@ -78,13 +84,14 @@ def run(
78
84
  output_dir,
79
85
  plot,
80
86
  order_range,
87
+ settings,
81
88
  ):
82
89
  """Run the reduction pipeline.
83
90
 
84
91
  INSTRUMENT: Name of the instrument (e.g., UVES, HARPS, XSHOOTER)
85
92
  TARGET: Target star name or regex pattern
86
93
  """
87
- from .configuration import get_configuration_for_instrument
94
+ from .configuration import get_configuration_for_instrument, load_settings_override
88
95
  from .reduce import main as reduce_main
89
96
 
90
97
  # Parse steps
@@ -100,6 +107,8 @@ def run(
100
107
 
101
108
  # Load configuration
102
109
  config = get_configuration_for_instrument(instrument)
110
+ if settings:
111
+ config = load_settings_override(config, settings)
103
112
 
104
113
  # Run reduction
105
114
  reduce_main(
@@ -292,10 +301,28 @@ def make_step_command(step_name):
292
301
  default=None,
293
302
  help="Specific input file (bypasses file discovery)",
294
303
  )
304
+ @click.option(
305
+ "--settings",
306
+ default=None,
307
+ type=click.Path(exists=True),
308
+ help="JSON file with settings overrides",
309
+ )
295
310
  def cmd(
296
- instrument, target, night, channel, base_dir, input_dir, output_dir, plot, file
311
+ instrument,
312
+ target,
313
+ night,
314
+ channel,
315
+ base_dir,
316
+ input_dir,
317
+ output_dir,
318
+ plot,
319
+ file,
320
+ settings,
297
321
  ):
298
- from .configuration import get_configuration_for_instrument
322
+ from .configuration import (
323
+ get_configuration_for_instrument,
324
+ load_settings_override,
325
+ )
299
326
  from .reduce import main as reduce_main
300
327
 
301
328
  if file:
@@ -305,7 +332,6 @@ def make_step_command(step_name):
305
332
  import numpy as np
306
333
 
307
334
  from . import reduce as reduce_module
308
- from .configuration import get_configuration_for_instrument
309
335
  from .instruments.instrument_info import load_instrument
310
336
 
311
337
  inst = load_instrument(instrument)
@@ -317,6 +343,8 @@ def make_step_command(step_name):
317
343
 
318
344
  # Load configuration for this step
319
345
  config = get_configuration_for_instrument(instrument)
346
+ if settings:
347
+ config = load_settings_override(config, settings)
320
348
  step_config = config.get(step_name, {})
321
349
  step_config["plot"] = plot
322
350
 
@@ -355,6 +383,8 @@ def make_step_command(step_name):
355
383
  step.run(files=np.array([file]), mask=None, bias=None)
356
384
  else:
357
385
  config = get_configuration_for_instrument(instrument)
386
+ if settings:
387
+ config = load_settings_override(config, settings)
358
388
  reduce_main(
359
389
  instrument=instrument,
360
390
  target=target,
@@ -43,6 +43,26 @@ def get_configuration_for_instrument(instrument, **kwargs):
43
43
  return config
44
44
 
45
45
 
46
+ def load_settings_override(config, settings_file):
47
+ """Apply settings overrides from a JSON file.
48
+
49
+ Parameters
50
+ ----------
51
+ config : dict
52
+ Base configuration to override
53
+ settings_file : str
54
+ Path to JSON file with override settings
55
+
56
+ Returns
57
+ -------
58
+ config : dict
59
+ Updated configuration
60
+ """
61
+ with open(settings_file) as f:
62
+ overrides = json.load(f)
63
+ return update(config, overrides, check=False)
64
+
65
+
46
66
  def load_config(configuration, instrument, j=0):
47
67
  if configuration is None:
48
68
  logger.info(
@@ -18,7 +18,7 @@ def estimate_background_scatter(
18
18
  img,
19
19
  orders,
20
20
  column_range=None,
21
- extraction_width=0.1,
21
+ extraction_height=0.1,
22
22
  scatter_degree=4,
23
23
  sigma_cutoff=2,
24
24
  border_width=10,
@@ -38,7 +38,7 @@ def estimate_background_scatter(
38
38
  order polynomial coefficients
39
39
  column_range : array[nord, 2], optional
40
40
  range of columns to use in each order (default: None == all columns)
41
- extraction_width : float, array[nord, 2], optional
41
+ extraction_height : float, array[nord, 2], optional
42
42
  extraction width for each order, values below 1.5 are considered fractional, others as number of pixels (default: 0.1)
43
43
  scatter_degree : int, optional
44
44
  polynomial degree of the 2d fit for the background scatter (default: 4)
@@ -56,8 +56,8 @@ def estimate_background_scatter(
56
56
  nrow, ncol = img.shape
57
57
  nord, _ = orders.shape
58
58
 
59
- extraction_width, column_range, orders = fix_parameters(
60
- extraction_width,
59
+ extraction_height, column_range, orders = fix_parameters(
60
+ extraction_height,
61
61
  column_range,
62
62
  orders,
63
63
  nrow,
@@ -73,16 +73,16 @@ def estimate_background_scatter(
73
73
  mask[:bw] = mask[-bw:] = mask[:, :bw] = mask[:, -bw:] = False
74
74
  for i in range(nord):
75
75
  left, right = column_range[i]
76
- left -= extraction_width[i, 1] * 2
77
- right += extraction_width[i, 0] * 2
76
+ left -= extraction_height[i, 1] * 2
77
+ right += extraction_height[i, 0] * 2
78
78
  left = max(0, left)
79
79
  right = min(ncol, right)
80
80
 
81
81
  x_order = np.arange(left, right)
82
82
  y_order = np.polyval(orders[i], x_order)
83
83
 
84
- y_above = y_order + extraction_width[i, 1]
85
- y_below = y_order - extraction_width[i, 0]
84
+ y_above = y_order + extraction_height[i, 1]
85
+ y_below = y_order - extraction_height[i, 0]
86
86
 
87
87
  y_above = np.floor(y_above)
88
88
  y_below = np.ceil(y_below)