Uploaded image for project: 'The Virtual Brain'
  1. The Virtual Brain
  2. TVB-2497

NodeCoherence incompatible with neotraits

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0.8
    • Component/s: None
    • Labels:
      None

      Description

      TraitTypeError                            Traceback (most recent call last)<ipython-input-5-431b8b82bb9f> in <module>      1 alg = node_coherence.NodeCoherence(time_series=tsr)----> 2 result = alg.evaluate()      3 result.configure()      4 FC = result.array_data[..., 0, 0]
      c:\users\gabriel.florea\desktop\mywork\tvb_2\tvb-library\tvb\analyzers\node_coherence.py in evaluate(self)    150             nfft=self.nfft,    151             array_data=coh,--> 152             frequency=freq)    153         return spec    154
      c:\users\gabriel.florea\desktop\mywork\tvb_2\tvb-library\tvb\basic\neotraits_core.py in _init_(self, **kwargs)    132                     )    133                 )--> 134             setattr(self, k, v)    135     136         self.tags = {{color:#b27d12}}
      c:\users\gabriel.florea\desktop\mywork\tvb_2\tvb-library\tvb\basic\neotraits_attr.py in _set_(self, instance, value)    531     def _set_(self, instance, value):    532         # type: (HasTraits, numpy.ndarray) -> None--> 533         super(NArray, self)._set_(instance, value)    534     535     def _str_(self):
      c:\users\gabriel.florea\desktop\mywork\tvb_2\tvb-library\tvb\basic\neotraits_attr.py in _set_(self, instance, value)    159                 raise TraitAttributeError("can't write final attribute")    160 --> 161         value = self._validate_set(instance, value)    162     163         instance._dict_[self.field_name] = value
      c:\users\gabriel.florea\desktop\mywork\tvb_2\tvb-library\tvb\basic\neotraits_attr.py in _validate_set(self, instance, value)    504             # value is optional and missing, nothing to do here    505             return--> 506         self.__validate(value)    507         # we should know here the concrete shape    508         # check it
      c:\users\gabriel.florea\desktop\mywork\tvb_2\tvb-library\tvb\basic\neotraits_attr.py in __validate(self, value)    453     454         if not numpy.can_cast(value.dtype, self.dtype, 'safe'):--> 455             raise TraitTypeError("can't be set to an array of dtype {}".format(value.dtype), attr=self)    456     457
      TraitTypeError: can't be set to an array of dtype complex128
        attribute tvb.datatypes.spectral.CoherenceSpectrum.array_data = NArray(label='', dtype=float64, default=None, dim_names=(), ndim=None, required=True)

        Gliffy Diagrams

          Attachments

            Activity

              People

              Assignee:
              lia.domide Lia Domide
              Reporter:
              gabriel.florea Gabriel Alin Florea
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 4 hours
                  4h
                  Remaining:
                  0m
                  Logged:
                  Time Not Required
                  Not Specified