[scan_saving] date in base_path
At ID21 we want to group inhouse proposal per month so we have
scan_saving:
class: ESRFScanSaving
beamline: id21
inhouse_data_root: /data/{beamline}/inhouse/{date}
which currently (July 2020) gives this
SESSION_SXM [27]: SCAN_SAVING
Out [27]: Parameters (default) -
.date_format = '%y%b'
.date = '20Jul'
.beamline = 'id21'
.proposal_type = 'inhouse'
.base_path = '/data/id21/inhouse/20Jul'
This is a problem for ID21 inhouse proposals that cross months, because SCAN_SAVING.base_path
will change over night (literally).
So what is the solution? @matias.guijarro @pithan
-
Do not allow
inhouse_data_root
to contain any other template fields than{beamline}
. Or it's the beamline's responsibility to not put{date}
in there (or anything else that might change). But then how do we group proposals per month automatically? -
Raise an exception at the start of the scan saying:
Base directory has changed from ... to ... Start a new dataset or create a softlink to the proposal in the original base directory
. -
Create a softlink in the new
SCAN_SAVING.base_path
to the proposal directory in the oldSCAN_SAVING.base_path