ADCS.helpers.animations.godot.reader module

class ADCS.helpers.animations.godot.reader.VizLog(path, mmap=True)[source]

Bases: object

Read an adcs-vizlog directory.

Channels are memory-mapped by default, so opening a large log is cheap and only the columns that are accessed are paged in.

If a run was not completed (the writer crashed or is still appending), the number of usable rows is the smallest number of whole rows present across all of the run’s channel files.

Parameters:
  • path (str | Path) – vizlog directory.

  • mmap (bool) – Memory-map channel files (read-only) instead of loading them.

Raises:

ValueError – If the directory is not a vizlog of a supported version.

classmethod open(path, mmap=True)[source]
Parameters:
  • path (str | Path)

  • mmap (bool)

Return type:

VizLog

is_complete(run_id)[source]
Parameters:

run_id (int | str)

Return type:

bool

n_rows(run_id)[source]

Number of whole rows available in a run.

Parameters:

run_id (int | str)

Return type:

int

read(run_id, name)[source]

One channel of one run.

Returns:

Array of shape (n_rows, width) (read-only when memory-mapped).

Parameters:
  • run_id (int | str)

  • name (str)

Return type:

ndarray

property epoch_jd_tt: float
property run_ids: List[str]