stella.util
Class PointingModel

java.lang.Object
  extended by util.PropertyContainer
      extended by util.PropertyResources
          extended by util.PropertyBundles
              extended by stella.util.PointingModel
All Implemented Interfaces:
Cloneable, Initializable, LocalizedSupplying, PropertySupplying, ResourceSupplying

public class PointingModel
extends PropertyBundles
implements Initializable

Class to calculate a pointing model for STELLA and RoboTel. Its is general enough to comply with any pointing model possible, though it is only used for the STELLA pointing model:

 Δaz=c_an*sin(az)*cot(z)-c_ae*cos(az)*cot(z)+c_npae*cot(z)-c_ca/sin(z)+c_aoff
    Δz=c_an*cos(az)+c_ae*sin(az)+c_flex*sin(z)+c_zoff
 
It remains questionable, if parameters c_an c_ae are really identical for both offsets, in most of the pointing models I came across, they were different. Thus, this class uses two different parameters. Adding additinal terms or removing terms is especially easy, just add an expression to the appropriate #AZMODEL or #ALTMODEL. A second question is how the measurement get into the object. Refer to appropriate classes here, e.g. #FileData.

Note that this class can in principle also be used for finding a temperature/heigth model for the focus, if proper changes in the fitting functions and usage of the correct data set is done.


Nested Class Summary
static class PointingModel.FileData
          An access class to a pointing model that reads data from a file.
static class PointingModel.PilarConverter
          A helper class that converts the TCS-pointings into something readable.
private static class PointingModel.PointingDataModel
          Connects a pointing model to the DataModel framework.
static class PointingModel.PseudoModel
          We generate a test file for reconstructing the class.
static class PointingModel.Wifsip
          Utilitiy class to read in pointing data obtained on Robotel with the Wifsip instrument.
 
Nested classes/interfaces inherited from class util.PropertyResources
PropertyResources.URLResource
 
Field Summary
private  VectorG altboot
          Average of the altitude solution in bootstrapping.
private  double altbootmax
          The rms maximum of the altitude solution, bootstrap fit..
private  double altbootmin
          The rms minimum of the altitude solution, bootstrap fit..
private  double altbootrms
          The rms value of the altitude solution, bootstrap fit..
private  double altchi2
          The chi-square value of the altitude solution.
private  QuadMatrix altcorrelation
          The covariance matrix of the altitude solution devided by altsigma.
private  QuadMatrix altcovariance
          The covariance matrix of the altitude solution.
private  VectorG alterror
          Errors of the altitude offset measurements or null if not available.
private  VectorG altfit
          The azimuth model fit.
private  VectorG altmax
          Maxima of the altitude solution in bootstrapping.
private  VectorG altmin
          Minima of the altitude solution in bootstrapping.
private  Multidimensional[] altmodel
          The altitude model, parsed from KEY_ALTMODEL.
private  List altnames
          The names of the altitude parameters as a list.
private  VectorG altoffset
          The zenith distance offsets measured.
private  double altqual
          The quality of the altitude solution.
private  VectorG altresiduals
          Residuals of the altitude model.
private  double altrms
          The rms value of the altitude solution.
private  VectorG altsigma
          Sigma on the altitude solution, either covariance or bootstrap.
private  VectorG altsigorg
          Covariance sigma in altitude parameters in bootstrapping.
private  VectorG altsolution
          Solution of the altitude model, set with first call to getAltitudeSolution().
private  VectorG[] azalt
          The azimuth and zenith distance of the measurements, radian 0=az 1=z.
private  VectorG azboot
          Average of the azimuth solution in bootstrapping.
private  double azbootmax
          The rms maximum of the azimuth solution, bootstrap fit.
private  double azbootmin
          The rms minimum of the azimuth solution, bootstrap fit.
private  double azbootrms
          The rms value of the azimuth solution, bootstrap fit.
private  double azchi2
          The chi-square value of the azimuth solution.
private  QuadMatrix azcorrelation
          The covariance matrix of the azimuth solution devided by azsigma.
private  QuadMatrix azcovariance
          The covariance matrix of the azimuth solution.
private  VectorG azerror
          Errors of the azimuth offset measurements or null if not available.
private  VectorG azfit
          The azimuth model fit.
