|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectutil.PropertyContainer
util.PropertyResources
util.PropertyBundles
stella.AbstractMerit
stella.xml.AbstractPhaseMerit
stella.xml.PhaseFillerMerit
public class PhaseFillerMerit
A class that tries to match observations such, that phase gaps are
minimized. It is intended for targets that have an unknown period at
observation start, but later, when a period has been established, the
gaps in phase space are gradually filled. For that, we do the following:
The current number of successful observations is used to construct a
number of phase slots in a way that the number of slots exceeds the number
of successful observations by at least one, but not more than
KEY_PHASESLOTS. On all these phase slots, that have already a
successful observation in it, the corresponding merit is set to zero.
If an observation is timed to fall in a non-null phase slot, a gaussian
peaking at the center of the slot and having a full-width half maximum
according to KEY_PHASEFWHM (in multiples of slot width) is
evaluated. The maximum merit is one.
The merit is end-point defining either if the maximum number of observation
has been reached, KEY_MAXOBS, and the number of open slots is
less then KEY_PHASESLOTS. If the phase uncertainty exceeds
the current slot width, the endpoint is also reached.
Zero in KEY_MAXOBS means unlimited number
of observations.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class util.PropertyResources |
|---|
PropertyResources.URLResource |
| Field Summary | |
|---|---|
private static int |
DEFMAXOBS
Default unlimited number of observations. |
private static double |
DEFPHASEFWHM
Default value for the width in phase space. |
private static double |
DEFPHASESHIFT
Default maximum phase shift. |
private static int |
DEFPHASESLOTS
Default increase in phase slots. |
static String |
KEY_MAXOBS
Observe at these distinct phases. |
static String |
KEY_PHASEFWHM
The key linked to FWHM of the observation intervall in phase space. |
static String |
KEY_PHASESHIFT
If the uncertainty shifts the phase more than this, we stop. |
static String |
KEY_PHASESLOTS
The number of phase points to observe. |
static String |
KEY_UNCERTAINTY
If set, the uncertainty in the period as a fraction of the period. |
private double[] |
phases
The list of phases we want to observe at. |
private static long |
serialVersionUID
|
| 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 | |
|---|---|
PhaseFillerMerit(Map<String,String> prop)
Constructs a phase-coherent merit. |
|
| Method Summary | |
|---|---|
private void |
clearPhases(HistoryAware target,
int back)
Grabs a target and goes backward through its success list, deleting on the way all phases already observed. |
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. |
boolean |
isCompleted(ParameterClustering set,
TargetDefinition target)
Check, if the observation is complete, which is the case if the number of unfilled period slots is less then KEY_PHASESLOTS
and if the total number of successful observations is
at least equal to KEY_MAXOBS. |
private boolean |
uncertainty(ParameterClustering set,
TargetDefinition target)
Return true if the relative phase shift exceed the limit. |
| Methods inherited from class stella.xml.AbstractPhaseMerit |
|---|
getDaysSinceT0, getHjd, getHjd, getPhase, getPhase, getT0, init |
| 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 |
|---|
private static final long serialVersionUID
public static final String KEY_PHASESLOTS
public static final String KEY_MAXOBS
public static final String KEY_UNCERTAINTY
public static final String KEY_PHASESHIFT
public static final String KEY_PHASEFWHM
private static final int DEFPHASESLOTS
private static final int DEFMAXOBS
private static final double DEFPHASEFWHM
private static final double DEFPHASESHIFT
private double[] phases
| Constructor Detail |
|---|
public PhaseFillerMerit(Map<String,String> prop)
AbstractMerit.createMerit(java.util.Map)
method. This create method also takes care of proper parameter
overloading.
| Method Detail |
|---|
public double getMerit(ParameterClustering set,
TargetDefinition target,
Collection ignore,
long within)
getMerit in interface Meritingset - Current observing conditions.target - The actual target.ignore - The list of targetes relevant to the actual target.within - The relevant time span in ms.
private void clearPhases(HistoryAware target,
int back)
private static final double forPhase(double phase,
double peak,
double sig)
phase - The merit phasepeak - The individual phase peak.sigma - Width of individual peak.
public boolean isCompleted(ParameterClustering set,
TargetDefinition target)
KEY_PHASESLOTS
and if the total number of successful observations is
at least equal to KEY_MAXOBS. If maxobs is zero, the only
completeness criterium is the uncertainty criterium (which may also
stop observations if maxobs is not reached):
This is done by matching
the phase shift due to period uncertainties to the maximum allowed
phase shift.
isCompleted in interface EndpointDefining
private boolean uncertainty(ParameterClustering set,
TargetDefinition target)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||