public class PhaseFillerMerit extends AbstractPhaseMerit implements EndpointDefining, Initializable
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.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.| Modifier and Type | Field and Description |
|---|---|
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 |
KEY_HJDCORRECTION, KEY_JD, KEY_PERIODDAY, KEY_USEHJD, KEY_ZEROPHASEKEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATORCONFIG, KEY_CLASS| Constructor and Description |
|---|
PhaseFillerMerit(Map<String,String> prop)
Constructs a phase-coherent merit.
|
| Modifier and Type | Method and Description |
|---|---|
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(GlobalGrouping set,
Appointable target,
Collection ignore,
long within)
Calculates the actual time slot merit.
|
boolean |
isCompleted(GlobalGrouping set,
Appointable 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(GlobalGrouping set,
Appointable target)
Return true if the relative phase shift exceed the limit.
|
getDaysSinceT0, getHjd, getHjd, getPeriodsSinceT0, getPhase, getPhase, getT0, initcreateMerit, getInitializer, initMeritaugment, augment, augment, augment, augment, clone, 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, initProperties, isNew, parseObject, parseObject, reload, reload, removeProperty, requires, rescanned, setObject, setProperties, setProperty, stringProperties, toStringequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitinitprivate 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
public PhaseFillerMerit(Map<String,String> prop)
AbstractMerit.createMerit(java.util.Map<java.lang.String, java.lang.String>) method.
This create method also takes care of proper parameter
overloading.public double getMerit(GlobalGrouping set, Appointable target, Collection ignore, long within)
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(GlobalGrouping set, Appointable 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 EndpointDefiningprivate boolean uncertainty(GlobalGrouping set, Appointable target)