This PR makes the CTE correction code more flexible for cases when not correction is needed:
when generating the CTE corrections, desi_fit_cte_night first checks if a CTE correction is even needed for a camera before complaining about things like BADCAMWORD being set. It also checks the science exposures and doesn't try to generate a CTE correction for a camera that is flagged as bad all night anyway.
@akremin this still only checks CAMWORD and BADCAMWORD; I could use some help for how to also check BADAMPS
when using the CTE corrections, desi_preproc first checks if the correction is needed for a given camera before checking for the existence of $DESI_SPECTRO_REDUX/$SPECPROD/calibnight/NIGHT/ctecorr-NIGHT.csv . This restores the ability to preproc non-CTE-problematic cameras outside of the context of a production without having to specify --no-cte-corr. If DESI_SPECTRO_CALIB says that this camera on this night needs a CTE correction, then $DESI_SPECTRO_REDUX/$SPECPROD/calibnight/NIGHT/ctecorr-NIGHT.csv is still required unless the user opts-out with --no-cte-corr. @julienguy this should make you happier.
@akremin I believe I have updated the camword logic to cover the cases you raised, including BADAMPS via erow_to_goodcamword. Please re-doublecheck my logic.
This PR makes the CTE correction code more flexible for cases when not correction is needed: