dnvgl / qats

Python library and GUI for efficient processing and visualization of time series.
MIT License
38 stars 10 forks source link

TsDB.register.keys for witurb.bin #97

Closed erikbhanssengmailcom closed 1 year ago

erikbhanssengmailcom commented 1 year ago

Hi

Applying TsDB.fromfile( *witurb.bin).register returns odict. Odict.keys() include wind turbine name only.

I'd like the keys to include contents abbrivated as per key .txt-file.

Regards, Erik

eneelo commented 1 year ago

Hi, Please provide an example of what you get vs. what you would like to have, and preferably also a screenshot of associated line(s) in key-file.

BR, Erling

PS. The command TsDB.fromfile( *witurb.bin).list() (or, .list(relative=True)) is normally a more convenient way to view contents/names.

erikbhanssengmailcom commented 1 year ago

Hi.

What I get on e.g. elmfor.bin or results.tda is shown on the left figure. Every timeseries has a unique ID including parsing of data/description.

For the witurb.bin file only the name of the wind turbine is returned (right figure) for all elements of the TsDB. I would like the timeseries names to include contents abbrivated, e.g. 'RotorSpeed'.

Thanks for your .list() tip.

Regards, Erik

witurb image

eneelo commented 1 year ago

Thanks for the details. It seems that the format of the key-file (key_<>_witurb.txt) has changed. Or, perhaps, depends on whether the model includes one or more turbines? Any idea?

When the support for <>_witurb.bin files was added, it was based on an example key-file that looked like this: image

... whereas your key-file includes an additional column with the turbine name (which is then interpreted by qats as the time series name).

Since the columns are space-delimited (not tab, unfortunately), we need to think through how we interpret the file and work out whether turbine name is given or not. I have no immediate and robust solution for that, but suggestions are welcome.

In the meantime, the best quickfix on your side would probably be to modify the key-file before loading it by qats.TsDB(), e.g., by replacing the whitespace after turbine name with an underscore (and replace '-' by whitespace for first two rows with FORTRAN and Time).

erikbhanssengmailcom commented 1 year ago

Thanks, The model includes one turbine only. I will consider your quickfix. Regards Erik