calamari.catalog.summarise#

calamari.catalog.summarise(path, root=None, *, group_fn=None)#

Build a one-row inventory summary dict for a single measurement file.

Parameters:
  • path (Path | str) – Path to the measurement file to summarise.

  • root (Path | str | None) – Root directory used to compute relative_path (and, if group_fn is given, the value passed to it). Defaults to path’s parent if not given.

  • group_fn (Callable[[Path], str] | None) – A function mapping the file’s path relative to root (or the absolute path, if path is not under root) to a group label string. If not given, no 'group' key is included in the returned dict at all – this is the standalone-call default; build_catalog() always supplies one (see there) so that its output DataFrame is consistently groupable/sortable.

Return type:

dict

Returns:

dict – Summary row with keys: relative_path, group (only if group_fn was given), filename, data_format, measurement_type, file_role, sample_name, sample_mass_mg, date, n_points, n_measurements, T_min, T_max, H_min_Oe, H_max_Oe, H_min_T, H_max_T, ac_frequencies_Hz, scan_kind, comment.

Raises: