edu.nrao.sss.model.project.scan
Class DelayScan

java.lang.Object
  extended by edu.nrao.sss.model.project.scan.ScanLoopElement
      extended by edu.nrao.sss.model.project.scan.Scan
          extended by edu.nrao.sss.model.project.scan.DelayScan
All Implemented Interfaces:
UserAccountable, Identifiable, Cloneable

public class DelayScan
extends Scan

A scan that is used to determine the timing delays needed to synchronize the incoming signals for antennas in an array.

Version Info:

$Revision: 931 $
$Date: 2007-09-28 14:41:38 -0600 (Fri, 28 Sep 2007) $
$Author: dharland $

Since:
2006-07-18
Author:
David M. Harland

Field Summary
 
Fields inherited from class edu.nrao.sss.model.project.scan.Scan
DEFAULT_NAME
 
Fields inherited from interface edu.nrao.sss.util.Identifiable
UNIDENTIFIED
 
Fields inherited from interface edu.nrao.sss.model.UserAccountable
NULL_USER_ID
 
Method Summary
 void addDelays(double minNanosecondDelay, double maxNanosecondDelay, int numberOfDelays, TimeDuration timeAtSetting)
          Adds a series of delays to this scan's list.
 void addDelays(int numberOfPositiveDelays, double incrementalNanosecondDelay, TimeDuration timeAtSetting)
          Adds a series of delays to this scan's list.
 DelayScan clone()
          Returns a delay scan that is a copy of this one.
 boolean equals(Object o)
          Returns true if o is equal to this delay scan.
 List<DelaySetting> getDelays()
          Returns a set of delay settings.
 int hashCode()
          Returns a hash code value for this scan loop element.
 void setDelays(List<DelaySetting> replacementSet)
          Sets the collection of delay settings held by this scan.
 List<DelaySetting> sortDelays()
          Sorts the internal list of delays and returns it.
 String toSummaryString()
          Returns a short textual description of this scan loop element.
 
Methods inherited from class edu.nrao.sss.model.project.scan.Scan
clearId, createFor, fromXml, fromXml, getAllowOverTheTop, getAntennaWrap, getApplyLastPhase, getApplyLastReferenceDelay, getApplyLastReferenceFocus, getApplyLastReferencePointing, getDopplerSpecs, getDopplerSpecs, getDopplerTracker, getIntents, getLongName, getMode, getReferenceAntennas, getResource, getShortName, getSolarObserving, getSource, getSource, getSourceCatalogEntry, getSubarray, getTimeSpec, getUseResourceOfPriorScan, removeDopplerSpecs, reset, setAllowOverTheTop, setAntennaWrap, setApplyLastPhase, setApplyLastReferenceDelay, setApplyLastReferenceFocus, setApplyLastReferencePointing, setDopplerSpecs, setIntents, setLongName, setResource, setShortName, setSolarObserving, setSourceCatalogEntry, setUseResourceOfPriorScan
 
Methods inherited from class edu.nrao.sss.model.project.scan.ScanLoopElement
appendComments, getComments, getCreatedBy, getCreatedOn, getId, getLastUpdatedBy, getLastUpdatedOn, getName, getProgramBlock, getProject, getSchedulingBlock, hasSchedulingBlock, setComments, setCreatedBy, setCreatedOn, setId, setLastUpdatedBy, setLastUpdatedOn, setName, setSchedulingBlock, toString, toXml, writeAsXmlTo
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

setDelays

public void setDelays(List<DelaySetting> replacementSet)
Sets the collection of delay settings held by this scan. A null replacementSet will be interpreted as a new empty list.

This scan will hold a reference to replacementSet (unless it is null), so any changes made to the list after calling this method will be reflected in this object.

Parameters:
replacementSet - a set of delay settings to be held by this scan.

getDelays

public List<DelaySetting> getDelays()
Returns a set of delay settings.

The returned set, which is guaranteed to be non-null, is the actual set held by this scan, so changes made to the set will be reflected in this object.

Returns:
a set of delay settings.

sortDelays

public List<DelaySetting> sortDelays()
Sorts the internal list of delays and returns it.

The returned list is the actual list held by this scan, so changes made to the list will be reflected in this object.

Returns:
the list of delays settings held by this scan, after they have been sorted.

addDelays

public void addDelays(int numberOfPositiveDelays,
                      double incrementalNanosecondDelay,
                      TimeDuration timeAtSetting)
Adds a series of delays to this scan's list. The number of new delays added is equal to 1 + 2 * numberOfPositiveDelays. If we call the numberOfPositiveDelays "n" and the incrementalNanosecondDelay "t", delays of the following durations will be added to this scan:

  -nt,...,-2t,-t,0,+t,+2t,...,+nt.

Note that these delays are relative to the current value of the delay and are, therefore, allowed to be negative.

Parameters:
numberOfPositiveDelays - the number of positive delays to be added. The total number of delays added is equal to one plus two times this amount. An IllegalArgumentException will be thrown if this value is negative.
incrementalNanosecondDelay - the spacing between the delays added by this method. An IllegalArgumentException will be thrown if this value less than or equal to zero.
timeAtSetting - the amount of time the delay should be placed at this setting.
Throws:
IllegalArgumentException - if any of the parameters violate the rules listed above.

addDelays

public void addDelays(double minNanosecondDelay,
                      double maxNanosecondDelay,
                      int numberOfDelays,
                      TimeDuration timeAtSetting)
Adds a series of delays to this scan's list. The number of new delays added is numberOfDelays. The smallest new delay is minNanosecondDelay, the largest is maxNanosecondDelay. The other delays are spread evenly between these two endpoints.

Note that these delays are relative to the current value of the delay and are, therefore, allowed to be negative.

Parameters:
minNanosecondDelay - the smallest delay. This value is often negative,
maxNanosecondDelay - the largest delay. An IllegalArgumentException will be thrown if this value is less than or equal to the minNanosecondDelay.
numberOfDelays - the number of new delays to be added. Special cases:
  • numberOfDelays < 1: No new delays will be added.
  • numberOfDelays == 1: Only the minNanosecondDelay will be added.
  • numberOfDelays == 2: Only the minNanosecondDelay and maxNanosecondDelay will be added.
timeAtSetting - the amount of time the delay should be placed at this setting.
Throws:
IllegalArgumentException - if any of the parameters violate the rules listed above.

toSummaryString

public String toSummaryString()
Description copied from class: ScanLoopElement
Returns a short textual description of this scan loop element.

Overrides:
toSummaryString in class Scan
Returns:
a short textual description of this scan loop element.

clone

public DelayScan clone()
Returns a delay scan that is a copy of this one.

The returned scan is, for the most part, a deep copy of this one. However, there are a few exceptions noted in the clone method of this class's parent.

If anything goes wrong during the cloning procedure, a RuntimeException will be thrown.

Overrides:
clone in class Scan

equals

public boolean equals(Object o)
Returns true if o is equal to this delay scan.

In order for o to be equal to this scan, it must have equal delay settings in the same order as those of this scan. It must also follow the rules set forth in the equals method of this class's parent.

Overrides:
equals in class Scan

hashCode

public int hashCode()
Description copied from class: ScanLoopElement
Returns a hash code value for this scan loop element.

Overrides:
hashCode in class Scan


Copyright © 2009. All Rights Reserved.