Timeline¶
Timeline Classes¶
- class aca_view.aca_telemetry_timeline.AcaSlotTelemetryTimeline[source]¶
This class wraps the telemetry data corresponding to one ACA slot.
It has two data members:
an array of non-image data, with shape (N, M)
an array of image data, with shape (N, 8, 8)
- property image¶
Image telemetry data.
- latest_at(t)[source]¶
Last index before given time. It returns None if there is no entry before the given time.
- Parameters:
t – CxoTime or equivalent.
- Returns:
int or None
- property table¶
Non-image telemetry data.
- property time¶
Time column of the underlying telemetry array.
- class aca_view.aca_telemetry_timeline.AcaTelemetryTimeline[source]¶
This class wraps all ACA telemetry data.
It has the following members:
an array of non-slot telemetry data,
A list of AcaSlotTelemetryTimeline, one per slot,
A nominal time range. This can be set before any data is actually appended.
- latest_at(t)[source]¶
List of indices before given time (one per slot).
- Parameters:
t – CxoTime or equivalent.
- Returns:
list
- set_nominal_range(start, stop)[source]¶
Set the nominal time range
- Parameters:
start – CxoTime or equivalent.
stop – CxoTime or equivalent.
- property table¶
Non-slot telemetry data.
- class aca_view.aca_telemetry_traversal.AcaTelemetryTraverser(timeline, start=None, stop=None)[source]¶
Class to encapsulate time steps over a timeline.
This class stores a timeline and a current time. It also has a timer that ticks at a fixed rate, causing the time to step at fixed increments.
- current_entries()[source]¶
Return the index of the latest slot entries before the current time.
This assumes that
An index of -1 corresponds to the last entry in the timeline
If there is no data before the current time for a given slot, the corresponding index will be -2.
The time after which an image becomes stale is measured in minor frames, and depends on the image size:
4x4: 4 frames
6x6: 8 frames
8x8: 16 frames
Returns¶
- resulttuple
tuple of length 8, one per slot.
- property current_index¶
Current index
- next()[source]¶
Step to the next time point.
This method is called in the context of a timer loop (which runs on a separate thread). It either steps forward, backward or does nothing.
- property t¶
Current time
Array Class¶
- class aca_view.array.Array(dtype=None, max_size=172800, index='TIME', shape=(), resize_policy='max')[source]¶
Class to encapsulate a rolling array.
A “rolling” array has a fixed size N. When one appends at the end, and the new size would be larger than N, only the last N rows are kept.
This is not an array, but rather it contains an array and its mask.
- Parameters:
dtype – numpy.dtype, optional.
max_size – int, default: 86400
index – str, default: ‘TIME’ the name of the column that serves as the index.
shape – tuple
resize_policy –
str, default: ‘max’
if resize_policy == ‘max’, the maximum size will be allocated at first append.
if resize_policy == ‘min’, the maximum size will be increased in each append, up to the maximum size.
- property array¶
Array
- property colnames¶
Column names
- combine(other)[source]¶
“Combine” another array into this one.
This is like merging, but it does not do the usual merge:
it requires both arrays to be indexed by the same column
it assumes both are already sorted according to the index
it assumes that if an index value appears in both arrays, then one of the two entries can be safely discarded.
at the end, the result is truncated to the size of this array
- Parameters:
other – Array
- property mask¶
Mask