Chlorophyll Fluorecence Transient


Calculates Fv/Fm, Phi2, LEF, NPQ, qE, qEsv, qI, qP, qL and Fv/Fm from the Fluorescence Transient protocol. Dark adapt the leaf for at least 10 minutes before starting the protocol for best results.
var output = {};
var data = json.data_raw;
var sample_cal = MathMEAN(data.slice(2,18));

/********retrieve and calculate the calibration information from the data JSON and save (using measuring light 15, calibrating light 14, actinic/saturating light 20)******/
for (i in json.get_ir_baseline) {	
	if (json.get_ir_baseline[i][0] == 15) {
		var slope_light = json.get_ir_baseline[i][1];
		var yint_light = json.get_ir_baseline[i][2];
	}
	if (json.get_ir_baseline[i][0] == 14) {
		var slope_cal = json.get_ir_baseline[i][1];
		var yint_cal = json.get_ir_baseline[i][2];
	}
}
for (i in json.get_lights_cal) {	
	if (json.get_lights_cal[i][0] == 20) {
		var slope_act = json.get_lights_cal[i][1];
		var yint_act = json.get_lights_cal[i][2];
	}
}

// calculate the baseline
var shinyness = (sample_cal-yint_cal)/slope_cal; // where 0 is dull black electrical tape, and 1 is shiny aluminum
var baseline = slope_light*shinyness+yint_light;
/*************************************************/

if(data){
  
  // calculate Fv/Fm
  var f0 = MathMEAN(data.slice(21,24)) - baseline; 
  var fm_sort = data.slice(42,88).sort();
  var fm = MathMEAN(fm_sort.slice(43,46)) - baseline;
  var fvfm = (fm-f0)/fm;

  // calculate Fs/Fm'
  var fs = MathMEAN(data.slice(291,294)) - baseline; 
  var fmp_sort = data.slice(312,358).sort();
  var fmp = MathMEAN(fmp_sort.slice(43,46)) - baseline;
  var fsfmp = (fmp-fs)/fmp;

  // calculate Fs'/Fm''
  var fsp = MathMEAN(data.slice(21,24)) - baseline; 
  var fmpp_sort = data.slice(582,628).sort();
  var fmpp = MathMEAN(fmpp_sort.slice(43,46)) - baseline;
  var fspfmpp = (fmpp-fsp)/fmpp;

/***** calculate the intensity from actinic light at intensity setting 50 in micro einsteins *****/
  var actinic_intensity = 50*slope_act+yint_act;

  // Parameter calculations
  var phi2 = (fmp - fs) / fmp;
  var lef = (phi2 * actinic_intensity);
  var npq = (fm - fmp) / fmp;
  var qE = (fmpp - fmp) / fmpp;
  var qEsv = (fm / fmp) - (fm / fmpp);
  var fvfm = (fm - f0) / fm;
  var qI = (fm - fmpp) / fmpp;
  var qP = (fmp - fs) / (fmp - fsp);
  var qL = fsp / (fs * qP);

  // Add calculated values
  output['Phi2'] = MathROUND(phi2,2);
  output['LEF'] = MathROUND(lef,2);
  output['NPQ'] = MathROUND(npq,2);
  output['qE'] = MathROUND(qE,2);
  output['qEsv'] = MathROUND(qEsv,2);
  output['Fv/Fm'] = MathROUND(fvfm,2);
  output['qI'] = MathROUND(qI,2);
  output['qP'] = MathROUND(qP,2);
  output['qL'] = MathROUND(qL,2);

  // Add values from trace

  output['light'] = actinic_intensity;
  output['F0'] = MathROUND(f0,2);
  output['Fm'] = MathROUND(fm,2);
  output['Fs'] = MathROUND(fs,2);
  output['FmP'] = MathROUND(fmp,2);
  output['FsP'] = MathROUND(fsp,2);
  output['FmPP'] = MathROUND(fmpp,2);
  output['baseline'] = MathROUND(baseline,2);
}
return output;
{
  "time_offset": 0,
  "time": 1414584061046,
  "device_id": 49,
  "firmware_version": "0.340",
  "sample": [
    [
      {
        "time": 1414584061046,
        "protocol_id": 1,
        "slope_34": 26.09,
        "yintercept_34": 714.66,
        "slope_35": 0.05,
        "yintercept_35": 497.82,
        "get_ir_baseline": [
          [
            15,
            148.43,
            92.74
          ],
          [
            14,
            3183.41,
            3771.16
          ]
        ],
        "get_lights_cal": [
          [
            20,
            4.95,
            0
          ]
        ],
        "data_raw": [
          3058,
          3063,
          3081,
          3074,
          3110,
          3058,
          3076,
          3059,
          3034,
          3091,
          3055,
          3051,
          3132,
          3030,
          3045,
          3097,
          3107,
          3077,
          3069,
          3034,
          2212,
          2204,
          2264,
          2278,
          2250,
          2256,
          2298,
          2316,
          2327,
          2341,
          2340,
          2357,
          2360,
          2351,
          2379,
          2383,
          2377,
          2412,
          2399,
          2432,
          2431,
          7389,
          8250,
          8552,
          8691,
          8772,
          8848,
          8835,
          9029,
          9139,
          9211,
          9361,
          9431,
          9595,
          9617,
          9682,
          9732,
          9791,
          9846,
          9861,
          9864,
          9928,
          9943,
          9913,
          9947,
          9989,
          9993,
          10000,
          9995,
          9980,
          9978,
          9985,
          10057,
          10028,
          9996,
          9994,
          10021,
          10018,
          10019,
          10029,
          10040,
          10018,
          10022,
          9998,
          10020,
          10018,
          10016,
          10014,
          10012,
          10016,
          10014,
          8367,
          7729,
          7456,
          7220,
          7057,
          6924,
          6802,
          6741,
          6650,
          6585,
          6542,
          6464,
          6414,
          6368,
          6323,
          6292,
          6246,
          6224,
          6174,
          5487,
          5503,
          5504,
          5510,
          5511,
          5507,
          5502,
          5513,
          5479,
          5510,
          5496,
          5481,
          5484,
          5507,
          5505,
          5497,
          5510,
          5504,
          5511,
          5501,
          6126,
          6195,
          6227,
          6253,
          6269,
          6250,
          6276,
          6279,
          6319,
          6245,
          6300,
          6261,
          6270,
          6274,
          6269,
          6273,
          6258,
          6255,
          6276,
          6262,
          6271,
          6270,
          6207,
          6270,
          6275,
          6282,
          6261,
          6295,
          6291,
          6281,
          6271,
          6279,
          6275,
          6272,
          6291,
          6270,
          6276,
          6265,
          6263,
          6243,
          6274,
          6268,
          6261,
          6267,
          6243,
          6244,
          6263,
          6265,
          6250,
          6265,
          5989,
          5877,
          5787,
          5700,
          5674,
          5618,
          5585,
          5584,
          5549,
          5518,
          5522,
          5526,
          5516,
          5499,
          5486,
          5464,
          5495,
          5485,
          5499,
          5468,
          3496,
          3476,
          3464,
          3463,
          3482,
          3480,
          3492,
          3488,
          3478,
          3468,
          3481,
          3484,
          3478,
          3417,
          3380,
          3465,
          3481,
          3466,
          3481,
          3489,
          4814,
          4922,
          5061,
          5081,
          5083,
          5103,
          5156,
          5140,
          5127,
          5140,
          5146,
          5115,
          5139,
          5171,
          5155,
          5155,
          5159,
          5169,
          5108,
          5158,
          5179,
          5174,
          5163,
          5181,
          5161,
          5145,
          5163,
          5165,
          5111,
          5105,
          5174,
          5158,
          5179,
          5185,
          5180,
          5170,
          5179,
          5184,
          5189,
          5168,
          5172,
          5174,
          5203,
          5170,
          5183,
          5177,
          5179,
          5196,
          5221,
          5211,
          4461,
          4129,
          3877,
          3833,
          3760,
          3698,
          3675,
          3628,
          3617,
          3628,
          3630,
          3612,
          3632,
          3575,
          3629,
          3591,
          3586,
          3580,
          3592,
          3562,
          3367,
          3387,
          3390,
          3401,
          3435,
          3398,
          3409,
          3410,
          3397,
          3387,
          3399,
          3418,
          3415,
          3417,
          3406,
          3378,
          3385,
          3396,
          3382,
          3388,
          5494,
          5733,
          5780,
          5891,
          5889,
          5935,
          5943,
          5949,
          5941,
          5972,
          5927,
          5966,
          5938,
          5931,
          5972,
          5967,
          5984,
          5958,
          5964,
          5961,
          5978,
          5981,
          5968,
          5987,
          5982,
          5985,
          5986,
          5975,
          5968,
          6003,
          5995,
          5963,
          5971,
          5970,
          5985,
          5988,
          5980,
          5974,
          5978,
          5996,
          5962,
          5973,
          5989,
          6001,
          5965,
          6005,
          6006,
          5991,
          5982,
          5971,
          4541,
          4024,
          3819,
          3689,
          3625,
          3562,
          3556,
          3501,
          3499,
          3480,
          3467,
          3481,
          3456,
          3442,
          3461,
          3455,
          3400,
          3435,
          3428,
          3436,
          2203,
          2226,
          2235,
          2266,
          2255,
          2273,
          2280,
          2280,
          2283,
          2290,
          2280,
          2328,
          2312,
          2313,
          2319,
          2338,
          2332,
          2354,
          2380,
          2356,
          2352,
          6920,
          7348,
          7450,
          7544,
          7581,
          7684,
          7722,
          7792,
          7863,
          7919,
          7941,
          8006,
          8033,
          8031,
          8074,
          8092,
          8131,
          8124,
          8105,
          8123,
          8132,
          8240,
          8143,
          8130,
          8159,
          8150,
          8146,
          8169,
          8103,
          8173,
          8134,
          8146,
          8139,
          8104,
          8141,
          8135,
          8136,
          8128,
          8148,
          8116,
          8136,
          8147,
          8121,
          8119,
          8140,
          8121,
          8125,
          8121,
          8093,
          8123,
          4609,
          3683,
          3394,
          3227,
          3135,
          3093,
          3074,
          3036,
          3018,
          2972,
          2965,
          2942,
          2950,
          2924,
          2943,
          2927,
          2907,
          2912,
          2893,
          2094,
          2170,
          2191,
          2158,
          2162,
          2161,
          2180,
          2185,
          2186,
          2228,
          2195,
          2222,
          2187,
          2235,
          2249,
          2219,
          2247,
          2244,
          2252,
          2244,
          2280,
          6474,
          7094,
          7363,
          7479,
          7577,
          7684,
          7758,
          7816,
          7919,
          7996,
          8064,
          8150,
          8170,
          8207,
          8264,
          8283,
          8292,
          8322,
          8340,
          8370,
          8352,
          8370,
          8248,
          8329,
          8382,
          8336,
          8375,
          8377,
          8378,
          8392,
          8375,
          8380,
          8407,
          8372,
          8395,
          8375,
          8385,
          8374,
          8351,
          8355,
          8369,
          8366,
          8378,
          8351,
          8371,
          8360,
          8368,
          8369,
          8363,
          322,
          317,
          339,
          322,
          344,
          325,
          340,
          347,
          325,
          340,
          384,
          398,
          191,
          222,
          297,
          347,
          348,
          344,
          361,
          328,
          2059,
          2156,
          2138,
          2169,
          2195,
          2149,
          2192,
          2185,
          2210,
          2180,
          2199,
          2196,
          2222,
          2215,
          2248,
          2216,
          2249,
          2233,
          2233,
          2277,
          2250,
          6454,
          7174,
          7468,
          7597,
          7717,
          7774,
          7843,
          7952,
          8027,
          8101,
          8220,
          8265,
          8387,
          8434,
          8479,
          8521,
          8550,
          8592,
          8616,
          8612,
          8614,
          8654,
          8665,
          8682,
          8659,
          8680,
          8708,
          8690,
          8671,
          8669,
          8671,
          8684,
          8689,
          8701,
          8664,
          8676,
          8704,
          8736,
          8727,
          8692,
          8664,
          8672,
          8671,
          8671,
          8656,
          8672,
          8654,
          8657,
          8661,
          322,
          314,
          332,
          332,
          340,
          340,
          233,
          353,
          340,
          350,
          343,
          363,
          328,
          343,
          339,
          344,
          335,
          298,
          279,
          346
        ]
      }
    ]
  ]
}
012409 pbi 160 low low res headshot
Created by

Greg Austic


Protocol connections:
15
Latest Update:
Feb 2015