-
Notifications
You must be signed in to change notification settings - Fork 23
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
WDRT parity #127
WDRT parity #127
Conversation
Hi @simmsa @rpauly18 I think this is ready for review. The code/tests that I worked are passing locally. The only thing that I am unsure about is that comparing the notebooks to python, there are some instances where the values differ. For instance, the extreme design wave height seems suspiciously low. However, the tests are passing using the same data as python so i'm a bit confused on where the difference can be coming from... |
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.
@hivanov-nrel, overall this is a great improvement! There are a few failing tests due to file path issues and some files that were not included. I addressed these with specific comments in this PR.
I was able to reproduce the odd output in the extreme_response_contour_example Livescript. This issue is due to the gamma parameter not being correctly mapped to MHKiT-Python. The related issue is here #132. I plan to add a PR from the develop branch that fixes this asap. With a fixed jonswap_spectrum function we get a response that is closer to MHKiT-Python.
.
In extreme_response_contour_example, extreme_response_full_sea_state_example, and short_term_extremes_example I am getting results that are different that python. This is most likely due to randomness introduced not specifically setting a random seed in the surface_elevation
function. At a minimum we should probably set a seed on the MATLAB side. Looking into the python side, the default seed is none (https://github.com/MHKiT-Software/MHKiT-Python/blob/83a9d6d77841bd9da6f0d494c1df9f4bb43d58b0/mhkit/wave/resource.py#L363) and is random. We should push for setting a seed on the Python side when we have time, as it would be great if the MATLAB and Python notebooks had the same results.
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.
@hivanov-nrel thank you for fixing all the requested items. All of the tests are passing locally. I am going to go ahead and merge this into develop. Thank you for getting this done!
This PR is to address MATLAB parity for:
Below are the list of functions & tests to be added:
extreme.py:
peaks.py:
contours.py:
Testing:
Below are list of examples to be added:
Below are a list of functions/notebooks not incorporated: