From b7548283bb19304ddc87986a8f79876e91da5e7d Mon Sep 17 00:00:00 2001 From: popaula937 Date: Thu, 30 Apr 2020 14:04:00 +0300 Subject: [PATCH] TVB-2680. Monitors can use the default store() method. Sync store() signature from BurstConfigurationH5 with base. --- .../file/simulator/burst_configuration_h5.py | 2 +- .../entities/file/simulator/monitor_h5.py | 23 ------------------- 2 files changed, 1 insertion(+), 24 deletions(-) diff --git a/framework_tvb/tvb/core/entities/file/simulator/burst_configuration_h5.py b/framework_tvb/tvb/core/entities/file/simulator/burst_configuration_h5.py index 8e5fdbab16..861eccfde9 100644 --- a/framework_tvb/tvb/core/entities/file/simulator/burst_configuration_h5.py +++ b/framework_tvb/tvb/core/entities/file/simulator/burst_configuration_h5.py @@ -47,7 +47,7 @@ def __init__(self, path): self.range1 = Scalar(Attr(str, required=False), self, name='range1') self.range2 = Scalar(Attr(str, required=False), self, name='range2') - def store(self, burst_config, scalars_only=False, store_references=False): + def store(self, burst_config, scalars_only=False, store_references=True): self.name.store(burst_config.name) self.status.store(burst_config.status) self.error_message.store(burst_config.error_message or 'None') diff --git a/framework_tvb/tvb/core/entities/file/simulator/monitor_h5.py b/framework_tvb/tvb/core/entities/file/simulator/monitor_h5.py index 78d644191f..595da4e6ff 100644 --- a/framework_tvb/tvb/core/entities/file/simulator/monitor_h5.py +++ b/framework_tvb/tvb/core/entities/file/simulator/monitor_h5.py @@ -76,11 +76,6 @@ def __init__(self, path): self.region_mapping = Reference(Projection.region_mapping, self) self.obnoise = Reference(Projection.obsnoise, self) - def store(self, datatype, scalars_only=False, store_references=False): - # type: (Projection, bool, bool) -> None - super(ProjectionH5, self).store(datatype, scalars_only, store_references) - self.region_mapping.store(datatype.region_mapping.gid) - class EEGH5(ProjectionH5): @@ -91,12 +86,6 @@ def __init__(self, path): self.reference = Scalar(EEG.reference, self) self.sigma = Scalar(EEG.sigma, self) - def store(self, datatype, scalars_only=False, store_references=False): - # type: (Projection, bool, bool) -> None - super(EEGH5, self).store(datatype, scalars_only, store_references) - self.projection.store(datatype.projection.gid) - self.sensors.store(datatype.sensors.gid) - class MEGH5(ProjectionH5): @@ -105,12 +94,6 @@ def __init__(self, path): self.projection = Reference(MEG.projection, self) self.sensors = Reference(MEG.sensors, self) - def store(self, datatype, scalars_only=False, store_references=False): - # type: (Projection, bool, bool) -> None - super(MEGH5, self).store(datatype, scalars_only, store_references) - self.projection.store(datatype.projection.gid) - self.sensors.store(datatype.sensors.gid) - class iEEGH5(ProjectionH5): @@ -120,12 +103,6 @@ def __init__(self, path): self.sensors = Reference(iEEG.sensors, self) self.sigma = Scalar(iEEG.sigma, self) - def store(self, datatype, scalars_only=False, store_references=False): - # type: (Projection, bool, bool) -> None - super(iEEGH5, self).store(datatype, scalars_only, store_references) - self.projection.store(datatype.projection.gid) - self.sensors.store(datatype.sensors.gid) - class BoldH5(MonitorH5):