|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.nrao.sss.electronics.Signal
public class Signal
A frequency signal that holds a current frequency range and the range for which the current is a proxy.
Version Info:
$Revision: 1985 $ |
$Date: 2009-02-19 15:57:58 -0700 (Thu, 19 Feb 2009) $ |
$Author: dharland $ (last person to modify) |
Constructor Summary | |
---|---|
Signal(Frequency centerFrequency)
Creates a new signal centered on the given frequency and with an unspecified polarization. |
|
Signal(FrequencyRange originalRange,
PolarizationType polarization)
Creates a new signal with the given frequencies and polarization. |
Method Summary | |
---|---|
void |
appendToDevicePath(String id)
Appends the given text to this signal's device path. |
Signal |
clone()
Creates and returns a copy of this signal. |
Signal |
clone(PolarizationType newPolarization)
Creates a copy of this signal, changes its polarization to newPolarization , and returns the copy. |
boolean |
equals(Object o)
Returns true if o is equal to this signal. |
Frequency |
getCurrentFrequencyFor(Frequency proxiedFrequency)
Returns the frequency to which proxiedFrequency has been transformed. |
FrequencyRange |
getCurrentRange()
Returns the frequency range covered by this signal. |
String |
getDevicePath()
Returns text that represents the devices through which this signal has traveled. |
Frequency |
getMappingIntercept()
Returns the y-intercept of the linear mapping function, where the current frequency is the independent variable and the proxied frequency is the dependent variable. |
BigDecimal |
getMappingSlope()
Returns the slope of the linear mapping function, where the current frequency is the independent variable and the proxied frequency is the dependent variable. |
String |
getName()
Returns the name of the last device in this signal's device path . |
PolarizationType |
getPolarization()
Returns the polarization of this signal. |
Frequency |
getProxiedFrequencyFor(Frequency currentFrequency)
Returns the frequency represented by the currentFrequency . |
FrequencyRange |
getProxiedRange()
Returns the frequency range represented by this signal. |
int |
hashCode()
Returns a hash code value for this signal. |
boolean |
proxiedRangeIsReversed()
Returns true if the high and low frequencies in the proxied range are mapped to the low and high frequencies, respectively, of the current range. |
String |
toString()
Returns a text representation of this signal. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Signal(FrequencyRange originalRange, PolarizationType polarization)
originalRange
- the frequency range of this signal. If this value is null
a NullPointerException
will be thrown.polarization
- the polarization of this signal. If this value is null
it will be converted to PolarizationType.UNSPECIFIED
.public Signal(Frequency centerFrequency)
unspecified
polarization.
This constructor is used by devices that produce very narrow band
signals, such as local oscillators
.
centerFrequency
- the central frequency of this signal. If this value is null
an NullPointerException
will be thrown.Method Detail |
---|
public FrequencyRange getProxiedRange()
The returned range is what the range returned by
getCurrentRange()
would be if we were to process
that range in reverse through whatever transformers
this signal has been passed. Note, though, that it
does not quite represent the original range of this
signal. This is because some transformers, such as
filters, cause information about their input signals
to be lost.
Example
Suppose a given signal originally occupied
the frequency space between 6-12GHz, was filtered to 8-10GHz,
and was then mixed down to 0-2GHz. In this example, the proxied
range (returned by this method) is 8-10GHz, while the
current range (returned by getCurrentRange()
), is
0-2GHz.
The returned range is a copy of the one held internally by this signal, so changes made to it after this call will not be reflected herein.
The returned range will never be null.
public FrequencyRange getCurrentRange()
The returned range represents the frequency of this signal
now. This may be a set of intermediate frequencies that is
a representation of the range of interest (which is returned
by getProxiedRange()
).
Example
Suppose a given signal originally occupied
the frequency space between 6-12GHz, was filtered to 8-10GHz,
and was then mixed down to 0-2GHz. In this example, the proxied
spectrum (returned by getProxiedRange()
) is 8-10GHz,
while the current range (returned by this method) is 0-2GHz.
The returned range is a copy of the one held internally by this signal, so changes made to it after this call will not be reflected herein.
The returned range will never be null.
public boolean proxiedRangeIsReversed()
public PolarizationType getPolarization()
unspecified
.
public Frequency getProxiedFrequencyFor(Frequency currentFrequency)
currentFrequency
.
One of the chief jobs of a signal is to allow the frequency range of interest to be converted to some other intermediate frequency range that is more convenient for the devices that manipulate signals. At some point, though, we want to know what frequency range is represented by this intermediate frequency range. The job of this method is to return a frequency of interest for a given intermediate frequency.
currentFrequency
- a frequency within this signal's current range. This is often
an intermediate frequency.
currentFrequency
is
a proxy.
IllegalArgumentException
- if currentFrequency
is not in this signal's current range.public Frequency getCurrentFrequencyFor(Frequency proxiedFrequency)
proxiedFrequency
has been transformed.
proxiedFrequency
- a frequency that is represented by this signal.
proxiedFrequency
has been transformed.
IllegalArgumentException
- if proxiedFrequency
is not in this signal's proxied range.getProxiedFrequencyFor(Frequency)
public BigDecimal getMappingSlope()
public Frequency getMappingIntercept()
public String getDevicePath()
public String getName()
device path
.
public void appendToDevicePath(String id)
id
- usually the ID, or name, of a device that is currently processing
this signal.public String toString()
toString
in class Object
public Signal clone()
If anything goes wrong during the cloning procedure,
a RuntimeException
will be thrown.
clone
in class Object
public Signal clone(PolarizationType newPolarization)
newPolarization
, and returns the copy.
newPolarization
- the polarization for the returned copy of this signal.
newPolarization
.public boolean equals(Object o)
o
is equal to this signal.
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 |