LSSTApplications  19.0.0-14-gb0260a2+72efe9b372,20.0.0+7927753e06,20.0.0+8829bf0056,20.0.0+995114c5d2,20.0.0+b6f4b2abd1,20.0.0+bddc4f4cbe,20.0.0-1-g253301a+8829bf0056,20.0.0-1-g2b7511a+0d71a2d77f,20.0.0-1-g5b95a8c+7461dd0434,20.0.0-12-g321c96ea+23efe4bbff,20.0.0-16-gfab17e72e+fdf35455f6,20.0.0-2-g0070d88+ba3ffc8f0b,20.0.0-2-g4dae9ad+ee58a624b3,20.0.0-2-g61b8584+5d3db074ba,20.0.0-2-gb780d76+d529cf1a41,20.0.0-2-ged6426c+226a441f5f,20.0.0-2-gf072044+8829bf0056,20.0.0-2-gf1f7952+ee58a624b3,20.0.0-20-geae50cf+e37fec0aee,20.0.0-25-g3dcad98+544a109665,20.0.0-25-g5eafb0f+ee58a624b3,20.0.0-27-g64178ef+f1f297b00a,20.0.0-3-g4cc78c6+e0676b0dc8,20.0.0-3-g8f21e14+4fd2c12c9a,20.0.0-3-gbd60e8c+187b78b4b8,20.0.0-3-gbecbe05+48431fa087,20.0.0-38-ge4adf513+a12e1f8e37,20.0.0-4-g97dc21a+544a109665,20.0.0-4-gb4befbc+087873070b,20.0.0-4-gf910f65+5d3db074ba,20.0.0-5-gdfe0fee+199202a608,20.0.0-5-gfbfe500+d529cf1a41,20.0.0-6-g64f541c+d529cf1a41,20.0.0-6-g9a5b7a1+a1cd37312e,20.0.0-68-ga3f3dda+5fca18c6a4,20.0.0-9-g4aef684+e18322736b,w.2020.45
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 512 of file fringe.py.

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

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

538 def select(vector, clip):
539  """Select values within 'clip' standard deviations of the median
540 
541  Returns a boolean array.
542  """
543  q1, q2, q3 = numpy.percentile(vector, (25, 50, 75))
544  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 528 of file fringe.py.

528 def stdev(vector):
529  """Calculate a robust standard deviation of an array of values
530 
531  @param vector Array of values
532  @return Standard deviation
533  """
534  q1, q3 = numpy.percentile(vector, (25, 75))
535  return 0.74*(q3 - q1)
536 
537 
lsst::ip::isr.fringe.stdev
def stdev(vector)
Definition: fringe.py:528
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:538
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:512
lsst::geom::Extent< int, 2 >