Class MCMCLocaliser

java.lang.Object
Localiser.algorithms.genericLocaliser.MCMC.old.MCMCLocaliser
All Implemented Interfaces:
TimeDelayLocaliserModel

@Deprecated public class MCMCLocaliser extends Object implements TimeDelayLocaliserModel
Deprecated.
Markov chain Monte Carlo (MCMC) time delay based localisation algorithm.

This is an advanced and highly computationally intensive localisation algorithm based on MCMC methods. For a good description see; The Transit Light Curve (TLC) Project.I. Four Consecutive Transits of the Exoplanet XO-1b Matthew J. Holman1

Input variables are an ArrayListinvalid input: '<'ArrayList> of observed time delays, along with a corresponding error ArrayListinvalid input: '<'ArrayList> and ArrayListinvalid input: '<'ArrayList> of hydrophone positions. The time delay and delay errors arraylist will be exactly the same size.

Each row in the time delay ArrayList contains a group time delays calculated from N synchrnoised hydrophones in the corresponding ArrayListinvalid input: '<'ArrayList> row. This allows potential locaisation between large groups of unsynchronised hydrophones, a situation always encountered during target motions analysis.

Multiple MCMC chains can and should be run. These are executed on different threads to take advantage of multi core processing as much as possible. Even so a large number of chains or large number of observed delays can result in significant processing times.

Results are analysed for convergence and final locations packed into an MCMCTDResults class. Input Time Delays Time Delay Errors Hydrophone Array SampaleRate

