LSSTApplications  1.1.2+25,10.0+13,10.0+132,10.0+133,10.0+224,10.0+41,10.0+8,10.0-1-g0f53050+14,10.0-1-g4b7b172+19,10.0-1-g61a5bae+98,10.0-1-g7408a83+3,10.0-1-gc1e0f5a+19,10.0-1-gdb4482e+14,10.0-11-g3947115+2,10.0-12-g8719d8b+2,10.0-15-ga3f480f+1,10.0-2-g4f67435,10.0-2-gcb4bc6c+26,10.0-28-gf7f57a9+1,10.0-3-g1bbe32c+14,10.0-3-g5b46d21,10.0-4-g027f45f+5,10.0-4-g86f66b5+2,10.0-4-gc4fccf3+24,10.0-40-g4349866+2,10.0-5-g766159b,10.0-5-gca2295e+25,10.0-6-g462a451+1
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 287 of file fringe.py.

288 def measure(mi, x, y, size, statistic, stats):
289  """Measure a statistic within an aperture
290 
291  @param mi MaskedImage to measure
292  @param x, y Center for aperture
293  @param size Size of aperture
294  @param statistic Statistic to measure
295  @param stats StatisticsControl object
296  @return Value of statistic within aperture
297  """
298  bbox = afwGeom.Box2I(afwGeom.Point2I(int(x) - size, int(y - size)), afwGeom.Extent2I(2*size, 2*size))
299  subImage = mi.Factory(mi, bbox, afwImage.LOCAL)
300  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 301 of file fringe.py.

302 def stdev(vector):
303  """Calculate a robust standard deviation of an array of values
304 
305  @param vector Array of values
306  @return Standard deviation
307  """
308  num = len(vector)
309  vector = vector.copy()
310  vector.sort()
311  return 0.74 * (vector[int(0.75 * num)] - vector[int(0.25 * num)])
312