Exemplo n.º 1
0
    def summarise_all(cls):
        from morphforge.stdimports import PostSynapticTemplateLibrary, CellLibrary, ChannelLibrary, MorphologyLibrary

        types = mrd.SectionNewPage(
            "Available class types",
            cls.summarise_channeltypes(),
            cls.summarise_currentclamptypes(),
            cls.summarise_voltageclamptypes(),
            cls.summarise_presynaptictriggertypes(),
            cls.summarise_postsynaptictemplatetypes(),
            cls.summarise_tracemethods(),
        )
        libraries = mrd.SectionNewPage(
            "Library Contents",
            ChannelLibrary.summary_table(),
            MorphologyLibrary.summary_table(),
            PostSynapticTemplateLibrary.summary_table(),
            CellLibrary.summary_table(),
        )

        return mrd.SectionNewPage("Morphforge Configuration", types, libraries)
Exemplo n.º 2
0
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
#  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# ----------------------------------------------------------------------



""" Summarise the cells and channels that are registered to an environment
"""

import mredoc
from morphforge.stdimports import PluginMgr, CellLibrary, ChannelLibrary, MorphologyLibrary
import morphforgecontrib.stdimports as mfc
from  modelling import *
fname = '~/Desktop/morphforge_channels.pdf'

mredoc.Section('Summary',
    CellLibrary.summary_table(),
    ChannelLibrary.summary_table(),
    MorphologyLibrary.summary_table(),
    ).to_pdf(fname)

print 'Cell & Channel summary stored at: %s'%fname


# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
#  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# ----------------------------------------------------------------------

import os
from morphforge.stdimports import ChannelLibrary, LocMgr
from morphforgecontrib.stdimports import NeuroML_Via_NeuroUnits_Channel
xsl_filename = os.path.join(LocMgr.get_test_srcs_path(), "neuroml/channelml/ChannelML_v1.8.1_NEURONmod.xsl")


def apply_hh_chls_neuroml_neurounits_na(env):
    return env.Channel(NeuroML_Via_NeuroUnits_Channel,
            xml_filename = os.path.join(LocMgr.get_test_srcs_path(), "neuroml/channelml/NaChannel_HH.xml"),
            )
    
def apply_hh_chls_neuroml_neurounits_k(env):
    return env.Channel(NeuroML_Via_NeuroUnits_Channel,
        xml_filename = os.path.join(LocMgr.get_test_srcs_path(), "neuroml/channelml/KChannel_HH.xml"),
        )



ChannelLibrary.register_channel(modelsrc="_test_neuroml_via_neurounits_HH52", channeltype='Na', chl_functor=apply_hh_chls_neuroml_neurounits_na)
ChannelLibrary.register_channel(modelsrc="_test_neuroml_via_neurounits_HH52", channeltype='K', chl_functor=apply_hh_chls_neuroml_neurounits_k)
Exemplo n.º 4
0
@cached_functor
def get_hh_na(env):
    return env.Channel(
        NeuroUnitEqnsetMechanism,
        name="_neurounits_hh_na",
        eqnset=eqnset_txt_na,
        default_parameters={"g":qty("120:mS/cm2")}
        )
@cached_functor
def get_hh_k(env):
    return env.Channel(
        NeuroUnitEqnsetMechanism,
        name="_neurounits_hh_k",
        eqnset=eqnset_txt_k,
        )

@cached_functor
def get_hh_lk(env):
    return env.Channel(
        NeuroUnitEqnsetMechanism,
        name="_neurounits_hh_lk",
        eqnset=eqnset_txt_lk,
        )



ChannelLibrary.register_channel(modelsrc="_test_neurounits_HH52", channeltype='Na', chl_functor=get_hh_na)
ChannelLibrary.register_channel(modelsrc="_test_neurounits_HH52", channeltype='K', chl_functor=get_hh_k)
ChannelLibrary.register_channel(modelsrc="_test_neurounits_HH52", channeltype='Lk', chl_functor=get_hh_lk)