Skip to content

Commit

Permalink
Merge pull request #421 from OpenCOMPES/update-hextof-tutorial
Browse files Browse the repository at this point in the history
Update hextof tutorial notebook
  • Loading branch information
zain-sohail authored Jul 8, 2024
2 parents ff56953 + 30bd0f2 commit 7028a10
Showing 1 changed file with 22 additions and 8 deletions.
30 changes: 22 additions & 8 deletions tutorial/4_hextof_workflow.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,16 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### Download and unpack data"
"### Get data paths"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The paths are such that if you are on Maxwell, it uses those. Otherwise data is downloaded in current directory from Zenodo.\n",
"\n",
"Generally, if it is your beamtime, you can both read the raw data and write to processed directory. However, for the public data, you can not write to processed directory."
]
},
{
Expand All @@ -56,10 +65,15 @@
"metadata": {},
"outputs": [],
"source": [
"# 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",
"print(path)"
"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",
" 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",
" buffer_path = path + \"/processed/\""
]
},
{
Expand Down Expand Up @@ -767,7 +781,7 @@
" constant=-1463.7, # this is time zero\n",
" flip_delay_axis=True, # invert the direction of the delay axis\n",
" columns=['bam'], # use the bam to offset the values\n",
" weights=[0.001], # bam is in fs, delay in ps\n",
" weights=[-0.001], # bam is in fs, delay in ps\n",
" preserve_mean=True # preserve the mean of the delay axis\n",
")"
]
Expand Down Expand Up @@ -968,7 +982,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "python3",
"display_name": "Python 3.9",
"language": "python",
"name": "python3"
},
Expand All @@ -986,5 +1000,5 @@
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}

0 comments on commit 7028a10

Please sign in to comment.