LSSTApplications  19.0.0-10-g920eed2,19.0.0-11-g48a0200+2,19.0.0-18-gfc4e62b+11,19.0.0-2-g3b2f90d+2,19.0.0-2-gd671419+5,19.0.0-20-g5a5a17ab+9,19.0.0-21-g2644856+11,19.0.0-22-gc5dc5b1+6,19.0.0-23-gdc29a50+3,19.0.0-24-g923e380+11,19.0.0-25-g6c8df7140,19.0.0-28-g9b887e2,19.0.0-3-g2b32d65+5,19.0.0-3-g8227491+10,19.0.0-3-g9c54d0d+10,19.0.0-3-gca68e65+6,19.0.0-3-gcfc5f51+5,19.0.0-3-ge110943+9,19.0.0-3-ge74d124,19.0.0-3-gfe04aa6+11,19.0.0-4-g06f5963+5,19.0.0-4-g3d16501+11,19.0.0-4-g4a9c019+5,19.0.0-4-g5a8b323,19.0.0-4-g66397f0+1,19.0.0-4-g8278b9b+1,19.0.0-4-g8557e14,19.0.0-4-g8964aba+11,19.0.0-4-ge404a01+10,19.0.0-5-g40f3a5a,19.0.0-5-g4db63b3,19.0.0-5-gfb03ce7+11,19.0.0-6-gbaebbfb+10,19.0.0-60-gafafd468+11,19.0.0-67-g3ab1e6e,19.0.0-7-g039c0b5+9,19.0.0-7-gbea9075+4,19.0.0-7-gc567de5+11,19.0.0-8-g3a3ce09+6,19.0.0-9-g463f923+10,w.2020.21
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 >