Project

General

Profile

« Previous | Next » 

Revision 90876e53

Added by Benoit Parmentier about 8 years ago

testing generation of animation using ImageMagick for mosaic

View differences:

climate/research/oregon/interpolation/global_product_assessment_part2.R
303 303
                               FUN=plot_raster_mosaic,
304 304
                               list_param=list_param_plot_raster_mosaic,
305 305
                               mc.preschedule=FALSE,
306
                               mc.cores = num_cores)         
306
                               mc.cores = num_cores)    
307
if(is.null(zlim_val)){
308
  out_suffix_movie <- paste("min_max_",out_suffix,sep="")
309
}else{
310
  zlim_val_str <- paste(zlim_val,sep="_",collapse="_")
311
  out_suffix_movie <- paste(zlim_val_str,"_",out_suffix,sep="")
312
}
313

  
314
#filename_figures_mosaic <- file.path(out_dir,"mosaic_plot_fig.txt")
315
filename_figures_mosaic <- file.path(out_dir,paste("list_mosaic_plot_fig",out_suffix_movie,".txt",sep=""))
316
out_figure_movies <- file.path(out_dir,paste("mosaic_movie_",out_suffix_movie,".gif",sep=""))
317

  
318
write.table(unlist(lf_mosaic_plot_fig),filename_figures_mosaic,row.names = F,col.names = F,quote = F)
319
#now generate movie with imageMagick
307 320

  
321
#-delay 20
322
delay_option <- 60
323
cmd_str <- paste("convert",paste("-delay",delay_option),paste0("@",filename_figures_mosaic),out_figure_movies)
324
#convert @myimages.txt mymovie.gif
308 325

  
326
system(cmd_str)
309 327

  
310 328
#### PLOT ACCURACY METRICS: First test ####
311 329
##this will be cleaned up later:

Also available in: Unified diff