ZeroMeanGains

class sofia_redux.scan.channels.gain_provider.zero_mean_gains.ZeroMeanGains[source]

Bases: GainProvider

An abstract class designed to subtract average gain values.

Methods Summary

get_gain(channel_data)

Returns gain values with the average gain removed (determined from validate of a Mode.

get_relative_gain(channel_data)

set_gain(channel_data, gains)

Set gains in the channel data.

set_raw_gain(channel_data, gain)

validate(mode)

Validate a given mode.

Methods Documentation

get_gain(channel_data)[source]

Returns gain values with the average gain removed (determined from validate of a Mode.

Parameters:
channel_dataChannelData or ChannelGroup

The channel data from which to extract gains.

Returns:
gainsnumpy.ndarray (float)

The returned zero-mean gains.

abstract get_relative_gain(channel_data)[source]
set_gain(channel_data, gains)[source]

Set gains in the channel data.

Parameters:
channel_dataChannelData or ChannelGroup

The channel data for which to set gains.

gainsnumpy.ndarray (float)

The gains to apply.

Returns:
None
abstract set_raw_gain(channel_data, gain)[source]
validate(mode)[source]

Validate a given mode.

Determine the average gain from a given mode.

Parameters:
modeMode
Returns:
None