Package gaia.cu9.tools.parallax

# Class DistanceEstimator

java.lang.Object
gaia.cu9.tools.parallax.DistanceEstimator

public class DistanceEstimator extends Object
This class calculates the distance estimation for a given star. In the constructor, the estimator of the PDF of the distance to be used is specified, and can be reused for several stars. Several parameters controlling how the estimation should be done can be passed through an optional Map<String, String>

Author:
  eutrilla

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static enum`
`DistanceEstimator.EstimationType`

## Constructor Summary

Constructors
Constructor
Description
`DistanceEstimator()`
`DistanceEstimator(DistanceEstimator.EstimationType type, Map<String,String> parameters)`

## Method Summary

Modifier and Type
Method
Description
`protected double`
`distanceToModulus(double r)`
`DistanceEstimation`
`estimate(StarVariables star)`
`protected boolean`
`getBoolean(String key, Map<String,String> parameters, boolean defaultValue)`
`double[][]`
`getDistanceCdf(StarVariables star)`
`double[][]`
`getDistanceModulusCdf(StarVariables star)`
`protected double`
`getDouble(String key, Map<String,String> parameters, double defaultValue)`
`protected DistanceEstimationMethod`
`getEstimationMethod(StarVariables star)`
`protected int`
`getInt(String key, Map<String,String> parameters, int defaultValue)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### DistanceEstimator

public DistanceEstimator()

### DistanceEstimator

public DistanceEstimator(DistanceEstimator.EstimationType type, Map<String,String> parameters)

## Method Details

### getDistanceCdf

public double[][] getDistanceCdf(StarVariables star)

### getDistanceModulusCdf

public double[][] getDistanceModulusCdf(StarVariables star)

### estimate

public DistanceEstimation estimate(StarVariables star)

### distanceToModulus

protected double distanceToModulus(double r)

### getDouble

protected double getDouble(String key, Map<String,String> parameters, double defaultValue)

### getInt

protected int getInt(String key, Map<String,String> parameters, int defaultValue)

### getBoolean

protected boolean getBoolean(String key, Map<String,String> parameters, boolean defaultValue)

### getEstimationMethod

protected DistanceEstimationMethod getEstimationMethod(StarVariables star)