Author:
Jamie Macaulay
  • Field Details Link icon

    • timeDelayErrors Link icon

      protected ArrayList<ArrayList<Double>> timeDelayErrors
      Deprecated.
    • hydrophoneArray Link icon

      protected ArrayList<ArrayList<javax.vecmath.Point3f>> hydrophoneArray
      Deprecated.
    • speedOfSound Link icon

      protected double speedOfSound
      Deprecated.
    • settings Link icon

      protected MCMCParams settings
      Deprecated.
  • Constructor Details Link icon

  • Method Details Link icon

    • getNewJumpPoint Link icon

      public javax.vecmath.Point3f getNewJumpPoint(javax.vecmath.Point3f chainPos)
      Deprecated.
      Calculates a random new Co-Ordinate, 3D Cartesian or Cylindrical space;
      Parameters:
      chainPos -
      Returns:
    • randomNGenerator Link icon

      public double randomNGenerator()
      Deprecated.
    • chiSquared Link icon

      public static double chiSquared(ArrayList<ArrayList<Double>> observedTimeDelays, ArrayList<ArrayList<Double>> chainPosTimeDelays, ArrayList<ArrayList<Double>> errors)
      Deprecated.
      Calculates the chi^2 value between observed data and theoretical delays calculated for a certain point in three dimensional space.
      Parameters:
      observedTimeDelays - - the observed time delays.
      chainPosTimeDelays - - the set of time delays to compare to the observed time delays
      errors - - the measurement errors in the observed time delays.
      Returns:
      chi squared value for observed time delays compared to chain position time delays.
    • getTimeDelays Link icon

      public static ArrayList<ArrayList<Double>> getTimeDelays(javax.vecmath.Point3f chainPos, ArrayList<ArrayList<javax.vecmath.Point3f>> hydrophonePos, double speedOfSound)
      Deprecated.
      Calculate the theoretical time delays if a source was located at point3d ChainPos.
      Parameters:
      hydrophonePos - - the positions of all the hydrophones within the array in Cartesian coOrdinates.
      speedOfSound - - the speed of sound;
      ChainPos - - theoretical position of the source.
      Returns:
      The time delays that would result from a source at this location.
    • AnalyseMCMCResults Link icon

      public MCMCTDResults AnalyseMCMCResults(ArrayList<javax.vecmath.Point3f> chainJumps, ArrayList<Double> Chi2, int analysisType)
      Deprecated.
      Take an ArrayList of the Markov chain jumps and chi-squared values of each jump and calculate source position. In order to make sure the burn in phase is not included, a certain initial percentage of jumps is ignored.
      Parameters:
      chainJumps -
      Chi2 -
      PercentagetoIgnore -
      Returns:
    • mCMC Link icon

      public Object[] mCMC(ArrayList<ArrayList<Double>> observedTimeDelays)
      Deprecated.
      Simple Markov Chain Monte Carlo simulation. A good description of how this process works can be found in: The Transit Light Curve (TLC) Project.I. Four Consecutive Transits of the Exoplanet XO-1b Matthew J. Holman1, Joshua N. Winn2, David W. Latham1, Francis T. O�Donovan3, David Charbonneau1,7....
      Parameters:
      observedTimeDelays -
      Returns:
      Object containing an arraylist of successful chain jumps and an arraylist containing the corresponding chi squared values of each successful jump
    • runAlgorithm Link icon

      public void runAlgorithm()
      Deprecated.
      Description copied from interface: TimeDelayLocaliserModel
      Runs the localisation algorithm an creates a results. The results are dependednt on the localisation class.
      Specified by:
      runAlgorithm in interface TimeDelayLocaliserModel
    • clusterAnalaysis Link icon

      public ArrayList<MCMCTDResults> clusterAnalaysis(ArrayList<MCMCTDResults> meanArray)
      Deprecated.
      Perform a cluster analysis of results. The clustering algorithm used is determined by the MCMC localiser params.
    • kMeansAnalysis Link icon

      public ArrayList<javax.vecmath.Point3d> kMeansAnalysis(ArrayList<MCMCTDResults> meanArray)
      Deprecated.
      Sometimes multiple chains will converge to different final distributions. If this is the case the results must be clustered, otherwise the final answer will simply be the mean of the two different distributions. Here a 3D k-means clustering algorithm is used in x, y and z . First, nk random points are assigned in space based on the start dispersion. Next, all chains are clusters corresponding to their euclidian distance from these two random points. The random points then move to the centroid of their correpsonding clusters. The process repeats 'int iterations' times by which time it is likely convergence will have occurred. Clustering is attempted 'int attempts' times from different random positions.
      Parameters:
      meanArray - - the mean values of all chains;
      Returns:
    • averageChains Link icon

      public MCMCTDResults averageChains(ArrayList<MCMCTDResults> data)
      Deprecated.
    • addCrossCorError Link icon

      public static ArrayList<ArrayList<Double>> addCrossCorError(ArrayList<ArrayList<Double>> tdErrors, double timeError, float sampleRate)
      Deprecated.
      Adds the cross correlation error to the time delay errors array.
      Parameters:
      tdErrors -
      timeError -
      sampleRate -
      Returns:
    • setTimeDelays Link icon

      public void setTimeDelays(ArrayList<ArrayList<Double>> timeDelays)
      Deprecated.
    • setTimeDelaysErrors Link icon

      public void setTimeDelaysErrors(ArrayList<ArrayList<Double>> timeDelayErrors)
      Deprecated.
      Note the sample rate must be set before this function.
      Parameters:
      timeDelayErrors -
      Throws:
      Exception
    • setHydrophonePos Link icon

      public void setHydrophonePos(ArrayList<ArrayList<javax.vecmath.Point3f>> hydrophonePos)
      Deprecated.
    • getHydrophonePos Link icon

      public ArrayList<ArrayList<javax.vecmath.Point3f>> getHydrophonePos()
      Deprecated.
    • getJumps Link icon

      public ArrayList<ArrayList<javax.vecmath.Point3f>> getJumps()
      Deprecated.
    • getChiJumps Link icon

      public ArrayList<ArrayList<Double>> getChiJumps()
      Deprecated.
    • getResultsAllChains Link icon

      public ArrayList<MCMCTDResults> getResultsAllChains()
      Deprecated.
    • getResults Link icon

      public ArrayList<MCMCTDResults> getResults()
      Deprecated.
    • changeSettings Link icon

      public Boolean changeSettings()
      Deprecated.
      Description copied from interface: TimeDelayLocaliserModel
      Change any settings in the algorithm.
      Specified by:
      changeSettings in interface TimeDelayLocaliserModel
      Returns:
    • getSettings Link icon

      public MCMCParams getSettings()
      Deprecated.
    • setSampleRate Link icon

      public void setSampleRate(float sampleRate)
      Deprecated.
    • setSoundSpeed Link icon

      public void setSoundSpeed(double speedOfSound)
      Deprecated.
    • compressMCMCResults Link icon

      public static ArrayList<ArrayList<javax.vecmath.Point3f>> compressMCMCResults(ArrayList<ArrayList<javax.vecmath.Point3f>> jumps, int compressSize)
      Deprecated.
      Reduces the number of MCMC jumps in order to reduce memory usage when displaying probability distributions in Java3D or other visualise components.
      Parameters:
      jumps - ArrayList of chain jumps to compress
      compressSize - - the ideal number of points in the new array. Note: unless compressSize exactly divides the jump size then final arrays will be slightly larger than compressSize
      Returns:
    • stop Link icon

      public void stop()
      Deprecated.
      Description copied from interface: TimeDelayLocaliserModel
      Stop the localiser. For MCMC, which can takes minutes to compute this is important. For other localisers, such as Simplex, this is unimportant and can be left blank.
      Specified by:
      stop in interface TimeDelayLocaliserModel
    • clearResults Link icon

      public void clearResults()
      Deprecated.
      Clear the results from memory.