LSST Applications  21.0.0-147-g0e635eb1+1acddb5be5,22.0.0+052faf71bd,22.0.0+1ea9a8b2b2,22.0.0+6312710a6c,22.0.0+729191ecac,22.0.0+7589c3a021,22.0.0+9f079a9461,22.0.1-1-g7d6de66+b8044ec9de,22.0.1-1-g87000a6+536b1ee016,22.0.1-1-g8e32f31+6312710a6c,22.0.1-10-gd060f87+016f7cdc03,22.0.1-12-g9c3108e+df145f6f68,22.0.1-16-g314fa6d+c825727ab8,22.0.1-19-g93a5c75+d23f2fb6d8,22.0.1-19-gb93eaa13+aab3ef7709,22.0.1-2-g8ef0a89+b8044ec9de,22.0.1-2-g92698f7+9f079a9461,22.0.1-2-ga9b0f51+052faf71bd,22.0.1-2-gac51dbf+052faf71bd,22.0.1-2-gb66926d+6312710a6c,22.0.1-2-gcb770ba+09e3807989,22.0.1-20-g32debb5+b8044ec9de,22.0.1-23-gc2439a9a+fb0756638e,22.0.1-3-g496fd5d+09117f784f,22.0.1-3-g59f966b+1e6ba2c031,22.0.1-3-g849a1b8+f8b568069f,22.0.1-3-gaaec9c0+c5c846a8b1,22.0.1-32-g5ddfab5d3+60ce4897b0,22.0.1-4-g037fbe1+64e601228d,22.0.1-4-g8623105+b8044ec9de,22.0.1-5-g096abc9+d18c45d440,22.0.1-5-g15c806e+57f5c03693,22.0.1-7-gba73697+57f5c03693,master-g6e05de7fdc+c1283a92b8,master-g72cdda8301+729191ecac,w.2021.39
LSST Data Management Base Package
Classes | Functions
lsst.ip.isr.fringe Namespace Reference

Classes

class  FringeStatisticsConfig
 
class  FringeConfig
 
class  FringeTask
 

Functions

def getFrame ()
 
def measure (mi, x, y, size, statistic, stats)
 
def stdev (vector)
 
def select (vector, clip)
 

Function Documentation

◆ getFrame()

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

Definition at line 36 of file fringe.py.

36 def getFrame():
37  """Produce a new frame number each time"""
38  getFrame.frame += 1
39  return getFrame.frame
40 
41 
42 getFrame.frame = 0
43 
44 

◆ measure()

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 516 of file fringe.py.

516 def measure(mi, x, y, size, statistic, stats):
517  """Measure a statistic within an aperture
518 
519  @param mi MaskedImage to measure
520  @param x, y Center for aperture
521  @param size Size of aperture
522  @param statistic Statistic to measure
523  @param stats StatisticsControl object
524  @return Value of statistic within aperture
525  """
526  bbox = lsst.geom.Box2I(lsst.geom.Point2I(int(x) - size, int(y - size)),
527  lsst.geom.Extent2I(2*size, 2*size))
528  subImage = mi.Factory(mi, bbox, afwImage.LOCAL)
529  return afwMath.makeStatistics(subImage, statistic, stats).getValue()
530 
531 
An integer coordinate rectangle.
Definition: Box.h:55
Statistics makeStatistics(lsst::afw::image::Image< Pixel > const &img, lsst::afw::image::Mask< image::MaskPixel > const &msk, int const flags, StatisticsControl const &sctrl=StatisticsControl())
Handle a watered-down front-end to the constructor (no variance)
Definition: Statistics.h:359
def measure(mi, x, y, size, statistic, stats)
Definition: fringe.py:516

◆ select()

def lsst.ip.isr.fringe.select (   vector,
  clip 
)
Select values within 'clip' standard deviations of the median

Returns a boolean array.

Definition at line 542 of file fringe.py.

542 def select(vector, clip):
543  """Select values within 'clip' standard deviations of the median
544 
545  Returns a boolean array.
546  """
547  q1, q2, q3 = numpy.percentile(vector, (25, 50, 75))
548  return numpy.abs(vector - q2) < clip*0.74*(q3 - q1)
def select(vector, clip)
Definition: fringe.py:542

◆ stdev()

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 532 of file fringe.py.

532 def stdev(vector):
533  """Calculate a robust standard deviation of an array of values
534 
535  @param vector Array of values
536  @return Standard deviation
537  """
538  q1, q3 = numpy.percentile(vector, (25, 75))
539  return 0.74*(q3 - q1)
540 
541 
def stdev(vector)
Definition: fringe.py:532