Skip to content

Instantly share code, notes, and snippets.

View aleph-ra's full-sized avatar

ahr aleph-ra

View GitHub Profile
@aleph-ra
aleph-ra / install_acpp.sh
Last active January 29, 2025 14:38
AdaptiveCpp installation script
#!/bin/bash
# Stop command echoing
set +x
# Propogate errors and fail on error
set -euo pipefail
# Default log level: INFO
QUIET_MODE=false
from NeuroMLUtilities import ConnectionInfo
import PyOpenWorm as P
############################################################
# A simple script to read the values in PyOpenWorm
############################################################
@aleph-ra
aleph-ra / c302_Motor.py
Created January 6, 2015 08:06
Motor neron circuit for c302 (AS01, AS02, DA01, DA02, DB01, DD01, SMDDL, SMDDR)
# Model of a neuromotor circuit
# To run:
# python c302_Motor.py A (uses parameters_A, requires jNeuroML to run)
# or
# python c302_Motor.py B (uses parameters_B, requires jNeuroML built from the
# experimental branches to run: 'python getNeuroML experimental'
# see https://github.com/NeuroML/jNeuroML)
@aleph-ra
aleph-ra / SpreadsheetDataReader.py
Created November 3, 2014 12:17
Updated SpreadsheetDataReader.py from c302. Updated to read from NeuronConnect.xls (OpenWorm)
# -*- coding: utf-8 -*-
from NeuroMLUtilities import ConnectionInfo
from xlrd import open_workbook
############################################################
# A simple script to read the values in CElegansNeuronTables.xls.
############################################################
@aleph-ra
aleph-ra / neuronconnect_connection_test.py
Created November 3, 2014 12:13
In c302 (https://github.com/openworm/CElegansNeuroML/tree/master/CElegans/pythonScripts/c302) reads each connection in excel file NeuronConnect (http://www.wormatlas.org/images/NeuronConnect.xls), generates .nml file for the pair of neurons and tests if the connection exists as stated in the excel file for c302. Records errors in log file.(OpenW…
# RUN WITH A SUBSET FROM NeuronConnect.xls, DO NOT RUN WITH COMPLETE EXCEL FILE.
import os
import sys
sys.path.append("..")
import SpreadsheetDataReader
import xlwt
@aleph-ra
aleph-ra / c302_connection_test_B.py
Created November 3, 2014 12:09
In c302 (https://github.com/openworm/CElegansNeuroML/tree/master/CElegans/pythonScripts/c302) reads each connection in excel file, generates .nml file for the pair of neurons and tests if the connection exists as stated in the excel file. Uses parameters_B which are still under development (OpenWorm)
import os
import sys
sys.path.append("..")
import SpreadsheetDataReader
from c302 import generate
import parameters_B as params
import neuroml.loaders as loaders
@aleph-ra
aleph-ra / c302_connection_test.py
Created November 3, 2014 11:40
In c302 (https://github.com/openworm/CElegansNeuroML/tree/master/CElegans/pythonScripts/c302) reads each connection in excel file, generates .nml file for the pair of neurons and tests if the connection exists as stated in the excel file. (OpenWorm)
import os
import sys
sys.path.append("..")
import SpreadsheetDataReader
from c302 import generate
import parameters_A as params
import neuroml.loaders as loaders
@aleph-ra
aleph-ra / hub_spoke_testing.py
Last active August 29, 2015 14:07
Testing the c302 model based on hub and spoke structure as described in https://github.com/openworm/OpenWorm/issues/212
import os
if __name__ == '__main__':
hub_cell = "RMGR"
spoke_cells =["URXR","ASKR","ASJR","RMHR","AWBR","IL2R","ASHR","ADLR"]
# stimulating RMGR (hub cell) when paired with all spoke cells