ChannelDivision

class sofia_redux.scan.channels.division.division.ChannelDivision(name, groups=None)[source]

Bases: ABC

Instantiates a channel division.

A Channel division is a collection of channel data groups. Each group name will be set to <name>-<i>, where <i> marks the index of a supplied group. A data group consists of only the data arrays belonging to the master Channel object.

Parameters:
namestr

The name of the division.

groupslist of ChannelGroup

A list of channel data groups to include in the division.

Attributes Summary

fields

Returns the available fields for the division channel groups

size

Return the number of channel groups in the channel division.

Methods Summary

get_group_name_index(group_name)

Given a group name, return its groups index.

set_default_names()

Set the default names for each group in the channel division.

validate_group_index(index_or_group_name)

Return the valid index of a given group.

Attributes Documentation

fields

Returns the available fields for the division channel groups

Returns:
set (str)
size

Return the number of channel groups in the channel division.

Returns:
int

Methods Documentation

get_group_name_index(group_name)[source]

Given a group name, return its groups index.

Parameters:
group_namestr

The name of the group.

Returns:
int
set_default_names()[source]

Set the default names for each group in the channel division.

Returns:
None
validate_group_index(index_or_group_name)[source]

Return the valid index of a given group.

Raises an error if invalid.

Parameters:
index_or_group_nameint or str

The name of the group, or the group index.

Returns:
int