review desi_compute_sky defaults
- Dominant language
- Python
- Stars
- 42
- Forks
- 26
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 15
Description
The pipeline calls to `desi_compute_sky` include a lot of non-default options, e.g.
```
desi_compute_sky \
-i /dvs_ro/cfs/cdirs/desi/spectro/redux/iron/exposures/20201215/00067972/frame-r0-00067972.fits.gz \
--fiberflat /dvs_ro/cfs/cdirs/desi/spectro/redux/iron/exposures/20201215/00067972/fiberflatexp-r0-00067972.fits.gz \
--adjust-wavelength --adjust-lsf \
--pca-corr /global/cfs/cdirs/desi/spectro/desi_spectro_calib/0.4.0/spec/sm4/skycorr-pca-sm4-r0.fits \
--fit-offsets --skygradpca /global/cfs/cdirs/desi/spectro/desi_spectro_calib/0.4.0/spec/sm4/skygradpca-sm4-r0.fits \
--tpcorrparam /global/cfs/cdirs/desi/spectro/desi_spectro_calib/0.4.0/spec/sm4/tpcorrparam-sm4-r0.fits \
-o $SCRATCH/sky.fits
```
It's fine for the pipeline to be very explicit about its inputs, but in the spirit of "the defaults should do the recommended right thing", review what would happen if the call was just data inputs and outputs and not calibrations and options:
```
desi_compute_sky \
-i /dvs_ro/cfs/cdirs/desi/spectro/redux/iron/exposures/20201215/00067972/frame-r0-00067972.fits.gz \
--fiberflat /dvs_ro/cfs/cdirs/desi/spectro/redux/iron/exposures/20201215/00067972/fiberflatexp-r0-00067972.fits.gz \
-o $SCRATCH/sky.fits
```
I suggest that the desi_spectro_calib inputs should be looked up automatically if they aren't specified, with an option to turn them off if needed. Similarly `--adjust-wavelength --adjust-lsf --tpcorrparam` could use parser syntax like
```python
parser.add_argument('--adjust-wavelength', action=argparse.BooleanOptionalAction, default=True)
```
to retain the current syntax while making that option True by default and also supporting `--no-adjust-wavelength` if/when you need to turn that off.
This occurred to me because of PR #2001 where @segasai et al are experimenting with alternate sky fibers, and they may be unaware (until now!) of all of the non-default options currently used by the pipeline for standard processing.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the desi_compute_sky entry point and its argument parser, comparing the two supplied invocations and their calibration inputs. Review how desi_spectro_calib inputs are selected and which options standard processing requires. Done means input/output-only calls use the recommended calibrations and adjustments, while explicit overrides and opt-outs remain available; the exact defaults need confirmation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, data
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 43/100