pyreduce-astro 0.5.27__tar.gz → 0.6.0b1__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.6.0b1/.gitignore +19 -0
- pyreduce_astro-0.6.0b1/PKG-INFO +112 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/README.md +42 -15
- pyreduce_astro-0.6.0b1/hatch_build.py +95 -0
- pyreduce_astro-0.6.0b1/pyproject.toml +180 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/__init__.py +9 -5
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/__main__.py +0 -1
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/clib/build_extract.py +2 -3
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/clib/slit_func_2d_xi_zeta_bd.c +4 -4
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/clib/slit_func_2d_xi_zeta_bd.h +5 -5
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/clipnflip.py +0 -1
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/combine_frames.py +93 -25
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/configuration.py +3 -4
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/continuum_normalization.py +4 -4
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/cwrappers.py +20 -29
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/datasets.py +1 -1
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/echelle.py +49 -21
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/estimate_background_scatter.py +2 -3
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/extract.py +27 -25
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/extraction_width.py +2 -6
- pyreduce_astro-0.6.0b1/pyreduce/instruments/andes.json +59 -0
- pyreduce-astro-0.5.27/pyreduce/instruments/crires_plus.py → pyreduce_astro-0.6.0b1/pyreduce/instruments/andes.py +5 -7
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/instruments/common.py +18 -22
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/instruments/crires_plus.json +1 -1
- pyreduce_astro-0.6.0b1/pyreduce/instruments/crires_plus.py +103 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/instruments/filters.py +4 -3
- pyreduce_astro-0.6.0b1/pyreduce/instruments/harpn.json +136 -0
- pyreduce_astro-0.6.0b1/pyreduce/instruments/harpn.py +201 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/instruments/harps.py +5 -3
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/instruments/instrument_info.py +1 -2
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/instruments/jwst_miri.py +3 -7
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/instruments/jwst_niriss.py +6 -7
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/instruments/lick_apf.py +3 -8
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/instruments/mcdonald.py +2 -6
- pyreduce_astro-0.6.0b1/pyreduce/instruments/metis_ifu.json +63 -0
- pyreduce_astro-0.6.0b1/pyreduce/instruments/metis_ifu.py +45 -0
- pyreduce_astro-0.6.0b1/pyreduce/instruments/metis_lss.json +65 -0
- pyreduce_astro-0.6.0b1/pyreduce/instruments/metis_lss.py +45 -0
- pyreduce_astro-0.6.0b1/pyreduce/instruments/micado.json +53 -0
- pyreduce_astro-0.6.0b1/pyreduce/instruments/micado.py +45 -0
- pyreduce_astro-0.6.0b1/pyreduce/instruments/neid.json +51 -0
- pyreduce_astro-0.6.0b1/pyreduce/instruments/neid.py +154 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/instruments/nirspec.py +11 -13
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/instruments/nte.py +2 -6
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/instruments/uves.py +2 -6
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/instruments/xshooter.py +3 -7
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/make_shear.py +8 -6
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/rectify.py +2 -5
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/reduce.py +78 -62
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/settings/settings_CRIRES_PLUS.json +3 -2
- pyreduce_astro-0.6.0b1/pyreduce/settings/settings_HARPN.json +73 -0
- pyreduce_astro-0.6.0b1/pyreduce/settings/settings_METIS_IFU.json +77 -0
- pyreduce_astro-0.6.0b1/pyreduce/settings/settings_METIS_LSS.json +77 -0
- pyreduce_astro-0.6.0b1/pyreduce/settings/settings_MICADO.json +78 -0
- pyreduce_astro-0.6.0b1/pyreduce/settings/settings_NEID.json +73 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/settings/settings_UVES.json +2 -2
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/settings/settings_pyreduce.json +2 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/settings/settings_schema.json +5 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/tools/combine.py +1 -2
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/trace_orders.py +58 -25
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/util.py +23 -28
- pyreduce_astro-0.6.0b1/pyreduce/wavecal/MICADO_HK_3arcsec_chip5.npz +0 -0
- pyreduce_astro-0.6.0b1/pyreduce/wavecal/atlas/thar.fits +4946 -13
- pyreduce_astro-0.6.0b1/pyreduce/wavecal/atlas/thar_list.txt +4172 -0
- pyreduce_astro-0.6.0b1/pyreduce/wavecal/atlas/une.fits +0 -0
- pyreduce_astro-0.6.0b1/pyreduce/wavecal/convert.py +38 -0
- pyreduce_astro-0.6.0b1/pyreduce/wavecal/harpn_harpn_2D.npz +0 -0
- pyreduce_astro-0.6.0b1/pyreduce/wavecal/metis_lss_l_2D.npz +0 -0
- pyreduce_astro-0.6.0b1/pyreduce/wavecal/metis_lss_m_2D.npz +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/wavelength_calibration.py +58 -44
- pyreduce-astro-0.5.27/MANIFEST.in +0 -20
- pyreduce-astro-0.5.27/PKG-INFO +0 -52
- pyreduce-astro-0.5.27/codemeta.json +0 -53
- pyreduce-astro-0.5.27/pyproject.toml +0 -20
- pyreduce-astro-0.5.27/pyreduce/_version.py +0 -21
- pyreduce-astro-0.5.27/pyreduce_astro.egg-info/PKG-INFO +0 -52
- pyreduce-astro-0.5.27/pyreduce_astro.egg-info/SOURCES.txt +0 -155
- pyreduce-astro-0.5.27/pyreduce_astro.egg-info/dependency_links.txt +0 -1
- pyreduce-astro-0.5.27/pyreduce_astro.egg-info/requires.txt +0 -11
- pyreduce-astro-0.5.27/pyreduce_astro.egg-info/top_level.txt +0 -1
- pyreduce-astro-0.5.27/requirements.txt +0 -24
- pyreduce-astro-0.5.27/setup.cfg +0 -20
- pyreduce-astro-0.5.27/setup.py +0 -76
- pyreduce-astro-0.5.27/test/test_bias.py +0 -67
- pyreduce-astro-0.5.27/test/test_clib_build.py +0 -6
- pyreduce-astro-0.5.27/test/test_clipnflip.py +0 -110
- pyreduce-astro-0.5.27/test/test_combine.py +0 -145
- pyreduce-astro-0.5.27/test/test_configuration.py +0 -69
- pyreduce-astro-0.5.27/test/test_continuum.py +0 -75
- pyreduce-astro-0.5.27/test/test_cwrappers.py +0 -122
- pyreduce-astro-0.5.27/test/test_echelle.py +0 -187
- pyreduce-astro-0.5.27/test/test_extract.py +0 -379
- pyreduce-astro-0.5.27/test/test_flat.py +0 -79
- pyreduce-astro-0.5.27/test/test_instruments.py +0 -105
- pyreduce-astro-0.5.27/test/test_mask.py +0 -27
- pyreduce-astro-0.5.27/test/test_normflat.py +0 -52
- pyreduce-astro-0.5.27/test/test_orders.py +0 -85
- pyreduce-astro-0.5.27/test/test_reduce.py +0 -75
- pyreduce-astro-0.5.27/test/test_scatter.py +0 -70
- pyreduce-astro-0.5.27/test/test_science.py +0 -79
- pyreduce-astro-0.5.27/test/test_shear.py +0 -156
- pyreduce-astro-0.5.27/test/test_util.py +0 -5
- pyreduce-astro-0.5.27/test/test_wavecal.py +0 -60
- pyreduce-astro-0.5.27/versioneer.py +0 -1887
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/LICENSE +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/clib/__init__.py +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/clib/slit_func_bd.c +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/clib/slit_func_bd.h +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/instruments/__init__.py +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/instruments/common.json +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/instruments/harps.json +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/instruments/instrument_schema.json +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/instruments/jwst_miri.json +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/instruments/jwst_niriss.json +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/instruments/lick_apf.json +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/instruments/mcdonald.json +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/instruments/nirspec.json +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/instruments/nte.json +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/instruments/uves.json +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/instruments/xshooter.json +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/masks/mask_crires_plus_det1.fits.gz +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/masks/mask_crires_plus_det2.fits.gz +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/masks/mask_crires_plus_det3.fits.gz +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/masks/mask_ctio_chiron.fits.gz +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/masks/mask_elodie.fits.gz +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/masks/mask_feros3.fits.gz +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/masks/mask_flames_giraffe.fits.gz +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/masks/mask_harps_blue.fits.gz +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/masks/mask_harps_red.fits.gz +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/masks/mask_hds_blue.fits.gz +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/masks/mask_hds_red.fits.gz +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/masks/mask_het_hrs_2x5.fits.gz +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/masks/mask_jwst_miri_lrs_slitless.fits.gz +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/masks/mask_jwst_niriss_gr700xd.fits.gz +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/masks/mask_lick_apf_.fits.gz +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/masks/mask_mcdonald.fits.gz +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/masks/mask_nes.fits.gz +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/masks/mask_nirspec_nirspec.fits.gz +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/masks/mask_sarg.fits.gz +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/masks/mask_sarg_2x2a.fits.gz +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/masks/mask_sarg_2x2b.fits.gz +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/masks/mask_subaru_hds_red.fits.gz +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/masks/mask_uves_blue.fits.gz +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/masks/mask_uves_blue_binned_2_2.fits.gz +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/masks/mask_uves_middle.fits.gz +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/masks/mask_uves_middle_2x2_split.fits.gz +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/masks/mask_uves_middle_binned_2_2.fits.gz +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/masks/mask_uves_red.fits.gz +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/masks/mask_uves_red_2x2.fits.gz +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/masks/mask_uves_red_2x2_split.fits.gz +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/masks/mask_uves_red_binned_2_2.fits.gz +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/masks/mask_xshooter_nir.fits.gz +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/settings/settings_HARPS.json +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/settings/settings_JWST_MIRI.json +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/settings/settings_JWST_NIRISS.json +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/settings/settings_LICK_APF.json +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/settings/settings_MCDONALD.json +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/settings/settings_NIRSPEC.json +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/settings/settings_NTE.json +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/settings/settings_XSHOOTER.json +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/tools/__init__.py +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/wavecal/crires_plus_J1228_Open_det1.npz +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/wavecal/crires_plus_J1228_Open_det2.npz +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/wavecal/crires_plus_J1228_Open_det3.npz +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/wavecal/harps_blue_2D.npz +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/wavecal/harps_blue_pol_2D.npz +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/wavecal/harps_red_2D.npz +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/wavecal/harps_red_pol_2D.npz +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/wavecal/mcdonald.npz +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/wavecal/nirspec_K2.npz +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/wavecal/uves_blue_360nm_2D.npz +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/wavecal/uves_blue_390nm_2D.npz +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/wavecal/uves_blue_437nm_2D.npz +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/wavecal/uves_middle_2x2_2D.npz +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/wavecal/uves_middle_565nm_2D.npz +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/wavecal/uves_middle_580nm_2D.npz +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/wavecal/uves_middle_600nm_2D.npz +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/wavecal/uves_middle_665nm_2D.npz +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/wavecal/uves_middle_860nm_2D.npz +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/wavecal/uves_red_580nm_2D.npz +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/wavecal/uves_red_600nm_2D.npz +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/wavecal/uves_red_665nm_2D.npz +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/wavecal/uves_red_760nm_2D.npz +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/wavecal/uves_red_860nm_2D.npz +0 -0
- {pyreduce-astro-0.5.27 → pyreduce_astro-0.6.0b1}/pyreduce/wavecal/xshooter_nir.npz +0 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
datasets
|
|
2
|
+
DATA
|
|
3
|
+
__pycache__
|
|
4
|
+
*.sw[op]
|
|
5
|
+
.coverage
|
|
6
|
+
cov.xml
|
|
7
|
+
*.so
|
|
8
|
+
*.o
|
|
9
|
+
pyreduce/clib/_slitfunc_2d.c
|
|
10
|
+
pyreduce/clib/_slitfunc_bd.c
|
|
11
|
+
pyreduce_astro.egg*
|
|
12
|
+
.vscode
|
|
13
|
+
*.py[cod]
|
|
14
|
+
.venv
|
|
15
|
+
.uv
|
|
16
|
+
esorex.log
|
|
17
|
+
pyesorex.log
|
|
18
|
+
test/test_outputs
|
|
19
|
+
docs/_build/
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pyreduce-astro
|
|
3
|
+
Version: 0.6.0b1
|
|
4
|
+
Summary: A data reduction package for echelle spectrographs
|
|
5
|
+
Project-URL: Homepage, https://github.com/ivh/PyReduce
|
|
6
|
+
Project-URL: Documentation, https://pyreduce.readthedocs.io
|
|
7
|
+
Project-URL: Repository, https://github.com/ivh/PyReduce
|
|
8
|
+
Project-URL: Issues, https://github.com/ivh/PyReduce/issues
|
|
9
|
+
Author: Ansgar Wehrhahn, Nikolai Piskunov
|
|
10
|
+
Author-email: Thomas Marquart <thomas.marquart@astro.uu.se>
|
|
11
|
+
License: GPL-3.0-or-later
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Classifier: Development Status :: 4 - Beta
|
|
14
|
+
Classifier: Intended Audience :: Science/Research
|
|
15
|
+
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
|
|
16
|
+
Classifier: Programming Language :: C
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Topic :: Scientific/Engineering :: Astronomy
|
|
22
|
+
Requires-Python: >=3.11
|
|
23
|
+
Requires-Dist: astropy>=5.3.0
|
|
24
|
+
Requires-Dist: cffi>=1.17.1
|
|
25
|
+
Requires-Dist: colorlog>=6.8.0
|
|
26
|
+
Requires-Dist: corner>=2.2.0
|
|
27
|
+
Requires-Dist: emcee>=3.1.0
|
|
28
|
+
Requires-Dist: joblib>=1.3.0
|
|
29
|
+
Requires-Dist: jsonschema>=4.20.0
|
|
30
|
+
Requires-Dist: matplotlib>=3.8.0
|
|
31
|
+
Requires-Dist: numpy>=1.26.0
|
|
32
|
+
Requires-Dist: pillow>=10.0.0
|
|
33
|
+
Requires-Dist: python-dateutil>=2.8.0
|
|
34
|
+
Requires-Dist: scikit-image>=0.22.0
|
|
35
|
+
Requires-Dist: scipy>=1.11.0
|
|
36
|
+
Requires-Dist: spectres>=2.2.0
|
|
37
|
+
Requires-Dist: tqdm>=4.66.0
|
|
38
|
+
Requires-Dist: wget>=3.2
|
|
39
|
+
Provides-Extra: dev
|
|
40
|
+
Requires-Dist: pre-commit>=3.5.0; extra == 'dev'
|
|
41
|
+
Requires-Dist: pytest-cov>=4.1.0; extra == 'dev'
|
|
42
|
+
Requires-Dist: pytest>=7.4.0; extra == 'dev'
|
|
43
|
+
Requires-Dist: ruff>=0.8.0; extra == 'dev'
|
|
44
|
+
Requires-Dist: sphinx>=7.2.0; extra == 'dev'
|
|
45
|
+
Description-Content-Type: text/markdown
|
|
46
|
+
|
|
47
|
+
[](https://github.com/ivh/PyReduce/actions/workflows/python-publish.yml)
|
|
48
|
+
[](https://pyreduce-astro.readthedocs.io/en/latest/?badge=latest)
|
|
49
|
+
[](https://www.python.org/downloads/)
|
|
50
|
+
|
|
51
|
+
# PyReduce
|
|
52
|
+
|
|
53
|
+
PyReduce is a port of the [REDUCE](http://www.astro.uu.se/~piskunov/RESEARCH/REDUCE/) package to Python.
|
|
54
|
+
It is a complete data reduction pipeline for the echelle spectrographs, e.g. HARPS or UVES.
|
|
55
|
+
|
|
56
|
+
The methods are descibed in the papers
|
|
57
|
+
* Original REDUCE: Piskunov & Valenti (2001) [doi:10.1051/0004-6361:20020175](https://doi.org/10.1051/0004-6361:20020175)
|
|
58
|
+
* Updates to curved slit extraction and PyReduce: Piskunov, Wehrhahn & Marquart (2021) [10.1051/0004-6361/202038293](https://doi.org/10.1051/0004-6361/202038293)
|
|
59
|
+
|
|
60
|
+
Some documentation on how to use PyReduce is available at [ReadTheDocs](https://pyreduce-astro.readthedocs.io/en/latest/index.html).
|
|
61
|
+
|
|
62
|
+
Installation
|
|
63
|
+
------------
|
|
64
|
+
|
|
65
|
+
### For Users
|
|
66
|
+
|
|
67
|
+
The latest version can be installed with pip:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
pip install git+https://github.com/ivh/PyReduce
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
The version available from PyPI is slightly outdated, but functional: ``pip install pyreduce-astro``.
|
|
74
|
+
|
|
75
|
+
### For Development
|
|
76
|
+
|
|
77
|
+
If you foresee making changes to PyReduce itself, clone the repository and use [uv](https://docs.astral.sh/uv/) for fast, modern package management:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
git clone <your fork url>
|
|
81
|
+
cd PyReduce/
|
|
82
|
+
uv sync
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
This will automatically:
|
|
86
|
+
- Create a virtual environment
|
|
87
|
+
- Install all dependencies
|
|
88
|
+
- Build the CFFI C extensions
|
|
89
|
+
- Install PyReduce in editable mode
|
|
90
|
+
|
|
91
|
+
To run commands, use `uv run`:
|
|
92
|
+
```bash
|
|
93
|
+
uv run pytest # Run tests
|
|
94
|
+
uv run python examples/uves_example.py # Run example
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
**Note:** PyReduce uses CFFI to link to C code. On non-Linux platforms you might need to install libffi.
|
|
98
|
+
See https://cffi.readthedocs.io/en/latest/installation.html#platform-specific-instructions for details.
|
|
99
|
+
|
|
100
|
+
Output Format
|
|
101
|
+
-------------
|
|
102
|
+
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_``.
|
|
103
|
+
|
|
104
|
+
How To
|
|
105
|
+
------
|
|
106
|
+
PyReduce is designed to be easy to use, but still be flexible.
|
|
107
|
+
``examples/uves_example.py`` is a good starting point, to understand how it works.
|
|
108
|
+
First we define the instrument, target, night, and instrument mode (if applicable) of our reduction. Then we tell PyReduce where to find the data, and lastly we define all the specific settings of the reduction (e.g. polynomial degrees of various fits) in a json configuration file.
|
|
109
|
+
We also define which steps of the reduction to perform. Steps that are not specified, but are still required, will be loaded from previous runs if possible, or executed otherwise.
|
|
110
|
+
All of this is then passed to pyreduce.reduce.main to start the reduction.
|
|
111
|
+
|
|
112
|
+
In this example, PyReduce will plot all intermediary results, and also plot the progres during some of the steps. Close them to continue calculations, if it seems nothing is happening. Once you are statisified with the results you can disable them in settings_UVES.json (with "plot":false in each step) to speed up the computation.
|
|
@@ -1,22 +1,55 @@
|
|
|
1
|
-
](https://github.com/ivh/PyReduce/actions/workflows/python-publish.yml)
|
|
2
2
|
[](https://pyreduce-astro.readthedocs.io/en/latest/?badge=latest)
|
|
3
|
-
[](https://www.python.org/downloads/)
|
|
4
4
|
|
|
5
|
-
#
|
|
5
|
+
# PyReduce
|
|
6
6
|
|
|
7
|
-
PyReduce is a port of the [REDUCE](http://www.astro.uu.se/~piskunov/RESEARCH/REDUCE/) package to
|
|
7
|
+
PyReduce is a port of the [REDUCE](http://www.astro.uu.se/~piskunov/RESEARCH/REDUCE/) package to Python.
|
|
8
8
|
It is a complete data reduction pipeline for the echelle spectrographs, e.g. HARPS or UVES.
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
The methods are descibed in the papers
|
|
11
|
+
* Original REDUCE: Piskunov & Valenti (2001) [doi:10.1051/0004-6361:20020175](https://doi.org/10.1051/0004-6361:20020175)
|
|
12
|
+
* Updates to curved slit extraction and PyReduce: Piskunov, Wehrhahn & Marquart (2021) [10.1051/0004-6361/202038293](https://doi.org/10.1051/0004-6361/202038293)
|
|
13
|
+
|
|
14
|
+
Some documentation on how to use PyReduce is available at [ReadTheDocs](https://pyreduce-astro.readthedocs.io/en/latest/index.html).
|
|
11
15
|
|
|
12
16
|
Installation
|
|
13
17
|
------------
|
|
14
|
-
PyReduce can be installed using pip using the following command: ``pip install pyreduce-astro``
|
|
15
18
|
|
|
16
|
-
|
|
19
|
+
### For Users
|
|
20
|
+
|
|
21
|
+
The latest version can be installed with pip:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
pip install git+https://github.com/ivh/PyReduce
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
The version available from PyPI is slightly outdated, but functional: ``pip install pyreduce-astro``.
|
|
28
|
+
|
|
29
|
+
### For Development
|
|
30
|
+
|
|
31
|
+
If you foresee making changes to PyReduce itself, clone the repository and use [uv](https://docs.astral.sh/uv/) for fast, modern package management:
|
|
17
32
|
|
|
18
|
-
|
|
19
|
-
|
|
33
|
+
```bash
|
|
34
|
+
git clone <your fork url>
|
|
35
|
+
cd PyReduce/
|
|
36
|
+
uv sync
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
This will automatically:
|
|
40
|
+
- Create a virtual environment
|
|
41
|
+
- Install all dependencies
|
|
42
|
+
- Build the CFFI C extensions
|
|
43
|
+
- Install PyReduce in editable mode
|
|
44
|
+
|
|
45
|
+
To run commands, use `uv run`:
|
|
46
|
+
```bash
|
|
47
|
+
uv run pytest # Run tests
|
|
48
|
+
uv run python examples/uves_example.py # Run example
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
**Note:** PyReduce uses CFFI to link to C code. On non-Linux platforms you might need to install libffi.
|
|
52
|
+
See https://cffi.readthedocs.io/en/latest/installation.html#platform-specific-instructions for details.
|
|
20
53
|
|
|
21
54
|
Output Format
|
|
22
55
|
-------------
|
|
@@ -31,9 +64,3 @@ We also define which steps of the reduction to perform. Steps that are not speci
|
|
|
31
64
|
All of this is then passed to pyreduce.reduce.main to start the reduction.
|
|
32
65
|
|
|
33
66
|
In this example, PyReduce will plot all intermediary results, and also plot the progres during some of the steps. Close them to continue calculations, if it seems nothing is happening. Once you are statisified with the results you can disable them in settings_UVES.json (with "plot":false in each step) to speed up the computation.
|
|
34
|
-
|
|
35
|
-
Papers
|
|
36
|
-
------
|
|
37
|
-
The original REDUCE paper: [doi:10.1051/0004-6361:20020175](https://doi.org/10.1051/0004-6361:20020175)
|
|
38
|
-
|
|
39
|
-
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)
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Hatch build hook for compiling CFFI extensions.
|
|
3
|
+
|
|
4
|
+
This hook runs during the build process to compile the CFFI C extensions
|
|
5
|
+
before the wheel is created.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
import os
|
|
9
|
+
import sys
|
|
10
|
+
from pathlib import Path
|
|
11
|
+
|
|
12
|
+
from hatchling.builders.hooks.plugin.interface import BuildHookInterface
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class CustomBuildHook(BuildHookInterface):
|
|
16
|
+
"""Build hook that compiles CFFI extensions."""
|
|
17
|
+
|
|
18
|
+
def initialize(self, version, build_data):
|
|
19
|
+
"""
|
|
20
|
+
Initialize the build hook and compile CFFI extensions.
|
|
21
|
+
|
|
22
|
+
This method is called by hatchling during the build process.
|
|
23
|
+
"""
|
|
24
|
+
print("=" * 60)
|
|
25
|
+
print("Building CFFI extensions for PyReduce")
|
|
26
|
+
print("=" * 60)
|
|
27
|
+
|
|
28
|
+
# Get paths
|
|
29
|
+
project_root = Path(self.root)
|
|
30
|
+
clib_dir = project_root / "pyreduce" / "clib"
|
|
31
|
+
|
|
32
|
+
# Add project root to sys.path so we can import
|
|
33
|
+
if str(project_root) not in sys.path:
|
|
34
|
+
sys.path.insert(0, str(project_root))
|
|
35
|
+
|
|
36
|
+
try:
|
|
37
|
+
# Import the CFFI FFI builder
|
|
38
|
+
from cffi import FFI
|
|
39
|
+
|
|
40
|
+
# Build vertical extraction
|
|
41
|
+
print("\n[1/2] Building vertical extraction extension...")
|
|
42
|
+
ffibuilder_vertical = FFI()
|
|
43
|
+
|
|
44
|
+
with open(clib_dir / "slit_func_bd.h") as f:
|
|
45
|
+
ffibuilder_vertical.cdef(f.read())
|
|
46
|
+
|
|
47
|
+
with open(clib_dir / "slit_func_bd.c") as f:
|
|
48
|
+
ffibuilder_vertical.set_source(
|
|
49
|
+
"_slitfunc_bd",
|
|
50
|
+
f.read(),
|
|
51
|
+
include_dirs=[str(clib_dir), str(clib_dir / "Release")],
|
|
52
|
+
depends=["slit_func_bd.h"],
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
old_cwd = os.getcwd()
|
|
56
|
+
try:
|
|
57
|
+
os.chdir(clib_dir)
|
|
58
|
+
ffibuilder_vertical.compile(verbose=True)
|
|
59
|
+
print("✓ Vertical extraction extension built successfully\n")
|
|
60
|
+
finally:
|
|
61
|
+
os.chdir(old_cwd)
|
|
62
|
+
|
|
63
|
+
# Build curved extraction
|
|
64
|
+
print("[2/2] Building curved extraction extension...")
|
|
65
|
+
ffibuilder_curved = FFI()
|
|
66
|
+
|
|
67
|
+
with open(clib_dir / "slit_func_2d_xi_zeta_bd.h") as f:
|
|
68
|
+
ffibuilder_curved.cdef(f.read())
|
|
69
|
+
|
|
70
|
+
with open(clib_dir / "slit_func_2d_xi_zeta_bd.c") as f:
|
|
71
|
+
ffibuilder_curved.set_source(
|
|
72
|
+
"_slitfunc_2d",
|
|
73
|
+
f.read(),
|
|
74
|
+
include_dirs=[str(clib_dir), str(clib_dir / "Release")],
|
|
75
|
+
depends=["slit_func_2d_xi_zeta_bd.h"],
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
old_cwd = os.getcwd()
|
|
79
|
+
try:
|
|
80
|
+
os.chdir(clib_dir)
|
|
81
|
+
ffibuilder_curved.compile(verbose=True)
|
|
82
|
+
print("✓ Curved extraction extension built successfully\n")
|
|
83
|
+
finally:
|
|
84
|
+
os.chdir(old_cwd)
|
|
85
|
+
|
|
86
|
+
print("=" * 60)
|
|
87
|
+
print("All CFFI extensions built successfully!")
|
|
88
|
+
print("=" * 60)
|
|
89
|
+
|
|
90
|
+
except Exception as e:
|
|
91
|
+
print(f"ERROR: Failed to build CFFI extensions: {e}", file=sys.stderr)
|
|
92
|
+
import traceback
|
|
93
|
+
|
|
94
|
+
traceback.print_exc()
|
|
95
|
+
raise
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling>=1.25.0", "cffi>=1.17.1", "setuptools"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "pyreduce-astro"
|
|
7
|
+
version = "0.6.0b1"
|
|
8
|
+
requires-python = ">=3.11"
|
|
9
|
+
description = "A data reduction package for echelle spectrographs"
|
|
10
|
+
readme = "README.md"
|
|
11
|
+
authors = [
|
|
12
|
+
{name = "Ansgar Wehrhahn"},
|
|
13
|
+
{name = "Thomas Marquart", email = "thomas.marquart@astro.uu.se"},
|
|
14
|
+
{name = "Nikolai Piskunov"}
|
|
15
|
+
]
|
|
16
|
+
license = {text = "GPL-3.0-or-later"}
|
|
17
|
+
classifiers = [
|
|
18
|
+
"Development Status :: 4 - Beta",
|
|
19
|
+
"Intended Audience :: Science/Research",
|
|
20
|
+
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
|
|
21
|
+
"Programming Language :: C",
|
|
22
|
+
"Programming Language :: Python :: 3",
|
|
23
|
+
"Programming Language :: Python :: 3.11",
|
|
24
|
+
"Programming Language :: Python :: 3.12",
|
|
25
|
+
"Programming Language :: Python :: 3.13",
|
|
26
|
+
"Topic :: Scientific/Engineering :: Astronomy",
|
|
27
|
+
]
|
|
28
|
+
|
|
29
|
+
dependencies = [
|
|
30
|
+
"cffi>=1.17.1",
|
|
31
|
+
"numpy>=1.26.0",
|
|
32
|
+
"matplotlib>=3.8.0",
|
|
33
|
+
"scipy>=1.11.0",
|
|
34
|
+
"astropy>=5.3.0",
|
|
35
|
+
"colorlog>=6.8.0",
|
|
36
|
+
"corner>=2.2.0",
|
|
37
|
+
"emcee>=3.1.0",
|
|
38
|
+
"joblib>=1.3.0",
|
|
39
|
+
"jsonschema>=4.20.0",
|
|
40
|
+
"spectres>=2.2.0",
|
|
41
|
+
"python-dateutil>=2.8.0",
|
|
42
|
+
"scikit-image>=0.22.0",
|
|
43
|
+
"tqdm>=4.66.0",
|
|
44
|
+
"wget>=3.2",
|
|
45
|
+
"Pillow>=10.0.0",
|
|
46
|
+
]
|
|
47
|
+
|
|
48
|
+
[project.optional-dependencies]
|
|
49
|
+
dev = [
|
|
50
|
+
"ruff>=0.8.0",
|
|
51
|
+
"pre-commit>=3.5.0",
|
|
52
|
+
"pytest>=7.4.0",
|
|
53
|
+
"pytest-cov>=4.1.0",
|
|
54
|
+
"sphinx>=7.2.0",
|
|
55
|
+
]
|
|
56
|
+
|
|
57
|
+
[project.urls]
|
|
58
|
+
Homepage = "https://github.com/ivh/PyReduce"
|
|
59
|
+
Documentation = "https://pyreduce.readthedocs.io"
|
|
60
|
+
Repository = "https://github.com/ivh/PyReduce"
|
|
61
|
+
Issues = "https://github.com/ivh/PyReduce/issues"
|
|
62
|
+
|
|
63
|
+
# Hatch build configuration
|
|
64
|
+
[tool.hatch.build]
|
|
65
|
+
packages = ["pyreduce"]
|
|
66
|
+
exclude = [
|
|
67
|
+
"/.git",
|
|
68
|
+
"/.github",
|
|
69
|
+
"/docs",
|
|
70
|
+
"/tests",
|
|
71
|
+
"*.pyc",
|
|
72
|
+
"__pycache__",
|
|
73
|
+
]
|
|
74
|
+
|
|
75
|
+
# Include C source files and headers in the package
|
|
76
|
+
[tool.hatch.build.targets.wheel]
|
|
77
|
+
packages = ["pyreduce"]
|
|
78
|
+
include = [
|
|
79
|
+
"pyreduce/**/*.py",
|
|
80
|
+
"pyreduce/**/*.c",
|
|
81
|
+
"pyreduce/**/*.h",
|
|
82
|
+
"pyreduce/**/*.so",
|
|
83
|
+
"pyreduce/**/*.json",
|
|
84
|
+
"pyreduce/**/*.npz",
|
|
85
|
+
"pyreduce/**/*.sav",
|
|
86
|
+
]
|
|
87
|
+
artifacts = [
|
|
88
|
+
"pyreduce/clib/*.so",
|
|
89
|
+
]
|
|
90
|
+
|
|
91
|
+
# Build CFFI extensions via build hook
|
|
92
|
+
[tool.hatch.build.hooks.custom]
|
|
93
|
+
path = "hatch_build.py"
|
|
94
|
+
|
|
95
|
+
# Ruff - Modern Python linter and formatter
|
|
96
|
+
[tool.ruff]
|
|
97
|
+
line-length = 88
|
|
98
|
+
target-version = "py313"
|
|
99
|
+
extend-exclude = [
|
|
100
|
+
".git",
|
|
101
|
+
".hg",
|
|
102
|
+
".mypy_cache",
|
|
103
|
+
".tox",
|
|
104
|
+
".venv",
|
|
105
|
+
"_build",
|
|
106
|
+
"buck-out",
|
|
107
|
+
"build",
|
|
108
|
+
"dist",
|
|
109
|
+
".eggs",
|
|
110
|
+
"__pycache__",
|
|
111
|
+
]
|
|
112
|
+
|
|
113
|
+
[tool.ruff.format]
|
|
114
|
+
quote-style = "double"
|
|
115
|
+
indent-style = "space"
|
|
116
|
+
skip-magic-trailing-comma = false
|
|
117
|
+
line-ending = "auto"
|
|
118
|
+
|
|
119
|
+
[tool.ruff.lint]
|
|
120
|
+
select = [
|
|
121
|
+
"E", # pycodestyle errors
|
|
122
|
+
"W", # pycodestyle warnings
|
|
123
|
+
"F", # pyflakes
|
|
124
|
+
"I", # isort
|
|
125
|
+
"B", # flake8-bugbear
|
|
126
|
+
"C4", # flake8-comprehensions
|
|
127
|
+
"UP", # pyupgrade
|
|
128
|
+
]
|
|
129
|
+
ignore = [
|
|
130
|
+
"E501", # line too long (handled by formatter)
|
|
131
|
+
"E402", # module import not at top (legitimate cases in __init__.py, conf.py)
|
|
132
|
+
"E722", # bare except (many legacy cases, would require significant refactoring)
|
|
133
|
+
"UP031", # printf-style formatting (many cases in tools/ and examples/, low priority)
|
|
134
|
+
]
|
|
135
|
+
|
|
136
|
+
# Per-file ignores for specific cases
|
|
137
|
+
[tool.ruff.lint.per-file-ignores]
|
|
138
|
+
"__init__.py" = ["F401"] # unused imports are intentional for re-exports
|
|
139
|
+
"docs/conf.py" = ["E402"] # imports after sys.path modification
|
|
140
|
+
"tools/**" = ["UP031", "B904"] # legacy tools, lower priority
|
|
141
|
+
"examples/**" = ["UP031"] # examples can use simpler syntax
|
|
142
|
+
|
|
143
|
+
[tool.ruff.lint.isort]
|
|
144
|
+
known-first-party = ["pyreduce"]
|
|
145
|
+
|
|
146
|
+
# pytest configuration
|
|
147
|
+
[tool.pytest.ini_options]
|
|
148
|
+
minversion = "7.0"
|
|
149
|
+
addopts = "-ra -q --strict-markers"
|
|
150
|
+
testpaths = ["tests"]
|
|
151
|
+
python_files = ["test_*.py", "*_test.py"]
|
|
152
|
+
python_classes = ["Test*"]
|
|
153
|
+
python_functions = ["test_*"]
|
|
154
|
+
|
|
155
|
+
# Coverage configuration
|
|
156
|
+
[tool.coverage.run]
|
|
157
|
+
source = ["pyreduce"]
|
|
158
|
+
omit = ["*/tests/*", "*/test_*.py"]
|
|
159
|
+
|
|
160
|
+
[tool.coverage.report]
|
|
161
|
+
exclude_lines = [
|
|
162
|
+
"pragma: no cover",
|
|
163
|
+
"def __repr__",
|
|
164
|
+
"raise AssertionError",
|
|
165
|
+
"raise NotImplementedError",
|
|
166
|
+
"if __name__ == .__main__.:",
|
|
167
|
+
"if TYPE_CHECKING:",
|
|
168
|
+
"class .*\\bProtocol\\):",
|
|
169
|
+
"@(abc\\.)?abstractmethod",
|
|
170
|
+
]
|
|
171
|
+
|
|
172
|
+
# Development dependency groups
|
|
173
|
+
[dependency-groups]
|
|
174
|
+
dev = [
|
|
175
|
+
"ruff>=0.8.0",
|
|
176
|
+
"pre-commit>=3.5.0",
|
|
177
|
+
"pytest>=7.4.0",
|
|
178
|
+
"pytest-cov>=4.1.0",
|
|
179
|
+
"sphinx>=7.2.0",
|
|
180
|
+
]
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
try:
|
|
2
|
+
from importlib.metadata import PackageNotFoundError, version
|
|
3
|
+
except ImportError: # for Python<3.8
|
|
4
|
+
from importlib_metadata import PackageNotFoundError, version
|
|
5
|
+
|
|
6
|
+
try:
|
|
7
|
+
__version__ = version(__name__)
|
|
8
|
+
except PackageNotFoundError:
|
|
9
|
+
__version__ = "unknown"
|
|
4
10
|
|
|
5
|
-
__version__ = get_versions()["version"]
|
|
6
|
-
del get_versions
|
|
7
11
|
|
|
8
12
|
# add logger to console
|
|
9
13
|
import logging
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
|
-
# -*- coding: utf-8 -*-
|
|
3
2
|
"""Builds the C library that contains the extraction algorithm
|
|
4
3
|
|
|
5
4
|
This module prepares and builds the C libary containing the curved
|
|
@@ -38,7 +37,7 @@ print("Release dir: ", release_path)
|
|
|
38
37
|
ffibuilder_vertical = FFI()
|
|
39
38
|
with open(os.path.join(CWD, "slit_func_bd.h")) as f:
|
|
40
39
|
ffibuilder_vertical.cdef(f.read())
|
|
41
|
-
with open(os.path.join(CWD, "slit_func_bd.c")
|
|
40
|
+
with open(os.path.join(CWD, "slit_func_bd.c")) as f:
|
|
42
41
|
ffibuilder_vertical.set_source(
|
|
43
42
|
"_slitfunc_bd",
|
|
44
43
|
f.read(),
|
|
@@ -49,7 +48,7 @@ with open(os.path.join(CWD, "slit_func_bd.c"), "r") as f:
|
|
|
49
48
|
ffibuilder_curved = FFI()
|
|
50
49
|
with open(os.path.join(CWD, "slit_func_2d_xi_zeta_bd.h")) as f:
|
|
51
50
|
ffibuilder_curved.cdef(f.read())
|
|
52
|
-
with open(os.path.join(CWD, "slit_func_2d_xi_zeta_bd.c")
|
|
51
|
+
with open(os.path.join(CWD, "slit_func_2d_xi_zeta_bd.c")) as f:
|
|
53
52
|
ffibuilder_curved.set_source(
|
|
54
53
|
"_slitfunc_2d",
|
|
55
54
|
f.read(),
|
|
@@ -1291,11 +1291,11 @@ int create_spectral_model(int ncols, int nrows, int osample, xi_ref* xi, double*
|
|
|
1291
1291
|
{
|
|
1292
1292
|
img[im_index(x, iy)] = 0;
|
|
1293
1293
|
}
|
|
1294
|
-
|
|
1294
|
+
|
|
1295
1295
|
}
|
|
1296
1296
|
|
|
1297
1297
|
for (x = 0; x < ncols; x++)
|
|
1298
|
-
{
|
|
1298
|
+
{
|
|
1299
1299
|
for (iy = 0; iy < ny; iy++)
|
|
1300
1300
|
{
|
|
1301
1301
|
for (m = 0; m < 4; m++)
|
|
@@ -1307,7 +1307,7 @@ int create_spectral_model(int ncols, int nrows, int osample, xi_ref* xi, double*
|
|
|
1307
1307
|
img[im_index(pix_x, pix_y)] += pix_w * spec[x] * slitfunc[iy];
|
|
1308
1308
|
}
|
|
1309
1309
|
}
|
|
1310
|
-
}
|
|
1310
|
+
}
|
|
1311
1311
|
}
|
|
1312
1312
|
return 0;
|
|
1313
|
-
}
|
|
1313
|
+
}
|
|
@@ -46,10 +46,10 @@ int xi_zeta_tensors(
|
|
|
46
46
|
int *m_zeta);
|
|
47
47
|
|
|
48
48
|
int create_spectral_model(
|
|
49
|
-
int ncols,
|
|
50
|
-
int nrows,
|
|
49
|
+
int ncols,
|
|
50
|
+
int nrows,
|
|
51
51
|
int osample,
|
|
52
|
-
xi_ref* xi,
|
|
53
|
-
double* spec,
|
|
52
|
+
xi_ref* xi,
|
|
53
|
+
double* spec,
|
|
54
54
|
double* slitfunc,
|
|
55
|
-
double* img);
|
|
55
|
+
double* img);
|