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

java.lang.Object
  extended by edu.nrao.sss.model.resource.CorrelatorBasebandAbs
      extended by edu.nrao.sss.model.resource.evla.WidarBaseband
All Implemented Interfaces:
CorrelatorBaseband, HasBandwidth, Identifiable, Cloneable
Direct Known Subclasses:
WidarBasebandPair, WidarBasebandSinglet

public abstract class WidarBaseband
extends CorrelatorBasebandAbs

Common parent for the WIDAR baseband singlet and pair classes.

Version Info:

$Revision: 2296 $
$Date: 2009-05-12 14:50:22 -0600 (Tue, 12 May 2009) $
$Author: dharland $ (last person to modify)

Since:
2008-06-25
Author:
David M. Harland

Field Summary
 
Fields inherited from class edu.nrao.sss.model.resource.CorrelatorBasebandAbs
bandwidth, subbands
 
Fields inherited from interface edu.nrao.sss.util.Identifiable
UNIDENTIFIED
 
Method Summary
 void addSubband(CorrelatorSubband newSubband)
          Adds newSubband to this baseband if this baseband is not already full.
 WidarBaseband clone()
          Returns a copy of this baseband.
 boolean equals(Object o)
          Returns true if o is equal to this baseband.
 SortedSet<Frequency> getAllowableBandwidths()
          Returns the set of bandwidths to which this object may be set.
protected  CorrelatorConfiguration getContainer()
          Returns the correlator configuration that holds this baseband.
 TimeDuration getDelayModelLifespan()
          Returns the length of time for which this baseband's delay models may remain valid.
 boolean getFringeRotation()
          Deprecated. Always returns false.
 InputStateCounts getInputStateCounts()
          Deprecated. Always returns null.
 Frequency getMaximumBandwidth()
          Returns the largest bandwidth to which this object may be set.
 int getMaxSubbandCount()
          Returns the maximum number of subbands this baseband may hold.
 Frequency getMinimumBandwidth()
          Returns the smallest bandwidth to which this object may be set.
abstract  WidarBaseband getPartner()
          Returns the partner of this baseband, if any.
 PulsarGating getPulsarGating()
          Returns the pulsar gating configuration, if any.
 boolean getSinglePhaseCenter()
          Returns true if all subbands of this baseband are required to have the same phase center.
 SortedSet<Frequency> getSubbandGrid()
          Returns a set of frequencies that individual subbands should not cover.
 WideBandCorrelator getWideBandCorrelator()
          Returns the wide band correlation configuration, if any.
 boolean hasDiscreteBandwidths()
          Returns true if this object may be set only to pretermined bandwidths.
 int hashCode()
          Returns a hash code value for this baseband.
abstract  boolean hasPartner()
          Returns true if this baseband has a partner.
abstract  boolean isPartnerOf(WidarBaseband other)
          Returns true if other is loosely partnered with this baseband.
 WidarSubband makeNewSubband()
          Creates and returns a new subband that may later be added to this subband.
 TimeDuration overrideDefaultDelayModelLifespan(boolean override)
          Tells this baseband to override, or restore, the default value of the delay models' lifetime.
 PulsarGating overrideDefaultPulsarGating(boolean override)
          Tells this baseband to override, or restore, pulsar gating defaults.
 WideBandCorrelator overrideDefaultWideBandCorrelator(boolean override)
          Tells this baseband to override, or restore, wide band correlator defaults.
 boolean removeSubband(CorrelatorSubband unwantedSubband)
          Removes the unwantedSubband from this baseband, if present.
 void setBandwidth(Frequency newWidth)
          Does nothing.
protected  void setContainer(CorrelatorConfiguration newContainer)
          Sets the correlator configuration to which this baseband belongs.
 void setFringeRotation(boolean turnOn)
          Deprecated. does nothing
 void setSinglePhaseCenter(boolean singleCenter)
          Determines whether or not all the subbands of this baseband are required to have the same phase center.
 BaseBand[] toVci()
          Expresses this baseband as either one or two VCI BaseBand objects.
 String toXml()
          Returns an XML representation of this baseband.
 void writeAsXmlTo(Writer writer)
          Writes an XML representation of this baseband to writer.
 
Methods inherited from class edu.nrao.sss.model.resource.CorrelatorBasebandAbs
addNewSubband, clearId, createdSubbandsFromPersistentStore, getAllowableBandwidthClosestTo, getAllowableBandwidthFor, getBandwidth, getId, getProxiedRange, getSubbandCount, getSubbands, isPair, removeAllSubbands, removeOldSubband, removeSubbandAt, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface edu.nrao.sss.model.resource.CorrelatorBaseband
getInitialQuantization, getName, getPolarization, getPolarizations, getProxiedRange, isSinglet, proxiedRangeIsReversed
 

Method Detail

getContainer

protected CorrelatorConfiguration getContainer()
Returns the correlator configuration that holds this baseband. It is possible for the returned value to be null. If not null, the returned object will always be of type EvlaWidarConfiguration.

Specified by:
getContainer in class CorrelatorBasebandAbs

setContainer

protected void setContainer(CorrelatorConfiguration newContainer)
Sets the correlator configuration to which this baseband belongs. The newContainer is allowed to be null. If not null, the type of newContainer must be EvlaWidarConfiguration.

Specified by:
setContainer in class CorrelatorBasebandAbs

getMinimumBandwidth

public Frequency getMinimumBandwidth()
Description copied from interface: HasBandwidth
Returns the smallest bandwidth to which this object may be set.

Returns:
the smallest bandwidth to which this object may be set.

getMaximumBandwidth

public Frequency getMaximumBandwidth()
Description copied from interface: HasBandwidth
Returns the largest bandwidth to which this object may be set.

Returns:
the largest bandwidth to which this object may be set.

hasDiscreteBandwidths

public boolean hasDiscreteBandwidths()
Description copied from interface: HasBandwidth
Returns true if this object may be set only to pretermined bandwidths. A return value of false indicates that this object may be set to any bandwidth in the range allowed by HasBandwidth.getMinimumBandwidth() and HasBandwidth.getMaximumBandwidth().

If the returned value is true, the method HasBandwidth.getAllowableBandwidths() will give the set of predetermined bandwidths.

Returns:
true if this object may be set only to pretermined bandwidths.

getAllowableBandwidths

public SortedSet<Frequency> getAllowableBandwidths()
Description copied from interface: HasBandwidth
Returns the set of bandwidths to which this object may be set.

If the return value of HasBandwidth.hasDiscreteBandwidths() is false all frequencies in the range allowed by HasBandwidth.getMinimumBandwidth() and HasBandwidth.getMaximumBandwidth() are valid and this method will return an empty set. Otherwise it will return the set of allowable bandwidths.

Returns:
the set of bandwidths to which this object may be set.

setBandwidth

public void setBandwidth(Frequency newWidth)
Does nothing. The bandwidth of a WIDAR baseband is completely determined by the input signal(s).

Specified by:
setBandwidth in interface CorrelatorBaseband
Overrides:
setBandwidth in class CorrelatorBasebandAbs
Parameters:
newWidth - the new bandwidth of this baseband.

isPartnerOf

public abstract boolean isPartnerOf(WidarBaseband other)
Returns true if other is loosely partnered with this baseband. In general baseband pairs do not have partners while baseband singlets do.

Parameters:
other - another WIDAR baseband that may or may not be a partner of this one.
Returns:
true if other is this baseband's partner.

hasPartner

public abstract boolean hasPartner()
Returns true if this baseband has a partner. In general baseband pairs do not have partners while baseband singlets do.

Returns:
true if this baseband has a partner.

getPartner

public abstract WidarBaseband getPartner()
Returns the partner of this baseband, if any. In general baseband pairs do not have partners while baseband singlets do.

Even unpaired basebands have some coupling to one other baseband, due to the correlator hardware.

Returns:
the partner of this baseband or null if this baseband has no partner.

makeNewSubband

public WidarSubband makeNewSubband()
Description copied from interface: CorrelatorBaseband
Creates and returns a new subband that may later be added to this subband. Each implementation of this CorrelatorBaseband interface will decide which implementation of CorrelatorSubband it constructs.

The returned subband will belong to no baseband.

Returns:
a new subband of a type that is compatible with this baseband.

getMaxSubbandCount

public int getMaxSubbandCount()
Description copied from interface: CorrelatorBaseband
Returns the maximum number of subbands this baseband may hold.

Returns:
the maximum number of subbands this baseband may hold.

getSubbandGrid

public SortedSet<Frequency> getSubbandGrid()
Description copied from interface: CorrelatorBaseband
Returns a set of frequencies that individual subbands should not cover. Not all implementations of basebands will have such frequencies. For those that do not, an empty set will be returned.

The frequencies in the returned set represent a preset subband grid. Subbands may start or end exactly on these frequencies, but should not otherwise contain them. The low and high frequencies of this baseband are included in the returned range. The high frequency is included even if it is not a natural grid point. For example, if this baseband covers the frequency range from 0 to 45 units, with a grid line every 10 units, the returned set will contain 0, 10, 20, 30, 40, and 45 units.

Returns:
a set of frequencies that individual subbands should not cover.

addSubband

public void addSubband(CorrelatorSubband newSubband)
Description copied from interface: CorrelatorBaseband
Adds newSubband to this baseband if this baseband is not already full.

