-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added CWTOutput class to fix the issues with the new main cwt method.… #21
Conversation
… Then I fixed all the tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See the comment on the GetComponent method and fix what I believe is the inefficiency in the CalculateTimeAxis function.
FCWTAPI/CWTObject.cs
Outdated
default: | ||
return null; | ||
} | ||
} | ||
private double[,] GetComponent(CWTComponent comp, double[,] originalArray) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the intention for this method to be removed/rendered obsolete?
FCWTAPI/CWTObject.cs
Outdated
@@ -86,6 +86,20 @@ public void SplitRealAndImaginary(CWTComponent comp, out double[,]? realCwt, out | |||
break; | |||
} | |||
} | |||
public double[,]? GetComponent(CWTComponent comp, CWTOutput cwtOutput) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the only function of this method to return Real, Imaginary or Both as as a single array, wouldn't it make more sense to just have a method to get both components in a single array since SplitRealAndImaginary already gets a double[ , ] corresponding to the real and imaginary components?
FCWTAPI/CWTOutput.cs
Outdated
{ | ||
case 0: return cwtoutput.RealArray.GetLength(0); | ||
case 1: return cwtoutput.RealArray.GetLength(1); | ||
default: return -1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be better to throw an exception here to make it more traceable if an int != 0 or 1 was entered?
double testPoint = Math.Atan(imagCwt[32, 32] / realCwt[32, 32]); | ||
Assert.AreEqual(testPoint, testPhase[32, 32], 0.001); | ||
} | ||
//[Test] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you comment this out?
… Then I fixed all the tests