Beispiel #1
0
def main(limit, manifest_path):
    app_config = Config()
    description = app_config.load(manifest_path)

    if 'LOG_CFG' in os.environ:
        log_config = os.environ['LOG_CFG']
    else:
        log_config = resource_filename('allensdk.model.biophysical',
                                       'logging.conf')
        os.environ['LOG_CFG'] = log_config
    lc.fileConfig(log_config)

    run_passive_fit(description)
def main():
    import sys

    manifest_path = sys.argv[-1]
    limit = float(sys.argv[-2])
    os.chdir(os.path.dirname(manifest_path))
    app_config = Config()
    description = app_config.load(manifest_path)

    upfile = description.manifest.get_path('upfile')
    up_data = np.loadtxt(upfile)
    downfile = description.manifest.get_path('downfile')
    down_data = np.loadtxt(downfile)
    swc_path = description.manifest.get_path('MORPHOLOGY')
    output_file = description.manifest.get_path('fit_2_file')

    data = neuron_passive_fit2(up_data, down_data, swc_path, limit)

    json_utilities.write(output_file, data)
Beispiel #3
0
def choose_bps_command(command='bps_simple', conf_file=None):
    log = logging.getLogger('allensdk.model.biophys_sim.bps_command')
    
    log.info("bps command: %s" % (command))
    
    if conf_file:
        conf_file = os.path.abspath(conf_file)
    
    if command == 'help':
        print Config().argparser.parse_args(['--help'])
    elif command == 'nrnivmodl':
        sp.call(['nrnivmodl', 'modfiles']) # TODO: alternate location in manifest?
    elif command == 'run_simple':
        app_config = Config()
        description = app_config.load(conf_file)
        sys.path.insert(1, description.manifest.get_path('CODE_DIR'))
        (module_name, function_name) = description.data['runs'][0]['main'].split('#')
        run_module(description, module_name, function_name)
    else:
        raise Exception("unknown command %s" %(command))
Beispiel #4
0
def choose_bps_command(command='bps_simple', conf_file=None):
    log = logging.getLogger('allensdk.model.biophys_sim.bps_command')

    log.info("bps command: %s" % (command))

    if conf_file:
        conf_file = os.path.abspath(conf_file)

    if command == 'help':
        print(Config().argparser.parse_args(['--help']))
    elif command == 'nrnivmodl':
        sp.call(['nrnivmodl', 'modfiles'])
    elif command == 'run_simple':
        app_config = Config()
        description = app_config.load(conf_file)
        sys.path.insert(1, description.manifest.get_path('CODE_DIR'))
        (module_name,
         function_name) = description.data['runs'][0]['main'].split('#')
        run_module(description, module_name, function_name)
    else:
        raise Exception("unknown command %s" % (command))