RIDES1_3_1_KWS_t1_fixed


This macro analyzes data from the RIDES1 protocol set.
/**
 * Macro for data evaluation of RIDES1 
 * data on PhotosynQ.org
 * by: David M. Kramer
 * created: 2017-05-09 @ 18:15:27
 */

// Note: the following variables are for fitting the ECS decay curves when the 
// procedure written by Kevin and Greg often fails. Fortunately, Sebastian added 
// a really important new feature that allows for very flexible and useful 
// nonliear curve fitting. 

// Define the output object here
var output = {}; //dictionary to hold results
var number_of_protocol_sets=json.set.length;
output.numprot=json.setnumber_of_protocol_setslength;



// Define the protocol set numbers for each data set
var labels=[];

for (var index=0; index<number_of_protocol_sets; index++){
   labels.push(json.set[index].label);
}

var ECS_LEFdset=labels.indexOf('ecs_lefd');
var P700_DIRK_set=labels.indexOf('p700_dirk_set');
var PAM_set=labels.indexOf('pam_set');  //the json set 8 contains the PAM and P700 traces

var SPAD_set=labels.indexOf('spad_set');
var calib_set=labels.indexOf('spad_set');

//output.ecs=json.set[ECS_LEFdset].data_raw;
//output.P700_DIRK_set=json.set[P700_DIRK_set].data_raw;
//output.PAM_set=json.set[PAM_set].data_raw;

//return output;

// ECS DIRK trace definitions
var beginning_of_ECS=100; //Note the 100 pulses 
var length_of_ECS_subtrace=220; //The length of each subtrace. 
var number_of_ECS_subtraces=6; // number of ECS subtraces. There are currently 6 of them.
var length_of_ECS_baseline=100;  //there are 100 points in the baseline before the DIRK
var length_of_ECS_all_subtraces=beginning_of_ECS+(number_of_ECS_subtraces*length_of_ECS_subtrace);  
var ECS_averaged_trace=json.set[ECS_LEFdset].data_raw.slice(beginning_of_ECS,320);  
var begining_of_subtrace_for_linear_fit=75;
var end_of_subtrace_for_linear_fit=145;

var P700_begining_of_subtrace_for_linear_fit=55;
var P700_end_of_subtrace_for_linear_fit=170;

var beginning_of_LEFD=1421; //Note the 100 pulses 
var length_of_LEFd_subtrace=220; //The length of each subtrace. 
var length_of_LEFd_baseline=100;  //there are 100 points in the baseline before the DIRK
var LEFd_trace=json.set[ECS_LEFdset].data_raw.slice(beginning_of_LEFD,beginning_of_LEFD+length_of_LEFd_subtrace);  

// P700 DIRK trace definitions
var beginning_of_P700_DIRK=100; //Note the 100 pulses 
var length_of_P700_DIRK_subtrace=220; //The length of each subtrace. 
var number_of_P700_DIRK_subtraces=6; // number of ECS subtraces. There are currently 6 of them.
var length_of_P700_DIRK_baseline=100;  //there are 100 points in the baseline before the DIRK
var length_of_P700_DIRK_all_subtraces=beginning_of_P700_DIRK+(number_of_P700_DIRK_subtraces*length_of_P700_DIRK_subtrace);  
var P700_DIRK_averaged_trace=json.set[ECS_LEFdset].data_raw.slice(beginning_of_P700_DIRK,320);  


//reshape the PAM and P700 traces from alterrnating 1,2,1,2... to 1,1,1,1...2,2,2,2...

output.test_data_raw_PAM = json.set[PAM_set].data_raw.length;
var loPAM= json.set[PAM_set].data_raw.length;

var temp1= [];
for (var i=0; i<loPAM; i=i+2){
	temp1.push(json.set[PAM_set].data_raw[i]);
}

for (var i=1; i<loPAM+1; i=i+2){
	temp1.push(json.set[PAM_set].data_raw[i]);
}

json.set[PAM_set].data_raw=temp1; //replace the old values wiht temp1
               
// PAM fluorescence traces
//DEFINE THE STARTING AND ENDING POINTS TO USE FOR THE VARIOUS 
//PARAMETERS USED IN THE CALCULATIONS

var Fs_begin=1; //the first point to use for Fs 
var Fs_end =4; //the end point to use  for Fs

//The Fv/FM' results will be calculated using hte Avenson technique, wherein
//a series of different saturation pulse intensities are used and the 
//true saturation point is inferred by extrapolation to infinite
//intensities.

//The first FM value (Fm_1) is obtained with the highest intensity
var Fm_1_begin =101; //the first point to use for the FIRST Fmp
var Fm_1_end =130; //the end point to use  for the FIRST Fmp
var Fm_2_begin =131; //the first point to use for the FIRST Fmp
var Fm_2_end =145; //the end point to use  for the FIRST Fmp
var Fm_3_begin =146; //the first point to use for the FIRST Fmp
var Fm_3_end =160; //the end point to use  for the FIRST Fmp
var Fm_4_begin =161; //the first point to use for the FIRST Fmp
var Fm_4_end =175; //the end point to use  for the FIRST Fmp
var Fm_5_begin =176; //the first point to use for the FIRST Fmp
var Fm_5_end =190; //the end point to use  for the FIRST Fmp

//START AND STOP FOR F0'
var FoPrime_begin =191; //the first point to use for Fs 
var FoPrime_end =205; //the end point to use  for Fs

//SET THE INVERSE INTENSITIES FOR THE AVENSON INTENSITY RAMP
var inverse_intensity = [1/8000,1/7000,1/6000,1/5000];

output.pump="none";

//PSI saturation pulse parameters:
//Calculation of the DIRK delta_A_ECS 
  //output.data_raw_ECS_DIRK = json.set[ECS_LEFdset].data_raw.slice(0,1420);

var PSI_ss_beg=1; //beginning of the trace for P700 steady-state
var PSI_ss_end=18; //end of the trace for P700 steady-state
var PSI_sat1_beg=25; //beginning of the trace for P700 first saturation pulse
var PSI_sat1_end=170; //end of the trace for P700 first saturation pulse
var PSI_dark_beg=195; //beginning of the trace for P700 steady-state
var PSI_dark_end=200; //end of the trace for P700 steady-state
var PSI_sat2_beg=220; //beginning of the trace for P700 second saturation pulse
var PSI_sat2_end=270; //end of the trace for P700 second saturation pulse


// Start of analyses sections

//ECS trace analysis:

var i, j;
  for (i = 1; i < number_of_ECS_subtraces; i++) {
      var temp=json.set[ECS_LEFdset].data_raw.slice(i*length_of_ECS_subtrace+beginning_of_ECS,
                                         (i+1)*length_of_ECS_subtrace+beginning_of_ECS);
		for (j = 0; j < length_of_ECS_subtrace; j++) {
    		ECS_averaged_trace[j]=ECS_averaged_trace[j]+temp[j];
    }}

//make up a time axis. the assumption is that all the points are equally spaced in time.
   var fake_time_axis = [];
	for (var i = 1; i <= length_of_ECS_subtrace; i++) {
      ii=i.toFixed(4);
   	fake_time_axis.push(i);
  }
  //Find the best fit line to the baseline points.
  	var reg=MathLINREG(fake_time_axis.slice(begining_of_subtrace_for_linear_fit, end_of_subtrace_for_linear_fit),ECS_averaged_trace.slice(begining_of_subtrace_for_linear_fit, end_of_subtrace_for_linear_fit));
  
  //Generate a line based on the baseline linear regression over the range of values for the full trace.   
  var baseline_offset=[];
  for (j = 0; j < length_of_ECS_subtrace; j++) {
    	jj=j.toFixed(4);
		baseline_offset.push(jj*MathROUND(reg.m, 3) + MathROUND(reg.b));
  }
  
  //output.baseline_offset=baseline_offset;
   //Calculate the deltaI/I0 and convertto approximate delta_A 
	for (j = 0; j < length_of_ECS_subtrace; j++) {
    var rat= ECS_averaged_trace[j]/baseline_offset[j];
	ECS_averaged_trace[j]=-1*MathLOG(rat); //((rat-1)/-2.3);
    }
ECS_averaged_trace[120]=ECS_averaged_trace[119]; //eliminate the spike artifact at end of trace
output.ECS_averaged_trace=ECS_averaged_trace.slice(80,150);


var begin_trace_index=100;
var end_trace_index=120;
var number_of_points_to_fit=end_trace_index-begin_trace_index;
var expData=ECS_averaged_trace.slice(begin_trace_index,end_trace_index);

// Here I assume that the time difference between points was 

var time_per_point=1.5; //entger the delta time between points (only work with constant delta time) 

// Obtain best fit results for ECS decay using non-linear least squares fitting
var tdata=[];
for (i in expData) {
	tdata.push([i*time_per_point, expData[i]]);
}

var a = 1;
var b = 1;
var c = 1;
try{
	var fit = NonLinearRegression(tdata,{
	   equation: 'b + a * e(- x / c)',
	   initial: [ a, b, c ]
	});

	a= fit.parameters[0].value;
	b= fit.parameters[1].value;
	c = fit.parameters[2].value;

	var outdata=[];
	for (i in expData) {
		outdata.push(b + a*Math.exp(-1*i/c));
	}

	output.fitinput=expData;
	output.outdata=outdata;

	// Available for all parameters
	//output.p1_name = fit.parameters[0].name;
	output.ECSt_mAU = MathROUND(fit.parameters[0].value, 5);
	//output.offset = fit.parameters[1].value;
	output.tECS = MathROUND(0.001*fit.parameters[2].value, 4);
	output.gHplus = MathROUND(1000/fit.parameters[2].value, 3);
	var vHplus = output.ECSt_mAU *  output.gHplus;
	output.vHplus = MathROUND(vHplus, 3);

}
catch(e){}


//***********other possible parameters 
//output.p1_sd = fit.parameters[0].sd_error;
//output.p1_p = fit.parameters[0].p;
//output.iterations = fit.iterations;
// Some more info as text
//output.ParameterEstimates = fit.ParameterEstimates;
//output.CovarianceMatrix = fit.CovarianceMatrix;
//output.expFitArray=expFitArray;
//expReg = MathEXPINVREG(expFitArray);
//var ECS_lifetime_ms=expReg.lifetime; //the fitting procedure returns -99999 if it fails to find converge


//Calculaiton of the DIRK delta_P850 

  //output.data_raw_P700_DIRK = json.set[P700_DIRK_set].data_raw.slice(0,1420);
  //Get sum of all subtraces
  var i, j;
  for (i = 1; i < number_of_P700_DIRK_subtraces; i++) {
      var temp=json.set[P700_DIRK_set].data_raw.slice(i*length_of_P700_DIRK_subtrace+beginning_of_P700_DIRK,
                                         (i+1)*length_of_P700_DIRK_subtrace+beginning_of_P700_DIRK);
      
		for (j = 0; j < length_of_P700_DIRK_subtrace; j++) {
    		P700_DIRK_averaged_trace[j]=P700_DIRK_averaged_trace[j]+temp[j];
    }
  }

  //make up a time axis. the assumption is that all the points are equally spaced in time.
   var fake_time_axis = [];
	for (var i = 1; i <= length_of_P700_DIRK_subtrace; i++) {
      ii=i.toFixed(4);
   	fake_time_axis.push(i);
  }
  //Find the best fit line to the baseline points.
  	var reg=MathLINREG(fake_time_axis,P700_DIRK_averaged_trace);
  
  //Generate a line based on the baseline linear regression over the range of values for the full trace.   
  var baseline_offset=[];
  for (j = 0; j < length_of_P700_DIRK_subtrace; j++) {
    	jj=j.toFixed(4);
		baseline_offset.push(jj*MathROUND(reg.m, 3) + MathROUND(reg.b));
  }
  
  //output.baseline_offset=baseline_offset;
   //Calculate the deltaI/I0 and convertto approximate delta_A 
	for (j = 0; j < length_of_P700_DIRK_subtrace; j++) {
    var rat= P700_DIRK_averaged_trace[j]/baseline_offset[j];
      
	P700_DIRK_averaged_trace[j]=-1*MathLOG(rat); //((rat-1)/-2.3);
      //test=Math.LN10(rat);
    }
  //replace the artifactual data at positon 120 with the prior value
  //the point has no real valye, so this is just to better visualize the results

