Exemplo n.º 1
0
                ##Equations:
                #eqns = [
                #        "alpha(V) = (A+BV)/(C+exp((V+D)/E))",
                #        "beta(V) = (A+BV)/(C+exp((V+D)/E))",
                #       ]
                #for eqn in eqns:
                #    local_elements.append(Paragraph(eqn, reportlabconfig.styles['Normal']))
                # Alpha Beta
                #ReportLabTools.buildInfTauInterpolatedTable(elements=local_elements,
                #                         reportlabconfig=reportlabconfig,
                #                         title="Alpha", params=params[0])
                #ReportLabTools.buildInfTauInterpolatedTable(elements=local_elements,
                #                         reportlabconfig=reportlabconfig,
                #                         title="Beta1", params=params[1])


                # Figures:
                if make_graphs:
                    fig = cls.plot_state_curve_summary(alphabeta_chl, state, figsize=(7, 7))
                    local_elements.append(reportlabconfig.save_mpl_to_rl_image(fig, "somestate"))
                    fig.close()




            return local_elements



SummariserLibrary.register_summariser(channel_baseclass=MM_InfTauInterpolatedChannel, summariser_class=Summarise_MM_InfTauInterpolatedChannel)
Exemplo n.º 2
0
                "alpha(V) = (A+BV)/(C+exp((V+D)/E))",
                "beta(V) = (A+BV)/(C+exp((V+D)/E))",
            ]
            for eqn in eqns:
                localElements.append(
                    Paragraph(eqn, reportlabconfig.styles['Normal']))

            # Alpha Beta
            ReportLabTools.build_alpha_beta_table(
                elements=localElements,
                reportlabconfig=reportlabconfig,
                title="Alpha",
                params=params[0])
            ReportLabTools.build_alpha_beta_table(
                elements=localElements,
                reportlabconfig=reportlabconfig,
                title="Beta1",
                params=params[1])
            ReportLabTools.build_alpha_beta_table(
                elements=localElements,
                reportlabconfig=reportlabconfig,
                title="Beta2",
                params=params[2])

        return localElements


SummariserLibrary.register_summariser(
    channel_baseclass=StdChlCalciumAlphaBetaBeta,
    summariser_class=Summarise_MM_CalciumAlphaBetaBetaChannel)
Exemplo n.º 3
0
            
                #Equations:
                eqns = [
                        "alpha(V) = (A+BV)/(C+exp( (V+D)/E) )",
                        "beta(V) = (A+BV)/(C+exp( (V+D)/E) )",
                        ]
                for eqn in eqns:
                    localElements.append( Paragraph(eqn,reportlabconfig.styles['Normal']) )  
                # Alpha Beta
                ReportLabTools.buildAlphaBetaTable( elements=localElements, 
                                         reportlabconfig=reportlabconfig, 
                                         title="Alpha", params=params[0] )   
                ReportLabTools.buildAlphaBetaTable( elements=localElements, 
                                         reportlabconfig=reportlabconfig, 
                                         title="Beta1", params=params[1] )
                
                
                if make_graphs:
                    # Figures:
                    fig = cls.PlotStateCurveSummary(alphaBetaChl, state, figsize=(5,5))
                    localElements.append( reportlabconfig.saveMPLToRLImage(fig, "somestate") )
                    import pylab
                    pylab.close( fig.fig )

            
            return localElements



SummariserLibrary.registerSummariser(channelBaseClass=MM_AlphaBetaChannel, summariserClass=Summarise_MM_AlphaBetaChannel)
Exemplo n.º 4
0


from morphforge.simulationanalysis.summaries.summariser_library import SummariserLibrary
from morphforgecontrib.simulation.membranemechanisms.hh_style.core.mmleak import MM_LeakChannel


class Summarise_MM_LeakChannel(object):
    
    @classmethod
    def toReportLab(cls, leakChannel, reportlabconfig, make_graphs):
        from reportlab.platypus import Paragraph, Table
        chl = leakChannel
    
        localElements = []
        localElements.append( Paragraph("Overview",reportlabconfig.styles['Heading3']) )
        
        # Summary:
        overviewTableData = [
                             ["Conductance", chl.conductance],
                             ["Reversal Potential",  chl.reversalpotential],
                            ]
        
        localElements.append( Table(overviewTableData, style=reportlabconfig.listTableStyle) )
        
        return localElements
    
    
    
SummariserLibrary.registerSummariser(channelBaseClass=MM_LeakChannel, summariserClass=Summarise_MM_LeakChannel)
                if make_graphs:
                    fig = cls.plot_state_curve_summary(chl, state, figsize=(5, 5))
                    localElements.append(reportlabconfig.save_mpl_to_rl_image(fig, "somestate"))
                    fig.close()

                #Equations:
                eqns = [
                        "beta2Threshold = %s" % calciumAlphaBetaBetaChannel.beta2threshold,
                        "beta = beta1 if V less than beta2Threshold otherwise beta2",
                        "alpha(V) = (A+BV)/(C+exp((V+D)/E))",
                        "beta(V) = (A+BV)/(C+exp((V+D)/E))",
                       ]
                for eqn in eqns:
                    localElements.append(Paragraph(eqn, reportlabconfig.styles['Normal']))

                # Alpha Beta
                ReportLabTools.build_alpha_beta_table(elements=localElements,
                                         reportlabconfig=reportlabconfig,
                                         title="Alpha", params=params[0])
                ReportLabTools.build_alpha_beta_table(elements=localElements,
                                         reportlabconfig=reportlabconfig,
                                         title="Beta1", params=params[1])
                ReportLabTools.build_alpha_beta_table(elements=localElements,
                                         reportlabconfig=reportlabconfig,
                                         title="Beta2", params=params[2])

            return localElements


SummariserLibrary.register_summariser(channel_baseclass=StdChlCalciumAlphaBetaBeta, summariser_class=Summarise_MM_CalciumAlphaBetaBetaChannel)