private  VectorG azmax
          Maxima of the azimuth solution in bootstrapping.
private  VectorG azmin
          Minima of the azimuth solution in bootstrapping.
private  Multidimensional[] azmodel
          The azimuth model, parsed from KEY_AZMODEL.
private  List aznames
          The names of the azimuth parameters as a list.
private  VectorG azoffset
          The azimuth offsets measured.
private  double azqual
          The quality of the azimuth solution.
private  VectorG azresiduals
          Residuals of the azimuth model.
private  double azrms
          The rms value of the azimuth solution.
private  VectorG azsigma
          Sigma on the azimuth solution, either covariance or bootstrap.
private  VectorG azsigorg
          Covariance sigma in azimuth parameters in bootstrapping.
private  VectorG azsolution
          Solution of the azimuth model, set with first call to getAzimuthSolution().
private static String DEFALT20MODEL
          The default expression for the altitude model, height above 20.
private static String DEFALTCOUDE
          If pm was measured in coude focus, we have additional terms in az an el.
private static String DEFALTMODEL
          The default expression for the altitude model.
private static String DEFALTMODEL20EXTENDED
          Expressions for the extended altitude model compliant with PILAR.
private static String DEFALTMODELEXTENDED
          Expressions for the extended altitude model compliant with PILAR.
private static String DEFALTMODELPILAR
          Expressions for the zenith distance model compliant with PILAR.
private static String DEFALTNAMES
          Constant names in the default azimuth model.
private static String DEFALTNAMESEXTENDED
          Constant names in the default azimuth model.
private static String DEFALTNAMESPILAREXTENDED
          Constant names in the default azimuth model.
private static String DEFALTNASMYTH
          If pm was measured in Nasmith focus, the alt model has one additional term.
private static String DEFALTPILAREXTENDED
          Expressions for the extended altitude model compliant with PILAR.
private static String DEFAZ20MODEL
          The default expressions for the azimuth model, height above 20.
private static String DEFAZCOUDE
          If pm was measured in coude focus, we have additional terms in az an el.
private static String DEFAZMODEL
          The default expressions for the azimuth model, comma separated lists.
private static String DEFAZMODEL20EXTENDED
          Expressions for the extended azimuth model compliant with PILAR.
private static String DEFAZMODELEXTENDED
          Expressions for the extended azimuth model compliant with PILAR.
private static String DEFAZMODELPILAR
          Expressions for the azimuth model compliant with PILAR.
private static String DEFAZNAMES
          Constant names in the default azimuth model.
private static String DEFAZNAMESEXTENDED
          Constant names in the default azimuth model.
private static String DEFAZNAMESPILAREXTENDED
          Constant names in the default azimuth model.
private static String DEFAZNASMYTH
          If pm was measured in Nasmith focus, the alt model has one additional term.
private static String DEFAZPILAREXTENDED
          Expressions for the extended azimuth model compliant with PILAR.
static boolean DEFAZWEIGHTHEIGHT
          If true, we use the sine of the target height as a weight for az.
private static boolean DEFBOOTSTRAP
          The default usage of bootstrapping.
private static boolean DEFBOOTSTRAPCOVARIANT
          The default usage of the covariance weights for bootstrapping.
private static double DEFBOOTSTRAPDUPLICATE
          The default percentile of data replicas.
private static int DEFBOOTSTRAPNUMBER
          The default number of simulated data set on bootstrapping.
private static String DEFCOUDEALTNAMES
          Constant names in the default coude altitude model.
private static String DEFCOUDEAZNAMES
          Constant names in the default coude azimuth model.
private static String DEFGREGORALTMODEL
          Expression for GREGOR, alt model.
private static String DEFGREGORALTNAMES
          Constant names in the default gregor azimuth model.
private static String DEFGREGORAZMODEL
          Expression for GREGOR, az model.
private static String DEFGREGORAZNAMES
          Constant names in the default gregor azimuth model.
private static String DEFGREGORNUM0ALTMODEL
          Expression for GREGOR, alt model.
private static String DEFGREGORNUM0AZMODEL
          Expression for GREGOR, numerical az model.
private static String DEFGREGORNUMALTMODEL
          Expression for GREGOR, alt model.
private static String DEFGREGORNUMALTNAMES
          Constant names in the default gregor azimuth model.
private static String DEFGREGORNUMAZMODEL
          Expression for GREGOR, numerical az model.
private static String DEFGREGORNUMAZNAMES
          Constant names in the default gregor azimuth model.
private static String DEFHARMONIC2MODEL
          Expression for a harmonic model up to l=2.
private static String DEFHARMONIC3MODEL
          Expression for a harmonic model up to l=3.
private static String DEFHARMONIC4MODEL
          Expression for a harmonic model up to l=4.
private static String DEFHARMONIC5MODEL
          Expression for a harmonic model up to l=5.
private static String DEFHARMONIC6MODEL
          Expression for a harmonic model up to l=6.
private static String DEFHARMONIC7MODEL
          Expression for a harmonic model up to l=7.
private static String DEFHARMONIC8MODEL
          Expression for a harmonic model up to l=8.
private static String DEFHARMONICALTMODEL
          Expression for a harmonic model up to l=7, suited for altitude.
private static String DEFHARMONICAZMODEL
          Expression for a harmonic model up to l=6, suited for azimuth.
private static String DEFNAMEHARMONIC2
          Constatn names in the harmonic model.
private static String DEFNAMEHARMONIC3
          Constatn names in the harmonic model.
private static String DEFNAMEHARMONIC4
          Constatn names in the harmonic model.
private static String DEFNAMEHARMONIC5
           
private static String DEFNAMEHARMONIC6
           
private static String DEFNAMEHARMONIC7
           
private static String DEFNAMEHARMONIC8
           
private static String DEFNAMEHARMONICALT
          Parameter names remaining for the altitude model.
private static String DEFNAMEHARMONICAZ
          Parameter names remaining for the azimuth model.
private static String DEFNASMYTHALTNAMES
          Constant names in the default nasmyth altitude model.
private static String DEFNASMYTHAZNAMES
          Constant names in the default nasmyth azimuth model.
static String KEY_ALTMODEL
          The altitude model.
static String KEY_ALTNAMES
          The altitude model.
static String KEY_AZMODEL
          The azimuth model.
static String KEY_AZNAMES
          The azimuth model parameter names.
static String KEY_AZWEIGHTHEIGHT
          If true, we use the sine of the target height as a weight for az.
static String KEY_BOOTSTRAP
          True, if bootstrapping should be done
static String KEY_BOOTSTRAPCOVARIANT
          If true, use the covariance as weighs in bootstrapping.
static String KEY_BOOTSTRAPDUPLICATE
          If given, use this fraction of duplicated data for bootstrapping.
static String KEY_BOOTSTRAPNUMBER
          If given, use this number of simulated data sets for bootstrapping.
static String KEY_DALTDALT
          For the Jacobian of the old model, d(azold)/daz.
static String KEY_DALTDAZ
          For the Jacobian of the old model, d(azold)/daz.
static String KEY_DAZDALT
          For the Jacobian of the old model, d(azold)/daz.
static String KEY_DAZDAZ
          For the Jacobian of the old model, d(azold)/daz.
static String KEY_OLDALT
          The old azimuth model to be inverted on azimuth data.
static String KEY_OLDAZ
          The old azimuth model to be inverted on azimuth data.
private static Map<String,Integer> PRETTY
          For proper parsing of the variables.
 
Fields inherited from class util.PropertyBundles
KEY_LOCALECOUNTRY, KEY_LOCALELANGUAGE, KEY_RESOURCEBUNDLES
 
Fields inherited from class util.PropertyResources
KEY_NOINITONCREATE, localurl, locate, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_URL, urlset
 
Fields inherited from class util.PropertyContainer
KEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATOR
 
Fields inherited from interface util.ResourceSupplying
KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME
 
Fields inherited from interface util.PropertySupplying
CONFIG, KEY_CLASS
 
Constructor Summary
PointingModel(Map prop)
          Constructs a new pointing model using default normalized expressions.
PointingModel(Map prop, boolean pilar, boolean extended, boolean harmonic)
          Constructs a new pointing model.
 
