LSST Applications  21.0.0-172-gfb10e10a+18fedfabac,22.0.0+297cba6710,22.0.0+80564b0ff1,22.0.0+8d77f4f51a,22.0.0+a28f4c53b1,22.0.0+dcf3732eb2,22.0.1-1-g7d6de66+2a20fdde0d,22.0.1-1-g8e32f31+297cba6710,22.0.1-1-geca5380+7fa3b7d9b6,22.0.1-12-g44dc1dc+2a20fdde0d,22.0.1-15-g6a90155+515f58c32b,22.0.1-16-g9282f48+790f5f2caa,22.0.1-2-g92698f7+dcf3732eb2,22.0.1-2-ga9b0f51+7fa3b7d9b6,22.0.1-2-gd1925c9+bf4f0e694f,22.0.1-24-g1ad7a390+a9625a72a8,22.0.1-25-g5bf6245+3ad8ecd50b,22.0.1-25-gb120d7b+8b5510f75f,22.0.1-27-g97737f7+2a20fdde0d,22.0.1-32-gf62ce7b1+aa4237961e,22.0.1-4-g0b3f228+2a20fdde0d,22.0.1-4-g243d05b+871c1b8305,22.0.1-4-g3a563be+32dcf1063f,22.0.1-4-g44f2e3d+9e4ab0f4fa,22.0.1-42-gca6935d93+ba5e5ca3eb,22.0.1-5-g15c806e+85460ae5f3,22.0.1-5-g58711c4+611d128589,22.0.1-5-g75bb458+99c117b92f,22.0.1-6-g1c63a23+7fa3b7d9b6,22.0.1-6-g50866e6+84ff5a128b,22.0.1-6-g8d3140d+720564cf76,22.0.1-6-gd805d02+cc5644f571,22.0.1-8-ge5750ce+85460ae5f3,master-g6e05de7fdc+babf819c66,master-g99da0e417a+8d77f4f51a,w.2021.48
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 37 of file fringe.py.

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

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

517 def measure(mi, x, y, size, statistic, stats):
518  """Measure a statistic within an aperture
519 
520  @param mi MaskedImage to measure
521  @param x, y Center for aperture
522  @param size Size of aperture
523  @param statistic Statistic to measure
524  @param stats StatisticsControl object
525  @return Value of statistic within aperture
526  """
527  bbox = lsst.geom.Box2I(lsst.geom.Point2I(int(x) - size, int(y - size)),
528  lsst.geom.Extent2I(2*size, 2*size))
529  subImage = mi.Factory(mi, bbox, afwImage.LOCAL)
530  return afwMath.makeStatistics(subImage, statistic, stats).getValue()
531 
532 
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:517

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

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

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

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