Frames

class sofia_redux.scan.frames.frames.Frames[source]

Bases: FlaggedData

The Frames class contains all time-dependent data in an integration.

Attributes Summary

astrometry

Returns the astrometry information from the parent scan.

channel_fixed_index

channel_size

The number of channels in the frame data.

channels

configuration

default_channel_fields

Returns default frame/channel type default values.

default_field_types

Used to define the default values for data arrays.

info

Return the scan info object.

internal_attributes

Returns attribute names that are internal to the data for get actions.

readout_attributes

Returns attributes that will be operated on by the shift method.

referenced_attributes

Referenced attributes are those that are referenced during copy.

scan

scan_equatorial

Return the scan equatorial coordinates.

special_fields

Return fields that do not comply with the shape of other data.

Methods Summary

add_data_from(other_frames[, scaling, indices])

Add data from other frames to these.

add_dependents(dependents[, start, end])

Add dependents from frame data.

correct_factor_dimensions(factor, array)

Corrects the factor dimensionality prior to an array +-/* etc.

equatorial_to_native(equatorial[, indices, ...])

Convert equatorial coordinates to native coordinates.

equatorial_to_native_offset(offset[, ...])

Convert equatorial offsets to native offsets.

find_channel_fixed_indices(fixed_indices[, cull])

Returns the actual indices given channel fixed indices.

get_absolute_native_coordinates()

Get absolute spherical (including chopper) coords in telescope frame.

get_absolute_native_offsets()

Return absolute spherical offsets in telescope frame.

get_apparent_equatorial([indices, apparent])

Precess equatorial coordinates to the Scan MJD.

get_base_equatorial_native_offset([indices, ...])

Return equatorial native offsets of the frames from the scan reference.

get_base_native_offset([indices, offset])

Return equatorial native offsets of the frames from the scan reference.

get_equatorial(offsets[, indices, equatorial])

Return equatorial coordinates given offsets from the base equatorial.

get_equatorial_native_offset(position[, ...])

Return the horizontal offsets of a position relative to scan center.

get_equatorial_native_offset_from(reference)

Find the native equatorial offset from a reference position.

get_first_frame([reference])

Return the first valid frame.

get_first_frame_index([reference])

Return the first valid frame index of the integration.

get_first_frame_index_from(index)

Return the first valid frame index after and including a given index.

get_first_frame_value(field)

Return the first valid frame data for the given field.

get_first_frame_value_from(index, field)

Return the first valid frame value before and including a given index.

get_focal_plane_offset(position[, indices, ...])

Return the offsets on the focal plane from given positional offsets.

get_frame_count([keep_flag, discard_flag, ...])

Return the number of frames in an integration.

get_last_frame([reference])

Return the first valid frame.

get_last_frame_from(index)

Return the last valid frame index before and including a given index.

get_last_frame_index([reference])

Return the last valid frame index of the integration.

get_last_frame_value(field)

Return the last valid frame data for the given field.

get_last_frame_value_from(index, field)

Return the last valid frame value before and including a given index.

get_native_offset(position[, indices, offset])

Get the equatorial offsets for the given position.

get_native_offset_from(reference[, indices])

Return the native offset from a reference coordinate.

get_native_x(focal_plane_position[, indices])

Return the native x coordinates from a given focal plane position.

get_native_xy(focal_plane_position[, ...])

Return the native x/y coordinates from a given focal plane position.

get_native_y(focal_plane_position[, indices])

Return the native y coordinates from a given focal plane position.

get_rotation([indices])

Returns the tan of sin(angle), cos(angle).

get_source_gain(mode_flag)

Return the source gain.

initialize(integration, size)

Initializes a frame object with default values.

insert_blanks(insert_indices)

Inserts blank frame data.

instance_from_instrument_name(name)

Return a Frames instance for a given instrument.

invert([indices])

Multiply all data (in data) by -1.

jackknife()

Randomly set signs for roughly half of the frames.

native_equatorial_to_native_offset(offset[, ...])

Convert native equatorial offsets to native offsets.

native_to_equatorial(native[, indices, ...])

Convert native coordinates to equatorial coordinates.

native_to_equatorial_offset(offset[, ...])

Convert native offsets to equatorial offsets.

native_to_native_equatorial_offset(offset[, ...])

Convert native offsets to native equatorial offsets.

pointing_at(offset[, indices])

Applies pointing correction to coordinates via subtraction.

project(position, projector[, indices])

Project focal plane offsets.

remove_dependents(dependents[, start, end])

Remove dependents from frame data.

scale(factor[, indices])

Scale all data (in data) by factor.

set_channels([channels])

Predominantly updates fixed channel indices.

set_default_channel_values(channel_size)

Populate channel data fields with default values.

set_frame_size(n_frames)

Set the number of frames in an integration and default values.

set_from_downsampled(frames, start_indices, ...)

Set the data for these frames by downsampling higher-res frames.

set_rotation(angle[, indices])

Set the sin_a and cos_a attributes from an angle.

set_transmission(transmission[, indices])

Set the frame transmission.

shift_frames(n_frames)

Shift the "readout" data by a number of frames in either direction.

slim([channels])

Slim channel type data to those channels still present.

validate()

Validate frame data after read.

validate_channel_indices()

Check that the frame channel indices are consistent.

Attributes Documentation

astrometry

Returns the astrometry information from the parent scan.

Returns:
AstrometryInfo
channel_fixed_index
channel_size

The number of channels in the frame data.

Returns:
int
channels
configuration
default_channel_fields

Returns default frame/channel type default values.

This framework is similar to default_field_types, but is used to populate frame/channel data of shape (n_frames, n_channels).

Returns:
fieldsdict
default_field_types

Used to define the default values for data arrays.

Returns a dictionary of structure {field: default_value}. The default values have the following effects:

type - empty numpy array of the given type. value - full numpy array of the given value. astropy.units.Unit - empty numpy array (float) in the given unit. astropy.units.Quantity - full numpy array of the given quantity.

If a tuple is provided, the array will have additional axes appended such that the first element gives the type as above, and any additional integers give additional axes dimensions, e.g. (0.0, 2, 3) would result in a numpy array filled with zeros of shape (self.size, 2, 3).

Returns:
fieldsdict
info

Return the scan info object.

Returns:
Info
internal_attributes

Returns attribute names that are internal to the data for get actions.

These attributes should always be returned as-is regardless of indexing.

Returns:
set (str)
readout_attributes

Returns attributes that will be operated on by the shift method.

Returns:
set (str)
referenced_attributes

Referenced attributes are those that are referenced during copy.

Returns:
set (str)
scan
scan_equatorial

Return the scan equatorial coordinates.

Returns:
equatorialEquatorialCoordinates

The equatorial coordinates (single RA/DEC) of the scan.

special_fields

Return fields that do not comply with the shape of other data.

This is of particular importance for delete_indices. Although all arrays must have shape[0] = self.size, special handling may be required in certain cases.

Returns:
fieldsset (str)

Methods Documentation

add_data_from(other_frames, scaling=1.0, indices=None)[source]

Add data from other frames to these.

The other frames’ data must match the shape of the indices specified, or the current frames’ full data array if indices=None.

Parameters:
other_framesFrames
scalingfloat, optional
indicesint or slice or numpy.ndarray (int or bool)

The frame indices to add to.

Returns:
None
add_dependents(dependents, start=None, end=None)[source]

Add dependents from frame data.

Parameters:
dependentsnumpy.ndarray (float)

Must be the same size as self.size.

startint, optional

The starting frame.

endint, optional

The exclusive ending frame.

Returns:
None
static correct_factor_dimensions(factor, array)[source]

Corrects the factor dimensionality prior to an array +-/* etc.

Frame operations are frequently of the form result = factor op array where factor is of shape (n_frames,) and array is of shape (n_frames, …). This procedure updates the factor shape so that array operations are possible. E.g., if factor is of shape (5,) and array is of shape (5, 10), then the output factor will be of shape (5, 1) and allow the two arrays to operate with each other.

Parameters:
factorint or float or numpy.ndarray

The factor to check.

arraynumpy.ndarray

The array to check against

Returns:
working_factornumpy.ndarray
equatorial_to_native(equatorial, indices=None, native=None)[source]

Convert equatorial coordinates to native coordinates.

Parameters:
equatorialEquatorialCoordinates

The equatorial coordinates to convert.

indicesint or slice or numpy.ndarray (int or bool)

The frame indices for which to calculate offsets. The default is all frames (not used by equatorial frames).

nativeSphericalCoordinates, optional

The native coordinates to populate. Will default to spherical coordinates if not provided.

Returns:
native_coordinatesEquatorialCoordinates
equatorial_to_native_offset(offset, indices=None, in_place=True)[source]

Convert equatorial offsets to native offsets.

Parameters:
offsetCoordinate2D

The equatorial (x, y) offsets.

indicesint or slice or numpy.ndarray (int or bool)

The frame indices for which to calculate offsets. The default is all frames (not used by equatorial frames).

in_placebool, optional

If True, modify the coordinates in place. Otherwise, return a copy of the offsets.

Returns:
native_offsetsCoordinate2D
find_channel_fixed_indices(fixed_indices, cull=True)[source]

Returns the actual indices given channel fixed indices.

The fixed indices are those that are initially loaded. Returned indices are their locations in the data arrays.

This operates on the channel fixed indices, important for some fields of the frame data (data, sample_flags, etc.).

Parameters:
fixed_indicesint or np.ndarray (int)

The fixed indices of the channels.

cullbool, optional

If True, do not include fixed indices not found in the result. If False, missing indices will be replaced by -1.

Returns:
indicesndarray of int

The indices of fixed_indices in the data arrays.

abstract get_absolute_native_coordinates()[source]

Get absolute spherical (including chopper) coords in telescope frame.

This is named getNativeCoords() in CRUSH

Returns:
coordinatesSphericalCoordinates
abstract get_absolute_native_offsets()[source]

Return absolute spherical offsets in telescope frame.

This is named GetNativeOffset() in CRUSH

Returns:
offsetsCoordinate2D

The (x, y) native offsets.

get_apparent_equatorial(indices=None, apparent=None)[source]

Precess equatorial coordinates to the Scan MJD.

Parameters:
indicesint or slice or numpy.ndarray (int or bool)

The frame indices for which to get the apparent equatorial coordinates. The default is all indices.

apparentEquatorialCoordinates, optional

If supplied, will be updated with the equatorial coordinates and returned. Otherwise, a fresh coordinate frame will be created.

Returns:
apparent_equatorialEquatorialCoordinates
get_base_equatorial_native_offset(indices=None, offset=None)[source]

Return equatorial native offsets of the frames from the scan reference.

Parameters:
indicesint or slice or numpy.ndarray (int or bool)

The frame indices for which to extract the offsets.

offsetCoordinate2D, optional

An optional coordinate object to hold the results.

Returns:
equatorial_offsetsCoordinate2D
get_base_native_offset(indices=None, offset=None)[source]

Return equatorial native offsets of the frames from the scan reference.

Parameters:
indicesint or slice or numpy.ndarray (int or bool)

The frame indices for which to extract the offsets.

offsetCoordinate2D, optional

An optional coordinate object to hold the results.

Returns:
equatorial_offsetsCoordinate2D
get_equatorial(offsets, indices=None, equatorial=None)[source]

Return equatorial coordinates given offsets from the base equatorial.

The return result (lon, lat) is:

lon = base_lon + (position.lon / cos(scan.lat)) lat = base_lat + position.lat

Parameters:
offsetsCoordinate2D

The (x, y) equatorial offsets of shape () or (shape,)

indicesnumpy.ndarray (int), optional

The frame indices that apply. The default is all indices.

equatorialEquatorialCoordinates, optional

The equatorial output frame. The default is the same as the frame equatorial frame.

Returns:
equatorialEquatorialCoordinates
get_equatorial_native_offset(position, indices=None, offset=None)[source]

Return the horizontal offsets of a position relative to scan center.

The final return position is the sum of the position offsets, and the equatorial coordinates of the frame relative to the scan center.

Parameters:
positionCoordinate2D

The (x, y) horizontal offsets of shape () or (m,) giving the (lon, lat) offset positions. If not set, the default is to return the offsets relative to the scan equatorial position.

indicesint or numpy.ndarray (int), optional

The frame indices that apply of shape (n,) (if an array was used). The default is all indices.

offsetCoordinate2D, optional

An optional output array to store and return the coordinates.

Returns:
native_offsetsCoordinate2D

An array containing the sum of the equatorial offsets of the frame data and the supplied positions. If multiple frame indices and multiple positions are supplied, the resulting coordinate shape will be (n, m). Otherwise, the result will be shaped as either (n,) or (m,) or () depending on if indices/position are singular.

get_equatorial_native_offset_from(reference, indices=None)[source]

Find the native equatorial offset from a reference position.

The result will be:

dx = (x - ref(x)) / cos(ref(y)) dy = (y - ref(y))

Parameters:
referenceEquatorialCoordinates

The reference equatorial coordinate(s).

indicesint or numpy.ndarray (int), optional

The frame indices for which to derive offsets. If an array is provided is should be of shape (n,). The default is all indices.

Returns:
offsetCoordinate2D

The native equatorial offsets between the frame equatorial positions and a reference position.

get_first_frame(reference=0)[source]

Return the first valid frame.

Parameters:
referenceint, optional

The first actual frame index after which to return the first valid frame. The default is the first (0).

Returns:
Frames
get_first_frame_index(reference=0)[source]

Return the first valid frame index of the integration.

Returns:
first_frameint
referenceint, optional

If supplied, finds the first frame from reference, rather than the first index (0). May take negative values to indicate an index relative to the last.

get_first_frame_index_from(index)[source]

Return the first valid frame index after and including a given index.

Parameters:
indexint
Returns:
first_frameint
get_first_frame_value(field)[source]

Return the first valid frame data for the given field.

Parameters:
fieldstr

Name of the frame data field.

Returns:
value
get_first_frame_value_from(index, field)[source]

Return the first valid frame value before and including a given index.

Parameters:
indexint
fieldstr

Name of the frame data field.

Returns:
value
get_focal_plane_offset(position, indices=None, offset=None)[source]

Return the offsets on the focal plane from given positional offsets.

The positions are the rotated from telescope coordinates to pixel coordinates.

Parameters:
positionCoordinate2D

The native offsets to convert to a focal plane offset.

indicesnumpy.ndarray (int), optional

The frame indices that apply. The default is all indices.

offsetCoordinate2D, optional

An optional container to store the offsets (returned).

Returns:
offsetsCoordinate2D

The (x, y) offset coordinates on the focal plane.

get_frame_count(keep_flag=None, discard_flag=None, match_flag=None)[source]

Return the number of frames in an integration.

A number of flags may also be supplied to return the number of a certain type of frame.

Parameters:
keep_flagint or ChannelFlagTypes, optional

Flag values to keep in the calculation.

discard_flagint or ChannelFlagTypes, optional

Flag values to discard_flag from the calculation.

match_flagint or ChannelFlagTypes, optional

Only matching flag values will be used in the calculation.

Returns:
n_framesint

The number of matching frames in the integration.

get_last_frame(reference=None)[source]

Return the first valid frame.

Parameters:
referenceint, optional

The last actual frame index before which to return the last valid frame. The default is the last.

Returns:
Frames
get_last_frame_from(index)[source]

Return the last valid frame index before and including a given index.

Parameters:
indexint
Returns:
last_frameint
get_last_frame_index(reference=None)[source]

Return the last valid frame index of the integration.

Returns:
last_frameint
referenceint, optional
referenceint, optional

If supplied, finds the last frame before reference, rather than the last index (self.size). May take negative values to indicate an index relative to the last index.

get_last_frame_value(field)[source]

Return the last valid frame data for the given field.

Parameters:
fieldstr

Name of the frame data field.

Returns:
value
get_last_frame_value_from(index, field)[source]

Return the last valid frame value before and including a given index.

Parameters:
indexint
fieldstr

Name of the frame data field.

Returns:
value
get_native_offset(position, indices=None, offset=None)[source]

Get the equatorial offsets for the given position.

Parameters:
positionCoordinate2D

The (x, y) offsets.

indicesnumpy.ndarray (int), optional

The frame indices that apply. The default is all indices.

offsetCoordinate2D, optional

The coordinate object on which to store the offsets (returned).

Returns:
native_offsetsCoordinate2D
get_native_offset_from(reference, indices=None)[source]

Return the native offset from a reference coordinate.

Parameters:
referenceEquatorialCoordinates

The reference position from which to derive the offsets of the frame positions.

indicesnumpy.ndarray (int), optional

The frame indices to use. The default is all indices.

Returns:
Coordinate2D
get_native_x(focal_plane_position, indices=None)[source]

Return the native x coordinates from a given focal plane position.

Parameters:
focal_plane_positionCoordinates2D

The (x, y) focal plane offsets.

indicesint or numpy.ndarray or int, optional

The frame indices for which to calculate x. The default is all frames of shape. If a slice or array is provided, will be of length n.

Returns:
native_xastropy.units.Quantity (numpy.ndarray)

An array of shape () or (n,) or (n, shape).

get_native_xy(focal_plane_position, indices=None, coordinates=None)[source]

Return the native x/y coordinates from a given focal plane position.

Rotates the focal plane positions by the stored cos(a) and sin(a) frame positions.

Parameters:
focal_plane_positionCoordinates2D

The (x, y) focal plane offsets as a scalar of shape (shape,).

indicesint or numpy.ndarray or int, optional

The frame indices for which to calculate x. The default is all frames of shape. If a slice or array is provided, will be of length n.

coordinatesCoordinate2D, optional

An optional output coordinate system to hold the result (returned).

Returns:
native_xyCoordinates2D

The native (x, y) coordinates.

get_native_y(focal_plane_position, indices=None)[source]

Return the native y coordinates from a given focal plane position.

Parameters:
focal_plane_positionCoordinate2D

The (x, y) focal plane offsets as a scalar or shape (shape,)

indicesint or numpy.ndarray or int, optional

The frame indices for which to calculate x. The default is all frames of shape. If a slice or array is provided, will be of length n.

Returns:
native_xyastropy.units.Quantity (numpy.ndarray)

An array of shape () or (n,) or (n, shape).

get_rotation(indices=None)[source]

Returns the tan of sin(angle), cos(angle).

Parameters:
indicesnumpy.ndarray (int), optional

The frame indices. The default is all indices.

Returns:
angleastropy.units.Quantity (numpy.ndarray)

An array of angles of size (N,) or (indices.size,).

get_source_gain(mode_flag)[source]

Return the source gain.

The basic frame class will only return a result for the TOTAL_POWER flag. All others will raise an error. The source gain here is defined as gain = transmission * sign.

Parameters:
mode_flagFrameFlagTypes or str or int

The gain mode flag type.

Returns:
gainnumpy.ndarray (float)

The source gains.

initialize(integration, size)[source]

Initializes a frame object with default values.

Parameters:
integrationIntegration
sizeint

The total number of frames.

Returns:
None
insert_blanks(insert_indices)[source]

Inserts blank frame data.

Actual indices should be passed in. To delete based on fixed index values, please convert first using find_fixed_indices.

Blank data are set to 0 in whatever unit is applicable.

Parameters:
insert_indicesnumpy.ndarray of (int)

The index locations to insert.

Returns:
None
classmethod instance_from_instrument_name(name)[source]

Return a Frames instance for a given instrument.

Parameters:
namestr

The name of the instrument.

Returns:
Frames
invert(indices=None)[source]

Multiply all data (in data) by -1.

Parameters:
indicesint or slice or numpy.ndarray (int or bool)

The frame indices to scale. The default is all.

Returns:
None
jackknife()[source]

Randomly set signs for roughly half of the frames.

Returns:
None
native_equatorial_to_native_offset(offset, indices=None, in_place=True)[source]

Convert native equatorial offsets to native offsets.

Parameters:
offsetCoordinate2D

The native (x, y) equatorial offsets.

indicesint or slice or numpy.ndarray (int or bool)

The frame indices for which to calculate offsets. The default is all frames (not used by equatorial frames).

in_placebool, optional

If True, modify the coordinates in place. Otherwise, return a copy of the offsets.

Returns:
native_offsetsCoordinate2D
native_to_equatorial(native, indices=None, equatorial=None)[source]

Convert native coordinates to equatorial coordinates.

Parameters:
nativeEquatorialCoordinates

The coordinates to convert.

indicesint or slice or numpy.ndarray (int or bool)

The frame indices for which to calculate offsets. The default is all frames (not used by equatorial frames).

equatorialEquatorialCoordinates, optional

If not supplied, the returned coordinates will have a J2000 epoch. Otherwise, the equatorial coordinates provided will be populated.

Returns:
equatorial_coordinatesEquatorialCoordinates
native_to_equatorial_offset(offset, indices=None, in_place=True)[source]

Convert native offsets to equatorial offsets.

Parameters:
offsetCoordinate2D

The native (x, y) offsets.

indicesint or slice or numpy.ndarray (int or bool)

The frame indices for which to calculate offsets. The default is all frames (not used by equatorial frames).

in_placebool, optional

If True, modify the coordinates in place. Otherwise, return a copy of the offsets.

Returns:
equatorial_offsetsCoordinate2D
native_to_native_equatorial_offset(offset, indices=None, in_place=True)[source]

Convert native offsets to native equatorial offsets.

Parameters:
offsetCoordinate2D

The native (x, y) offsets.

indicesint or slice or numpy.ndarray (int or bool)

The frame indices for which to calculate offsets. The default is all frames (not used by equatorial frames).

in_placebool, optional

If True, modify the coordinates in place. Otherwise, return a copy of the offsets.

Returns:
native_equatorial_offsetsCoordinate2D
pointing_at(offset, indices=None)[source]

Applies pointing correction to coordinates via subtraction.

Parameters:
offsetastropy.units.Quantity (numpy.ndarray)

An array of

indicesnumpy.ndarray (int), optional

The frame indices that apply. The default is all indices.

Returns:
None
project(position, projector, indices=None)[source]

Project focal plane offsets.

Parameters:
positionCoordinate2D

The (x, y) position to project to offset.

projectorAstroProjector

The projector to store and determine the projected offsets.

indicesint or slice or numpy.ndarray (int or bool)

The frame indices to project.

Returns:
offsetsCoordinate2D

The projector offsets. These will also be stored in the projector offsets attribute

remove_dependents(dependents, start=None, end=None)[source]

Remove dependents from frame data.

Parameters:
dependentsnumpy.ndarray (float)

Must be the same size as self.size.

startint, optional

The starting frame.

endint, optional

The exclusive ending frame.

Returns:
None
scale(factor, indices=None)[source]

Scale all data (in data) by factor.

Parameters:
factorint or float
indicesint or slice or numpy.ndarray (int or bool)

The frame indices to scale. The default is all.

Returns:
None
set_channels(channels=None)[source]

Predominantly updates fixed channel indices.

Will set default values if the channel type data has not already been defined. Otherwise, the channels provided must be a subset of the previously defined channels. In this case, channel type data is slimmed down to those that are still found in the new channels.

Parameters:
channelsChannels, optional

The channels from which to base channel type data. Defaults to integration channels.

Returns:
None
set_default_channel_values(channel_size)[source]

Populate channel data fields with default values.

The default values are loaded from the default_channel_fields property which returns a dictionary of the form {field_name: value}. If the value is a type, the default values will be empty numpy arrays. Other valid values can be astropy quantities or standard python types such as int, float, str, etc. All fields will be set to numpy arrays of the same type and filled with the same value.

All arrays will be of the shape (self.size, channel_size).

Parameters:
channel_sizeint

The number of channels

Returns:
None
set_frame_size(n_frames)[source]

Set the number of frames in an integration and default values.

Parameters:
n_framesint
Returns:
None
set_from_downsampled(frames, start_indices, valid, window)[source]

Set the data for these frames by downsampling higher-res frames.

Parameters:
framesFrames

The frames at a higher resolution.

start_indicesnumpy.ndarray (int)

The start indices containing the first index of the high resolution frame for each convolution with the window function. Should be of shape (self.size,).

validnumpy.ndarray (bool)

A boolean mask indicating whether a downsampled frame could be determined from the higher resolution frames. Should be of shape (self.size,).

windownumpy.ndarray (float)

The window function used for convolution of shape (n_window,).

Returns:
None
set_rotation(angle, indices=None)[source]

Set the sin_a and cos_a attributes from an angle.

The sin_a and cos_a attributes define the rotation from the pixel coordinates to the telescope coordinates.

Parameters:
angleint or float or numpy.ndarray or Quantity

The angle to set. If an array is supplied, must be the same size as indices.

indicesnumpy.ndarray (int), optional

The frame indices to set. The default is all indices.

Returns:
None
set_transmission(transmission, indices=None)[source]

Set the frame transmission.

Parameters:
transmissionfloat or numpy.ndarray (float)

The transmission values to set.

indicesint or slice or numpy.ndarray (int or bool)

The frame indices to update. The default is all frames.

Returns:
None
shift_frames(n_frames)[source]

Shift the “readout” data by a number of frames in either direction.

This will only shift data fields contained in the ‘readout_attributes’ frame property. For frame i, the result of shifting by n_frames will be:

new[i + n_frames] = old[i]

Frames shifted outside of an array will be set to invalid.

Parameters:
n_framesint
Returns:
None
slim(channels=None)[source]

Slim channel type data to those channels still present.

Parameters:
channelsChannels, optional

The channels object. If not supplied, defaults to the integration channels.

Returns:
None
validate()[source]

Validate frame data after read.

Should set the validated (checked) attribute if necessary.

Returns:
None
validate_channel_indices()[source]

Check that the frame channel indices are consistent.

Returns:
None