SpectrumBlock

class sherpa.astro.io.types.SpectrumBlock(name: str, header: Header, columns: list[Column])[source] [edit on github]

Bases: TableBlock

Represent a PHA dataset.

This ensures that the column CHANNEL exists and is 1 or 2D, and that either the COUNTS column exists, or RATE column and EXPOSURE keyword exists.

Attributes Summary

columns

The column data.

name

The name of the HDU (case insensitive)

header

The header values

Methods Summary

get(colname)

Return the column (case insensitive) if it exists.

rget(colname)

Return a required column (case insensitive).

Attributes Documentation

columns: list[Column]

The column data. This list must not be empty.

name: str

The name of the HDU (case insensitive)

header: Header

The header values

Methods Documentation

get(colname: str) Column | None [edit on github]

Return the column (case insensitive) if it exists.

rget(colname: str) Column [edit on github]

Return a required column (case insensitive).

Raise a ValueError if colname does not exist.