P700_DIRK_averaged_trace[120]=P700_DIRK_averaged_trace[119]; 
output.P700_DIRK_averaged_trace=P700_DIRK_averaged_trace.slice(P700_begining_of_subtrace_for_linear_fit, P700_end_of_subtrace_for_linear_fit);

var begin_trace_index=100;
var end_trace_index=120;
var number_of_points_to_fit=end_trace_index-begin_trace_index;
var P700expData=P700_DIRK_averaged_trace.slice(begin_trace_index,end_trace_index);

var P700_time_per_point=1.5; //entger the delta time between points (only work with constant delta time) 

// Obtain best fit results for ECS decay using non-linear least squares fitting
var P700tdata=[];
for (i in expData) {
	P700tdata.push([i*time_per_point, P700expData[i]]);
}

var a = 1;
var b = 1;
var c = 1;

try{
	var fit = NonLinearRegression(P700tdata,{
	   equation: 'b + a * e(- x / c)',
	   initial: [ a, b, c ]
	});

	a= fit.parameters[0].value;
	b= fit.parameters[1].value;
	c = fit.parameters[2].value;

	var P700_outdata=[];
	for (i in expData) {
		P700_outdata.push(b + a*Math.exp(-1*i/c));
	}

	output.P700_fitinput=P700_outdata;
	output.P700_outdata=outdata;

	// Available for all parameters
	output.P700_DIRK_ampl = MathROUND(a, 5);

	output.tP700 = MathROUND(0.001*c, 4);
	output.kP700 = MathROUND(1000/c, 4);
	var v_initial_P700 = output.P700_DIRK_ampl *  output.kP700;
	output.v_initial_P700 = MathROUND(v_initial_P700, 7);
}
catch(e){}

// Display the DIRKf results and calculate LEFd

  output.LEFd_trace = LEFd_trace;

  // Display of PAM result and calculation of the fluorescence parameters
//************************************************************************************************
  //Calculate the PAM fluorescence paramters
  
  output.data_raw_PAM = json.set[PAM_set].data_raw.slice(0,310);
  data=json.set[PAM_set].data_raw.slice(0,310);
  
// Set our Apparent FmPrime, 3 FmPrime steps, and Fs to calculate both traditional fv/fm and new Multi-phase flash fv/fm
//----------------------------

//get the values for representative Fs 
var baseline=0; //for the time being, do not use baseline

//GET THE VALUES FOR Fs
var Fs = MathMEAN(data.slice(Fs_begin,Fs_end)) - baseline; // take only the first 4 values in the Fs range, excluding the very first
var Fs_std = MathSTDEV(data.slice(Fs_begin,Fs_end)); // create standard deviation for this value for error checking
//output.Fs=Fs;

//GET THE VALUES FOR THE 5 Fm' ILLUMINATION CONDITIONS

var sat_vals = data.slice(Fm_1_begin,Fm_1_end).sort();  // sort the saturating light values from low to high
var AFmP = MathMEAN(sat_vals.slice(2,20)) - baseline; // take the 18 largest values and average them
var AFmP_std = MathSTDEV(sat_vals); // create standard deviation for this value for error checking
//output.AFmP=AFmP;
  
sat_vals = data.slice(Fm_5_begin,Fm_5_end).sort();  // sort the saturating light values from low to high
var FmP_end = MathMEAN(sat_vals.slice(2,23)) - baseline; // take the 21 largest values and average them
var FmP_end_std = MathSTDEV(sat_vals); // create standard deviation for this value for error checking
//output.FmP_end=FmP_end;
  
sat_vals = data.slice(Fm_2_begin,Fm_2_end).sort();  // sort the saturating light values from low to high
var FmP_step1 = MathMEAN(sat_vals.slice(2,6)) - baseline; // take the 4 largest values and average them
var FmP_step1_std = MathSTDEV(sat_vals); // create standard deviation for this value for error checking
//output.FmP_step1=FmP_step1;
  
sat_vals = data.slice(Fm_3_begin,Fm_3_end).sort();  // sort the saturating light values from low to high
var FmP_step2 = MathMEAN(sat_vals.slice(2,6)) - baseline; // take the 4 largest values and average them
var FmP_step2_std = MathSTDEV(sat_vals); // create standard deviation for this value for error checking
//output.FmP_step2=FmP_step2;
  
sat_vals = data.slice(Fm_4_begin,Fm_4_end).sort();  // sort the saturating light values from low to high
var FmP_step3 = MathMEAN(sat_vals.slice(2,6)) - baseline; // take the 4 largest values and average them
var FmP_step3_std = MathSTDEV(sat_vals); // create standard deviation for this value for error checking
//output.FmP_ste32=FmP_step3;
  
// Calculations for F0'
// ----------------------------
var FoPrime_values =   data.slice(FoPrime_begin,FoPrime_end).sort();
  
//var FoPrime = MathMEAN(FoPrime_values.slice(5,10)) - baseline;
var FoPrime = MathMIN(FoPrime_values);
var FoPrime_std = MathSTDEV(FoPrime_values); // create standard deviation for this value for error checking

//output.FoPrime_values=FoPrime_values;
  
// Calculations for corrected FmPrime using multi-phase flash
// ----------------------------
var reg = MathLINREG(inverse_intensity, [AFmP,FmP_step1,FmP_step2,FmP_step3]);

// Calculate Phi2 w/ and w/out multi-phase flash
// ----------------------------
var fvfm_noMPF = (AFmP-Fs)/AFmP;
var fvfm_MPF = (reg.b-Fs)/reg.b;


// Calculate NPQt, PhiNPQ, PhiNO, qL w/ and w/out multi-phase flash
// ----------------------------
var npqt_MPF = (4.88 / ((reg.b / FoPrime) -1) )-1;
var npqt_noMPF = (4.88 / ((AFmP / FoPrime) -1) )-1;
var qL_MPF = ((reg.b - Fs)*FoPrime)/((reg.b-FoPrime)*Fs);
var qL_noMPF = ((AFmP - Fs)*FoPrime)/((AFmP-FoPrime)*Fs);
var PhiNO_MPF = 1/(npqt_MPF + 1 + qL_MPF*4.88); //based on equation 52 in Kramer et al., 2004 PRES
var PhiNO_noMPF = 1/(npqt_noMPF + 1 + qL_noMPF*4.88); //based on equation 52 in Kramer et al., 2004 PRES
var PhiNPQ_MPF = 1-fvfm_MPF-PhiNO_MPF; //based on equation 53 in Kramer et al., 2004 PRES 
var PhiNPQ_noMPF = 1-fvfm_noMPF-PhiNO_noMPF; //based on equation 53 in Kramer et al., 2004 PRES 
var qP_MPF = (reg.b - Fs)/(reg.b - FoPrime);
var qP_noMPF = (FmPrime - Fs)/(FmPrime - FoPrime);
var FvP_FmP_MPF = (reg.b-FoPrime)/reg.b;
var FvP_FmP_noMPF = (AFmP-FoPrime)/AFmP;

// Create the variables to be printed (assume to use the MPF values unless there is a good reason not to)
// ----------------------------
var fvfm = fvfm_MPF;
var npqt = npqt_MPF;
var PhiNO = PhiNO_MPF;
var PhiNPQ = PhiNPQ_MPF;
var qL = qL_MPF;
var FmPrime = reg.b;
var qP = qP_MPF;
var FvP_FmP = FvP_FmP_MPF;
/****************OUTPUT VALUES FROM MACRO *******************/

// if any of the flag conditions are true, then create the 'flag' object.  Otherwise, do not create the flag object.
// for now since flag system isn't fully implemented, also create as separate objects so they will be displayed
// ----------------------------

// If multi-phase flash steps are flat or positive slope, then just use the normal Phi2, NPQt, PhiNPQ, PhiNO... etc.
// If Phi2 or NPQt is less than zero, make zero and give user warning.  If Phi2 is higher than .85, give user danger flag.
// ----------------------------




if (reg.m > 0) {
  fvfm = fvfm_noMPF;
  npqt = npqt_noMPF;
  PhiNO = PhiNO_noMPF;
  PhiNPQ = PhiNPQ_noMPF;
  qL = qL_noMPF;
  FmPrime = AFmP;
  qP = qP_noMPF;
  FvP_FmP = FvP_FmP_noMPF;
  
  if (fvfm <= 0) {
    output.Phi2= 0;
  //  	output.flag.warning.push("Phi2 is negative (should be positive).  It has been set to zero, but check raw trace and consider excluding this point.  To see original negative value, see Phi2_noMPF variable");
    output["warning 2"] = "Phi2 is negative (should be positive).  It has been set to zero, but check raw trace and consider excluding this point.  To see original negative value, see Phi2_noMPF variable";
  }
  if (fvfm >=0.85) {
//  	output.flag.danger.push("Phi2 above the normal range (0 - 0.85).  Please check the raw trace and consider excluding this point.");
	output["danger 5"] = "Phi2 above the normal range (0 - 0.85).  Please check the raw trace and consider excluding this point.";
  }
  else {
	  output.Phi2 		= MathROUND(fvfm,3);
  }
  

  
  
  if (npqt <= 0) {
    output.NPQt= 0;
//  	output.flag.warning.push("NPQt is negative (should be positive)!  It has been set to zero, but check raw trace and consider excluding this point.  To see original negative NPQt value, see NPQt_noMPF variable");
	output["warning 1"] = "NPQt is negative (should be positive).  It has been set to zero, but check raw trace and consider excluding this point.  To see original negative value, see NPQt_noMPF variable";
  }
  else {
	  output.NPQt= MathROUND(npqt,3);
  }
	  output.qL= MathROUND(qL,3);
	  output.PhiNPQ= MathROUND(PhiNPQ,3);
	  output.PhiNO= MathROUND(PhiNO,3);
	  output.FvP_over_FmP = MathROUND(FvP_FmP,3);
	  outputqP = MathROUND(qP,3);
}

// Otherwise, use the multi-phase flash calculation for Phi2, NPQt, PhiNPQ, PhiNO... etc.
// If Phi2 or NPQt is less than zero, make zero and give user warning.  If Phi2 is higher than .85, give user danger flag.
// ----------------------------
else {
  if (fvfm <= 0) {
    output.Phi2 = 0;
//  	output.flag.warning.push("Phi2 is negative (should be positive).  It has been set to zero, but check raw trace and consider excluding this point.  To see original negative value, see Phi2_MPF variable");
	output["warning 2"] = "Phi2 is negative (should be positive).  It has been set to zero, but check raw trace and consider excluding this point.  To see original negative value, see Phi2_MPF variable";
  }
  if (fvfm >=0.85) {
//  	output.flag.danger.push("Phi2 above the normal range (0 - 0.85).  Please check the raw trace and consider excluding this point.");
	output["danger 5"] = "Phi2 above the normal range (0 - 0.85).  Please check the raw trace and consider excluding this point.";
  }
  else {
  	output.Phi2= MathROUND(fvfm,3);
  }
  if (npqt <= 0) {
    output.NPQt= 0;
//  	output.flag.warning.push("NPQt is negative (should be positive)!  It has been set to zero, but check raw trace and consider excluding this point.  To see original negative NPQt value, see NPQt_MPF variable");
	output["warning 3"] = "NPQt value is negative (should be positive).  It has been set to zero, but check raw trace and consider excluding this point.  To see original negative value, see NPQt_MPF variable";
  }
  else {
	  output.NPQt= MathROUND(npqt,3);
  }
	  output.qL= MathROUND(qL,3);
	  output.PhiNPQ = MathROUND(PhiNPQ,3);
	  output.PhiNO= MathROUND(PhiNO,3);
	  output.FvP_over_FmP= MathROUND(FvP_FmP,3);
	  output.qP= MathROUND(qP,3);
}

var Phi2_bar ="0: ";
for (var i=0; i< (10*output.Phi2); i++){
  Phi2_bar+="█";
}
for (var i=10*output.Phi2; i< 10; i++){
  Phi2_bar+="░";
}
Phi2_bar+=" :1.0 (";
Phi2_bar+=output.Phi2;
Phi2_bar+=")";

output.YII=Phi2_bar;

// only display LEF if there is a light intensity measurement > 0 
// ----------------------------
if (typeof json.light_intensity != "undefined" && json.light_intensity > 0) {
	output.LEF= MathROUND((fvfm  * 0.45 * json.light_intensity),3);
}

