Beispiel #1
0
def mooseReadNML2(modelpath : Path, verbose : True =False):
    """Read NeuroML model (version 2) and return reader object.
    """
    global nml2Import_, nml2ImportError_
    if not nml2Import_:
        raise RuntimeError("Could not load NML2 support:\n %s" % nml2ImportError_)

    assert modelpath.exists(), f'{modelpath} dot not exists'
    reader = _neuroml2.NML2Reader(verbose=verbose)
    reader.read(modelpath)
    return reader
Beispiel #2
0
def mooseReadNML2(modelpath, verbose=False):
    """Read NeuroML model (version 2) and return reader object.
    """
    global nml2Import_
    if not nml2Import_:
        mu.warn(nml2ImportError_)
        raise RuntimeError("Could not load NML2 support.")

    reader = _neuroml2.NML2Reader(verbose=verbose)
    reader.read(modelpath)
    return reader
Beispiel #3
0
def mooseReadNML2( modelpath ):
    """Read NeuroML model (version 2).

    """
    global nml2Import_
    if nml2Import_:
        reader = _neuroml2.NML2Reader( )
        reader.read( modelpath )
        return reader
    else:
        mu.info( nml2ImportError_ )
        mu.warn( "Could not load NML2 support. Doing nothing" )
        return False