edges_analysis.gsdata.gsflag.GSFlag

class edges_analysis.gsdata.gsflag.GSFlag(flags: np.ArrayLike | Quantity | None, axes=_Nothing.NOTHING, history: History = _Nothing.NOTHING, filename=None)[source]

A generic container for Global-Signal data.

Parameters:
  • flags (numpy.ndarray) – The flags as a boolean array. The array may have up to 4 dimensions – load, pol, time, and freq – but need not have all of the dimensions.

  • axes (tuple[str]) – A tuple of strings specifying the axes of the data array. The possible axes are “load”, “pol”, “time”, and “freq”. They must be in that order, but not all must be present.

  • history (edges_analysis.gsdata.history.History) – A tuple of dictionaries, each of which is a record of a previous processing step.

  • filename (pathlib.Path | None) – The filename from which the data was read (if any). Used for writing additional data if more is added (eg. flags, data model).

Methods

__init__(flags[, axes, history, filename])

Method generated by attrs for class GSFlag.

any([axis])

Returns True if any of the flags are True.

from_file(filename[, filetype])

Create a GSFlag instance from a file.

op_on_axis(op, axis)

Applies an operation along the given axis.

read_gsflag(filename)

Reads a GSFlag file and stores the data in the GSFlag object.

select(idx, axis[, squeeze])

Selects a subset of the data along the given axis.

update(**kwargs)

Returns a new GSFlag object with updated attributes.

write_gsflag(filename)

Writes the data in the GSData object to a GSH5 file.

Attributes

full_rank_flags

Returns a full-rank flag array.

nfreqs

The number of frequency channels.

nloads

The number of loads.

npols

The number of polarizations.

ntimes

The number of times.

flags

axes

history

filename