FieldWrapperList#

class lsst.ts.watcher.FieldWrapperList#

Bases: object

A sequence of field wrappers.

Provides convenient methods for extracting data.

field_wrappers#

List of field wrappers.

Type:

list [BaseFilteredFieldWrapper]

Methods Summary

add_wrapper(field_wrapper)

Add a field wrapper to the collection.

get_data([omit_nan, max_age])

Return the current data, optionally with an age limit.

Methods Documentation

add_wrapper(field_wrapper)#

Add a field wrapper to the collection.

Parameters:

field_wrapper (BaseFilteredFieldWrapper) – Field wrapper to add to the collection.

get_data(omit_nan=True, max_age=None)#

Return the current data, optionally with an age limit.

Field wrappers that have not yet seen any data are omitted.

Parameters:
  • omit_nan (bool) – If True then omit NaN values.

  • max_age (float or None) – The maximum age (in seconds) of the data; older data is omitted. If None then all data is returned.

Returns:

data – A list of tuples, each of which is:

  • value: scalar value

  • wrapper: the field wrapper the value came from

  • value_index: index of the value in wrapper.value, or None if wrapper.value is a scalar.

Return type:

list [tuple]