dnvgl / qats

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

Fails to compare PSD of two time series located on two different drives #89

Closed tovop closed 2 years ago

tovop commented 2 years ago

Describe the bug The TsDB object fails to calculate common path for time series located on different drives (different drive letters). This is key to automatically create readable labels when plotting the time series, PSDs etc.

To Reproduce Steps to reproduce the behavior:

  1. Load two time series files located on different drives (different drive letters)
    db = TsDB()
    db.load('G:\....')
    db.load('C:\....')
  2. Check common path of timeseries using db.common or list all paths using db.list()
  3. See error

Expected behavior In the case where the time series are on different drives the common path should be an empty string.

Screenshots image

Desktop (please complete the following information):

Additional context I propose to catch the ValueError raised in TsDB.common if paths contain both absolute and relative pathnames, the paths are on the different drives or if paths is empty. And return an empty string "".