Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-39716: Fix compilation for rubin-env 7.0.0 #39

Merged
merged 2 commits into from
Jun 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion spectractor/extractor/background.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ def extract_spectrogram_background_sextractor(data, err, ws=(20, 30), mask_signa
ax0.set_ylabel(parameters.PLOT_YLABEL)
ax0.set_xticks([])
ax1.set_xticks([])
bkg.plot_meshes(outlines=True, color='red', axes=ax1, linewidth=0.5)
bkg.plot_meshes(outlines=True, color='red', ax=ax1, linewidth=0.5)
b = bkg.background
im = ax1.imshow(b, origin='lower', aspect="auto")
ax1.set_xlabel(parameters.PLOT_XLABEL)
Expand Down
4 changes: 2 additions & 2 deletions spectractor/fit/statistics.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def fill(self, pdf):
return pdf

def fill_histogram(self, data, weights=None):
self.grid = np.histogram(data, bins=self.axe.bins, normed=False, weights=weights)[0]
self.grid = np.histogram(data, bins=self.axe.bins, weights=weights)[0]
self.normalize()

def plot(self, truth=None):
Expand Down Expand Up @@ -242,7 +242,7 @@ def __init__(self, list0, list1, labels, axisnames):
self.rho = 0

def fill_histogram(self, data1, data2, weights=None):
self.grid = (np.histogram2d(data1, data2, bins=[list(self.axes[1].bins), list(self.axes[0].bins)], normed=False,
self.grid = (np.histogram2d(data1, data2, bins=[list(self.axes[1].bins), list(self.axes[0].bins)],
weights=weights)[0]).T
self.normalize()

Expand Down