Skip to content

Commit

Permalink
Define ptcDataset class as part of ip_isr
Browse files Browse the repository at this point in the history
  • Loading branch information
plazas committed Oct 1, 2020
1 parent 52f85ee commit 7d08160
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 473 deletions.
4 changes: 2 additions & 2 deletions python/lsst/cp/pipe/astierCovPtcFit.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import numpy as np
import copy
import itertools
from scipy.stats import median_absolute_deviation as mad
from scipy.stats import median_abs_deviation as mad
from scipy.signal import fftconvolve
from scipy.optimize import leastsq
from .astierCovFitParameters import FitParameters
Expand Down Expand Up @@ -594,7 +594,7 @@ def fitFullModel(self, pInit=None, nSigma=5.0, maxFitIter=3):
params, paramsCov, _, mesg, ierr = leastsq(self.weightedRes, pInit, full_output=True)
wres = self.weightedRes(params)
# Do not count the outliers as significant
sig = mad(wres[wres != 0])
sig = mad(wres[wres != 0], scale='normal')
mask = (np.abs(wres) > (nSigma*sig))
self.sqrtW.flat[mask] = 0 # flatten makes a copy
nOutliers = mask.sum()
Expand Down

0 comments on commit 7d08160

Please sign in to comment.