|
||||||||||
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
public abstract class CorrelatorSubbandAbs
A partial implementation of a CorrelatorSubband
.
Version Info:
$Revision: 2289 $ |
$Date: 2009-05-07 16:13:41 -0600 (Thu, 07 May 2009) $ |
$Author: dharland $ (last person to modify) |
Field Summary | |
---|---|
protected FrequencyRange |
freqRange
|
protected String |
name
|
protected List<CorrelationProductGroupAbs> |
productGroups
|
protected int |
requantizationBits
|
Fields inherited from interface edu.nrao.sss.util.Identifiable |
---|
UNIDENTIFIED |
Constructor Summary | |
---|---|
protected |
CorrelatorSubbandAbs()
Helps create a new correlator subband. |
Method Summary | |
---|---|
CorrelationProductGroupAbs |
addNewCorrelationProductGroup()
Creates a new correlation product group, adds it to this subband, and returns it. |
void |
clearId()
Resets this instance's ID, and the IDs of all its components, to a value that represents the unidentified state. |
CorrelatorSubbandAbs |
clone()
Returns a copy of this subband. |
protected void |
createdProdGrpsFromPersistentStore()
Called after product groups were created from a persistent store, such as a database or XMl file. |
boolean |
equals(Object o)
Returns true if o is equal to this subband. |
Frequency |
getAllowableBandwidthClosestTo(Frequency frequency)
Returns the allowable frequency that is closest to the parameter. |
Frequency |
getAllowableBandwidthFor(Frequency frequency)
Returns the smallest allowable bandwidth that is greater than desiredWidth . |
Frequency |
getBandwidth()
Returns this object's bandwidth. |
CorrelatorBaseband |
getBaseband()
Returns the baseband to which this subband belongs. |
Frequency |
getCentralFrequency()
Returns the central frequency of this subband. |
protected CorrelatorBasebandAbs |
getContainer()
Primarily for use by persistence mechanism. |
List<CorrelationProductGroup> |
getCorrelationProductGroups()
Returns this subband's collection of correlation product groups. |
FrequencyRange |
getFrequencyRange()
Returns the frequency range covered by this subband. |
Long |
getId()
|
Frequency |
getMaximumCentralFrequency()
Returns the largest allowable central frequency for this subband. |
Frequency |
getMinimumCentralFrequency()
Returns the smallest allowable central frequency for this subband. |
String |
getName()
Returns the name of this subband. |
FrequencyRange |
getProxiedRange()
Returns the portion of frequency space for which this subband is a proxy. |
int |
getRequantization()
Returns the number of bits to which the data in this subband will be requantized. |
int |
hashCode()
Returns a hash code value for this subband. |
protected abstract CorrelationProductGroupAbs |
makeCorrelationProductGroup()
Creates and returns a new product group that could be used with this subband. |
void |
removeCorrelationProductGroup(CorrelationProductGroup unwantedGroup)
Removes a correlation product group from this subband. |
void |
setBandwidth(Frequency newWidth)
Sets the bandwidth of this subband. |
void |
setCentralFrequency(Frequency newCenter)
Sets the central frequency of this subband. |
void |
setCentralProxiedFrequency(Frequency newSkyCenter)
Modifies this subband so that its new center is a proxy for newSkyCenter . |
protected void |
setContainer(CorrelatorBasebandAbs newContainer)
Primarily for use by persistence mechanism. |
void |
setName(String newName)
Sets the (optional) name of this subband. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface edu.nrao.sss.model.resource.CorrelatorSubband |
---|
getAllowableRequantizations, setRequantization |
Methods inherited from interface edu.nrao.sss.model.resource.HasBandwidth |
---|
getAllowableBandwidths, getMaximumBandwidth, getMinimumBandwidth, hasDiscreteBandwidths |
Field Detail |
---|
protected String name
protected FrequencyRange freqRange
protected int requantizationBits
protected List<CorrelationProductGroupAbs> productGroups
Constructor Detail |
---|
protected CorrelatorSubbandAbs()
Method Detail |
---|
public Long getId()
getId
in interface Identifiable
public void clearId()
CorrelatorSubband
This method is useful for preparing an instance for storage in a database. The ID property (as of now, though this may change in the future) is used by our persistence mechanism to identify objects. If you are persisting this instance for the first time, you may need to call this method before performing a save. This is especially true if you have created this instance from XML, as the XML unmarshalling brings along the ID property.
clearId
in interface CorrelatorSubband
public void setName(String newName)
CorrelatorSubband
setName
in interface CorrelatorSubband
newName
- the new name for this subband. A value of null may be used to
make this an unnamed subband, which is its default state.public String getName()
CorrelatorSubband
getName
in interface CorrelatorSubband
public Frequency getAllowableBandwidthFor(Frequency frequency)
HasBandwidth
desiredWidth
. If no allowable bandwidth is greater than
desiredWidth
, the maximum allowable bandwidth is returned.
getAllowableBandwidthFor
in interface HasBandwidth
frequency
- a desired bandwidth for which an allowable bandwidth is sought.
desiredWidth
.public Frequency getAllowableBandwidthClosestTo(Frequency frequency)
HasBandwidth
getAllowableBandwidthClosestTo
in interface HasBandwidth
frequency
- a bandwidth for which the closest allowable bandwidth is desired.
If this value is below the minimum, the minimum allowable value
is returned. If it is above the maximum, the maximum is returned.
If this value is null, the minimum value is returned.
desiredWidth
.public void setBandwidth(Frequency newWidth)
CorrelatorSubband
An attempt to set the bandwidth to a value lower than this subband's minimum will result in a bandwidth equal to the lowest allowable, and likewise for exceeding this subband's maximum.
If this subband has a discrete set of allowable bandwidths, then this
method will set the bandwidth to that which is closest to
newWidth
. If the newWidth
is
not an allowable bandwidth and is
equally distant from two allowable values, this
subband's bandwidth will be set to the smaller of those values.
When changing the bandwidth, this method will attempt to leave this subband's center where it is. However, if doing so would result in a frequency range whose low value is less than zero, the center will be reset to be half of the bandwidth.
setBandwidth
in interface CorrelatorSubband
newWidth
- the new bandwidth of this subband.public Frequency getBandwidth()
HasBandwidth
getBandwidth
in interface HasBandwidth
public void setCentralFrequency(Frequency newCenter)
CorrelatorSubband
When moving the center, this method will always leave the bandwidth unchanged. If an attempt is made to move the center in such a way that the low end of this subband's range would be negative, the center will be moved to the lowest value that would not force this subband to contain negative frequencies. This value is equal to one half the bandwidth. Likewise, if this subband belongs to a baseband, this method will not move the center frequency such that any part of this subband extends beyond the high end of its baseband.
setCentralFrequency
in interface CorrelatorSubband
newCenter
- the central frequency of this subband.public Frequency getCentralFrequency()
CorrelatorSubband
getCentralFrequency
in interface CorrelatorSubband
public Frequency getMinimumCentralFrequency()
CorrelatorSubband
getMinimumCentralFrequency
in interface CorrelatorSubband
public Frequency getMaximumCentralFrequency()
CorrelatorSubband
getMaximumCentralFrequency
in interface CorrelatorSubband
public FrequencyRange getFrequencyRange()
CorrelatorSubband
getFrequencyRange
in interface CorrelatorSubband
public FrequencyRange getProxiedRange()
CorrelatorSubband
CorrelatorSubband.getFrequencyRange()
. If, on the
other hand, this subband belongs to a baseband, the range returned will
follow this example:
Let the baseband go from 0.0GHz to 2.0GHz. Let the above range represent sky frequencies from 41.5GHz to 43.5GHz. If this subband has a range from 0.4GHz to 1.1GHz, the range returned by this method will be 41.9GHz to 42.6GHz.
getProxiedRange
in interface CorrelatorSubband
public void setCentralProxiedFrequency(Frequency newSkyCenter)
CorrelatorSubband
newSkyCenter
. This subband may need to move its center
in such a way that it no longer proxies newSkyCenter
.
This would be true if the calculated center frequency is outside
of the bounds of this subband's baseband, or if there are certain
restrictions for the placement of a subband within it baseband.
Concrete implementations are expected to get the actual center
as close as possible to the value that represents newSkyCenter
.
setCentralProxiedFrequency
in interface CorrelatorSubband
newSkyCenter
- the new center sky, or proxied, frequency for this subband.public int getRequantization()
CorrelatorSubband
getRequantization
in interface CorrelatorSubband
CorrelatorBaseband.getInitialQuantization()
protected abstract CorrelationProductGroupAbs makeCorrelationProductGroup()
public List<CorrelationProductGroup> getCorrelationProductGroups()
The returned collection is guaranteed to be non-null, but it may be empty. The returned collection is a copy of the one held internally, so changes to the structure of the collection by clients will not impact this object. The members of the collection, however, are those referenced by this subband, so changes to them will be reflected herein.
getCorrelationProductGroups
in interface CorrelatorSubband
public CorrelationProductGroupAbs addNewCorrelationProductGroup()
addNewCorrelationProductGroup
in interface CorrelatorSubband
public void removeCorrelationProductGroup(CorrelationProductGroup unwantedGroup)
removeCorrelationProductGroup
in interface CorrelatorSubband
unwantedGroup
- a correlation product group to be removed from this subband.protected void createdProdGrpsFromPersistentStore()
public CorrelatorBaseband 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
protected void setContainer(CorrelatorBasebandAbs newContainer)
protected CorrelatorBasebandAbs getContainer()
public CorrelatorSubbandAbs clone()
The returned subband is nearly, but not quite, a deep copy of this subband. Properties that are not copied:
If anything goes wrong during the cloning procedure,
a RuntimeException
will be thrown.
clone
in class Object
public boolean equals(Object o)
Most, but not all, public attributes take place in the comparison Those that do not are:
equals
in class Object
public int hashCode()
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |