Main Page | Packages | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

ikayaki.MeasurementStep Class Reference

Collaboration diagram for ikayaki.MeasurementStep:

Collaboration graph
[legend]
List of all members.

Public Types

enum  State { false, false, true, done = done }

Public Member Functions

 MeasurementStep ()
 MeasurementStep (Project project)
 MeasurementStep (Element element)
 MeasurementStep (Element element, Project project)
synchronized Element getElement (Document document)
void save ()
synchronized Project getProject ()
synchronized State getState ()
synchronized Date getTimestamp ()
synchronized double getStepValue ()
synchronized void setStepValue (double stepValue)
synchronized double getMass ()
synchronized void setMass (double mass)
synchronized double getVolume ()
synchronized void setVolume (double volume)
synchronized double getSusceptibility ()
synchronized void setSusceptibility (double susceptibility)
synchronized int getResults ()
synchronized MeasurementResult getResult (int index)
synchronized void addResult (MeasurementResult result)
synchronized void setMeasuring ()
synchronized void setDone ()
synchronized Vector3d getHolder ()
synchronized Vector3d getNoise ()
Iterator< MeasurementResultiterator ()

Protected Member Functions

synchronized void updateTransforms ()

Private Attributes

final Project project
State state = State.READY
Date timestamp = null
double stepValue = -1.0
double mass = -1.0
double volume = -1.0
double susceptibility = -1.0
final List< MeasurementResultresults = new ArrayList<MeasurementResult>()

Detailed Description

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. <p/> All operations are thread-safe.

Author:
Esko Luontola

Definition at line 48 of file MeasurementStep.java.


Member Enumeration Documentation

enum ikayaki::MeasurementStep::State
 

The state of a measurement step.

Enumeration values:
false 
false 
true 
done  When the step's state is "done", no changes to the measurements are any more allowed.

Definition at line 549 of file MeasurementStep.java.


Constructor & Destructor Documentation

ikayaki.MeasurementStep.MeasurementStep  ) 
 

Creates a blank measurement step.

Definition at line 96 of file MeasurementStep.java.

References ikayaki.MeasurementStep.project.

ikayaki.MeasurementStep.MeasurementStep Project  project  ) 
 

Creates a blank measurement step for a project.

Parameters:
project the project who is the owner of this step.

Definition at line 105 of file MeasurementStep.java.

ikayaki.MeasurementStep.MeasurementStep Element  element  ) 
 

Creates a measurement step from the specified element. Will update the transformation matrices.

Parameters:
element the element from which this step will be created.
Exceptions:
NullPointerException if element is null.
IllegalArgumentException if the element was not in the right format.

Definition at line 116 of file MeasurementStep.java.

ikayaki.MeasurementStep.MeasurementStep Element  element,
Project  project
 

Creates a measurement step from the specified element for a project. Will update the transformation matrices.

Parameters:
element the element from which this step will be created.
project the project who is the owner of this step.
Exceptions:
NullPointerException if element is null.
IllegalArgumentException if the element was not in the right format.

Definition at line 128 of file MeasurementStep.java.

References ikayaki.MeasurementStep.results, ikayaki.MeasurementStep.setMass(), ikayaki.MeasurementStep.setStepValue(), ikayaki.MeasurementStep.setSusceptibility(), ikayaki.MeasurementStep.setVolume(), ikayaki.MeasurementStep.state, ikayaki.MeasurementStep.stepValue, ikayaki.MeasurementStep.timestamp, and ikayaki.MeasurementStep.updateTransforms().

Here is the call graph for this function:


Member Function Documentation

synchronized void ikayaki.MeasurementStep.addResult MeasurementResult  result  ) 
 

Appends a measurement result to this step. This method may be called only for a steps whose state is READY or MEASURING. <p/> Sets the timestamp to the current time. Sets the state to MEASURING. The transformation matrix of the result will be updated automatically.

Parameters:
result the result to be added.
Exceptions:
NullPointerException if result is null.
IllegalStateException if this step's state is not READY or MEASURING.

Definition at line 424 of file MeasurementStep.java.

References ikayaki.MeasurementStep.getProject(), ikayaki.Project.isHolderCalibration(), ikayaki.MeasurementStep.results, ikayaki.MeasurementStep.save(), ikayaki.MeasurementStep.setMeasuring(), ikayaki.MeasurementStep.state, ikayaki.MeasurementStep.timestamp, and ikayaki.MeasurementStep.updateTransforms().

Referenced by ikayaki.Project.ManualMeasure.run(), ikayaki.Project.DummyMeasurement.run(), and ikayaki.Project.Measurement.run().

Here is the call graph for this function:

synchronized Element ikayaki.MeasurementStep.getElement Document  document  ) 
 

Exports this step to a DOM element.

Parameters:
document the document that will contain this element.

