Skip to content

Commit

Permalink
Remove unpolarized probe from SA plot (#151)
Browse files Browse the repository at this point in the history
When Polarized and Unpolarized probes exist, Unpolarized probe is plotted in "SA" views as default view (log scale) such that the SA for polarized probes cannot be viewed. Removes this from the plot.
  • Loading branch information
purnimab authored Jun 28, 2022
1 parent 4f6c534 commit 817a6fd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions refl1d/probe.py
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ def oversample(self, n=20, seed=1):
Note: :meth:`oversample` will remove the extra Q calculation
points introduced by :meth:`critical_edge`.
"""

rng = numpy.random.RandomState(seed=seed)
T = rng.normal(self.T[:, None], self.dT[:, None], size=(len(self.dT), n-1))
L = rng.normal(self.L[:, None], self.dL[:, None], size=(len(self.dL), n-1))
Expand Down Expand Up @@ -743,8 +743,8 @@ def plot(self, view=None, **kwargs):
self.plot_residuals(**kwargs)
elif view == 'fft':
self.plot_fft(**kwargs)
elif view == 'SA': # SA uses default plot
self.plot(view=None, **kwargs)
elif view == 'SA': # SA does not plot since it does not exist
pass
else:
raise TypeError("incorrect reflectivity view '%s'"%view)

Expand Down Expand Up @@ -1767,7 +1767,7 @@ def _calculate_union(self):
self._set_calc(self.T, self.L)
else:
self._oversample(self.oversampling, self.oversampling_seed)

self._theta_offsets = theta_offsets

@property
Expand Down

0 comments on commit 817a6fd

Please sign in to comment.