Skip to content

Commit

Permalink
Forgot to also add to batch cells
Browse files Browse the repository at this point in the history
  • Loading branch information
jadball committed Mar 6, 2024
1 parent bb55dac commit ce7fcdb
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
10 changes: 10 additions & 0 deletions ImageD11/nbGui/S3DXRD/2_S3DXRD_sinograms_map.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1293,6 +1293,16 @@
" if \"slice_recon\" in hin.keys():\n",
" print(f\"Already reconstructed {dataset} in {sample}, skipping\")\n",
" continue\n",
" \n",
" if not hasattr(ds, \"ring_currents\"):\n",
" ring_currents = []\n",
" with h5py.File(ds.masterfile, \"r\") as h5in:\n",
" for scan in ds.scans:\n",
" ring_current = float(h5in[scan][\"instrument/machine/current\"][()])\n",
" ring_currents.append(ring_current)\n",
"\n",
" ds.ring_currents = np.array(ring_currents)\n",
" ds.ring_currents_scaled = np.array(ring_currents/np.max(ring_currents))\n",
" \n",
" cf_4d = ImageD11.columnfile.columnfile(ds.col4dfile)\n",
" cf_4d.parameters.loadparameters(par_path)\n",
Expand Down
11 changes: 11 additions & 0 deletions ImageD11/nbGui/S3DXRD/2_S3DXRD_sinograms_map_minor_phase.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1195,6 +1195,17 @@
" if \"slice_recon\" in hin.keys():\n",
" print(f\"Already reconstructed {dataset} in {sample}, skipping\")\n",
" continue\n",
" \n",
" \n",
" if not hasattr(ds, \"ring_currents\"):\n",
" ring_currents = []\n",
" with h5py.File(ds.masterfile, \"r\") as h5in:\n",
" for scan in ds.scans:\n",
" ring_current = float(h5in[scan][\"instrument/machine/current\"][()])\n",
" ring_currents.append(ring_current)\n",
"\n",
" ds.ring_currents = np.array(ring_currents)\n",
" ds.ring_currents_scaled = np.array(ring_currents/np.max(ring_currents))\n",
" \n",
" cf_4d = ImageD11.columnfile.columnfile(ds.col4dfile)\n",
" cf_4d.parameters.loadparameters(par_path)\n",
Expand Down

0 comments on commit ce7fcdb

Please sign in to comment.