kis_tools issueshttps://gitlab.leibniz-kis.de/sdc/kis_tools/-/issues2021-11-19T17:41:46Zhttps://gitlab.leibniz-kis.de/sdc/kis_tools/-/issues/295add grepfits for full calib pipeline2021-11-19T17:41:46ZCarl Schafferadd grepfits for full calib pipelinecalibration settings retrieval can be largely improved using grepfits and get last l0:
```
echo $(for i in /instruments/gris/202*;do ./gris_l0_info.sh $i;done) > last_l0_file_per_run.txt
grepfits "IMGSYS WAVELENG MEASURE TARGET FILESTAT...calibration settings retrieval can be largely improved using grepfits and get last l0:
```
echo $(for i in /instruments/gris/202*;do ./gris_l0_info.sh $i;done) > last_l0_file_per_run.txt
grepfits "IMGSYS WAVELENG MEASURE TARGET FILESTAT EXPTIME" $(cat last_l0_file_per_run.txt ) |tee $(date '+%Y-%m-%d')_gris_l0_info.csv
```
the output file can then replace the file in `kis_tools.gris.resources` and be used to generate calibration settings.
The shell scripts have been added to `kis_tools.gris.calib_settings`https://gitlab.leibniz-kis.de/sdc/kis_tools/-/issues/282wcs wavelength retrieval shifted by one pixel2021-05-06T14:48:42ZCarl Schafferwcs wavelength retrieval shifted by one pixelPhilip pointed out to me that the wcs retrieval of wavelengths might be off by one pixel. We narrowed the problem down to the definition of the `CRPIX`keyword. We set it to `0` meaning to indicate the beginning of the array, but using th...Philip pointed out to me that the wcs retrieval of wavelengths might be off by one pixel. We narrowed the problem down to the definition of the `CRPIX`keyword. We set it to `0` meaning to indicate the beginning of the array, but using the `WCS.wcs_pix2world(pixels,0)` method to retrieve the value yields a wavelength array with larger by `CDELT`than we would expect.
We either need to set the CRPIX keyword to 1 or use 1 for the origin value of the retrieval method.
It is unclear which of these solutions should be preferred.
Links:
* [related issue on github](https://github.com/astropy/astropy/issues/9989)
* [wcs paper](https://www.aanda.org/articles/aa/pdf/2002/45/aah3859.pdf)
* [astropy docs for WCS.wcs_pix2world](https://docs.astropy.org/en/stable/api/astropy.wcs.WCS.html#astropy.wcs.WCS.wcs_pix2world)Carl SchafferCarl Schaffer