|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.nrao.sss.model.resource.CorrelatorSubbandAbs edu.nrao.sss.model.resource.evla.WidarSubband
public class WidarSubband
A subband of a WIDAR correlator baseband.
Version Info:
$Revision: 2291 $ |
$Date: 2009-05-08 11:09:46 -0600 (Fri, 08 May 2009) $ |
$Author: dharland $ (last person to modify) |
Field Summary |
---|
Fields inherited from class edu.nrao.sss.model.resource.CorrelatorSubbandAbs |
---|
freqRange, name, productGroups, requantizationBits |
Fields inherited from interface edu.nrao.sss.util.Identifiable |
---|
UNIDENTIFIED |
Constructor Summary | |
---|---|
WidarSubband()
Helps create a new WIDAR subband. |
Method Summary | |
---|---|
WidarSubband |
clone()
Returns a copy of this subband. |
boolean |
equals(Object o)
Returns true if o is equal to this subband. |
static WidarSubband |
fromXml(Reader reader)
Creates a new subband based on the XML data read from reader . |
static WidarSubband |
fromXml(String xmlFile)
Creates a new subband from the XML data in the given file. |
SortedSet<Frequency> |
getAllowableBandwidths()
Returns the set of bandwidths to which this object may be set. |
SortedSet<Integer> |
getAllowableRequantizations()
Returns the set of allowable requantization values for this subband. |
AutoCorrMode |
getAutoCorrMode()
Returns the autocorrelation mode to use for this subband, if any. |
WidarBaseband |
getBaseband()
Returns the baseband to which this subband belongs. |
BurstMode |
getBurstMode()
Returns the burst mode to use for this subband, if any. |
int |
getChannelIncrementSize()
|
Frequency |
getMaximumBandwidth()
Returns the largest bandwidth to which this object may be set. |
int |
getMaximumChannelCount()
|
Frequency |
getMinimumBandwidth()
Returns the smallest bandwidth to which this object may be set. |
boolean |
getMixerPhaseErrorCorr()
Returns true if the stage 2 mixer
should update the phase error and model. |
PhasedArray |
getPhasedArray()
Returns the phase array parameters to use for this subband, if any. |
PulsarBinning |
getPulsarBinning()
Returns the pulsar binning parameters to use for this subband, if any. |
int |
getPulsarGatingPhase()
Returns the shift of the pulsar gate in fractions of a cycle. |
RadarMode |
getRadarMode()
Returns the pulsar binning parameters to use for this subband, if any. |
int |
getSbId()
|
int |
getSignalToNoiseRatio()
Returns the percent of signal in the input data. |
ToneExtraction |
getToneExtraction()
Returns the tone extraction parameters to use for this subband, if any. |
boolean |
getUseStage2Mixer()
Returns true if the stage 2 mixer is in use for this subband. |
boolean |
hasDiscreteBandwidths()
Returns true if this object may be set only to pretermined bandwidths. |
int |
hashCode()
Returns a hash code for this subband. |
protected WidarCorrelationProductGroup |
makeCorrelationProductGroup()
Creates and returns a new product group that could be used with this subband. |
AutoCorrMode |
overrideDefaultAutoCorrMode(boolean override)
Tells this subband to override, or restore, auto correlation mode defaults. |
BurstMode |
overrideDefaultBurstMode(boolean override)
Tells this subband to override, or restore, burst mode defaults. |
PhasedArray |
overrideDefaultPhasedArray(boolean override)
Tells this subband to override, or restore, phased array defaults. |
PulsarBinning |
overrideDefaultPulsarBinning(boolean override)
Tells this subband to override, or restore, pulsar binning defaults. |
RadarMode |
overrideDefaultRadarMode(boolean override)
Tells this subband to override, or restore, radar mode defaults. |
ToneExtraction |
overrideDefaultToneExtraction(boolean override)
Tells this subband to override, or restore, pulsar gating defaults. |
void |
setBandwidth(Frequency newWidth)
Sets the bandwidth of this subband. |
void |
setCentralFrequency(Frequency newCenter)
Sets the central frequency of this subband. |
void |
setMixerPhaseErrorCorr(boolean correct)
Tells the correlator whether or not the stage 2 mixer should update the phase error and model. |
void |
setPulsarGatingPhase(int newPhase)
Sets the shift of the pulsar gate in fractions of a cycle |
void |
setRequantization(int bits)
Sets the number of bits to which data should be requantized. |
void |
setSignalToNoiseRatio(int newRatio)
Sets the percent of signal in the input data. |
void |
setUseStage2Mixer(boolean use)
Turns the stage 2 mixer on or off for this subband. |
SubBand |
toVci()
|
String |
toXml()
Returns an XML representation of this subband. |
void |
writeAsXmlTo(Writer writer)
Writes an XML representation of this subband to writer . |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WidarSubband()
Method Detail |
---|
public WidarBaseband getBaseband()
CorrelatorSubband
Some implementations may allow for the creation of subbands apart from any baseband, with the idea that this subband would eventually be added to a baseband. Prior to being added to a baseband the return value from this method would be null.
getBaseband
in interface CorrelatorSubband
getBaseband
in class CorrelatorSubbandAbs
public Frequency getMinimumBandwidth()
HasBandwidth
public Frequency getMaximumBandwidth()
HasBandwidth
public boolean hasDiscreteBandwidths()
HasBandwidth
HasBandwidth.getMinimumBandwidth()
and HasBandwidth.getMaximumBandwidth()
.
If the returned value is true, the method
HasBandwidth.getAllowableBandwidths()
will give the set of predetermined
bandwidths.
public SortedSet<Frequency> getAllowableBandwidths()
HasBandwidth
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.
public void setBandwidth(Frequency newWidth)
In addition to doing the work described in the
method specifications
,
this WIDAR version also turns off the stage 2 mixer, if it
happened to be on, and if the new width is 128 MHz.
setBandwidth
in interface CorrelatorSubband
setBandwidth
in class CorrelatorSubbandAbs
newWidth
- the new bandwidth of this subband.public void setCentralFrequency(Frequency newCenter)
In addition to the
side effects
mentioned in the specification of this method, this implementation
will also snap the center frequency to an imaginary grid.
If the stage 2 filter is not turned on, the center of this
subband must be equal to BW / 2 + BW * n, n=0,1,2,...,
where BW is the bandwidth of this subband.
setCentralFrequency
in interface CorrelatorSubband
setCentralFrequency
in class CorrelatorSubbandAbs
newCenter
- the central frequency of this subband.public SortedSet<Integer> getAllowableRequantizations()
CorrelatorSubband
public void setRequantization(int bits)
CorrelatorSubband
This subband allows only certain values for the number of bits.
These values are given by CorrelatorSubband.getAllowableRequantizations()
.
If a disallowed value is sent to this method, it will be replaced
by the nearest acceptable value. If it is equally near two
acceptable values, the smaller one will be used.
bits
- the number of bits to which data should be requantized.public int getMaximumChannelCount()
public int getChannelIncrementSize()
protected WidarCorrelationProductGroup makeCorrelationProductGroup()
CorrelatorSubbandAbs
makeCorrelationProductGroup
in class CorrelatorSubbandAbs
public SubBand toVci()
public int getSbId()
public AutoCorrMode overrideDefaultAutoCorrMode(boolean override)
override
- instruction to override, or restore, auto correlation mode defaults.
override
is false.
If override
is true, returns the AutoCorrMode
held internally by this subband. This means clients can operate
directly on the returned object and impact this subband.public AutoCorrMode getAutoCorrMode()
This is a VCI property. The returned object was generated from VCI XML schema elements and is the actual instance held internally by this subband.
overrideDefaultAutoCorrMode(boolean)
public BurstMode overrideDefaultBurstMode(boolean override)
override
- instruction to override, or restore, burst mode defaults.
override
is false.
If override
is true, returns the BurstMode
held internally by this subband. This means clients can operate
directly on the returned object and impact this subband.public BurstMode getBurstMode()
This is a VCI property. The returned object was generated from VCI XML schema elements and is the actual instance held internally by this subband.
overrideDefaultBurstMode(boolean)
public PhasedArray overrideDefaultPhasedArray(boolean override)
override
- instruction to override, or restore, phased array defaults.
override
is false.
If override
is true, returns the PhasedArray
held internally by this subband. This means clients can operate
directly on the returned object and impact this subband.public PhasedArray getPhasedArray()
This is a VCI property. The returned object was generated from VCI XML schema elements and is the actual instance held internally by this subband.
overrideDefaultPhasedArray(boolean)
public PulsarBinning overrideDefaultPulsarBinning(boolean override)
override
- instruction to override, or restore, pulsar binning defaults.
override
is false.
If override
is true, returns the PulsarBinning
held internally by this subband. This means clients can operate
directly on the returned object and impact this subband.public PulsarBinning getPulsarBinning()
This is a VCI property. The returned object was generated from VCI XML schema elements and is the actual instance held internally by this subband.
overrideDefaultPulsarBinning(boolean)
public RadarMode overrideDefaultRadarMode(boolean override)
override
- instruction to override, or restore, radar mode defaults.
override
is false.
If override
is true, returns the RadarMode
held internally by this subband. This means clients can operate
directly on the returned object and impact this subband.public RadarMode getRadarMode()
This is a VCI property. The returned object was generated from VCI XML schema elements and is the actual instance held internally by this subband.
overrideDefaultRadarMode(boolean)
public ToneExtraction overrideDefaultToneExtraction(boolean override)
override
- instruction to override, or restore, pulsar gating defaults.
override
is false.
If override
is true, returns the ToneExtraction
held internally by this subband. This means clients can operate
directly on the returned object and impact this subband.public ToneExtraction getToneExtraction()
This is a VCI property. The returned object was generated from VCI XML schema elements and is the actual instance held internally by this subband.
overrideDefaultToneExtraction(boolean)
public boolean getMixerPhaseErrorCorr()
stage 2 mixer
should update the phase error and model.
If the stage 2 mixer is not being used, this value is irrelevant.
The default value of this property is true.
public void setMixerPhaseErrorCorr(boolean correct)
correct
- use a value of true
if the stage 2 mixer should update the phase error and model.public int getPulsarGatingPhase()
public void setPulsarGatingPhase(int newPhase)
newPhase
- fraction of a cycle. The value must be in the range 0 through 100.
IllegalArgumentException
- if newPhase
is less than zero or greater than one hundred.public int getSignalToNoiseRatio()
public void setSignalToNoiseRatio(int newRatio)
newRatio
- percent of signal in the input data.
The value must be in the range 0 through 100.
IllegalArgumentException
- if newRatio
is less than zero or greater than one hundred.public void setUseStage2Mixer(boolean use)
If the stage 2 mixer is off, this subband is restricted to certain slots in its baseband. If this subband's bandwidth is W, and if the stage 2 mixer is off, then the low frequency of this subband's range must start at 0, W, 2W, etc.
use
- true if the stage 2 mixer should be used for this subband.public boolean getUseStage2Mixer()
setUseStage2Mixer(boolean)
public String toXml() throws JAXBException
JAXBException
- if anything goes wrong during the conversion to XML.writeAsXmlTo(Writer)
public void writeAsXmlTo(Writer writer) throws JAXBException
writer
.
writer
- the device to which XML is written.
JAXBException
- if anything goes wrong during the conversion to XML.public static WidarSubband fromXml(String xmlFile) throws JAXBException, XMLStreamException, FileNotFoundException
xmlFile
- the name of an XML file. This method will attempt to locate
the file by using Class.getResource(String)
.
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".public static WidarSubband fromXml(Reader reader) throws JAXBException, XMLStreamException
reader
.
reader
- the source of the XML data.
If this value is null, null is returned.
reader
.
XMLStreamException
- if the XML is not well-formed,
or for some other "unexpected processing conditions".
JAXBException
- if anything else goes wrong during the transformation.public WidarSubband clone()
The returned subband is nearly, but not quite, a deep copy of this subband. Properties that are not copied:
super class
.
If anything goes wrong during the cloning procedure,
a RuntimeException
will be thrown.
clone
in class CorrelatorSubbandAbs
public boolean equals(Object o)
o
is equal to this subband.
equals
in class CorrelatorSubbandAbs
public int hashCode()
hashCode
in class CorrelatorSubbandAbs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |