Bases: pyfits.verify._Verify
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 contains CONTINUE card(s).
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
|
Execute the verification with selected option.
Verify all values in the instance.
Parameters: | |
---|---|
option : str
|
Get the comment attribute from the card image if not already set.
The card “image”, that is, the 80 byte character string that represents this card in an actual FITS header.
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.
Returns the keyword name parsed from the card image.
The length of a Card image; should always be 80 for valid FITS files.
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.
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.
The value associated with the keyword stored in this card.
The following classes and functions are deprecated as of the PyFITS 3.1 header refactoring, though they are currently still available for backwards-compatibility.
Bases: list
Deprecated since version 3.1: CardList used to provide the list-like functionality for manipulating a header as a list of cards. This functionality is now subsumed into the Header class itself, so it is no longer necessary to create or use CardLists.
Construct the CardList object from a list of Card objects.
CardList is now merely a thin wrapper around Header to provide backwards compatibility for the old API. This should not be used for any new code.
Parameters: | |
---|---|
cards :
|
Deprecated since version 3.1: Use Header.append() instead.
Append a Card to the CardList.
Parameters: | |
---|---|
card : Card object
useblanks : bool, optional
bottom : bool, optional |
Deprecated since version 3.1: Use Header.copy() instead.
Make a (deep)copy of the CardList.
Deprecated since version 3.1: Use Header.count() instead.
Deprecated since version 3.1: The count_blanks function is deprecated as of version 3.1 and may be removed in a future version.
Returns how many blank cards are directly before the END card.
Deprecated since version 3.1: Use Header.extend() instead.
Deprecated since version 3.1: Use header[<wildcard_pattern>] instead.
Construct a CardList that contains references to all of the cards in this CardList that match the input key value including any special filter keys (*, ?, and ...).
Parameters: | |
---|---|
key : str
|
|
Returns: | |
cardlist :
|
Deprecated since version 3.1: Use Header.index() instead.
Deprecated since version 3.1: Use Header.index() instead.
Get the index of a keyword in the CardList.
Parameters: | |
---|---|
key : str or int
backward : bool, optional
|
|
Returns: | |
index : int
|
Deprecated since version 3.1: Use Header.insert() instead.
Insert a Card to the CardList.
Parameters: | |
---|---|
pos : int
card : Card object
useblanks : bool, optional |
Deprecated since version 3.1: Use Header.keys() instead.
Return a list of all keywords from the CardList.
Deprecated since version 3.1: Use Header.pop() instead.
Deprecated since version 3.1: Use Header.remove() instead.
Deprecated since version 3.1: Use Header.values() instead.
Return a list of the values of all cards in the CardList.
For RecordValuedKeywordCard objects, the value returned is the floating point value, exclusive of the field_specifier.
Deprecated since version 3.1: Use Card.__init__ instead.
Deprecated since version 3.1: Use Card.fromstring() instead.
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 contains CONTINUE card(s).
Deprecated since version 3.1: Use Card.normalize_keyword() instead.
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
|