LSSTApplications  8.0.0.0+107,8.0.0.1+13,9.1+18,9.2,master-g084aeec0a4,master-g0aced2eed8+6,master-g15627eb03c,master-g28afc54ef9,master-g3391ba5ea0,master-g3d0fb8ae5f,master-g4432ae2e89+36,master-g5c3c32f3ec+17,master-g60f1e072bb+1,master-g6a3ac32d1b,master-g76a88a4307+1,master-g7bce1f4e06+57,master-g8ff4092549+31,master-g98e65bf68e,master-ga6b77976b1+53,master-gae20e2b580+3,master-gb584cd3397+53,master-gc5448b162b+1,master-gc54cf9771d,master-gc69578ece6+1,master-gcbf758c456+22,master-gcec1da163f+63,master-gcf15f11bcc,master-gd167108223,master-gf44c96c709
LSSTDataManagementBasePackage
Classes | Functions
lsst.ip.isr.fringe Namespace Reference

Classes

class  FringeStatisticsConfig
 
class  FringeConfig
 
class  FringeTask
 

Functions

def getFrame
 
def measure
 
def stdev
 

Function Documentation

def lsst.ip.isr.fringe.getFrame ( )
Produce a new frame number each time

Definition at line 34 of file fringe.py.

34 
35 def getFrame():
36  """Produce a new frame number each time"""
37  getFrame.frame += 1
38  return getFrame.frame
39 getFrame.frame = 0
def lsst.ip.isr.fringe.measure (   mi,
  x,
  y,
  size,
  statistic,
  stats 
)
Measure a statistic within an aperture

@param mi          MaskedImage to measure
@param x, y        Center for aperture
@param size        Size of aperture
@param statistic   Statistic to measure
@param stats       StatisticsControl object
@return Value of statistic within aperture

Definition at line 279 of file fringe.py.

280 def measure(mi, x, y, size, statistic, stats):
281  """Measure a statistic within an aperture
282 
283  @param mi MaskedImage to measure
284  @param x, y Center for aperture
285  @param size Size of aperture
286  @param statistic Statistic to measure
287  @param stats StatisticsControl object
288  @return Value of statistic within aperture
289  """
290  bbox = afwGeom.Box2I(afwGeom.Point2I(int(x) - size, int(y - size)), afwGeom.Extent2I(2*size, 2*size))
291  subImage = mi.Factory(mi, bbox, afwImage.LOCAL)
292  return afwMath.makeStatistics(subImage, statistic, stats).getValue()
An integer coordinate rectangle.
Definition: Box.h:53
Statistics makeStatistics(afwImage::Mask< afwImage::MaskPixel > const &msk, int const flags, StatisticsControl const &sctrl)
Specialization to handle Masks.
Definition: Statistics.cc:1023
def lsst.ip.isr.fringe.stdev (   vector)
Calculate a robust standard deviation of an array of values

@param vector  Array of values
@return Standard deviation

Definition at line 293 of file fringe.py.

294 def stdev(vector):
295  """Calculate a robust standard deviation of an array of values
296 
297  @param vector Array of values
298  @return Standard deviation
299  """
300  num = len(vector)
301  vector = vector.copy()
302  vector.sort()
303  return 0.74 * (vector[int(0.75 * num)] - vector[int(0.25 * num)])
304