astropy 5.0

BackRef

Each ColumnAttribute may have a validator method defined on it. This validates values set on this attribute to ensure that they meet the FITS standard. Invalid values will raise a warning and will not be used in formatting the column. The validator should take two arguments--the Column it is being assigned to, and the new value for the attribute, and it must raise an :None:None:`AssertionError` if the value is invalid.

The ColumnAttribute itself is a decorator that can be used to define the validator for each column attribute. For example:

@ColumnAttribute('TTYPE')
def name(col, name):
    if not isinstance(name, str):
        raise AssertionError

The actual object returned by this decorator is the ColumnAttribute instance though, not the name function. As such name is not a method of the class it is defined in.

The setter for ColumnAttribute also updates the header of any table HDU this column is attached to in order to reflect the change. The validator should ensure that the value is valid for inclusion in a FITS header.

Descriptor for attributes of Column that are associated with keywords in the FITS header and describe properties of the column as specified in the FITS standard.

Examples

See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

astropy.io.fits.column.ColumnAttribute

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


File: /astropy/io/fits/column.py#443
type: <class 'type'>
Commit: