stella.xml
Class PhaseMerit

java.lang.Object
  extended by util.PropertyContainer
      extended by util.PropertyResources
          extended by util.PropertyBundles
              extended by stella.AbstractMerit
                  extended by stella.xml.AbstractPhaseMerit
                      extended by stella.xml.PhaseMerit
All Implemented Interfaces:
Serializable, Cloneable, EndpointDefining, Meriting, Initializable, LocalizedSupplying, PropertySupplying, ResourceSupplying

public class PhaseMerit
extends AbstractPhaseMerit
implements EndpointDefining

A class defining a time-slot merit that allows observation of a target that requires phased observations. This merit is similar to PhaseCoherentMerit, but it defines the frequnecy slot with respect to a defined t0, given as an HJD. If the KEY_AIMN property is set, the observational phases are equally spaced like in Doppler imaging observation, otherwise KEY_ATPHASES defines a list of observational phases. The merit does not increase with the number of successful observations like the PhaseCoherentMerit.
It is endpoint defining, but only if the KEY_UNCERTAINTY is set, then it ends when the phase error extends KEY_PHASESHIFT. The phase error is:

   δφ=δP/P*(φ+int((t-t0)/P)/P)+1/P*int((t-t0)δP/P²)
   
This merit can be combined with a ConstantMerit or a OneObservationMerit to further constrain target picking.
This merit also incorporates the EndpointDefining interface. The isCompleted(stella.ParameterClustering, stella.TargetDefinition) method returns true as soon as all phase-requested observations have been made.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class util.PropertyResources
PropertyResources.URLResource
 
Field Summary
private static double DEFPHASESHIFT
          Default maximum phase shift.
private static String DEFWIDTH
          Default value for the width in phase space.
static String KEY_AIMN
          The number of phase points to observe.
static String KEY_ATPHASES
          Observe at these distinct phases.
static String KEY_PHASESHIFT
          If the uncertainty shifts the phase more than this, we stop.
static String KEY_UNCERTAINTY
          If set, the uncertainty in the period as a fraction of the period.
static String KEY_WIDTH
          The key linked to width of the observation intervall in phase space.
private  List<Double> phases
          The list of phases we want to observe at.
private static long serialVersionUID
           
private  List<Double> width
          And their width.
 
Fields inherited from class stella.xml.AbstractPhaseMerit
KEY_HJDCORRECTION, KEY_JD, KEY_PERIODDAY, KEY_ZEROPHASE
 
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
PhaseMerit(Map<String,String> prop)
          Constructs a phase-coherent merit.
 
Method Summary
private static double forPhase(double phase, double peak, double sig)
          Calculates the merit at the current phase for the given peak location and shape.
 double getMerit(ParameterClustering set, TargetDefinition target, Collection ignore, long within)
          Calculates the actual time slot merit.
 void init()
          Generates the list of phases we want to observe.
 boolean isCompleted(ParameterClustering set, TargetDefinition target)
          Check, if the observation is complete.
 
Methods inherited from class stella.xml.AbstractPhaseMerit
getDaysSinceT0, getHjd, getHjd, getPhase, getPhase, getT0
 
Methods inherited from class stella.AbstractMerit
createMerit, getInitializer, initMerit
 
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 stella.Meriting
getInitializer, initMerit
 
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

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

KEY_AIMN

public static final String KEY_AIMN
The number of phase points to observe.

See Also:
Constant Field Values

KEY_ATPHASES

public static final String KEY_ATPHASES
Observe at these distinct phases.

See Also:
Constant Field Values

KEY_UNCERTAINTY

public static final String KEY_UNCERTAINTY
If set, the uncertainty in the period as a fraction of the period.

See Also:
Constant Field Values

KEY_PHASESHIFT

public static final String KEY_PHASESHIFT
If the uncertainty shifts the phase more than this, we stop.

See Also:
Constant Field Values

KEY_WIDTH

public static final String KEY_WIDTH
The key linked to width of the observation intervall in phase space.

See Also:
Constant Field Values

DEFWIDTH

private static final String DEFWIDTH
Default value for the width in phase space.

See Also:
Constant Field Values

DEFPHASESHIFT

private static final double DEFPHASESHIFT
Default maximum phase shift.

See Also:
Constant Field Values

phases

private List<Double> phases
The list of phases we want to observe at.


width

private List<Double> width
And their width.

Constructor Detail

PhaseMerit

public PhaseMerit(Map<String,String> prop)
Constructs a phase-coherent merit. At least the period should be stated in the target definition. Proper creation should be done using the AbstractMerit.createMerit(java.util.Map) method. This create method also takes care of proper parameter overloading.

Method Detail

init

public void init()
Generates the list of phases we want to observe.

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

getMerit

public double getMerit(ParameterClustering set,
                       TargetDefinition target,
                       Collection ignore,
                       long within)
Calculates the actual time slot merit. The current time is substracted from the first successful observation of the target. The remaining value is used in a multiple Gauss-curve in phase space to calculate a merit.

Specified by:
getMerit in interface Meriting
Parameters:
set - Current observing conditions.
target - The actual target.
ignore - The list of targetes relevant to the actual target.
within - The relevant time span in ms.

forPhase

private static final double forPhase(double phase,
                                     double peak,
                                     double sig)
Calculates the merit at the current phase for the given peak location and shape.

Parameters:
phase - The merit phase
peak - The individual phase peak.
sigma - Width of individual peak.
sharp - The power in the Hoerl-like function.

isCompleted

public boolean isCompleted(ParameterClustering set,
                           TargetDefinition target)
Check, if the observation is complete. Again, this is done by matching the phase shift due to period uncertainties to the maximum allowed phase shift.

Specified by:
isCompleted in interface EndpointDefining