コード例 #1
0
def create_latex_frag(frag_file, graphics_path, report, id, conference):
    if conference: 
        w1 = "2cm"
    else:
        w1 = "5cm"
        
    with Latex.fragment(frag_file, graphics_path=graphics_path) as frag:
        
        with frag.figure(caption=makecmd(frag, id + 'demo'),
                         label=makelabel(id + ':demo')) as fig:
            fig.hfill()
            with fig.subfigure(caption=makecmd(frag, 'mem_signal')) as sub:
                data = report.resolve_url('y/rgb')
                write_graphics(sub, data, w1)
            fig.hfill()
            with fig.subfigure(caption=makecmd(frag, 'mem_signal_dot')) as sub:
                data = report.resolve_url('y_dot/posneg')
                write_graphics(sub, data, w1)
                
            fig.hfill()
            if not conference:
                fig.parbreak()
                fig.hfill()
    
            with fig.subfigure(caption=makecmd(frag, 'mem_signal_dot_pred')) as sub:
                data = report.resolve_url('y_dot_pred/posneg')
                write_graphics(sub, data, w1)
            fig.hfill()
            with fig.subfigure(caption=makecmd(frag, 'mem_signal_detect')) as sub:
                data = report.resolve_url('prod/scale')
                write_graphics(sub, data, w1)
            
            fig.hfill()
コード例 #2
0
def write_figures_for_paper_(frag_file, report, graphics_path, conference):
    if conference:
        w1 = "4cm" 
    else:
        w1 = "5.5cm"
    
    with Latex.fragment(frag_file, graphics_path=graphics_path) as frag:
        with frag.figure(caption=makecmd(frag, 'LaserStatsCaption'),
                         label=makelabel('LaserStats'), double=True) as fig:
            fig.hfill()
            with fig.subfigure(caption=makecmd(frag, 'report_y_mean')) as sub:
                data = report.resolve_url('report_y_mean')
                write_graphics(sub, data, w1, border=False)
            fig.hfill()
            with fig.subfigure(caption=makecmd(frag, 'report_y_var')) as sub:
                data = report.resolve_url('report_y_var')
                write_graphics(sub, data, w1, border=False)
            fig.hfill()
            
            if not conference:
                fig.parbreak()
                fig.hfill()
            
            with fig.subfigure(caption=makecmd(frag, 'report_gy_var')) as sub:
                data = report.resolve_url('report_gy_var')
                write_graphics(sub, data, w1, border=False)
            fig.hfill()
            with fig.subfigure(caption=makecmd(frag, 'report_y_dot_var')) as sub:
                data = report.resolve_url('report_y_dot_var')
                write_graphics(sub, data, w1, border=False)
            fig.hfill() 
            
        with frag.figure(caption=makecmd(frag, 'LaserTensorsCaption'),
                         label=makelabel('LaserTensors'), double=True) as fig:
            fig.hfill()
            with fig.subfigure(caption=makecmd(frag, 'report_Gv')) as sub:
                data = report.resolve_url('report_Gv')
                write_graphics(sub, data, w1, border=False)
            fig.hfill()
            with fig.subfigure(caption=makecmd(frag, 'report_Gomega')) as sub:
                data = report.resolve_url('report_Gomega')
                write_graphics(sub, data, w1, border=False)
            fig.hfill()
            
            if not conference:
                fig.parbreak()
                fig.hfill()
            
            with fig.subfigure(caption=makecmd(frag, 'report_Bv')) as sub:
                data = report.resolve_url('report_Bv')
                write_graphics(sub, data, w1, border=False)
            fig.hfill()
            with fig.subfigure(caption=makecmd(frag, 'report_Bomega')) as sub:
                data = report.resolve_url('report_Bomega')
                write_graphics(sub, data, w1, border=False)
            fig.hfill() 