Definition at line 220 of file MeasurementStep.java.

References ikayaki.MeasurementStep.mass, ikayaki.MeasurementStep.results, ikayaki.MeasurementStep.stepValue, ikayaki.MeasurementStep.susceptibility, ikayaki.MeasurementStep.timestamp, and ikayaki.MeasurementStep.volume.

synchronized Vector3d ikayaki.MeasurementStep.getHolder  ) 
 

Returns the average of the holder results (raw values). If there are no holder results or this is the holder calibration project itself, will return a zero-filled vector.

Definition at line 481 of file MeasurementStep.java.

References ikayaki.MeasurementStep.getProject(), and ikayaki.MeasurementStep.results.

Referenced by ikayaki.MeasurementResult.applyFixes().

Here is the call graph for this function:

synchronized double ikayaki.MeasurementStep.getMass  ) 
 

Returns the mass of this step's sample, or a negative number to use the project's default mass. The unit is gram.

Definition at line 327 of file MeasurementStep.java.

References ikayaki.MeasurementStep.mass.

Referenced by ikayaki.NormalizedValue.normalize().

synchronized Vector3d ikayaki.MeasurementStep.getNoise  ) 
 

Returns the average of the noise results (raw values). If there are no noise results, will return a zero-filled vector.

Definition at line 505 of file MeasurementStep.java.

References ikayaki.MeasurementStep.results.

Referenced by ikayaki.MeasurementResult.applyFixes().

synchronized Project ikayaki.MeasurementStep.getProject  ) 
 

Returns the owner project of this step, or null if there is no owner.

Definition at line 254 of file MeasurementStep.java.

References ikayaki.MeasurementStep.project.

Referenced by ikayaki.gui.StereoPlot.add(), ikayaki.gui.IntensityPlot.add(), ikayaki.MeasurementStep.addResult(), ikayaki.MeasurementResult.applyFixes(), ikayaki.MeasurementStep.getHolder(), ikayaki.gui.MeasurementDetailsPanel.DetailsTableModel.getRowCount(), ikayaki.gui.MeasurementDetailsPanel.DetailsTableModel.getValueAt(), ikayaki.NormalizedValue.normalize(), and ikayaki.MeasurementStep.setStepValue().

synchronized MeasurementResult ikayaki.MeasurementStep.getResult int  index  ) 
 

Returns the specified result from this step.

Parameters:
index the index of the result.
Returns:
the specified result.
Exceptions:
IndexOutOfBoundsException if the index is out of range (index < 0 || index >= getResults()).

Definition at line 409 of file MeasurementStep.java.

References ikayaki.MeasurementStep.results.

Referenced by ikayaki.gui.MeasurementDetailsPanel.DetailsTableModel.getRowCount(), ikayaki.gui.MeasurementDetailsPanel.DetailsTableModel.getValueAt(), and ikayaki.MeasurementStep.iterator().

synchronized int ikayaki.MeasurementStep.getResults  ) 
 

Returns the number of results in this step.

Definition at line 398 of file MeasurementStep.java.

References ikayaki.MeasurementStep.results.

Referenced by ikayaki.gui.MeasurementDetailsPanel.DetailsTableModel.getRowCount(), ikayaki.gui.MeasurementDetailsPanel.DetailsTableModel.getValueAt(), ikayaki.MeasurementStep.iterator(), and ikayaki.MeasurementStep.setDone().

synchronized State ikayaki.MeasurementStep.getState  ) 
 

Tells if this step has been completed or not, or if a measurement is still running.

Definition at line 261 of file MeasurementStep.java.

References ikayaki.MeasurementStep.state.

Referenced by ikayaki.Project.getCompletedSteps(), ikayaki.gui.MeasurementDetailsPanel.DetailsTableModel.getRowCount(), and ikayaki.Project.Project().

synchronized double ikayaki.MeasurementStep.getStepValue  ) 
 

Returns the AF/Thermal value of this step, or a negative number if it has not been specified. The unit is millitesla (when AF) or Celcius (when thermal).

Definition at line 283 of file MeasurementStep.java.

References ikayaki.MeasurementStep.stepValue.

Referenced by ikayaki.gui.IntensityPlot.add(), ikayaki.Project.addSequence(), ikayaki.Project.addStep(), ikayaki.Project.exportToDAT(), and ikayaki.Project.exportToTDT().

synchronized double ikayaki.MeasurementStep.getSusceptibility  ) 
 

Returns the susceptibility of this step's sample, or a negative number to use the project's default susceptibility. The unit is 10^-6 SI.

Definition at line 365 of file MeasurementStep.java.

References ikayaki.MeasurementStep.susceptibility.

Referenced by ikayaki.Project.exportToDAT().

synchronized Date ikayaki.MeasurementStep.getTimestamp  ) 
 

Returns the time the measurements were completed, or null if that has not yet happened.