Method Summary
 DataModel getAltitudeModel()
           
 VectorG getAltitudeSigma()
          Returns the sigma of the altitude model.
 VectorG getAltitudeSolution()
          Fits the offsets to the altitude model using linear regression.
 DataModel getAzimuthModel()
           
 VectorG getAzimuthSigma()
          Returns the sigma of the azimuth model.
 VectorG getAzimuthSolution()
          Fits the offsets to the azimuth model using linear regression.
 void init()
          Parses the model functions of the altuitude and azimuth model.
 void setAltitude(VectorG z)
          Sets the zenith distance data.
 void setAltitudeOffsets(VectorG off, VectorG err)
          Sets the measured zenith distance offsets and the erros, if available.
 void setAzimuth(VectorG az)
          Sets the azimuth data.
 void setAzimuthEncoderOffsets(VectorG off, VectorG err)
          Sets the azimuth data.
 void setAzimuthOffsets(VectorG off, VectorG err)
          Sets the measured azimuth offsets and the erros, if available.
 void setZenithDistance(VectorG z)
          Sets the zenith distance data.
 void setZenithOffsets(VectorG off, VectorG err)
          Sets the measured zenith distance offsets and the erros, if available.
 void subtractMean(VectorG nv)
          Replaces the measruements by the measurements minus their average
 
Methods inherited from class util.PropertyBundles
clone, getLocalized, getLocalized, getLocalizedString, getLocalizedString, loadResource
 
Methods inherited from class util.PropertyResources
createFrom, createFrom, createFrom, getApplet, getAsResources, getLocalClassLoader, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, keyCreate, keyCreate, reload, setApplet
 
Methods inherited from class util.PropertyContainer
augment, augment, augment, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, isNew, parseObject, reload, removeProperty, rescanned, setObject, setProperties, setProperty, stringProperties, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface util.ResourceSupplying
getResource, getResourceAsStream, getResources
 
Methods inherited from interface util.PropertySupplying
defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, parseObject, removeProperty, setObject, setProperty, stringProperties
 

Field Detail

KEY_OLDAZ

public static final String KEY_OLDAZ
The old azimuth model to be inverted on azimuth data.

See Also:
Constant Field Values

KEY_OLDALT

public static final String KEY_OLDALT
The old azimuth model to be inverted on azimuth data.

See Also:
Constant Field Values

KEY_DAZDAZ

public static final String KEY_DAZDAZ
For the Jacobian of the old model, d(azold)/daz.

See Also:
Constant Field Values

KEY_DAZDALT

public static final String KEY_DAZDALT
For the Jacobian of the old model, d(azold)/daz.

See Also:
Constant Field Values

KEY_DALTDAZ

public static final String KEY_DALTDAZ
For the Jacobian of the old model, d(azold)/daz.

See Also:
Constant Field Values

KEY_DALTDALT

public static final String KEY_DALTDALT
For the Jacobian of the old model, d(azold)/daz.

See Also:
Constant Field Values

KEY_AZMODEL

public static final String KEY_AZMODEL
The azimuth model.

See Also:
Constant Field Values

KEY_AZNAMES

public static final String KEY_AZNAMES
The azimuth model parameter names.

See Also:
Constant Field Values

KEY_ALTMODEL

public static final String KEY_ALTMODEL
The altitude model.

See Also:
Constant Field Values

KEY_ALTNAMES

public static final String KEY_ALTNAMES
The altitude model.

See Also:
Constant Field Values

KEY_BOOTSTRAP

public static final String KEY_BOOTSTRAP
True, if bootstrapping should be done

See Also:
Constant Field Values

KEY_BOOTSTRAPNUMBER

public static final String KEY_BOOTSTRAPNUMBER
If given, use this number of simulated data sets for bootstrapping.

See Also:
Constant Field Values

KEY_BOOTSTRAPDUPLICATE

public static final String KEY_BOOTSTRAPDUPLICATE
If given, use this fraction of duplicated data for bootstrapping.

See Also:
Constant Field Values

KEY_BOOTSTRAPCOVARIANT

public static final String KEY_BOOTSTRAPCOVARIANT
If true, use the covariance as weighs in bootstrapping.

See Also:
Constant Field Values

KEY_AZWEIGHTHEIGHT

public static final String KEY_AZWEIGHTHEIGHT
If true, we use the sine of the target height as a weight for az.

