Open mtbannister opened 4 years ago
The –head command creates an file that contains the header, not a FITS file with only the header. A FITS files that contains only the header would need to remove the data description parts (to be legal) and that might remove content the user is looking for.
To use –head option please pass the resulting file into:
https://docs.astropy.org/en/stable/io/fits/api/headers.html#astropy.io.fits.Header.fromtextfile
The documentation for vcp --head should likely be improved. From: Michele Bannister [mailto:notifications@github.com] Sent: September 16, 2020 10:14 PM To: opencadc/vostools vostools@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: [opencadc/vostools] Header retrieval returns corrupted headers? (#148)
Using either vcp --head vos:mtb55/MUSE-2I/Data/Reduced_SkyFrame/*.fits . or
import vos
conn = vos.Client()
fn = 'vos:mtb55/MUSE-2I/Data/Reduced_SkyFrame/'
conn.copy(fn+conn.listdir(fn)[0], '.', head=True)
returns headers that are unable to be opened: they crash ds9 or are unreadable by astropy.io.fits. They can be opened in a plain text file, so there must be some small amount of modification occurring in the transfer process.
(The .fits files themselves are fine, as downloading the whole 2.7 GB .fits file produces a valid header.)
Is there a better way to get a valid header?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/opencadc/vostools/issues/148, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAIUMWZTQQFCZJ2YC5FW3BDSGGLLDANCNFSM4RP3LGKQ.
Thanks, that resolved the immediate situation nicely.
I'll work on a pull request to vostools/vos/README.rst to improve the vcp documentation.
Using either
vcp --head vos:mtb55/MUSE-2I/Data/Reduced_SkyFrame/*.fits .
orreturns headers that are unable to be opened: they crash ds9 or are unreadable by astropy.io.fits. They can be opened in a plain text file, so there must be some small amount of modification occurring in the transfer process.
(The .fits files themselves are fine, as downloading the whole 2.7 GB .fits file produces a valid header.)
Is there a better way to get a valid header?