Skip to content

Commit

Permalink
TVB-2680. Monitors can use the default store() method. Sync store() s…
Browse files Browse the repository at this point in the history
…ignature from BurstConfigurationH5 with base.
  • Loading branch information
popaula937 committed Apr 30, 2020
1 parent b3d7de9 commit b754828
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
23 changes: 0 additions & 23 deletions framework_tvb/tvb/core/entities/file/simulator/monitor_h5.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):

Expand All @@ -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):

Expand All @@ -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):

Expand All @@ -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):

Expand Down

0 comments on commit b754828

Please sign in to comment.