Skip to content

Commit

Permalink
add meta_path
Browse files Browse the repository at this point in the history
  • Loading branch information
rettigl committed Nov 11, 2024
1 parent 494c41e commit fc818a3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tutorial/4_hextof_workflow.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
},
"outputs": [],
"source": [
"%load_ext autoreload\n",
"%autoreload 2\n",
"from typing import List\n",
"from pathlib import Path\n",
"import os\n",
Expand Down Expand Up @@ -68,11 +70,13 @@
"beamtime_dir = \"/asap3/flash/gpfs/pg2/2023/data/11019101\" # on Maxwell\n",
"if os.path.exists(beamtime_dir) and os.access(beamtime_dir, os.R_OK):\n",
" path = beamtime_dir + \"/raw/hdf/offline/fl1user3\"\n",
" meta_path = beamtime_dir + \"/shared\"\n",
" buffer_path = \"Gd_W110/processed/\"\n",
"else:\n",
" # data_path can be defined and used to store the data in a specific location\n",
" dataset.get(\"Gd_W110\") # Put in Path to a storage of at least 10 GByte free space.\n",
" path = dataset.dir\n",
" meta_path = path\n",
" buffer_path = path + \"/processed/\""
]
},
Expand Down Expand Up @@ -167,7 +171,7 @@
"metadata": {},
"outputs": [],
"source": [
"sp = SedProcessor(runs=[44762], config=config_override, system_config=config_file, collect_metadata=False, force_recreate=True)\n",
"sp = SedProcessor(runs=[44762], config=config_override, system_config=config_file, collect_metadata=False)\n",
"# You can set collect_metadata=True if the scicat_url and scicat_token are defined"
]
},
Expand Down Expand Up @@ -871,7 +875,7 @@
"source": [
"from sed.core.config import load_config\n",
"import numpy as np\n",
"metadata = load_config(path + \"/44824_20230324T060430.json\")\n",
"metadata = load_config(meta_path + \"/44824_20230324T060430.json\")\n",
"\n",
"# Fix metadata\n",
"metadata[\"scientificMetadata\"][\"Laser\"][\"wavelength\"][\"value\"] = float(metadata[\"scientificMetadata\"][\"Laser\"][\"wavelength\"][\"value\"][:-2])\n",
Expand Down

0 comments on commit fc818a3

Please sign in to comment.