// Calculate Standard Deviation for Warning or Danger flags (out of bounds measurement)
// ----------------------------

if (Fs_std > 100	) {
//  	output.flag.danger.push("noisy Fs");
	output["danger 1"] = "noisy Fs";
}
if (AFmP_std > 200) {
//  	output.flag.danger.push("noisy FmPrime");
	output["danger 2"] = "noisy FmPrime";
}
if (FmP_step1_std > 60 | FmP_step2_std > 60 | FmP_step3_std > 60 | FmP_end_std > 200) {
//  	output.flag.danger.push("noisy multi-phase flash steps");
	output["danger 3"] = "noisy  multi-phase flash steps";
}
if (FoPrime_std > 150) {
//  	output.flag.danger.push("noisy FoPrime");
	output["danger 4"] = "noisy FoPrime";
}
  
 //ANALYZE THE PHI-PSI DATA  

var ctrace=json.set[PAM_set].data_raw;
var PSI_trace_beg=310;
var PSI_trace_end=615;
var PSI_trace_length=PSI_trace_end-PSI_trace_beg;
var PSI_data=json.set[PAM_set].data_raw.slice(PSI_trace_beg,PSI_trace_end);
var PSI_dark_raw=MathMEAN(PSI_data.slice(PSI_dark_beg,PSI_dark_end));
var PSI_data_absorbance=[];

for (var i=0; i<PSI_trace_length; i++){
  	  PSI_data_absorbance.push(MathLOG(PSI_dark_raw/PSI_data[i]));
  }
  var PSI_dark=MathMEAN(PSI_data_absorbance.slice(PSI_dark_beg,PSI_dark_end));
  var PSI_ss=MathMEAN(PSI_data_absorbance.slice(PSI_ss_beg,PSI_ss_end));
  var PSI_sat1=MathMEAN(PSI_data_absorbance.slice(PSI_sat1_beg,PSI_sat1_end));
  var PSI_sat2=MathMEAN(PSI_data_absorbance.slice(PSI_sat2_beg,PSI_sat2_end));
  var PSI_ss=1000*MathMEAN(PSI_data_absorbance.slice(PSI_ss_beg,PSI_ss_end));
  var PSI_sat1_vals = PSI_data_absorbance.slice(PSI_sat1_beg,PSI_sat1_end).sort();  // sort the saturating light values from low to high
  var length_of_sat1=PSI_sat1_end-PSI_sat1_beg;
  var top_20_percent=(length_of_sat1*0.8);
  var PSI_sat1 = 1000*MathMEAN(PSI_sat1_vals.slice(top_20_percent,length_of_sat1)); // take the top 20% largest values and average them
  var PSI_sat2_vals = PSI_data_absorbance.slice(PSI_sat2_beg,PSI_sat2_end).sort();  // sort the saturating light values from low to high
  var length_of_sat2=PSI_sat2_end-PSI_sat2_beg;
  var top_20_percent=(length_of_sat2*0.8);
  var PSI_sat2 = 1000*MathMEAN(PSI_sat2_vals.slice(top_20_percent,length_of_sat2)); // take the top 20% largest values and average them
  var PSI_ox=PSI_ss/PSI_sat2;
  var PSI_act=PSI_sat2;
  var PSI_open=(PSI_sat1-PSI_ss)/PSI_sat2;
  var PSI_or=1-PSI_sat1/PSI_sat2;
  output.PSI_data_absorbance=PSI_data_absorbance;

  output.PSI_act=MathROUND(PSI_act, 3);
  output.PSI_open =MathROUND(PSI_open, 3);
  output.PSI_or =MathROUND(PSI_or, 3);
  output.PSI_ox =MathROUND(PSI_ox, 3);
    //output.PSI_dark=PSI_dark;
  //output.PSI_ss = PSI_ss; //MathROUND(PSI_ss, 3);
  //output.PSI_sat1 =MathROUND(PSI_sat1, 3);
  //output.PSI_sat2 =MathROUND(PSI_sat2, 3);

	//output.data_raw_PSI =PSI_data;
   //output.PSI_dark_beg=PSI_dark_beg;
   //output.PSI_dark_end=PSI_dark_end;

// Humidity changes
    var humidity_kinetics=[
                        json.set[ECS_LEFdset].humidity,
                        json.set[P700_DIRK_set].humidity,
                        json.set[PAM_set].humidity
                       ];
  	output.humidity_K=humidity_kinetics;
  	output.humidity_K_T=humidity_kinetics.join(", ");

    var humidity2_kinetics=[
                        json.set[ECS_LEFdset].humidity2,
                        json.set[P700_DIRK_set].humidity2,
                        json.set[PAM_set].humidity2
                       ];

	output.humidity2_K=humidity2_kinetics;
  	output.humidity2_K_T=humidity2_kinetics.join(", ");


   // changes in leaf contactless_temp
  
    var air_temp_kinetics=[
                                json.set[ECS_LEFdset].temperature, 
                                json.set[P700_DIRK_set].temperature, 
                                json.set[PAM_set].temperature 
                       ];
    
     var contactless_temp_kinetics=[
                                json.set[ECS_LEFdset].contactless_temp,
                                json.set[P700_DIRK_set].contactless_temp,
                                json.set[PAM_set].contactless_temp
                       ];


  output.air_temp_kinetics=air_temp_kinetics;
  
  output.LEAF_temp=contactless_temp_kinetics;
 output.LEAF_temp_T=contactless_temp_kinetics.join(", ");

//var air_flow=new Array();

//for (var i=1; i<12 ; i++){
//  	air_flow.push(json.set[i].air_flow);
//}

//output.air_flow=air_flow;

 var light_intensity=json.set[ECS_LEFdset].light_intensity;
  output.light_intensity= light_intensity; 
  var ambient_temperature=json.set[2].temperature;
  output.ambient_temperature=ambient_temperature;
  //var leaf_RH=json.set[1].humidity2;
  //output.leaf_RH=MathROUND(leaf_RH, 2);
  leaf_temperature = json.set[ECS_LEFdset].contactless_temp;
  output.leaf_temperature=leaf_temperature;
  var leaf_air_difference_temperature = leaf_temperature-ambient_temperature;
  output.leaf_air_difference_temperature=MathROUND(leaf_air_difference_temperature,3);



// CALCULATIONS FOR ABSORBANCE / SPAD PORTION OF THE TRACE
//----------------------------
var abs_starts = 0; //1180; // when does the Phi2 measurement start
var data = json.set[SPAD_set].data_raw;
var lights = [1,2,3,4,6,8,9,10];// define the lights to have absorbance measured
var wavelengths = ["530","650","605","420","940","850","730","880"];// define the lights to have absorbance measured
var raw_at_blank1 = [0,0,0,0,0,0,0,0];
var raw_at_blank2 = [0,0,0,0,0,0,0,0];
var raw_at_blank3 = [0,0,0,0,0,0,0,0];
var abs_at_blank1 = [0,0,0,0,0,0,0,0];
var abs_at_blank2 = [0,0,0,0,0,0,0,0];
var abs_at_blank3 = [0,0,0,0,0,0,0,0];
var trans_at_blank1 = [0,0,0,0,0,0,0,0];
var trans_at_blank2 = [0,0,0,0,0,0,0,0];
var trans_at_blank3 = [0,0,0,0,0,0,0,0];
var spad_at_blank1 = [0,0,0,0,0,0,0,0];
var spad_at_blank2 = [0,0,0,0,0,0,0,0];
var spad_at_blank3 = [0,0,0,0,0,0,0,0];
var minolta_spad1 = 0;
var minolta_spad2 = 0;
var minolta_spad3 = 0;
var minolta_spad = 0;
var minolta_spad_averages = 0;
var choose = 0;
var light;
var wavelengthString;
var pulses = 10;// number of pulses in a cycle

/* // this is what the recall object looks like --> 
"recall":{"colorcal_blank1[1]":0.000000,"colorcal_blank1[2]":0.000000,"colorcal_blank1[3]":0.000000,"colorcal_blank1[4]":0.00000
0,"colorcal_blank1[6]":0.000000,"colorcal_blank1[8]":0.000000,"colorcal_blank1[9]":0.000000,"colorcal_blank1[10]":0.000000,"colo
rcal_blank2[1]":0.000000,"colorcal_blank2[2]":0.000000,"colorcal_blank2[3]":0.000000,"colorcal_blank2[4]":0.000000,"colorcal_bla
nk2[6]":0.000000,"colorcal_blank2[8]":0.000000,"colorcal_blank2[9]":0.000000,"colorcal_blank2[10]":0.000000,"colorcal_blank3[1]"
:0.000000,"colorcal_blank3[2]":0.000000,"colorcal_blank3[3]":0.000000,"colorcal_blank3[4]":0.000000,"colorcal_blank3[6]":0.00000
0,"colorcal_blank3[8]":0.000000,"colorcal_blank3[9]":0.000000,"colorcal_blank3[10]":0.000000},
*/

/*
** Loop through the lights.  If it's zero, skip it.  If it's not in the acceptable range (>500 but <65534 (max)) skip it.
** Then choose the first blank (starting with 1 moving to 3) which fulfills this criteria
** Otherwise, calculate absorbance and transmittance and a 'spad'-like value using LED 6 (940 on clamp) to calibrate thickness
*/
//----------------------------

for (var i = 0;i<lights.length;i++) { // loop through and save one averaged 'point' for each of the cycles
  light = lights[i]; //json.set[PAM_set].data_raw[1];
  wavelengthString = wavelengths[i];                                                    
  //var value1 = MathMEDIAN(json.set[PAM_set].data_raw.slice((abs_starts + i*pulses+2),(abs_starts + i*pulses+8)));
  var value1 = MathMEDIAN(json.set[SPAD_set].data_raw.slice((abs_starts + i*pulses+2),(abs_starts + i*pulses+8)));
  var value2 = MathMEDIAN(json.set[SPAD_set].data_raw.slice((abs_starts + i*pulses+82),(abs_starts + i*pulses+88)));
  var value3 = MathMEDIAN(json.set[SPAD_set].data_raw.slice((abs_starts + i*pulses+162),(abs_starts + i*pulses+168)));
  raw_at_blank1[light] = value1;
  raw_at_blank2[light] = value2;
  raw_at_blank3[light] = value3;
  
 output.value1=value1;
 output.value2=value2;
 output.value3=value3;
  
 output.lights_length=lights.length;
 raw_at_blank1[light] = value1;
 raw_at_blank2[light] = value2;
 raw_at_blank3[light] = value3;
  
  if (json.set[calib_set].recall["colorcal_blank1["+light+"]"] != 0 && raw_at_blank1[light] > 500 && raw_at_blank1[light] < 65534) {
    abs_at_blank1[light] = MathROUND(-1*MathLOG(raw_at_blank1[light]/json.set[calib_set].recall["colorcal_blank1["+light+"]"]),3);
//    trans_at_blank1[light] = MathROUND(raw_at_blank1[light]/json.set[calib_set].recall["colorcal_blank1["+light+"]"],3);
//	output ["light".concat(light.toString(),"_transmittance")]  = trans_at_blank1[light];
    output ["absorbance_".concat(wavelengthString)]  = abs_at_blank1[light];
//	output ["light".concat(light.toString(),"_blank1")]  = json.set[calib_set].recall["colorcal_blank1["+light+"]"];
  }
  
}

//output.test= json.set[12].data_raw; //MathMEAN(json.set[PAM_set].data_raw.slice(10,20)); //(abs_starts + i*pulses+2),(abs_starts + i*pulses+8)));

// so the raw value needs to be >~2000, while the 940 needs to be greater than ~5000, otherwise it's out of range
// the acceptable range is different for each blank (1,2,3) thus a separate if statement for each blank.
// once you hit an intensity which is within the acceptable range, then keep that value and skip the rest


