Home | Trees | Indices | Help |
|
---|
|
Helpers for manipulating FITS files.
In contrast to fitstools, this is not for online processing or import of files, but just for the manipulation before processing.
Rough guideline: if it's about writing fixed fits files, it probably belongs here, otherwise it goes to fitstools.
Realistically, this module has been hemorraghing functions to fitstools and probably should be removed completely.
One important function it has grown is FITS header templates. These can be used by processors. If these use custom templates, they should register them (or regret it later). See registerTemplate's docstring.
Functions | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Variables | |
DEFAULT_IGNORED_HEADERS = ["simple", "bitpix", "naxis", "image
|
|
MINIMAL_IMAGE_TEMPLATE = [pyfits.Card("SIMPLE", True), pyfits.
|
|
WCS_TEMPLATE = [pyfits.Card(value= "-------------------- Spati
|
|
WFPDB_TEMPLATE = MINIMAL_IMAGE_TEMPLATE+ [pyfits.Card(value= "
|
Function Details |
copies over all cards from cardList into header, excluding headers named in ignoredHeaders. ignoredHeaders must be all lowercase. |
returns the "normal" key-value pairs from hdr in a dictionary. Comment, history and blank cards are excluded; the comments from the cards are lost, too. |
registers a named FITS header template. Registering lets DaCHS figure out the template from a history entry it leaves, so it's certainly a good idea to do that. For templateName, use something containing a bit of your signature (e.g., ariAncientPlate rather than just ancientPlate). |
returns the FITS template sequence for templateName. A NotFoundError is raised if no such template exists. |
returns the template name used for generating hdr. A ReportableError is raised if the info signature is missing. |
returns a new pyfits.Header from template with values filled in. template usually is the name of a template previously registered with registerTemplate, or one of DaCHS predefined template names (currently, minimal and wfpdb). In a pinch, you can also pass in an immediate headers. originalHeader can be a pre-existing header; the history and comment cards are copied over from it, and if any of its other cards have not yet been added to the header, they will be added in the order that they apprear there. values for which no template item is given are added in random order after the template unless an originalHeader is passed. In that case, they are assumed to originate there and are ignored. |
return hdr updated with kwargs. hdr is assumed to have been created with makeHeaderFromTemplate and contain the template name in a history entry. You can pass in templateName to keep DaCHS from trying to get things from the header. [It is probably better to use makeHeaderFromTemplate directly, passing in the orginalHeader; that preserves the order of non-templated headers]. |
Variables Details |
DEFAULT_IGNORED_HEADERS
|
MINIMAL_IMAGE_TEMPLATE
|
WCS_TEMPLATE
|
WFPDB_TEMPLATE
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Thu May 2 07:29:09 2019 | http://epydoc.sourceforge.net |