edu.nrao.sss.model.resource
Interface ReceiverSelector

All Known Implementing Classes:
SimpleReceiverSelector, TelescopeType

public interface ReceiverSelector

A selector of the best receiver(s) for a given ResourceSpecification.

Version Info:

$Revision: 1710 $
$Date: 2008-11-14 11:54:07 -0700 (Fri, 14 Nov 2008) $
$Author: dharland $

Since:
2006-09-08
Author:
David M. Harland

Method Summary
 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 provider)
          Sets the universe of receivers from which selections will be made.
 

Method Detail

setProvider

void setProvider(ReceiverProvider provider)
Sets the universe of receivers from which selections will be made.

Parameters:
provider - a provider of receivers.

selectReceivers

List<ReceiverSelection> selectReceivers(ResourceSpecification specs)
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.

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

List<ReceiverSelection> selectReceivers(SkyFrequencySpecification specs)
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.

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

List<ReceiverSelection> selectReceivers(SpectralLineSpecification specs)
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.

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

List<ReceiverSelection> selectReceivers(PulsarSpecification specs)
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.

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

List<ReceiverSelection> selectReceivers(ObservingMode mode,
                                        ResourceSpecification specs)
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.

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

ReceiverBand selectBestReceiverFor(FrequencyRange targetRange)
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.

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.