Definition at line 268 of file MeasurementStep.java.

References ikayaki.MeasurementStep.state, and ikayaki.MeasurementStep.timestamp.

Referenced by ikayaki.Project.getTimestamp(), and ikayaki.Project.Project().

synchronized double ikayaki.MeasurementStep.getVolume  ) 
 

Returns the volume of this step's sample, or a negative number to use the project's default volume. The unit is cm^3.

Definition at line 346 of file MeasurementStep.java.

References ikayaki.MeasurementStep.volume.

Referenced by ikayaki.NormalizedValue.normalize().

Iterator<MeasurementResult> ikayaki.MeasurementStep.iterator  ) 
 

Returns an iterator for iterating through this step's measurement results.

Definition at line 525 of file MeasurementStep.java.

References ikayaki.MeasurementStep.getResult(), and ikayaki.MeasurementStep.getResults().

Here is the call graph for this function:

void ikayaki.MeasurementStep.save  ) 
 

Invokes the owner project's autosaving. If there is no owner, will do nothing.

Definition at line 245 of file MeasurementStep.java.

References ikayaki.MeasurementStep.project, and ikayaki.Project.save().

Referenced by ikayaki.MeasurementStep.addResult(), ikayaki.MeasurementStep.setDone(), ikayaki.MeasurementStep.setMass(), ikayaki.MeasurementStep.setMeasuring(), ikayaki.MeasurementStep.setStepValue(), ikayaki.MeasurementStep.setSusceptibility(), and ikayaki.MeasurementStep.setVolume().

Here is the call graph for this function:

synchronized void ikayaki.MeasurementStep.setDone  ) 
 

Called after all results have been added. Sets the step's status to DONE_RECENTLY and prevents the adding of further results. If there are no results (maybe the measurement was cancelled), will set the state back to READY. If the state is already DONE or DONE_RECENTLY, then nothing will be changed.

Definition at line 464 of file MeasurementStep.java.

References ikayaki.MeasurementStep.getResults(), ikayaki.MeasurementStep.save(), ikayaki.MeasurementStep.state, and ikayaki.MeasurementStep.updateTransforms().

Referenced by ikayaki.Project.doManualStepDone(), ikayaki.Project.ManualDemag.run(), ikayaki.Project.DummyMeasurement.run(), and ikayaki.Project.Measurement.run().

Here is the call graph for this function:

synchronized void ikayaki.MeasurementStep.setMass double  mass  ) 
 

Sets the mass of this step's sample. A negative value will clear it. The unit is gram.

Definition at line 334 of file MeasurementStep.java.

References ikayaki.Project.mass, and ikayaki.MeasurementStep.save().

Referenced by ikayaki.MeasurementStep.MeasurementStep().

Here is the call graph for this function:

synchronized void ikayaki.MeasurementStep.setMeasuring  ) 
 

Called when the step's measurements are started. Sets the step's state to MEASURING.

Exceptions:
IllegalStateException if this method is called when the state is marked as DONE.

Definition at line 451 of file MeasurementStep.java.

References ikayaki.MeasurementStep.save(), and ikayaki.MeasurementStep.state.

Referenced by ikayaki.MeasurementStep.addResult(), ikayaki.Project.ManualDemag.run(), ikayaki.Project.ManualMeasure.run(), ikayaki.Project.DummyMeasurement.run(), and ikayaki.Project.Measurement.run().

Here is the call graph for this function:

synchronized void ikayaki.MeasurementStep.setStepValue double  stepValue  ) 
 

Sets the value of this step. A negative value will clear it. The unit is millitesla (when AF) or Celcius (when thermal). <p/> If this step is part of an AF project, the stepValue will be adjusted to be the closest correct value.

Exceptions:
IllegalStateException if the step's state is not READY.

Definition at line 295 of file MeasurementStep.java.

References ikayaki.Project.AF, ikayaki.MeasurementStep.getProject(), ikayaki.MeasurementStep.save(), and ikayaki.MeasurementStep.state.

Referenced by ikayaki.Project.addSequence(), ikayaki.Project.addStep(), ikayaki.Project.copySequence(), ikayaki.gui.MeasurementSequencePanel.SequencePopupMenu.getSaveSelectedAsAction(), ikayaki.MeasurementStep.MeasurementStep(), and ikayaki.Project.ManualDemag.run().

Here is the call graph for this function:

synchronized void ikayaki.MeasurementStep.setSusceptibility double  susceptibility  ) 
 

Sets the susceptibility of this step's sample. A negative value will clear it. The unit is 10^-6 SI.

Definition at line 372 of file MeasurementStep.java.

References ikayaki.MeasurementStep.save(), and ikayaki.Project.susceptibility.

Referenced by ikayaki.MeasurementStep.MeasurementStep().

Here is the call graph for this function:

