-
Notifications
You must be signed in to change notification settings - Fork 4
Updates backgrounds and resolutions in line with the MATLAB #100
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
Updates backgrounds and resolutions in line with the MATLAB #100
Conversation
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.
This is looking good so far. Alongside the comments, please add "backgrounds" to the output results dataclass (it's available in the C++), and then to the tests. As discussed, we should look to add the other updates to the inputs and outputs into the tests in another PR.
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.
This looks good, thanks for your hard work and patience on this. I've a few comments then we should be set.
In addition to those comments, I'm afraid set_fields
has another hole in it, in that the type can be changed there, with an error triggered by the incorrect source. The easiest way to resolve this is to add a model validator to the project that gives an error for any change of type, but any better suggestions are gratefully received.
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.
This all looks great, thanks very much for all of your hard work and sticking with things as we were working through how to make everything work properly.
I've one last job for you, in line with the matlab, could you please include a warning in the Signal
model that changing the type clears the fields.
This PR fixes #99. It additionally:
test_examples.py
which ensures that all examples run without error (exceptconvert_rascal
, seeconvert_rascal
example doesn't work when called programmatically #102)I've compared the results of the new
DSPC_data_background
andDSPC_function_background
examples to those in the MATLAB and found that they give the same results between languages.The output result has had backgroundParams removed from the contrastParams sub struct, with backgrounds added to the main result struct.done in Updates C++ and some unit tests #97ALL data files in the input problemStruct have been extended to EXACTLY six columns. Any empty columns are filled with zero values.done in Updates C++ and some unit tests #97The field contrastBackgroundTypes has been added to problemStructdone in Updates C++ and some unit tests #97