Class StatsFilter

java.lang.Object
uk.ac.starlink.ttools.filter.BasicFilter
uk.ac.starlink.ttools.filter.StatsFilter
All Implemented Interfaces:
ProcessingFilter

public class StatsFilter extends BasicFilter
Filter which can calculate statistical quantities.
Since:
26 Apr 2006
Author:
Mark Taylor
  • Constructor Details

    • StatsFilter

      public StatsFilter()
      Constructor.
  • Method Details

    • getDescriptionLines

      protected String[] getDescriptionLines()
      Specified by:
      getDescriptionLines in class BasicFilter
    • createStep

      public ProcessingStep createStep(Iterator<String> argIt) throws ArgException
      Description copied from interface: ProcessingFilter
      Creates a new ProcessingStep based on a sequence of command-line arguments. The argIt argument is an iterator over the command-line arguments positioned just before any arguments intended for this filter. If legal, any that can be comprehended by this filter should be read (iterated over) and removed, and a ProcessingStep should accordingly be returned. In the case of a successful return, it is essential that no arguments other than the ones intended for this filter are read from the iterator.

      If the argument list is badly-formed as far as this filter is concerned, an ArgException should be thrown.

      Parameters:
      argIt - iterator over command-line arguments positioned at the first one
      Throws:
      ArgException
    • parseQuantileSpecifier

      public static double parseQuantileSpecifier(String txt)
      Parses a string that represents an arbitrary quantile. This is of the form Q.xxx, where xxx is the quantile fraction, so for instance "Q.01" is the first percentile and "Q.4" is the 40th percentile.
      Parameters:
      txt - text which may represent a quantile specifier
      Returns:
      value in the range 0..1 giving the quantile level, or NaN if it's not a quantile specifier