Skip to content
Snippets Groups Projects
Commit ac1e3c96 authored by BRONES Romain's avatar BRONES Romain
Browse files

Fix chunkerize to handle spectrum data

* Multiply the number of points per the number of elements
parent ff9ac78a
No related branches found
No related tags found
No related merge requests found
...@@ -481,6 +481,9 @@ class ArchiveExtractor: ...@@ -481,6 +481,9 @@ class ArchiveExtractor:
List of datetime giving the limit of each chunks. List of datetime giving the limit of each chunks.
For N chunks, there is N+1 elements in cdates, as the start and end boundaries are included. For N chunks, there is N+1 elements in cdates, as the start and end boundaries are included.
""" """
info=self.infoattr(attribute)
self.logger.debug("Attribute information \n%s"%info)
# Get the number of points # Get the number of points
N=self.extractor.GetAttDataBetweenDatesCount([ N=self.extractor.GetAttDataBetweenDatesCount([
attribute, attribute,
...@@ -489,6 +492,11 @@ class ArchiveExtractor: ...@@ -489,6 +492,11 @@ class ArchiveExtractor:
]) ])
self.logger.debug("On the period, there is %d entries"%N) self.logger.debug("On the period, there is %d entries"%N)
dx=int(info["max_dim_x"])
if dx > 1:
self.logger.debug("Attribute is a vector with max dimension = %s"%dx)
N=N*dx
# If data chunk is too much, we need to cut it # If data chunk is too much, we need to cut it
if N > Nmax: if N > Nmax:
dt = (dateStop-dateStart)/(N//Nmax) dt = (dateStop-dateStart)/(N//Nmax)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment