RIDES_light_potential_ECS s DMK


Building a new RIDES_light_potential macro with integrated ECS. The concept for the protocol came out of discussions between myself and Gonzalo Estavillo during a PhotosynQ workshop (and subsequent beers). The idea is: what would be the instantaneous increase in LEF if the light intensity suddently increased to a certain point near saturation. To estmate this value, we started with RISES1_3_1 but in additiopn to the steady-state (ambient) light Fs valuies taken before the saturation pulse, we added a second, ~10-s illumination with 1000 uE. We assumed that the 10s was not sufficient change NPQ by a substantial amount, so that the Fv/FM' and NPQ parameters were taken with the sole saturation pulses. In this version, I added ECS measurements into the PAM fluorescence and P700 traces. The idea is to determine what the impact of suddenlyy increasing light on the pmf, which over the short interval should be moslty in the delta.PSI fraction. This is relevant to recent work in our lab on the FRIP (field-Recombination-Induced Photodamage), see (https://elifesciences.org/articles/16921 and tb.royalsocietypublishing.org/content/372/1730/20160381). Note: Special thanks to Sebastian Kuhlgert for the curve fitting routines! Some outputs are derived by fitting decay curves, e.g. the P700 and ECS data. The previous procedure, written by Kevin Bi and Greg Austic, though useful frequently failed. Fortunately, Sebastian added a really important new feature that allows for very flexible fitting that almost never fails.
/**
 * Macro for data evaluation of RIDES1_light_potential 
 * data on PhotosynQ.org
 * by: David M. Kramer
 * created: 2017-05-09 @ 18:15:27
 * 
 * The concept for the protocol came out of discussions between myself
 * and Gonzalo Estavillo during a PhotosynQ workshop (and subsequent 
 * beers). The idea is: what would be the instantaneous increase in
 * LEF if the light intensity suddently increased to a certain point
 * near saturation. To estmate this value, we started with RISES1_3_1
 * but in additiopn to the steady-state (ambient) light Fs valuies
 * taken before the saturation pulse, we added a second, ~10-s
 * illumination with 1000 uE. We assumed that the 10s was not sufficient
 * change NPQ by a substantial amount, so that the Fv/FM' and NPQ
 * parameters were taken with the sole saturation pulses.

/* Note: Special thanks to Sebastian Kuhlgert for the curve fitting routines!
*  
* 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 
* nonlinear curve fitting. 
*/

// Define the output object here
var output = {}; //dictionary to hold results
n_sets=json.set.length;
//output.n_sets=json.set.length;
var details=1;

// Define the protocol set numbers for each data set
// NOTE: these will be overwritten by the labels!

var ECS_LEFdset;
var P700_DIRK_set;
var PAM_set;  //the json set 8 contains the PAM and P700 traces
var SPAD_set;
var calib_set;

//Find the appropriate traces (or sub-protocols in the protocol set)
// using the labels provided in the label command

var labels=[]; //holds the labels found in the data sets

for (var i=1; i < n_sets; i++) {
  var temp=json.set[i].label; //store the label for sup-protocol n in temp
  labels.push(temp);

  if (temp=="DIRK_ECS"){ //if the label is 'DIRK_ECS' it is the ECS_LEFs trace 
  	//output.tt1=temp;
    ECS_LEFdset=i;
  }
  if (temp=="DIRK_P700"){ // if the label is 'DIRK_P700' ut us tge fluorescence DIRK trace 
  	//output.tt2=temp;
    var P700_DIRK_set=i;
  }
  if (temp=="PAM"){ //if the label is 'PAM' is is the trace with tboth the 
    				//fluorescence PAM and the P700 traces
  	//output.tt3=temp;
    PAM_set=i;
  }
  if (temp=="SPAD"){ //if the label is 'SPAD' it contains the SPAD traces
  	//output.tt4=temp;
    SPAD_set=i;
    calib_set=i;
  }
}

// Next DEFINE THE TRACES USEING LABEL INFO

// 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...

var length_of_PAM= json.set[PAM_set].data_raw.length;
//output.length_of_PAM=length_of_PAM;

var PAM_DATA= [];//take every 3rd point, starting with the first (i.e. point 0) 
				//for trace PSI_data
for (var i=0; i<length_of_PAM; i=i+3){
	PAM_DATA.push(json.set[PAM_set].data_raw[i]);
}
output.PAM_DATA=PAM_DATA;


var PSI_data=[]; //take every 3rd point, starting with the second (i.e. point 1) 
				//for trace PSI_data
for (var i=1; i<length_of_PAM+1; i=i+3){
	PSI_data.push(json.set[PAM_set].data_raw[i]);
}
output.PSI_data=PSI_data; //.slice(0,290);



var ECS_PAM_data=[]; //take every 3rd point, starting with the second (i.e. point 1) 
				//for trace PSI_data
for (var i=2; i<length_of_PAM+1; i=i+3){
	ECS_PAM_data.push(json.set[PAM_set].data_raw[i]);
}
output.ECS_PAM_data=ECS_PAM_data; //.slice(0,290);

//json.set[PAM_set].data_raw=PAM_DATA; //replace the old values wiht temp1

/*
//the following is a snippet of code for smoothing...
//I did not use it here, but it might be useful
var PSI_smoothed=[];
var smoothbox=10;
for (i=0; i<smoothbox;i++){
  PSI_smoothed.push(PSI_data[i]);
}

for (i=smoothbox; i<PSI_data.length-smoothbox;i=i+1){
  var temp_sum=0;
  
  for (var j=0; j<smoothbox;j++){
  		temp_sum=temp_sum+PSI_data[i+j];
	}

  PSI_smoothed.push(temp_sum/smoothbox);
  
}
output.PSI_smoothed=PSI_smoothed;

*/

// PAM fluorescence traces
//DEFINE THE STARTING AND ENDING POINTS TO USE FOR THE VARIOUS 
//PARAMETERS USED IN THE CALCULATIONS

// The Fs paramter for ambient light intensity
var Fs_begin=45; //the first point to use for Fs 
var Fs_end =90; //the end point to use  for Fs

// The Fs paramter for INCREASED light intensity
var high_Fs_begin=130; //the first point to use for Fs 
var high_Fs_end =200; //the end point to use  for Fs

// We will use the SAME Fv/FM' values for the ambient and
// increased light intensities.

