Changeset 3915 for BOL/Multi_atlas/atlas


Ignore:
Timestamp:
May 26, 2021, 4:56:17 PM (3 years ago)
Author:
musat
Message:

Corrections pour la realisation et l'acceleration des cartes des multi-atlas
IM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BOL/Multi_atlas/atlas/atlas_none.py

    r3885 r3915  
    3636parser.add_option("-f", "--force", help="force le recalcul de champs existants",
    3737                  action="store_true",default=None)
     38parser.add_option("--dirpng",help="Path of the simulation directory", action="store",default=None)
    3839parser.add_option("-o", "--pdf", help="nom du pdf de sortie (default: atlas_<SIMU>_<SAISON>.pdf)", action="store")
    3940(opts, args) = parser.parse_args()
     
    131132                  mpCenterLonF=0,
    132133                  **pparams)
     134###11052021 begin
     135#    # Single figures
     136    page=cpage([[simu_fig]],orientation='landscape', page_trim=True, fig_trim=True)
     137    pdf_page=cpage([[simu_fig]],orientation='landscape',
     138        page_trim=True, fig_trim=True, format='pdf', title=variable+" "+opts.simulation)
     139#pdfargs.append(cfile(pdf_page,target='/home/fabric/users/musat/myatlas/simu_fig.pdf'))
     140    #pdffile="atlas_"+opts.simulation+"_"+opts.season+".pdf"
     141    #pdfargs.append(cfile(pdf_page,target=opts.simumapp))
     142    pdfargs.append(cfile(pdf_page,target=opts.dirpng+"/"+opts.season+"/"+opts.simulation+"/MAP/"+variable+".pdf"))
     143#
     144###11052021 end
    133145    simu_avg=cvalue(space_average(simu))
    134146    #
     
    141153                 mpCenterLonF=0,
    142154                 **pparams)
     155###11052021 begin
     156    #    # Single figures ref_fig
     157    page=cpage([[ref_fig]],orientation='landscape', page_trim=True, fig_trim=True)
     158    pdf_page=cpage([[ref_fig]],orientation='landscape',
     159        page_trim=True, fig_trim=True, format='pdf', title=variable+" "+opts.simulation)
     160    pdfargs.append(cfile(pdf_page,target=opts.dirpng+"/"+opts.season+"/"+opts.reference+"/MAP/"+variable+".pdf"))
     161###11052021 end
    143162    ref_avg=cvalue(space_average(reff))
    144163    #
     
    174193                  gsnStringFontHeightF=stringFontHeight,
    175194                  aux_options='cnLineThicknessF=2|cnLineLabelsOn=True', **p)
     195    #    # Single figures diff_fig
     196        page=cpage([[diff_fig]],orientation='landscape', page_trim=True, fig_trim=True)
     197        pdf_page=cpage([[diff_fig]],orientation='landscape',
     198                page_trim=True, fig_trim=True, format='pdf', title=variable+" "+opts.simulation)
     199        pdfargs.append(cfile(pdf_page,target=opts.dirpng+"/"+opts.season+"/"+opts.simulation+"/DMAP_"+opts.reference+"/"+variable+".pdf"))
    176200    else:
    177201        p.update({'contours':1})
     
    229253                                 'gsnRightString='+opts.season+'|'+\
    230254                                 'gsnStringFontHeightF='+str(stringFontHeight))
     255    #    # Single figures
     256        page=cpage([[simu_fig]],orientation='landscape', page_trim=True, fig_trim=True)
     257        pdf_page=cpage([[simu_fig]],orientation='landscape',
     258                page_trim=True, fig_trim=True, format='pdf', title=variable+" "+opts.simulation)
     259        pdfargs.append(cfile(pdf_page,target=opts.dirpng+"/"+opts.season+"/"+opts.simulation+"/MAP/"+variable+".pdf"))
     260    #    # Single figures ref_fig
     261        page=cpage([[ref_fig]],orientation='landscape', page_trim=True, fig_trim=True)
     262        pdf_page=cpage([[ref_fig]],orientation='landscape',
     263                page_trim=True, fig_trim=True, format='pdf', title=variable+" "+opts.simulation)
     264        pdfargs.append(cfile(pdf_page,target=opts.dirpng+"/"+opts.season+"/"+opts.reference+"/MAP/"+variable+".pdf"))
     265    #    # Single figures diff_fig
     266        page=cpage([[diff_fig]],orientation='landscape', page_trim=True, fig_trim=True)
     267        pdf_page=cpage([[diff_fig]],orientation='landscape',
     268                page_trim=True, fig_trim=True, format='pdf', title=variable+" "+opts.simulation)
     269        pdfargs.append(cfile(pdf_page,target=opts.dirpng+"/"+opts.season+"/"+opts.simulation+"/DMAP_"+opts.reference+"/"+variable+".pdf"))
     270# Creation du Pdf multi-pages
     271        comm=subprocess.Popen(pdfargs, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
    231272    #    # Composite figure
    232273    if is3d(variable):
     
    238279        pdf_page=cpage([[simu_fig,ref_fig],[diff_fig,zmean_fig]],orientation='landscape',
    239280                   page_trim=True, fig_trim=True, format='pdf', title=variable+" "+opts.simulation)
    240     pdfargs.append(cfile(pdf_page))
    241281    #
    242282    thumbnail_size = 200
Note: See TracChangeset for help on using the changeset viewer.