// // PURPOSE: Trigger the first two on minimum fluorescence threshold and outlier // rejection only. Trigger the rest using the peak detection algorithm. // // AUTHORS: 1) Yanwu and Rob; 2 October 2009 // // Omitting a threshold shuts it off. // // For outlier rejection, there must be ngood samples (that pass the // threshold tests) out of the last nsamples to trigger a gulp. // option_FireAll = 0; // 0 = No; 1 = Yes. option_PTL_INL = 0; // 0 = Phytoplankton Thin Layer (PTL); 1 = Intermediate Nepheloid Layer (INL) option_RHOD = 0; // 0 = Not using rhodamine signal; 1 = Alternately capturing chlorophyll peaks (and controls) and rhodamine peaks (and controls); 2 = Only capturing rhodamine peaks (and controls). gulps_ChlOrRhod = 1; //If alternately capturing chl and rhodamine, number of gulps for each signal (this parameter is only relevant for option_RHOD == 1). option_Front_TempOrFl = 0; // 0 = temperature front; 1 = fluorescence front. option_into_upwelling = 0; // 0 = out-of-upwelling; 1 = into-upwelling //option_into_upwelling = 1; // 0 = out-of-upwelling; 1 = into-upwelling option_BaselineWindow_RunningOrSliding = 1; // Window type for calculating the signal baseline = %d (0 = from time zero to now; 1 = over a number of yo-yo profiles) num_profiles_BaselineWindow = 5; //num_profiles_BaselineWindow = 10; // Number of yo-yo profiles to average for giving the signal background = %d (No more than 20. Used only when window type for calculating the signal baseline = 1) option_ClosenessOfTwoCrossings = 0; // Whether requiring closeness of the 1st and 2nd crossings. 0 = No; 1 = Yes. option_PeaksAtSurface = 1; // Whether peaks are likely to be at sea surface. 0 = No; 1 = Yes. ratio_pktrigs_ctrltrigs = 20; // One control-triggering after every Nth peak-triggering. If N>=20, it means no control sample. len_window_full = 8; //timewindow_peakbaseline = 3600.0; // Seconds timewindow_peakbaseline = 600.0; // Seconds alpha_fl = 1.2; //alpha_fl = 1.5; alpha_bb = 1.2; alpha_rhod = 1.2; beta_fl = 0.6; beta_bb = 0.6; beta_rhod = 0.6; delta_dep = 1.0; // Meters delta_fl_bb_rise = 1.0e-4; // Raw fl676, or bb470, or bb676 measurement delta_fl_bb_drop = 1.0e-5; // Raw fl676, or bb470, or bb676 measurement //Need to update. delta_rhod_rise = 1.0e-3; // Raw rhodamine measurement delta_rhod_drop = 1.0e-4; // Raw rhodamine measurement dep_shallow_upwelling = 5.0; // In meters. Shallow depth bound for calculating temp homogeneity in water column. dep_midshallow_upwelling = 10.0; // In meters. Mid-shallow depth for calculating temp homogeneity in water column. dep_middeep_upwelling = 15.0; // In meters. Mid-deep depth for calculating temp homogeneity in water column. dep_deep_upwelling = 20.0; // In meters. Deep depth bound for calculating temp homogeneity in water column. //thresh_TempDiffInUpwelling = 0.2; // Deg. C. Threshold of the vertical temperature homegeneity index for detecting an upwelling water column. //thresh_TempDiffInUpwelling = 0.25; // Deg. C. Threshold of the vertical temperature homegeneity index for detecting an upwelling water column. thresh_TempDiffInUpwelling = 0.3; // Deg. C. Threshold of the vertical temperature homegeneity index for detecting an upwelling water column. thresh_NumProfilesInUpwelling = 3; // Minimum number of consecutive profiles for declaring an upwelling water column. //thresh_NumProfilesInUpwelling = 5; // Minimum number of consecutive profiles for declaring an upwelling water column. num_ProfilesAvgTempDiff = 3; // Window length (number of profiles) for low-pass filtering deltaTvert. num_ProfilesGapTempDiff = 5; // Gap (in number of profiles) btn low-pass filtered deltaTvert for front detection. step_TempDiffInTempFront = 0.2; // Deg. C. Step change of temperature difference btn shallow and deep depths for detecting a temperature front thresh_TempDiffInTempFront = 0.3; // Deg. C. //thresh_TempDiffInTempFront = 0.5; // Deg. C. // When option_into_upwelling = 1 (flying into upwelling water): upper limit of temperature difference btn shallow and deep depths for detecting a front. // When option_into_upwelling = 0 (flying out of upwelling water): lower limit. thresh_NumProfilesInTempFront = 3; // Minimum number of consecutive profiles for declaring a temperature front. dep_shallow_fl = 2.0; // In meters. Shallow depth bound in fluorescence front detection num_ProfilesAvgFl = 5; // Number of profiles for averaging fl_max num_ProfilesGapFl = 5; // Gap (in number of profiles) btn present profile and the last profile participating in averaging fl_max step_FlInFlFront = 0.001; // Raw measurement. Step change of fl_max for detecting a fluorescence front. thresh_NumProfilesInFlFront = 3; // Minimum number of consecutive profiles for declaring an fl front. peakDetection0 = 1; upwellingDetection0 = 0; frontDetection0 = 0; mindepth0 = 1.5; // Meters timeLockOutAtStart0 = 2000.0; // Seconds timemaxwait0 = 5000.0; // Seconds peakDetection1 = 1; upwellingDetection1 = 0; frontDetection1 = 0; mindepth1 = 1.5; // Meters GulperNumberFiredBefore1 = 0; timelockoutpeak1 = 2000.0; // Seconds timemaxwait1 = 9000.0; // Seconds peakDetection2 = 1; upwellingDetection2 = 0; frontDetection2 = 0; mindepth2 = 1.5; // Meters GulperNumberFiredBefore2 = 1; timelockoutpeak2 = 2000.0; // Seconds timemaxwait2 = 13000.0; // Seconds peakDetection3 = 1; upwellingDetection3 = 0; frontDetection3 = 0; mindepth3 = 1.5; // Meters timeLockOutAtStart3 = 2000.0; // Seconds timemaxwait3 = 5000.0; // Seconds peakDetection4 = 1; upwellingDetection4 = 0; frontDetection4 = 0; mindepth4 = 1.5; // Meters GulperNumberFiredBefore4 = 3; timelockoutpeak4 = 2000.0; // Seconds timemaxwait4 = 9000.0; // Seconds peakDetection5 = 1; upwellingDetection5 = 0; frontDetection5 = 0; GulperNumberFiredBefore5 = 4; mindepth5 = 1.5; // Meters timelockoutpeak5 = 2000.0; // Seconds timemaxwait5 = 13000.0; // Seconds peakDetection6 = 0; upwellingDetection6 = 0; frontDetection6 = 0; mindepth6 = 1000.0; // Meters peakDetection7 = 0; upwellingDetection7 = 0; frontDetection7 = 0; mindepth7 = 1000.0; // Meters peakDetection8 = 0; upwellingDetection8 = 0; frontDetection8 = 0; mindepth8 = 1000.0; // Meters peakDetection9 = 0; upwellingDetection9 = 0; frontDetection9 = 0; mindepth9 = 1000.0; // Meters peakDetection10 = 1; upwellingDetection10 = 0; frontDetection10 = 0; mindepth10 = 1.5; // Meters timeLockOutAtStart10 = 2000.0; // Seconds timemaxwait10 = 5000.0; // Seconds peakDetection11 = 1; upwellingDetection11 = 0; frontDetection11 = 0; mindepth11 = 1.5; // Meters GulperNumberFiredBefore11 = 10; timelockoutpeak11 = 2000.0; // Seconds timemaxwait11 = 9000.0; // Seconds peakDetection12 = 1; upwellingDetection12 = 0; frontDetection12 = 0; mindepth12 = 1.5; // Meters GulperNumberFiredBefore12 = 11; timelockoutpeak12 = 2000.0; // Seconds timemaxwait12 = 13000.0; // Seconds peakDetection13 = 1; upwellingDetection13 = 0; frontDetection13 = 0; mindepth13 = 1.5; // Meters timeLockOutAtStart13 = 2000.0; // Seconds timemaxwait13 = 5000.0; // Seconds peakDetection14 = 1; upwellingDetection14 = 0; frontDetection14 = 0; mindepth14 = 1.5; // Meters GulperNumberFiredBefore14 = 13; timelockoutpeak14 = 2000.0; // Seconds timemaxwait14 = 9000.0; // Seconds peakDetection15 = 1; upwellingDetection15 = 0; frontDetection15 = 0; mindepth15 = 1.5; // Meters GulperNumberFiredBefore15 = 14; timelockoutpeak15 = 2000.0; // Seconds timemaxwait15 = 13000.0; // Seconds peakDetection16 = 0; upwellingDetection16 = 0; frontDetection16 = 0; mindepth16 = 1000.0; // Meters peakDetection17 = 0; upwellingDetection17 = 0; frontDetection17 = 0; mindepth17 = 1000.0; // Meters peakDetection18 = 0; upwellingDetection18 = 0; frontDetection18 = 0; mindepth18 = 1000.0; // Meters peakDetection19 = 0; upwellingDetection19 = 0; frontDetection19 = 0; mindepth19 = 1000.0; // Meters