Commit 1c686f35 authored by Pierre Augier's avatar Pierre Augier
Browse files

2 fixes in spatiotemporal_spectra and spatial_means_regions_milestone

parent f9271dd03fd9
Pipeline #22943 passed with stage
in 20 minutes and 57 seconds
......@@ -225,7 +225,10 @@ class SpatioTemporalSpectra3D(SpecificOutput):
# check values in files
with open_patient(paths[0], "r") as file:
if file.attrs["nb_proc"] != mpi.nb_proc:
raise ValueError("process number is different from files")
raise ValueError(
f"process number ({mpi.nb_proc}) is different from "
f"process number in file ({file.attrs['nb_proc']})"
if (file.attrs["dims_order"] != self.dims_order).any():
raise ValueError("dimensions order is different from files")
if (file.attrs["probes_region"] != self.probes_region).any():
......@@ -223,10 +223,13 @@ class SpatialMeansRegions(SimulExtender, SpecificOutput):
with open(path, "r") as file:
words = file.readline().split()
xmin_file = words[3]
xmax_file = words[7]
xmin_file = float(words[3])
xmax_file = float(words[7])
if xmin_file != xmin or xmax_file != xmax:
raise ValueError
raise ValueError(
"xmin_file != xmin or xmax_file != xmax\n"
f"{xmin_file} != {xmin} or {xmax_file} != {xmax}"
def complete_params_with_default(cls, params):
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