LSSTApplications  10.0-2-g4f67435,11.0.rc2+1,11.0.rc2+12,11.0.rc2+3,11.0.rc2+4,11.0.rc2+5,11.0.rc2+6,11.0.rc2+7,11.0.rc2+8
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 325 of file fringe.py.

326 def measure(mi, x, y, size, statistic, stats):
327  """Measure a statistic within an aperture
328 
329  @param mi MaskedImage to measure
330  @param x, y Center for aperture
331  @param size Size of aperture
332  @param statistic Statistic to measure
333  @param stats StatisticsControl object
334  @return Value of statistic within aperture
335  """
336  bbox = afwGeom.Box2I(afwGeom.Point2I(int(x) - size, int(y - size)), afwGeom.Extent2I(2*size, 2*size))
337  subImage = mi.Factory(mi, bbox, afwImage.LOCAL)
338  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:1082
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 339 of file fringe.py.

340 def stdev(vector):
341  """Calculate a robust standard deviation of an array of values
342 
343  @param vector Array of values
344  @return Standard deviation
345  """
346  num = len(vector)
347  vector = vector.copy()
348  vector.sort()
349  return 0.74 * (vector[int(0.75 * num)] - vector[int(0.25 * num)])
350