Commit 1dc8dd91 authored by Nicolas Vuaille's avatar Nicolas Vuaille

Fix timesteps values reading

  * When exporting from PV, Time values are stored as string in
  scientific format. When reading back, values are sorted as char and not as
  numerical values, so it breaks the mapping with timestep.
parent 1d760de4
......@@ -89,11 +89,12 @@ class FileStoreAPI(object):
"""returns control paramater names for the given object"""
return []
def get_control_values(self, controlparametername):
def get_control_values(self, controlparametername, sort=True):
"""returns sorted list of available values for a control parameter"""
info = self.fs.get_parameter(controlparametername)
values = info["values"]
if sort:
return values
def get_control_values_as_strings(self, controlparametername):
......@@ -328,7 +329,7 @@ class FileStoreSpecB(FileStoreAPI):
def get_timesteps(self):
"""returns a list of timesteps available in the store"""
if "time" in self.fs.parameter_list:
return list(self.get_control_values("time"))
return list(self.get_control_values("time", False))
return []
def get_cameras(self, ts):
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment