desihub / specex

DESI spectrograph PSF fitting
BSD 3-Clause "New" or "Revised" License
0 stars 4 forks source link

support reading of psf fit parameters from input file #50

Closed marcelo-alvarez closed 3 years ago

marcelo-alvarez commented 3 years ago

Purpose: Allow specex to read in psf fit parameters from an input file.

Description: Fix bugs in src/specex_pyoptions.h and src/specex_pypsf.cc, to set boolean flags correctly for whether default psf options are being used, and to initialize the array of psf coefficient names correctly, respectively. The behaviour of specex when run as part of the spectroscopic pipeline is unchanged (details below), but the functionality to read in psf parameters is restored, and matches the behaviour of specex 0.6.8 when the input psf fit parameters are used because no psf fit options are specified.

The behaviour of specex is only affected if no psf fit options are specified via input flags. Since the --legendre-deg-wave flag is always specified in the desispec wrapper of specex, no effect on run time behaviour when it is called in the spectroscopic pipeilne with desispec/bin/desi_proc --> desispec/py/scripts/proc.py --> desispec/scripts/specex.py --> specex/py/specex/specex.py or with desi_compute_psf/desi_compute_psf_mpi --> specex/py/specex/specex.py, directly.

Pleaes approve and merge.