Revision f146ff72
Added by Benoit Parmentier over 9 years ago
climate/research/oregon/interpolation/global_run_scalingup_mosaicing_function.R | ||
---|---|---|
513 | 513 |
} |
514 | 514 |
|
515 | 515 |
plot_mosaic <- function(i,list_param){ |
516 |
#Plot for mosaic list assess via slope as well
|
|
516 |
#Plot for mosaic test
|
|
517 | 517 |
#Inputs: |
518 |
# |
|
518 |
#method_str: method used in mosaicing |
|
519 |
#lf_mosaic: list of raster files from mosaicing |
|
520 |
#out_suffix: output suffix |
|
519 | 521 |
|
520 | 522 |
method_str <- list_param$method[i] |
521 | 523 |
f_mosaic <- list_param$lf_mosaic[i] |
... | ... | |
562 | 564 |
return(l_out_files) |
563 | 565 |
} |
564 | 566 |
|
567 |
plot_diff_raster <- function(i,list_param){ |
|
568 |
#Plot for mosaic differences |
|
569 |
#Inputs: |
|
570 |
#lf1: list of raster files used as reference |
|
571 |
#lf2: list of raster files used as second image |
|
572 |
#out_suffix: output suffix |
|
573 |
|
|
574 |
### Read in parameters |
|
575 |
#method_str <- list_param$method[i] |
|
576 |
f_r1 <- list_param$lf1[i] #e.g. unweighted |
|
577 |
f_r2<- list_param$lf2[i] #e.g. weighted |
|
578 |
out_suffix_str <- list_param$out_suffix[i] |
|
579 |
|
|
580 |
### BEGIN #### |
|
581 |
|
|
582 |
r1 <- raster(f_r1) |
|
583 |
r2 <- raster(f_r2) |
|
584 |
|
|
585 |
r_diff_raster <- r1 - r2 |
|
586 |
|
|
587 |
res_pix <- 1200 |
|
588 |
col_mfrow <- 1 |
|
589 |
row_mfrow <- 0.8 |
|
590 |
|
|
591 |
out_file <- paste("Figure2_diff_raster","_",out_suffix_str,".png",sep="") |
|
592 |
png(filename = out_file, |
|
593 |
width=col_mfrow*res_pix,height=row_mfrow*res_pix) |
|
594 |
|
|
595 |
plot(r_diff_raster,main=out_suffix_str) |
|
596 |
|
|
597 |
dev.off() |
|
598 |
|
|
599 |
return(out_file) |
|
600 |
} |
|
601 |
|
|
565 | 602 |
##################### END OF SCRIPT ###################### |
566 | 603 |
|
Also available in: Unified diff
adding plot of difference from mosaicing to mosaic function comparison script