From 9c20b41905fdc12e3e55f88a6454b486db7411a8 Mon Sep 17 00:00:00 2001 From: augustin_s Date: Fri, 27 Oct 2023 10:52:11 +0200 Subject: [PATCH] Update README.md --- README.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/README.md b/README.md index fc48d76..4c69a54 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,35 @@ # 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] {alvra,bernina,cristallina,diavolezza,maloja,furka}