edu.nrao.sss.model.resource.evla
Class WidarCorrelationProductGroup

java.lang.Object
  extended by edu.nrao.sss.model.resource.CorrelationProductGroupAbs
      extended by edu.nrao.sss.model.resource.evla.WidarCorrelationProductGroup
All Implemented Interfaces:
CorrelationProductGroup, Identifiable

public class WidarCorrelationProductGroup
extends CorrelationProductGroupAbs

A group of WIDAR correlation products that share certain features.

The VCI element to which this class is mapped is PolProducts.

Version Info:

$Revision: 2298 $
$Date: 2009-05-13 16:26:11 -0600 (Wed, 13 May 2009) $
$Author: dharland $ (last person to modify)

Since:
2008-11-19
Author:
David M. Harland

Field Summary
 
Fields inherited from class edu.nrao.sss.model.resource.CorrelationProductGroupAbs
channels, needToRecalcChannels
 
Fields inherited from interface edu.nrao.sss.util.Identifiable
UNIDENTIFIED
 
Method Summary
protected  void copyInto(CorrelationProductGroupAbs other)
          Sets other's internal variables to the same values as those of this group.
 boolean equals(Object o)
          Returns true if o is equal to this group.
 int fixBlbpCount()
          Adjusts, if necessary, the number of BLBPs allocated to this group and returns the new value.
 SortedSet<Integer> getAllowableRecirculationFactors()
          Returns the collection of valid recirculation factor values for this group of correlation products.
 AutoCorrSubset getAutoCorrSubset()
          Returns the auto correlation configuration, if any.
 int getBlbpCount()
          Returns the current number of baseline board pairs allocated to this group.
 WidarIntegrationTime getIntegrationTime()
          Returns the integration time for this group.
 int getMaximumRecirculationFactor()
          Returns the largest allowable recirculation factor for this group of correlation products.
 TimeDuration getMinimumTotalIntegrationTime()
          Returns the minimum total integration time for this product.
 ProductPacking getProductPacking()
           
 MaxMinPackType getProductPackingAlgorithm()
           
 int getRecirculationFactor()
          Returns the recirculation factor for this group of correlation products.
 StationPacking getStationPacking()
           
 MaxMinPackType getStationPackingAlgorithm()
           
 TimeDuration getTotalIntegrationTime()
          Returns the total integration time for the products of this group.
 List<Integer> getValidBlbpCounts()
          Returns a list of the number of BLBPs that may be owned by this group.
 int hashCode()
           
 AutoCorrSubset overrideDefaultAutoCorrSubset(boolean override)
          Tells this group to override, or restore, auto correlation subset defaults.
protected  void recalculateChannels()
          Called when something that can influence the total number of channels, or the distribution of channels among products, has changed.
 int setBlbpCount(int newTotalCount)
          Attempts to allocate the given number of BLBPs to this group.
 void setProductPacking(ProductPacking newPacking)
           
 void setProductPackingAlgorithm(MaxMinPackType newAlg)
           
 void setRecirculationFactor(int newFactor)
          Sets the recirculation factor for this group of correlation products.
 void setStationPacking(StationPacking newPacking)
           
 void setStationPackingAlgorithm(MaxMinPackType newAlg)
           
 void setTotalIntegrationTime(TimeDuration totalDuration)
          Sets the total integration time for the products of this group.
 PolProducts toVci()
          Returns a Virtual Correlator Interface (VCI) representation of this object.
 
Methods inherited from class edu.nrao.sss.model.resource.CorrelationProductGroupAbs
addPolarizationProduct, clearId, getAllowablePolarizationProducts, getContainer, getId, getSpectralChannels, getSpectralChannels, getUUID, removeAllPolarizationProducts, removeDisallowedProducts, removePolarizationProduct, setContainer
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getMaximumRecirculationFactor

public int getMaximumRecirculationFactor()
Returns the largest allowable recirculation factor for this group of correlation products. The returned value depends on the requantization and bandwidth of the containing subband.

Returns:
the largest allowable recirculation factor for this group of correlation products.

getAllowableRecirculationFactors

public SortedSet<Integer> getAllowableRecirculationFactors()
Returns the collection of valid recirculation factor values for this group of correlation products. The values in this collection depend on the requantization and bandwidth of the containing subband.

Returns:
the valid recirculation factors for this group of correlation products.

setRecirculationFactor

public void setRecirculationFactor(int newFactor)
Sets the recirculation factor for this group of correlation products. A value of 1 (one) represents no recirculation.

Recirculation is a means of producing more spectral channels per polarization product.

Parameters:
newFactor - the new recirculation factor for this group of correlation products. The minimum value is 1 and the maximum value is give by getMaximumRecirculationFactor(). All valid values in between the limits are integral powers of two. If newFactor is not a valid value, this method will set the recirculation factor to the largest valid value that is less than newFactor (except for the case where newFactor is less than the minimum, in which case the minimum valid value will be used).

getRecirculationFactor

public int getRecirculationFactor()
Returns the recirculation factor for this group of correlation products.

Returns:
the recirculation factor for this group of correlation products.
See Also:
setRecirculationFactor(int)

setTotalIntegrationTime

public void setTotalIntegrationTime(TimeDuration totalDuration)
Sets the total integration time for the products of this group.

