diff --git a/xrdpattern/pattern/db.py b/xrdpattern/pattern/db.py index 1b7c76f..9bed5fb 100644 --- a/xrdpattern/pattern/db.py +++ b/xrdpattern/pattern/db.py @@ -127,7 +127,7 @@ def show_all(self, single_plot : bool = False, limit_patterns : int = 100, title data = [p.get_pattern_data() for p in patterns] fig, ax = plt.subplots(dpi=600) for x, y in data: - ax.plot(x, y, linewidth=0.25, alpha=0.75) + ax.plot(x, y, linewidth=0.25, alpha=0.75, linestyle='--') ax.set_xlabel(r'$2\theta$ [$^\circ$]') ax.set_ylabel('Standardized relative intensity (a.u.)') diff --git a/xrdpattern/pattern/pattern.py b/xrdpattern/pattern/pattern.py index b7b1b88..a6dcb6f 100644 --- a/xrdpattern/pattern/pattern.py +++ b/xrdpattern/pattern/pattern.py @@ -61,13 +61,16 @@ def _get_uniform(self, start_val : float, stop_val : float, num_entries : int, c x = np.array(self.two_theta_values) y = np.array(self.intensities) x, y = self.to_strictly_increasing(x, y) - y -= np.min(y) cs = CubicSpline(x, y) std_intensities = cs(std_angles) below_start_indices = np.where(std_angles < start)[0] above_end_indices = np.where(std_angles > end)[0] + indices_in_range = np.where((std_angles >= start) & (std_angles <= end))[0] + range_min = np.min(std_intensities[indices_in_range]) + std_intensities -= range_min + if constant_padding: below_start, after_end = y[0], y[-1] else: