On 04/25/2017 01:34 PM, Anne Archibald wrote:
I know they're not numpy-compatible, but FITS header values are space-padded; does that occur elsewhere?
Strings in FITS headers are delimited by single quotes. Some keywords (only a handful) are required to have values that are blank-padded (in the FITS file) if the value is less than eight characters. Whether you get trailing blanks when you read the header depends on the FITS reader. I use astropy.io.fits to read/write FITS files, and that interface strips trailing blanks from character strings:
TARGPROP= 'UNKNOWN ' / Proposer's name for the target >>> fd = fits.open("test.fits") >>> s = fd[0].header['targprop'] >>> len(s) 7 Phil _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@python.org https://mail.python.org/mailman/listinfo/numpy-discussion