//The Fv/FM' results will be calculated using the 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 =201; //the first point to use for the FIRST Fmp
var Fm_1_end =230; //the end point to use  for the FIRST Fmp
var Fm_2_begin =231; //the first point to use for the FIRST Fmp
var Fm_2_end =245; //the end point to use  for the FIRST Fmp
var Fm_3_begin =246; //the first point to use for the FIRST Fmp
var Fm_3_end =260; //the end point to use  for the FIRST Fmp
var Fm_4_begin =261; //the first point to use for the FIRST Fmp
var Fm_4_end =275; //the end point to use  for the FIRST Fmp
var Fm_5_begin =276; //the first point to use for the FIRST Fmp
var Fm_5_end =290; //the end point to use  for the FIRST Fmp


//START AND STOP FOR F0'
var FoPrime_begin =507; //the first point to use for Fs 
var FoPrime_end =519; //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];


//************************************************************************************************
  //Calculate the PAM fluorescence paramters
  
  //output.data_raw_PAM = json.set[PAM_set].data_raw.slice(0,310);
  data=PAM_DATA; //.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 = MathROUND(MathMEAN(data.slice(Fs_begin,Fs_end)),4) - 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 Fs after changing to higher illumination conditions
var high_Fs = MathROUND(MathMEAN(data.slice(high_Fs_begin,high_Fs_end)) - baseline,4); // take only the first 4 values in the Fs range, excluding the very first
var high_Fs_std = MathSTDEV(data.slice(high_Fs_begin,high_Fs_end)); // create standard deviation for this value for error checking



//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();
//output.FoPrime_values=FoPrime_values;
//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;

//output.fvfm_MPF=fvfm_MPF;
//output.fvfm_noMPF=fvfm_noMPF;

//output.regb=reg.b;
//output.FoPrime=FoPrime;
// 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;
//output.npqt_noMPF=npqt_noMPF;

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;

var light_intensity=json.set[ECS_LEFdset].light_intensity;
output.light_intensity= MathROUND(light_intensity,1); 
output.O="________________________PSII________________________________";
var Phi2=fvfm_MPF;
//output.Phi2=Phi2;
output.Phi2=MathROUND(Phi2,4);

var high_fvfm_noMPF = (AFmP-high_Fs)/AFmP;
var high_fvfm_MPF = (reg.b-high_Fs)/reg.b;

var high_Phi2_MPF = MathROUND(high_fvfm_MPF,4);
output.high_Phi2=high_Phi2_MPF;
var high_Phi2_no_MPF = MathROUND(high_fvfm_noMPF,3);
//output.high_Phi2_no_MPF=high_Phi2_no_MPF;




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

  var LEF=MathROUND((Phi2  * 0.45 * light_intensity),1);
  output.LEF= LEF; //MathROUND((fvfm  * 0.45 * light_intensity),3);

	output.Phi2_high=high_Phi2_MPF;

	var LEF_high=MathROUND((high_Phi2_MPF  * 0.45 * 1000),1); //assume that high light is 1000

  output.LEF_high= LEF_high; //MathROUND((3  * 0.45 * light_intensity),3);

  output.delta_LEF= MathROUND(LEF_high-LEF, 1); //MathROUND((3  * 0.45 * light_intensity),3);
	output.Fs=Fs;
	output["Fs_high/Fs"]=MathROUND(high_Fs/Fs);
// output.P="________________________NPQ________________________________";

output.NPQt=MathROUND(npqt_MPF,2);
output.qL=MathROUND(qL_MPF,2);
output.PhiNO=MathROUND(PhiNO_MPF,2);
output.PhiNPQ=MathROUND(PhiNPQ_MPF,2);



//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);
// output.A="________________________FRIP______________________________";

var FRIP_data_absorbance=[];
var ECS_PAM_data_dark=MathMEAN(ECS_PAM_data.slice(20.50));
for (var i=0; i<ECS_PAM_data.length; i++){
         FRIP_data_absorbance.push(MathLOG(ECS_PAM_data_dark/ECS_PAM_data[i]));
}

output.FRIP_data_absorbance=FRIP_data_absorbance;
var SPIKE_low_to_high = MathROUND(1000*MathMAX(FRIP_data_absorbance.slice(100,160)),3);
output.SPIKE_low_to_high=SPIKE_low_to_high;

var SPIKE_dark_to_sat = MathROUND(1000*MathMAX(FRIP_data_absorbance.slice(500,540)) - MathMIN(FRIP_data_absorbance.slice(500,540)),3);
output.SPIKE_dark_to_sat=SPIKE_dark_to_sat;

                               
output.R="_________________________PSI_______________________________";

var PSI_ss_beg=1; //beginning of the trace for P700 steady-state
var PSI_ss_end=100; //end of the trace for P700 steady-state

var PSI_high_beg=101;//beginning of the trace for P700 at elevated light
var PSI_high_end=199; //end of the trace for P700 at elevated light

var PSI_sat1_beg=200; //beginning of the trace for P700 first saturation pulse
var PSI_sat1_end=235; //end of the trace for P700 first saturation pulse
var PSI_dark_beg=298; //beginning of the trace for P700 steady-state
var PSI_dark_end=300; //end of the trace for P700 steady-state
var PSI_sat2_beg=530; //beginning of the trace for P700 second saturation pulse
var PSI_sat2_end=570; //end of the trace for P700 second saturation pulse

 //ANALYZE THE PHI-PSI DATA  

 var PSI_trace_beg=0; //310;
 var PSI_trace_end=PSI_data.length; //615;
 var PSI_trace_length=PSI_trace_end-PSI_trace_beg;
 
// PSI_dark_beg=0;
 
 //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));
  output.PSI_dark_raw=PSI_dark_raw;

var PSI_data_absorbance=[];
 
 for (var i=0; i<PSI_data.length; i++){
         PSI_data_absorbance.push(MathLOG(PSI_dark_raw/PSI_data[i]));
   }
