FileHeaders

class gdt.core.headers.FileHeaders[source]

Bases: object

A collection of FITS headers. This class should be furthered sub-classed with the class variables:

  • _header_templates - A list of Header, where each header is

    a template of values.

Once initialized, each header can be accessed either by the extension name, e.g., ‘PRIMARY’ or by extension index.

Attributes Summary

num_headers

The number of headers

Methods Summary

copy()

Return a copy of the FileHeaders.

creator()

The Creator card

from_headers(headers)

Create a FileHeaders object from a list of Headers.

keys()

A list of the extension names

update()

Update the 'DATE' keywords to the current time.

Attributes Documentation

num_headers

The number of headers

Type:

(int)

Methods Documentation

copy()[source]

Return a copy of the FileHeaders.

Returns:

(FileHeaders)

static creator()[source]

The Creator card

classmethod from_headers(headers)[source]

Create a FileHeaders object from a list of Headers. The header types and keyword types must match those in _header_templates or an exception is raised.

Parameters:

headers (list) – A list of Headers

Returns:

(FileHeaders)

keys()[source]

A list of the extension names

Returns:

(list)

update()[source]

Update the ‘DATE’ keywords to the current time.