ITL submodule

ITL submodule#

ITL reader module.

majis.itl.reader.read_itl(fname: str | Path, refs: dict | str | list | None = None, flat: bool = False) EventsDict | list[source]

Read ITL file.

Note

  • The blocks can be prefixed with additional instrument parameters.

  • Blocks must be continuous, ie. consecutive OBS_START and OBS_END lines should have the same instrument observation name. If not an ValueError will be raised

MAJIS ITL timeline sub-module.

majis.itl.timeline.ChangeLog

alias of Log

class majis.itl.timeline.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.

class majis.itl.timeline.TimelineChangeLog(template: Workbook, sheet_name='change log')[source]

MAJIS timeline change log.

read_changelog(rows: list) -> (<class 'list'>, <class 'list'>)[source]

Read changelog changes grouped by version, date and author.

ITL export module.

majis.itl.export.save_csv(fout: str | Path | None, *events: EventsList | EventsDict, ref: str | None = None, sep: str = ';', overlap: bool = False) Path[source]#

Save ITL events to CSV.

Note

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

majis.itl.export.save_itl(fout: str | Path | None, *events: EventsList | EventsDict, ref: str | None = None, header: str | None = None, overlap: bool = False) 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.itl.export.save_xlsm(fout: str | Path | None, *events: EventsList | EventsDict, timeline: str | Path | None = None, ca_ref: str | dict | None = None, overlap: bool = False) Path[source]#

Save ITL events to XLSM timeline.

If a timeline is provided but no explicit output file the output file will be same in the original timeline.

ITL CLI module.

majis.itl.cli.cli(argv: list | None = None)[source]#

ITL command line interface.