Class Gratings
Assembly: TowseyLibrary.dll
Syntax
Fields
|
Improve this Doc
View Source
key_END_FRAME
Declaration
public const string key_END_FRAME = "endFrame"
Field Value
|
Improve this Doc
View Source
key_PERIODICITY
Declaration
public const string key_PERIODICITY = "periodicity"
Field Value
|
Improve this Doc
View Source
key_SCORE
Declaration
public const string key_SCORE = "score"
Field Value
|
Improve this Doc
View Source
key_START_FRAME
Declaration
public const string key_START_FRAME = "startFrame"
Field Value
Methods
|
Improve this Doc
View Source
DetectPeriod2Grating(Double[])
Declaration
public static double DetectPeriod2Grating(double[] v)
Parameters
Type |
Name |
Description |
Double[] |
v |
|
Returns
|
Improve this Doc
View Source
Declaration
public static List<Dictionary<string, double>> ExtractPeriodicEvents(double[] intensity, double[] periodicity, double intensityThreshold)
Parameters
Returns
|
Improve this Doc
View Source
GetPeriodicSignal(Int32, Int32)
Declaration
public static double[] GetPeriodicSignal(int cyclePeriod, int numberOfCycles)
Parameters
Type |
Name |
Description |
Int32 |
cyclePeriod |
|
Int32 |
numberOfCycles |
|
Returns
|
Improve this Doc
View Source
MergePeriodicScoreArrays(Double[][], Int32, Int32)
Declaration
public static Tuple<double[], double[]> MergePeriodicScoreArrays(double[][] periodScores, int minPeriod, int maxPeriod)
Parameters
Returns
|
Improve this Doc
View Source
ReduceArray(Double[], Int32, Int32)
Declaration
public static double[] ReduceArray(double[] array, int cyclePeriod, int numberOfCycles)
Parameters
Returns
|
Improve this Doc
View Source
ScanArrayForGratingPattern(Double[], Int32, Int32, Int32)
Steps through the passed array and and at each step cuts out a segment having length = numberOfCycles * cyclePeriod.
Each segment is then reduced to length = numberOfCycles * 2.
Then the reduced segment is passed to check for a grating pattern having period = 2 signal samples.
Use this method when the array to be scanned will be reduced on the fly.
Declaration
public static double[] ScanArrayForGratingPattern(double[] array, int step, int numberOfCycles, int cyclePeriod)
Parameters
Type |
Name |
Description |
Double[] |
array |
|
Int32 |
step |
|
Int32 |
numberOfCycles |
|
Int32 |
cyclePeriod |
NB! MUST BE AN EVEN NUMBER!!!.
|
Returns
|
Improve this Doc
View Source
ScanArrayForGratingPattern(Double[], Int32, Int32, Int32, Int32)
returns the period scores for a range of periods to be found in the passed array.
Declaration
public static double[][] ScanArrayForGratingPattern(double[] array, int minPeriod, int maxPeriod, int numberOfCycles, int step)
Parameters
Returns
|
Improve this Doc
View Source
ScanArrayForGridPattern(Double[], Int32, Int32)
Steps through the passed array and checks each segment for a grating pattern having period = 2 signal samples.
Use this method when the array to be scanned has already been reduced by some method.
Declaration
public static double[] ScanArrayForGridPattern(double[] array, int step, int segmentLength)
Parameters
Returns
|
Improve this Doc
View Source
Test_DetectPeriod2Grating()
Runs a simple test of the DetectPeriod2Grating() method
First construct an appropriate vector with alternating high and low values.
Declaration
public static void Test_DetectPeriod2Grating()
|
Improve this Doc
View Source
Test_ScanArrayForGridPattern1()
Runs a test of the ScanArrayForGratingPattern() method.
First constructs a grating signal, then embeds it in longer noise signal
The grating is defined by a period and the number of cycles.
The search is repeated many iterations in order to get everage accuracy.
Accuracy depends on relative levels of noise gain and signal gain i.e. the SNR.
Declaration
public static void Test_ScanArrayForGridPattern1()
Extension Methods