ESRFPath_esrf_v2#

class esrf_pathlib.ESRFPath_esrf_v2(*args, **kwargs)#

Bases: Path

ESRF Data Policy v2

Introduced with BLISS 1.10.1 for beamline data on Dec 16, 2022.

Path hierarchy:

{data_root}/{proposal}/{beamline}/{session_date}/{data_type}/   [TID]
  ├── {data_type=raw}/                                          [BLISS]
  │     ├── {proposal}_{beamline}.h5
  │     ├── {collection}/
  │     │     ├── {proposal}_{collection}.h5
  │     |     └── {dataset}/
  │     |           └── {collection}_{dataset}.h5
  |     └── __icat__/
  |          └── {collection}_{dataset}.xml
  ├── {data_type=processed}/                                    [esrf-pathlib]
  │     ├── {proposal}_{beamline}.h5
  │     └── {collection}/
  │           ├── {proposal}_{collection}.h5
  │           └── {dataset}/
  │                 └── {collection}_{dataset}.h5
  └── {data_type=_nobackup}/                                    [esrf-pathlib]
        ├── {proposal}_{beamline}.h5
        └── {collection}/
              ├── {proposal}_{collection}.h5
              └── {dataset}/
                    └── {collection}_{dataset}.h5

Derive a class from ESRFPath to restrict path matching, parsing and rendering to this schema:

from esrf_pathlib import ESRFPath

class EsrfPath(ESRFPath, esrf=2, fallback_depth=0):
    pass
property beamline: str#

Beamline name.

Examples: 'id21', 'id23eh1', 'id30a1'

property beamline_normalized: str#

Normalized beamline name for the Data Portal.

Examples: 'id21', 'id23-1', 'id30a-1'

property collection: str#

Collection of datasets.

property data_root: str#

Root directory.

property data_type: DataType#

Data type.

Enumeration: 'raw', 'processed', '_nobackup'

property dataset: str#

Dataset name (smallest entity in the data portal).

property nobackup_collection_file: str#

Filesystem path template

{data_root}/{proposal}/{beamline}/{session_date}/{data_type=_nobackup}/{collection}/{proposal}_{collection}.h5

property nobackup_collection_path: str#

Filesystem path template

{data_root}/{proposal}/{beamline}/{session_date}/{data_type=_nobackup}/{collection}[/{unknown_part}]

property nobackup_dataset_file: str#

Filesystem path template

{data_root}/{proposal}/{beamline}/{session_date}/{data_type=_nobackup}/{collection}/{collection}_{dataset}/{collection}_{dataset}.h5

property nobackup_dataset_path: str#

Filesystem path template

{data_root}/{proposal}/{beamline}/{session_date}/{data_type=_nobackup}/{collection}/{collection}_{dataset}[/{unknown_part}]

Filesystem path template

{data_root}/{proposal}/{beamline}/{session_date}/{data_type=_nobackup}/{collection}/{collection}_{dataset}/gallery[/{unknown_part}]

property nobackup_path: str#

Filesystem path template

{data_root}/{proposal}/{beamline}/{session_date}/{data_type=_nobackup}[/{unknown_part}]

property nobackup_proposal_file: str#

Filesystem path template

{data_root}/{proposal}/{beamline}/{session_date}/{data_type=_nobackup}/{proposal}_{beamline}.h5

property processed_collection_file: str#

Filesystem path template

{data_root}/{proposal}/{beamline}/{session_date}/{data_type=processed}/{collection}/{proposal}_{collection}.h5

property processed_collection_path: str#

Filesystem path template

{data_root}/{proposal}/{beamline}/{session_date}/{data_type=processed}/{collection}[/{unknown_part}]

property processed_data_path: str#

Filesystem path template

{data_root}/{proposal}/{beamline}/{session_date}/{data_type=processed}[/{unknown_part}]

property processed_dataset_file: str#

Filesystem path template

{data_root}/{proposal}/{beamline}/{session_date}/{data_type=processed}/{collection}/{collection}_{dataset}/{collection}_{dataset}.h5

property processed_dataset_path: str#

Filesystem path template

{data_root}/{proposal}/{beamline}/{session_date}/{data_type=processed}/{collection}/{collection}_{dataset}[/{unknown_part}]

Filesystem path template

{data_root}/{proposal}/{beamline}/{session_date}/{data_type=processed}/{collection}/{collection}_{dataset}/gallery[/{unknown_part}]

property processed_proposal_file: str#

Filesystem path template

{data_root}/{proposal}/{beamline}/{session_date}/{data_type=processed}/{proposal}_{beamline}.h5

property proposal: str#

ESRF proposal name.

Examples: 'ma1234', 'blc1234'

property raw_collection_file: str#

Filesystem path template

{data_root}/{proposal}/{beamline}/{session_date}/{data_type=raw}/{collection}/{proposal}_{collection}.h5

property raw_collection_path: str#

Filesystem path template

{data_root}/{proposal}/{beamline}/{session_date}/{data_type=raw}/{collection}[/{unknown_part}]

property raw_data_path: str#

Filesystem path template

{data_root}/{proposal}/{beamline}/{session_date}/{data_type=raw}[/{unknown_part}]

property raw_dataset_file: str#

Filesystem path template

{data_root}/{proposal}/{beamline}/{session_date}/{data_type=raw}/{collection}/{collection}_{dataset}/{collection}_{dataset}.h5

property raw_dataset_path: str#

Filesystem path template

{data_root}/{proposal}/{beamline}/{session_date}/{data_type=raw}/{collection}/{collection}_{dataset}[/{unknown_part}]

Filesystem path template

{data_root}/{proposal}/{beamline}/{session_date}/{data_type=raw}/{collection}/{collection}_{dataset}/gallery[/{unknown_part}]

property raw_metadata_file: str#

Filesystem path template

{data_root}/{proposal}/{beamline}/{session_date}/{data_type=raw}/__icat__/{collection}_{dataset}.xml

property raw_metadata_path: str#

Filesystem path template

{data_root}/{proposal}/{beamline}/{session_date}/{data_type=raw}/__icat__[/{unknown_part}]

property raw_proposal_file: str#

Filesystem path template

{data_root}/{proposal}/{beamline}/{session_date}/{data_type=raw}/{proposal}_{beamline}.h5

property session_date: date#

Start date of the experimental session (YYYYMMDD).

property session_path: str#

Filesystem path template

{data_root}/{proposal}/{beamline}/{session_date}[/{unknown_part}]

property unknown_part: str#

Unknown path or path segment (placeholder for unmapped directories or files).

property unknown_path: str#

Filesystem path template

{unknown_part}