Skip to content

Commit

Permalink
Minor notebook bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jadball committed Dec 13, 2024
1 parent 6ee83cf commit bfcd7d2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 20 deletions.
4 changes: 2 additions & 2 deletions ImageD11/nbGui/S3DXRD/4_visualise.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -290,10 +290,10 @@
},
"outputs": [],
"source": [
"# look at unit cells\n",
"# look at unit cells - mean of a, b, c for cubic for now\n",
"\n",
"fig, ax = plt.subplots()\n",
"ax.hist(tmap.unitcell[0, :, :, :3].ravel(), bins=1000)\n",
"ax.hist(tmap.unitcell[0, :, :, :3].mean(axis=-1).ravel(), bins=1000)\n",
"ax.set_xlabel('unitcell of pixel')\n",
"plt.show()"
]
Expand Down
5 changes: 5 additions & 0 deletions ImageD11/nbGui/S3DXRD/tomo_3_refinement_minor_phase.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,11 @@
"\n",
" refine = PBPRefine(dset=ds, y0=y0, fpks=fpks, hkl_tol_origins=hkl_tol_origins, hkl_tol_refine=hkl_tol_refine, hkl_tol_refine_merged=hkl_tol_refine_merged, ds_tol=ds_tol, ifrac=ifrac, phase_name=minor_phase_str, forref=forref)\n",
" \n",
" refine.own_filename = os.path.splitext(refine.own_filename)[0] + f'_{phase_str}.h5'\n",
" refine.icolf_filename = os.path.splitext(refine.icolf_filename)[0] + f'_{phase_str}.h5'\n",
" refine.pbpmap_filename = os.path.splitext(refine.pbpmap_filename)[0] + f'_{phase_str}.h5'\n",
" refine.refinedmap_filename = os.path.splitext(refine.refinedmap_filename)[0] + f'_{phase_str}.h5'\n",
" \n",
" refine.setmap(pmap)\n",
" refine.setpeaks(cf_2d)\n",
" refine.mask = pmap.best_npks > 0\n",
Expand Down
21 changes: 3 additions & 18 deletions ImageD11/nbGui/calibration/silicon_calib.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
"import ImageD11.columnfile\n",
"import ImageD11.indexing\n",
"import ImageD11.grain\n",
"import ImageD11.nbGui.fit_geometry"
"import ImageD11.nbGui.fit_geometry\n",
"import silx.io"
]
},
{
Expand Down Expand Up @@ -154,7 +155,7 @@
"source": [
"# guess the detector distance in um\n",
"# you can also manually specify\n",
"distance_guess = auto_guess_distance(ds.masterfile, ds.scans[-1]) # detector distance in um\n",
"distance_guess = auto_guess_distance(dset.masterfile, dset.scans[-1]) # detector distance in um\n",
"# distance_guess = 140000 # 140 mm"
]
},
Expand Down Expand Up @@ -220,22 +221,6 @@
"ui.fitGui()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"ui.valuewidgets['fit_tolerance'].value = 0.5\n",
"ui.fit(2,9)\n",
"ui.valuewidgets['fit_tolerance'].value = 0.05\n",
"ui.fit(3,21)\n",
"ui.fit(0,180)\n",
"ui.updateGui()"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down

0 comments on commit bfcd7d2

Please sign in to comment.