LSSTApplications  20.0.0
LSSTDataManagementBasePackage
Classes | Functions
lsst.ip.isr.fringe Namespace Reference

Classes

class  FringeConfig
 
class  FringeStatisticsConfig
 
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 35 of file fringe.py.

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

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

506 def measure(mi, x, y, size, statistic, stats):
507  """Measure a statistic within an aperture
508 
509  @param mi MaskedImage to measure
510  @param x, y Center for aperture
511  @param size Size of aperture
512  @param statistic Statistic to measure
513  @param stats StatisticsControl object
514  @return Value of statistic within aperture
515  """
516  bbox = lsst.geom.Box2I(lsst.geom.Point2I(int(x) - size, int(y - size)),
517  lsst.geom.Extent2I(2*size, 2*size))
518  subImage = mi.Factory(mi, bbox, afwImage.LOCAL)
519  return afwMath.makeStatistics(subImage, statistic, stats).getValue()
520 
521 

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

532 def select(vector, clip):
533  """Select values within 'clip' standard deviations of the median
534 
535  Returns a boolean array.
536  """
537  q1, q2, q3 = numpy.percentile(vector, (25, 50, 75))
538  return numpy.abs(vector - q2) < clip*0.74*(q3 - q1)

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

522 def stdev(vector):
523  """Calculate a robust standard deviation of an array of values
524 
525  @param vector Array of values
526  @return Standard deviation
527  """
528  q1, q3 = numpy.percentile(vector, (25, 75))
529  return 0.74*(q3 - q1)
530 
531 
lsst::ip::isr.fringe.stdev
def stdev(vector)
Definition: fringe.py:522
lsst::afw::math::makeStatistics
Statistics makeStatistics(lsst::afw::math::MaskedVector< EntryT > const &mv, std::vector< WeightPixel > const &vweights, int const flags, StatisticsControl const &sctrl=StatisticsControl())
The makeStatistics() overload to handle lsst::afw::math::MaskedVector<>
Definition: Statistics.h:520
lsst::ip::isr.fringe.select
def select(vector, clip)
Definition: fringe.py:532
lsst::ip::isr.fringe.getFrame
def getFrame()
Definition: fringe.py:35
lsst::geom::Point< int, 2 >
lsst::geom::Box2I
An integer coordinate rectangle.
Definition: Box.h:55
lsst::ip::isr.fringe.measure
def measure(mi, x, y, size, statistic, stats)
Definition: fringe.py:506
lsst::geom::Extent< int, 2 >