Skip to content

Commit

Permalink
add zarrs path to an NSLSII proposal folder
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewjlevin committed Sep 5, 2024
1 parent d6f8da6 commit c83436a
Showing 1 changed file with 7 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,26 +50,6 @@
"print(f'Using PyHyperScattering Version: {phs.__version__}')"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "5ebcfdba-3989-4fcb-8e66-c241a321827e",
"metadata": {},
"outputs": [],
"source": [
"%load_ext autoreload"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "0fa625ad-1430-4286-ac94-a02a0e5d218e",
"metadata": {},
"outputs": [],
"source": [
"%autoreload"
]
},
{
"cell_type": "markdown",
"id": "96adcc47-a83c-4c87-a74b-f87496d0f753",
Expand All @@ -87,14 +67,15 @@
},
"outputs": [],
"source": [
"basePath = pathlib.Path.cwd()"
"notebookPath = pathlib.Path.cwd() \n",
"zarrsPath = notebookPath # use this if the example data is in the same folder as this notebook\n",
"# zarrsPath = pathlib.Path('/nsls2/data/sst/proposals/2024-2/pass-313412/rsoxs_hackathon_2024_data') # use this if working in the NSLS2 Jupyterhub to access zarrs"
]
},
{
"cell_type": "markdown",
"id": "8",
"metadata": {
"jp-MarkdownHeadingCollapsed": true,
"tags": []
},
"source": [
Expand All @@ -110,7 +91,7 @@
},
"outputs": [],
"source": [
"[f.name for f in basePath.glob('*zarr')]"
"[f.name for f in zarrsPath.glob('*zarr')]"
]
},
{
Expand All @@ -122,7 +103,7 @@
},
"outputs": [],
"source": [
"DS = xr.open_zarr(basePath.joinpath('cartesian_data_PM6_CF.zarr'))\n",
"DS = xr.open_zarr(zarrsPath.joinpath('cartesian_data_PM6_CF.zarr'))\n",
"\n",
"# Compute any dask coordiantes\n",
"for coord_name, coord_data in DS.coords.items():\n",
Expand Down Expand Up @@ -205,7 +186,7 @@
},
"outputs": [],
"source": [
"[f.name for f in basePath.glob('*zarr')]"
"[f.name for f in zarrsPath.glob('*zarr')]"
]
},
{
Expand All @@ -217,7 +198,7 @@
},
"outputs": [],
"source": [
"DS = xr.open_zarr(basePath.joinpath('polar_data_PM6_CF.zarr'))\n",
"DS = xr.open_zarr(zarrsPath.joinpath('polar_data_PM6_CF.zarr'))\n",
"\n",
"# Compute any dask coordiantes\n",
"for coord_name, coord_data in DS.coords.items():\n",
Expand Down

0 comments on commit c83436a

Please sign in to comment.