Skip to content

Commit

Permalink
Merge pull request #1088 from OpenChemistry/notebook-updates
Browse files Browse the repository at this point in the history
Notebook updates
  • Loading branch information
cjh1 authored Apr 22, 2024
2 parents 0f3787a + d5545f4 commit 9587b85
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
4 changes: 1 addition & 3 deletions backend/faust/templates/vacuum_scan_prepare.ipynb.j2
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,7 @@
"fname, scan_num, scan_id = get_scan_path(distiller_path / Path('counted') / Path(date), scan_num, scan_id=scan_id, version=1)\n",
"\n",
"# Load the sparse data\n",
"vacuum_scan = stio.load_electron_counts(fname)\n",
"# Remove the flyback\n",
"vacuum_scan = vacuum_scan[:, :-1, :, :]\n",
"vacuum_scan = stio.load_electron_counts(fname, keep_flyback=False) # remove flyback\n",
"\n",
"print('File: {}'.format(fname))\n",
"print('Scan dimensions = {}'.format(vacuum_scan.scan_shape))\n",
Expand Down
9 changes: 3 additions & 6 deletions backend/faust/templates/vacuum_scan_subtract.ipynb.j2
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,7 @@
")\n",
"\n",
"# Load the data\n",
"experiment = stio.load_electron_counts(fname)\n",
"\n",
"# Remove the flyback\n",
"experiment = experiment[:,:-1,:,:]\n",
"experiment = stio.load_electron_counts(fname, keep_flyback=False) # remove flyback\n",
"\n",
"print('File: {}'.format(fname))\n",
"print('Scan dimensions = {}'.format(experiment.scan_shape))\n",
Expand Down Expand Up @@ -132,8 +129,8 @@
"if vacuum_haadf_path.exists():\n",
" with ncempy.io.dm.fileDM(vacuum_haadf_path) as f0:\n",
" vacuum_md = f0.getMetadata(0)\n",
" vacuum_camera_length = md['Microscope Info STEM Camera Length']\n",
" vacuum_stem_magnification = md['Microscope Info Indicated Magnification']\n",
" vacuum_camera_length = vacuum_md['Microscope Info STEM Camera Length']\n",
" vacuum_stem_magnification = vacuum_md['Microscope Info Indicated Magnification']\n",
" if vacuum_camera_length != camera_length:\n",
" print(f'Vacuum camera length = {camera_length} mm')\n",
" raise UserWarning('camera lengths do not match')\n",
Expand Down

0 comments on commit 9587b85

Please sign in to comment.