edu.nrao.sss.model.resource
Enum TelescopeType

java.lang.Object
  extended by java.lang.Enum<TelescopeType>
      extended by edu.nrao.sss.model.resource.TelescopeType
All Implemented Interfaces:
ReceiverProvider, ReceiverSelector, Serializable, Comparable<TelescopeType>

public enum TelescopeType
extends Enum<TelescopeType>
implements ReceiverProvider, ReceiverSelector

An enumeration of the NRAO telescopes.

Version Info:

$Revision: 1598 $
$Date: 2008-10-07 10:25:51 -0600 (Tue, 07 Oct 2008) $
$Author: dharland $ (last person to modify)

Since:
2006-02-23
Author:
David M. Harland

Enum Constant Summary
ALMA
          The Atacama Large Millimeter Array.
EVLA
          The Expanded Very Large Array.
GBT
          The Greenbank Telescope.
OTHER
          A telescope other than those listed herein.
VLA
          The Very Large Array.
VLBA
          The Very Long Baseline Array.
 
Method Summary
 LinearVelocity calcVelocityRelativeTo(Source source, Date dateTime)
          Returns the velocity of this telescope toward or away from an object in space at the given point in time.
static TelescopeType fromString(String text)
          Returns the telescope type represented by text.
 List<CorrelatorName> getBackendTypes()
          Returns a list of the backend processors available on this telescope.
static TelescopeType getDefault()
          Returns a default telescope type.
 String getLegacyAbbreviation()
          Returns the historical abbreviation for this telescope.
 EarthPosition getLocation()
          Returns a copy of the location of this telescope.
 String getLongName()
          Returns a long name for this telescope.
 Set<ReceiverBand> getReceivers()
          Returns the receiver bands that this type of telescope has.
 Map<ReceiverBand,Map<String,Frequency>> getTuningPlan()
          Returns a default tuning plan for the local oscillators of this telescope.
 List<Set<ReceiverBand>> getValidReceiverCombinations()
          Returns a list of all the combinations of two or more receivers that may be used by this telescope simultaneously.
 AntennaElectronics makeElectronics()
          Creates and returns antenna electronics for this telescope.
 ReceiverBand selectBestReceiverFor(FrequencyRange targetRange)
          Returns the best receiver to use for the given range of sky frequencies.
 List<ReceiverSelection> selectReceivers(ObservingMode mode, ResourceSpecification specs)
          Returns a list of one or more selections that satisfy the given portion of the given specs.
 List<ReceiverSelection> selectReceivers(PulsarSpecification specs)
          Returns a list of one or more selections that satisfy the given specs.
 List<ReceiverSelection> selectReceivers(ResourceSpecification specs)
          Returns a list of one or more selections that satisfy the given specs.
 List<ReceiverSelection> selectReceivers(SkyFrequencySpecification specs)
          Returns a list of one or more selections that satisfy the given specs.
 List<ReceiverSelection> selectReceivers(SpectralLineSpecification specs)
          Returns a list of one or more selections that satisfy the given specs.
 void setProvider(ReceiverProvider dummy)
          Does nothing; this telescope will always be its own provider.
 void setReceiverSelectorType(Class<? extends ReceiverSelector> type)
          Sets the class to use as a receiver selector.
 void setReceiverSelectorType(String fullClassName)
          Sets the class to use as a receiver selector.
 String toString()
           
static TelescopeType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static TelescopeType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

GBT

public static final TelescopeType GBT
The Greenbank Telescope.


VLA

public static final TelescopeType VLA
The Very Large Array.


VLBA

public static final TelescopeType VLBA
The Very Long Baseline Array.


EVLA

public static final TelescopeType EVLA
The Expanded Very Large Array.


ALMA

public static final TelescopeType ALMA
The Atacama Large Millimeter Array.


OTHER

public static final TelescopeType OTHER
A telescope other than those listed herein.

Method Detail

values

