|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectutil.PropertyContainer
util.PropertyResources
util.PropertyBundles
util.rmi.RmiPropertyContainer
util.rmi.AbstractRmiCaster
util.rmi.AbstractRmiDataSink
jview.JDataSink
jview.JPhasePlot
public class JPhasePlot
A phase plot is a data sink that displays data with time as the independant
variable in a phased plot. We also listen to a Variable with names
defined in Phasing.
| Nested Class Summary | |
|---|---|
static class |
JPhasePlot.Plot
Reads a data file and plots the specified columns with the given phase and t0. |
| Nested classes/interfaces inherited from class util.PropertyResources |
|---|
PropertyResources.URLResource |
| Field Summary | |
|---|---|
static String |
AMPLITUDE
The RMS label string. |
static String |
DATATYPE
The type of data I can work on, or null if unknown. |
private static String |
DEFCANVASDEFAULT
Default property value. |
private static String |
DEFCANVASDELIM
|
private static String |
DEFCANVASKEY
|
private static int |
DEFDATAINDEX
Default property value. |
private static String |
DEFEQUAL
Default property value. |
private static int |
DEFFITPOINTS
Default property value. |
private static double |
DEFOVERLAP
Default property value. |
private static double |
DEFPERIOD
Default property value. |
private static double |
DEFPERIODRANGE
Default property value. |
private static double |
DEFPHIRANGE
Default property value. |
private static String |
DEFPOPUPACTIONS
Default property value. |
private static String |
DEFPOPUPCURSOR
|
private static String |
DEFSETCURSOR
Default property value. |
private static boolean |
DEFSHOWFIT
Default property value. |
private static double |
DEFSTARTPHI
Default property value. |
private static double |
DEFT0
Default property value. |
private static int |
DEFTIMEINDEX
Default property value. |
private PhaseRegression |
fit
The data I receive is also used in a phase fit (P=const).. |
private static String |
FITTING
How my fitting set is named. |
private static String |
FITTINGCOLOR
How my fitting set is colored . |
private static String |
FITTINGSHAPE
How my fitting set is named. |
private JLabel |
jamplitude
Changing label with the current amplitude value. |
private JLabel |
joff
Changing label with the current offset value. |
private JSpinner |
joutlier
The spinner that displays the outlier multiplier. |
private JLabel |
jperiod
Changing label with the current period value. |
private JLabel |
jrms
Changing label with the current rms value. |
private JLabel |
jt0
Changing label with the current t0 value. |
static String |
KEY_DATAINDEX
The index in the data-sink vector that is the measurement. |
static String |
KEY_EQUAL
The string to use for the labels as the equal sign. |
static String |
KEY_ERRORINDEX
The index in the data-sink vector that is the error, if we have one. |
static String |
KEY_FITPOINTS
Number of points in the fit, higher values are more smooth. |
static String |
KEY_OVERLAP
The overlap of the phase plot, in phases (data is shown twice). |
static String |
KEY_PERIOD
The period of the system. |
static String |
KEY_PERIODRANGE
The period range of the system. |
static String |
KEY_PHIRANGE
The period range of the system. |
static String |
KEY_SHOWFIT
If true, the fit to the data is shown. |
static String |
KEY_STARTPHI
The phase lag of the system. |
static String |
KEY_T0
The t0 of the system. |
static String |
KEY_TIMEINDEX
The index in the data-sink vector that is the time. |
private List<Object> |
keyed
This is the list of keys from timed that belong to phased data. |
private VectorG |
modelfit
The last solution to the phase regression. |
static String |
OFFSET
The RMS label string. |
private double |
orgper
The original period set in the properties, restored on data clear. |
private double |
orgt0
The original t0 set in the properties, restored on data clear. |
private static String |
OVERLAP
How my overplotting set is named. |
private static String |
OVERLAPCOLOR
How my overplotting set is colored. |
private static String |
OVERLAPSHAPE
How my overplotting set is shaped. |
private List<VectorG> |
phased
This is the data we plot, i.e. |
private JTunableSlider |
pslider
The slider where the user might adjust the period. |
static String |
RMS
The RMS label string. |
private Map<Object,VectorG> |
temporal
All data found to be removed is temporaly stored here for reput. |
private Map<Object,VectorG> |
timed
We bunker the original data. |
private JTunableSlider |
tslider
The slider where the user might adjust the zero point. |
private static String |
UNDEF
The string to be displayed on undefined . |
| Fields inherited from class jview.JDataSink |
|---|
DEFCURSOR, DEFSET, DEFSHAPE, KEY_CANVASDEFAULT, KEY_CANVASDELIM, KEY_CANVASFILE, KEY_CANVASKEY, KEY_POPUPACTIONS, KEY_POPUPCURSOR, KEY_SETCURSOR |
| Fields inherited from class util.rmi.AbstractRmiDataSink |
|---|
KEY_BIND |
| Fields inherited from class util.rmi.AbstractRmiCaster |
|---|
ALTERNATEHOST, ALTERNATEPORT, KEY_BINDNAME, KEY_EXPORTPORT, KEY_REGISTRYHOST, KEY_REGISTRYPORT |
| 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 | |
|---|---|
JPhasePlot(Map<String,String> prop)
We construct a phase plot and defer the construction of the data canvas to the parental method. |
|
| Method Summary | |
|---|---|
boolean |
addData(Map<Object,VectorG> d)
We set the mapping of data points. |
private boolean |
applyTimedToCanvas()
We apply the entire data map to the plotting canvas, taking the period and the t0 from my properties. |
private boolean |
applyTimedToCanvas(double p,
double t0,
double phi0)
We apply the entire data map to the plotting canvas. |
private boolean |
applyTimedToFit()
We convert our entire data into a data model for the phase fit. |
boolean |
clearData()
We clear all data. |
void |
dataChanged(DataChangeEvent dce)
This event is received, if the user manipulated the data. |
private double |
fitShift(double p,
double t0)
We have a prescribed zero point in time. |
protected String |
getDrawingSets()
We add the overlap in the same color as the main data, the fit is in cyan. |
protected String |
getDrawingShapes()
We add the overlap in the same shape as the main data, the fit is a shallow line. |
Component |
getRepresentation()
We return a panel that has a horizontal slider for the period and a vertical one for T0. |
int |
highlightOutliers(double maxdev)
We highlight all outliers from the spinner value. |
void |
init()
We initialize the phase-regression, which calculates amplitude, offset and phase delay if data are fed in. |
boolean |
metaData(Map<String,? extends Serializable> indices)
We set the meta data. |
boolean |
rmiSetVariable(Variable to)
We register an outside variable. |
boolean |
setVariable(Variable to)
Local version of setting a variable. |
private VectorG |
solveFit(double p)
We solve the phase regression and return the phase shift of the solution. |
private boolean |
updateConstants(double p,
double t0,
double phi0)
We do not reconstruct the phased array, just update the x coordinates of the plot data. |
private boolean |
updateFit(double p,
double t0,
double phi0)
We update our fit by solving for amplitude, phase offset and data offset. |
private boolean |
updateOverlap()
We update the overlap, i.e. |
| Methods inherited from class jview.JDataSink |
|---|
acceptsData, addData, getCanvas, getCursorClasses, getHighlighted, getHighlighted, getIcon, highlight, highlight, rmiAddData, rmiAddData, rmiClearData, rmiMetaData, setData, setData |
| Methods inherited from class util.rmi.AbstractRmiDataSink |
|---|
rmiAcceptsData, rmiSetData, rmiSetData |
| Methods inherited from class util.rmi.AbstractRmiCaster |
|---|
bindAlternate, bindToRegistry, bindToRegistry, bindToRegistry, casterExit, casterExit, exit, getBindName, getBindName, isValid, unbindFromRegistry, unbindFromRegistry |
| Methods inherited from class util.rmi.RmiPropertyContainer |
|---|
containsRemoteProperty, getRemoteProperties, getRemoteProperty, setRemoteProperty |
| 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 |
|---|
public static final String DATATYPE
public static final String AMPLITUDE
public static final String OFFSET
public static final String RMS
public static final String KEY_EQUAL
public static final String KEY_TIMEINDEX
public static final String KEY_DATAINDEX
public static final String KEY_ERRORINDEX
public static final String KEY_PERIOD
public static final String KEY_T0
public static final String KEY_STARTPHI
public static final String KEY_PERIODRANGE
public static final String KEY_PHIRANGE
public static final String KEY_OVERLAP
public static final String KEY_SHOWFIT
public static final String KEY_FITPOINTS
private static final String OVERLAP
private static final String OVERLAPCOLOR
private static final String OVERLAPSHAPE
private static final String FITTING
private static final String FITTINGCOLOR
private static final String FITTINGSHAPE
private static final String UNDEF
private static final String DEFEQUAL
private static final int DEFTIMEINDEX
private static final int DEFDATAINDEX
private static final double DEFPERIOD
private static final double DEFT0
private static final double DEFSTARTPHI
private static final double DEFPERIODRANGE
private static final double DEFPHIRANGE
private static final double DEFOVERLAP
private static final boolean DEFSHOWFIT
private static final int DEFFITPOINTS
private static final String DEFSETCURSOR
private static final String DEFPOPUPACTIONS
private static final String DEFPOPUPCURSOR
private static final String DEFCANVASDEFAULT
private static final String DEFCANVASDELIM
private static final String DEFCANVASKEY
private Map<Object,VectorG> timed
private Map<Object,VectorG> temporal
private List<VectorG> phased
private List<Object> keyed
private PhaseRegression fit
private VectorG modelfit
private JTunableSlider pslider
private JTunableSlider tslider
private JLabel jperiod
private JLabel jt0
private JLabel jamplitude
private JLabel joff
private JLabel jrms
private JSpinner joutlier
private double orgper
private double orgt0
| Constructor Detail |
|---|
public JPhasePlot(Map<String,String> prop)
throws RemoteException
RemoteException| Method Detail |
|---|
public void init()
init in interface Initializableinit in class JDataSinkpublic Component getRepresentation()
getRepresentation in interface DisplayablegetRepresentation in class JDataSink
public boolean rmiSetVariable(Variable to)
throws RemoteException
Phasing
variables, we update our sliders accordingly. Note that the fitting
procedure (also issued on slider rest) produces the amplitude, offset and
a phase shift, also named t0, which is in this content than a time-lag
between this (photometric?) curve and an outside (spectroscopic?) zero
point.
rmiSetVariable in interface RmiVariableDependingRemoteExceptionprotected String getDrawingSets()
getDrawingSets in class JDataSinkprotected String getDrawingShapes()
getDrawingShapes in class JDataSinkpublic boolean setVariable(Variable to)
setVariable in interface VariableDependingpublic void dataChanged(DataChangeEvent dce)
dataChanged in interface DataObserverpublic boolean clearData()
clearData in interface DataSinkclearData in class JDataSinkpublic boolean metaData(Map<String,? extends Serializable> indices)
KEY_TIMEINDEX: The index in VectorG that holds the time.KEY_DATAINDEX: The index in the VectorG that holds the
measurement.KEY_ERRORINDEX: The index in the VectorG that holds the
error to the measurement.
metaData in interface DataSinkmetaData in class JDataSinkpublic boolean addData(Map<Object,VectorG> d)
addData in interface DataSinkpublic int highlightOutliers(double maxdev)
private boolean applyTimedToFit()
private boolean applyTimedToCanvas()
private boolean applyTimedToCanvas(double p,
double t0,
double phi0)
private boolean updateOverlap()
OVERLAP style, which is in the default setup the
generic style.
private boolean updateConstants(double p,
double t0,
double phi0)
private VectorG solveFit(double p)
private double fitShift(double p,
double t0)
private boolean updateFit(double p,
double t0,
double phi0)
FITTING
style, if KEY_SHOWFIT points to true.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||