See Also:
Constant Field Values

DEFAZMODEL

private static final String DEFAZMODEL
The default expressions for the azimuth model, comma separated lists.

See Also:
Constant Field Values

DEFALTMODEL

private static final String DEFALTMODEL
The default expression for the altitude model.

See Also:
Constant Field Values

DEFAZNASMYTH

private static final String DEFAZNASMYTH
If pm was measured in Nasmith focus, the alt model has one additional term.

See Also:
Constant Field Values

DEFALTNASMYTH

private static final String DEFALTNASMYTH
If pm was measured in Nasmith focus, the alt model has one additional term.

See Also:
Constant Field Values

DEFAZCOUDE

private static final String DEFAZCOUDE
If pm was measured in coude focus, we have additional terms in az an el.

See Also:
Constant Field Values

DEFALTCOUDE

private static final String DEFALTCOUDE
If pm was measured in coude focus, we have additional terms in az an el.

See Also:
Constant Field Values

DEFAZ20MODEL

private static final String DEFAZ20MODEL
The default expressions for the azimuth model, height above 20.

See Also:
Constant Field Values

DEFALT20MODEL

private static final String DEFALT20MODEL
The default expression for the altitude model, height above 20.

See Also:
Constant Field Values

DEFAZMODELPILAR

private static final String DEFAZMODELPILAR
Expressions for the azimuth model compliant with PILAR.

See Also:
Constant Field Values

DEFALTMODELPILAR

private static final String DEFALTMODELPILAR
Expressions for the zenith distance model compliant with PILAR.

See Also:
Constant Field Values

DEFAZPILAREXTENDED

private static final String DEFAZPILAREXTENDED
Expressions for the extended azimuth model compliant with PILAR.

See Also:
Constant Field Values

DEFALTPILAREXTENDED

private static final String DEFALTPILAREXTENDED
Expressions for the extended altitude model compliant with PILAR.

See Also:
Constant Field Values

DEFAZMODELEXTENDED

private static final String DEFAZMODELEXTENDED
Expressions for the extended azimuth model compliant with PILAR.

See Also:
Constant Field Values

DEFALTMODELEXTENDED

private static final String DEFALTMODELEXTENDED
Expressions for the extended altitude model compliant with PILAR.

See Also:
Constant Field Values

DEFAZMODEL20EXTENDED

private static final String DEFAZMODEL20EXTENDED
Expressions for the extended azimuth model compliant with PILAR.

See Also:
Constant Field Values

DEFALTMODEL20EXTENDED

private static final String DEFALTMODEL20EXTENDED
Expressions for the extended altitude model compliant with PILAR.

See Also:
Constant Field Values

DEFHARMONIC2MODEL

private static final String DEFHARMONIC2MODEL
Expression for a harmonic model up to l=2.

See Also:
Constant Field Values

DEFHARMONIC3MODEL

private static final String DEFHARMONIC3MODEL
Expression for a harmonic model up to l=3.

See Also:
Constant Field Values

DEFHARMONIC4MODEL

private static final String DEFHARMONIC4MODEL
Expression for a harmonic model up to l=4.

See Also:
Constant Field Values

DEFHARMONIC5MODEL

private static final String DEFHARMONIC5MODEL
Expression for a harmonic model up to l=5.

See Also:
Constant Field Values

DEFHARMONIC6MODEL

private static final String DEFHARMONIC6MODEL
Expression for a harmonic model up to l=6.

See Also:
Constant Field Values

DEFHARMONIC7MODEL

private static final String DEFHARMONIC7MODEL
Expression for a harmonic model up to l=7.

See Also:
Constant Field Values

DEFHARMONIC8MODEL

private static final String DEFHARMONIC8MODEL
Expression for a harmonic model up to l=8.

See Also:
Constant Field Values

DEFHARMONICAZMODEL

private static final String DEFHARMONICAZMODEL
Expression for a harmonic model up to l=6, suited for azimuth.

See Also:
Constant Field Values

DEFHARMONICALTMODEL

private static final String DEFHARMONICALTMODEL
Expression for a harmonic model up to l=7, suited for altitude.

See Also:
Constant Field Values

DEFGREGORAZMODEL

