Code Monkey home page Code Monkey logo

bsb-json's People

Contributors

helveg avatar

Watchers

 avatar

bsb-json's Issues

Multiple `$import` statements in JSON seems broken

{
  "storage": {
    "engine": "hdf5"
  },
  "network": {
    "x": 50.0,
    "y": 50.0,
    "z": 50.0,
    "chunk_size": 50
  },
  "partitions": {
    "any": {
      "type": "layer",
      "thickness": 50
    }
  },
  "cell_types": {
    "excitatory": {
      "spatial": {
        "radius": 1,
        "count": 2000
      }
    },
    "inhibitory": {
      "spatial": {
        "radius": 1,
        "count": 500
      }
    }
  },
  "placement": {
    "place_cells": {
      "strategy": "bsb.placement.RandomPlacement",
      "cell_types": [
        "excitatory",
        "inhibitory"
      ],
      "partitions": [
        "any"
      ]
    }
  },
  "connectivity": {
    "excitatory_to_excitatory": {
      "strategy": "bsb.connectivity.FixedIndegree",
      "indegree": 200,
      "presynaptic": {
        "cell_types": [
          "excitatory"
        ]
      },
      "postsynaptic": {
        "cell_types": [
          "excitatory"
        ]
      }
    },
    "excitatory_to_inhibitory": {
      "strategy": "bsb.connectivity.FixedIndegree",
      "indegree": 200,
      "presynaptic": {
        "cell_types": [
          "excitatory"
        ]
      },
      "postsynaptic": {
        "cell_types": [
          "inhibitory"
        ]
      }
    },
    "inhibitory_to_inhibitory": {
      "strategy": "bsb.connectivity.FixedIndegree",
      "indegree": 50,
      "presynaptic": {
        "cell_types": [
          "inhibitory"
        ]
      },
      "postsynaptic": {
        "cell_types": [
          "inhibitory"
        ]
      }
    },
    "inhibitory_to_excitatory": {
      "strategy": "bsb.connectivity.FixedIndegree",
      "indegree": 50,
      "presynaptic": {
        "cell_types": [
          "inhibitory"
        ]
      },
      "postsynaptic": {
        "cell_types": [
          "excitatory"
        ]
      }
    }
  },
  "simulations": {
    "test_nest": {
      "simulator": "nest",
      "duration": 1000,
      "resolution": 0.1,
      "cell_models": {
        "excitatory": {
          "constants": {
            "C_m": 250,
            "tau_m": 20,
            "tau_syn_ex": 0.5,
            "tau_syn_in": 0.5,
            "t_ref": 2.0,
            "E_L": 0.0,
            "V_reset": 0.0,
            "V_m": 0.0,
            "V_th": 20
          }
        },
        "inhibitory": {
          "constants": {
            "C_m": 250,
            "tau_m": 20,
            "tau_syn_ex": 0.5,
            "tau_syn_in": 0.5,
            "t_ref": 2.0,
            "E_L": 0.0,
            "V_reset": 0.0,
            "V_m": 0.0,
            "V_th": 20
          }
        }
      },
      "connection_models": {
        "excitatory_to_excitatory": {
          "synapse": {
            "weight": 20.68015524367846,
            "delay": 1.5
          }
        },
        "excitatory_to_inhibitory": {
          "synapse": {
            "weight": 20.68015524367846,
            "delay": 1.5
          }
        },
        "inhibitory_to_excitatory": {
          "synapse": {
            "weight": -103.4007762183923,
            "delay": 1.5
          }
        },
        "inhibitory_to_inhibitory": {
          "synapse": {
            "weight": -103.4007762183923,
            "delay": 1.5
          }
        }
      },
      "devices": {
        "pg": {
          "device": "poisson_generator",
          "rate": 17789.007714721884,
          "targetting": {
            "strategy": "all"
          },
          "$import": {
            "ref": "#../../connection_models/excitatory_to_excitatory/synapse",
            "values": [
              "weight",
              "delay"
            ]
          }
        },
        "sr_exc": {
          "device": "spike_recorder",
          "delay": 1,
          "targetting": {
            "strategy": "cell_model",
            "cell_models": [
              "excitatory"
            ],
            "count": 50
          }
        },
        "sr_inh": {
          "device": "spike_recorder",
          "delay": 1,
          "targetting": {
            "strategy": "cell_model",
            "cell_models": [
              "inhibitory"
            ],
            "count": 50
          }
        }
      }
    },
    "test_arbor": {
      "simulator": "arbor",
      "duration": 1000,
      "resolution": 0.1,
      "cell_models": {
        "excitatory": {
          "model_strategy": "lif",
          "constants": {
            "C_m": 250,
            "tau_m": 20,
            "t_ref": 2.0,
            "E_L": 0.0,
            "V_reset": 0.0,
            "V_m": 0.0,
            "V_th": 20
          }
        },
        "inhibitory": {
          "model_strategy": "lif",
          "constants": {
            "C_m": 250,
            "tau_m": 20,
            "t_ref": 2.0,
            "E_L": 0.0,
            "V_reset": 0.0,
            "V_m": 0.0,
            "V_th": 20
          }
        }
      },
      "connection_models": {
        "excitatory_to_excitatory": {
          "weight": 20.68015524367846,
          "delay": 1.5
        },
        "excitatory_to_inhibitory": {
          "weight": 20.68015524367846,
          "delay": 1.5
        },
        "inhibitory_to_excitatory": {
          "weight": -103.4007762183923,
          "delay": 1.5
        },
        "inhibitory_to_inhibitory": {
          "weight": -103.4007762183923,
          "delay": 1.5
        }
      },
      "devices": {
        "pg": {
          "device": "poisson_generator",
          "rate": 17789.007714721884,
          "targetting": {
            "strategy": "all"
          },
          "$import": {
            "ref": "#../../connection_models/excitatory_to_inhibitory/synapse",
            "values": [
              "weight",
              "delay"
            ]
          }
        }
      }
    }
  }
}

raises

bsb.exceptions.RequirementError: Missing required attribute 'weight' in {root}.simulations.test_nest.devices.pg

if the 2nd $import is removed, the test_nest devices work again.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.