EranOfek / AstroPack

Astronomy & Astrophysics Software Pacakge
Other
16 stars 4 forks source link

`FITS.get_key()` and therefore `FITS.mget_keys()` don't read long, continued strings (HEASARCH, &) #394

Closed EastEriq closed 5 months ago

EastEriq commented 5 months ago

I have in my header

LEV1FILE= '/raid/enrico/PTF/2ndTake/images/level1/proc/2014/02/13/f11/c8/p5/v1&'
CONTINUE  '/PTF_201402133333_i_p_scie_t075954_u019267911_f11_&'                 
CONTINUE  'p001514_c08.fits'   / PTF level1 source file analysed                

I get only:

>> FITS.get_keys(f,'LEV1FILE')

ans =

  1×1 cell array

    {'/raid/enrico/PTF/2ndTake/images/level1/proc/2014/02/13/f11/c8/p5/v1&'}
EastEriq commented 5 months ago

Apparently both use the internal matlab.io.fits.readkey, subject to its limitations.

One possibility could be to augment FITS.readHeader1 with the capability of parsing continued fields, but it is work.

EranOfek commented 5 months ago

This is based on the CFITSIO library so I have no idea what to do about it. If possible avoid using this specific key val.

EastEriq commented 5 months ago

Since I was building my pipeline on that key which I already wrote in some hundreds of files, I'll explore augmenting FITS.readHeader, as I started doing for #395. I'll do n the separate branch not to mess up.