Skip to content
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

add function cumulative rainflow spectrum #255

Closed
wants to merge 1 commit into from

Conversation

kchong75
Copy link

@kchong75 kchong75 commented Aug 9, 2023

@rpauly18 @hivanov-nrel
PR for mhkit-fatigue: cumulative rainflow spectrum

data_signal : 2d array
Data signals being analyzed
bin_num : int
Number of bins for rainflow counting method (minimum=100)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would add an assert statement checking to see if this value is above 100

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @rpauly18 we are no longer using assert statements. See #242.

For the current assert the replacement would be:

    if not isinstance(bin_num, (float, int)):
        raise ValueError('bin_num must be of type float or int')

ChatGPT is pretty good at converting these but we need to always check its work.

@rpauly18
Copy link
Contributor

@hivanov-nrel can you take a look at this and make sure the functionality is as expected? Can you also develop a quick test for this?

@ssolson ssolson changed the base branch from develop to main May 8, 2024 13:26
@ssolson ssolson deleted the branch MHKiT-Software:develop May 8, 2024 14:14
@ssolson ssolson closed this May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants