astro py:docs

- Index
- Modules

### Navigation

- next »
- « previous |
- Astropy v0.3 »
- ASCII Tables (`astropy.io.ascii`) »
- BaseHeader

# BaseHeader

class `astropy.io.ascii.core.``BaseHeader`

  Bases: `object`

  Base table header reader

  Parameters:

  - auto_format – format string for auto-generating column names
  - start_line – None, int, or a function of `lines` that returns None or int
  - comment – regular expression for comment lines
  - splitter_class – Splitter class for splitting data lines into columns
  - names – list of names corresponding to each data column

  Attributes Summary

  `auto_format` | str(object=’‘) -> string
  `colnames` | Return the column names of the table
  `comment` |
  `names` |
  `start_line` |
  `write_spacer_lines` | list() -> new empty list

  Methods Summary

  `get_col_type`(col) |
  `get_cols`(lines) | Initialize the header Column objects from the table `lines`.
  `get_type_map_key`(col) |
  `process_lines`(lines) | Generator to yield non-comment lines
  `update_meta`(lines, meta) | Extract any table-level metadata, e.g.
  `write`(lines) |

  Attributes Documentation

  `auto_format` = 'col%d'
  `colnames`

    Return the column names of the table

  `comment` = None
  `names` = None
  `start_line` = None
  `write_spacer_lines` = ['ASCII_TABLE_WRITE_SPACER_LINE']

  Methods Documentation

  `get_col_type`(col)
  `get_cols`(lines)

    Initialize the header Column objects from the table `lines`.

    Based on the previously set Header attributes find or create the column names. Sets `self.cols` with the list of Columns.

    Parameters: | lines – list of table lines
    Returns: | None

  `get_type_map_key`(col)
  `process_lines`(lines)

    Generator to yield non-comment lines

  `update_meta`(lines, meta)

    Extract any table-level metadata, e.g. keywords, comments, column metadata, from the table `lines` and update the OrderedDict `meta` in place. This base method does nothing.

  `write`(lines)