for (var i = 0;i<8;i++) { // loop through and save one averaged SPAD value for each of the cycles.  If we have additional calibration values (like minolta spad) use those and output that value
  light = lights[i];
  wavelengthString = wavelengths[i];
  spad_at_blank2[light] = MathROUND(100*MathLOG((raw_at_blank2[6] / json.set[calib_set].recall["colorcal_blank2[6]"])/(raw_at_blank2[light] / json.set[calib_set].recall["colorcal_blank2["+light+"]"])),2);
  spad_at_blank1[light] = MathROUND(100*MathLOG((raw_at_blank1[6] / json.set[calib_set].recall["colorcal_blank1[6]"])/(raw_at_blank1[light] / json.set[calib_set].recall["colorcal_blank1["+light+"]"])),2);
  spad_at_blank3[light] = MathROUND(100*MathLOG((raw_at_blank3[6] / json.set[calib_set].recall["colorcal_blank3[6]"])/(raw_at_blank3[light] / json.set[calib_set].recall["colorcal_blank3["+light+"]"])),2);
  if (light == 2) { // if it's the red light, the also calculate minolta spad
    //output ["light".concat(light.toString(),"_raw1")]  = raw_at_blank1[light];
    //output ["light6_raw1"]  = raw_at_blank1[6];
    //output ["spad_raw1"]  = spad_at_blank1[2];
    //output ["light".concat(light.toString(),"_raw2")]  = raw_at_blank2[light];
    //output ["light6_raw2"]  = raw_at_blank2[6];
    //output ["spad_raw2"]  = spad_at_blank2[2];
    //output ["light".concat(light.toString(),"_raw3")]  = raw_at_blank3[light];
    //output ["light6_raw3"]  = raw_at_blank3[6];
    //output ["spad_raw3"]  = spad_at_blank3[2];
  }
  if (json.set[calib_set].recall["colorcal_blank1["+light+"]"] != 0 && raw_at_blank1[light] > 30 && raw_at_blank1[light] < 65534 
      && raw_at_blank1[6] > 4500 && raw_at_blank1[6] < 65534) {
    if (light == 2) { // if it's the red light, the also calculate minolta spad
      minolta_spad = (spad_at_blank1[2] - json.set[calib_set].recall["colorcal_intensity1_yint[2]"]) / json.set[calib_set].recall["colorcal_intensity1_slope[2]"];	
      output ["SPAD_".concat(wavelengthString)]  = MathROUND(minolta_spad,2);
      //output ["SPAD_".concat(wavelengthString,"_intensity")]  = 1;
        choose = 1;
      continue;
    }
    else if (light != 6) {
      //output ["SPAD_".concat(wavelengthString)] = MathROUND(spad_at_blank1[light],2);
      //output ["SPAD_".concat(wavelengthString,"_intensity")] = 1;
//      output ["SPAD1_".concat(wavelengthString)] = MathROUND(spad_at_blank1[light],2);
//      output ["SPAD1_".concat(wavelengthString,"_intensity")] = 1;
      continue;
    }
  }
  if (json.set[calib_set].recall["colorcal_blank2["+light+"]"] != 0 && raw_at_blank2[light] > 500 && raw_at_blank2[light] < 65534 
      && raw_at_blank2[6] > 3000 && raw_at_blank2[6] < 65534) {
    if (light == 2) { // if it's the red light, the also calculate minolta spad
      minolta_spad = (spad_at_blank2[2] - json.set[calib_set].recall["colorcal_intensity2_yint[2]"]) / json.set[calib_set].recall["colorcal_intensity2_slope[2]"];
      output ["SPAD_".concat(wavelengthString)] = MathROUND(minolta_spad,2);
      output ["SPAD_".concat(wavelengthString,"_intensity")] = 2;
        choose = 2;
      continue;
    }
    else if (light != 6) {
      //output ["SPAD_".concat(wavelengthString)] = MathROUND(spad_at_blank2[light],2);
      output ["SPAD_".concat(wavelengthString,"_intensity")] = 2;
//      output ["SPAD2_".concat(wavelengthString)] = MathROUND(spad_at_blank2[light],2);
//      output ["SPAD2_".concat(wavelengthString,"_intensity")] = 2;
      continue;
    }
  }

  output.SPAD=MathROUND(minolta_spad, 2);
  if (json.set[calib_set].recall["colorcal_blank3["+light+"]"] != 0 && raw_at_blank3[light] > 750 && raw_at_blank3[light] < 65534 
      && raw_at_blank3[6] > 3000 && raw_at_blank3[6] < 65534) {
    if (light == 2) { // if it's the red light, the also calculate minolta spad
      minolta_spad = (spad_at_blank3[2] - json.set[calib_set].recall["colorcal_intensity3_yint[2]"]) / json.set[calib_set].recall["colorcal_intensity3_slope[2]"];
      output ["SPAD_".concat(wavelengthString)]  = MathROUND(minolta_spad,2);
      output ["SPAD_".concat(wavelengthString,"_intensity")]  = 3;
      choose = 3;
      continue;
    }
    else if (light != 6) {
      output ["SPAD_".concat(wavelengthString)] = MathROUND(spad_at_blank3[light],2);
      output ["SPAD_".concat(wavelengthString,"_intensity")] = 3;
//      output ["SPAD3_".concat(wavelengthString)] = MathROUND(spad_at_blank3[light],2);
//      output ["SPAD3_".concat(wavelengthString,"_intensity")] = 3;
      continue;
    }
  }
}

if (choose == 0) {
  output ["SPAD_650"]  = 0;
  danger("Chlorophyll content SPAD is outside the acceptable range.  The leaf may be too thick, too thin, or have holes in it.", output);
}
else if (minolta_spad <= 2) {
  danger("Chlorophyll Content SPAD is very low.  If leaf is visibly green, ensure leaf completely covers the light guide and retry.  If still too low, consider recalibrating device.", output);
}
else if (minolta_spad >= 100) {
  danger("Chlorophyll Content SPAD is very high.  If this value is associated with a typical leaf, consider recalibrating device.", output);
}


output.thick1=json.set[2].thickness;
output.thick2=json.set[ECS_LEFdset].thickness;
output.thick3=json.set[PAM_set].thickness;
output.thick4=json.set[calib_set].thickness;

output["order"] = ["Phi2", "Phi2_bar", "LEF", "NPQt", "SPAD", "PSI_act", "PSI_open", "tP700", "PSI_or", "PSI_ox", "ambient_temperture"];
output.LEF=output.light_intensity *output.Phi2;