コード例 #3
0
ファイル: camera_figure.py プロジェクト: AndreaCensi/be1008
def write_variant(frag_file, variant_report, variant, graphics_path, conference):
    if conference:
        w1 = "4cm" 
    else:
        w1 = "5.5cm"
    
    with Latex.fragment(frag_file, graphics_path=graphics_path) as frag:
        with frag.figure(caption=makecmd(frag, variant + 'StatsCaption'),
                         label=makelabel(variant + ':Stats'), double=True) as fig:
            fig.hfill()
            with fig.subfigure(caption=makecmd(frag, 'y_mean')) as sub:
                data = variant_report.resolve_url('y_mean/scale')
                write_graphics(sub, data, w1)
            fig.hfill()
            with fig.subfigure(caption=makecmd(frag, 'y_var')) as sub:
                data = variant_report.resolve_url('y_var/scale')
                write_graphics(sub, data, w1)
            fig.hfill()
            
            if not conference:
                fig.parbreak()
                fig.hfill()
            
            with fig.subfigure(caption=makecmd(frag, 'y_dot_var')) as sub:
                data = variant_report.resolve_url('y_dot_var/scale')
                write_graphics(sub, data, w1)
            fig.hfill()
            with fig.subfigure(caption=makecmd(frag, 'gx_var')) as sub:
                data = variant_report.resolve_url('gx_var/scale')
                write_graphics(sub, data, w1)
            fig.hfill()
#            with fig.subfigure(caption=makecmd(frag, 'gy_var')) as sub:
#                data = variant_report.resolve_url('gy_var/scale')
#                write_graphics(sub, data, w1)
#            fig.hfill()
#            
        if not conference:
            with frag.figure(caption=makecmd(frag, variant + 'GCaption'),
                             label=makelabel(variant + ':G'), double=True) as fig:
                fig.hfill()
                with fig.subfigure(caption=makecmd(frag, 'Gxl')) as sub:
                    data = variant_report.resolve_url('Gxl/posneg')
                    write_graphics(sub, data, w1)
                fig.hfill()
                with fig.subfigure(caption=makecmd(frag, 'Gyl')) as sub:
                    data = variant_report.resolve_url('Gyl/posneg')
                    write_graphics(sub, data, w1)
                fig.hfill()
    
                if not conference:
                    fig.parbreak()
                    fig.hfill()
    
                with fig.subfigure(caption=makecmd(frag, 'Gxa')) as sub:
                    data = variant_report.resolve_url('Gxa/posneg')
                    write_graphics(sub, data, w1)
                fig.hfill()
                with fig.subfigure(caption=makecmd(frag, 'Gya')) as sub:
                    data = variant_report.resolve_url('Gya/posneg')
                    write_graphics(sub, data, w1)
                fig.hfill()
        
        with frag.figure(caption=makecmd(frag, variant + 'GnormCaption'),
                         label=makelabel(variant + ':Gnorm'), double=True) as fig:
            fig.hfill()
            with fig.subfigure(caption=makecmd(frag, 'Gxl_norm')) as sub:
                data = variant_report.resolve_url('Gxl_norm/posneg')
                write_graphics(sub, data, w1)
            fig.hfill()
            with fig.subfigure(caption=makecmd(frag, 'Gyl_norm')) as sub:
                data = variant_report.resolve_url('Gyl_norm/posneg')
                write_graphics(sub, data, w1)
            fig.hfill()
            
            if not conference:
                fig.parbreak()
                fig.hfill()

            with fig.subfigure(caption=makecmd(frag, 'Gxa_norm')) as sub:
                data = variant_report.resolve_url('Gxa_norm/posneg')
                write_graphics(sub, data, w1)
            fig.hfill()
            with fig.subfigure(caption=makecmd(frag, 'Gya_norm')) as sub:
                data = variant_report.resolve_url('Gya_norm/posneg')
                write_graphics(sub, data, w1)
            fig.hfill() 

        print "ciaop"