create_science_filename

hermes_core.util.create_science_filename(instrument: str, time: str, level: str, version: str, mode: str = '', descriptor: str = '', test: bool = False)[source]

Return a compliant filename. The format is defined as

hermes_{inst}_{mode}_{level}{test}_{descriptor}_{time}_v{version}.cdf

This format is only appropriate for data level >= 1.

Parameters:
  • instrument (str) – The instrument name. Must be one of the following “eea”, “nemesis”, “merit”, “spani”

  • time (str (in isot format) or ~astropy.time) – The time

  • level (str) – The data level. Must be one of the following “l0”, “l1”, “l2”, “l3”, “l4”, “ql”

  • version (str) – The file version which must be given as X.Y.Z

  • descriptor (str) – An optional file descriptor.

  • mode (str) – An optional instrument mode.

  • test (bool) – Selects whether the file is a test file.

Returns:

filename (str) – A CDF file name including the given parameters that matches the HERMES file naming conventions

Raises:
  • ValueError – If the instrument is not recognized as one of the HERMES instruments:

  • ValueError – If the data level is not recognized as one of the HERMES valid data levels:

  • ValueError – If the data version does not match the HERMES data version formatting conventions:

  • ValueError – If the data product descriptor or instrument mode do not match the HERMES formatting conventions: