{
  "__type": "IngestedDoc",
  "__tag": 4010,
  "_content": {
    "Notes": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Warns": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Raises": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Yields": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Methods": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Returns": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Summary": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Descriptor for attributes of "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "Column",
              "reference": {
                "__type": "LocalRef",
                "__tag": 4022,
                "kind": "module",
                "path": "astropy.io.fits.column:Column"
              },
              "kind": "module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " that are associated with keywords in the FITS header and describe properties of the column as specified in the FITS standard."
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Receives": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Warnings": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Attributes": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Parameters": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Extended Summary": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Each "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "ColumnAttribute",
              "reference": {
                "__type": "LocalRef",
                "__tag": 4022,
                "kind": "module",
                "path": "astropy.io.fits.column:ColumnAttribute"
              },
              "kind": "module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " may have a "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "validator"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " 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 "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "Column",
              "reference": {
                "__type": "LocalRef",
                "__tag": 4022,
                "kind": "module",
                "path": "astropy.io.fits.column:Column"
              },
              "kind": "module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " it is being assigned to, and the new value for the attribute, and it must raise an "
            },
            {
              "__type": "InlineRole",
              "__tag": 4003,
              "value": "AssertionError",
              "domain": null,
              "role": null,
              "inventory": null
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " if the value is invalid."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "The "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "ColumnAttribute",
              "reference": {
                "__type": "LocalRef",
                "__tag": 4022,
                "kind": "module",
                "path": "astropy.io.fits.column:ColumnAttribute"
              },
              "kind": "module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " itself is a decorator that can be used to define the "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "validator"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " for each column attribute.  For example      "
            }
          ]
        },
        {
          "__type": "Code",
          "__tag": 4050,
          "value": "@ColumnAttribute('TTYPE')\ndef name(col, name):\n    if not isinstance(name, str):\n        raise AssertionError",
          "execution_status": null,
          "out": ""
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "The actual object returned by this decorator is the "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "ColumnAttribute",
              "reference": {
                "__type": "LocalRef",
                "__tag": 4022,
                "kind": "module",
                "path": "astropy.io.fits.column:ColumnAttribute"
              },
              "kind": "module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " instance though, not the "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "name"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " function.  As such "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "name"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " is not a method of the class it is defined in."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "The setter for "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "ColumnAttribute",
              "reference": {
                "__type": "LocalRef",
                "__tag": 4022,
                "kind": "module",
                "path": "astropy.io.fits.column:ColumnAttribute"
              },
              "kind": "module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " also updates the header of any table HDU this column is attached to in order to reflect the change.  The "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "validator"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " should ensure that the value is valid for inclusion in a FITS header."
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Other Parameters": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    }
  },
  "_ordered_sections": [
    "Summary",
    "Extended Summary",
    "Parameters",
    "Attributes",
    "Methods",
    "Returns",
    "Yields",
    "Receives",
    "Other Parameters",
    "Raises",
    "Warns",
    "Warnings",
    "Notes"
  ],
  "item_file": "/astropy/io/fits/column.py",
  "item_line": 485,
  "item_type": "class",
  "aliases": [
    "astropy.io.fits.column.ColumnAttribute"
  ],
  "example_section_data": {
    "__type": "Section",
    "__tag": 4015,
    "children": [],
    "title": [],
    "level": 0,
    "target": null
  },
  "see_also": [],
  "signature": {
    "__type": "SignatureNode",
    "__tag": 4029,
    "kind": "function",
    "parameters": [
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "keyword",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": {
          "__type": "Empty",
          "__tag": 4031
        }
      }
    ],
    "return_annotation": {
      "__type": "Empty",
      "__tag": 4031
    },
    "target_name": "ColumnAttribute"
  },
  "references": null,
  "qa": "astropy.io.fits.column:ColumnAttribute",
  "arbitrary": [],
  "local_refs": []
}