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

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.WidarBasebandSinglet
All Implemented Interfaces:
CorrelatorBaseband, HasBandwidth, Identifiable, Cloneable

public class WidarBasebandSinglet
extends WidarBaseband

An unpaired baseband 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 WidarBasebandSinglet()
           
protected WidarBasebandSinglet(DigitalSignal input)
          Helps create a new WIDAR baseband.
 
Method Summary
 WidarBasebandSinglet clone()
          Returns a copy of this baseband.
 boolean equals(Object o)
          Returns true if o is equal to this baseband.
static WidarBasebandSinglet fromXml(Reader reader)
          Creates a new baseband based on the XML data read from reader.
static WidarBasebandSinglet 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()
          Returns the partner of this baseband, if any.
 PolarizationType getPolarization()
          Returns the polarization of the signal represented by this baseband.
 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()
          Returns true if this baseband has a partner.
 boolean isPartnerOf(WidarBaseband other)
          Returns true if other is loosely partnered with this baseband.
 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.
protected  void setInput(DigitalSignal input)
          Sets the input signal for this baseband.
 
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

WidarBasebandSinglet

protected WidarBasebandSinglet(DigitalSignal input)
Helps create a new WIDAR baseband.

Throws:
IllegalArgumentException - if input is null.

WidarBasebandSinglet

protected WidarBasebandSinglet()
Method Detail

setInput

protected void setInput(DigitalSignal input)
Sets the input signal for this baseband. Classes that override this method should have super.setInput(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

public PolarizationType getPolarization()
Returns the polarization of the signal represented by this baseband.

Returns:
the polarization of the signal represented by this baseband.

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)
Description copied from class: WidarBaseband
Returns true if other is loosely partnered with this baseband. In general baseband pairs do not have partners while baseband singlets do.

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()
Description copied from class: WidarBaseband
Returns true if this baseband has a partner. In general baseband pairs do not have partners while baseband singlets do.

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

getPartner

public WidarBaseband getPartner()
Description copied from class: WidarBaseband
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.

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

fromXml

public static WidarBasebandSinglet 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 WidarBasebandSinglet 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 WidarBasebandSinglet 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.