default_paths.pl
changeset 47 2ccb81b7cea5
parent 45 6d49c7420a6c
equal deleted inserted replaced
46:cc6c4309828a 47:2ccb81b7cea5
     1 #======================================================================
     1 #======================================================================
     2 #                    D E F A U L T _ P A T H S . P L 
     2 #                    D E F A U L T _ P A T H S . P L 
     3 #                    doc: Tue Mar 29 07:09:52 2016
     3 #                    doc: Tue Mar 29 07:09:52 2016
     4 #                    dlm: Wed May 18 20:23:32 2016
     4 #                    dlm: Wed Jun  1 19:20:45 2016
     5 #                    (c) 2016 A.M. Thurnherr
     5 #                    (c) 2016 A.M. Thurnherr
     6 #                    uE-Info: 13 44 NIL 0 0 72 0 2 4 NIL ofnI
     6 #                    uE-Info: 16 57 NIL 0 0 72 0 2 4 NIL ofnI
     7 #======================================================================
     7 #======================================================================
     8 
     8 
     9 # HISTORY:
     9 # HISTORY:
    10 #	Mar 29, 2016: - split from [defaults.pl]
    10 #	Mar 29, 2016: - split from [defaults.pl]
    11 #	May 18, 2016: - added new attitude and acceleration residuals plots
    11 #	May 18, 2016: - added new attitude and acceleration residuals plots
    12 #				  - renamed mean_residual to bin_residuals plots
    12 #				  - renamed mean_residual to bin_residuals plots
    13 #				  - added new residual_profs plot
    13 #				  - added new residual_profs plot
       
    14 #	Jun  1, 2016: - added residuals12 plots
       
    15 #				  - added support for $plotting_level
       
    16 #				  - exported stuff to [default_output.pl]
    14 
    17 
    15 #======================================================================
    18 #======================================================================
    16 # ProcessingParams file selection
    19 # ProcessingParams file selection
    17 #======================================================================
    20 #======================================================================
    18 
    21 
    44 		warning(0,"Creating data sub-directory ./$data_dir\n");
    47 		warning(0,"Creating data sub-directory ./$data_dir\n");
    45 		mkdir($data_dir);
    48 		mkdir($data_dir);
    46 	}
    49 	}
    47 	error("$data_dir: no such directory\n") unless (-d $data_dir);
    50 	error("$data_dir: no such directory\n") unless (-d $data_dir);
    48 }
    51 }
    49 unless (-d $plot_dir) { 										    
       
    50 	unless ($plot_dir =~ m{/}) {
       
    51 		warning(0,"Creating plot sub-directory ./$plot_dir\n");
       
    52 		mkdir($plot_dir);
       
    53 	}
       
    54 	error("$plot_dir: no such directory\n") unless (-d $plot_dir);
       
    55 }
       
    56 unless (-d $log_dir) {
    52 unless (-d $log_dir) {
    57 	unless ($log_dir =~ m{/}) {
    53 	unless ($log_dir =~ m{/}) {
    58 		warning(0,"Creating log-file sub-directory ./$log_dir\n");
    54 		warning(0,"Creating log-file sub-directory ./$log_dir\n");
    59 		mkdir($log_dir);
    55 		mkdir($log_dir);
    60 	}
    56 	}
    61 	error("$log_dir: no such directory\n") unless (-d $log_dir);
    57 	error("$log_dir: no such directory\n") unless (-d $log_dir);
    62 }
    58 }
    63            
    59 if ($plotting_level > 0) {
       
    60 	unless (-d $plot_dir) { 										    
       
    61 		unless ($plot_dir =~ m{/}) {
       
    62 			warning(0,"Creating plot sub-directory ./$plot_dir\n");
       
    63 			mkdir($plot_dir);
       
    64 		}
       
    65 		error("$plot_dir: no such directory\n") unless (-d $plot_dir);
       
    66 	}
       
    67 }
    64 
    68 
    65 #----------------------------------------------------------------------
    69 #----------------------------------------------------------------------
    66 # Processing log (diagnostic messages) output
       
    67 #----------------------------------------------------------------------
       
    68 
       
    69 $out_log = "$log_dir/$out_basename.log";
       
    70 
       
    71 
       
    72 #----------------------------------------------------------------------
       
    73 # Vertical-velocity profile output and plots:
       
    74 #
       
    75 # Data:
       
    76 #	*.wprof				vertical velocity profiles
       
    77 #
       
    78 # Plots:
       
    79 # 	*_wprof.ps			vertical velocity profiles (main output plot)
       
    80 #----------------------------------------------------------------------
       
    81 
       
    82 @out_profile = ("plot_wprof($plot_dir/${out_basename}_wprof.ps)",
       
    83 			    "$data_dir/$out_basename.wprof");
       
    84 
       
    85 
       
    86 #--------------------------------------------------------------------------------------------------
       
    87 # Vertical-velocity sample data output and plots:
       
    88 #
       
    89 # Data (in $data_dir):
       
    90 #	*.wsamp							w sample data
       
    91 #	residuals/<prof>/<ens>.rprof	OPTIONAL: per-ensemble residuals
       
    92 #						
       
    93 # Plots (in $plot_dir):
       
    94 #	*_wsamp.ps						vertical velocity time-depth plot
       
    95 #	*_residuals.ps					residual vertical velocity time-depth plot
       
    96 #	*_backscatter.ps				volume scattering coefficient time-depth plot
       
    97 #	*_attitude_res.ps				residuals binned wrt. pitch/roll
       
    98 #	*_res_profs.ps					residuals binned in depth
       
    99 #	*_acceleration_res.ps			OPTIONAL: residuals binned wrt. package acceleration derivative
       
   100 #	*_correlation.ps				OPTIONAL: correlation time-depth plot
       
   101 #--------------------------------------------------------------------------------------------------
       
   102 
       
   103 push(@out_wsamp,"$data_dir/$out_basename.wsamp");
       
   104 #push(@out_wsamp,sprintf('dump_residual_profiles(%s/residuals/%03d)',$data_dir,$PROF));
       
   105 
       
   106 push(@out_wsamp,"plot_residuals($plot_dir/${out_basename}_residuals.ps)");
       
   107 push(@out_wsamp,"plot_backscatter($plot_dir/${out_basename}_backscatter.ps)");
       
   108 push(@out_wsamp,"plot_wsamp($plot_dir/${out_basename}_wsamp.ps)");
       
   109 push(@out_wsamp,"plot_attitude_residuals($plot_dir/${out_basename}_attitude_res.ps)");
       
   110 push(@out_wsamp,"plot_residual_profs($plot_dir/${out_basename}_residual_profs.ps)");
       
   111 #push(@out_wsamp,"plot_acceleration_residuals($plot_dir/${out_basename}_acceleration_res.ps)");
       
   112 #push(@out_wsamp,"plot_correlation($plot_dir/${out_basename}_correlation.ps)");
       
   113 
       
   114 #----------------------------------------------------------------------
       
   115 # Time-series output
       
   116 #
       
   117 #	*.tis			combined CTD/LADCP time-series data, including 
       
   118 #					package- and LADCP reference layer w
       
   119 #----------------------------------------------------------------------
       
   120 
       
   121 @out_timeseries = ("$data_dir/$out_basename.tis");
       
   122 
       
   123 #----------------------------------------------------------------------
       
   124 # Per-bin vertical-velocity residuals (plot only)
       
   125 #----------------------------------------------------------------------
       
   126 
       
   127 @out_BR	= ("plot_mean_residuals($plot_dir/${out_basename}_bin_residuals.ps)");
       
   128 
       
   129 
       
   130 #----------------------------------------------------------------------
       
   131 # Time-lagging correlation statistics (plot only)
       
   132 #----------------------------------------------------------------------
       
   133 
       
   134 @out_TL = ("plot_time_lags($plot_dir/${out_basename}_time_lags.ps)");
       
   135 
    70 
   136 1;	# return true
    71 1;	# return true
   137 
    72