return output;
{
  "time": 1505165808300,
  "device_name": "MultispeQ",
  "device_version": "1",
  "device_id": "01:12:38:16",
  "device_battery": 100,
  "device_firmware": 1.2021,
  "sample": [
    [
      {
        "time": 1505165808300,
        "protocol_id": 1,
        "set": [
          {
            "time": 1505165808310,
            "label": "",
            "temperature": 27.21,
            "humidity": 39.585,
            "pressure": 991.083,
            "temperature2": 27.39,
            "humidity2": 39.495,
            "pressure2": 990.211,
            "contactless_temp": 25.23,
            "compass_direction": "E",
            "compass": 90,
            "angle": 2.969,
            "angle_direction": "S",
            "pitch": 2.97,
            "roll": 0,
            "data_raw": [

            ]
          },
          {
            "time": 1505165808431,
            "label": "ecs_lefd",
            "set_light_intensity": 1001,
            "set_led_delay": [
              0,
              2,
              1001,
              10000
            ],
            "light_intensity": 0,
            "r": 0,
            "g": 0,
            "b": 0,
            "light_intensity_raw": 0,
            "temperature": 27.19,
            "humidity": 39.605,
            "pressure": 991.08,
            "temperature2": 27.38,
            "humidity2": 39.517,
            "pressure2": 990.182,
            "contactless_temp": 26.15,
            "thickness": 0.03,
            "data_raw": [
              50491,
              50116,
              50155,
              50269,
              50207,
              50159,
              50162,
              50152,
              50167,
              50181,
              50195,
              50228,
              50250,
              50246,
              50293,
              50292,
              50159,
              50143,
              50172,
              50215,
              50226,
              50150,
              50077,
              50168,
              50133,
              50139,
              50231,
              50249,
              50109,
              50182,
              49949,
              50130,
              50110,
              50154,
              50173,
              50191,
              50159,
              50158,
              50154,
              50194,
              50159,
              50167,
              50195,
              50215,
              50366,
              50207,
              50233,
              50326,
              50407,
              50319,
              50285,
              50227,
              50325,
              50191,
              50185,
              50225,
              50294,
              50024,
              50182,
              50243,
              50261,
              50241,
              50255,
              50224,
              50217,
              50204,
              50227,
              50158,
              50227,
              50203,
              50157,
              50253,
              50236,
              50263,
              50278,
              50219,
              50093,
              50230,
              50098,
              50218,
              50218,
              50257,
              50209,
              50343,
              50281,
              50275,
              50155,
              50231,
              50183,
              50266,
              50208,
              50223,
              50151,
              50270,
              50169,
              50195,
              50159,
              50161,
              50074,
              50198,
              50191,
              50203,
              50102,
              50138,
              50090,
              50137,
              50185,
              50128,
              50124,
              50018,
              50105,
              50164,
              50103,
              50147,
              50176,
              50157,
              50179,
              50213,
              50134,
              50193,
              50225,
              50234,
              50287,
              50253,
              50259,
              50106,
              50172,
              50241,
              50253,
              50266,
              50017,
              50279,
              50295,
              50199,
              50198,
              50117,
              50165,
              50249,
              50208,
              50197,
              50228,
              50201,
              50263,
              50281,
              50148,
              50222,
              50231,
              50281,
              50309,
              50351,
              50282,
              50251,
              50241,
              50205,
              50243,
              50261,
              50232,
              50257,
              50199,
              50305,
              50326,
              50311,
              50231,
              50238,
              50272,
              50224,
              50299,
              50242,
              50242,
              50284,
              50243,
              50267,
              50261,
              50251,
              50274,
              50322,
              50342,
              50317,
              50279,
              50311,
              50294,
              50329,
              50307,
              50351,
              50285,
              50338,
              50277,
              50265,
              50395,
              50289,
              50359,
              50366,
              50282,
              50324,
              50288,
              50349,
              50138,
              50214,
              50300,
              50320,
              50033,
              50225,
              50121,
              50200,
              50254,
              50223,
              50317,
              50311,
              50301,
              50310,
              50278,
              50289,
              50319,
              50295,
              50275,
              50271,
              50276,
              50399,
              50337,
              50373,
              51723,
              50324,
              50138,
              50293,
              50265,
              50373,
              50295,
              50404,
              50479,
              50323,
              50314,
              50354,
              50362,
              50327,
              50273,
              50316,
              50272,
              50310,
              50353,
              50308,
              50273,
              50383,
              50331,
              50322,
              50307,
              50311,
              50356,
              50299,
              50323,
              50234,
              50333,
              50193,
              50272,
              50284,
              50274,
              50266,
              50281,
              50286,
              50219,
              50258,
              50282,
              50258,
              50276,
              50246,
              50227,
              50246,
              50252,
              50225,
              50280,
              50310,
              50314,
              50287,
              50212,
              50221,
              50173,
              50281,
              50253,
              50193,
              50196,
              50146,
              50143,
              50150,
              50263,
              50209,
              50245,
              50108,
              50121,
              50212,
              50306,
              50195,
              50233,
              50263,
              50299,
              50329,
              50331,
              50303,
              50279,
              50282,
              50322,
              50309,
              50129,
              50103,
              50300,
              50168,
              50306,
              50297,
              50247,
              50189,
              50267,
              50214,
              50294,
              50209,
              50221,
              50171,
              50275,
              50245,
              50331,
              50243,
              50272,
              50305,
              50284,
              50335,
              50286,
              50305,
              50359,
              50306,
              50300,
              50327,
              50235,
              50225,
              50239,
              50223,
              50310,
              50299,
              50113,
              50237,
              50293,
              50265,
              50346,
              50278,
              50234,
              50196,
              50259,
              50167,
              50309,
              50259,
              50114,
              50327,
              50272,
              50230,
              50169,
              50208,
              50200,
              50243,
              50212,
              50183,
              50296,
              50266,
              50222,
              50230,
              50290,
              50262,
              50277,
              50238,
              50241,
              50199,
              50269,
              50221,
              50246,
              50158,
              50214,
              50188,
              50178,
              50230,
              50261,
              50351,
              50271,
              50232,
              50264,
              50235,
              50214,
              50149,
              50199,
              50146,
              50207,
              50149,
              50277,
              50311,
              50210,
              50166,
              50233,
              50224,
              50187,
              50133,
              50208,
              50309,
              50187,
              50155,
              50253,
              50160,
              50191,
              50221,
              50303,
              50174,
              50290,
              50262,
              50217,
              50222,
              50265,
              50259,
              50215,
              50202,
              50225,
              50319,
              50249,
              50237,
              50256,
              50196,
              50265,
              50336,
              50121,
              50241,
              50301,
              50257,
              50263,
              50252,
              50215,
              50366,
              50271,
              50210,
              50271,
              50318,
              50309,
              50233,
              50321,
              50259,
              50222,
              50337,
              50209,
              50190,
              51747,
              50091,
              50261,
              50208,
              50246,
              50221,
              50255,
              50293,
              50303,
              50219,
              50334,
              50295,
              50267,
              50236,
              50299,
              50316,
              50334,
              50352,
              50248,
              50315,
              50267,
              50189,
              50308,
              50313,
              50251,
              50215,
              50259,
              50355,
              50290,
              50238,
              50200,
              50274,
              50271,
              50277,
              50213,
              50247,
              50278,
              50085,
              50235,
              50223,
              50198,
              50273,
              50321,
              50243,
              50311,
              50251,
              50302,
              50350,
              50321,
              50315,
              50278,
              50299,
              50402,
              50287,
              50252,
              50205,
              50267,
              50239,
              50268,
              50239,
              50267,
              50237,
              50279,
              50287,
              50378,
              50319,
              50373,
              50236,
              50242,
              50218,
              50203,
              50169,
              50220,
              50223,
              50242,
              50191,
              50255,
              50238,
              50341,
              50217,
              50352,
              50173,
              50355,
              50379,
              50239,
              50263,
              50294,
              50213,
              50242,
              50243,
              50316,
              50350,
              50299,
              50305,
              50327,
              50310,
              50277,
              50261,
              50296,
              50301,
              50238,
              50275,
              50305,
              50228,
              50251,
              50248,
              50260,
              50238,
              50145,
              50143,
              50279,
              50182,
              50259,
              50311,
              50302,
              50181,
              50333,
              50277,
              50354,
              50362,
              50291,
              50339,
              50323,
              50356,
              50355,
              50337,
              50332,
              50295,
              50273,
              50355,
              50286,
              50237,
              50271,
              50293,
              50274,
              50169,
              50277,
              50271,
              50345,
              50319,
              50339,
              50343,
              50207,
              50301,
              50310,
              50213,
              50221,
              50253,
              50181,
              50287,
              50140,
              50230,
              50391,
              50398,
              50319,
              50377,
              50268,
              50213,
              50276,
              50322,
              50351,
              50326,
              50319,
              50385,
              50372,
              50285,
              50260,
              50274,
              50350,
              50369,
              50226,
              50339,
              50290,
              50386,
              50366,
              50267,
              50349,
              50307,
              50305,
              50297,
              50292,
              50347,
              50213,
              50259,
              50169,
              50247,
              50196,
              50202,
              50318,
              50254,
              50218,
              50198,
              50246,
              50287,
              50182,
              50243,
              50255,
              50227,
              50306,
              50300,
              49999,
              50266,
              50149,
              50343,
              50240,
              50289,
              50403,
              50326,
              50357,
              50229,
              50324,
              50273,
              50213,
              50244,
              50235,
              50365,
              50303,
              50205,
              50166,
              50247,
              51999,
              50251,
              50311,
              50339,
              50364,
              50314,
              50335,
              50240,
              50337,
              50311,
              50214,
              50339,
              50361,
              50346,
              50332,
              50279,
              50259,
              50330,
              50214,
              50293,
              50272,
              50254,
              50290,
              50369,
              50275,
              50241,
              50224,
              50317,
              50376,
              50177,
              50335,
              50250,
              50271,
              50274,
              50295,
              50120,
              50331,
              50253,
              50245,
              50206,
              50225,
              50298,
              50269,
              50212,
              50317,
              50306,
              50333,
              50309,
              50297,
              50339,
              50306,
              50290,
              50248,
              50232,
              50246,
              50323,
              50304,
              50222,
              50289,
              50423,
              50381,
              50333,
              50324,
              50305,
              50392,
              50319,
              50330,
              50281,
              50221,
              50229,
              50302,
              50173,
              50293,
              50281,
              50357,
              50299,
              50303,
              50271,
              50279,
              50326,
              50309,
              50345,
              50413,
              50375,
              50349,
              50371,
              50320,
              50403,
              50372,
              50319,
              50375,
              50191,
              50233,
              50296,
              50271,
              50238,
              50163,
              50390,
              50085,
              50119,
              50158,
              50235,
              50242,
              50183,
              50137,
              50247,
              50222,
              50162,
              50171,
              50291,
              50207,
              50283,
              50279,
              50291,
              50313,
              50303,
              50254,
              50269,
              50268,
              50203,
              50164,
              50243,
              50237,
              50247,
              50183,
              50218,
              50169,
              50226,
              50245,
              50259,
              50237,
              50318,
              50265,
              50282,
              50227,
              50285,
              50210,
              50291,
              50279,
              50334,
              50357,
              50311,
              50226,
              50370,
              50281,
              50026,
              50245,
              50264,
              50213,
              50273,
              50286,
              50222,
              50115,
              50181,
              50217,
              50226,
              50279,
              50249,
              50231,
              50251,
              50135,
              50137,
              50310,
              50322,
              50359,
              50342,
              50280,
              50275,
              50245,
              50307,
              50300,
              50274,
              50295,
              50206,
              50167,
              50248,
              50245,
              50221,
              50252,
              50355,
              50310,
              50327,
              50173,
              50266,
              50325,
              50302,
              50075,
              50162,
              50230,
              50215,
              50172,
              50241,
              50171,
              50221,
              50338,
              50213,
              50247,
              50317,
              50314,
              50269,
              50001,
              50234,
              50309,
              50176,
              50223,
              50201,
              50244,
              50317,
              50302,
              50250,
              50197,
              50133,
              50266,
              50199,
              50140,
              50249,
              50228,
              50251,
              50276,
              50193,
              52155,
              50221,
              50241,
              50213,
              50184,
              50223,
              50246,
              50237,
              50171,
              50213,
              50223,
              50271,
              50235,
              50185,
              50247,
              50299,
              50181,
              50208,
              50246,
              50234,
              50309,
              50226,
              50285,
              50310,
              50215,
              50221,
              50299,
              50279,
              50258,
              50234,
              50239,
              50260,
              50272,
              50275,
              50274,
              50317,
              50269,
              50319,
              50306,
              50256,
              50335,
              50269,
              50332,
              50241,
              50287,
              50302,
              50318,
              50294,
              50233,
              50279,
              50270,
              50267,
              50259,
              50300,
              50243,
              50145,
              50288,
              50207,
              50046,
              50251,
              50263,
              50211,
              50173,
              50240,
              50129,
              50263,
              50360,
              50343,
              50269,
              50111,
              50201,
              50268,
              50117,
              50325,
              50298,
              50153,
              50195,
              50295,
              50447,
              50308,
              50334,
              50367,
              50347,
              50245,
              50289,
              50295,
              50242,
              50277,
              50239,
              50291,
              50318,
              50291,
              50349,
              50239,
              50331,
              50170,
              50228,
              50275,
              50359,
              50335,
              50245,
              50190,
              50135,
              50287,
              50342,
              50304,
              50293,
              50307,
              50221,
              50267,
              50239,
              50266,
              50293,
              50271,
              50306,
              50231,
              50271,
              50229,
              50287,
              50361,
              50273,
              50215,
              50212,
              50339,
              50280,
              50267,
              50280,
              50329,
              50324,
              50377,
              50407,
              50328,
              50297,
              50335,
              50407,
              50321,
              50384,
              50288,
              50314,
              50311,
              50242,
              50305,
              50375,
              50367,
              50310,
              50183,
              50278,
              50317,
              50312,
              50350,
              50281,
              50329,
              50327,
              50368,
              50415,
              50315,
              50245,
              50307,
              50328,
              50300,
              50314,
              50296,
              50261,
              50305,
              50404,
              50225,
              50267,
              50346,
              50256,
              50384,
              50371,
              50274,
              50353,
              50333,
              50335,
              50268,
              50151,
              50130,
              50153,
              50321,
              50318,
              50276,
              50280,
              50351,
              50258,
              50319,
              50314,
              50287,
              50340,
              50343,
              50319,
              50399,
              50317,
              50305,
              50326,
              50341,
              50335,
              50323,
              50300,
              50254,
              49894,
              50324,
              50277,
              50311,
              50343,
              50327,
              50383,
              50393,
              50331,
              50203,
              50291,
              50383,
              50421,
              50337,
              50246,
              50263,
              50286,
              50250,
              50345,
              50244,
              52495,
              50281,
              50244,
              50218,
              50246,
              50213,
              50260,
              50271,
              50330,
              50357,
              50269,
              50294,
              50243,
              50278,
              50214,
              50264,
              50337,
              50271,
              50155,
              50245,
              50236,
              50235,
              50365,
              50371,
              50287,
              50263,
              50328,
              50263,
              50281,
              50202,
              50253,
              50254,
              50276,
              50283,
              50187,
              50344,
              50356,
              50192,
              50357,
              50241,
              50410,
              50243,
              50353,
              50383,
              50439,
              50306,
              50210,
              50338,
              50359,
              50456,
              50322,
              50407,
              50371,
              50357,
              50411,
              50285,
              50245,
              50307,
              50463,
              50383,
              50337,
              50366,
              50425,
              50449,
              50369,
              50447,
              50311,
              50341,
              50368,
              50407,
              50296,
              50273,
              50279,
              50343,
              50418,
              50199,
              50329,
              50229,
              50293,
              50196,
              50287,
              50303,
              50299,
              50340,
              50240,
              50326,
              50195,
              50261,
              50247,
              50354,
              50347,
              50302,
              50302,
              50270,
              50118,
              50219,
              50211,
              50238,
              50295,
              50269,
              50221,
              50253,
              50250,
              50155,
              50319,
              50240,
              50236,
              50187,
              50217,
              50201,
              50230,
              50204,
              50168,
              50206,
              50391,
              50295,
              50315,
              50280,
              50172,
              50267,
              50175,
              50141,
              50228,
              50242,
              50291,
              50210,
              50295,
              50215,
              50260,
              50123,
              50100,
              50242,
              50287,
              50231,
              50164,
              50130,
              50009,
              50115,
              50120,
              50137,
              50141,
              50172,
              50129,
              50189,
              50207,
              50234,
              50141,
              50215,
              50227,
              50263,
              50263,
              50246,
              50235,
              50210,
              50218,
              50249,
              50184,
              50185,
              50204,
              50275,
              50212,
              50069,
              50113,
              50168,
              50319,
              50361,
              50258,
              50314,
              50377,
              50374,
              50301,
              50274,
              50275,
              50313,
              50340,
              50354,
              50289,
              50353,
              50367,
              50323,
              50292,
              50257,
              50154,
              50235,
              50271,
              50203,
              50253,
              50247,
              50226,
              50300,
              50275,
              50258,
              50271,
              50203,
              50369,
              50263,
              50265,
              50259,
              50159,
              50323,
              49797,
              50243,
              50247,
              50227,
              50309,
              50316,
              50137,
              50376,
              50390,
              50426,
              50393,
              50484,
              50375,
              50362,
              50401,
              50405,
              50435,
              50378,
              50398,
              50302,
              52882,
              50311,
              50290,
              50291,
              50205,
              50236,
              50139,
              50218,
              50270,
              50193,
              50243,
              50314,
              50274,
              50223,
              50297,
              50235,
              50209,
              50213,
              50247,
              50274,
              50343,
              50335,
              50305,
              50153,
              50117,
              50050,
              50090,
              50143,
              50235,
              50163,
              50231,
              50238,
              50143,
              50189,
              50256,
              50234,
              50226,
              50261,
              50162,
              50159,
              50267,
              50255,
              50217,
              50161,
              50199,
              50299,
              50282,
              50368,
              50352,
              50353,
              50323,
              50257,
              50277,
              50267,
              50256,
              50188,
              50254,
              50159,
              50257,
              50204,
              50238,
              50273,
              50221,
              50336,
              50232,
              50223,
              50311,
              50161,
              50185,
              50170,
              50237,
              50289,
              50295,
              50215,
              50121,
              50164,
              50199,
              50210,
              50214,
              50207,
              50199,
              50213,
              50223,
              50255,
              50197,
              50195,
              50304,
              50297,
              50273,
              50354,
              50247,
              50289,
              50327,
              50253,
              50255,
              50210,
              50346,
              50267,
              50266,
              50278,
              6,
              5,
              5,
              5,
              6,
              4,
              5,
              5,
              6,
              5,
              5,
              5,
              5,
              5,
              4,
              6,
              6,
              6,
              5,
              4,
              0,
              4,
              3,
              2,
              2,
              3,
              2,
              3,
              3,
              3,
              2,
              2,
              3,
              3,
              1,
              2,
              3,
              2,
              3,
              3,
              15,
              6,
              5,
              5,
              5,
              5,
              6,
              6,
              4,
              5,
              6,
              6,
              6,
              7,
              5,
              7,
              7,
              6,
              4,
              6,
              4,
              5,
              7,
              4,
              5,
              8,
              5,
              6,
              8,
              3,
              5,
              6,
              5,
              5,
              5,
              5,
              7,
              4,
              5,
              6,
              5,
              5,
              5,
              5,
              6,
              5,
              6,
              5,
              4,
              7,
              5,
              4,
              5,
              5,
              5,
              5,
              5,
              5,
              6,
              4,
              5,
              6,
              6,
              5,
              8,
              5,
              7,
              7,
              4,
              4,
              6,
              5,
              5,
              7,
              4,
              6,
              7,
              5,
              6,
              5,
              6,
              5,
              7,
              6,
              5,
              6,
              5,
              7,
              5,
              6,
              5,
              5,
              6,
              5,
              6,
              5,
              4,
              6,
              4,
              6
            ]
          },
          {
            "time": 1505165822235,
            "label": "p700_dirk_set",
            "light_intensity": 0,
            "r": 0,
            "g": 0,
            "b": 0,
            "light_intensity_raw": 0,
            "temperature": 27.18,
            "humidity": 39.595,
            "pressure": 991.117,
            "temperature2": 27.38,
            "humidity2": 39.505,
            "pressure2": 990.243,
            "contactless_temp": 26.25,
            "compass_direction": "W",
            "compass": 270,
            "angle": 2.45,
            "angle_direction": "N",
            "pitch": 2.44,
            "roll": -0.17,
            "data_raw": [
              51886,
              51780,
              51742,
              51723,
              51735,
              51743,
              51799,
              51783,
              51781,
              51784,
              51776,
              51763,
              51754,
              51759,
              51727,
              51733,
              51743,
              51731,
              51757,
              51719,
              51738,
              51751,
              51757,
              51740,
              51749,
              51764,
              51754,
              51779,
              51771,
              51788,
              51775,
              51755,
              51772,
              51770,
              51829,
              51777,
              51751,
              51780,
              51720,
              51740,
              51727,
              51729,
              51730,
              51765,
              51737,
              51731,
              51750,
              51763,
              51775,
              51766,
              51749,
              51803,
              51765,
              51746,
              51746,
              51713,
              51775,
              51775,
              51743,
              51722,
              51730,
              51749,
              51758,
              51779,
              51773,
              51767,
              51782,
              51771,
              51775,
              51761,
              51769,
              51772,
              51751,
              51742,
              51754,
              51740,
              51774,
              51766,
              51788,
              51762,
              51775,
              51814,
              51815,
              51749,
              51751,
              51750,
              51737,
              51721,
              51719,
              51718,
              51733,
              51758,
              51747,
              51737,
              51799,
              51776,
              51803,
              51774,
              51760,
              51780,
              51757,
              51744,
              51719,
              51783,
              51753,
              51774,
              51749,
              51735,
              51779,
              51737,
              51762,
              51771,
              51755,
              51739,
              51777,
              51794,
              51792,
              51786,
              51726,
              51760,
              51727,
              51782,
              51785,
              51794,
              51776,
              51811,
              51761,
              51786,
              51785,
              51762,
              51778,
              51770,
              51821,
              51759,
              51739,
              51813,
              51791,
              51828,
              51842,
              51806,
              51797,
              51807,
              51803,
              51806,
              51807,
              51793,
              51813,
              51829,
              51837,
              51837,
              51822,
              51801,
              51815,
              51814,
              51816,
              51799,
              51843,
              51804,
              51767,
              51803,
              51817,
              51779,
              51793,
              51776,
              51793,
              51810,
              51787,
              51775,
              51765,
              51811,
              51810,
              51807,
              51845,
              51822,
              51814,
              51824,
              51855,
              51834,
              51859,
              51823,
              51815,
              51830,
              51808,
              51774,
              51784,
              51781,
              51771,
              51775,
              51775,
              51783,
              51777,
              51727,
              51779,
              51741,
              51782,
              51783,
              51747,
              51748,
              51790,
              51782,
              51765,
              51757,
              51755,
              51744,
              51783,
              51747,
              51781,
              51812,
              51819,
              51759,
              51803,
              51759,
              51774,
              51790,
              51740,
              51775,
              51742,
              51760,
              51727,
              51791,
              51789,
              51753,
              51775,
              51737,
              51772,
              51731,
              51741,
              51752,
              51731,
              51756,
              51765,
              51772,
              51787,
              51768,
              51788,
              51813,
              51799,
              51793,
              51768,
              51731,
              51786,
              51783,
              51757,
              51791,
              51753,
              51784,
              51794,
              51789,
              51750,
              51751,
              51735,
              51717,
              51722,
              51712,
              51705,
              51741,
              51749,
              51762,
              51783,
              51771,
              51802,
              51767,
              51742,
              51775,
              51774,
              51756,
              51739,
              51742,
              51769,
              51783,
              51792,
              51770,
              51790,
              51807,
              51769,
              51773,
              51737,
              51745,
              51759,
              51765,
              51779,
              51733,
              51735,
              51741,
              51737,
              51750,
              51749,
              51775,
              51782,
              51763,
              51767,
              51743,
              51749,
              51715,
              51722,
              51738,
              51780,
              51753,
              51740,
              51775,
              51716,
              51731,
              51773,
              51759,
              51776,
              51723,
              51738,
              51727,
              51776,
              51755,
              51743,
              51780,
              51749,
              51773,
              51753,
              51763,
              51767,
              51754,
              51739,
              51782,
              51807,
              51763,
              51749,
              51758,
              51799,
              51733,
              51759,
              51751,
              51763,
              51786,
              51775,
              51751,
              51759,
              51768,
              51754,
              51763,
              51807,
              51795,
              51775,
              51782,
              51776,
              51790,
              51799,
              51794,
              51793,
              51773,
              51746,
              51741,
              51767,
              51725,
              51737,
              51758,
              51751,
              51745,
              51739,
              51694,
              51739,
              51730,
              51726,
              51757,
              51777,
              51744,
              51790,
              51751,
              51747,
              51801,
              51775,
              51751,
              51735,
              51742,
              51748,
              51750,
              51733,
              51743,
              51733,
              51759,
              51757,
              51775,
              51772,
              51770,
              51742,
              51770,
              51774,
              51761,
              51751,
              51739,
              51718,
              51727,
              51765,
              51753,
              51775,
              51759,
              51799,
              51749,
              51737,
              51743,
              51764,
              51750,
              51737,
              51764,
              51731,
              51754,
              51754,
              51745,
              51742,
              51798,
              51703,
              51761,
              51758,
              51737,
              51735,
              51739,
              51745,
              51730,
              51757,
              51759,
              51773,
              51713,
              51729,
              51755,
              51769,
              51746,
              51785,
              51740,
              51703,
              51756,
              51777,
              51787,
              51796,
              51771,
              51809,
              51803,
              51811,
              51767,
              51795,
              51750,
              51782,
              51743,
              51751,
              51775,
              51778,
              51770,
              51745,
              51762,
              51709,
              51719,
              51770,
              51775,
              51721,
              51721,
              51699,
              51739,
              51724,
              51738,
              51735,
              51738,
              51749,
              51756,
              51771,
              51775,
              51775,
              51773,
              51749,
              51764,
              51752,
              51730,
              51766,
              51759,
              51783,
              51776,
              51767,
              51738,
              51772,
              51781,
              51780,
              51724,
              51711,
              51771,
              51779,
              51804,
              51770,
              51807,
              51787,
              51785,
              51782,
              51800,
              51770,
              51762,
              51766,
              51751,
              51769,
              51759,
              51774,
              51787,
              51771,
              51793,
              51760,
              51749,
              51741,
              51781,
              51755,
              51743,
              51753,
              51766,
              51813,
              51771,
              51788,
              51785,
              51751,
              51800,
              51785,
              51768,
              51745,
              51785,
              51753,
              51754,
              51735,
              51772,
              51799,
              51763,
              51750,
              51744,
              51751,
              51796,
              51764,
              51787,
              51779,
              51790,
              51785,
              51768,
              51752,
              51729,
              51732,
              51739,
              51747,
              51736,
              51767,
              51795,
              51767,
              51726,
              51794,
              51735,
              51724,
              51759,
              51749,
              51759,
              51757,
              51785,
              51803,
              51783,
              51775,
              51747,
              51743,
              51786,
              51787,
              51777,
              51793,
              51751,
              51751,
              51791,
              51793,
              51759,
              51794,
              51758,
              51748,
              51774,
              51768,
              51779,
              51786,
              51755,
              51766,
              51747,
              51742,
              51808,
              51769,
              51749,
              51749,
              51772,
              51794,
              51750,
              51733,
              51734,
              51753,
              51764,
              51768,
              51765,
              51789,
              51769,
              51779,
              51777,
              51748,
              51763,
              51767,
              51774,
              51787,
              51801,
              51799,
              51793,
              51802,
              51750,
              51781,
              51789,
              51752,
              51801,
              51784,
              51795,
              51794,
              51752,
              51763,
              51790,
              51786,
              51791,
              51782,
              51807,
              51810,
              51823,
              51807,
              51768,
              51767,
              51761,
              51775,
              51815,
              51754,
              51782,
              51770,
              51758,
              51771,
              51737,
              51746,
              51760,
              51779,
              51758,
              51767,
              51810,
              51784,
              51779,
              51823,
              51811,
              51813,
              51783,
              51777,
              51815,
              51802,
              51804,
              51763,
              51783,
              51773,
              51812,
              51792,
              51788,
              51766,
              51764,
              51765,
              51731,
              51750,
              51750,
              51716,
              51771,
              51730,
              51785,
              51773,
              51791,
              51774,
              51808,
              51759,
              51782,
              51775,
              51799,
              51744,
              51764,
              51771,
              51735,
              51783,
              51768,
              51775,
              51814,
              51795,
              51788,
              51769,
              51777,
              51765,
              51763,
              51776,
              51765,
              51739,
              51774,
              51751,
              51744,
              51743,
              51750,
              51766,
              51802,
              51809,
              51791,
              51788,
              51787,
              51813,
              51777,
              51829,
              51845,
              51815,
              51814,
              51799,
              51780,
              51799,
              51771,
              51751,
              51782,
              51774,
              51782,
              51774,
              51775,
              51811,
              51795,
              51765,
              51778,
              51782,
              51802,
              51775,
              51808,
              51747,
              51800,
              51783,
              51794,
              51801,
              51800,
              51770,
              51749,
              51809,
              51819,
              51813,
              51812,
              51795,
              51775,
              51793,
              51763,
              51760,
              51817,
              51788,
              51772,
              51763,
              51780,
              51775,
              51777,
              51766,
              51766,
              51762,
              51775,
              51755,
              51773,
              51786,
              51747,
              51757,
              51749,
              51745,
              51757,
              51795,
              51803,
              51722,
              51763,
              51756,
              51746,
              51769,
              51757,
              51759,
              51791,
              51766,
              51731,
              51766,
              51754,
              51761,
              51754,
              51799,
              51780,
              51790,
              51783,
              51830,
              51775,
              51767,
              51759,
              51781,
              51808,
              51813,
              51774,
              51787,
              51817,
              51802,
              51802,
              51765,
              51768,
              51779,
              51751,
              51790,
              51775,
              51813,
              51786,
              51798,
              51793,
              51782,
              51759,
              51799,
              51774,
              51757,
              51764,
              51747,
              51749,
              51806,
              51753,
              51727,
              51813,
              51799,
              51786,
              51801,
              51830,
              51758,
              51791,
              51757,
              51731,
              51754,
              51791,
              51757,
              51747,
              51756,
              51765,
              51754,
              51778,
              51759,
              51794,
              51809,
              51759,
              51763,
              51774,
              51775,
              51789,
              51756,
              51736,
              51750,
              51787,
              51738,
              51756,
              51780,
              51745,
              51777,
              51782,
              51775,
              51779,
              51754,
              51754,
              51778,
              51761,
              51789,
              51721,
              51726,
              51733,
              51776,
              51756,
              51769,
              51759,
              51759,
              51769,
              51735,
              51789,
              51780,
              51754,
              51740,
              51796,
              51741,
              51764,
              51773,
              51751,
              51780,
              51787,
              51767,
              51751,
              51795,
              51775,
              51758,
              51759,
              51789,
              51794,
              51761,
              51755,
              51781,
              51750,
              51732,
              51770,
              51746,
              51745,
              51749,
              51772,
              51761,
              51770,
              51766,
              51733,
              51745,
              51751,
              51788,
              51799,
              51789,
              51750,
              51739,
              51774,
              51762,
              51777,
              51773,
              51755,
              51775,
              51782,
              51785,
              51786,
              51774,
              51813,
              51814,
              51815,
              51831,
              51803,
              51799,
              51798,
              51781,
              51793,
              51783,
              51778,
              51781,
              51728,
              51783,
              51796,
              51791,
              51746,
              51776,
              51754,
              51763,
              51779,
              51811,
              51779,
              51795,
              51746,
              51780,
              51745,
              51793,
              51773,
              51807,
              51787,
              51791,
              51812,
              51831,
              51814,
              51822,
              51783,
              51783,
              51799,
              51799,
              51807,
              51805,
              51751,
              51816,
              51786,
              51773,
              51761,
              51760,
              51804,
              51791,
              51766,
              51797,
              51812,
              51792,
              51773,
              51757,
              51772,
              51846,
              51795,
              51814,
              51781,
              51774,
              51770,
              51792,
              51791,
              51782,
              51782,
              51735,
              51753,
              51765,
              51789,
              51761,
              51803,
              51798,
              51799,
              51819,
              51833,
              51819,
              51807,
              51798,
              51769,
              51805,
              51795,
              51782,
              51815,
              51786,
              51831,
              51844,
              51793,
              51814,
              51794,
              51843,
              51826,
              51807,
              51830,
              51819,
              51837,
              51825,
              51815,
              51835,
              51802,
              51815,
              51796,
              51849,
              51811,
              51789,
              51825,
              51806,
              51814,
              51845,
              51794,
              51787,
              51793,
              51799,
              51814,
              51774,
              51742,
              51771,
              51769,
              51759,
              51753,
              51785,
              51802,
              51785,
              51791,
              51764,
              51764,
              51773,
              51809,
              51797,
              51797,
              51789,
              51799,
              51819,
              51824,
              51823,
              51783,
              51809,
              51794,
              51767,
              51806,
              51821,
              51781,
              51795,
              51817,
              51787,
              51773,
              51758,
              51811,
              51797,
              51807,
              51820,
              51790,
              51787,
              51795,
              51807,
              51807,
              51822,
              51784,
              51769,
              51761,
              51788,
              51807,
              51812,
              51803,
              51767,
              51767,
              51743,
              51766,
              51779,
              51787,
              51775,
              51819,
              51791,
              51806,
              51807,
              51774,
              51806,
              51817,
              51745,
              51803,
              51796,
              51771,
              51766,
              51743,
              51785,
              51819,
              51813,
              51807,
              51862,
              51839,
              51811,
              51799,
              51780,
              51798,
              51751,
              51787,
              51839,
              51785,
              51809,
              51801,
              51806,
              51783,
              51771,
              51771,
              51771,
              51761,
              51788,
              51803,
              51794,
              51759,
              51813,
              51863,
              51834,
              51842,
              51813,
              51799,
              51793,
              51799,
              51779,
              51806,
              51813,
              51769,
              51813,
              51797,
              51805,
              51785,
              51791,
              51783,
              51793,
              51771,
              51770,
              51766,
              51757,
              51812,
              51774,
              51781,
              51801,
              51778,
              51775,
              51861,
              51841,
              51785,
              51808,
              51839,
              51787,
              51772,
              51751,
              51765,
              51761,
              51785,
              51799,
              51801,
              51745,
              51755,
              51759,
              51750,
              51743,
              51731,
              51748,
              51799,
              51758,
              51771,
              51775,
              51783,
              51789,
              51768,
              51821,
              51806,
              51795,
              51823,
              51793,
              51791,
              51793,
              51800,
              51807,
              51783,
              51811,
              51805,
              51767,
              51770,
              51837,
              51807,
              51818,
              51829,
              51826,
              51784,
              51798,
              51811,
              51800,
              51794,
              51817,
              51791,
              51846,
              51798,
              51795,
              51776,
              51755,
              51771,
              51747,
              51755,
              51754,
              51767,
              51805,
              51798,
              51763,
              51779,
              51779,
              51805,
              51778,
              51771,
              51779,
              51787,
              51790,
              51770,
              51788,
              51787,
              51778,
              51749,
              51761,
              51767,
              51745,
              51764,
              51765,
              51738,
              51769,
              51777,
              51780,
              51773,
              51754,
              51802,
              51706,
              51733,
              51740,
              51753,
              51763,
              51778,
              51777,
              51746,
              51785,
              51804,
              51780,
              51752,
              51780,
              51819,
              51778,
              51785,
              51786,
              51789,
              51778,
              51719,
              51729,
              51757,
              51766,
              51734,
              51731,
              51767,
              51757,
              51738,
              51794,
              51720,
              51755,
              51770,
              51767,
              51743,
              51763,
              51763,
              51762,
              51789,
              51778,
              51783,
              51766,
              51794,
              51780,
              51770,
              51740,
              51795,
              51785,
              51733,
              51726,
              51747,
              51775,
              51771,
              51754,
              51799,
              51767,
              51746,
              51784,
              51804,
              51751,
              51774,
              51770,
              51770,
              51746,
              51774,
              51780,
              51751,
              51742,
              51737,
              51754,
              51763,
              51755,
              51749,
              51737,
              51724,
              51719,
              51701,
              51729,
              51751,
              51750,
              51768,
              51727,
              51779,
              51743,
              51750,
              51792,
              51765,
              51748,
              51719,
              51737,
              51725,
              51725,
              51769,
              51755,
              51795,
              51764,
              51724,
              51719,
              51731,
              51727,
              51771,
              51720,
              51715,
              51748,
              51731,
              51751,
              51746,
              51774,
              51767,
              51770,
              51778,
              51775,
              51747,
              51717,
              51699,
              51739,
              51733,
              51701,
              51713,
              51725,
              51739,
              51705,
              51721,
              51663,
              51724,
              51708,
              51741,
              51713,
              51769,
              51731,
              51733,
              51731,
              51733,
              51757,
              51743,
              51767,
              51735,
              51759,
              51756,
              51794,
              51781,
              51775,
              51736,
              51727,
              51746,
              51756,
              51763,
              51743,
              51726,
              51743,
              51764,
              51735,
              51781,
              51743,
              51785,
              51761,
              51775,
              51750,
              51777,
              51747,
              51751,
              51761,
              51768,
              51785,
              51763,
              51767,
              51763,
              51786,
              51788,
              51813,
              51790,
              51797,
              51789,
              51793,
              51772,
              51813,
              51810,
              51815,
              51783,
              51778,
              51767,
              51746,
              51782,
              51797,
              51787,
              51776,
              51790,
              51765,
              51775,
              51759,
              51774,
              51760,
              51781,
              51805,
              51767,
              51759,
              51783,
              51767,
              51754,
              51802,
              51781,
              51779,
              51795,
              51807,
              51760,
              51782,
              51767,
              51759,
              51815,
              51787,
              51792,
              51791,
              51802,
              51802,
              51797,
              51753,
              51749,
              51761,
              51743,
              51765,
              51769,
              51739,
              51758,
              51780,
              51805,
              51780,
              51782,
              51767,
              51731,
              51757,
              51792,
              51780,
              51779,
              51774,
              51772,
              51778,
              51761,
              51752,
              51764,
              51772,
              51782,
              51775,
              51742,
              51755,
              51782,
              51749,
              51755,
              51781,
              51767,
              51777,
              51780,
              51759,
              51780,
              51797,
              51771,
              51799,
              51751,
              51783,
              51745,
              51755,
              51743,
              51781,
              51739,
              51766,
              51739,
              51743,
              51751,
              51757,
              51729,
              51746,
              51716,
              51759,
              51737,
              51749,
              51736,
              51739,
              51761,
              51747,
              51754,
              51781,
              51743,
              51749,
              51750,
              51746,
              51768,
              51753,
              51762,
              51767,
              51794,
              51742,
              51759,
              51777,
              51741,
              51737,
              51747,
              51745,
              51755,
              51721,
              51733,
              51789,
              51743,
              51759,
              51746,
              51735,
              51710,
              51758,
              51746,
              51733,
              51749,
              51758,
              51786,
              51733,
              51774,
              51743,
              51751,
              51761,
              51749,
              51747,
              51780,
              51755,
              51743,
              51767,
              51751,
              51782,
              51780,
              51780,
              51744,
              51749,
              51753,
              51735,
              51721,
              51729,
              51754,
              51743,
              51759,
              51763,
              51786,
              51765,
              51775,
              51764,
              51797,
              51783,
              51774,
              51735,
              51745,
              51727,
              51759,
              51759,
              51752,
              51758,
              51769,
              51731,
              51790,
              51781,
              51746,
              51775,
              51742,
              51752,
              51765,
              51783,
              51812,
              51791,
              51766,
              51793,
              51816,
              51779,
              51770,
              51796,
              51791,
              51759,
              51687,
              51706,
              51661,
              51735,
              51755,
              51787,
              51807,
              51775,
              51750,
              51762,
              51759,
              51784,
              51781,
              51839,
              51780,
              51772,
              51739,
              51737,
              51765,
              51763,
              51738,
              51761,
              51725,
              51734,
              51724,
              51715,
              51719,
              51760,
              51759
            ]
          },
          {
            "time": 1505165824819,
            "label": "pam_set",
            "light_intensity": 0,
            "r": 0,
            "g": 0,
            "b": 0,
            "light_intensity_raw": 0,
            "temperature": 27.19,
            "humidity": 39.562,
            "pressure": 991.119,
            "temperature2": 27.38,
            "humidity2": 39.483,
            "pressure2": 990.173,
            "contactless_temp": 26.19,
            "thickness": 0.03,
            "compass_direction": "W",
            "compass": 270,
            "angle": 2.325,
            "angle_direction": "N",
            "pitch": 2.29,
            "roll": -0.41,
            "data_raw": [
              29,
              51849,
              34,
              51823,
              36,
              51735,
              34,
              51795,
              33,
              51780,
              34,
              51763,
              35,
              51809,
              34,
              51782,
              34,
              51799,
              36,
              51770,
              33,
              51825,
              32,
              51798,
              34,
              51811,
              33,
              51795,
              34,
              51765,
              33,
              51774,
              35,
              51757,
              33,
              51812,
              34,
              51767,
              35,
              51807,
              33,
              51775,
              35,
              51791,
              34,
              51789,
              32,
              51762,
              32,
              51792,
              34,
              51781,
              34,
              51802,
              33,
              51810,
              32,
              51766,
              32,
              51773,
              33,
              51782,
              36,
              51759,
              34,
              51766,
              35,
              51771,
              32,
              51766,
              35,
              51763,
              34,
              51786,
              35,
              51777,
              35,
              51751,
              32,
              51782,
              32,
              51832,
              32,
              51771,
              33,
              51787,
              33,
              51782,
              34,
              51783,
              34,
              51809,
              34,
              51783,
              33,
              51790,
              33,
              51780,
              32,
              51779,
              33,
              51775,
              33,
              51734,
              34,
              51765,
              31,
              51779,
              35,
              51775,
              35,
              51804,
              33,
              51853,
              35,
              51810,
              33,
              51800,
              36,
              51786,
              35,
              51761,
              35,
              51781,
              33,
              51761,
              32,
              51735,
              32,
              51804,
              32,
              51807,
              33,
              51764,
              35,
              51733,
              33,
              51783,
              33,
              51801,
              32,
              51786,
              32,
              51782,
              35,
              51732,
              33,
              51755,
              33,
              51771,
              34,
              51775,
              34,
              51786,
              33,
              51811,
              34,
              51801,
              37,
              51722,
              33,
              51750,
              33,
              51768,
              34,
              51776,
              33,
              51807,
              34,
              51813,
              35,
              51719,
              33,
              51778,
              34,
              51804,
              35,
              51728,
              30,
              51751,
              33,
              51761,
              34,
              51767,
              35,
              51786,
              33,
              51747,
              33,
              51787,
              34,
              51837,
              33,
              51782,
              34,
              51789,
              33,
              51797,
              34,
              51755,
              49,
              51773,
              50,
              51782,
              52,
              51785,
              51,
              51787,
              50,
              51803,
              49,
              51782,
              49,
              51761,
              49,
              51831,
              49,
              51791,
              49,
              51806,
              48,
              51781,
              49,
              51831,
              49,
              51773,
              49,
              51746,
              49,
              51752,
              47,
              51762,
              49,
              51791,
              49,
              51817,
              49,
              51791,
              50,
              51777,
              49,
              51754,
              48,
              51802,
              51,
              51774,
              50,
              51755,
              50,
              51755,
              47,
              51772,
              49,
              51735,
              49,
              51735,
              49,
              51742,
              49,
              51767,
              47,
              51749,
              43,
              51757,
              45,
              51790,
              46,
              51791,
              45,
              51803,
              48,
              51745,
              45,
              51779,
              45,
              51811,
              49,
              51772,
              46,
              51753,
              44,
              51775,
              49,
              51751,
              46,
              51764,
              47,
              51787,
              47,
              51829,
              45,
              51778,
              44,
              51805,
              45,
              51786,
              43,
              51775,
              44,
              51746,
              43,
              51807,
              45,
              51802,
              45,
              51803,
              44,
              51789,
              43,
              51775,
              46,
              51810,
              44,
              51826,
              48,
              51782,
              45,
              51807,
              45,
              51819,
              40,
              51769,
              43,
              51831,
              40,
              51811,
              39,
              51799,
              42,
              51798,
              42,
              51750,
              40,
              51782,
              43,
              51826,
              40,
              51814,
              43,
              51811,
              41,
              51787,
              42,
              51735,
              41,
              51786,
              42,
              51802,
              41,
              51811,
              39,
              51785,
              40,
              51795,
              40,
              51768,
              39,
              51754,
              41,
              51811,
              40,
              51814,
              41,
              51750,
              40,
              51792,
              40,
              51779,
              40,
              51741,
              39,
              51753,
              41,
              51792,
              39,
              51785,
              41,
              51798,
              42,
              51767,
              27,
              51772,
              28,
              51761,
              27,
              51739,
              32,
              51771,
              28,
              51793,
              34,
              51766,
              29,
              51767,
              31,
              51791,
              30,
              51787,
              29,
              51799,
              33,
              51774,
              31,
              51790,
              30,
              51813,
              31,
              51803,
              32,
              51751,
              48,
              51781,
              31,
              51783,
              29,
              51789,
              30,
              51787,
              32,
              51790,
              30,
              51774,
              30,
              51761,
              29,
              51747,
              29,
              51765,
              31,
              51830,
              30,
              51783,
              26,
              51783,
              29,
              51791,
              29,
              51770,
              31,
              51812,
              31,
              51807,
              51,
              51791,
              51,
              51774,
              51,
              51845,
              50,
              51787,
              50,
              51801,
              50,
              51787,
              51,
              51840,
              53,
              51850,
              50,
              51807,
              52,
              51779,
              51,
              51807,
              51,
              51818,
              49,
              51759,
              50,
              51791,
              53,
              51839,
              53,
              51797,
              51,
              51782,
              50,
              51814,
              49,
              51809,
              49,
              51808,
              51,
              51824,
              51,
              51811,
              52,
              51770,
              50,
              51795,
              51,
              51753,
              48,
              51763,
              49,
              51773,
              51,
              51815,
              48,
              51787,
              43,
              51778,
              40,
              51751,
              44,
              51771,
              42,
              51831,
              43,
              51822,
              45,
              51774,
              45,
              51780,
              43,
              51750,
              47,
              51845,
              45,
              51794,
              46,
              51792,
              43,
              51771,
              43,
              51783,
              43,
              51755,
              43,
              51752,
              40,
              51804,
              38,
              51783,
              39,
              51795,
              38,
              51763,
              38,
              51704,
              39,
              51796,
              41,
              51774,
              40,
              51768,
              41,
              51760,
              43,
              51794,
              40,
              51772,
              40,
              51752,
              39,
              51769,
              41,
              51783,
              38,
              51751,
              36,
              51772,
              38,
              51734,
              37,
              51761,
              38,
              51755,
              37,
              51799,
              37,
              51749,
              37,
              51778,
              37,
              51775,
              39,
              51796,
              38,
              51769,
              36,
              51759,
              37,
              51767,
              37,
              51797,
              38,
              51795,
              36,
              51787,
              33,
              51783,
              32,
              51789,
              32,
              51790,
              32,
              51768,
              34,
              51779,
              34,
              51727,
              33,
              51759,
              34,
              51790,
              34,
              51768,
              33,
              51777,
              33,
              51771,
              35,
              51809,
              31,
              51807,
              35,
              51755,
              35,
              51814
            ]
          },
          {
            "time": 1505165830989,
            "label": "",
            "light_intensity": 18.942,
            "r": 19,
            "g": 8,
            "b": 5,
            "light_intensity_raw": 32,
            "temperature": 27.19,
            "humidity": 39.553,
            "pressure": 991.123,
            "temperature2": 27.39,
            "humidity2": 39.463,
            "pressure2": 990.225,
            "contactless_temp": 26.15,
            "thickness": 0.03,
            "compass_direction": "W",
            "compass": 270,
            "angle": 2.304,
            "angle_direction": "N",
            "pitch": 2.3,
            "roll": -0.18,
            "data_raw": [

            ]
          },
          {
            "time": 1505165831307,
            "label": "",
            "light_intensity": 18.28,
            "r": 17,
            "g": 8,
            "b": 5,
            "light_intensity_raw": 30,
            "temperature": 27.2,
            "humidity": 39.542,
            "pressure": 991.099,
            "temperature2": 27.39,
            "humidity2": 39.463,
            "pressure2": 990.218,
            "contactless_temp": 26.19,
            "thickness": 0.03,
            "compass_direction": "W",
            "compass": 270,
            "angle": 2.46,
            "angle_direction": "N",
            "pitch": 2.45,
            "roll": -0.18,
            "data_raw": [

            ]
          },
          {
            "time": 1505165831625,
            "label": "",
            "light_intensity": 18.28,
            "r": 17,
            "g": 8,
            "b": 5,
            "light_intensity_raw": 30,
            "temperature": 27.19,
            "humidity": 39.553,
            "pressure": 991.113,
            "temperature2": 27.39,
            "humidity2": 39.463,
            "pressure2": 990.19,
            "contactless_temp": 26.11,
            "thickness": 0.03,
            "compass_direction": "W",
            "compass": 270,
            "angle": 2.053,
            "angle_direction": "N",
            "pitch": 2.05,
            "roll": -0.18,
            "data_raw": [

            ]
          },
          {
            "time": 1505165831944,
            "label": "spad_set",
            "detector_read1": 6695,
            "detector_read2": 65535,
            "light_intensity": 17.95,
            "r": 16,
            "g": 8,
            "b": 5,
            "light_intensity_raw": 29,
            "temperature": 27.19,
            "humidity": 39.553,
            "pressure": 991.102,
            "temperature2": 27.39,
            "humidity2": 39.463,
            "pressure2": 990.179,
            "contactless_temp": 26.19,
            "thickness": 0.03,
            "compass_direction": "W",
            "compass": 270,
            "angle": 1.915,
            "angle_direction": "N",
            "pitch": 1.8,
            "roll": -0.64,
            "recall": {
              "time": 1505165832233,
              "colorcal_blank1[1]": 16540.5,
              "colorcal_blank1[2]": 27504,
              "colorcal_blank1[3]": 29952,
              "colorcal_blank1[4]": 37125.5,
              "colorcal_blank1[6]": 39609.5,
              "colorcal_blank1[8]": 39662,
              "colorcal_blank1[9]": 30323,
              "colorcal_blank1[10]": 38384.5,
              "colorcal_blank2[1]": 21346.5,
              "colorcal_blank2[2]": 19350,
              "colorcal_blank2[3]": 22990.5,
              "colorcal_blank2[4]": 19232.5,
              "colorcal_blank2[6]": 16765.5,
              "colorcal_blank2[8]": 18623,
              "colorcal_blank2[9]": 18288.5,
              "colorcal_blank2[10]": 16169,
              "colorcal_blank3[1]": 18712.5,
              "colorcal_blank3[2]": 10274.5,
              "colorcal_blank3[3]": 20166.5,
              "colorcal_blank3[4]": 14065,
              "colorcal_blank3[6]": 5995.5,
              "colorcal_blank3[8]": 6848,
              "colorcal_blank3[9]": 5393.5,
              "colorcal_blank3[10]": 5898.5,
              "colorcal_intensity1_slope[2]": 2.356,
              "colorcal_intensity1_yint[2]": 1.3,
              "colorcal_intensity2_slope[2]": 2.387,
              "colorcal_intensity2_yint[2]": 3.3,
              "colorcal_intensity3_slope[2]": 2.577,
              "colorcal_intensity3_yint[2]": -17.2,
              "ir_baseline_slope[5]": 11173,
              "ir_baseline_yint[5]": 17443.5,
              "ir_baseline_slope[3]": 636,
              "ir_baseline_yint[3]": 835
            },
            "data_raw": [
              19826,
              16870,
              17019,
              17010,
              16956,
              17056,
              17005,
              16996,
              17103,
              16956,
              32093,
              26901,
              26860,
              26849,
              26846,
              26839,
              26846,
              26842,
              26843,
              26843,
              54355,
              28907,
              28666,
              28620,
              28616,
              28614,
              28612,
              28601,
              28613,
              28603,
              8309,
              35611,
              35911,
              35926,
              35936,
              35945,
              35943,
              35955,
              35951,
              35909,
              65535,
              39303,
              38460,
              38379,
              38327,
              38293,
              38278,
              38269,
              38264,
              38284,
              33129,
              37266,
              37295,
              37306,
              37309,
              37277,
              37285,
              37301,
              37302,
              37297,
              47097,
              31367,
              31171,
              31150,
              31141,
              31143,
              31141,
              31135,
              31133,
              31129,
              46478,
              36006,
              35878,
              35863,
              35860,
              35851,
              35852,
              35852,
              35843,
              35847,
              63496,
              61175,
              61098,
              61135,
              61105,
              61119,
              61124,
              61201,
              61135,
              61111,
              65189,
              63195,
              63127,
              63078,
              63082,
              63034,
              63102,
              63079,
              63019,
              63155,
              64881,
              63004,
              61938,
              64070,
              63079,
              61792,
              65152,
              61918,
              61870,
              61762,
              65235,
              61683,
              61441,
              61464,
              61473,
              61461,
              61423,
              61479,
              61493,
              61423,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              54394,
              52514,
              52519,
              52630,
              52525,
              52577,
              52543,
              52531,
              52524,
              52525,
              55454,
              54440,
              54453,
              54439,
              54451,
              54449,
              54443,
              54447,
              54444,
              54443,
              53850,
              51084,
              51048,
              51045,
              51029,
              51075,
              51079,
              51076,
              51071,
              51076,
              53863,
              54439,
              54393,
              54417,
              54346,
              54385,
              54394,
              54374,
              54406,
              54415,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535
            ]
          }
        ],
        "data_raw": [

        ]
      }
    ]
  ],
  "app_os": "darwin-16.7.0",
  "app_name": "PhotosynQ",
  "app_version": "0.0.25",
  "app_device": "x64",
  "location": false,
  "time_offset": "America/Detroit"
}
Dave in cap img 4615
Created by

David M. Kramer


Protocol connections:
0
Latest Update:
Sep 2017