MAJIS module#

MAJIS operations toolbox

class majis.Timeline(observations: str | Path | EventsList | EventsDict | None = None, timeline: str | Path | None = None, ca_ref: str | dict | None = None, refs: dict | str | list | None = None)[source]#

MAJIS timeline from template.

You can either append an existing timeline template or use the default one.

Warning

Some extensions (Data Validation) are not included into the exported file. This is a openpyxl limitation.

append(observations: str | Path | EventsList | EventsDict, refs: dict | str | list | None = None) None[source]#

Append ITL observations blocks.

property ca_ref: datetime#

C/A reference for relative time.

property header#

Timeline header size.

save(fout: str | Path | None = None) Path[source]#

Save MAJIS timeline.

property science: TimelineChangeLog#

Science change log.

Raises:

ValueError: – Only available for template â‰Ĩ 2.0

property version#

Template version from changelog.

majis.read_itl(fname: str | Path, refs: dict | str | list | None = None, flat: bool = False, only: str | list | bool | None = 'MAJIS', validation: bool = True) EventsDict | EventsList[source]#

Read any ITL file.

Both, EPS/text (.itl or .txt) or JSON (.json) format are supported.

In the case of EPS format, relative datetime input is supported with references value(s) or file (.evf).

The result can be return as a nested dict of events (default) or as a flat list of events.

By default only the MAJIS events will be reported. This can be changed by providing an other instrument filter key, a list of keys or an explicit 'ALL', False or None value. Applicable only to JSON ITL.

majis.read_opl(fname: str | Path, flat: bool = False, only: str | list | bool | None = 'MAJIS', validation: bool = True) EventsDict | EventsList[source]#

Read OPL file.

Both, CSV (.csv) and JSON (.json) format are supported.

The result can be return as a nested dict of events (default) or as a flat list of events.

By default only the MAJIS events will be reported. This can be changed by providing an other instrument filter key, a list of keys or an explicit 'ALL', False or None value. Applicable only to JSON OPL.

majis.save_itl(fout: str | Path | None, *events: EventsList | EventsDict, ref: str | dict | None = None, overlap: bool = False, **kwargs) Path[source]#

Save ITL events to a new ITL file.

Note

By default, ITL blocks must not overlap each other. This can be disable with overlap=True.

majis.save_opl(fout: str | Path | None, *events: EventsList | EventsDict, overlap: bool = False, **kwargs) Path[source]#

Save OPL events to a new OPL file.

Note

By default, OPL blocks must not overlap each other. This can be disable with overlap=True.