Note that this object will not hold a reference to totalDuration, so clients may continue to use it without affecting this object.

Parameters:
totalDuration - the total integration duration for the products of this group.

getTotalIntegrationTime

public TimeDuration getTotalIntegrationTime()
Returns the total integration time for the products of this group.

The returned duration is not referenced internally, so clients may alter it without affecting this object.

Returns:
the total integration time for the products of this group.

getMinimumTotalIntegrationTime

public TimeDuration getMinimumTotalIntegrationTime()
Returns the minimum total integration time for this product.

The returned duration is not referenced internally, so clients may alter it without affecting this object.

Returns:
the minimum total integration time for this product.

getIntegrationTime

public WidarIntegrationTime getIntegrationTime()
Returns the integration time for this group. This method can be used when a client wants fine grained control over the components of the total integration time. Many clients will prefer to use the convenience methods

The object returned is the one held internally by this group, so changes made to it will be reflected herein.

Returns:
the integration time object held internally by this group.

getValidBlbpCounts

public List<Integer> getValidBlbpCounts()
Returns a list of the number of BLBPs that may be owned by this group. Often the returned list will contain the integers zero through the number of unowned BLBPs. However, depending on the properties of this group, not all integral values in that range may be valid, and the maximum number might be something less than the total available.

The returned list is sorted from lowest to highest.

Returns:
a list containing the valid numbers of BLBPs for the this group.

setBlbpCount

public int setBlbpCount(int newTotalCount)
Attempts to allocate the given number of BLBPs to this group. Note that newTotalCount is the total number of BLBPs to be allocated to this group, not an additional number.

Parameters:
newTotalCount - the desired number of baseline board pairs to assign to this group.
Returns:
the total number of BLBPs actually allocated to this group. This number will be less than or equal to newTotalCount, unless newCount is less than zero, in which case the returned value will be zero.

getBlbpCount

public int getBlbpCount()
Returns the current number of baseline board pairs allocated to this group. Note that it is possible for the returned value to be an illegal value. This can happen because the underlying pool of BLBPs may not be aware of recent changes to this group or its containing subband and baseband. Use fixBlbpCount() to simultaneously adjust the allocated number to a legal value and obtain that number.

Returns:
the current number of BLBPs allocated to this group.

fixBlbpCount

public int fixBlbpCount()
Adjusts, if necessary, the number of BLBPs allocated to this group and returns the new value.

Returns:
the number of BLBPs allocated to this group after ensuring the current number was legal for this group.

recalculateChannels

protected void recalculateChannels()
Description copied from class: CorrelationProductGroupAbs
Called when something that can influence the total number of channels, or the distribution of channels among products, has changed. The main job of this method is to update the channels map. Implementations should also set the variable needToRecalcChannels to false upon successful recalculation.

Specified by:
recalculateChannels in class CorrelationProductGroupAbs

toVci

public PolProducts toVci()
Returns a Virtual Correlator Interface (VCI) representation of this object.

Returns:
a VCI representation of this object.

overrideDefaultAutoCorrSubset

public AutoCorrSubset overrideDefaultAutoCorrSubset(boolean override)
Tells this group to override, or restore, auto correlation subset defaults.

Parameters:
override - instruction to override, or restore, auto correlation subset defaults.
Returns:
null if override is false. If override is true, returns the AutoCorrSubset held internally by this group. This means clients can operate directly on the returned object and impact this group.

getAutoCorrSubset

public AutoCorrSubset getAutoCorrSubset()
Returns the auto correlation configuration, if any. If this group is not using this feature, null is returned.

This is a VCI property. The returned object was generated from VCI XML schema elements and is the actual instance held internally by this baseband.

Returns:
the auto correlation configuration, if any.
See Also:
overrideDefaultAutoCorrSubset(boolean)

setProductPacking

public void setProductPacking(ProductPacking newPacking)

getProductPacking

public ProductPacking getProductPacking()

setProductPackingAlgorithm

public void setProductPackingAlgorithm(MaxMinPackType newAlg)

getProductPackingAlgorithm

public MaxMinPackType getProductPackingAlgorithm()

setStationPacking

public void setStationPacking(StationPacking newPacking)

getStationPacking

public StationPacking getStationPacking()

setStationPackingAlgorithm

public void setStationPackingAlgorithm(MaxMinPackType newAlg)

getStationPackingAlgorithm

public MaxMinPackType getStationPackingAlgorithm()

copyInto

protected void copyInto(CorrelationProductGroupAbs other)
Description copied from class: CorrelationProductGroupAbs
Sets other's internal variables to the same values as those of this group. The exceptions are the ID, which is cleared, and the UUID.

Overrides:
copyInto in class CorrelationProductGroupAbs
Parameters:
other - a correlation product group whose values should be set to mimic the values in this group.

equals

public boolean equals(Object o)
Description copied from class: CorrelationProductGroupAbs
Returns true if o is equal to this group.

Items not compared in the equality tests:

  1. ID
  2. UUID
  3. Subband
  4. Number of channels

Note that the number and type of correlation products is examined, but not the channels for each. Subclasses may use such a check in their overrides of this method.

Overrides:
equals in class CorrelationProductGroupAbs

hashCode

public int hashCode()
Overrides:
hashCode in class CorrelationProductGroupAbs


Copyright © 2009. All Rights Reserved.