edu.nrao.sss.electronics
Class LocalOscillatorPath

java.lang.Object
  extended by edu.nrao.sss.electronics.LocalOscillatorPath
All Implemented Interfaces:
SignalSource

public class LocalOscillatorPath
extends Object
implements SignalSource

A signal path that begins with a local oscillator and contains an optional multiplier and optional output filter.

Version Info:

$Revision: 1693 $
$Date: 2008-11-06 11:56:39 -0700 (Thu, 06 Nov 2008) $
$Author: dharland $ (last person to modify)

Since:
2007-11-07
Author:
David M. Harland

Constructor Summary
LocalOscillatorPath(SignalSource localOsc, BigDecimal loMultiplier, FrequencyRange outputFilter)
          Creates a new local oscillator path.
LocalOscillatorPath(SignalSource localOsc, int loMultiplier, FrequencyRange outputFilter)
          Creates a new local oscillator path.
 
Method Summary
 Frequency getLOFreqToMoveCenterViaAddition(Frequency from, Frequency to)
          Returns the value to which this path's source of signal should be tuned in order to move one frequency to another.
 Frequency getLOFreqToMoveCenterViaSubtraction(Frequency from, Frequency to)
          Returns the value to which this path's source of signal should be tuned in order to move one frequency to another.
 BigDecimal getMultiplier()
          Returns the multiplication factor used on the local oscillator's signal.
 FrequencyRange getOutputRange()
          Returns the broadest possible range the signal from for this LO path.
 Signal getSignal()
          Returns the signal produced by this local oscillator path.
 void setLOToMoveCenterViaAddition(Frequency from, Frequency to)
          Sets this path's local oscillator to a frequency that will convert from to to via addition.
 void setLOToMoveCenterViaSubtraction(Frequency from, Frequency to)
          Sets this path's local oscillator to a frequency that will convert from to to via subtraction.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocalOscillatorPath

public LocalOscillatorPath(SignalSource localOsc,
                           BigDecimal loMultiplier,
                           FrequencyRange outputFilter)
Creates a new local oscillator path.

Parameters:
localOsc - this path's source of signal. This is usually a LocalOscillator, but does not have to be. A value of null is permitted, but will render this object nearly useless, as most of its methods will return null.
loMultiplier - the amount by which the signal from localOsc should be multiplied. A value of null indicates that no multiplication should occur.
outputFilter - the filter through which the multiplied signal (if any multiplication occurs) is passed. A value of null indicates that no filtering should occur.

LocalOscillatorPath

public LocalOscillatorPath(SignalSource localOsc,
                           int loMultiplier,
                           FrequencyRange outputFilter)
Creates a new local oscillator path.

Parameters:
localOsc - this path's source of signal. This is usually a LocalOscillator, but does not have to be. A value of null is permitted, but will render this object nearly useless, as most of its methods will return null.
loMultiplier - the amount by which the signal from localOsc should be multiplied.
outputFilter - the filter through which the multiplied signal (if any multiplication occurs) is passed. A value of null indicates that no filtering should occur.
Method Detail

getLOFreqToMoveCenterViaSubtraction

public Frequency getLOFreqToMoveCenterViaSubtraction(Frequency from,
                                                     Frequency to)
Returns the value to which this path's source of signal should be tuned in order to move one frequency to another. This method takes into account the multiplier and filter on this path. It attempts to reach to by subtracting from from its multiplied signal.

(TODO: not yet handling filter. What if desired tuning doesn't pass through filter? Exception? Return null? Return 0.0Hz?)

(TODO: same issue if subtraction can not accomplish goal.)

Parameters:
from - the frequency to be shifted.
to - the result of shifting from using this path's LO and multiplier.
Returns:
the frequency to which this path's source of signal (usually a local oscillator) should be tuned in order to convert from to to.

getLOFreqToMoveCenterViaAddition

public Frequency getLOFreqToMoveCenterViaAddition(Frequency from,
                                                  Frequency to)
Returns the value to which this path's source of signal should be tuned in order to move one frequency to another. This method takes into account the multiplier and filter on this path. It attempts to reach to by adding its multiplied signal to from.

(TODO: not yet handling filter. What if desired tuning doesn't pass through filter? Exception? Return null? Return 0.0Hz?)

(TODO: same issue if addition can not accomplish goal.)

Parameters:
from - the frequency to be shifted.
to - the result of shifting from using this path's LO and multiplier.
Returns:
the frequency to which this path's source of signal (usually a local oscillator) should be tuned in order to convert from to to.

setLOToMoveCenterViaSubtraction

public void setLOToMoveCenterViaSubtraction(Frequency from,
                                            Frequency to)
Sets this path's local oscillator to a frequency that will convert from to to via subtraction.

This method accomplishes its task by first calling getLOFreqToMoveCenterViaSubtraction(Frequency, Frequency), so all the caveats for that method apply here. In addition, if this path's source of signal is not an LO, no tuning can be performed.

Parameters:
from - the frequency to be shifted.
to - the result of shifting from using this path's LO and multiplier.

setLOToMoveCenterViaAddition

public void setLOToMoveCenterViaAddition(Frequency from,
                                         Frequency to)
Sets this path's local oscillator to a frequency that will convert from to to via addition.

This method accomplishes its task by first calling getLOFreqToMoveCenterViaAddition(Frequency, Frequency), so all the caveats for that method apply here. In addition, if this path's source of signal is not an LO, no tuning can be performed.

Parameters:
from - the frequency to be shifted.
to - the result of shifting from using this path's LO and multiplier.

getSignal

public Signal getSignal()
Returns the signal produced by this local oscillator path. This is normally a narrow-band signal that was produced by an LO, optionally multiplied, and optionally filtered.

The returned value will be null if this path has no source, or if its source produces a null signal.

Specified by:
getSignal in interface SignalSource
Returns:
the signal produced by this local oscillator path.

getMultiplier

public BigDecimal getMultiplier()
Returns the multiplication factor used on the local oscillator's signal.

Returns:
the multiplier used by this LO path.
Since:
2008-11-06

getOutputRange

public FrequencyRange getOutputRange()
Returns the broadest possible range the signal from for this LO path. Note that the LO attached to this path might not actually be able to achieve the lower or upper most values if it has discrete tuning steps.

Returns:
the broadest possible range the signal from for this LO path.
Since:
2008-11-05


Copyright © 2009. All Rights Reserved.