Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
gduscher committed Oct 30, 2024
1 parent 33ab61d commit fdf71ce
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
4 changes: 2 additions & 2 deletions notebooks/Spectroscopy/Analyse_Low_Loss.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@
},
{
"cell_type": "code",
"execution_count": 132,
"execution_count": 134,
"metadata": {
"ExecuteTime": {
"end_time": "2024-09-25T17:48:50.060660Z",
Expand All @@ -202,7 +202,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "7f15f7b42bb3420e819b5ee5461129e9",
"model_id": "a6934348fd004df1872df28eaa34bf31",
"version_major": 2,
"version_minor": 0
},
Expand Down
9 changes: 1 addition & 8 deletions pyTEMlib/low_loss_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,28 +174,21 @@ def _update(self, ev=0):
self.parent.axis.plot(self.parent.energy_scale,
spectrum - resolution_function - plasmon, label='difference')

self.parent.axis.legend()
else:

else:
if self.low_loss_tab[4, 0].value :
if 'resolution_function' in self.parent.datasets:

resolution_function = self.get_additional_spectrum('resolution_function')
self.parent.axis.plot(self.parent.energy_scale, resolution_function, label='resolution function')
self.parent.axis.plot(self.parent.energy_scale,
spectrum - resolution_function, label='difference')

self.parent.axis.legend()

if self.low_loss_tab[8, 0].value:
if 'plasmon' in self.parent.datasets:

plasmon = self.get_additional_spectrum('plasmon')
self.parent.axis.plot(self.parent.energy_scale, plasmon, label='plasmon')
self.parent.axis.plot(self.parent.energy_scale,
spectrum - plasmon, label='difference')

self.parent.axis.legend()
if self.low_loss_tab[8, 2].value:
if 'plasmon' in self.parent.datasets:
if 'plasmon' in self.parent.datasets['plasmon'].metadata:
Expand Down

0 comments on commit fdf71ce

Please sign in to comment.