changeset 21:6349699fc9fa draft

Uploaded
author greg
date Thu, 08 Mar 2018 08:11:43 -0500
parents 214217142600
children 58255c06d24b
files insect_phenology_model.R
diffstat 1 files changed, 0 insertions(+), 34 deletions(-) [+]
line wrap: on
line diff
--- a/insect_phenology_model.R	Thu Mar 08 08:06:18 2018 -0500
+++ b/insect_phenology_model.R	Thu Mar 08 08:11:43 2018 -0500
@@ -255,7 +255,6 @@
 render_chart = function(date_labels, chart_type, plot_std_error, insect, location, latitude, start_date, end_date, days, maxval,
     replications, life_stage, group, group_std_error, group2=NULL, group2_std_error=NULL, group3=NULL, group3_std_error=NULL,
     life_stages_adult=NULL, life_stages_nymph=NULL) {
-    cat("In render_chart, chart_type: ", chart_type, "\n");
     if (chart_type=="pop_size_by_life_stage") {
         if (life_stage=="Total") {
             title = paste(insect, ": Reps", replications, ":", life_stage, "Pop :", location, ": Lat", latitude, ":", start_date, "-", end_date, sep=" ");
@@ -315,10 +314,6 @@
             title_str = paste(":", life_stages_adult, "Adult Pop by Gen", ":", sep=" ");
         }
         title = paste(insect, ": Reps", replications, title_str, location, ": Lat", latitude, ":", start_date, "-", end_date, sep=" ");
-        cat("In render_chart, title: ", title, "\n");
-        cat("In render_chart, group: ", group, "\n");
-        cat("In render_chart, group2: ", group2, "\n");
-        cat("In render_chart, group3: ", group3, "\n");
         legend_text = c("P", "F1", "F2");
         columns = c(1, 2, 4);
         plot(days, group, main=title, type="l", ylim=c(0, maxval), axes=F, lwd=2, xlab="", ylab="", cex=3, cex.lab=3, cex.axis=3, cex.main=3);
@@ -413,26 +408,11 @@
         }
     }
 }
-cat("process_eggs: ", process_eggs, "\n");
-cat("process_nymphs: ", process_nymphs, "\n");
-cat("process_young_nymphs: ", process_young_nymphs, "\n");
-cat("process_old_nymphs: ", process_old_nymphs, "\n");
-cat("process_total_nymphs: ", process_total_nymphs, "\n");
-cat("process_adults: ", process_adults, "\n");
-cat("process_previtellogenic_adults: ", process_previtellogenic_adults, "\n");
-cat("process_vitellogenic_adults: ", process_vitellogenic_adults, "\n");
-cat("process_diapausing_adults: ", process_diapausing_adults, "\n");
-cat("process_total_adults: ", process_total_adults, "\n");
-cat("life_stages: ", life_stages, "\n");
-cat("life_stages_nymph: ", life_stages_nymph, "\n");
-cat("life_stages_adult: ", life_stages_adult, "\n");
 
 # Initialize matrices.
 if (process_eggs) {
     Eggs.replications = matrix(rep(0, opt$num_days*opt$replications), ncol=opt$replications);
 }
-cat("process_young_nymphs==TRUE: ", process_young_nymphs==TRUE, "\n");
-cat("process_total_nymphs==TRUE: ", process_total_nymphs==TRUE, "\n");
 if (process_young_nymphs==TRUE | process_total_nymphs==TRUE) {
     YoungNymphs.replications = matrix(rep(0, opt$num_days*opt$replications), ncol=opt$replications);
 }
@@ -1076,11 +1056,8 @@
 start_date = temperature_data_frame$DATE[1];
 end_date = temperature_data_frame$DATE[opt$num_days];
 
-cat("life_stages: ", toString(life_stages), "\n");
-cat("plot_generations_separately: ", plot_generations_separately, "\n");
 if (plot_generations_separately) {
     for (life_stage in life_stages) {
-        cat("life_stage: ", life_stage, "\n");
         if (life_stage == "Egg") {
             # Start PDF device driver.
             dev.new(width=20, height=30);
@@ -1089,15 +1066,6 @@
             par(mar=c(5, 6, 4, 4), mfrow=c(3, 1));
             # Egg population size by generation.
             maxval = max(P_eggs+F1_eggs+F2_eggs) + 100;
-            cat("maxval: ", maxval, "\n");
-            cat("P_eggs: ", toString(P_eggs), "\n");
-            cat("is.vector(P_eggs): ", is.vector(P_eggs), "\n");
-            cat("length(P_eggs): ", length(P_eggs), "\n");
-            cat("P_eggs.std_error: ", toString(P_eggs.std_error), "\n");
-            cat("F1_eggs: ", toString(F1_eggs), "\n");
-            cat("F1_eggs.std_error: ", toString(F1_eggs.std_error), "\n");
-            cat("F2_eggs: ", toString(F2_eggs), "\n");
-            cat("F2_eggs.std_error: ", toString(F2_eggs.std_error), "\n");
             render_chart(date_labels, "pop_size_by_generation", opt$plot_std_error, opt$insect, opt$location, latitude, start_date, end_date, days, maxval,
                 opt$replications, life_stage, group=P_eggs, group_std_error=P_eggs.std_error, group2=F1_eggs, group2_std_error=F1_eggs.std_error, group3=F2_eggs,
                 group3_std_error=F2_eggs.std_error);
@@ -1105,7 +1073,6 @@
             dev.off();
         } else if (life_stage == "Nymph") {
             for (life_stage_nymph in life_stages_nymph) {
-                cat("life_stage_nymph: ", life_stage_nymph, "\n");
                 # Start PDF device driver.
                 dev.new(width=20, height=30);
                 file_path = get_file_path(life_stage, "nymph_pop_by_generation.pdf", life_stage_nymph=life_stage_nymph)
@@ -1139,7 +1106,6 @@
                     group3 = F2_total_nymphs;
                     group3_std_error = F2_total_nymphs.std_error;
                 }
-                cat("XXX group: ", group, "\n");
                 render_chart(date_labels, "pop_size_by_generation", opt$plot_std_error, opt$insect, opt$location, latitude, start_date, end_date, days, maxval,
                     opt$replications, life_stage, group=group, group_std_error=group_std_error, group2=group2, group2_std_error=group2_std_error,
                     group3=group3, group3_std_error=group3_std_error, life_stages_nymph=life_stage_nymph);