read_period

HIRSKLM.read_period(start=None, end=None, onerror='skip', fields='all', pseudo_fields=None, sorted=True, locator_args=None, reader_args=None, limits=None, simple_filters=(), orbit_filters=None, enforce_no_duplicates=True, excs=(<class 'typhon.datasets.dataset.DataFileError'>, <class 'typhon.datasets.filters.FilterError'>))

Read all granules between start and end, in bulk.

Parameters:
  • start (datetime.datetime) – Start Starting datetime. When omitted, start at complete beginning of dataset.

  • end (datetime.datetime) – End End datetime. When omitted, continue to end of dataset. Last granule will start before this datetime, but contents may continue beyond it. Can also be a datetime.timedelta, which will then be interpreted as a length after start.

  • onerror (str) – What to do on errors When reading many files, some files may have problems. If onerror is set to “skip”, files with errors are skipped and reading continues with the next file. This is the default behaviour. If onerror is set to “raise”, the method will reraise the original exception as soon as a problem occurs.

  • fields (Iterable[str] or str) – What fields to return What fields to read from dataset. Either a collection of strings corresponding to fields to read, or the str “all” (default), which means read all fields.

  • pseudo_fields (Mapping[str, function]) – See documentation for self.read.

  • sorted (bool) – Should the granules be read in sorted order? Defaults to true. NB: does not currently guarantee that the actual results are sorted; this is up to the individual reading routines!

  • locator_args (dict) – Extra keyword arguments passed on to granule finding routines.

  • reader_args (dict) – Extra keyword arguments to be passed on to reading routine. Since these differ per type, those are probably documented in the class docstring.

  • limits (dict) – Limitations to apply to each granule. For the exact format, see :func:typhon.math.array.limit_ndarray.

  • simple_filters (container/iterable) – collection of functions to be applied for filtering. Must take ndarray input, must give ndarray output. For more advanced filtering, pass instances of implementations of filters.OrbitFilter to orbit_filters.

  • orbit_filters (Sequence[filters.OrbitFilter]) – more advanced filters to apply for each orbit or after all orbits. Those are instances of filters.OrbitFilter and thus have state, which can be useful for e.g. overlap checking. For each of those, the system will call .reset() before the first orbit is read, .filter(…) after each orbit, and .finalise() at the end.

  • enforce_no_duplicates

  • excs (Sequence[Exception]) – what exceptions to try and catch after every read. Use with onorrer.

Returns:

Masked array containing all data in period. Invalid data may or may not be masked, depending on the behaviour of the reading routine implemented by the subclass.