예제 #1
0
파일: fit1dcurve.py 프로젝트: obscode/snpy
   def maskresids(self, absclip=None, sigclip=None):
      '''Mask data outside a range of residuals.  
      
      Args:
         absclip (float):  mask out data with residuals > absclip
         sigclip (float):  mask out data with residuals > sigclip*sigma

      Returns:
         None

      Effects:
         self.mask is updated
      '''
      absdev = num.aboslute(self.residuals())
      if absclip is not None:
         self.mask *= num.greater(absdev, absclip)
         self.setup = False
      elif sigclip is not None:
         sigma = 1.49*num.median(absdev)
         self.mask *= num.greater(absdev, sigclip*sigma)
         self.setup = False
예제 #2
0
    def maskresids(self, absclip=None, sigclip=None):
        '''Mask data outside a range of residuals.  
      
      Args:
         absclip (float):  mask out data with residuals > absclip
         sigclip (float):  mask out data with residuals > sigclip*sigma

      Returns:
         None

      Effects:
         self.mask is updated
      '''
        absdev = num.aboslute(self.residuals())
        if absclip is not None:
            self.mask *= num.greater(absdev, absclip)
            self.setup = False
        elif sigclip is not None:
            sigma = 1.49 * num.median(absdev)
            self.mask *= num.greater(absdev, sigclip * sigma)
            self.setup = False