uvex_transients.phase_space.files#

The files of a recovery map: where they are, which format a points file is in, and what its header records.

A map is a directory of files (see PHASE_SPACE_FILES). This module knows that layout and nothing else about a map: it reads and writes no experiment, so it imports neither the samplers nor scikit-learn, and a command that only inspects files (describe(), find_maps()) stays cheap.

The points file comes in two formats, the current one (SCHEMA_VERSION, which records a registered sampler kind and its settings) and the earlier canonical one, which recorded an evaluator. flavor() tells them apart and upgrade_legacy_header() turns the header of the earlier one into the current one, so that the files of a published release can still be read.

Attributes

SCHEMA_VERSION

The version of the points file that Experiment.save writes.

LEGACY

The two formats of a points file.

CURRENT

The two formats of a points file.

Functions

describe(directory)

Describe a map from the header of its points file.

find_maps(paths)

Resolve the paths a command was given to the directories of maps.

flavor(meta)

Return the format of a points file from its header.

map_paths(directory)

Return the file paths of a map directory.

read_table(path, what)

Read an ECSV file of a map.

upgrade_legacy_header(meta)

Turn the header of the earlier points format into that of the current one.

Classes

MapInfo(directory, flavor, kind, space, ...)

What the points file of a map records, and which of its files are there.