NREL / pCrunch

Apache License 2.0
8 stars 11 forks source link

Issues of using the pCrunch with ROSCO_toolbox #10

Closed Seager1989 closed 2 years ago

Seager1989 commented 3 years ago

Hi all,

I am trying to use the pCrunch for OpenFAST postprocessing. The from ROSCO_toolbox.utilities import FAST_IO is not working with the error of cannot import name 'FAST_IO' from 'ROSCO_toolbox.utilities'. I did check the source code of ROSCO_toolbox and no FAST_IO found.

For using the get_DEL, the comments are presented as below. However, the ROSCO_toolbox.FAST_IO.load_output is also confusing.

<!--StartFragment-->Parameters: ----------- fast_data: list List of dictionaries containing openfast output data (returned from ROSCO_toolbox.FAST_IO.load_output) chan_info : list, tuple tuple/list containing channel names to be analyzed and corresponding fatigue slope factor "m" ie. ('TwrBsFxt',4) binNum : int number of bins for rainflow counting method (minimum=100) t : float/int Used to control DEL frequency. Default for 1Hz is 600 seconds for 10min data<!--EndFragment-->

Do you have any suggestions. Thank you

nikhar-abbas commented 3 years ago

Hi @Seager1989,

Sorry about the confusion here - the master branch off pCrunch is, in fact, out of date with the the most recent versions of the ROSCO toolbox (this will be fixed, soon!)

For the time being, you can change the import command to be from ROSCO_toolbox.ofTools import FAST_IO, as the FAST_IO class has been moved.

A better long-term option is to checkout the develop branch of pCrunch. There has been a very significant re-factor of how pCrunch is written, so setting up your personal codes to follow the develop branch will make future development much easier for you.

As far as your questions about the comments: When FAST_IO.load_output is used, a list of dictionaries is returned. Each list item corresponds to a single OpenFAST simulation's output, and the dictionary contains each channel name from the output. This list should be passed to the get_DEL function.

I hope this helps.

Cheers, Nikhar

Seager1989 commented 3 years ago

Dear Nikhar,

Thank you for your reply. This fixed my problem.

Xianping