Parameters:
newSubband - a subband to be added to this baseband.

removeSubband

public boolean removeSubband(CorrelatorSubband unwantedSubband)
Description copied from interface: CorrelatorBaseband
Removes the unwantedSubband from this baseband, if present. The unwanted subband will belong to no baseband after its removal.

Specified by:
removeSubband in interface CorrelatorBaseband
Overrides:
removeSubband in class CorrelatorBasebandAbs
Parameters:
unwantedSubband - the subband to be removed from this baseband.
Returns:
true if this baseband contained newSubband.

toVci

public BaseBand[] toVci()
Expresses this baseband as either one or two VCI BaseBand objects. If the initial quantization of this baseband is 8, the returned array will be of length two (unless this baseband has only one subband). If the initial quantization of this baseband is 3, the returned array will be of length one.

Returns:
an array containing one or two VCI BaseBand objects.

overrideDefaultPulsarGating

public PulsarGating overrideDefaultPulsarGating(boolean override)
Tells this baseband to override, or restore, pulsar gating defaults.

Parameters:
override - instruction to override, or restore, pulsar gating defaults.
Returns:
null if override is false. If override is true, returns the PulsarGating held internally by this baseband. This means clients can operate directly on the returned object and impact this baseband.

getPulsarGating

public PulsarGating getPulsarGating()
Returns the pulsar gating configuration, if any. The default value of this property is null.

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 pulsar gating configuration, if any.
See Also:
overrideDefaultPulsarGating(boolean)

overrideDefaultWideBandCorrelator

public WideBandCorrelator overrideDefaultWideBandCorrelator(boolean override)
Tells this baseband to override, or restore, wide band correlator defaults.

Parameters:
override - instruction to override, or restore, wide band correlator defaults.
Returns:
null if override is false. If override is true, returns the WideBandCorrelator held internally by this baseband. This means clients can operate directly on the returned object and impact this baseband.

getWideBandCorrelator

public WideBandCorrelator getWideBandCorrelator()
Returns the wide band correlation configuration, if any. The default value of this property is null.

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 wide band correlation configuration, if any.
See Also:
overrideDefaultWideBandCorrelator(boolean)

overrideDefaultDelayModelLifespan

public TimeDuration overrideDefaultDelayModelLifespan(boolean override)
Tells this baseband to override, or restore, the default value of the delay models' lifetime.

Parameters:
override - instruction to override, or restore, the default value of the delay models' lifetime.
Returns:
null if override is false. If override is true, returns the WideBandCorrelator held internally by this baseband. This means clients can operate directly on the returned object and impact this baseband.

getDelayModelLifespan

public TimeDuration getDelayModelLifespan()
Returns the length of time for which this baseband's delay models may remain valid. The default value of this property is null.

This is a VCI property. The returned object is the actual instance held internally by this baseband.

Returns:
the length of time for which this baseband's delay models may remain valid.

setSinglePhaseCenter

public void setSinglePhaseCenter(boolean singleCenter)
Determines whether or not all the subbands of this baseband are required to have the same phase center.

This is a VCI property. The default value is true or "yes".


getSinglePhaseCenter

public boolean getSinglePhaseCenter()
Returns true if all subbands of this baseband are required to have the same phase center.

This is a VCI property.

Returns:
true if all subbands of this baseband are required to have the same phase center.

getInputStateCounts

@Deprecated
public InputStateCounts getInputStateCounts()
Deprecated. Always returns null.


setFringeRotation

@Deprecated
public void setFringeRotation(boolean turnOn)
Deprecated. does nothing


getFringeRotation

@Deprecated
public boolean getFringeRotation()
Deprecated. Always returns false.


toXml

public String toXml()
             throws JAXBException
Returns an XML representation of this baseband.

Returns:
an XML representation of this baseband.
Throws:
JAXBException - if anything goes wrong during the conversion to XML.
See Also:
writeAsXmlTo(Writer)

writeAsXmlTo

public void writeAsXmlTo(Writer writer)
                  throws JAXBException
Writes an XML representation of this baseband to writer.

Parameters:
writer - the device to which XML is written.
Throws:
JAXBException - if anything goes wrong during the conversion to XML.

clone

public WidarBaseband clone()
Returns a copy of this baseband.

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

Specified by:
clone in interface CorrelatorBaseband
Overrides:
clone in class CorrelatorBasebandAbs
Returns:
a copy of this baseband.

equals

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

Overrides:
equals in class CorrelatorBasebandAbs

hashCode

public int hashCode()
Description copied from class: CorrelatorBasebandAbs
Returns a hash code value for this baseband.

Overrides:
hashCode in class CorrelatorBasebandAbs


Copyright © 2009. All Rights Reserved.