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

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.TippingScan
All Implemented Interfaces:
UserAccountable, Identifiable, Cloneable

public class TippingScan
extends Scan

A scan that tips the telescope to several elevations along a given azimuth.

CVS Info:

$Revision: 2146 $
$Date: 2009-04-01 11:21:10 -0600 (Wed, 01 Apr 2009) $
$Author: btruitt $

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 addElevations(Angle minEl, Angle maxEl, int elevationCount, TimeDuration timePerElevation)
          Adds a series of tipping elevations to this scan's list.
 TippingScan clone()
          Returns a tipping scan that is a copy of this one.
 boolean equals(Object o)
          Returns true if o is equal to this tipping scan.
 boolean getAllowReverseOrder()
          Returns true if successive iterations of this scan are allowed to cycle through the elevations in opposite orders.
 Angle getAzimuth()
          Returns the azimuth along which the tipping will be done.
 List<TippingPosition> getElevations()
          Returns a sorted list of tipping elevations.
 List<TippingPosition> getElevations(int iteration)
          Returns a list of tipping elevations that has been sorted in a way that is appropriate for the given iteration of this scan.
 TippingOrder getOrder()
          Returns the order (low-to-high or high-to-low) in which the tipping is performed.
 int hashCode()
          Returns a hash code value for this scan loop element.
 void setAllowReverseOrder(boolean allow)
          Configures this scan so that even numbered iterations of this scan proceed in either the opposite or same order as the first iteration.
 void setAzimuth(Angle newAzimuth)
          Sets the azimuth along which the tipping will be done.
 void setElevations(List<TippingPosition> replacementList)
          Sets the list of tipping elevations held by this scan.
 void setOrder(TippingOrder newOrder)
          Sets the tipping order to either low-to-high or high-to-low.
 void setSourceCatalogEntry(SourceCatalogEntry sourceOrTable)
          Does nothing.
 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, 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

setSourceCatalogEntry

public void setSourceCatalogEntry(SourceCatalogEntry sourceOrTable)
Does nothing. Tipping scans may not have sources.

Overrides:
setSourceCatalogEntry in class Scan
Parameters:
sourceOrTable - the Source or SourceLookupTable to use for this scan.

setAzimuth

public void setAzimuth(Angle newAzimuth)
Sets the azimuth along which the tipping will be done.

Parameters:
newAzimuth - the azimuth along which the tipping will be done.

getAzimuth

public Angle getAzimuth()
Returns the azimuth along which the tipping will be done.

Returns:
the azimuth along which the tipping will be done.

setOrder

public void setOrder(TippingOrder newOrder)
Sets the tipping order to either low-to-high or high-to-low.

Parameters:
newOrder - the order in which the tipping should be performed. A value of null is treated as a signal to perform the tipping in a default order.

getOrder

public TippingOrder getOrder()
Returns the order (low-to-high or high-to-low) in which the tipping is performed.

Returns:
the order in which the tipping is performed.

setAllowReverseOrder

public void setAllowReverseOrder(boolean allow)
Configures this scan so that even numbered iterations of this scan proceed in either the opposite or same order as the first iteration.

Example: An observer sets the tipping order to low-to-high. There is enough time in this scan to do multiple iterations of the tipping. If allow is true, then the second (and all other even-numbered) tipping(s) will be from high-to-low -- the reverse order of the first. If allow is false, all tippings will be from low-to-high.

Parameters:
allow - allows subsequent iterations of this scan to cycle through the elevations in reverse order, relative to the prior iteration.

getAllowReverseOrder

public boolean getAllowReverseOrder()
Returns true if successive iterations of this scan are allowed to cycle through the elevations in opposite orders.

Returns:
true if successive iterations of this scan are allowed to cycle through the elevations in opposite orders.
See Also:
setAllowReverseOrder(boolean)

addElevations

public void addElevations(Angle minEl,
                          Angle maxEl,
                          int elevationCount,
                          TimeDuration timePerElevation)
                   throws IllegalArgumentException
Adds a series of tipping elevations to this scan's list. The number of new elevations added is elevationCount. The lowest new elevation is minEl, the largest is maxEl. The other elevations are derived in such a way that the graph of elevation index versus the secant of the zenith angle is linear.

Parameters:
minEl - the minimum elevation to be added. While a minimum elevation of zero is permitted, using a zero elevation is unlikely to give useful results as the algorithm used approaches infinity for one of its intermediate values.
maxEl - the maximum elevation to be added.
elevationCount - the number of new elevations to be added. Special cases:
  • elevationCount < 1: No new elevations will be added.
  • elevationCount == 1: Only the minEl will be added.
  • elevationCount == 2: Only the minEl and maxEl will be added.
Throws:
IllegalArgumentException - if either minEl or maxEl are not within the range [0,quarterCircle].

setElevations

public void setElevations(List<TippingPosition> replacementList)
Sets the list of tipping elevations held by this scan. A null replacementList will be interpreted as a new empty list.

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

Parameters:
replacementList - a list of tipping offsets to be held by this scan.

getElevations

public List<TippingPosition> getElevations()
Returns a sorted list of tipping elevations. The returned list, which is guaranteed to be non-null, is ordered either from low-to-high or high-to-low, depending on the value of the tipping order.

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

Returns:
a sorted list of tipping elevations.

getElevations

public List<TippingPosition> getElevations(int iteration)
Returns a list of tipping elevations that has been sorted in a way that is appropriate for the given iteration of this scan.

The appropriate sorting order is determined by the value of the getAllowReverseOrder() property and the iteration number. If getAllowReverseOrder() is true and the iteration is an even number, then the sorting is in the opposite direction of that specified by getOrder().

Note that the returned list is not the list held internally by the scan, so changes to the list will not be reflected in this object. However, the elevations held in the returned list are the same elevations held by this object's internal list, so changing one of those objects will impact this one.

Parameters:
iteration - one more than the number of times this scan has already been run. The minimum acceptable value is one.
Returns:
a sorted list of tipping elevations.
Throws:
IllegalArgumentException

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 TippingScan clone()
Returns a tipping 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 tipping scan.

In order for o to be equal to this scan, it must have equal tipping positions 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.