Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update hextof tutorial notebook #421

Merged
merged 5 commits into from
Jul 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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",
rettigl marked this conversation as resolved.
Show resolved Hide resolved
" 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
}