public static TelescopeType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (TelescopeType c : TelescopeType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static TelescopeType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getLegacyAbbreviation

public String getLegacyAbbreviation()
Returns the historical abbreviation for this telescope.

Returns:
a short name for this telescope.

getLongName

public String getLongName()
Returns a long name for this telescope. For example, the long name of the VLA is "The Very Large Array".

Returns:
a long name for this telescope.

getLocation

public EarthPosition getLocation()
Returns a copy of the location of this telescope.

Returns:
a copy of the location of this telescope.

getReceivers

public Set<ReceiverBand> getReceivers()
Returns the receiver bands that this type of telescope has.

Specified by:
getReceivers in interface ReceiverProvider
Returns:
the receiver bands that this type of telescope has.

getValidReceiverCombinations

public List<Set<ReceiverBand>> getValidReceiverCombinations()
Returns a list of all the combinations of two or more receivers that may be used by this telescope simultaneously.

Note that the returned list, and the sets contained therein, are copies of those held by this telescope, so changes made to them will not be reflected in this object.

Specified by:
getValidReceiverCombinations in interface ReceiverProvider
Returns:
a list of all the combinations of two or more receivers that may be used by this telescope simultaneously.

getTuningPlan

public Map<ReceiverBand,Map<String,Frequency>> getTuningPlan()
Returns a default tuning plan for the local oscillators of this telescope. Each of this telescope's receivers gets a separate set of local oscillator tunings.

The returned map has a ReceiverBand as its key and another map as its value. This second map has as its key the name of a local oscillator, and its value is the frequency to which that LO should be tuned.

Returns:
a default tuning plan for this telescope.

makeElectronics

public AntennaElectronics makeElectronics()
Creates and returns antenna electronics for this telescope. If this telescope has no electronics, or if its electronics cannot be successfully built, a null-like electronics will be built and returned.

Returns:
new antenna electronics for this telescope. The returned object will never be null, but could be an implementation of the null-object-pattern.

getBackendTypes

public List<CorrelatorName> getBackendTypes()
Returns a list of the backend processors available on this telescope. The term "backend" encompasses correlators, spectrometers, and any other electronic devices that can take as input the digital signals output by this telescope's antenna electronics.

Returns:
a list of the backend processors available on this telescope.

calcVelocityRelativeTo

public LinearVelocity calcVelocityRelativeTo(Source source,
                                             Date dateTime)
                                      throws CoordinateConversionException
Returns the velocity of this telescope toward or away from an object in space at the given point in time.

Parameters:
source - an object in space. The radial velocity of this object is calculated relative to this telescope.
dateTime - the point in time at which the velocity is calculated.
Returns:
the radial velocity of this telescope toward or away from an object in space.
Throws:
CoordinateConversionException - if the position of the source cannot be converted to an equatorial RA / Dec position.
Since:
2008-07-29

getDefault

public static TelescopeType getDefault()
Returns a default telescope type.

Returns:
a default telescope type.

toString

public String toString()
Overrides:
toString in class Enum<TelescopeType>

fromString

public static TelescopeType fromString(String text)
Returns the telescope type represented by text.

For details about the transformation, see EnumerationUtility.enumFromString(Class, String).

Parameters:
text - a text representation of a telescope type.
Returns:
the telescope type represented by text.

setReceiverSelectorType

public void setReceiverSelectorType(String fullClassName)
Sets the class to use as a receiver selector.

Parameters:
fullClassName - the fully-qualified name of a class that implements ReceiverSelector.

setReceiverSelectorType

public void setReceiverSelectorType(Class<? extends ReceiverSelector> type)
Sets the class to use as a receiver selector.

Parameters:
type - a class the implements ReceiverSelector. If this value is null a default class will be used.

setProvider

public void setProvider(ReceiverProvider dummy)
Does nothing; this telescope will always be its own provider.

Specified by:
setProvider in interface ReceiverSelector
Parameters:
dummy - a provider of receivers.

selectReceivers

public List<ReceiverSelection> selectReceivers(ResourceSpecification specs)
Description copied from interface: ReceiverSelector
Returns a list of one or more selections that satisfy the given specs. The first selection in the list will be the best match, the second selection the next best match, and so on. If a perfect match was found, the returned list will contain only that selection. If no receiver was even a partial match, the returned list will contain a single receiver that was nearest the frequencies needed by the specs.

Specified by:
selectReceivers in interface ReceiverSelector
Parameters:
specs - a resource specification, expressed in terms of science, as opposed to instrumentation.
Returns:
a list of one or more selections based on the specifications.

selectReceivers

public List<ReceiverSelection> selectReceivers(SkyFrequencySpecification specs)
Description copied from interface: ReceiverSelector
Returns a list of one or more selections that satisfy the given specs. The first selection in the list will be the best match, the second selection the next best match, and so on. If a perfect match was found, the returned list will contain only that selection. If no receiver was even a partial match, the returned list will contain a single receiver that was nearest the frequencies needed by the specs.

Specified by:
selectReceivers in interface ReceiverSelector
Parameters:
specs - a resource specification, expressed in terms of science, as opposed to instrumentation.
Returns:
a list of one or more selections based on the specifications.

selectReceivers

public List<ReceiverSelection> selectReceivers(SpectralLineSpecification specs)
Description copied from interface: ReceiverSelector
Returns a list of one or more selections that satisfy the given specs. The first selection in the list will be the best match, the second selection the next best match, and so on. If a perfect match was found, the returned list will contain only that selection. If no receiver was even a partial match, the returned list will contain a single receiver that was nearest the frequencies needed by the specs.

Specified by:
selectReceivers in interface ReceiverSelector
Parameters:
specs - a resource specification, expressed in terms of science, as opposed to instrumentation.
Returns:
a list of one or more selections based on the specifications.

selectReceivers

public List<ReceiverSelection> selectReceivers(PulsarSpecification specs)
Description copied from interface: ReceiverSelector
Returns a list of one or more selections that satisfy the given specs. The first selection in the list will be the best match, the second selection the next best match, and so on. If a perfect match was found, the returned list will contain only that selection. If no receiver was even a partial match, the returned list will contain a single receiver that was nearest the frequencies needed by the specs.

Specified by:
selectReceivers in interface ReceiverSelector
Parameters:
specs - a resource specification, expressed in terms of science, as opposed to instrumentation.
Returns:
a list of one or more selections based on the specifications.

selectReceivers

public List<ReceiverSelection> selectReceivers(ObservingMode mode,
                                               ResourceSpecification specs)
Description copied from interface: ReceiverSelector
Returns a list of one or more selections that satisfy the given portion of the given specs. The first selection in the list will be the best match, the second selection the next best match, and so on. If a perfect match was found, the returned list will contain only that selection. If no receiver was even a partial match, the returned list will contain a single receiver that was nearest the frequencies needed by the specs.

The mode parameter is used to ignore the portions of specs that are of different modes. For example, calling mySelector.selectReceivers(ObservingMode.SPECTRAL_LINE, mySpecs) will cause this selector to consider only the spectral line specifications. Note that this is a little different than calling mySelector.selectReceivers(mySpecs.getSpectralLineSpecs().get(i)) because all the spectral line specifications in specs will be considered by this method.

Specified by:
selectReceivers in interface ReceiverSelector
Parameters:
mode - the portion of specs to which this method will limit its attention.
specs - a resource specification, expressed in terms of science, as opposed to instrumentation.
Returns:
a list of one or more selections based on the specifications.

selectBestReceiverFor

public ReceiverBand selectBestReceiverFor(FrequencyRange targetRange)
Description copied from interface: ReceiverSelector
Returns the best receiver to use for the given range of sky frequencies.

This method returns a single receiver, even if multiple receivers cover the target range. If one receiver covers more of the target range than the others, it is the receiver returned. If multiple receivers cover the range equally well, the receiver returned is up to the implementing class. If no receiver overlaps the target range, the receiver that has the smallest distance between itself and the target range is returned. Note that this means the returned receiver may not be useful for the target it range at all, but is merely the best of the not-so-useful receivers.

This method may return null if any one or more of the following is true:

  1. This selector's receiver provider is null.
  2. This receiver provider of this selector has a null list of receivers.
  3. This receiver provider of this selector has an empty list of receivers.

Specified by:
selectBestReceiverFor in interface ReceiverSelector
Parameters:
targetRange - a sky frequency range for which the best receiver is sought.
Returns:
the best receiver to use for the given range of sky frequencies.


Copyright © 2009. All Rights Reserved.