synchronized void ikayaki.MeasurementStep.setVolume double  volume  ) 
 

Sets the volume of this step's sample. A negative value will clear it. The unit is cm^3.

Definition at line 353 of file MeasurementStep.java.

References ikayaki.MeasurementStep.save(), and ikayaki.Project.volume.

Referenced by ikayaki.MeasurementStep.MeasurementStep().

Here is the call graph for this function:

synchronized void ikayaki.MeasurementStep.updateTransforms  )  [protected]
 

Updates all of the measurement results with the owner project's transformation matrix and applies the noise and holder fixes. If there is no owner, an identity matrix will be used.

Definition at line 384 of file MeasurementStep.java.

References ikayaki.Project.getTransform(), ikayaki.MeasurementStep.project, and ikayaki.MeasurementStep.results.

Referenced by ikayaki.MeasurementStep.addResult(), ikayaki.MeasurementStep.MeasurementStep(), ikayaki.MeasurementStep.setDone(), and ikayaki.Project.updateTransforms().

Here is the call graph for this function:


Member Data Documentation

double ikayaki.MeasurementStep.mass = -1.0 [private]
 

The mass of this step's sample, or a negative number to use the project's default mass. The unit is gram.

Definition at line 75 of file MeasurementStep.java.

Referenced by ikayaki.MeasurementStep.getElement(), ikayaki.MeasurementStep.getMass(), and ikayaki.Project.setMass().

final Project ikayaki.MeasurementStep.project [private]
 

The project that owns this step, or null if there is no owner.

Definition at line 53 of file MeasurementStep.java.

Referenced by ikayaki.MeasurementStep.getProject(), ikayaki.MeasurementStep.MeasurementStep(), ikayaki.MeasurementStep.save(), and ikayaki.MeasurementStep.updateTransforms().

final List<MeasurementResult> ikayaki.MeasurementStep.results = new ArrayList<MeasurementResult>() [private]
 

The individual measurement results that are part of this measurement step.

Definition at line 91 of file MeasurementStep.java.

Referenced by ikayaki.MeasurementStep.addResult(), ikayaki.MeasurementStep.getElement(), ikayaki.MeasurementStep.getHolder(), ikayaki.MeasurementStep.getNoise(), ikayaki.MeasurementStep.getResult(), ikayaki.MeasurementStep.getResults(), ikayaki.MeasurementStep.MeasurementStep(), and ikayaki.MeasurementStep.updateTransforms().

State ikayaki.MeasurementStep.state = State.READY [private]
 

Tells if this step has been completed or not, or if a measurement is still running.

Definition at line 58 of file MeasurementStep.java.

Referenced by ikayaki.MeasurementStep.addResult(), ikayaki.MeasurementStep.getState(), ikayaki.MeasurementStep.getTimestamp(), ikayaki.MeasurementStep.MeasurementStep(), ikayaki.MeasurementStep.setDone(), ikayaki.MeasurementStep.setMeasuring(), ikayaki.Project.setState(), and ikayaki.MeasurementStep.setStepValue().

double ikayaki.MeasurementStep.stepValue = -1.0 [private]
 

The AF or Thermal value of this step, or a negative number if it has not been specified. The unit is millitesla (when AF) or Celcius (when thermal).

Definition at line 70 of file MeasurementStep.java.

Referenced by ikayaki.MeasurementStep.getElement(), ikayaki.MeasurementStep.getStepValue(), and ikayaki.MeasurementStep.MeasurementStep().

double ikayaki.MeasurementStep.susceptibility = -1.0 [private]
 

The susceptibility of this step's sample, or a negative number to use the project's default volume. The unit is 10^-6 SI.

Definition at line 86 of file MeasurementStep.java.

Referenced by ikayaki.MeasurementStep.getElement(), ikayaki.MeasurementStep.getSusceptibility(), and ikayaki.Project.setSusceptibility().

Date ikayaki.MeasurementStep.timestamp = null [private]
 

The time the measurements were completed, or null if that has not yet happened. This equals the time of the latest measurement result.

Definition at line 64 of file MeasurementStep.java.

Referenced by ikayaki.MeasurementStep.addResult(), ikayaki.MeasurementStep.getElement(), ikayaki.MeasurementStep.getTimestamp(), and ikayaki.MeasurementStep.MeasurementStep().

double ikayaki.MeasurementStep.volume = -1.0 [private]
 

The volume of this step's sample, or a negative number to use the project's default volume. The unit is cm^3.

Definition at line 80 of file MeasurementStep.java.

Referenced by ikayaki.MeasurementStep.getElement(), ikayaki.MeasurementStep.getVolume(), and ikayaki.Project.setVolume().


The documentation for this class was generated from the following file:
Generated on Fri May 6 16:00:40 2005 for Squid by  doxygen 1.4.1