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

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

public class WidarBasebandPair
extends WidarBaseband

A baseband pair of the WIDAR correlator.

Version Info:

$Revision: 2271 $
$Date: 2009-04-28 12:02:17 -0600 (Tue, 28 Apr 2009) $
$Author: dharland $ (last person to modify)

Since:
2008-06-24
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
 
Constructor Summary
protected WidarBasebandPair()
           
  WidarBasebandPair(DigitalSignal inputA, DigitalSignal inputB)
          Creates a new WIDAR baseband pair.
 
Method Summary
 WidarBasebandPair clone()
          Returns a copy of this baseband.
 boolean equals(Object o)
          Returns true if o is equal to this baseband.
static WidarBasebandPair fromXml(Reader reader)
          Creates a new baseband based on the XML data read from reader.
static WidarBasebandPair fromXml(String xmlFile)
          Creates a new baseband from the XML data in the given file.
 int getInitialQuantization()
          Returns the number of bits per sample in this baseband.
 String getName()
          Returns the name of this baseband.
 WidarBaseband getPartner()
          Always returns null.
 PolarizationType getPolarization()
          Deprecated. Use getPolarizations().
 List<PolarizationType> getPolarizations()
          Returns the polarizations of the signals represented by this baseband.
 FrequencyRange getProxiedRange()
          Returns the portion of frequency space for which this baseband is a proxy.
 int hashCode()
          Returns a hash code value for this baseband.
 boolean hasPartner()
          Always returns false.
 boolean isPartnerOf(WidarBaseband other)
          Always returns false.
 boolean isSinglet()
          Returns true if this is an unpaired, or singlet, baseband.
 boolean proxiedRangeIsReversed()
          Returns true if the high and low frequencies in the proxied range are mapped to the low and high frequencies, respectively, of this baseband.
 void setInput(DigitalSignal inputA, DigitalSignal inputB)
          Sets the input signals for this baseband pair.
 
Methods inherited from class edu.nrao.sss.model.resource.evla.WidarBaseband
addSubband, getAllowableBandwidths, getContainer, getDelayModelLifespan, getFringeRotation, getInputStateCounts, getMaximumBandwidth, getMaxSubbandCount, getMinimumBandwidth, getPulsarGating, getSinglePhaseCenter, getSubbandGrid, getWideBandCorrelator, hasDiscreteBandwidths, makeNewSubband, overrideDefaultDelayModelLifespan, overrideDefaultPulsarGating, overrideDefaultWideBandCorrelator, removeSubband, setBandwidth, setContainer, setFringeRotation, setSinglePhaseCenter, toVci, toXml, writeAsXmlTo
 
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
 

Constructor Detail

WidarBasebandPair

public WidarBasebandPair(DigitalSignal inputA,
                         DigitalSignal inputB)
Creates a new WIDAR baseband pair.

Throws:
IllegalArgumentException - if inputA or inputB is null.

WidarBasebandPair

protected WidarBasebandPair()
Method Detail

setInput

public void setInput(DigitalSignal inputA,
                     DigitalSignal inputB)
Sets the input signals for this baseband pair. Classes that override this method should have super.setInput(input, input) as their first line.


getName

public String getName()
Description copied from interface: CorrelatorBaseband
Returns the name of this baseband.

Returns:
the name of this baseband.

isSinglet

public boolean isSinglet()
Description copied from interface: CorrelatorBaseband
Returns true if this is an unpaired, or singlet, baseband. If true, then the number of polarizations represented by this baseband should be one.

Either this method or CorrelatorBaseband.isPair(), but not both, should be true. Only single and paired basebands are anticipated.

Returns:
true if this is an unpaired, or singlet, baseband.

getProxiedRange

public FrequencyRange getProxiedRange()
Description copied from interface: CorrelatorBaseband
Returns the portion of frequency space for which this baseband is a proxy.

Returns:
the portion of frequency space for which this baseband is a proxy.

proxiedRangeIsReversed

public boolean proxiedRangeIsReversed()
Description copied from interface: CorrelatorBaseband
Returns true if the high and low frequencies in the proxied range are mapped to the low and high frequencies, respectively, of this baseband.

An example where the return value of this method would be true is if this baseband had a width of 2 GHz and proxied an original range of 45 GHz - 43 GHz, respectively. That is, the 2 GHz signal in the baseband would represent 45 GHz, 1 GHz would represent 44 GHz, and 0 GHz would represent 43 GHz.

Returns:
true if the high and low frequencies of the proxied rage are reversed with respect to this baseband.

getInitialQuantization

public int getInitialQuantization()
Description copied from interface: CorrelatorBaseband
Returns the number of bits per sample in this baseband. This quantity is called the initial quantization because some correlators allow clients to requantize the data during processing. The initial quantization, or IQ, is typically a property of the signal before it ever reaches the correlator.

Returns:
the number of bits per sample in this baseband.

getPolarization

@Deprecated
public PolarizationType getPolarization()
Deprecated. Use getPolarizations().


getPolarizations

public List<PolarizationType> getPolarizations()
Description copied from interface: CorrelatorBaseband
Returns the polarizations of the signals represented by this baseband.

Returns:
the polarizations of the signals represented by this baseband.

isPartnerOf

public boolean isPartnerOf(WidarBaseband other)
Always returns false. Baseband pairs do not have partners.

Specified by:
isPartnerOf in class WidarBaseband
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 boolean hasPartner()
Always returns false. Baseband pairs do not have partners.

Specified by:
hasPartner in class WidarBaseband
Returns:
true if this baseband has a partner.

getPartner

public WidarBaseband getPartner()
Always returns null. Baseband pairs do not have partners.

Specified by:
getPartner in class WidarBaseband
Returns:
the partner of this baseband or null if this baseband has no partner.

fromXml

public static WidarBasebandPair fromXml(String xmlFile)
                                 throws JAXBException,
                                        XMLStreamException,
                                        FileNotFoundException
Creates a new baseband from the XML data in the given file.

Parameters:
xmlFile - the name of an XML file. This method will attempt to locate the file by using Class.getResource(String).
Returns:
a new baseband from the XML data in the given file.
Throws:
FileNotFoundException - if the XML file cannot be found.
JAXBException - if the schema file used (if any) is malformed, if the XML file cannot be read, or if the XML file is not schema-valid.
XMLStreamException - if there is a problem opening the XML file, if the XML is not well-formed, or for some other "unexpected processing conditions".

fromXml

public static WidarBasebandPair fromXml(Reader reader)
                                 throws JAXBException,
                                        XMLStreamException
Creates a new baseband based on the XML data read from reader.

Parameters:
reader - the source of the XML data. If this value is null, null is returned.
Returns:
a new baseband based on the XML data read from reader.
Throws:
XMLStreamException - if the XML is not well-formed, or for some other "unexpected processing conditions".
JAXBException - if anything else goes wrong during the transformation.

clone

public WidarBasebandPair 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 WidarBaseband
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 WidarBaseband

hashCode

public int hashCode()
Returns a hash code value for this baseband.

Overrides:
hashCode in class WidarBaseband


Copyright © 2009. All Rights Reserved.