Class InterPercentileRangeCleaner.DataCollector

  • All Implemented Interfaces:
    adams.core.logging.LoggingSupporter, adams.core.SizeOfHandler, Serializable
    Enclosing class:
    InterPercentileRangeCleaner

    public static class InterPercentileRangeCleaner.DataCollector
    extends adams.core.logging.LoggingObject
    A helper class for collecting the data from the database and computing the inter-percentile ranges (IPRs).
    Version:
    $Revision: 1913 $
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_IDs

        protected List<Integer> m_IDs
        the spectrum IDs to collected the data from.
      • m_ChunkSize

        protected int m_ChunkSize
        the chunk size.
      • m_LowerPercentile

        protected double m_LowerPercentile
        the lower percentile.
      • m_UpperPercentile

        protected double m_UpperPercentile
        the upper percentile.
      • m_AmplitudeRangesPerChunk

        protected List<Hashtable<Float,​Float[]>> m_AmplitudeRangesPerChunk
        the inter-percentile ranges for the amplitudes (list of wavenumber - lower/upper percentile) per chunk.
      • m_FieldRangesPerChunk

        protected List<Hashtable<adams.data.report.Field,​Float[]>> m_FieldRangesPerChunk
        the inter-percentile ranges for the fields (field - lower/upper percentile) per chunk.
      • m_WaveNumbers

        protected HashSet<Float> m_WaveNumbers
        the wave numbers that were encountered.
      • m_Fields

        protected HashSet<adams.data.report.Field> m_Fields
        the fields that were encountered.
      • m_DatabaseConnection

        protected adams.db.AbstractDatabaseConnection m_DatabaseConnection
        the database connection.
    • Constructor Detail

      • DataCollector

        public DataCollector​(adams.db.AbstractDatabaseConnection dbcon,
                             List<Integer> IDs,
                             double lowerPercentile,
                             double upperPercentile,
                             int chunkSize)
        Initializes the data collector.
        Parameters:
        IDs - the IDs to use
        lowerPercentile - the lower percentile to retrieve
        upperPercentile - the upper percentile to retrieve
        chunkSize - the size of the chunks
    • Method Detail

      • getIDs

        public List<Integer> getIDs()
        Returns the IDs used for data collection.
        Returns:
        the IDs
      • getChunkSize

        public int getChunkSize()
        Returns the size of the chunks being used.
        Returns:
        the size
      • getLowerPercentile

        public double getLowerPercentile()
        Returns the lower percentile.
        Returns:
        the percentile
      • getUpperPercentile

        public double getUpperPercentile()
        Returns the upper percentile.
        Returns:
        the percentile
      • getSpectrumF

        protected SpectrumF getSpectrumF()
        Returns the SpectrumT singleton to use.
        Returns:
        the table singleton to use
      • collectChunk

        protected Object[] collectChunk​(int fromIndex,
                                        int toIndex)
        Collects a single chunk.
        Parameters:
        fromIndex - the start index (incl.)
        toIndex - the end index (incl.)
        Returns:
        an array of length two, storing the collected ranges for the amplitudes and the fields
      • collectChunks

        protected void collectChunks()
        Collects the data in chunks and computes the ranges based on that (picks the median).
      • collect

        public void collect()
        Starts the collection of the data.