ESA-VirES / VirES-Server

VirES for Swarm Server Packages
5 stars 0 forks source link

Broken subsetting of unsorted datasets #213

Open pacesm opened 11 months ago

pacesm commented 11 months ago

The selection of unsorted datasets is broken.

The selection is supposed to work as follows:

  1. sorting index is generated for the unsorted times (stable argsort)
  2. range subset is found for the sorted times and subsetting index is created as a range subset of the sorting index
  3. the subsetting index is split in range subset to be extracted the source CDF (the CDF library does not support handle index slicing) and offset subsetting index applied to the extracted data range

The splitting of the subsetting index is not performed correctly

https://github.com/ESA-VirES/VirES-Server/blob/f1ce7d7532d1850f51ce25547e9e34bf31657b44/vires/vires/processes/util/time_series/data_extraction.py#L177

The range is correct, but the second part incorrectly select all data (SLICE_ALL) instead of returning the offset index.

pacesm commented 11 months ago

Fixed in 73a1c1505c6ef83a81149cf9db1ce2299f315a5c