gov.sns.xal.tools.orbit
Class OrbitRecord

java.lang.Object
  |
  +--gov.sns.xal.tools.orbit.OrbitRecord
Direct Known Subclasses:
MutableOrbitRecord

public class OrbitRecord
extends java.lang.Object

An instance of OrbitRecord holds bpm record statistics that have been taken over several correlated bpm measurements. An OrbitRecord is used by an OrbitBuffer to represent the statistics of several orbit measurements. OrbitRecord is immutable and hence suitable for publishing results.


Field Summary
protected  java.util.Map bpmStats
           
 
Constructor Summary
OrbitRecord()
          Creates a new instance of OrbitRecord
OrbitRecord(OrbitRecord orbit)
          Copy constructor
 
Method Summary
protected  java.util.Comparator bpmComparator(AcceleratorSeq sequence)
          Return a comparator used in ordering bpms by position
 double getBeamPosition(PlaneFilter planeFilter, BPM bpm)
          Get the beam position corresponding to the specified bpm and adjusted for bpm alignment.
 double[] getBeamPositions(PlaneFilter planeFilter, java.util.List bpms)
          Get beam positions as an array for the specified bpms.
 BpmRecord getBpmRecord(java.lang.String bpmName)
          Get a bpm record by BPM id
 java.util.Collection getBpmRecords()
          Return the collection of bpm records
 java.util.Date getLastDate()
          Get the date of the last correlated orbit.
 java.util.List getOrderedBpmRecords(AcceleratorSeq sequence)
          Return the bpm records in order by position
 double getRms(PlaneFilter planeFilter)
          calculate the orbit RMS for the specified plane
 double getRmsNoise(PlaneFilter planeFilter)
          Estimate the noise in the RMS value
 double lastTimestamp()
          Correlation timestamp of the last record added to the pool of orbits taken
 int numBpmRecords()
          Get the number of bpm records
 java.lang.String toString()
          Convenience string view of an orbit record
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

bpmStats

protected java.util.Map bpmStats
Constructor Detail

OrbitRecord

public OrbitRecord()
Creates a new instance of OrbitRecord


OrbitRecord

public OrbitRecord(OrbitRecord orbit)
Copy constructor

Method Detail

numBpmRecords

public int numBpmRecords()
Get the number of bpm records


getBpmRecord

public BpmRecord getBpmRecord(java.lang.String bpmName)
Get a bpm record by BPM id


lastTimestamp

public double lastTimestamp()
Correlation timestamp of the last record added to the pool of orbits taken


getLastDate

public java.util.Date getLastDate()
Get the date of the last correlated orbit.

Returns:
The date of the last correlated orbit.

getBpmRecords

public java.util.Collection getBpmRecords()
Return the collection of bpm records


getOrderedBpmRecords

public java.util.List getOrderedBpmRecords(AcceleratorSeq sequence)
Return the bpm records in order by position


getBeamPosition

public double getBeamPosition(PlaneFilter planeFilter,
                              BPM bpm)
Get the beam position corresponding to the specified bpm and adjusted for bpm alignment.


getBeamPositions

public double[] getBeamPositions(PlaneFilter planeFilter,
                                 java.util.List bpms)
Get beam positions as an array for the specified bpms. The beam positions are adjusted for alignment.


getRms

public double getRms(PlaneFilter planeFilter)
calculate the orbit RMS for the specified plane


getRmsNoise

public double getRmsNoise(PlaneFilter planeFilter)
Estimate the noise in the RMS value


bpmComparator

protected java.util.Comparator bpmComparator(AcceleratorSeq sequence)
Return a comparator used in ordering bpms by position


toString

public java.lang.String toString()
Convenience string view of an orbit record

Overrides:
toString in class java.lang.Object