Update README.md

This commit is contained in:
2023-10-27 10:52:11 +02:00
parent af402c712c
commit 9c20b41905

View File

@ -1,5 +1,35 @@
# Unarchived Data Fix # Unarchived Data Fix
SwissFEL [scan](https://github.com/paulscherrerinstitute/sf_datafiles#scans) descriptions are JSON files containing references to absolut paths:
```json
$ cat /sf/instrument/data/p12345/raw/run0123-ImportantData/meta/scan.json
{
"scan_files": [
[
"/sf/instrument/data/p12345/raw/run0123-ImportantData/data/acq0001.PVDATA.h5",
"/sf/instrument/data/p12345/raw/run0123-ImportantData/data/acq0001.BSDATA.h5",
"/sf/instrument/data/p12345/raw/run0123-ImportantData/data/acq0001.CAMERAS.h5"
],
...
```
[Unarchived data](https://www.psi.ch/en/sls/tomcat/computing-infrastructure#retrieving-data-from-the-archive) arrives in `/sf/instrument/data/p12345/work/retrieve/`, and the paths in the JSON files need to be updated accordingly:
```json
$ cat /sf/instrument/data/p12345/work/retrieve/sf/instrument/data/p12345/raw/run0123-ImportantData/meta/scan_mod.json
{
"scan_files": [
[
"/sf/instrument/data/p12345/work/retrieve/sf/instrument/data/p12345/raw/run0123-ImportantData/data/acq0001.PVDATA.h5",
"/sf/instrument/data/p12345/work/retrieve/sf/instrument/data/p12345/raw/run0123-ImportantData/data/acq0001.BSDATA.h5",
"/sf/instrument/data/p12345/work/retrieve/sf/instrument/data/p12345/raw/run0123-ImportantData/data/acq0001.CAMERAS.h5"
],
...
```
`unarchived_data_fix` automates this update:
``` ```
usage: unarchived_data_fix.py [-h] [--no-dryrun] [--inplace] [--overwrite] usage: unarchived_data_fix.py [-h] [--no-dryrun] [--inplace] [--overwrite]
{alvra,bernina,cristallina,diavolezza,maloja,furka} {alvra,bernina,cristallina,diavolezza,maloja,furka}