ebranlard / pyDatView

A crossplatform GUI to plot tabulated data from files (e.g. CSV, Excel, OpenFAST, HAWC2, Flex...), or python pandas dataframes
MIT License
107 stars 41 forks source link

Bug: TI and standard deviation miscalculated for BTS files starting from version v0.3-27 #186

Closed achilleas101 closed 2 months ago

achilleas101 commented 2 months ago

Dear @ebranlard, I downloaded v.04 of pyDatView because I wanted to visualize the .bts file created by TurbSim using this input file (TurbSim.txt), in which I forced TI to be 16% at 150m. Opening the .bts file with v0.4 and v0.3-7 gives different plots (this also happens for all the plots except u_[m/s])

From v0.4 image1 from v0.3-7 image

In the second plot as you can see at 150m we have TI=16%. So which version should I use?

Thank you for your help in advane! Best regards, Achilleas

ebranlard commented 2 months ago

Hi @achilleas101 Thank you for pointing this out. There is indeed a bug that crept itself (related to averaging method we discussed in #185). There is a bit of a typo on the following line: https://github.com/ebranlard/pyDatView/blob/main/pydatview/io/turbsim_file.py#L357 I used std of std instead of mean of std, which would be more appropriate.

I'll push a fix for this shortly.

Thanks again!

ebranlard commented 2 months ago

It should now be fixed in the latest dev release(v0.4-27). The profile will be smoother compared to v0.3-7 due to the averaging in the "y" direction. Pease let me know if you find other problems.

image