stella.util
Class PointingFunction

java.lang.Object
  extended by stella.util.PointingFunction
All Implemented Interfaces:
VectorFunction
Direct Known Subclasses:
PointingFunction.ClassicModel, PointingFunction.ExtendedModel, PointingFunction.FullModel

public abstract class PointingFunction
extends Object
implements VectorFunction

Pointing functions are the Multidimensionals used for a pointing model in Pilar. They are only used in conjunction with Pilar3 action to allow some usage of the built-in pointing model. In particular, they should enable the master to properly query a pointing model from Pilar: get POINTING.MODEL.TYPE 0=none, 1=classic, 2=extended pm = PointigFunction.createFromType() for (parname : pm.getParameters()) p = get POINTING.MODEL.[CLASSIC|EXTENDED].parname pm.setParameter(parname, p) and then use it with the queried az alt POSITION.HORIZONTAL.AZ and POSITION.HORIZONTAL.ALT in Vector2D daz,dalt = pm.evaluate() A nice present is the version change in Pilar. Suddenly more parameters are added and additionally their name changes. TSI does not provide a method to ask for the names of the parameters present, there is the vague possibility to trace that via the version number. To circumvent these fallacy, there is a hardcoded VERSION, which points to EXTENDED.FULL foer versions zero and to EXTENDED.EXTENDED in others. I'm sure this gone change again, so sit tight.


Nested Class Summary
static class PointingFunction.ClassicModel
          The classical pointing model.
static class PointingFunction.ExtendedModel
          The extended pointing model.
static class PointingFunction.FullModel
          The extended pointing model for version zero.
 
Field Summary
static String[] POINTINGMODELS
          Pointing models known.
private static int VERSION
          Workaround for changing variable names.
 
Constructor Summary
PointingFunction()
           
 
Method Summary
 int argumentDimension()
          We act on az/alt, thus we return 2 here.
static PointingFunction createFromType(int type, int version)
          We create a pointing function from a POINTING.MODEL.TYPE Currently, zero, one and 2 are supported.
 int functionDimension()
          The default implementation returns two corrections one fror az and alt.
abstract  String getModelName()
          Returns the name of this model.
abstract  Set<String> getParameterNames()
          Returns the parameter names as known by pilar.
abstract  boolean setParameter(String name, double value)
          Sets one parameter by its name to a certain value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface vec_math.VectorFunction
evaluate
 

Field Detail

VERSION

private static final int VERSION
Workaround for changing variable names.

See Also:
Constant Field Values

POINTINGMODELS

public static final String[] POINTINGMODELS
Pointing models known. Index is the type in OpenTSI.

Constructor Detail

PointingFunction

public PointingFunction()
Method Detail

argumentDimension

public int argumentDimension()
We act on az/alt, thus we return 2 here.

Specified by:
argumentDimension in interface VectorFunction

functionDimension

public int functionDimension()
The default implementation returns two corrections one fror az and alt. Subclasses may include derotator and dome offsets.

Specified by:
functionDimension in interface VectorFunction

getModelName

public abstract String getModelName()
Returns the name of this model. This is used in querying the parameters from Pilar.


getParameterNames

public abstract Set<String> getParameterNames()
Returns the parameter names as known by pilar.


setParameter

public abstract boolean setParameter(String name,
                                     double value)
Sets one parameter by its name to a certain value.

Returns:
True, if the parameter is valid (and in a valid range).

createFromType

public static PointingFunction createFromType(int type,
                                              int version)
We create a pointing function from a POINTING.MODEL.TYPE Currently, zero, one and 2 are supported.