private static final String DEFGREGORAZMODEL
Expression for GREGOR, az model.

See Also:
Constant Field Values

DEFGREGORALTMODEL

private static final String DEFGREGORALTMODEL
Expression for GREGOR, alt model.

See Also:
Constant Field Values

DEFGREGORNUMAZMODEL

private static final String DEFGREGORNUMAZMODEL
Expression for GREGOR, numerical az model.

See Also:
Constant Field Values

DEFGREGORNUMALTMODEL

private static final String DEFGREGORNUMALTMODEL
Expression for GREGOR, alt model.

See Also:
Constant Field Values

DEFGREGORNUM0AZMODEL

private static final String DEFGREGORNUM0AZMODEL
Expression for GREGOR, numerical az model.

See Also:
Constant Field Values

DEFGREGORNUM0ALTMODEL

private static final String DEFGREGORNUM0ALTMODEL
Expression for GREGOR, alt model.

See Also:
Constant Field Values

DEFGREGORAZNAMES

private static final String DEFGREGORAZNAMES
Constant names in the default gregor azimuth model.

See Also:
Constant Field Values

DEFGREGORALTNAMES

private static final String DEFGREGORALTNAMES
Constant names in the default gregor azimuth model.

See Also:
Constant Field Values

DEFGREGORNUMAZNAMES

private static final String DEFGREGORNUMAZNAMES
Constant names in the default gregor azimuth model.

See Also:
Constant Field Values

DEFGREGORNUMALTNAMES

private static final String DEFGREGORNUMALTNAMES
Constant names in the default gregor azimuth model.

See Also:
Constant Field Values

DEFAZNAMES

private static final String DEFAZNAMES
Constant names in the default azimuth model.

See Also:
Constant Field Values

DEFALTNAMES

private static final String DEFALTNAMES
Constant names in the default azimuth model.

See Also:
Constant Field Values

DEFNASMYTHAZNAMES

private static final String DEFNASMYTHAZNAMES
Constant names in the default nasmyth azimuth model.

See Also:
Constant Field Values

DEFNASMYTHALTNAMES

private static final String DEFNASMYTHALTNAMES
Constant names in the default nasmyth altitude model.

See Also:
Constant Field Values

DEFCOUDEAZNAMES

private static final String DEFCOUDEAZNAMES
Constant names in the default coude azimuth model.

See Also:
Constant Field Values

DEFCOUDEALTNAMES

private static final String DEFCOUDEALTNAMES
Constant names in the default coude altitude model.

See Also:
Constant Field Values

DEFAZNAMESEXTENDED

private static final String DEFAZNAMESEXTENDED
Constant names in the default azimuth model.

See Also:
Constant Field Values

DEFALTNAMESEXTENDED

private static final String DEFALTNAMESEXTENDED
Constant names in the default azimuth model.

See Also:
Constant Field Values

DEFAZNAMESPILAREXTENDED

private static final String DEFAZNAMESPILAREXTENDED
Constant names in the default azimuth model.

See Also:
Constant Field Values

DEFALTNAMESPILAREXTENDED

private static final String DEFALTNAMESPILAREXTENDED
Constant names in the default azimuth model.

See Also:
Constant Field Values

DEFNAMEHARMONIC2

private static final String DEFNAMEHARMONIC2
Constatn names in the harmonic model.

See Also:
Constant Field Values

DEFNAMEHARMONIC3

private static final String DEFNAMEHARMONIC3
Constatn names in the harmonic model.

See Also:
Constant Field Values

DEFNAMEHARMONIC4

private static final String DEFNAMEHARMONIC4
Constatn names in the harmonic model.

See Also:
Constant Field Values

DEFNAMEHARMONIC5

private static final String DEFNAMEHARMONIC5
See Also:
Constant Field Values

DEFNAMEHARMONIC6

private static final String DEFNAMEHARMONIC6
See Also:
Constant Field Values

DEFNAMEHARMONICAZ

private static final String DEFNAMEHARMONICAZ
Parameter names remaining for the azimuth model.

See Also:
Constant Field Values

DEFNAMEHARMONICALT

private static final String DEFNAMEHARMONICALT
Parameter names remaining for the altitude model.

See Also:
Constant Field Values

DEFNAMEHARMONIC7

