SkyGradient

class sofia_redux.scan.channels.gain_provider.sky_gradient.SkyGradient(horizontal=True)[source]

Bases: ZeroMeanGains

Creates a SkyGradient gain provider.

The sky gain provider returns the horizontal or vertical position data with a mean value removed. The mean value is determined from a given mode during validate.

Parameters:
horizontalbool, optional

If True (default), applied to the horizontal position. Otherwise, operates on the vertical position data.

Methods Summary

get_relative_gain(channel_data)

Returns the position data of the channel data.

set_raw_gain(channel_data, gain)

Attempting to use this method will result in an error.

x()

Creates and returns a horizontal sky gradient gain provider.

y()

Creates and returns a vertical sky gradient gain provider.

Methods Documentation

get_relative_gain(channel_data)[source]

Returns the position data of the channel data.

If the horizontal attribute is True, returns the x position coordinates of the channel data. Otherwise, returns the y position coordinates.

Parameters:
channel_dataChannelData or ChannelGroup
Returns:
positionnumpy.ndarray (float)

The horizontal or vertical position data.

set_raw_gain(channel_data, gain)[source]

Attempting to use this method will result in an error.

The position data is not allowed to be set via this gain provider.

Parameters:
channel_dataChannelData or ChannelGroup
gainnumpy.ndarray (float)

The gain values to set.

Returns:
None
classmethod x()[source]

Creates and returns a horizontal sky gradient gain provider.

Returns:
SkyGradient

An instance of the SkyGradient class to operate on horizontal positions.

classmethod y()[source]

Creates and returns a vertical sky gradient gain provider.

Returns:
SkyGradient

An instance of the SkyGradient class to operate on vertical positions.