LSSTApplications  17.0+124,17.0+14,17.0+73,18.0.0+37,18.0.0+80,18.0.0-4-g68ffd23+4,18.1.0-1-g0001055+12,18.1.0-1-g03d53ef+5,18.1.0-1-g1349e88+55,18.1.0-1-g2505f39+44,18.1.0-1-g5315e5e+4,18.1.0-1-g5e4b7ea+14,18.1.0-1-g7e8fceb+4,18.1.0-1-g85f8cd4+48,18.1.0-1-g8ff0b9f+4,18.1.0-1-ga2c679d+1,18.1.0-1-gd55f500+35,18.1.0-10-gb58edde+2,18.1.0-11-g0997b02+4,18.1.0-13-gfe4edf0b+12,18.1.0-14-g259bd21+21,18.1.0-19-gdb69f3f+2,18.1.0-2-g5f9922c+24,18.1.0-2-gd3b74e5+11,18.1.0-2-gfbf3545+32,18.1.0-26-g728bddb4+5,18.1.0-27-g6ff7ca9+2,18.1.0-3-g52aa583+25,18.1.0-3-g8ea57af+9,18.1.0-3-gb69f684+42,18.1.0-3-gfcaddf3+6,18.1.0-32-gd8786685a,18.1.0-4-gf3f9b77+6,18.1.0-5-g1dd662b+2,18.1.0-5-g6dbcb01+41,18.1.0-6-gae77429+3,18.1.0-7-g9d75d83+9,18.1.0-7-gae09a6d+30,18.1.0-9-gc381ef5+4,w.2019.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 473 of file fringe.py.

473 def measure(mi, x, y, size, statistic, stats):
474  """Measure a statistic within an aperture
475 
476  @param mi MaskedImage to measure
477  @param x, y Center for aperture
478  @param size Size of aperture
479  @param statistic Statistic to measure
480  @param stats StatisticsControl object
481  @return Value of statistic within aperture
482  """
483  bbox = lsst.geom.Box2I(lsst.geom.Point2I(int(x) - size, int(y - size)),
484  lsst.geom.Extent2I(2*size, 2*size))
485  subImage = mi.Factory(mi, bbox, afwImage.LOCAL)
486  return afwMath.makeStatistics(subImage, statistic, stats).getValue()
487 
488 
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
def measure(mi, x, y, size, statistic, stats)
Definition: fringe.py:473
An integer coordinate rectangle.
Definition: Box.h:55

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

499 def select(vector, clip):
500  """Select values within 'clip' standard deviations of the median
501 
502  Returns a boolean array.
503  """
504  q1, q2, q3 = numpy.percentile(vector, (25, 50, 75))
505  return numpy.abs(vector - q2) < clip*0.74*(q3 - q1)
506 
def select(vector, clip)
Definition: fringe.py:499

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

489 def stdev(vector):
490  """Calculate a robust standard deviation of an array of values
491 
492  @param vector Array of values
493  @return Standard deviation
494  """
495  q1, q3 = numpy.percentile(vector, (25, 75))
496  return 0.74*(q3 - q1)
497 
498 
def stdev(vector)
Definition: fringe.py:489