[AstroPy] boolean header keyword

Nadezhda Dencheva dencheva at stsci.edu
Tue Apr 14 16:42:53 EDT 2015


Hi Abhi,

Use python boolean values, i.e. pass value=True to setval.

Nadia


________________________________
From: astropy-bounces at scipy.org [astropy-bounces at scipy.org] on behalf of Abhijith Rajan [abhijithrajan at asu.edu]
Sent: Tuesday, April 14, 2015 4:26 PM
To: astropy
Subject: [AstroPy] boolean header keyword

Hello,

This is most likely a question for Eric, but I thought I'd see if someone knew the answer. I'm using the setval command in astropy.io.fits to update a header keyword in an HST image (SUBARRAY). The keyword originally contains either a T or F if the image is a subarray or not.

How do I use setval to change the keyword from T to F or vice versa. Right now its updating the header with a string and essentially crashing the code checking to make sure that the image is not a subarray.

Thanks
Abhi

-------------------------------------------------------------------------------------------
Abhijith Rajan
PhD Candidate
Arizona State University
School of Earth & Space Exploration
Interdisciplinary Sci & Tech Bldg 4 Rm 542
Tempe, AZ 85287
Tel: (480) 727-2559
Fax: (480) 965-8102
www.abhijithrajan.com<http://www.abhijithrajan.com>
-------------------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/astropy/attachments/20150414/5348d6b7/attachment.html>


More information about the AstroPy mailing list