|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object mavis.MeasurementStep
public class MeasurementStep
A single step in a measurement sequence. Each step can include multiple measurements for improved precision. A step can have a different volume and mass than the related project, but by default the volume and mass of the project will be used. Any changes made to the measurement step will invoke the project's autosaving. Only the project may change the state and results of a measurement step.
All operations are thread-safe.
Nested Class Summary | |
---|---|
static class |
MeasurementStep.State
The state of a measurement step. |
Field Summary | |
---|---|
private double |
mass
The mass of this step's sample, or a negative number to use the project's default mass. |
static int |
ORIGO_STEP
|
private Project |
project
The project that owns this step, or null if there is no owner. |
private java.util.List<MeasurementResult> |
results
The individual measurement results that are part of this measurement step. |
private boolean |
signalToDriftWarning
Tells if the step's signal to drift ratio is below the threshold. |
private boolean |
signalToHolderWarning
Tells if the step's signal to holder noise ratio is below the threshold. |
private boolean |
signalToNoiseWarning
Tells if the step's signal to noise ratio is below the threshold. |
private MeasurementStep.State |
state
Tells if this step has been completed or not, or if a measurement is still running. |
private double |
stepValue
The AF or Thermal value of this step, or a negative number if it has not been specified. |
private java.lang.Double |
susceptibility
The susceptibility of this step's sample, or null to use the project's default volume. |
private boolean |
theta63Warning
Tells if the step's theta 63 is above the threshold. |
private java.util.Date |
timestamp
The time the measurements were completed, or null if that has not yet happened. |
private double |
volume
The volume of this step's sample, or a negative number to use the project's default volume. |
Constructor Summary | |
---|---|
MeasurementStep()
Creates a blank measurement step. |
|
MeasurementStep(org.w3c.dom.Element element)
Creates a measurement step from the specified element. |
|
MeasurementStep(org.w3c.dom.Element element,
Project project)
Creates a measurement step from the specified element for a project. |
|
MeasurementStep(Project project)
Creates a blank measurement step for a project. |
Method Summary | |
---|---|
void |
checkMeasurement()
Checks if the signal to noise, signal to drift or signal to holder ratios are below the safe threshold and if theta63 is above the safe threshold and raise warning flags if necessary. |
java.lang.Double[] |
getDoubleNoiseVectorN(int n)
|
org.w3c.dom.Element |
getElement(org.w3c.dom.Document document)
Exports this step to a DOM element. |
javax.vecmath.Vector3d |
getHolder()
Returns the average of the holder results (raw values). |
double |
getMass()
Returns the mass of this step's sample, or a negative number to use the project's default mass. |
int |
getMeasurementsCount()
|
javax.vecmath.Vector3d |
getNoise()
Returns the average of the noise results (raw values). |
javax.vecmath.Vector3d |
getNoiseVectorN(int n)
Returns the Nth noise results vector (raw values), 1 is the first one. |
Project |
getProject()
Returns the owner project of this step, or null if there is no owner. |
MeasurementResult |
getResult(int index)
Returns the specified result from this step. |
int |
getResults()
Returns the number of results in this step. |
boolean |
getSignalToDriftWarning()
Called to see if the signal to drift warning has been raised. |
boolean |
getSignalToHolderWarning()
Called to see if the signal to holder warning has been raised. |
boolean |
getSignalToNoiseWarning()
Called to see if the signal to noise warning has been raised. |
MeasurementStep.State |
getState()
Tells if this step has been completed or not, or if a measurement is still running. |
double |
getStepValue()
Returns the AF/Thermal value of this step, or a negative number if it has not been specified. |
java.lang.Double |
getSusceptibility()
Returns the susceptibility of this step's sample, or null to use the project's default susceptibility. |
boolean |
getTheta63Warning()
Called to see if the theta63 warning has been raised. |
java.util.Date |
getTimestamp()
Returns the time the measurements were completed, or null if that has not yet happened. |
boolean |
getWarnings()
Called to see if any warnings have been raised. |
double |
getVolume()
Returns the volume of this step's sample, or a negative number to use the project's default volume. |
boolean |
isDone()
Called to see if this step has been marked as done i.e. completed. |
java.util.Iterator<MeasurementResult> |
iterator()
Returns an iterator for iterating through this step's measurement results. |
void |
save()
Invokes the owner project's autosaving. |
void |
setMass(double mass)
Sets the mass of this step's sample. |
void |
setMeasuring()
Called when the step's measurements are started. |
void |
setStepValue(double stepValue)
Sets the value of this step. |
void |
setSusceptibility(java.lang.Double susceptibility)
Sets the susceptibility of this step's sample. |
void |
setVolume(double volume)
Sets the volume of this step's sample. |
protected void |
updateTransforms()
Updates all of the measurement results with the owner project's transformation matrix and applies the noise and holder fixes. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int ORIGO_STEP
private final Project project
private MeasurementStep.State state
private java.util.Date timestamp
private double stepValue
private double mass
private double volume
private java.lang.Double susceptibility
private final java.util.List<MeasurementResult> results
private boolean signalToNoiseWarning
private boolean signalToDriftWarning
private boolean signalToHolderWarning
private boolean theta63Warning
Constructor Detail |
---|
public MeasurementStep()
public MeasurementStep(Project project)
project
- the project who is the owner of this step.public MeasurementStep(org.w3c.dom.Element element)
element
- the element from which this step will be created.
java.lang.NullPointerException
- if element is null.
java.lang.IllegalArgumentException
- if the element was not in the right format.public MeasurementStep(org.w3c.dom.Element element, Project project)
element
- the element from which this step will be created.project
- the project who is the owner of this step.
java.lang.NullPointerException
- if element is null.
java.lang.IllegalArgumentException
- if the element was not in the right format.Method Detail |
---|
public org.w3c.dom.Element getElement(org.w3c.dom.Document document)
document
- the document that will contain this element.public void save()
public Project getProject()
public MeasurementStep.State getState()
public java.util.Date getTimestamp()
public double getStepValue()
public void setStepValue(double stepValue)
java.lang.IllegalStateException
- if the step's state is not READY.public double getMass()
public void setMass(double mass)
public double getVolume()
public void setVolume(double volume)
public java.lang.Double getSusceptibility()
public void setSusceptibility(java.lang.Double susceptibility)
protected void updateTransforms()
public int getResults()
public MeasurementResult getResult(int index)
index
- the index of the result.
java.lang.IndexOutOfBoundsException
- if the index is out of range (index < 0 || index >= getResults()).public void setMeasuring()
java.lang.IllegalStateException
- if this method is called when the state is marked as DONE.public boolean isDone()
public javax.vecmath.Vector3d getHolder()
public javax.vecmath.Vector3d getNoise()
public javax.vecmath.Vector3d getNoiseVectorN(int n)
public java.lang.Double[] getDoubleNoiseVectorN(int n)
public java.util.Iterator<MeasurementResult> iterator()
iterator
in interface java.lang.Iterable<MeasurementResult>
public int getMeasurementsCount()
public void checkMeasurement()
public boolean getSignalToNoiseWarning()
public boolean getSignalToDriftWarning()
public boolean getSignalToHolderWarning()
public boolean getTheta63Warning()
public boolean getWarnings()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |