FieldGainProvider

class sofia_redux.scan.channels.gain_provider.field_gain_provider.FieldGainProvider(field)[source]

Bases: GainProvider

Initializes a field gain provider.

The field gain provider operates on a specified channel data field. Returned values (get_gain) retrieves that field from the channel data (copied, not referenced). Also, sets the field of channel data using set_gain.

Parameters:
fieldstr

The name of the field of the channel data on which to operate.

Methods Summary

get_gain(channel_data)

Retrieve gain values from channel data.

set_gain(channel_data, gain)

Set gain values in the channel data for the field.

validate(mode)

The field gain provider does not validate a mode.

Methods Documentation

get_gain(channel_data)[source]

Retrieve gain values from channel data.

Returned values are copied.

Parameters:
channel_dataChannelData or ChannelGroup

The channel data instance.

Returns:
gainsnumpy.ndarray (float)

The gain values.

set_gain(channel_data, gain)[source]

Set gain values in the channel data for the field.

Parameters:
channel_dataChannelData or ChannelGroup

The channel data instance.

gainnumpy.ndarray (float)

The gain values to set.

Returns:
None
validate(mode)[source]

The field gain provider does not validate a mode.

Parameters:
modeMode
Returns:
None