Uploaded image for project: 'The Virtual Brain'
  1. The Virtual Brain
  2. TVB-2441 Upgrade TVB dependencies (mainly Python 3 and related )
  3. TVB-2499

Fix and migrate to neotraits_py3 'simulate_for_mouse' and 'generate_ts_h5_from_library' demos

    XMLWordPrintable

    Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0
    • Component/s: None
    • Labels:
      None
    • Sprint:
      TVB release 2.0
    • TVB-C Task:
      8.2 Pipeline Integration

      Description

      Fix bugs for these demos in a py3 environment:

      For 'simulate_for_mouse', the error is: TraitTypeError: can't be set to an array of dtype float64 attribute tvb.datatypes.connectivity.Connectivity.cortical = NArray(label='Cortical', dtype=bool, default=None, dim_names=(), ndim=None, required=False) =>the error is thrown here: con = connectivity.Connectivity.from_file("../mouse/allen_2mm/Connectivity.h5")

      For 'generate_ts_h5_from_library':

      • in the 2nd cell of code, at line:  (time_array, data_array), = sim.run() => we have the error: Exception: Got shape (1, 6) for noise but require (6, 76). You need to reconfigure noise after you have changed your model.
      • in the 4th cell of code, we have the error: NameError: name 'data_array' is not defined => thrown at the line: series_of_time = time_series.TimeSeries(data=data_array, time=time_array, sample_period=monitor.period)
      • in the 5th cell of code, the same error at the line: f.attrs['TVB_Is_nan'] = serialize_value(bool(np.isnan(data_array).any()))
         

       

        Gliffy Diagrams

          Attachments

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 1 day
                  1d
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 4 hours, 30 minutes Time Not Required
                  4h 30m