Cards¶
Card
¶
-
class
pyfits.
Card
(keyword=None, value=None, comment=None, **kwargs)¶ Bases:
pyfits.verify._Verify
-
classmethod
fromstring
(image)¶ Construct a
Card
object from a (raw) string. It will pad the string if it is not the length of a card image (80 columns). If the card image is longer than 80 columns, assume it containsCONTINUE
card(s).
-
classmethod
normalize_keyword
(keyword)¶ classmethod
to convert a keyword value that may contain a field-specifier to uppercase. The effect is to raise the key to uppercase and leave the field specifier in its original case.Parameters: key : or str
A keyword value or a
keyword.field-specifier
value
-
run_option
(option='warn', err_text='', fix_text='Fixed.', fix=None, fixable=True)¶ Execute the verification with selected option.
-
verify
(option='warn')¶ Verify all values in the instance.
Parameters: option : str
Output verification option. Must be one of
"fix"
,"silentfix"
,"ignore"
,"warn"
, or"exception"
. May also be any combination of"fix"
or"silentfix"
with"+ignore"
,+warn
, or+exception" (e.g. ``"fix+warn"
). See Verification options for more info.
-
comment
¶ Get the comment attribute from the card image if not already set.
-
image
¶ The card “image”, that is, the 80 byte character string that represents this card in an actual FITS header.
-
is_blank
¶ True
if the card is completely blank–that is, it has no keyword, value, or comment. It appears in the header as 80 spaces.Returns
False
otherwise.
-
keyword
¶ Returns the keyword name parsed from the card image.
-
length
= 80¶ The length of a Card image; should always be 80 for valid FITS files.
-
rawkeyword
¶ On record-valued keyword cards this is the name of the standard <= 8 character FITS keyword that this RVKC is stored in. Otherwise it is the card’s normal keyword.
-
rawvalue
¶ On record-valued keyword cards this is the raw string value in the
<field-specifier>: <value>
format stored in the card in order to represent a RVKC. Otherwise it is the card’s normal value.
-
value
¶ The value associated with the keyword stored in this card.
-
classmethod