kis_tools issueshttps://gitlab.leibniz-kis.de/sdc/kis_tools/-/issues2022-03-14T17:44:20Zhttps://gitlab.leibniz-kis.de/sdc/kis_tools/-/issues/303skewed boxes in location previews for 2021 data2022-03-14T17:44:20ZCarl Schafferskewed boxes in location previews for 2021 data![image](/uploads/6155a8922f12d28ec42010d5fbb93f41/image.png)
![image](/uploads/e1245cbcd549c057d94ccb78cf144c80/image.png)
![image](/uploads/307d603ecb23984b5c8f376750ea45b2/image.png)![image](/uploads/6155a8922f12d28ec42010d5fbb93f41/image.png)
![image](/uploads/e1245cbcd549c057d94ccb78cf144c80/image.png)
![image](/uploads/307d603ecb23984b5c8f376750ea45b2/image.png)Carl SchafferCarl Schafferhttps://gitlab.leibniz-kis.de/sdc/kis_tools/-/issues/302previews: respect aspect ratio step size2022-02-21T12:21:22ZCarl Schafferpreviews: respect aspect ratio step sizeSome observations use a step size perpendicular larger than the resolution along the slit. This leads to skewed preview images, as the pixels would essentially need to be non square.
matplotlib supports this, but it also needs to be che...Some observations use a step size perpendicular larger than the resolution along the slit. This leads to skewed preview images, as the pixels would essentially need to be non square.
matplotlib supports this, but it also needs to be checked through the entire chain of calculations and plotting:
The preview plots should use the wcs keywords to determine the values for the aspect ratio and spatial extent of FOVs.
Example:
![image](/uploads/48b580236f2776f341cb7d7f290d906a/image.png)
https://archive.sdc.leibniz-kis.de/SDCDetailServlet?Instrument=gris&ObjectId=607c9dcd18262e0426a2b2a2
Also see the corresponding issue on [Jira](https://leibniz-kis.atlassian.net/jira/servicedesk/projects/SR/queues/custom/10/SR-173)https://gitlab.leibniz-kis.de/sdc/kis_tools/-/issues/297GRIS data is flipped depending on step-angle2022-04-21T10:46:49ZCarl SchafferGRIS data is flipped depending on step-angleDepending on how the slit data is scanned, images are flipped w.r.t. HMI.
We should consider serving flipped data to the end-users instead of what we're doing right now.
* [ ] Check whether this is already done somewhere
* [ ] Evaluat...Depending on how the slit data is scanned, images are flipped w.r.t. HMI.
We should consider serving flipped data to the end-users instead of what we're doing right now.
* [ ] Check whether this is already done somewhere
* [ ] Evaluate how much effort a fix would be
* [ ] decide on actionCarl SchafferCarl Schaffer2021-11-30https://gitlab.leibniz-kis.de/sdc/kis_tools/-/issues/289IFU Coordinates2022-01-28T15:50:52ZCarl SchafferIFU CoordinatesIFU coordinate calculation is *horrible* the stepsize per pixel is off by about an order of 200 and it is not clear where where the center coordinates reference off or what the angles mean.
The calculation in `kis_tools.gris.ifu_fits_f...IFU coordinate calculation is *horrible* the stepsize per pixel is off by about an order of 200 and it is not clear where where the center coordinates reference off or what the angles mean.
The calculation in `kis_tools.gris.ifu_fits_file.IFUFitsFile._coords_from_simple_header` need to be completely re-written or at least validated.
I don't have time to do this now as we need to get IFU data running for the V1 release, so the best I can do is to increase the uncertainties to a full solar disk and issue a warning each time the function is used.Carl SchafferCarl Schafferhttps://gitlab.leibniz-kis.de/sdc/kis_tools/-/issues/288IFU header WCS stepsize is a factor of 200 too small2022-01-28T15:50:53ZCarl SchafferIFU header WCS stepsize is a factor of 200 too smallCarl SchafferCarl Schafferhttps://gitlab.leibniz-kis.de/sdc/kis_tools/-/issues/285remove or fix pypeline dependency in bbi tools2021-10-11T13:23:21ZCarl Schafferremove or fix pypeline dependency in bbi toolsThe bbi tools are dependent on the python wrapper for the BBI pipeline written by Sebastian Hoch ( see https://gitlab.leibniz-kis.de/sdc/bbi/pypeline) this project is not installable or documented. Most of the bbi-related code in kis too...The bbi tools are dependent on the python wrapper for the BBI pipeline written by Sebastian Hoch ( see https://gitlab.leibniz-kis.de/sdc/bbi/pypeline) this project is not installable or documented. Most of the bbi-related code in kis tools might be broken.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 Schafferhttps://gitlab.leibniz-kis.de/sdc/kis_tools/-/issues/275location plot: wavelngth part in plot title2021-04-14T12:32:51ZCarl Schafferlocation plot: wavelngth part in plot title![image](/uploads/1e3678de2b4670afb87fad5038b9904b/image.png)
not sure where this number comes from, remove?![image](/uploads/1e3678de2b4670afb87fad5038b9904b/image.png)
not sure where this number comes from, remove?WCS fixesCarl SchafferCarl Schafferhttps://gitlab.leibniz-kis.de/sdc/kis_tools/-/issues/269headers gris nmaps2021-04-22T10:02:39ZCarl Schafferheaders gris nmapsCheck if NMAPS is corrected in cases of trailing observations?
@yakobchuk reported that it doesn't always match for the split files.Check if NMAPS is corrected in cases of trailing observations?
@yakobchuk reported that it doesn't always match for the split files.WCS fixesCarl SchafferCarl Schafferhttps://gitlab.leibniz-kis.de/sdc/kis_tools/-/issues/262location plot: 20150417 run 2 Uncertainties in locplot should be small2021-03-23T09:13:50ZCarl Schafferlocation plot: 20150417 run 2 Uncertainties in locplot should be smallThe plot is made with large uncertainties, even though there is a cross correlation result with HMI. Check!The plot is made with large uncertainties, even though there is a cross correlation result with HMI. Check!WCS fixesCarl SchafferCarl Schafferhttps://gitlab.leibniz-kis.de/sdc/kis_tools/-/issues/254Gris WCS: CTYPE should be HP instead of HG2021-02-11T17:34:08ZCarl SchafferGris WCS: CTYPE should be HP instead of HGExcempt from rocketchat:
> Vigeesh:
> Question about GRIS data header
> ```
> WCSNAME = 'Helioprojective Cartesian' / nan
> CTYPE1 = 'HGLN-TAN' / Type of coordinates along axis 1
> CUNIT1 = 'arcsec ' / Units alon...Excempt from rocketchat:
> Vigeesh:
> Question about GRIS data header
> ```
> WCSNAME = 'Helioprojective Cartesian' / nan
> CTYPE1 = 'HGLN-TAN' / Type of coordinates along axis 1
> CUNIT1 = 'arcsec ' / Units along axis 1
> CRPIX1 = 0 / Reference pixel
> CRVAL1 = -393.014 / Value at reference pixel on axis 1
> CDELT1 = 0.027174 / Sampling along axis 1
> ```
> HGLN-TAN according to Thompson et al refers to Stonyhurst heliographic longitude
> so, I'm a bit confused about why it is called "Helioprojective Cartesian"?
> also the CDELT1 is in HGLN-TAN or HPLN-TAN?
>
> schaffer
> 10:56 AM
> You're right, that is inconsistent. I believe CTYPE should be HPLT-TAN, at least that is what is being done under the hood. I'll open an issue and correct this in all files sometime in the near future.
* [x] fix code
* [x] re-format files
* [ ] re-upload files to archiveWCS fixeshttps://gitlab.leibniz-kis.de/sdc/kis_tools/-/issues/247gris run: Coord save from other runs2020-10-01T15:19:35ZCarl Schaffergris run: Coord save from other runsGrisRuns `coord_saves` property returns saves for other runs, this shouldn't happen.
![Selection_164](/uploads/f46e62d437aea9f49bf6dd63ea358011/Selection_164.png)GrisRuns `coord_saves` property returns saves for other runs, this shouldn't happen.
![Selection_164](/uploads/f46e62d437aea9f49bf6dd63ea358011/Selection_164.png)https://gitlab.leibniz-kis.de/sdc/kis_tools/-/issues/238ChroTel: Coord Bug2020-06-04T12:25:19ZCarl SchafferChroTel: Coord BugChrotel Provides strange coordinate when imported into the archive.
![image](/uploads/9203f9fe883c66675f0783217a5808d2/image.png)Chrotel Provides strange coordinate when imported into the archive.
![image](/uploads/9203f9fe883c66675f0783217a5808d2/image.png)kharon v1.0.0https://gitlab.leibniz-kis.de/sdc/kis_tools/-/issues/236translate_header: folder_out not working2021-09-02T07:26:41ZCarl Schaffertranslate_header: folder_out not working# Bug Report
Folder out option of `gris_translate_header` doesn't do anything, remove# Bug Report
Folder out option of `gris_translate_header` doesn't do anything, removehttps://gitlab.leibniz-kis.de/sdc/kis_tools/-/issues/235lars wavelength2020-05-29T12:37:42ZCarl Schafferlars wavelengthLars l1 files do not contain a Wavelength keyword by default. JLB provided a dirty fix:
```
; Routine to add the correct wavelength to a given LARS fits file
PRO ldrc_insert_wavelength, file
data=readfits(file,hdr)
lam =mrdfits(file,1...Lars l1 files do not contain a Wavelength keyword by default. JLB provided a dirty fix:
```
; Routine to add the correct wavelength to a given LARS fits file
PRO ldrc_insert_wavelength, file
data=readfits(file,hdr)
lam =mrdfits(file,1,h1)
meta=mrdfits(file,2,h2)
lambda = round(mean(lam)*1d10)
;;copy par and insert value
val = sxpar (hdr, 'WAVELNTH', comment=comment, count=count)
print,'Adding Wavelength',lambda,' to ',file
fxaddpar, hdr, 'WAVELNTH', lambda, comment
mwrfits, data, file, hdr, iscale=[1, 32768], /silent, /create
mwrfits, lam, file, h1, /silent
mwrfits, meta, file, h2, /silent
END
```
This fix works for adding wavelengths to `*chvtt.fits` files. On the long run, this should be added to the LARS pipeline.https://gitlab.leibniz-kis.de/sdc/kis_tools/-/issues/23220150603 translate header breaks2020-05-27T16:04:43ZCarl Schaffer20150603 translate header breaks```
(sdc) [09:40 schaffer@itchy sdc] $ gris_translate_header /dat/sdc/gris/20150603/level1_split/
Modifying /dat/sdc/gris/20150603/level1_split/gris_20150603_082644_l1p_004_001_0001.fits: 9%|▊ | 227/2646 [00:37<03:29, 11.54it/s...```
(sdc) [09:40 schaffer@itchy sdc] $ gris_translate_header /dat/sdc/gris/20150603/level1_split/
Modifying /dat/sdc/gris/20150603/level1_split/gris_20150603_082644_l1p_004_001_0001.fits: 9%|▊ | 227/2646 [00:37<03:29, 11.54it/s]Traceback (most recent call last):
File "/home/schaffer/anaconda3/envs/sdc/bin/gris_translate_header", line 7, in <module>
exec(compile(f.read(), __file__, 'exec'))
File "/dat/schaffer/projects/kis_tools/bin/gris_translate_header", line 7, in <module>
run_translate_header(sys.argv[1:])
File "/dat/schaffer/projects/kis_tools/kis_tools/headers/translate_header.py", line 309, in run_translate_header
main(f, outfile=f, overwrite=True)
File "/dat/schaffer/projects/kis_tools/kis_tools/headers/translate_header.py", line 221, in main
slitpos_cards = wcs_generator.slitpos_cards()
AttributeError: 'NoneType' object has no attribute 'slitpos_cards'
Modifying /dat/sdc/gris/20150603/level1_split/gris_20150603_082644_l1p_004_001_0001.fits: 9%|▊ | 227/2646 [00:37<06:40, 6.04it/s]
```reimport with kharonhttps://gitlab.leibniz-kis.de/sdc/kis_tools/-/issues/23120140503 Translate header breaks2020-06-04T13:52:08ZCarl Schaffer20140503 Translate header breaksHeader translation does not work for 'gris_20140503_120949_l1p_011_001_0250.fits' possibly also not for successive files. Needs investigationHeader translation does not work for 'gris_20140503_120949_l1p_011_001_0250.fits' possibly also not for successive files. Needs investigationreimport with kharonhttps://gitlab.leibniz-kis.de/sdc/kis_tools/-/issues/230GRIS BLANK keyword2021-01-20T09:47:17ZCarl SchafferGRIS BLANK keyword`gris_translate_headers` introduces `BLANK= -1` into the gris headers. THis should not be ser as -1 is within the physical boundaries.`gris_translate_headers` introduces `BLANK= -1` into the gris headers. THis should not be ser as -1 is within the physical boundaries.reimport with kharonhttps://gitlab.leibniz-kis.de/sdc/kis_tools/-/issues/228bug: location plot fails2020-07-16T10:48:17ZCarl Schafferbug: location plot failslocation plot from description fails with 'str' object has no attribute 'is_bbox"
This occurs when running a gris import on a dataset that doesn't have a location plot associated with it.location plot from description fails with 'str' object has no attribute 'is_bbox"
This occurs when running a gris import on a dataset that doesn't have a location plot associated with it.remove importer utilitieshttps://gitlab.leibniz-kis.de/sdc/kis_tools/-/issues/218Gris: Some runs not translated2020-05-27T11:54:13ZCarl SchafferGris: Some runs not translatedSome runs do not seem to be fully translated:
![image](/uploads/847f0203e1fd5ad24816ffa21726e518/image.png)
List of the first split files of these runs:
gris_20140503_140502_l1p_012_001_0001.fits
gris_20140503_145531_l1p_015...Some runs do not seem to be fully translated:
![image](/uploads/847f0203e1fd5ad24816ffa21726e518/image.png)
List of the first split files of these runs:
gris_20140503_140502_l1p_012_001_0001.fits
gris_20140503_145531_l1p_015_001_0001.fits
gris_20140503_154906_l1p_018_001_0001.fits
gris_20140503_161857_l1p_020_001_0001.fits
gris_20140503_162943_l1p_021_001_0001.fits
gris_20140503_164102_l1p_022_001_0001.fits
gris_20140503_165223_l1p_023_001_0001.fits
gris_20140503_171735_l1p_026_001_0001.fits
gris_20140503_174110_l1p_027_001_0001.fits
gris_20150603_082644_l1p_004_001_0001.fits
gris_20150603_084246_l1p_005_001_0001.fits
gris_20150603_091312_l1p_006_001_0001.fits
gris_20150603_095403_l1p_008_001_0001.fits
gris_20150603_102339_l1p_009_001_0001.fits
gris_20160602_075844_l1p_001_001_0001.fits
gris_20160602_081620_l1p_002_001_0001.fits
gris_20160602_095847_l1p_006_001_0001.fits
gris_20160602_101825_l1p_007_001_0001.fits
gris_20170616_092551_l1p_005_001_0001.fits
gris_20170616_103511_l1p_007_001_0001.fits
gris_20180504_155639_l1p_016_001_0001.fits
gris_20180504_155905_l1p_017_001_0001.fits
gris_20180504_163932_l1p_020_001_0001.fits
gris_20180504_170742_l1p_021_001_0001.fits