private static final String DEFNAMEHARMONIC7
See Also:
Constant Field Values

DEFNAMEHARMONIC8

private static final String DEFNAMEHARMONIC8
See Also:
Constant Field Values

DEFAZWEIGHTHEIGHT

public static final boolean DEFAZWEIGHTHEIGHT
If true, we use the sine of the target height as a weight for az.

See Also:
Constant Field Values

DEFBOOTSTRAP

private static final boolean DEFBOOTSTRAP
The default usage of bootstrapping.

See Also:
Constant Field Values

DEFBOOTSTRAPNUMBER

private static final int DEFBOOTSTRAPNUMBER
The default number of simulated data set on bootstrapping.

See Also:
Constant Field Values

DEFBOOTSTRAPDUPLICATE

private static final double DEFBOOTSTRAPDUPLICATE
The default percentile of data replicas.

See Also:
Constant Field Values

DEFBOOTSTRAPCOVARIANT

private static final boolean DEFBOOTSTRAPCOVARIANT
The default usage of the covariance weights for bootstrapping.

See Also:
Constant Field Values

PRETTY

private static final Map<String,Integer> PRETTY
For proper parsing of the variables.


azmodel

private Multidimensional[] azmodel
The azimuth model, parsed from KEY_AZMODEL.


altmodel

private Multidimensional[] altmodel
The altitude model, parsed from KEY_ALTMODEL.


azalt

private VectorG[] azalt
The azimuth and zenith distance of the measurements, radian 0=az 1=z.


azoffset

private VectorG azoffset
The azimuth offsets measured.


azerror

private VectorG azerror
Errors of the azimuth offset measurements or null if not available.


altoffset

private VectorG altoffset
The zenith distance offsets measured.


alterror

private VectorG alterror
Errors of the altitude offset measurements or null if not available.


azsolution

private VectorG azsolution
Solution of the azimuth model, set with first call to getAzimuthSolution().


altsolution

private VectorG altsolution
Solution of the altitude model, set with first call to getAltitudeSolution().


azfit

private VectorG azfit
The azimuth model fit.


azresiduals

private VectorG azresiduals
Residuals of the azimuth model.


altfit

private VectorG altfit
The azimuth model fit.


altresiduals

private VectorG altresiduals
Residuals of the altitude model.


azsigma

private VectorG azsigma
Sigma on the azimuth solution, either covariance or bootstrap.


altsigma

private VectorG altsigma
Sigma on the altitude solution, either covariance or bootstrap.


azcovariance

private QuadMatrix azcovariance
The covariance matrix of the azimuth solution.


azcorrelation

private QuadMatrix azcorrelation
The covariance matrix of the azimuth solution devided by azsigma.


altcovariance

private QuadMatrix altcovariance
The covariance matrix of the altitude solution.


altcorrelation

private QuadMatrix altcorrelation
The covariance matrix of the altitude solution devided by altsigma.


azrms

private double azrms
The rms value of the azimuth solution.


azbootrms

private double azbootrms
The rms value of the azimuth solution, bootstrap fit.


azbootmin

private double azbootmin
The rms minimum of the azimuth solution, bootstrap fit.


azbootmax

private double azbootmax
The rms maximum of the azimuth solution, bootstrap fit.


azchi2

private double azchi2
The chi-square value of the azimuth solution.


azqual

private double azqual
The quality of the azimuth solution.


altbootrms

private double altbootrms
The rms value of the altitude solution, bootstrap fit..


altbootmin

private double altbootmin
The rms minimum of the altitude solution, bootstrap fit..


altbootmax

private double altbootmax
The rms maximum of the altitude solution, bootstrap fit..


altrms

private double altrms
The rms value of the altitude solution.


altchi2

private double altchi2
The chi-square value of the altitude solution.


altqual

private double altqual
The quality of the altitude solution.


azboot

private VectorG azboot
Average of the azimuth solution in bootstrapping.


azsigorg

private VectorG azsigorg
Covariance sigma in azimuth parameters in bootstrapping.


altboot

private VectorG altboot
Average of the altitude solution in bootstrapping.


altsigorg

private VectorG altsigorg
Covariance sigma in altitude parameters in bootstrapping.


azmin

