Ignore:
Timestamp:
Dec 2, 2011, 1:52:18 AM (13 years ago)
Author:
aslmd
Message:

GRAPHICS: fixed some stuff that were broken in previous commits: simple static contour plot, dumpbdy, re-encoding (is switched off for now).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UTIL/PYTHON/planetoplot.py

    r445 r447  
    285285       ticks = ndiv + 1
    286286
    287        #### Contour plot -- to be activated with movies
    288        if var2:
    289            what_I_plot_contour, error = reducefield(all_var2[index_f], d4=indextime, d1=indexlon, d2=indexlat , d3=indexvert, yint=yintegral, alt=vert)
    290            call_contour(what_I_plot_contour,error,x,y,m,lon,lat,vert,time,vertmode,all_var2[index_f],indextime,indexlon,indexlat,indexvert,yintegral,mapmode,typefile, var2, ticks)
     287       #### Contour plot. TBD: var2 could be just another instance of all_var
     288       if var2:  what_I_plot_contour, error = reducefield( all_var2[index_f], d4=indextime, d1=indexlon, d2=indexlat , d3=indexvert, \
     289                                                           yint=yintegral, alt=vert )
    291290
    292291       #### Shaded plot
     
    348347                       if invert_y:     lima,limb = mpl.pyplot.ylim() ; mpl.pyplot.ylim(limb,lima)
    349348                       if ylog:         mpl.pyplot.semilogy()
    350                        # Renew contours for movie frames which are not the first one
    351                        if var2:
    352                          call_contour(what_I_plot_contour[imov,:,:],error,x,y,m,lon,lat,vert,time,vertmode,all_var2[index_f],imov,indexlon,indexlat,indexvert,yintegral,mapmode,typefile, var2, ticks)
     349                    # Renew contours for movie frames which are not the first one
     350                    if var2:
     351                         what_I_plot_contour_frame = what_I_plot_contour
     352                         if mrate is not None: what_I_plot_contour_frame = what_I_plot_contour[imov,:,:]
     353                         call_contour( what_I_plot_contour_frame,error,x,y,m,lon,lat,vert,time,vertmode,\
     354                                       all_var2[index_f],imov,indexlon,indexlat,indexvert,yintegral,mapmode,typefile, var2, ticks )
    353355                    if not tile:
    354356                        #zelevels = np.linspace(zevmin*(1. + 1.e-7),zevmax*(1. - 1.e-7)) #,num=20)
     
    365367                        colorbar( fraction=0.05,pad=0.03,format=daformat,\
    366368                                  ticks=np.linspace(zevmin,zevmax,num=min([ticks/2+1,20])),extend='neither',spacing='proportional' )
     369                    ### movie stuff
    367370                    figframe=mpl.pyplot.gcf()
    368371                    if mrate is not None:
     
    377380                        video.run(mframe)
    378381                        mpl.pyplot.close()
     382                    ### movie stuff
    379383                    imov=imov+1
    380384                 if mrate is not None: video.close()
     
    481485            show()
    482486
    483     ##################################
    484     ### Getting more out of this video
    485  
    486     if mrate is not None:
    487         print "Re-encoding movie.. first pass"
    488         video.first_pass(filename=moviename,quality=mquality,rate=mrate)
    489         print "Re-encoding movie.. second pass"
    490         video.second_pass(filename=moviename,quality=mquality,rate=mrate)   
     487    ###################################
     488    #### Getting more out of this video -- PROBLEMS WITH CREATED VIDEOS
     489    #
     490    #if mrate is not None:
     491    #    print "Re-encoding movie.. first pass"
     492    #    video.first_pass(filename=moviename,quality=mquality,rate=mrate)
     493    #    print "Re-encoding movie.. second pass"
     494    #    video.second_pass(filename=moviename,quality=mquality,rate=mrate)   
    491495
    492496    ###############
Note: See TracChangeset for help on using the changeset viewer.