|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.ed.ph.signal.Signal
uk.ac.ed.ph.signal.RealSignal
public class RealSignal
Class to deal with and process Real Signals where the signal is held as an 1 dimensial array of doubles.
Field Summary |
---|
Fields inherited from class uk.ac.ed.ph.signal.Signal |
---|
data, fmt, plot |
Constructor Summary | |
---|---|
RealSignal(ComplexSignal s,
int flag)
Constuctor top form a RealSignal from a ComplexSignal with a conversion flag |
|
RealSignal(double[] d)
Constrctor to form a RealSignal double[] array. |
|
RealSignal(int n)
Constrcutor to form a RealSignal with specified number of data points. |
|
RealSignal(RealDataArray da)
Constrctor to form a RealSignal a ReadDataArray. |
|
RealSignal(RealSignal s)
Constructor to for a RealSignal with parameeters and data from a specifed RealSignal. |
Method Summary | |
---|---|
RealSignal |
clone()
Method to clone the current RealDataArray |
RealSignal |
extract(int start,
int length)
Method to extarct a length of Signal into a new RealSignal |
RealSignal |
extract(int start,
int length,
int sample)
Method to extarct a lengtn of Signal into a new RealSignal |
String |
formatElement(int i)
Format an elemenst |
static RealSignal |
fromTextFile(File file)
Static to read in RealSignal from text data file with two or three doubles per line |
static RealSignal |
fromTextFile(String fileName)
Static to read in ComplexSignal from text data file with two doubles per line |
RealDataArray |
getDataArray()
Method to get the DataArray |
Methods inherited from class uk.ac.ed.ph.signal.Signal |
---|
add, add, add, add, centreFourier, conjugate, conjugate, fillSine, fourier, getComplex, getComplex, getConversion, getCurrentWidth, getDataBuffer, getDouble, getDouble, getPlot, getRealSignal, getRealSignal, getSample, getSampleInterval, getSpace, getStart, getTime, getTitle, getType, getWidth, mult, mult, mult, mult, mult, mult, mult, multConjugate, powerSpectrum, setComplex, setComplex, setConversion, setDouble, setSampleFrequency, setSampleInterval, setStart, setTitle, toGraph, toPlot, toPlot, toPrintWriter, toTextFile, toTextFile, weight |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RealSignal(int n)
n
- number of data pointspublic RealSignal(double[] d)
d
- the arraypublic RealSignal(RealDataArray da)
da
- the DataArraypublic RealSignal(RealSignal s)
s
- the RealSignalpublic RealSignal(ComplexSignal s, int flag)
s
- the ComplexSignalflag
- the conveesion flag.Method Detail |
---|
public RealSignal clone()
clone
in class Object
public RealDataArray getDataArray()
public RealSignal extract(int start, int length, int sample)
start
- start element of extarctionlength
- length of extarcted signalsample
- sample intervalpublic RealSignal extract(int start, int length)
start
- start element of extarctionlength
- length of extarcted signalpublic String formatElement(int i)
i
- the element index
String
the formatted String.public static RealSignal fromTextFile(File file)
file
- the text filepublic static RealSignal fromTextFile(String fileName)
fileName
- the text file
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |