예제 #1
0
def build_mredoc_ouput(trace_comp_res,unexpected_params, config, figures, validators, table_results, missing_parameter_sets, expected_variables, impl_param_filename_dict):
    print ' -- Producing mredoc output'
    import mredoc as mrd


    def build_comp_section(param):
        fig = figures[param]
        trcs = sorted( trace_comp_res[param] )
        comp_tbl_header, comp_tbl_data= zip( *[ ('%s.max_ptp' %c, trace_comp_res[param][c].max_ptp) for c in trcs])
        return mrd.Section('Parameters: %s' % str(param),
            mrd.VerticalColTable(comp_tbl_header, [comp_tbl_data] ),
            mrd.Figure( mrd.Image(fig, auto_adjust=False), caption='Comparison'),
            )

    comparison_graphs = mrd.Section('Trace Comparisons', [build_comp_section(p) for p in figures.keys() ] )

    tbl_comp_sections = []
    for impl in  impl_param_filename_dict:
        s = build_mredoc_results_table(impl=impl, validators=validators, table_results=table_results, missing_parameter_sets=missing_parameter_sets, expected_variables=expected_variables)
        tbl_comp_sections.append(s)

    results_section = mrd.SectionNewPage('%s - %s' % ( config['scenario_short'].capitalize(), config['title'],),
        mrd.Section('Overview',
            mrd.Section('Description', mrd.VerbatimBlock(config['description'], caption='Description' ) ),
            mrd.Section('Implementations', mrd.Paragraph('Tesing against: %s' % ', '.join(impl_param_filename_dict) ) ),
            mrd.Section('Failures', mrd.Paragraph('TODO!')),
            mrd.Section('Unexpected Files', mrd.Paragraph('Files:' + ','.join([str(u[1]) for u in unexpected_params]) )),
            ),
        mrd.Section('Table Comparisons',*tbl_comp_sections ),
        comparison_graphs,
    )

    return results_section
예제 #2
0
 def build_simulation_details(self):
     return mrd.SectionNewPage(
         "Details",
         self.build_singlecell_details(),
         self.build_population_details(),
         self.build_details_channels(),
     )
예제 #3
0
 def summarise_all(cls):
     return mrd.SectionNewPage(
         'Morphforge Configuration',
         cls.summarise_channels(),
         cls.summarise_currentclamps(),
         cls.summarise_voltageclamps(),
         cls.summarise_presynapticmechs(),
         cls.summarise_postsynapticmechs(),
         cls.summarise_tracemethods(),
     )
예제 #4
0
    def build_neuron_details(self, neuron):

        return mrd.SectionNewPage(
            'Neuron:%s' % neuron.name,
            self._create_neuron_details_1_morphology(neuron),
            self._create_neuron_details_2b_pta(neuron),
            self._create_neuron_details_2_mta(neuron),
            self._create_neuron_details_3a_presynapses(neuron),
            self._create_neuron_details_3b_postsynapses(neuron),
            self._create_neuron_details_3c_gapjunctions(neuron),
            self._create_neuron_details_4_stimulation(neuron),
        )
예제 #5
0
 def build_details_channels(self):
     mechs = sorted(self.sim.get_all_channels(), key=lambda i: i.name)
     return mrd.SectionNewPage(
         'Channels', *[self._build_details_channel(chl) for chl in mechs])
예제 #6
0
 def build_simulation_overview(self):
     return mrd.SectionNewPage('Overview', self.build_population_overview(),
                               self.build_population_complete_dot(),
                               self.build_singlecell_overview())