edu.nrao.sss.electronics
Class DigitalSignal

java.lang.Object
  extended by edu.nrao.sss.electronics.Signal
      extended by edu.nrao.sss.electronics.DigitalSignal
All Implemented Interfaces:
Cloneable

public class DigitalSignal
extends Signal

A frequency signal that has been digitized.

Version Info:

$Revision: 1707 $
$Date: 2008-11-14 10:23:59 -0700 (Fri, 14 Nov 2008) $
$Author: dharland $ (last person to modify)

Since:
2007-10-24
Author:
David M. Harland

Constructor Summary
DigitalSignal(FrequencyRange originalRange, PolarizationType polarization, Frequency samplingRate, int bitsPerSample)
          Creates a new digital signal with the given attributes.
DigitalSignal(Signal analogSignal, Frequency samplingRate, int bitsPerSample)
          Creates a new digital signal from another signal.
 
Method Summary
 DigitalSignal clone()
          Creates and returns a copy of this signal.
 boolean equals(Object o)
          Returns true if o is equal to this signal.
 int getBitDepth()
          Returns the number of bits per sample.
 Frequency getSamplingRate()
          Returns the rate at which this signal was sampled.
 int hashCode()
          Returns a hash code value for this signal.
 String toString()
          Returns a text representation of this signal.
 
Methods inherited from class edu.nrao.sss.electronics.Signal
appendToDevicePath, clone, getCurrentFrequencyFor, getCurrentRange, getDevicePath, getMappingIntercept, getMappingSlope, getName, getPolarization, getProxiedFrequencyFor, getProxiedRange, proxiedRangeIsReversed
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DigitalSignal

public DigitalSignal(FrequencyRange originalRange,
                     PolarizationType polarization,
                     Frequency samplingRate,
                     int bitsPerSample)
Creates a new digital signal with the given attributes.

Parameters:
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.
samplingRate - the number of samples taken per second.
bitsPerSample - the number of bits per sample. If this value is less than one an IllegalArgumentException will be thrown.

DigitalSignal

public DigitalSignal(Signal analogSignal,
                     Frequency samplingRate,
                     int bitsPerSample)
Creates a new digital signal from another signal.

Parameters:
analogSignal - another signal, usually analog, whose properties will be copied into this signal.
samplingRate - the number of samples taken per second.
bitsPerSample - the number of bits per sample. If this value is less than one an IllegalArgumentException will be thrown.
Method Detail

getSamplingRate

public Frequency getSamplingRate()
Returns the rate at which this signal was sampled.

Returns:
the rate at which this signal was sampled.

getBitDepth

public int getBitDepth()
Returns the number of bits per sample.

Returns:
the number of bits per sample.

toString

public String toString()
Returns a text representation of this signal.

Overrides:
toString in class Signal

clone

public DigitalSignal clone()
Creates and returns a copy of this signal.

If anything goes wrong during the cloning procedure, a RuntimeException will be thrown.

Overrides:
clone in class Signal

equals

public boolean equals(Object o)
Returns true if o is equal to this signal.

Overrides:
equals in class Signal

hashCode

public int hashCode()
Returns a hash code value for this signal.

Overrides:
hashCode in class Signal


Copyright © 2009. All Rights Reserved.