private VectorG azmin
Minima of the azimuth solution in bootstrapping.


azmax

private VectorG azmax
Maxima of the azimuth solution in bootstrapping.


altmin

private VectorG altmin
Minima of the altitude solution in bootstrapping.


altmax

private VectorG altmax
Maxima of the altitude solution in bootstrapping.


aznames

private List aznames
The names of the azimuth parameters as a list.


altnames

private List altnames
The names of the altitude parameters as a list.

Constructor Detail

PointingModel

public PointingModel(Map prop)
Constructs a new pointing model using default normalized expressions.


PointingModel

public PointingModel(Map prop,
                     boolean pilar,
                     boolean extended,
                     boolean harmonic)
Constructs a new pointing model. Only defaults values, the parsing of the model fitting function is done in init(). If pilar is true, we use default expressions compliable with PILAR standard model.

Method Detail

init

public void init()
Parses the model functions of the altuitude and azimuth model.

Specified by:
init in interface Initializable
Overrides:
init in class PropertyResources

setAzimuth

public void setAzimuth(VectorG az)
Sets the azimuth data. As for the default model, azimuth must be given in radians. It does not matter if one uses astronomical or nautic azimuth here, but you must stay consistent.


setAltitude

public void setAltitude(VectorG z)
Sets the zenith distance data. As for the default model, zenith distance must be given in radians.


setZenithDistance

public void setZenithDistance(VectorG z)
Sets the zenith distance data. The zenith distance is converted into height here.


setAzimuthOffsets

public void setAzimuthOffsets(VectorG off,
                              VectorG err)
Sets the measured azimuth offsets and the erros, if available. The unit of the offset defines the unit of the fitting parameters, i.e. you can use arcminutes, degrees or radians here.

Parameters:
off - The measured offsets in azimuth.
err - Measurement errors or null.

setAzimuthEncoderOffsets

public void setAzimuthEncoderOffsets(VectorG off,
                                     VectorG err)
Sets the azimuth data. This method requires that the height data has been set before, because the azimuth is multiplied with cosine of the height.


setZenithOffsets

public void setZenithOffsets(VectorG off,
                             VectorG err)
Sets the measured zenith distance offsets and the erros, if available. The unit of the offset defines the unit of the fitting parameters, i.e. you can use arcminutes, degrees or radians here.

Parameters:
off - The measured offsets in zenith distance.
err - Measurement errors or null.

setAltitudeOffsets

public void setAltitudeOffsets(VectorG off,
                               VectorG err)
Sets the measured zenith distance offsets and the erros, if available. The unit of the offset defines the unit of the fitting parameters, i.e. you can use arcminutes, degrees or radians here.

Parameters:
off - The measured offsets in zenith distance.
err - Measurement errors or null.

getAzimuthSolution

public VectorG getAzimuthSolution()
Fits the offsets to the azimuth model using linear regression. If bootstrapping is disabled, we also set the sigmas of the solution using the diagonal elements of the covariance matrix in the linear model. This method call is the only possibility to set chi^2 and the quality of the solution.


getAltitudeSolution

public VectorG getAltitudeSolution()
Fits the offsets to the altitude model using linear regression. If bootstrapping is disabled, we also set the sigmas of the solution using the diagonal elements of the covariance matrix in the linear model.


getAzimuthSigma

public VectorG getAzimuthSigma()
Returns the sigma of the azimuth model. If bootstrapping is enabled, the sigma is calculated via a bootstrapping algoirthm, which is costly in time, but more reliable then the simple covariance matrix analysis done, if bootstrapping is disabled. Note that this is the only method to also set the bootstrapping statistical information azboot, azmin, and azmax.


getAltitudeSigma

public VectorG getAltitudeSigma()
Returns the sigma of the altitude model. If bootstrapping is enabled, the sigma is calculated via a bootstrapping algoirthm, which is costly in time, but more reliable then the simple covariance matrix analysis done, if bootstrapping is disabled. Note that this is the only method to also set the bootstrapping statistical information altboot, altmin, and altmax.


getAzimuthModel

public DataModel getAzimuthModel()

getAltitudeModel

public DataModel getAltitudeModel()

subtractMean

public void subtractMean(VectorG nv)
Replaces the measruements by the measurements minus their average