-
Notifications
You must be signed in to change notification settings - Fork 45
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 Copulas #130
WDRT Copulas #130
Conversation
…ct to function with tthe new structure
@ssolson I did a quick review, looks good! Here are some minor comments: environmental_contours.py
resource.py
__init__.py
|
@ssolson I'm trying to re-think what is the best option for importing
from resource import *
from mhkit.wave.resource.environmental_contours import environmental_contours, PCA_contour downside: deeper folder structure. |
@cmichelenstrofer I think how the imports are being handled is appropriate. The docs should work similarly to how we handle many of the tidal module functions |
Agree I am finishing this up now. I went and made an example to quickly show that we curate this ourselves so in the rst file we put:
And we get: |
Carlos I left the PCA method out of resource because I see it as more focused. My thought right now is that environmental_contours is available as a general purpose method which you can call from resource. You can also call environmental contours from the specific env contours module as well as the PCA method which is more focused specifically to contour methods. This is also why I chose not to _ the module itself. Am I just complicating things and do you guys think we should just interact with everything through the resource module? |
@ssolson the only reason someone would use the Also, is the output of PCA any different than calling the main But these are minor points and either option would work, so your call. |
My opinion is that unless we foresee more functions being developed in the environmental_contours module, everything should just be called through resource. I do like that the physical code is housed elsewhere to not overwhelm the resource.py file. That being said, if you feel strongly about having environmental_contours being separate, I am not dead set against it. |
I will move them over. My overall view is that the PCA is more streamlined from documentation to execution but it of course returns the same results as it should. My goal is that I ultimately believe a user will want to modify and work with these functions and having the PCA separate moves users over to the module they would want to be working in more as they look to advance their research into contour methods. But ultimately its nbd and users will find their way there naturally. |
@rpauly18 are you still reviewing this or can it be merged? |
@cmichelenstrofer I do have an open question abut a variable name (see above), but then it can be merged. |
I don't see any questions about a variable name from @rpauly18. Could you point me to your question, please? |
mhkit/wave/environmental_contours.py
Outdated
Component 1 data | ||
x2: array | ||
Component 2 data | ||
sea_state_duration : int or float |
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.
@ssolson Is "sea_state_duration" the standard name for this variable? Since it looks like it is a sample rate based on the description, would something else be more suitable?
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.
@ssolson here is my question.
Added Copula computations from WDRT:
Standard Copulas
NonParametric Copulas
KDE Plots
Code to Code verification
All values match the WDRT output. Plots below show Gaussian and Gumbel matching values between MHKiT and WDRT. Can view all matching plots in
environmental_copulas.ipynb
.