output.PSI_data_absorbance=PSI_data_absorbance;
   var PSI_dark=1000*MathMEAN(PSI_data_absorbance.slice(PSI_dark_beg,PSI_dark_end));
   var PSI_ss=1000*MathMEAN(PSI_data_absorbance.slice(PSI_ss_beg,PSI_ss_end));
   var PSI_high=1000*MathMEAN(PSI_data_absorbance.slice(PSI_high_beg,PSI_high_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_ox_high=PSI_high/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_ox_high =MathROUND(PSI_ox_high, 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;
 

//ECS trace analysis:

var DIRK_ECS = GetProtocolByLabel( "DIRK_ECS", json );

ECS_averaged_trace=DIRK_ECS.data_raw;
output.ECS_averaged_trace=ECS_averaged_trace;
// return output;

// 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.S="________________________ECS_DIRK_______________________________";

// 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 constant

var time_per_point=1.5; //enter 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){}


//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 DIRK_P700 = GetProtocolByLabel( "DIRK_P700", json );

P700_DIRK_averaged_trace=DIRK_P700.data_raw;
output.P700_DIRK_averaged_trace=P700_DIRK_averaged_trace;
  

// 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));
//   }
  
// 	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);
//     }

//replace the artifactual data at positon 120 with the prior value
//the point has no real value in the calculation, so this is just 
//a way to better visualize the results.

// P700_DIRK_averaged_trace[100]=(P700_DIRK_averaged_trace[99]+P700_DIRK_averaged_trace[101])/2; 
// P700_DIRK_averaged_trace[120]=(P700_DIRK_averaged_trace[119]+P700_DIRK_averaged_trace[121])/2; 

// output.T="________________________P700_DIRK_______________________________";

// 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 P700 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, 4);
}
catch(e){}

// Display the DIRKf results and calculate LEFd
// output.U="______________________LEF_DIRK_____________________________";

  output.LEFd_trace = LEFd_trace;

  // Display of PAM result and calculation of the fluorescence parameters


// output.V="__________________ENVIRONMENTAL_________________________";
/****************OUTPUT VALUES FROM MACRO *******************/


// 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";
}
  
// 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_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_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=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 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);


// output.W="___________________ABSORBANCE_&_SPAD________________________";

// 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.X="___________________LEAF_THICKNESS_______________________";

//output.thick2=json.set[ECS_LEFdset].thickness;
//output.thick3=json.set[PAM_set].thickness;
output.leaf_thickness=json.set[calib_set].thickness;

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

return output;
{
  "time": 1545977340308,
  "device_name": "MultispeQ",
  "device_version": "2",
  "device_id": "32:31:36:b3",
  "device_battery": 35,
  "device_firmware": 2.0056,
  "sample": [
    [
      {
        "time": 1545977340308,
        "v_arrays": [
          [
            "2000"
          ]
        ],
        "protocol_id": 1,
        "set": [
          {
            "time": 1545977340339,
            "label": "no_leaf_baseline",
            "light_intensity": 8.292,
            "r": 39.2,
            "g": 19.8,
            "b": 16.8,
            "w": 57.8,
            "temperature": 31.75,
            "humidity": 56.714,
            "pressure": 927.28,
            "temperature2": 31.62,
            "humidity2": 55.341,
            "pressure2": 927.347,
            "contactless_temp": 28.39,
            "compass_direction": "S ",
            "compass": 199.75,
            "angle": 12.867,
            "pitch": 12.74,
            "roll": 1.84,
            "data_raw": [

            ]
          },
          {
            "time": 1545977340944,
            "label": "DIRK_ECS",
            "autogain": [
              [
                1,
                3,
                12,
                1724,
                24863
              ],
              [
                8,
                1,
                80,
                241,
                32181
              ]
            ],
            "light_intensity": 9.006,
            "r": 38.9,
            "g": 19.3,
            "b": 16,
            "w": 58.8,
            "temperature": 31.758,
            "humidity": 56.866,
            "pressure": 927.292,
            "temperature2": 31.625,
            "humidity2": 55.354,
            "pressure2": 927.368,
            "contactless_temp": 29.72,
            "thickness": 2404143.75,
            "data_raw": [
              41240,
              41266,
              41270,
              41270,
              41268,
              41268,
              41271,
              41269,
              41267,
              41270,
              41266,
              41271,
              41266,
              41270,
              41268,
              41270,
              41268,
              41269,
              41269,
              41266,
              41269,
              41267,
              41267,
              41264,
              41268,
              41266,
              41268,
              41268,
              41264,
              41265,
              41269,
              41266,
              41268,
              41269,
              41266,
              41267,
              41268,
              41272,
              41270,
              41268,
              41269,
              41269,
              41271,
              41265,
              41272,
              41270,
              41267,
              41270,
              41269,
              41269,
              41270,
              41269,
              41272,
              41271,
              41268,
              41266,
              41270,
              41271,
              41270,
              41269,
              41267,
              41270,
              41272,
              41268,
              41270,
              41269,
              41273,
              41269,
              41269,
              41270,
              41273,
              41267,
              41271,
              41273,
              41271,
              41272,
              41271,
              41273,
              41271,
              41270,
              41272,
              41271,
              41270,
              41273,
              41268,
              41271,
              41269,
              41270,
              41272,
              41271,
              41270,
              41272,
              41272,
              41270,
              41269,
              41269,
              41270,
              41271,
              41269,
              41271,
              41271,
              41275,
              41278,
              41278,
              41281,
              41285,
              41287,
              41285,
              41283,
              41286,
              41289,
              41289,
              41287,
              41290,
              41293,
              41291,
              41292,
              41294,
              41296,
              41295,
              41294,
              41294,
              41295,
              41294,
              41293,
              41297,
              41294,
              41293,
              41294,
              41296,
              41297,
              41295,
              41290,
              41283,
              41286,
              41285,
              41280,
              41284,
              41282,
              41281,
              41280,
              41281,
              41278,
              41277,
              41283,
              41278,
              41278,
              41278,
              41277,
              41280,
              41279,
              41280,
              41278,
              41281,
              41277,
              41278,
              41277,
              41280,
              41278,
              41277,
              41274,
              41279,
              41279,
              41276,
              41279,
              41278,
              41274,
              41279,
              41277,
              41277,
              41277,
              41274,
              41276,
              41278,
              41276,
              41275,
              41274,
              41279,
              41278,
              41279,
              41275,
              41276,
              41278,
              41277,
              41277,
              41278,
              41279,
              41279,
              41278,
              41275,
              41279,
              41276,
              41277,
              41278,
              41276,
              41273,
              41277,
              41278,
              41280,
              41278,
              41279,
              41275,
              41278,
              41277,
              41281,
              41278,
              41280,
              41278,
              41278,
              41277,
              41278,
              41279,
              41280,
              41276,
              41280,
              41280,
              41278,
              41277,
              41277,
              41276,
              41279,
              41276,
              41278,
              41277,
              41275,
              41279,
              41279,
              41277,
              41278,
              41276
            ]
          },
          {
            "time": 1545977353678,
            "label": "DIRK_P700",
            "data_raw": [
              63935,
              63955,
              63883,
              63836,
              63802,
              63805,
              63786,
              63791,
              63794,
              63793,
              63789,
              63798,
              63798,
              63769,
              63784,
              63792,
              63812,
              63783,
              63791,
              63809,
              63795,
              63790,
              63794,
              63809,
              63790,
              63811,
              63796,
              63795,
              63781,
              63812,
              63784,
              63808,
              63802,
              63805,
              63791,
              63822,
              63827,
              63789,
              63785,
              63818,
              63796,
              63802,
              63806,
              63802,
              63813,
              63786,
              63828,
              63821,
              63808,
              63820,
              63806,
              63821,
              63812,
              63833,
              63817,
              63817,
              63810,
              63806,
              63814,
              63812,
              63778,
              63780,
              63813,
              63844,
              63799,
              63800,
              63828,
              63828,
              63799,
              63818,
              63814,
              63810,
              63814,
              63820,
              63803,
              63813,
              63824,
              63836,
              63839,
              63840,
              63817,
              63837,
              63842,
              63822,
              63841,
              63837,
              63835,
              63823,
              63807,
              63829,
              63826,
              63801,
              63825,
              63827,
              63842,
              63802,
              63841,
              63836,
              63824,
              63851,
              63829,
              63808,
              63818,
              63840,
              63847,
              63815,
              63824,
              63849,
              63840,
              63817,
              63818,
              63839,
              63852,
              63810,
              63820,
              63821,
              63837,
              63823,
              63861,
              63811,
              63792,
              63854,
              63801,
              63801,
              63830,
              63837,
              63794,
              63839,
              63843,
              63816,
              63847,
              63856,
              63841,
              63832,
              63824,
              63842,
              63825,
              63852,
              63833,
              63846,
              63846,
              63814,
              63869,
              63855,
              63834,
              63833,
              63845,
              63850,
              63854,
              63840,
              63834,
              63835,
              63843,
              63837,
              63860,
              63835,
              63858,
              63854,
              63854,
              63857,
              63852,
              63863,
              63871,
              63838,
              63864,
              63850,
              63876,
              63843,
              63838,
              63854,
              63860,
              63855,
              63852,
              63846,
              63865,
              63871,
              63856,
              63872,
              63854,
              63831,
              63880,
              63855,
              63834,
              63840,
              63850,
              63848,
              63865,
              63857,
              63838,
              63870,
              63884,
              63850,
              63849,
              63868,
              63879,
              63861,
              63843,
              63870,
              63865,
              63878,
              63850,
              63884,
              63877,
              63884,
              63868,
              63870,
              63850,
              63868,
              63849,
              63851,
              63864,
              63855,
              63871,
              63868,
              63865,
              63875,
              63869,
              63882,
              63875,
              63860
            ]
          },
          {
            "time": 1545977359737,
            "label": "PAM",
            "light_intensity": 9,
            "r": 38.9,
            "g": 19.3,
            "b": 16,
            "w": 58.8,
            "temperature": 31.77,
            "humidity": 57.037,
            "pressure": 927.288,
            "temperature2": 31.62,
            "humidity2": 55.372,
            "pressure2": 927.344,
            "contactless_temp": 30.83,
            "thickness": 2405111.5,
            "compass_direction": "S ",
            "compass": 197.44,
            "angle": 12.849,
            "pitch": 12.68,
            "roll": 2.07,
            "data_raw": [
              1248,
              64027,
              41313,
              1367,
              64015,
              41301,
              1425,
              64013,
              41295,
              1456,
              64005,
              41294,
              1481,
              64007,
              41283,
              1501,
              64013,
              41291,
              1517,
              64009,
              41290,
              1534,
              64027,
              41277,
              1547,
              64037,
              41291,
              1552,
              64017,
              41293,
              1567,
              64033,
              41279,
              1571,
              64015,
              41287,
              1579,
              64023,
              41287,
              1585,
              64009,
              41294,
              1594,
              64005,
              41291,
              1600,
              64021,
              41279,
              1607,
              64015,
              41291,
              1613,
              64021,
              41291,
              1619,
              64025,
              41291,
              1623,
              64021,
              41293,
              1635,
              64024,
              41286,
              1634,
              64031,
              41287,
              1638,
              64019,
              41291,
              1643,
              64025,
              41291,
              1648,
              64029,
              41295,
              1654,
              64017,
              41298,
              1657,
              64025,
              41290,
              1664,
              64028,
              41301,
              1667,
              64035,
              41293,
              1669,
              64031,
              41291,
              1675,
              64021,
              41292,
              1677,
              64037,
              41283,
              1681,
              64037,
              41295,
              1684,
              64024,
              41293,
              1692,
              64029,
              41294,
              1693,
              64029,
              41287,
              1695,
              64017,
              41299,
              1701,
              64021,
              41299,
              1703,
              64017,
              41294,
              1707,
              64025,
              41291,
              1707,
              64029,
              41299,
              1711,
              64020,
              41295,
              1713,
              64037,
              41287,
              1717,
              64027,
              41295,
              1720,
              64029,
              41299,
              1728,
              64009,
              41296,
              1728,
              64035,
              41310,
              1728,
              64011,
              41299,
              1733,
              64002,
              41299,
              1733,
              64025,
              41299,
              1737,
              64037,
              41297,
              1739,
              64035,
              41295,
              1740,
              64020,
              41302,
              1744,
              64037,
              41299,
              1746,
              64029,
              41305,
              1748,
              64035,
              41299,
              1753,
              64025,
              41313,
              1751,
              64027,
              41299,
              1752,
              64023,
              41302,
              1756,
              64025,
              41299,
              1757,
              64019,
              41306,
              1762,
              64029,
              41299,
              1765,
              64027,
              41311,
              1764,
              64037,
              41303,
              1767,
              64037,
              41303,
              1766,
              64028,
              41303,
              1770,
              64029,
              41305,
              1771,
              64033,
              41295,
              1773,
              64037,
              41295,
              1775,
              64033,
              41307,
              1773,
              64025,
              41303,
              1775,
              64023,
              41302,
              1778,
              64023,
              41306,
              1779,
              64035,
              41311,
              1778,
              64025,
              41309,
              1781,
              64020,
              41311,
              1783,
              64037,
              41307,
              1785,
              64020,
              41303,
              1783,
              64017,
              41299,
              1789,
              64025,
              41305,
              1788,
              64027,
              41312,
              1788,
              64037,
              41309,
              1793,
              64037,
              41299,
              1790,
              64031,
              41309,
              1797,
              64035,
              41303,
              1789,
              64041,
              41305,
              1795,
              64035,
              41304,
              1793,
              64029,
              41299,
              1795,
              64040,
              41307,
              1796,
              64037,
              41307,
              1797,
              64037,
              41304,
              1798,
              64033,
              41307,
              1797,
              64033,
              41301,
              1795,
              64033,
              41310,
              1799,
              64017,
              41307,
              1799,
              64019,
              41301,
              1804,
              64028,
              41308,
              1800,
              64025,
              41307,
              1803,
              64041,
              41305,
              1803,
              64026,
              41299,
              3565,
              64025,
              41137,
              4055,
              64036,
              41133,
              4127,
              64035,
              41135,
              4188,
              64037,
              41139,
              4242,
              64041,
              41143,
              4282,
              64037,
              41148,
              4311,
              64033,
              41151,
              4336,
              64039,
              41167,
              4353,
              64033,
              41177,
              4369,
              64033,
              41174,
              4386,
              64040,
              41172,
              4393,
              64029,
              41169,
              4403,
              64035,
              41179,
              4413,
              64033,
              41169,
              4421,
              64037,
              41165,
              4429,
              64031,
              41161,
              4435,
              64035,
              41161,
              4439,
              64029,
              41158,
              4445,
              64033,
              41149,
              4451,
              64037,
              41147,
              4455,
              64036,
              41138,
              4459,
              64036,
              41137,
              4460,
              64033,
              41126,
              4463,
              64037,
              41117,
              4471,
              64037,
              41117,
              4469,
              64033,
              41099,
              4477,
              64029,
              41103,
              4478,
              64029,
              41095,
              4485,
              64029,
              41083,
              4487,
              64033,
              41079,
              4486,
              64033,
              41083,
              4492,
              64033,
              41067,
              4496,
              64029,
              41066,
              4497,
              64031,
              41059,
              4500,
              64027,
              41063,
              4501,
              64029,
              41046,
              4505,
              64028,
              41052,
              4507,
              64037,
              41049,
              4512,
              64037,
              41043,
              4510,
              64037,
              41043,
              4514,
              64037,
              41043,
              4516,
              64037,
              41042,
              4516,
              64014,
              41040,
              4519,
              64028,
              41037,
              4521,
              64037,
              41035,
              4521,
              64025,
              41041,
              4525,
              64034,
              41035,
              4524,
              64029,
              41035,
              4525,
              64033,
              41043,
              4526,
              64021,
              41043,
              4524,
              64029,
              41039,
              4530,
              64035,
              41038,
              4525,
              64025,
              41042,
              4525,
              64025,
              41047,
              4530,
              64037,
              41045,
              4528,
              64029,
              41051,
              4525,
              64012,
              41055,
              4528,
              64029,
              41050,
              4527,
              64021,
              41059,
              4523,
              64027,
              41069,
              4522,
              64029,
              41067,
              4522,
              64017,
              41055,
              4519,
              64033,
              41062,
              4520,
              64034,
              41059,
              4517,
              64027,
              41065,
              4515,
              64017,
              41059,
              4513,
              64025,
              41075,
              4511,
              64020,
              41067,
              4509,
              64037,
              41074,
              4503,
              64021,
              41079,
              4501,
              64021,
              41075,
              4497,
              64017,
              41085,
              4495,
              64025,
              41081,
              4491,
              64017,
              41083,
              4489,
              64017,
              41087,
              4479,
              64021,
              41087,
              4477,
              64037,
              41081,
              4476,
              64031,
              41089,
              4467,
              64021,
              41087,
              4462,
              64025,
              41105,
              4458,
              64025,
              41091,
              4453,
              64012,
              41097,
              4446,
              64033,
              41099,
              4443,
              64031,
              41101,
              4435,
              64021,
              41095,
              4427,
              64023,
              41103,
              4421,
              64032,
              41099,
              4418,
              64029,
              41107,
              4407,
              64019,
              41103,
              4400,
              64021,
              41105,
              4395,
              64021,
              41103,
              4391,
              64029,
              41101,
              4381,
              64009,
              41105,
              4374,
              64025,
              41107,
              4367,
              64013,
              41107,
              4356,
              64017,
              41107,
              4346,
              64033,
              41107,
              4343,
              64025,
              41109,
              4335,
              64017,
              41103,
              4329,
              64021,
              41107,
              4465,
              64013,
              41113,
              4499,
              64025,
              41129,
              4499,
              64037,
              41143,
              4489,
              64013,
              41143,
              4482,
              64037,
              41151,
              4473,
              64021,
              41155,
              4464,
              64035,
              41153,
              4453,
              64028,
              41159,
              4448,
              64021,
              41150,
              4436,
              64035,
              41159,
              4425,
              64029,
              41157,
              4415,
              64032,
              41155,
              4403,
              64033,
              41161,
              4393,
              64036,
              41155,
              4382,
              64036,
              41159,
              4373,
              64025,
              41159,
              4360,
              64033,
              41151,
              4353,
              64019,
              41163,
              4339,
              64029,
              41166,
              4328,
              64032,
              41151,
              4317,
              64037,
              41159,
              4308,
              64037,
              41153,
              4296,
              64033,
              41157,
              4283,
              64037,
              41145,
              4273,
              64027,
              41155,
              4261,
              64033,
              41151,
              4247,
              64028,
              41139,
              4237,
              64033,
              41139,
              4226,
              64031,
              41139,
              4215,
              64034,
              41134,
              4197,
              64031,
              41118,
              4178,
              64023,
              41117,
              4169,
              64031,
              41113,
              4151,
              64025,
              41114,
              4141,
              64024,
              41107,
              4130,
              64021,
              41103,
              4120,
              64029,
              41091,
              4105,
              64019,
              41091,
              4099,
              64031,
              41071,
              4084,
              64025,
              41074,
              4072,
              64024,
              41069,
              4057,
              64027,
              41069,
              4045,
              64021,
              41046,
              4033,
              64026,
              41043,
              4017,
              64021,
              41047,
              3998,
              64017,
              41033,
              3979,
              64015,
              41011,
              3971,
              64011,
              41008,
              3959,
              64005,
              41001,
              3945,
              64013,
              40981,
              3936,
              64007,
              40981,
              3922,
              64004,
              40966,
              3909,
              64007,
              40955,
              3899,
              63999,
              40950,
              3885,
              64005,
              40935,
              3875,
              64005,
              40919,
              3865,
              64009,
              40918,
              3853,
              64013,
              40901,
              3842,
              64005,
              40897,
              3832,
              64005,
              40883,
              3804,
              64000,
              40859,
              3781,
              63989,
              40841,
              3773,
              63989,
              40843,
              3761,
              63985,
              40827,
              3749,
              63992,
              40810,
              3737,
              63985,
              40799,
              3722,
              64001,
              40781,
              3717,
              64003,
              40771,
              3706,
              63989,
              40762,
              3693,
              63997,
              40747,
              3683,
              63985,
              40725,
              3674,
              64005,
              40723,
              3661,
              63985,
              40711,
              3653,
              63989,
              40703,
              3643,
              64002,
              40685,
              3619,
              63977,
              40657,
              3589,
              63977,
              40656,
              3584,
              63963,
              40627,
              3571,
              63988,
              40617,
              3559,
              63986,
              40601,
              3547,
              63977,
              40590,
              3541,
              63989,
              40583,
              3528,
              63985,
              40573,
              3522,
              63973,
              40553,
              3513,
              63977,
              40543,
              3504,
              63977,
              40525,
              3495,
              63981,
              40517,
              3483,
              63981,
              40495,
              3476,
              63979,
              40485,
              3467,
              63973,
              40477,
              3096,
              63949,
              40535,
              2355,
              63916,
              40595,
              1959,
              63961,
              40655,
              1799,
              63905,
              40691,
              1724,
              63922,
              40717,
              1683,
              63925,
              40729,
              1657,
              63945,
              40735,
              1637,
              63954,
              40739,
              1619,
              63931,
              40731,
              1609,
              63951,
              40731,
              1601,
              63945,
              40725,
              1594,
              63941,
              40717,
              1583,
              63948,
              40713,
              1581,
              63957,
              40701,
              1577,
              63933,
              40701,
              1569,
              63957,
              40679,
              1572,
              63957,
              40639,
              1542,
              63965,
              40617,
              1524,
              63953,
              40592,
              1505,
              63957,
              40579,
              1484,
              63962,
              40561,
              1469,
              63957,
              40557,
              1452,
              63953,
              40539,
              1437,
              63949,
              40531,
              1427,
              63961,
              40527,
              1412,
              63953,
              40511,
              1397,
              63953,
              40502,
              1385,
              63961,
              40491,
              1371,
              63949,
              40479,
              1365,
              63957,
              40472,
              1353,
              63957,
              40475,
              1339,
              63954,
              40465,
              1333,
              63957,
              40455,
              1318,
              63951,
              40445,
              1316,
              63953,
              40448,
              1309,
              63951,
              40434,
              1305,
              63957,
              40432,
              1293,
              63947,
              40427,
              1281,
              63952,
              40415,
              1276,
              63956,
              40409,
              1273,
              63945,
              40407,
              1265,
              63953,
              40395,
              1261,
              63949,
              40399,
              1253,
              63947,
              40389,
              1247,
              63947,
              40379,
              1234,
              63945,
              40379,
              1230,
              63955,
              40379,
              1229,
              63945,
              40364,
              1223,
              63957,
              40361,
              1214,
              63947,
              40363,
              1211,
              63943,
              40361,
              1201,
              63946,
              40355,
              1200,
              63949,
              40347,
              1195,
              63937,
              40346,
              1191,
              63945,
              40351,
              1193,
              63955,
              40339,
              1183,
              63939,
              40336,
              1181,
              63941,
              40333,
              1172,
              63939,
              40328,
              1171,
              63949,
              40323,
              1173,
              63947,
              40326,
              1164,
              63951,
              40319,
              1160,
              63944,
              40312,
              1160,
              63941,
              40313,
              1153,
              63949,
              40313,
              1155,
              63941,
              40315,
              1150,
              63941,
              40307,
              1149,
              63945,
              40306,
              1138,
              63944,
              40301,
              1142,
              63947,
              40293,
              1135,
              63937,
              40295,
              1133,
              63943,
              40286,
              1130,
              63937,
              40287,
              1127,
              63941,
              40285,
              1134,
              63939,
              40287,
              1125,
              63935,
              40285,
              1120,
              63936,
              40283,
              1116,
              63941,
              40277,
              1117,
              63939,
              40275,
              1113,
              63945,
              40269,
              1113,
              63935,
              40274,
              1108,
              63941,
              40267,
              1110,
              63937,
              40264,
              1103,
              63937,
              40269,
              1103,
              63937,
              40274,
              1101,
              63941,
              40259,
              1099,
              63935,
              40258,
              1097,
              63939,
              40267,
              1096,
              63939,
              40259,
              1093,
              63933,
              40255,
              1091,
              63935,
              40249,
              1089,
              63939,
              40254,
              1090,
              63933,
              40243,
              1083,
              63935,
              40249,
              1085,
              63939,
              40259,
              1085,
              63935,
              40243,
              1081,
              63941,
              40252,
              1079,
              63932,
              40243,
              1081,
              63941,
              40249,
              1080,
              63929,
              40243,
              1075,
              63936,
              40247,
              1077,
              63941,
              40243,
              1071,
              63933,
              40243,
              1075,
              63937,
              40238,
              1075,
              63939,
              40243,
              1069,
              63935,
              40239,
              1069,
              63933,
              40235,
              1061,
              63933,
              40231,
              1068,
              63929,
              40239,
              1061,
              63935,
              40235,
              1064,
              63933,
              40239,
              1065,
              63931,
              40235,
              1061,
              63933,
              40223,
              1059,
              63935,
              40231,
              1059,
              63935,
              40226,
              1061,
              63929,
              40228,
              1057,
              63933,
              40235,
              1056,
              63928,
              40225,
              1060,
              63935,
              40223,
              1057,
              63933,
              40225,
              1057,
              63933,
              40219,
              1051,
              63935,
              40222,
              1051,
              63937,
              40227,
              1053,
              63929,
              40223,
              1049,
              63929,
              40227,
              1049,
              63929,
              40215,
              1049,
              63929,
              40221,
              1045,
              63932,
              40211,
              1048,
              63935,
              40211,
              1047,
              63939,
              40219,
              1047,
              63929,
              40219,
              1045,
              63937,
              40223,
              1045,
              63929,
              40215,
              1044,
              63932,
              40222,
              1045,
              63929,
              40215,
              1045,
              63930,
              40211,
              1045,
              63933,
              40215,
              1044,
              63937,
              40217,
              1043,
              63925,
              40219,
              1041,
              63939,
              40215,
              1040,
              63935,
              40217,
              1038,
              63929,
              40215,
              1041,
              63929,
              40213,
              1038,
              63925,
              40217,
              1038,
              63931,
              40217,
              1038,
              63932,
              40216,
              1038,
              63925,
              40213,
              1035,
              63933,
              40218,
              1037,
              63925,
              40217,
              1035,
              63925,
              40211,
              1031,
              63931,
              40222,
              1035,
              63927,
              40216,
              1033,
              63933,
              40217,
              1034,
              63925,
              40213,
              1034,
              63933,
              40211,
              1035,
              63933,
              40217,
              1034,
              63939,
              40211,
              1037,
              63929,
              40211,
              1029,
              63931,
              40211,
              1033,
              63933,
              40215,
              1031,
              63929,
              40215,
              1031,
              63929,
              40211,
              1031,
              63932,
              40219,
              1031,
              63929,
              40211,
              1029,
              63929,
              40211,
              1032,
              63929,
              40223,
              1029,
              63932,
              40223,
              1029,
              63929,
              40211,
              1030,
              63929,
              40217,
              1029,
              63935,
              40211,
              1029,
              63937,
              40211,
              1029,
              63938,
              40216,
              1029,
              63928,
              40215,
              1029,
              63928,
              40215,
              1029,
              63935,
              40219,
              1029,
              63937,
              40213,
              1029,
              63933,
              40219,
              1029,
              63931,
              40219,
              1029,
              63929,
              40217,
              1028,
              63933,
              40215,
              1026,
              63933,
              40217,
              1029,
              63933,
              40218,
              1029,
              63931,
              40226,
              1029,
              63933,
              40223,
              1029,
              63925,
              40217,
              1029,
              63936,
              40223,
              1029,
              63929,
              40227,
              1027,
              63929,
              40223,
              1026,
              63933,
              40221,
              1029,
              63925,
              40225,
              1027,
              63933,
              40227,
              1025,
              63921,
              40225,
              1025,
              63929,
              40219,
              1027,
              63933,
              40225,
              1027,
              63929,
              40211,
              1028,
              63931,
              40233,
              1026,
              63933,
              40231,
              1027,
              63927,
              40221,
              1026,
              63937,
              40227,
              1027,
              63932,
              40225,
              1026,
              63933,
              40232,
              1028,
              63933,
              40231,
              1021,
              63931,
              40227,
              1026,
              63933,
              40231,
              1029,
              63932,
              40230,
              1031,
              63921,
              40234,
              1023,
              63929,
              40222,
              1029,
              63933,
              40241,
              1026,
              63933,
              40235,
              1029,
              63925,
              40235,
              1027,
              63933,
              40234,
              1029,
              63933,
              40232,
              1031,
              63936,
              40239,
              1026,
              63937,
              40235,
              1027,
              63933,
              40243,
              1029,
              63945,
              40243,
              1021,
              63951,
              40259,
              1023,
              63950,
              40267,
              1018,
              63952,
              40269,
              1016,
              63949,
              40275,
              1017,
              63953,
              40283,
              1013,
              63956,
              40279,
              1018,
              63949,
              40287,
              1012,
              63949,
              40291,
              1014,
              63961,
              40295,
              1013,
              63960,
              40299,
              1013,
              63951,
              40301,
              1015,
              63953,
              40299,
              1012,
              63957,
              40303,
              1013,
              63965,
              40299,
              1012,
              63945,
              39997,
              3004,
              63924,
              40014,
              3272,
              63895,
              40024,
              3346,
              63917,
              40015,
              3380,
              63941,
              40027,
              3397,
              63957,
              40031,
              3401,
              63941,
              40039,
              3413,
              63949,
              40037,
              3423,
              63957,
              40031,
              3424,
              63961,
              40024,
              3425,
              63957,
              40029,
              3429,
              63955,
              40028,
              3433,
              63957,
              40021,
              3436,
              63965,
              40015,
              3438,
              63951,
              40011,
              3437,
              63957,
              39999,
              3441,
              63955,
              39995,
              3438,
              63957,
              39987,
              3445,
              63957,
              39985,
              3445,
              63967,
              39978,
              3449,
              63953,
              39970,
              3449,
              63962,
              39963,
              3451,
              63965,
              39955,
              3453,
              63962,
              39951,
              3452,
              63961,
              39939,
              3453,
              63957,
              39931,
              3457,
              63962,
              39922,
              3456,
              63957,
              39907,
              3454,
              63956,
              39903,
              3461,
              63957,
              39894,
              3428,
              63953,
              39869,
              3422,
              63956,
              39859,
              3417,
              63957,
              39851,
              3421,
              63957,
              39836,
              3420,
              63953,
              39815,
              3419,
              63955,
              39808,
              3421,
              63949,
              39803,
              3420,
              63944,
              39794,
              3421,
              63955,
              39783,
              3422,
              63949,
              39773,
              3420,
              63954,
              39768,
              3421,
              63952,
              39757,
              3419,
              63951,
              39743,
              3419,
              63949,
              39733,
              3419,
              63951,
              39731,
              3376,
              63947,
              39699,
              3353,
              63945,
              39697,
              3349,
              63945,
              39689,
              3347,
              63947,
              39670,
              3344,
              63947,
              39667,
              3340,
              63941,
              39658,
              3341,
              63939,
              39655,
              3340,
              63941,
              39644,
              3341,
              63941,
              39635,
              3339,
              63941,
              39626,
              3336,
              63941,
              39617,
              3333,
              63933,
              39615,
              3333,
              63935,
              39603,
              3334,
              63941,
              39605,
              3333,
              63933,
              39599,
              3297,
              63933,
              39589,
              3284,
              63932,
              39585,
              3275,
              63933,
              39573,
              3269,
              63925,
              39575,
              3269,
              63933,
              39558,
              3265,
              63935,
              39553,
              3265,
              63925,
              39552,
              3260,
              63931,
              39547,
              3256,
              63929,
              39539,
              3253,
              63925,
              39530,
              3257,
              63929,
              39527,
              3251,
              63925,
              39523,
              3251,
              63925,
              39515,
              3245,
              63935,
              39509,
              3242,
              63931,
              39497,
              988,
              63888,
              39506,
              2864,
              63797,
              39535,
              2672,
              63756,
              39560,
              2504,
              63733,
              39573,
              2359,
              63740,
              39593,
              2230,
              63759,
              39611,
              2124,
              63733,
              39615,
              2035,
              63749,
              39626,
              1958,
              63755,
              39646,
              1897,
              63747,
              39651,
              1850,
              63733,
              39664,
              1807,
              63741,
              39679,
              1777,
              63781,
              39685,
              1747,
              63730,
              39695,
              1721,
              63736,
              39709
            ]
          },
          {
            "time": 1545977370192,
            "label": "SPAD",
            "detector_read1": 46327,
            "detector_read2": 4007,
            "light_intensity": 15.458,
            "r": 91.2,
            "g": 26.6,
            "b": 28.2,
            "w": 117.4,
            "temperature": 31.79,
            "humidity": 57.133,
            "pressure": 927.27,
            "temperature2": 31.61,
            "humidity2": 55.483,
            "pressure2": 927.328,
            "contactless_temp": 31.15,
            "thickness": 2405898.75,
            "compass_direction": "S ",
            "compass": 197.76,
            "angle": 12.677,
            "pitch": 12.51,
            "roll": 2.08,
            "recall": {
              "time": 1545977371191,
              "colorcal_intensity1_slope[2]": 3.323,
              "colorcal_intensity2_slope[2]": 3.072,
              "colorcal_intensity3_slope[2]": 4.139,
              "colorcal_intensity1_yint[2]": -0.7,
              "colorcal_intensity2_yint[2]": -11.8,
              "colorcal_intensity3_yint[2]": -50.7,
              "colorcal_blank1[1]": 65844,
              "colorcal_blank1[2]": 60376,
              "colorcal_blank1[3]": 51638,
              "colorcal_blank1[4]": 52134,
              "colorcal_blank1[5]": 31261.5,
              "colorcal_blank1[6]": 29460.5,
              "colorcal_blank1[8]": 23894,
              "colorcal_blank1[9]": 10687.5,
              "colorcal_blank2[1]": 46765,
              "colorcal_blank2[2]": 22206.5,
              "colorcal_blank2[3]": 36713.5,
              "colorcal_blank2[4]": 32038,
              "colorcal_blank2[5]": 26343,
              "colorcal_blank2[6]": 23863,
              "colorcal_blank2[8]": 25525.5,
              "colorcal_blank2[9]": 15007,
              "colorcal_blank3[1]": 35549.5,
              "colorcal_blank3[2]": 19775,
              "colorcal_blank3[3]": 37746,
              "colorcal_blank3[4]": 23748,
              "colorcal_blank3[5]": 9564.5,
              "colorcal_blank3[6]": 8691,
              "colorcal_blank3[8]": 9620,
              "colorcal_blank3[9]": 4884.5,
              "ir_baseline_slope[3]": "NaN",
              "ir_baseline_yint[3]": "NaN",
              "ir_baseline_slope[5]": "NaN",
              "ir_baseline_yint[5]": "NaN"
            },
            "data_raw": [
              1824,
              1739,
              1741,
              1735,
              1737,
              1739,
              1733,
              1742,
              1741,
              1737,
              208,
              213,
              211,
              211,
              212,
              214,
              211,
              212,
              213,
              215,
              903,
              817,
              815,
              815,
              817,
              814,
              815,
              817,
              817,
              815,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              10211,
              8520,
              8513,
              8505,
              8503,
              8503,
              8496,
              8495,
              8496,
              8498,
              13817,
              7377,
              7329,
              7316,
              7307,
              7301,
              7298,
              7301,
              7295,
              7295,
              4173,
              3744,
              3745,
              3741,
              3741,
              3737,
              3741,
              3738,
              3737,
              3737,
              3651,
              1875,
              1864,
              1861,
              1863,
              1862,
              1858,
              1861,
              1857,
              1856,
              10867,
              11027,
              11029,
              11031,
              11030,
              11035,
              11033,
              11031,
              11033,
              11031,
              2427,
              2483,
              2483,
              2485,
              2487,
              2484,
              2486,
              2487,
              2485,
              2487,
              7017,
              7130,
              7129,
              7131,
              7131,
              7130,
              7131,
              7131,
              7126,
              7129,
              219,
              227,
              225,
              230,
              226,
              226,
              225,
              227,
              226,
              226,
              47373,
              48329,
              48337,
              48341,
              48341,
              48341,
              48345,
              48345,
              48345,
              48349,
              48949,
              49587,
              49589,
              49589,
              49585,
              49593,
              49585,
              49596,
              49591,
              49597,
              26049,
              26533,
              26538,
              26540,
              26543,
              26540,
              26539,
              26541,
              26541,
              26537,
              61649,
              63129,
              63135,
              63141,
              63141,
              63141,
              63153,
              63153,
              63147,
              63151,
              33773,
              34167,
              34167,
              34168,
              34171,
              34164,
              34167,
              34167,
              34168,
              34169,
              5986,
              6082,
              6085,
              6086,
              6087,
              6088,
              6089,
              6091,
              6091,
              6093,
              41564,
              42277,
              42267,
              42259,
              42250,
              42241,
              42235,
              42223,
              42219,
              42210,
              1338,
              1357,
              1358,
              1354,
              1357,
              1350,
              1354,
              1355,
              1355,
              1356,
              48301,
              48327,
              48328,
              48328,
              48321,
              48329,
              48325,
              48325,
              48323,
              48322,
              49588,
              49589,
              49588,
              49579,
              49584,
              49581,
              49581,
              49587,
              49583,
              49577,
              26533,
              26533,
              26541,
              26533,
              26541,
              26533,
              26533,
              26541,
              26537,
              26541,
              63120,
              63141,
              63141,
              63145,
              63141,
              63139,
              63141,
              63141,
              63143,
              63149
            ]
          }
        ],
        "data_raw": [

        ]
      }
    ]
  ],
  "app_os": "macOS 17.7.0",
  "app_name": "PhotosynQ",
  "app_version": "1.0.2",
  "app_device": "x64",
  "location": false,
  "time_offset": "Australia/Brisbane"
}
Dave in cap img 4615
Created by

David M. Kramer


Protocol connections:
0
Latest Update:
Dec 2018