pyreduce-astro 0.7__tar.gz → 0.7a2__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.
- {pyreduce_astro-0.7 → pyreduce_astro-0.7a2}/.gitignore +0 -4
- pyreduce_astro-0.7a2/.pyup.yml +4 -0
- pyreduce_astro-0.7a2/CHANGELOG.md +112 -0
- {pyreduce_astro-0.7 → pyreduce_astro-0.7a2}/CLAUDE.md +33 -104
- {pyreduce_astro-0.7 → pyreduce_astro-0.7a2}/PKG-INFO +11 -26
- {pyreduce_astro-0.7 → pyreduce_astro-0.7a2}/README.md +6 -24
- pyreduce_astro-0.7a2/README_METIS.md +130 -0
- pyreduce_astro-0.7a2/codemeta.json +56 -0
- pyreduce_astro-0.7a2/environment.yml +19 -0
- pyreduce_astro-0.7a2/examples/aj_example.py +165 -0
- pyreduce_astro-0.7a2/examples/crires_plus_example.py +59 -0
- {pyreduce_astro-0.7 → pyreduce_astro-0.7a2}/examples/custom_instrument_example.py +5 -9
- pyreduce_astro-0.7a2/examples/harpn_example.py +52 -0
- {pyreduce_astro-0.7 → pyreduce_astro-0.7a2}/examples/harps_example.py +4 -8
- {pyreduce_astro-0.7 → pyreduce_astro-0.7a2}/examples/harps_gridsearch.py +7 -11
- {pyreduce_astro-0.7 → pyreduce_astro-0.7a2}/examples/just_one_swath.py +3 -19
- pyreduce_astro-0.7a2/examples/jwst_miri_example.py +50 -0
- pyreduce_astro-0.7a2/examples/jwst_niriss_example.py +53 -0
- pyreduce_astro-0.7a2/examples/lick_apf_example.py +50 -0
- {pyreduce_astro-0.7 → pyreduce_astro-0.7a2}/examples/mcdonald_example.py +4 -8
- pyreduce_astro-0.7a2/examples/metis_ifu_example.py +77 -0
- pyreduce_astro-0.7a2/examples/metis_lss_example.py +77 -0
- {pyreduce_astro-0.7 → pyreduce_astro-0.7a2}/examples/micado_example.py +16 -18
- pyreduce_astro-0.7a2/examples/neid_example.py +52 -0
- {pyreduce_astro-0.7 → pyreduce_astro-0.7a2}/examples/nirspec_example.py +4 -8
- {pyreduce_astro-0.7 → pyreduce_astro-0.7a2}/examples/toes_example.py +14 -18
- {pyreduce_astro-0.7 → pyreduce_astro-0.7a2}/examples/uves_callfunc.py +19 -32
- {pyreduce_astro-0.7 → pyreduce_astro-0.7a2}/examples/uves_example.py +5 -9
- {pyreduce_astro-0.7 → pyreduce_astro-0.7a2}/examples/xshooter_example.py +9 -12
- pyreduce_astro-0.7a2/plots_for_paper/dimensionality.py +172 -0
- pyreduce_astro-0.7a2/plots_for_paper/settings_HARPS.json +47 -0
- pyreduce_astro-0.7a2/plots_for_paper/wavecal_plot.py +137 -0
- {pyreduce_astro-0.7 → pyreduce_astro-0.7a2}/pyproject.toml +7 -13
- pyreduce_astro-0.7a2/pyproject.toml.sav +77 -0
- pyreduce_astro-0.7a2/pyreduce/__main__.py +206 -0
- {pyreduce_astro-0.7 → pyreduce_astro-0.7a2}/pyreduce/cli.py +3 -3
- pyreduce_astro-0.7a2/pyreduce/clib/build_extract.py +75 -0
- {pyreduce_astro-0.7 → pyreduce_astro-0.7a2}/pyreduce/clib/slit_func_2d_xi_zeta_bd.c +118 -152
- {pyreduce_astro-0.7 → pyreduce_astro-0.7a2}/pyreduce/clib/slit_func_2d_xi_zeta_bd.h +0 -2
- {pyreduce_astro-0.7 → pyreduce_astro-0.7a2}/pyreduce/clib/slit_func_bd.c +5 -2
- {pyreduce_astro-0.7 → pyreduce_astro-0.7a2}/pyreduce/combine_frames.py +25 -76
- {pyreduce_astro-0.7 → pyreduce_astro-0.7a2}/pyreduce/configuration.py +18 -119
- {pyreduce_astro-0.7 → pyreduce_astro-0.7a2}/pyreduce/continuum_normalization.py +0 -2
- {pyreduce_astro-0.7 → pyreduce_astro-0.7a2}/pyreduce/cwrappers.py +62 -279
- pyreduce_astro-0.7a2/pyreduce/datasets.py +238 -0
- {pyreduce_astro-0.7 → pyreduce_astro-0.7a2}/pyreduce/estimate_background_scatter.py +27 -28
- {pyreduce_astro-0.7 → pyreduce_astro-0.7a2}/pyreduce/extract.py +359 -524
- pyreduce_astro-0.7/pyreduce/extraction_height.py → pyreduce_astro-0.7a2/pyreduce/extraction_width.py +17 -17
- pyreduce_astro-0.7a2/pyreduce/instruments/aj.py +9 -0
- pyreduce_astro-0.7a2/pyreduce/instruments/aj.yaml +51 -0
- pyreduce_astro-0.7a2/pyreduce/instruments/andes.py +102 -0
- pyreduce_astro-0.7a2/pyreduce/instruments/andes.yaml +72 -0
- {pyreduce_astro-0.7 → pyreduce_astro-0.7a2}/pyreduce/instruments/common.py +110 -347
- pyreduce_astro-0.7a2/pyreduce/instruments/crires_plus.py +103 -0
- pyreduce_astro-0.7/pyreduce/instruments/CRIRES_PLUS/config.yaml → pyreduce_astro-0.7a2/pyreduce/instruments/crires_plus.yaml +2 -0
- {pyreduce_astro-0.7 → pyreduce_astro-0.7a2}/pyreduce/instruments/filters.py +1 -1
- pyreduce_astro-0.7/pyreduce/instruments/HARPN/__init__.py → pyreduce_astro-0.7a2/pyreduce/instruments/harpn.py +17 -17
- pyreduce_astro-0.7/pyreduce/instruments/HARPN/config.yaml → pyreduce_astro-0.7a2/pyreduce/instruments/harpn.yaml +2 -2
- pyreduce_astro-0.7/pyreduce/instruments/HARPS/__init__.py → pyreduce_astro-0.7a2/pyreduce/instruments/harps.py +21 -25
- pyreduce_astro-0.7/pyreduce/instruments/HARPS/config.yaml → pyreduce_astro-0.7a2/pyreduce/instruments/harps.yaml +2 -2
- {pyreduce_astro-0.7 → pyreduce_astro-0.7a2}/pyreduce/instruments/instrument_info.py +17 -19
- pyreduce_astro-0.7/pyreduce/instruments/JWST_MIRI/__init__.py → pyreduce_astro-0.7a2/pyreduce/instruments/jwst_miri.py +6 -6
- pyreduce_astro-0.7/pyreduce/instruments/JWST_MIRI/config.yaml → pyreduce_astro-0.7a2/pyreduce/instruments/jwst_miri.yaml +2 -2
- pyreduce_astro-0.7/pyreduce/instruments/JWST_NIRISS/__init__.py → pyreduce_astro-0.7a2/pyreduce/instruments/jwst_niriss.py +16 -10
- pyreduce_astro-0.7/pyreduce/instruments/JWST_NIRISS/config.yaml → pyreduce_astro-0.7a2/pyreduce/instruments/jwst_niriss.yaml +2 -2
- pyreduce_astro-0.7/pyreduce/instruments/LICK_APF/__init__.py → pyreduce_astro-0.7a2/pyreduce/instruments/lick_apf.py +6 -5
- pyreduce_astro-0.7/pyreduce/instruments/LICK_APF/config.yaml → pyreduce_astro-0.7a2/pyreduce/instruments/lick_apf.yaml +2 -2
- pyreduce_astro-0.7/pyreduce/instruments/MCDONALD/__init__.py → pyreduce_astro-0.7a2/pyreduce/instruments/mcdonald.py +10 -8
- pyreduce_astro-0.7/pyreduce/instruments/MCDONALD/config.yaml → pyreduce_astro-0.7a2/pyreduce/instruments/mcdonald.yaml +3 -3
- pyreduce_astro-0.7/pyreduce/instruments/METIS_IFU/__init__.py → pyreduce_astro-0.7a2/pyreduce/instruments/metis_ifu.py +10 -7
- pyreduce_astro-0.7/pyreduce/instruments/METIS_IFU/config.yaml → pyreduce_astro-0.7a2/pyreduce/instruments/metis_ifu.yaml +3 -3
- pyreduce_astro-0.7/pyreduce/instruments/METIS_LSS/__init__.py → pyreduce_astro-0.7a2/pyreduce/instruments/metis_lss.py +10 -7
- pyreduce_astro-0.7/pyreduce/instruments/METIS_LSS/config.yaml → pyreduce_astro-0.7a2/pyreduce/instruments/metis_lss.yaml +3 -3
- pyreduce_astro-0.7/pyreduce/instruments/MICADO/__init__.py → pyreduce_astro-0.7a2/pyreduce/instruments/micado.py +10 -7
- pyreduce_astro-0.7/pyreduce/instruments/MICADO/config.yaml → pyreduce_astro-0.7a2/pyreduce/instruments/micado.yaml +3 -3
- {pyreduce_astro-0.7 → pyreduce_astro-0.7a2}/pyreduce/instruments/models.py +8 -136
- pyreduce_astro-0.7a2/pyreduce/instruments/neid.py +156 -0
- pyreduce_astro-0.7a2/pyreduce/instruments/neid.yaml +61 -0
- pyreduce_astro-0.7/pyreduce/instruments/NIRSPEC/__init__.py → pyreduce_astro-0.7a2/pyreduce/instruments/nirspec.py +13 -13
- pyreduce_astro-0.7/pyreduce/instruments/NIRSPEC/config.yaml → pyreduce_astro-0.7a2/pyreduce/instruments/nirspec.yaml +1 -1
- pyreduce_astro-0.7/pyreduce/instruments/NTE/__init__.py → pyreduce_astro-0.7a2/pyreduce/instruments/nte.py +9 -7
- pyreduce_astro-0.7/pyreduce/instruments/NTE/config.yaml → pyreduce_astro-0.7a2/pyreduce/instruments/nte.yaml +1 -1
- pyreduce_astro-0.7/pyreduce/instruments/UVES/__init__.py → pyreduce_astro-0.7a2/pyreduce/instruments/uves.py +13 -10
- pyreduce_astro-0.7/pyreduce/instruments/UVES/config.yaml → pyreduce_astro-0.7a2/pyreduce/instruments/uves.yaml +2 -2
- pyreduce_astro-0.7/pyreduce/instruments/XSHOOTER/__init__.py → pyreduce_astro-0.7a2/pyreduce/instruments/xshooter.py +8 -6
- pyreduce_astro-0.7/pyreduce/instruments/XSHOOTER/config.yaml → pyreduce_astro-0.7a2/pyreduce/instruments/xshooter.yaml +3 -3
- pyreduce_astro-0.7a2/pyreduce/make_shear.py +607 -0
- pyreduce_astro-0.7a2/pyreduce/masks/mask_crires_plus_det1.fits.gz +0 -0
- pyreduce_astro-0.7a2/pyreduce/masks/mask_crires_plus_det2.fits.gz +0 -0
- pyreduce_astro-0.7a2/pyreduce/masks/mask_crires_plus_det3.fits.gz +0 -0
- pyreduce_astro-0.7a2/pyreduce/masks/mask_ctio_chiron.fits.gz +0 -0
- pyreduce_astro-0.7a2/pyreduce/masks/mask_elodie.fits.gz +0 -0
- pyreduce_astro-0.7a2/pyreduce/masks/mask_feros3.fits.gz +0 -0
- pyreduce_astro-0.7a2/pyreduce/masks/mask_flames_giraffe.fits.gz +0 -0
- pyreduce_astro-0.7a2/pyreduce/masks/mask_harps_blue.fits.gz +0 -0
- pyreduce_astro-0.7a2/pyreduce/masks/mask_harps_red.fits.gz +0 -0
- pyreduce_astro-0.7a2/pyreduce/masks/mask_hds_blue.fits.gz +0 -0
- pyreduce_astro-0.7a2/pyreduce/masks/mask_hds_red.fits.gz +0 -0
- pyreduce_astro-0.7a2/pyreduce/masks/mask_het_hrs_2x5.fits.gz +0 -0
- pyreduce_astro-0.7/pyreduce/instruments/JWST_MIRI/mask_lrs_slitless.fits.gz → pyreduce_astro-0.7a2/pyreduce/masks/mask_jwst_miri_lrs_slitless.fits.gz +0 -0
- pyreduce_astro-0.7/pyreduce/instruments/JWST_NIRISS/mask_gr700xd.fits.gz → pyreduce_astro-0.7a2/pyreduce/masks/mask_jwst_niriss_gr700xd.fits.gz +0 -0
- pyreduce_astro-0.7/pyreduce/instruments/LICK_APF/mask_.fits.gz → pyreduce_astro-0.7a2/pyreduce/masks/mask_lick_apf_.fits.gz +0 -0
- pyreduce_astro-0.7a2/pyreduce/masks/mask_mcdonald.fits.gz +0 -0
- pyreduce_astro-0.7a2/pyreduce/masks/mask_nes.fits.gz +0 -0
- pyreduce_astro-0.7a2/pyreduce/masks/mask_nirspec_nirspec.fits.gz +0 -0
- pyreduce_astro-0.7a2/pyreduce/masks/mask_sarg.fits.gz +0 -0
- pyreduce_astro-0.7a2/pyreduce/masks/mask_sarg_2x2a.fits.gz +0 -0
- pyreduce_astro-0.7a2/pyreduce/masks/mask_sarg_2x2b.fits.gz +0 -0
- pyreduce_astro-0.7a2/pyreduce/masks/mask_subaru_hds_red.fits.gz +0 -0
- pyreduce_astro-0.7a2/pyreduce/masks/mask_uves_blue.fits.gz +0 -0
- pyreduce_astro-0.7a2/pyreduce/masks/mask_uves_blue_binned_2_2.fits.gz +0 -0
- pyreduce_astro-0.7a2/pyreduce/masks/mask_uves_middle.fits.gz +0 -0
- pyreduce_astro-0.7a2/pyreduce/masks/mask_uves_middle_2x2_split.fits.gz +0 -0
- pyreduce_astro-0.7a2/pyreduce/masks/mask_uves_middle_binned_2_2.fits.gz +0 -0
- pyreduce_astro-0.7a2/pyreduce/masks/mask_uves_red.fits.gz +0 -0
- pyreduce_astro-0.7a2/pyreduce/masks/mask_uves_red_2x2.fits.gz +0 -0
- pyreduce_astro-0.7a2/pyreduce/masks/mask_uves_red_2x2_split.fits.gz +0 -0
- pyreduce_astro-0.7a2/pyreduce/masks/mask_uves_red_binned_2_2.fits.gz +0 -0
- pyreduce_astro-0.7/pyreduce/instruments/XSHOOTER/mask_nir.fits.gz → pyreduce_astro-0.7a2/pyreduce/masks/mask_xshooter_nir.fits.gz +0 -0
- {pyreduce_astro-0.7 → pyreduce_astro-0.7a2}/pyreduce/pipeline.py +57 -273
- {pyreduce_astro-0.7 → pyreduce_astro-0.7a2}/pyreduce/rectify.py +22 -22
- {pyreduce_astro-0.7 → pyreduce_astro-0.7a2}/pyreduce/reduce.py +236 -713
- pyreduce_astro-0.7a2/pyreduce/settings/settings_AJ.json +19 -0
- pyreduce_astro-0.7a2/pyreduce/settings/settings_ANDES.json +89 -0
- pyreduce_astro-0.7/pyreduce/instruments/CRIRES_PLUS/settings.json → pyreduce_astro-0.7a2/pyreduce/settings/settings_CRIRES_PLUS.json +18 -21
- pyreduce_astro-0.7/pyreduce/instruments/NEID/settings.json → pyreduce_astro-0.7a2/pyreduce/settings/settings_HARPN.json +18 -16
- pyreduce_astro-0.7/pyreduce/instruments/HARPS/settings.json → pyreduce_astro-0.7a2/pyreduce/settings/settings_HARPS.json +10 -12
- pyreduce_astro-0.7/pyreduce/instruments/JWST_MIRI/settings.json → pyreduce_astro-0.7a2/pyreduce/settings/settings_JWST_MIRI.json +10 -18
- pyreduce_astro-0.7/pyreduce/instruments/JWST_NIRISS/settings.json → pyreduce_astro-0.7a2/pyreduce/settings/settings_JWST_NIRISS.json +9 -17
- pyreduce_astro-0.7/pyreduce/instruments/LICK_APF/settings.json → pyreduce_astro-0.7a2/pyreduce/settings/settings_LICK_APF.json +20 -29
- pyreduce_astro-0.7/pyreduce/instruments/MCDONALD/settings.json → pyreduce_astro-0.7a2/pyreduce/settings/settings_MCDONALD.json +11 -22
- pyreduce_astro-0.7/pyreduce/instruments/METIS_IFU/settings.json → pyreduce_astro-0.7a2/pyreduce/settings/settings_METIS_IFU.json +17 -16
- pyreduce_astro-0.7a2/pyreduce/settings/settings_METIS_LSS.json +77 -0
- pyreduce_astro-0.7/pyreduce/instruments/MICADO/settings.json → pyreduce_astro-0.7a2/pyreduce/settings/settings_MICADO.json +18 -17
- pyreduce_astro-0.7a2/pyreduce/settings/settings_NEID.json +73 -0
- pyreduce_astro-0.7/pyreduce/instruments/NIRSPEC/settings.json → pyreduce_astro-0.7a2/pyreduce/settings/settings_NIRSPEC.json +9 -17
- pyreduce_astro-0.7/pyreduce/instruments/NTE/settings.json → pyreduce_astro-0.7a2/pyreduce/settings/settings_NTE.json +18 -18
- pyreduce_astro-0.7/pyreduce/instruments/UVES/settings.json → pyreduce_astro-0.7a2/pyreduce/settings/settings_UVES.json +15 -19
- pyreduce_astro-0.7/pyreduce/instruments/XSHOOTER/settings.json → pyreduce_astro-0.7a2/pyreduce/settings/settings_XSHOOTER.json +18 -18
- pyreduce_astro-0.7/pyreduce/instruments/defaults/settings.json → pyreduce_astro-0.7a2/pyreduce/settings/settings_pyreduce.json +27 -27
- pyreduce_astro-0.7/pyreduce/instruments/defaults/schema.json → pyreduce_astro-0.7a2/pyreduce/settings/settings_schema.json +159 -81
- {pyreduce_astro-0.7 → pyreduce_astro-0.7a2}/pyreduce/tools/combine.py +0 -1
- pyreduce_astro-0.7a2/pyreduce/trace.py +979 -0
- {pyreduce_astro-0.7 → pyreduce_astro-0.7a2}/pyreduce/util.py +8 -53
- {pyreduce_astro-0.7 → pyreduce_astro-0.7a2}/pyreduce/wavelength_calibration.py +2 -6
- {pyreduce_astro-0.7 → pyreduce_astro-0.7a2}/uv.lock +609 -536
- pyreduce_astro-0.7/.python-version +0 -1
- pyreduce_astro-0.7/ANDES_plan.md +0 -182
- pyreduce_astro-0.7/CHANGELOG.md +0 -252
- pyreduce_astro-0.7/WhatsNew.md +0 -78
- pyreduce_astro-0.7/examples/andes_yjh_example.py +0 -112
- pyreduce_astro-0.7/examples/crires_plus_example.py +0 -52
- pyreduce_astro-0.7/examples/debug_single_swath.py +0 -233
- pyreduce_astro-0.7/examples/harpn_example.py +0 -48
- pyreduce_astro-0.7/examples/jwst_miri_example.py +0 -46
- pyreduce_astro-0.7/examples/jwst_niriss_example.py +0 -46
- pyreduce_astro-0.7/examples/lick_apf_example.py +0 -46
- pyreduce_astro-0.7/examples/metis_ifu_example.py +0 -52
- pyreduce_astro-0.7/examples/metis_lss_example.py +0 -52
- pyreduce_astro-0.7/examples/mosaic_nir.py +0 -96
- pyreduce_astro-0.7/examples/mosaic_preset-slitfunc.py +0 -141
- pyreduce_astro-0.7/examples/mosaic_vis.py +0 -92
- pyreduce_astro-0.7/examples/neid_example.py +0 -65
- pyreduce_astro-0.7/pyreduce/__main__.py +0 -513
- pyreduce_astro-0.7/pyreduce/clib/build_extract.py +0 -80
- pyreduce_astro-0.7/pyreduce/datasets.py +0 -190
- pyreduce_astro-0.7/pyreduce/instruments/ANDES_YJH/__init__.py +0 -14
- pyreduce_astro-0.7/pyreduce/instruments/ANDES_YJH/config.yaml +0 -122
- pyreduce_astro-0.7/pyreduce/instruments/ANDES_YJH/order_centers_h.yaml +0 -9
- pyreduce_astro-0.7/pyreduce/instruments/ANDES_YJH/order_centers_j.yaml +0 -21
- pyreduce_astro-0.7/pyreduce/instruments/ANDES_YJH/order_centers_y.yaml +0 -9
- pyreduce_astro-0.7/pyreduce/instruments/ANDES_YJH/settings.json +0 -24
- pyreduce_astro-0.7/pyreduce/instruments/CRIRES_PLUS/__init__.py +0 -116
- pyreduce_astro-0.7/pyreduce/instruments/CRIRES_PLUS/mask_det1.fits.gz +0 -0
- pyreduce_astro-0.7/pyreduce/instruments/CRIRES_PLUS/mask_det2.fits.gz +0 -0
- pyreduce_astro-0.7/pyreduce/instruments/CRIRES_PLUS/mask_det3.fits.gz +0 -0
- pyreduce_astro-0.7/pyreduce/instruments/HARPN/settings.json +0 -21
- pyreduce_astro-0.7/pyreduce/instruments/HARPN/wavecal_harpn_fibB_2D.npz +0 -0
- pyreduce_astro-0.7/pyreduce/instruments/HARPS/mask_blue.fits.gz +0 -0
- pyreduce_astro-0.7/pyreduce/instruments/HARPS/mask_red.fits.gz +0 -0
- pyreduce_astro-0.7/pyreduce/instruments/MCDONALD/mask.fits.gz +0 -0
- pyreduce_astro-0.7/pyreduce/instruments/METIS_LSS/settings.json +0 -4
- pyreduce_astro-0.7/pyreduce/instruments/MOSAIC/__init__.py +0 -38
- pyreduce_astro-0.7/pyreduce/instruments/MOSAIC/bundle_centers_nir.yaml +0 -92
- pyreduce_astro-0.7/pyreduce/instruments/MOSAIC/bundle_centers_vis1.yaml +0 -69
- pyreduce_astro-0.7/pyreduce/instruments/MOSAIC/bundle_centers_vis2.yaml +0 -72
- pyreduce_astro-0.7/pyreduce/instruments/MOSAIC/bundle_centers_vis3.yaml +0 -87
- pyreduce_astro-0.7/pyreduce/instruments/MOSAIC/bundle_centers_vis4.yaml +0 -87
- pyreduce_astro-0.7/pyreduce/instruments/MOSAIC/config.yaml +0 -61
- pyreduce_astro-0.7/pyreduce/instruments/MOSAIC/mask_nir.fits.gz +0 -0
- pyreduce_astro-0.7/pyreduce/instruments/MOSAIC/mosaic_fiber_positions.npz +0 -0
- pyreduce_astro-0.7/pyreduce/instruments/MOSAIC/settings.json +0 -25
- pyreduce_astro-0.7/pyreduce/instruments/MOSAIC/settings_VIS1.json +0 -22
- pyreduce_astro-0.7/pyreduce/instruments/MOSAIC/settings_VIS2.json +0 -4
- pyreduce_astro-0.7/pyreduce/instruments/MOSAIC/settings_VIS3.json +0 -4
- pyreduce_astro-0.7/pyreduce/instruments/MOSAIC/settings_VIS4.json +0 -4
- pyreduce_astro-0.7/pyreduce/instruments/MOSAIC/settings_nir.json +0 -21
- pyreduce_astro-0.7/pyreduce/instruments/NEID/__init__.py +0 -128
- pyreduce_astro-0.7/pyreduce/instruments/NEID/config.yaml +0 -60
- pyreduce_astro-0.7/pyreduce/instruments/NIRSPEC/mask_nirspec.fits.gz +0 -0
- pyreduce_astro-0.7/pyreduce/instruments/UVES/mask_blue.fits.gz +0 -0
- pyreduce_astro-0.7/pyreduce/instruments/UVES/mask_blue_binned_2_2.fits.gz +0 -0
- pyreduce_astro-0.7/pyreduce/instruments/UVES/mask_middle.fits.gz +0 -0
- pyreduce_astro-0.7/pyreduce/instruments/UVES/mask_middle_2x2_split.fits.gz +0 -0
- pyreduce_astro-0.7/pyreduce/instruments/UVES/mask_middle_binned_2_2.fits.gz +0 -0
- pyreduce_astro-0.7/pyreduce/instruments/UVES/mask_red.fits.gz +0 -0
- pyreduce_astro-0.7/pyreduce/instruments/UVES/mask_red_2x2.fits.gz +0 -0
- pyreduce_astro-0.7/pyreduce/instruments/UVES/mask_red_2x2_split.fits.gz +0 -0
- pyreduce_astro-0.7/pyreduce/instruments/UVES/mask_red_binned_2_2.fits.gz +0 -0
- pyreduce_astro-0.7/pyreduce/slit_curve.py +0 -671
- pyreduce_astro-0.7/pyreduce/trace.py +0 -1882
- pyreduce_astro-0.7/tools/make_notebook.py +0 -47
- pyreduce_astro-0.7/tools/mosaic_vis_bundle_plot.py +0 -66
- pyreduce_astro-0.7/tools/plot_1d_vs_2d_extraction.py +0 -162
- pyreduce_astro-0.7/tools/plot_swath_debug.py +0 -64
- {pyreduce_astro-0.7 → pyreduce_astro-0.7a2}/.gitattributes +0 -0
- {pyreduce_astro-0.7 → pyreduce_astro-0.7a2}/.pre-commit-config.yaml +0 -0
- {pyreduce_astro-0.7 → pyreduce_astro-0.7a2}/.readthedocs.yaml +0 -0
- {pyreduce_astro-0.7 → pyreduce_astro-0.7a2}/AGENTS.md +0 -0
- {pyreduce_astro-0.7 → pyreduce_astro-0.7a2}/LICENSE +0 -0
- {pyreduce_astro-0.7 → pyreduce_astro-0.7a2}/hatch_build.py +0 -0
- {pyreduce_astro-0.7/tools → pyreduce_astro-0.7a2}/ipy_startup.py +0 -0
- {pyreduce_astro-0.7 → pyreduce_astro-0.7a2}/pyreduce/__init__.py +0 -0
- {pyreduce_astro-0.7 → pyreduce_astro-0.7a2}/pyreduce/clib/__init__.py +0 -0
- {pyreduce_astro-0.7 → pyreduce_astro-0.7a2}/pyreduce/clib/slit_func_bd.h +0 -0
- {pyreduce_astro-0.7 → pyreduce_astro-0.7a2}/pyreduce/clipnflip.py +0 -0
- {pyreduce_astro-0.7 → pyreduce_astro-0.7a2}/pyreduce/echelle.py +0 -0
- {pyreduce_astro-0.7 → pyreduce_astro-0.7a2}/pyreduce/instruments/__init__.py +0 -0
- /pyreduce_astro-0.7/pyreduce/instruments/defaults/config.yaml → /pyreduce_astro-0.7a2/pyreduce/instruments/common.yaml +0 -0
- {pyreduce_astro-0.7 → pyreduce_astro-0.7a2}/pyreduce/tools/__init__.py +0 -0
- /pyreduce_astro-0.7/pyreduce/instruments/MICADO/wavecal_HK_3arcsec_chip5.npz → /pyreduce_astro-0.7a2/pyreduce/wavecal/MICADO_HK_3arcsec_chip5.npz +0 -0
- {pyreduce_astro-0.7/pyreduce/instruments/defaults → pyreduce_astro-0.7a2/pyreduce/wavecal}/atlas/thar.fits +0 -0
- {pyreduce_astro-0.7/pyreduce/instruments/defaults → pyreduce_astro-0.7a2/pyreduce/wavecal}/atlas/thar_list.txt +0 -0
- {pyreduce_astro-0.7/pyreduce/instruments/defaults → pyreduce_astro-0.7a2/pyreduce/wavecal}/atlas/une.fits +0 -0
- /pyreduce_astro-0.7/tools/convert_wavecal.py → /pyreduce_astro-0.7a2/pyreduce/wavecal/convert.py +0 -0
- /pyreduce_astro-0.7/pyreduce/instruments/CRIRES_PLUS/wavecal_J1228_det1.npz → /pyreduce_astro-0.7a2/pyreduce/wavecal/crires_plus_J1228_Open_det1.npz +0 -0
- /pyreduce_astro-0.7/pyreduce/instruments/CRIRES_PLUS/wavecal_J1228_det2.npz → /pyreduce_astro-0.7a2/pyreduce/wavecal/crires_plus_J1228_Open_det2.npz +0 -0
- /pyreduce_astro-0.7/pyreduce/instruments/CRIRES_PLUS/wavecal_J1228_det3.npz → /pyreduce_astro-0.7a2/pyreduce/wavecal/crires_plus_J1228_Open_det3.npz +0 -0
- /pyreduce_astro-0.7/pyreduce/instruments/HARPN/wavecal_harpn_2D.npz → /pyreduce_astro-0.7a2/pyreduce/wavecal/harpn_harpn_2D.npz +0 -0
- /pyreduce_astro-0.7/pyreduce/instruments/HARPS/wavecal_blue_2D.npz → /pyreduce_astro-0.7a2/pyreduce/wavecal/harps_blue_2D.npz +0 -0
- /pyreduce_astro-0.7/pyreduce/instruments/HARPS/wavecal_blue_pol_2D.npz → /pyreduce_astro-0.7a2/pyreduce/wavecal/harps_blue_pol_2D.npz +0 -0
- /pyreduce_astro-0.7/pyreduce/instruments/HARPS/wavecal_red_2D.npz → /pyreduce_astro-0.7a2/pyreduce/wavecal/harps_red_2D.npz +0 -0
- /pyreduce_astro-0.7/pyreduce/instruments/HARPS/wavecal_red_pol_2D.npz → /pyreduce_astro-0.7a2/pyreduce/wavecal/harps_red_pol_2D.npz +0 -0
- /pyreduce_astro-0.7/pyreduce/instruments/MCDONALD/wavecal.npz → /pyreduce_astro-0.7a2/pyreduce/wavecal/mcdonald.npz +0 -0
- /pyreduce_astro-0.7/pyreduce/instruments/METIS_LSS/wavecal_l_2D.npz → /pyreduce_astro-0.7a2/pyreduce/wavecal/metis_lss_l_2D.npz +0 -0
- /pyreduce_astro-0.7/pyreduce/instruments/METIS_LSS/wavecal_m_2D.npz → /pyreduce_astro-0.7a2/pyreduce/wavecal/metis_lss_m_2D.npz +0 -0
- /pyreduce_astro-0.7/pyreduce/instruments/NIRSPEC/wavecal_K2.npz → /pyreduce_astro-0.7a2/pyreduce/wavecal/nirspec_K2.npz +0 -0
- /pyreduce_astro-0.7/pyreduce/instruments/UVES/wavecal_blue_360nm_2D.npz → /pyreduce_astro-0.7a2/pyreduce/wavecal/uves_blue_360nm_2D.npz +0 -0
- /pyreduce_astro-0.7/pyreduce/instruments/UVES/wavecal_blue_390nm_2D.npz → /pyreduce_astro-0.7a2/pyreduce/wavecal/uves_blue_390nm_2D.npz +0 -0
- /pyreduce_astro-0.7/pyreduce/instruments/UVES/wavecal_blue_437nm_2D.npz → /pyreduce_astro-0.7a2/pyreduce/wavecal/uves_blue_437nm_2D.npz +0 -0
- /pyreduce_astro-0.7/pyreduce/instruments/UVES/wavecal_middle_2x2_2D.npz → /pyreduce_astro-0.7a2/pyreduce/wavecal/uves_middle_2x2_2D.npz +0 -0
- /pyreduce_astro-0.7/pyreduce/instruments/UVES/wavecal_middle_565nm_2D.npz → /pyreduce_astro-0.7a2/pyreduce/wavecal/uves_middle_565nm_2D.npz +0 -0
- /pyreduce_astro-0.7/pyreduce/instruments/UVES/wavecal_middle_580nm_2D.npz → /pyreduce_astro-0.7a2/pyreduce/wavecal/uves_middle_580nm_2D.npz +0 -0
- /pyreduce_astro-0.7/pyreduce/instruments/UVES/wavecal_middle_600nm_2D.npz → /pyreduce_astro-0.7a2/pyreduce/wavecal/uves_middle_600nm_2D.npz +0 -0
- /pyreduce_astro-0.7/pyreduce/instruments/UVES/wavecal_middle_665nm_2D.npz → /pyreduce_astro-0.7a2/pyreduce/wavecal/uves_middle_665nm_2D.npz +0 -0
- /pyreduce_astro-0.7/pyreduce/instruments/UVES/wavecal_middle_860nm_2D.npz → /pyreduce_astro-0.7a2/pyreduce/wavecal/uves_middle_860nm_2D.npz +0 -0
- /pyreduce_astro-0.7/pyreduce/instruments/UVES/wavecal_red_580nm_2D.npz → /pyreduce_astro-0.7a2/pyreduce/wavecal/uves_red_580nm_2D.npz +0 -0
- /pyreduce_astro-0.7/pyreduce/instruments/UVES/wavecal_red_600nm_2D.npz → /pyreduce_astro-0.7a2/pyreduce/wavecal/uves_red_600nm_2D.npz +0 -0
- /pyreduce_astro-0.7/pyreduce/instruments/UVES/wavecal_red_665nm_2D.npz → /pyreduce_astro-0.7a2/pyreduce/wavecal/uves_red_665nm_2D.npz +0 -0
- /pyreduce_astro-0.7/pyreduce/instruments/UVES/wavecal_red_760nm_2D.npz → /pyreduce_astro-0.7a2/pyreduce/wavecal/uves_red_760nm_2D.npz +0 -0
- /pyreduce_astro-0.7/pyreduce/instruments/UVES/wavecal_red_860nm_2D.npz → /pyreduce_astro-0.7a2/pyreduce/wavecal/uves_red_860nm_2D.npz +0 -0
- /pyreduce_astro-0.7/pyreduce/instruments/XSHOOTER/wavecal_nir.npz → /pyreduce_astro-0.7a2/pyreduce/wavecal/xshooter_nir.npz +0 -0
- {pyreduce_astro-0.7 → pyreduce_astro-0.7a2}/tools/argon.line +0 -0
- {pyreduce_astro-0.7 → pyreduce_astro-0.7a2}/tools/bpm_creator.py +0 -0
- {pyreduce_astro-0.7 → pyreduce_astro-0.7a2}/tools/create_wavelength_guess.py +0 -0
- {pyreduce_astro-0.7 → pyreduce_astro-0.7a2}/tools/download_files.py +0 -0
- {pyreduce_astro-0.7 → pyreduce_astro-0.7a2}/tools/neon.lin +0 -0
- {pyreduce_astro-0.7 → pyreduce_astro-0.7a2}/tools/neon.line +0 -0
- {pyreduce_astro-0.7 → pyreduce_astro-0.7a2}/tools/pymultispec.py +0 -0
- {pyreduce_astro-0.7 → pyreduce_astro-0.7a2}/tools/thar.npz +0 -0
- {pyreduce_astro-0.7 → pyreduce_astro-0.7a2}/tools/wavecal_creator.py +0 -0
- {pyreduce_astro-0.7 → pyreduce_astro-0.7a2}/tools/wavecal_creator_from_existing.py +0 -0
- {pyreduce_astro-0.7 → pyreduce_astro-0.7a2}/tools/xshooter_nir.json +0 -0
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## [0.7a2] - 2025-12-23
|
|
5
|
+
|
|
6
|
+
### Added
|
|
7
|
+
- Manual API calls documentation (manual_calls.md)
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
- ReadTheDocs build failing due to missing myst_parser
|
|
11
|
+
- Trace module reference in documentation
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
- Docs Makefile now uses uv
|
|
15
|
+
- pyproject.toml cleanup
|
|
16
|
+
|
|
17
|
+
## [0.7a1] - 2025-12-22
|
|
18
|
+
|
|
19
|
+
### Added
|
|
20
|
+
- New Pipeline API with `Pipeline.from_instrument()` for simplified usage
|
|
21
|
+
- Click-based CLI replacing argparse (`uv run reduce run UVES HD132205`)
|
|
22
|
+
- Pydantic models for instrument configuration validation
|
|
23
|
+
- YAML instrument configs replacing JSON
|
|
24
|
+
- IPython startup script for interactive development
|
|
25
|
+
- `plot_dir` option to save plots as PNG files
|
|
26
|
+
- Fiber bundle tracing support for multi-fiber instruments
|
|
27
|
+
- `filter_x` and `filter_type` options for order tracing
|
|
28
|
+
|
|
29
|
+
### Changed
|
|
30
|
+
- Rename `mode` to `arm` terminology throughout
|
|
31
|
+
- Output extension changed from `.ech` to `.fits`
|
|
32
|
+
- Documentation converted from RST to Markdown
|
|
33
|
+
- Trace detection parameters renamed (`opower` -> `degree`, `filter_size` -> `filter_y`)
|
|
34
|
+
|
|
35
|
+
### Fixed
|
|
36
|
+
- Plotting issues with non-finite values
|
|
37
|
+
- Use `interpolate_replace_nans` for masked pixels
|
|
38
|
+
|
|
39
|
+
## [0.6.0] - 2025-12-22
|
|
40
|
+
|
|
41
|
+
### Added
|
|
42
|
+
- JSON schema validation test for instrument configurations
|
|
43
|
+
- GitHub workflow creates GitHub Release on tag push
|
|
44
|
+
|
|
45
|
+
### Fixed
|
|
46
|
+
- Fix test_wavecal to match WavelengthCalibration.execute() signature
|
|
47
|
+
- Fix spec fixture to match ScienceExtraction.run() signature
|
|
48
|
+
- Fix instrument schema: replace invalid 'value' keyword with standard JSON Schema 'type'
|
|
49
|
+
|
|
50
|
+
## [0.6.0b5] - 2025-10-04
|
|
51
|
+
|
|
52
|
+
### Fixed
|
|
53
|
+
- Include *.pyd files for Windows builds
|
|
54
|
+
- Remove redundant build test from workflow
|
|
55
|
+
|
|
56
|
+
## [0.6.0b4] - 2025-10-03
|
|
57
|
+
|
|
58
|
+
### Changed
|
|
59
|
+
- workflow builds multi-arch wheels
|
|
60
|
+
- minor fixes to make build pass
|
|
61
|
+
|
|
62
|
+
## [0.6.0b3] - 2025-10-02
|
|
63
|
+
|
|
64
|
+
### Added
|
|
65
|
+
- Test organization with pytest markers (unit, instrument, slow, downloads)
|
|
66
|
+
- ANDES instrument configuration and settings
|
|
67
|
+
|
|
68
|
+
### Changed
|
|
69
|
+
- CI now runs fast tests (~7s) on every push to master
|
|
70
|
+
- Test suite optimized with slow marker for tests >3s
|
|
71
|
+
|
|
72
|
+
### Fixed
|
|
73
|
+
- ANDES instrument configuration errors (missing decker fields, regex pattern)
|
|
74
|
+
- NIRSPEC FITS header errors with illegal keywords containing dots
|
|
75
|
+
- Pre-commit hooks now documented and working correctly
|
|
76
|
+
|
|
77
|
+
## [0.6.0b2] - 2025-10-02
|
|
78
|
+
|
|
79
|
+
### Changed
|
|
80
|
+
- lazy imports
|
|
81
|
+
- cosmetic fixes like version string
|
|
82
|
+
|
|
83
|
+
## [0.6.0b1] - 2025-10-02
|
|
84
|
+
|
|
85
|
+
### Changed
|
|
86
|
+
- Modern build system using uv package manager
|
|
87
|
+
- Minimum Python version now 3.11, default 3.13
|
|
88
|
+
- Migrated build system from setuptools to Hatchling (PEP 517)
|
|
89
|
+
- Replaced black, isort, flake8, and pyupgrade with Ruff
|
|
90
|
+
- Improved code formatting across entire codebase using Ruff
|
|
91
|
+
- Modernized GitHub Actions workflow (uv-based, Python 3.11-3.13 matrix)
|
|
92
|
+
- Updated documentation to reflect modern installation with uv
|
|
93
|
+
- Consolidated legacy build files (setup.py, requirements.txt) into pyproject.toml
|
|
94
|
+
- Removed automatic PyPI publishing from GitHub Actions (now manual)
|
|
95
|
+
- GitHub Actions tests now manual-only on master branch
|
|
96
|
+
- Modernized ReadTheDocs build configuration
|
|
97
|
+
|
|
98
|
+
### Fixed
|
|
99
|
+
- Close FITS file handles after reading to prevent resource leaks ([#28](https://github.com/ivh/PyReduce/pull/28))
|
|
100
|
+
- Store wavelength calibration in double precision instead of single ([#30](https://github.com/ivh/PyReduce/pull/30))
|
|
101
|
+
- Add fallback value for E_ORIENT header keyword ([#31](https://github.com/ivh/PyReduce/pull/31))
|
|
102
|
+
- Return final wavelength linelist with flags from calibration ([#33](https://github.com/ivh/PyReduce/pull/33))
|
|
103
|
+
- Fix MaskedArray filling in normflat routine
|
|
104
|
+
- Fix undefined TypeFilter import in NEID instrument
|
|
105
|
+
- Fix Sphinx documentation build warnings
|
|
106
|
+
- Fix pre-commit hook configuration issues
|
|
107
|
+
|
|
108
|
+
### Documentation
|
|
109
|
+
- Updated README badges for GitHub Actions and Python versions
|
|
110
|
+
- Updated installation instructions to use uv instead of pip
|
|
111
|
+
- Improved documentation build process
|
|
112
|
+
- CLAUDE.md / AGENTS.md for AI-assisted development guidance
|
|
@@ -19,7 +19,7 @@ uv run reduce download UVES
|
|
|
19
19
|
PYREDUCE_PLOT=0 uv run python examples/uves_example.py
|
|
20
20
|
|
|
21
21
|
# Or use CLI
|
|
22
|
-
uv run reduce run UVES
|
|
22
|
+
uv run reduce run UVES HD132205 --steps bias,flat,orders,science
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
## Package Structure
|
|
@@ -31,7 +31,7 @@ pyreduce/
|
|
|
31
31
|
├── reduce.py # Step class implementations
|
|
32
32
|
├── configuration.py # Config loading (settings JSON)
|
|
33
33
|
├── extract.py # Optimal extraction algorithm
|
|
34
|
-
├──
|
|
34
|
+
├── trace_orders.py # Order detection and tracing
|
|
35
35
|
├── wavelength_calibration.py # Wavelength solution fitting
|
|
36
36
|
├── combine_frames.py # Frame combination/calibration
|
|
37
37
|
├── echelle.py # Echelle spectrum I/O
|
|
@@ -41,35 +41,19 @@ pyreduce/
|
|
|
41
41
|
├── instruments/ # Instrument definitions
|
|
42
42
|
│ ├── common.py # Base Instrument class
|
|
43
43
|
│ ├── models.py # Pydantic config models
|
|
44
|
-
│ ├── filters.py # File classification filters
|
|
45
44
|
│ ├── instrument_info.py # Instrument loader
|
|
46
|
-
│ ├──
|
|
47
|
-
│
|
|
48
|
-
│
|
|
49
|
-
|
|
50
|
-
│
|
|
51
|
-
│ └──
|
|
52
|
-
│ ├── __init__.py # Instrument class
|
|
53
|
-
│ ├── config.yaml # Hardware/header config
|
|
54
|
-
│ ├── settings.json # Reduction parameters
|
|
55
|
-
│ ├── wavecal_*.npz # Pre-computed wavelength solutions
|
|
56
|
-
│ └── mask_*.fits.gz # Bad pixel masks
|
|
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
|
|
57
51
|
│
|
|
58
52
|
└── clib/ # C source for extraction
|
|
59
53
|
├── slit_func_bd.c
|
|
60
54
|
└── slit_func_2d_xi_zeta_bd.c
|
|
61
55
|
```
|
|
62
56
|
|
|
63
|
-
## Image Coordinate Convention
|
|
64
|
-
|
|
65
|
-
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.
|
|
66
|
-
|
|
67
|
-
This means:
|
|
68
|
-
- **Columns (x)** = wavelength/dispersion direction
|
|
69
|
-
- **Rows (y)** = spatial/cross-dispersion direction
|
|
70
|
-
- **Traces** are polynomial functions of x, giving y-position
|
|
71
|
-
- **`extraction_height`** refers to pixels above/below each trace (in y)
|
|
72
|
-
|
|
73
57
|
## Pipeline Steps
|
|
74
58
|
|
|
75
59
|
The reduction pipeline consists of these steps (in typical order):
|
|
@@ -79,8 +63,8 @@ The reduction pipeline consists of these steps (in typical order):
|
|
|
79
63
|
| `mask` | `Mask` | Load bad pixel mask for detector |
|
|
80
64
|
| `bias` | `Bias` | Combine bias frames into master bias |
|
|
81
65
|
| `flat` | `Flat` | Combine flat frames, subtract bias |
|
|
82
|
-
| `
|
|
83
|
-
| `curvature` | `SlitCurvatureDetermination` | Measure slit
|
|
66
|
+
| `orders` | `OrderTracing` | Trace echelle order positions on flat |
|
|
67
|
+
| `curvature` | `SlitCurvatureDetermination` | Measure slit tilt/shear from arc lamp |
|
|
84
68
|
| `scatter` | `BackgroundScatter` | Model inter-order scattered light |
|
|
85
69
|
| `norm_flat` | `NormalizeFlatField` | Normalize flat, extract blaze function |
|
|
86
70
|
| `wavecal_master` | `WavelengthCalibrationMaster` | Extract wavelength calibration spectrum |
|
|
@@ -103,7 +87,7 @@ Each step class has:
|
|
|
103
87
|
|
|
104
88
|
### Instrument Configs (YAML)
|
|
105
89
|
|
|
106
|
-
Location: `pyreduce/instruments
|
|
90
|
+
Location: `pyreduce/instruments/*.yaml`
|
|
107
91
|
|
|
108
92
|
Defines what the instrument IS - hardware properties and header mappings:
|
|
109
93
|
|
|
@@ -111,7 +95,7 @@ Defines what the instrument IS - hardware properties and header mappings:
|
|
|
111
95
|
# Basic identification
|
|
112
96
|
instrument: HARPS
|
|
113
97
|
telescope: ESO-3.6m
|
|
114
|
-
|
|
98
|
+
arms: [red, blue]
|
|
115
99
|
|
|
116
100
|
# Detector properties
|
|
117
101
|
naxis: [4096, 4096]
|
|
@@ -145,7 +129,7 @@ Validated by Pydantic model `InstrumentConfig` in `models.py`.
|
|
|
145
129
|
|
|
146
130
|
### Reduction Settings (JSON)
|
|
147
131
|
|
|
148
|
-
Location: `pyreduce/
|
|
132
|
+
Location: `pyreduce/settings/settings_*.json`
|
|
149
133
|
|
|
150
134
|
Defines HOW to reduce - algorithm parameters per step:
|
|
151
135
|
|
|
@@ -154,14 +138,14 @@ Defines HOW to reduce - algorithm parameters per step:
|
|
|
154
138
|
"bias": {
|
|
155
139
|
"degree": 0
|
|
156
140
|
},
|
|
157
|
-
"
|
|
141
|
+
"orders": {
|
|
158
142
|
"degree": 4,
|
|
159
143
|
"noise": 100,
|
|
160
144
|
"min_cluster": 500,
|
|
161
|
-
"
|
|
145
|
+
"filter_size": 120
|
|
162
146
|
},
|
|
163
147
|
"norm_flat": {
|
|
164
|
-
"
|
|
148
|
+
"extraction_width": 0.5,
|
|
165
149
|
"smooth_slitfunction": 1,
|
|
166
150
|
"oversampling": 10
|
|
167
151
|
},
|
|
@@ -172,13 +156,13 @@ Defines HOW to reduce - algorithm parameters per step:
|
|
|
172
156
|
},
|
|
173
157
|
"science": {
|
|
174
158
|
"extraction_method": "optimal",
|
|
175
|
-
"
|
|
159
|
+
"extraction_width": 0.5,
|
|
176
160
|
"oversampling": 10
|
|
177
161
|
}
|
|
178
162
|
}
|
|
179
163
|
```
|
|
180
164
|
|
|
181
|
-
Settings cascade: `
|
|
165
|
+
Settings cascade: `settings_default.json` < `settings_INSTRUMENT.json` < runtime overrides.
|
|
182
166
|
|
|
183
167
|
## Python API
|
|
184
168
|
|
|
@@ -191,8 +175,8 @@ result = Pipeline.from_instrument(
|
|
|
191
175
|
instrument="UVES",
|
|
192
176
|
target="HD132205",
|
|
193
177
|
night="2010-04-01",
|
|
194
|
-
|
|
195
|
-
steps=("bias", "flat", "
|
|
178
|
+
arm="middle",
|
|
179
|
+
steps=("bias", "flat", "orders", "science"),
|
|
196
180
|
base_dir="/data",
|
|
197
181
|
plot=1,
|
|
198
182
|
).run()
|
|
@@ -212,12 +196,12 @@ from pyreduce.pipeline import Pipeline
|
|
|
212
196
|
pipe = Pipeline(
|
|
213
197
|
instrument="UVES",
|
|
214
198
|
output_dir="/output",
|
|
215
|
-
|
|
199
|
+
arm="middle",
|
|
216
200
|
plot=0,
|
|
217
201
|
)
|
|
218
202
|
pipe.bias(bias_files)
|
|
219
203
|
pipe.flat(flat_files)
|
|
220
|
-
pipe.
|
|
204
|
+
pipe.trace_orders()
|
|
221
205
|
pipe.extract(science_files)
|
|
222
206
|
result = pipe.run()
|
|
223
207
|
```
|
|
@@ -237,12 +221,12 @@ pyreduce.reduce.main(
|
|
|
237
221
|
|
|
238
222
|
```bash
|
|
239
223
|
# Full pipeline
|
|
240
|
-
uv run reduce run UVES
|
|
224
|
+
uv run reduce run UVES HD132205 --steps bias,flat,orders
|
|
241
225
|
|
|
242
226
|
# Individual steps (top-level commands)
|
|
243
|
-
uv run reduce bias UVES
|
|
244
|
-
uv run reduce
|
|
245
|
-
uv run reduce wavecal UVES
|
|
227
|
+
uv run reduce bias UVES HD132205
|
|
228
|
+
uv run reduce orders UVES HD132205
|
|
229
|
+
uv run reduce wavecal UVES HD132205
|
|
246
230
|
|
|
247
231
|
# Combine reduced spectra
|
|
248
232
|
uv run reduce combine --output combined.fits *.final.fits
|
|
@@ -257,12 +241,8 @@ uv run reduce list-steps
|
|
|
257
241
|
## Environment Variables
|
|
258
242
|
|
|
259
243
|
- `REDUCE_DATA` - Base data directory (default: `~/REDUCE_DATA`)
|
|
260
|
-
- `PYREDUCE_PLOT` - Override plot level (0
|
|
261
|
-
- `PYREDUCE_PLOT_DIR` - Save plots to directory
|
|
262
|
-
- `PYREDUCE_PLOT_SHOW` - Display mode: `block` (default), `defer`, or `off`
|
|
263
|
-
- `PYREDUCE_PLOT_ANIMATION_SPEED` - Frame delay in seconds for extraction animation (default: 0.3)
|
|
264
|
-
|
|
265
|
-
Plot modes: `block` shows each plot interactively; `defer` accumulates all plots and shows at end (useful with webagg backend); `off` disables display. Save and display are independent.
|
|
244
|
+
- `PYREDUCE_PLOT` - Override plot level (0, 1, 2)
|
|
245
|
+
- `PYREDUCE_PLOT_DIR` - Save plots to directory instead of displaying
|
|
266
246
|
|
|
267
247
|
## Development
|
|
268
248
|
|
|
@@ -270,24 +250,18 @@ Plot modes: `block` shows each plot interactively; `defer` accumulates all plots
|
|
|
270
250
|
|
|
271
251
|
```bash
|
|
272
252
|
uv sync # Install dependencies
|
|
273
|
-
uv run reduce-build # Compile C extensions
|
|
274
|
-
uv run reduce-clean # Remove compiled extensions
|
|
275
253
|
uv run pre-commit install # Setup hooks (once)
|
|
276
254
|
uv run pytest -m unit # Fast unit tests
|
|
277
255
|
uv run pytest --instrument=UVES # Test single instrument
|
|
278
256
|
uv run ruff check --fix . # Lint and fix
|
|
279
257
|
```
|
|
280
258
|
|
|
281
|
-
After a fresh clone or `rm -rf .venv`, run `uv sync && uv run reduce-build` to set up.
|
|
282
|
-
|
|
283
259
|
### Adding Instruments
|
|
284
260
|
|
|
285
|
-
1. Create `pyreduce/instruments/
|
|
286
|
-
2.
|
|
287
|
-
3.
|
|
288
|
-
4. Add `
|
|
289
|
-
5. Add wavecal/mask files if available
|
|
290
|
-
6. Add example script to `examples/name_example.py`
|
|
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`
|
|
291
265
|
|
|
292
266
|
### Test Organization
|
|
293
267
|
|
|
@@ -304,53 +278,8 @@ After a fresh clone or `rm -rf .venv`, run `uv sync && uv run reduce-build` to s
|
|
|
304
278
|
| `pyreduce/reduce.py` | Step class implementations |
|
|
305
279
|
| `pyreduce/extract.py` | Optimal extraction algorithm |
|
|
306
280
|
| `pyreduce/wavelength_calibration.py` | Wavelength solution fitting |
|
|
307
|
-
| `pyreduce/
|
|
281
|
+
| `pyreduce/trace_orders.py` | Order detection and tracing |
|
|
308
282
|
| `pyreduce/instruments/common.py` | Base Instrument class |
|
|
309
283
|
| `pyreduce/instruments/models.py` | Pydantic config models |
|
|
310
284
|
| `pyreduce/clib/*.c` | C code for slit function decomposition |
|
|
311
285
|
| `hatch_build.py` | CFFI extension build hook |
|
|
312
|
-
|
|
313
|
-
## Release Process
|
|
314
|
-
|
|
315
|
-
To release a new version (e.g., `0.7a6`):
|
|
316
|
-
|
|
317
|
-
1. **Update documentation** for any renamed steps, new CLI options, etc:
|
|
318
|
-
- `README.md` - Quick start examples
|
|
319
|
-
- `docs/cli.md` - CLI reference
|
|
320
|
-
- `docs/index.md`, `docs/howto.md`, `docs/examples.md` - Usage examples
|
|
321
|
-
- `docs/configuration_file.md` - Config key names
|
|
322
|
-
|
|
323
|
-
2. **Update CHANGELOG.md** with release date and changes
|
|
324
|
-
|
|
325
|
-
3. **Update version** in `pyproject.toml`
|
|
326
|
-
|
|
327
|
-
3a. **sync** - run `uv sync` to get the new version into uv.lock
|
|
328
|
-
|
|
329
|
-
4. **Update example headers** - all `examples/*.py` have PEP 723 metadata:
|
|
330
|
-
```python
|
|
331
|
-
# /// script
|
|
332
|
-
# dependencies = ["pyreduce-astro>=0.7a6"]
|
|
333
|
-
# ///
|
|
334
|
-
```
|
|
335
|
-
|
|
336
|
-
5. **Run unit tests** to catch issues before release:
|
|
337
|
-
```bash
|
|
338
|
-
uv run pytest -m unit
|
|
339
|
-
```
|
|
340
|
-
|
|
341
|
-
6. **Commit, tag, and push**:
|
|
342
|
-
```bash
|
|
343
|
-
git add -A && git commit -m "Release v0.7a6"
|
|
344
|
-
git tag v0.7a6
|
|
345
|
-
git push && git push --tags
|
|
346
|
-
```
|
|
347
|
-
|
|
348
|
-
7. **Monitor GitHub Actions** - the tag push triggers:
|
|
349
|
-
- Tests on Python 3.13
|
|
350
|
-
- Wheel builds (Linux, Windows, macOS)
|
|
351
|
-
- PyPI upload
|
|
352
|
-
- GitHub Release creation
|
|
353
|
-
|
|
354
|
-
```bash
|
|
355
|
-
gh run watch # watch the triggered workflow
|
|
356
|
-
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pyreduce-astro
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.7a2
|
|
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
|
|
@@ -15,10 +15,12 @@ Classifier: Intended Audience :: Science/Research
|
|
|
15
15
|
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
|
|
16
16
|
Classifier: Programming Language :: C
|
|
17
17
|
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
20
|
Classifier: Programming Language :: Python :: 3.13
|
|
19
21
|
Classifier: Programming Language :: Python :: 3.14
|
|
20
22
|
Classifier: Topic :: Scientific/Engineering :: Astronomy
|
|
21
|
-
Requires-Python: >=3.
|
|
23
|
+
Requires-Python: >=3.11
|
|
22
24
|
Requires-Dist: astropy>=5.3.0
|
|
23
25
|
Requires-Dist: cffi>=1.17.1
|
|
24
26
|
Requires-Dist: click>=8.1.0
|
|
@@ -37,15 +39,12 @@ Requires-Dist: scikit-image>=0.22.0
|
|
|
37
39
|
Requires-Dist: scipy>=1.11.0
|
|
38
40
|
Requires-Dist: spectres>=2.2.0
|
|
39
41
|
Requires-Dist: tqdm>=4.66.0
|
|
42
|
+
Requires-Dist: wget>=3.2
|
|
40
43
|
Description-Content-Type: text/markdown
|
|
41
44
|
|
|
42
45
|
[](https://github.com/ivh/PyReduce/actions/workflows/python-publish.yml)
|
|
43
46
|
[](https://pyreduce-astro.readthedocs.io/en/latest/?badge=latest)
|
|
44
|
-
[ for the highlights. If the update breaks your existing setup, you are very welcome to file an issue, so we can assist you.
|
|
47
|
+
[](https://www.python.org/downloads/)
|
|
49
48
|
|
|
50
49
|
# PyReduce
|
|
51
50
|
|
|
@@ -79,11 +78,11 @@ uv sync
|
|
|
79
78
|
uv run reduce download UVES
|
|
80
79
|
|
|
81
80
|
# Run reduction
|
|
82
|
-
uv run reduce run UVES
|
|
81
|
+
uv run reduce run UVES HD132205 --steps bias,flat,orders,science
|
|
83
82
|
|
|
84
83
|
# Or run individual steps
|
|
85
|
-
uv run reduce bias UVES
|
|
86
|
-
uv run reduce flat UVES
|
|
84
|
+
uv run reduce bias UVES HD132205
|
|
85
|
+
uv run reduce flat UVES HD132205
|
|
87
86
|
```
|
|
88
87
|
|
|
89
88
|
Or use the Python API:
|
|
@@ -94,28 +93,14 @@ Pipeline.from_instrument(
|
|
|
94
93
|
instrument="UVES",
|
|
95
94
|
target="HD132205",
|
|
96
95
|
night="2010-04-01",
|
|
97
|
-
|
|
96
|
+
arm="middle",
|
|
98
97
|
).run()
|
|
99
98
|
```
|
|
100
99
|
|
|
101
|
-
## Plotting
|
|
102
|
-
|
|
103
|
-
Control plotting with environment variables:
|
|
104
|
-
|
|
105
|
-
```bash
|
|
106
|
-
# Save plots to files (headless/CI)
|
|
107
|
-
PYREDUCE_PLOT=1 PYREDUCE_PLOT_DIR=/tmp/plots PYREDUCE_PLOT_SHOW=off uv run reduce run ...
|
|
108
|
-
|
|
109
|
-
# Show all plots at end (browser via webagg)
|
|
110
|
-
MPLBACKEND=webagg PYREDUCE_PLOT=1 PYREDUCE_PLOT_SHOW=defer uv run reduce run ...
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
See [How To](https://pyreduce-astro.readthedocs.io/en/latest/howto.html#plot-modes) for details.
|
|
114
|
-
|
|
115
100
|
## Documentation
|
|
116
101
|
|
|
117
102
|
Full documentation at [ReadTheDocs](https://pyreduce-astro.readthedocs.io/).
|
|
118
103
|
|
|
119
104
|
## Output
|
|
120
105
|
|
|
121
|
-
PyReduce creates `.
|
|
106
|
+
PyReduce creates `.ech` files (standard FITS with binary table extension). Headers include original keywords plus PyReduce-specific ones prefixed with `e_`.
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
[](https://github.com/ivh/PyReduce/actions/workflows/python-publish.yml)
|
|
2
2
|
[](https://pyreduce-astro.readthedocs.io/en/latest/?badge=latest)
|
|
3
|
-
[ for the highlights. If the update breaks your existing setup, you are very welcome to file an issue, so we can assist you.
|
|
3
|
+
[](https://www.python.org/downloads/)
|
|
8
4
|
|
|
9
5
|
# PyReduce
|
|
10
6
|
|
|
@@ -38,11 +34,11 @@ uv sync
|
|
|
38
34
|
uv run reduce download UVES
|
|
39
35
|
|
|
40
36
|
# Run reduction
|
|
41
|
-
uv run reduce run UVES
|
|
37
|
+
uv run reduce run UVES HD132205 --steps bias,flat,orders,science
|
|
42
38
|
|
|
43
39
|
# Or run individual steps
|
|
44
|
-
uv run reduce bias UVES
|
|
45
|
-
uv run reduce flat UVES
|
|
40
|
+
uv run reduce bias UVES HD132205
|
|
41
|
+
uv run reduce flat UVES HD132205
|
|
46
42
|
```
|
|
47
43
|
|
|
48
44
|
Or use the Python API:
|
|
@@ -53,28 +49,14 @@ Pipeline.from_instrument(
|
|
|
53
49
|
instrument="UVES",
|
|
54
50
|
target="HD132205",
|
|
55
51
|
night="2010-04-01",
|
|
56
|
-
|
|
52
|
+
arm="middle",
|
|
57
53
|
).run()
|
|
58
54
|
```
|
|
59
55
|
|
|
60
|
-
## Plotting
|
|
61
|
-
|
|
62
|
-
Control plotting with environment variables:
|
|
63
|
-
|
|
64
|
-
```bash
|
|
65
|
-
# Save plots to files (headless/CI)
|
|
66
|
-
PYREDUCE_PLOT=1 PYREDUCE_PLOT_DIR=/tmp/plots PYREDUCE_PLOT_SHOW=off uv run reduce run ...
|
|
67
|
-
|
|
68
|
-
# Show all plots at end (browser via webagg)
|
|
69
|
-
MPLBACKEND=webagg PYREDUCE_PLOT=1 PYREDUCE_PLOT_SHOW=defer uv run reduce run ...
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
See [How To](https://pyreduce-astro.readthedocs.io/en/latest/howto.html#plot-modes) for details.
|
|
73
|
-
|
|
74
56
|
## Documentation
|
|
75
57
|
|
|
76
58
|
Full documentation at [ReadTheDocs](https://pyreduce-astro.readthedocs.io/).
|
|
77
59
|
|
|
78
60
|
## Output
|
|
79
61
|
|
|
80
|
-
PyReduce creates `.
|
|
62
|
+
PyReduce creates `.ech` files (standard FITS with binary table extension). Headers include original keywords plus PyReduce-specific ones prefixed with `e_`.
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+

|
|
2
|
+
[](https://pyreduce-astro.readthedocs.io/en/latest/?badge=latest)
|
|
3
|
+
[](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
|