Skip to content

Commit

Permalink
Merge pull request #136 from lsst-camera-dh/LSSTTD-1569_row_means_var…
Browse files Browse the repository at this point in the history
…iance_makeStatistics_bug

set data type of row_means array to np.float64
  • Loading branch information
jchiang87 authored Jul 30, 2021
2 parents afd2585 + 6736dff commit c649438
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/lsst/eotest/sensor/flatPairTask.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def row_mean_variance(flat1, flat2, amp, nsig=10):
mi_diff = afwImage.MaskedImageF(flat1.unbiased_and_trimmed_image(amp),
deep=True)
mi_diff -= flat2.unbiased_and_trimmed_image(amp)
row_means = np.mean(mi_diff.getImage().array, axis=1)
row_means = np.mean(mi_diff.getImage().array, axis=1, dtype=np.float64)
sctrl = afwMath.StatisticsControl()
sctrl.setNumSigmaClip(nsig)
return afwMath.makeStatistics(row_means, afwMath.VARIANCECLIP,
Expand Down Expand Up @@ -214,7 +214,7 @@ def _create_detresp_fits_output(self, nrows, infile):
namps = len(all_amps)
units = (['None'] + 3*namps*['e-'] + namps*['e-^2']
+ ['None', 'None', 'None'])
columns = [np.zeros(nrows, dtype=np.float) for fmt in formats[:-1]]
columns = [np.zeros(nrows, dtype=np.float64) for fmt in formats[:-1]]
columns.append(nrows*[''])
fits_cols = [fits.Column(name=colnames[i], format=formats[i],
unit=units[i], array=columns[i])
Expand Down

0 comments on commit c649438

Please sign in to comment.