NPQ 20 minutes - RG


Correlation of NPQ and NPQt, written by Stefanie Tietz Modificaciones para medidas sin luz 730 (no da los f0prime)
var data = json.data_raw;
var output = {};
var Fs = {};
var FmP = {};
var FmPs = {};
var PhiII = {};
var f0ps = {};
var f0p = {};
var qL = {};
var NPQ = {};

var sample_cal = MathMEAN(data.slice(1,10));

// retrieve the baseline information from the data JSON and save (using measuring light 15, calibrating light 14)
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];
	}
}

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

// initial values of F0 and Fm from dark adapted state.

var F0 = MathMEAN(data.slice(41,51)) - baseline;
var Fmsort = data.slice(52, 101).sort();
var Fm = MathMEAN(Fmsort.slice(45,49)) - baseline; // take the 4 largest values and average them
var fvfm = (Fm-F0)/Fm;
output ["F0"] = MathROUND(F0,0);
output ["Fm"] = MathROUND(Fm,0);
output ["Fv/Fm"] = MathROUND(fvfm,3);

// illumination period
var x = 0; 

for (i=1 ; i<20 ; i++) { 
  
var x = x + 200*i;
  
  var frag = data.slice(x,x+200);
     Fs [i]  = MathMEAN(frag.slice(39,49)) - baseline;
     FmPs = frag.slice(50,100).sort();
     FmP [i] = MathMEAN(FmPs.slice(45,50));
     
     f0ps = frag.slice(100,200).sort();
  f0p [i] = MathMEAN(f0ps.slice(0,10));
     PhiII [i] = (FmP [i] - Fs [i])/FmP[i];
  qL [i]= ((FmP [i] - Fs[i] )/(FmP [i] - f0p [i] ))*f0p[i] /Fs [i] ;
  NPQ [i] = ((Fm - FmP [i]) / FmP [i]);   

    
 output ["Fs" + i] = MathROUND(Fs [i], 0);
 output ["Fm'" + i] = MathROUND(FmP [i],0);
 output ["F0'" + i] = MathROUND(f0p [i],0);
 output ["PhiII" + i] = MathROUND(PhiII [i],3);
 output ["qL " + i] = MathROUND(qL [i],4);
 output ["NPQ" + i] = MathROUND(NPQ [i],4);
  
  
}  
                        



return output;
{
  "time_offset": 180,
  "time": 1472239526725,
  "device_id": 109,
  "firmware_version": "0.450",
  "sample": [
    [
      {
        "time": 1472239526735,
        "protocol_id": 1,
        "get_ir_baseline": [
          [
            15,
            4.31,
            -0.1
          ],
          [
            14,
            6188.48,
            6930.63
          ]
        ],
        "data_raw": [
          3711,
          3631,
          3751,
          3694,
          3693,
          3667,
          3739,
          3721,
          3741,
          3666,
          2207,
          2240,
          2248,
          2303,
          2319,
          2311,
          2365,
          2371,
          2391,
          2401,
          2418,
          2441,
          2461,
          2455,
          2488,
          2497,
          2553,
          2549,
          2556,
          2590,
          2603,
          2618,
          2632,
          2655,
          2660,
          2710,
          2684,
          2710,
          2748,
          2738,
          2746,
          2757,
          2772,
          2765,
          2795,
          2797,
          2802,
          2828,
          2817,
          2829,
          2820,
          2848,
          2867,
          2857,
          2864,
          2860,
          2899,
          2896,
          2888,
          2898,
          2886,
          10476,
          12211,
          12597,
          12857,
          13081,
          13303,
          13598,
          13835,
          13989,
          14145,
          14269,
          14365,
          14404,
          14441,
          14465,
          14497,
          14456,
          14486,
          14480,
          14490,
          14486,
          14500,
          14519,
          14510,
          14482,
          14482,
          14489,
          14491,
          14470,
          14494,
          14500,
          14467,
          14489,
          14492,
          14487,
          14489,
          14470,
          14501,
          14479,
          14488,
          14447,
          14480,
          14461,
          14473,
          14448,
          14453,
          14438,
          14434,
          14433,
          6137,
          6154,
          6164,
          6170,
          6169,
          6171,
          6176,
          6164,
          6178,
          6180,
          6162,
          6174,
          6154,
          6175,
          6181,
          6169,
          6176,
          6156,
          6158,
          6176,
          6166,
          6168,
          6178,
          6163,
          6183,
          6178,
          6189,
          6162,
          6182,
          6188,
          6173,
          6198,
          6192,
          6158,
          6186,
          6162,
          6181,
          6174,
          6189,
          6191,
          6178,
          6171,
          6160,
          6164,
          6149,
          6148,
          6169,
          6155,
          6162,
          6151,
          8187,
          8597,
          8753,
          8758,
          8783,
          8772,
          8786,
          8805,
          8810,
          8817,
          8801,
          8802,
          8782,
          8810,
          8799,
          8820,
          8834,
          8822,
          8812,
          8804,
          8777,
          8820,
          8834,
          8818,
          8824,
          8841,
          8807,
          8844,
          8826,
          8824,
          8847,
          8833,
          8831,
          8859,
          8819,
          8809,
          8823,
          8841,
          8821,
          8812,
          8827,
          8827,
          8816,
          8821,
          8839,
          8831,
          8845,
          8833,
          8837,
          8836,
          6126,
          6128,
          6145,
          6130,
          6145,
          6163,
          6158,
          6128,
          6133,
          6138,
          6144,
          6119,
          6153,
          6153,
          6153,
          6151,
          6156,
          6132,
          6138,
          6142,
          6134,
          6130,
          6158,
          6176,
          6144,
          6151,
          6128,
          6160,
          6147,
          6145,
          6148,
          6157,
          6143,
          6157,
          6144,
          6117,
          6149,
          6138,
          6147,
          6154,
          6156,
          6141,
          6134,
          6131,
          6172,
          6157,
          6147,
          6154,
          6138,
          6160,
          6134,
          4904,
          4312,
          3923,
          3643,
          3498,
          3350,
          3275,
          3168,
          3113,
          3041,
          3015,
          3003,
          2940,
          2897,
          2873,
          2879,
          2843,
          2808,
          2800,
          2788,
          2785,
          2737,
          2754,
          2745,
          2727,
          2746,
          2715,
          2714,
          2686,
          2668,
          2708,
          2684,
          2698,
          2673,
          2688,
          2656,
          2677,
          2681,
          2679,
          2667,
          2666,
          2647,
          2646,
          2662,
          2660,
          2648,
          2666,
          2673,
          2655,
          2663,
          3370,
          3741,
          4104,
          4392,
          4644,
          4828,
          5028,
          5139,
          5270,
          5368,
          5456,
          5530,
          5566,
          5636,
          5684,
          5706,
          5726,
          5741,
          5764,
          5769,
          5780,
          5813,
          5821,
          5816,
          5855,
          5876,
          5870,
          5881,
          5873,
          5863,
          5877,
          5878,
          5878,
          5866,
          5896,
          5893,
          5890,
          5887,
          5908,
          5899,
          5911,
          5907,
          5912,
          5918,
          5908,
          5887,
          5942,
          5906,
          5906,
          8164,
          8645,
          8855,
          8930,
          8966,
          8963,
          8969,
          8983,
          8984,
          9011,
          8988,
          9000,
          8992,
          8998,
          9023,
          9032,
          8996,
          9005,
          9020,
          9024,
          9063,
          9017,
          9018,
          9024,
          9019,
          9036,
          9036,
          9011,
          9024,
          9025,
          9046,
          9030,
          8995,
          9031,
          9033,
          9013,
          9036,
          9021,
          9011,
          9041,
          9056,
          9062,
          9039,
          9040,
          9038,
          9033,
          9038,
          9049,
          9032,
          9056,
          5543,
          5590,
          5581,
          5579,
          5589,
          5583,
          5570,
          5595,
          5583,
          5583,
          5580,
          5595,
          5598,
          5598,
          5589,
          5578,
          5594,
          5604,
          5594,
          5577,
          5558,
          5588,
          5599,
          5584,
          5594,
          5594,
          5599,
          5605,
          5591,
          5590,
          5596,
          5586,
          5589,
          5592,
          5598,
          5604,
          5624,
          5613,
          5600,
          5589,
          5591,
          5592,
          5578,
          5588,
          5579,
          5578,
          5583,
          5608,
          5568,
          5598,
          8485,
          9072,
          9240,
          9259,
          9253,
          9289,
          9257,
          9279,
          9284,
          9287,
          9281,
          9302,
          9284,
          9282,
          9267,
          9276,
          9303,
          9281,
          9283,
          9304,
          9296,
          9300,
          9294,
          9296,
          9276,
          9307,
          9295,
          9298,
          9292,
          9280,
          9289,
          9312,
          9308,
          9295,
          9287,
          9301,
          9311,
          9301,
          9277,
          9298,
          9291,
          9287,
          9309,
          9304,
          9319,
          9287,
          9276,
          9282,
          9307,
          9296,
          5519,
          5536,
          5516,
          5527,
          5546,
          5539,
          5526,
          5536,
          5531,
          5522,
          5545,
          5551,
          5518,
          5525,
          5512,
          5534,
          5530,
          5534,
          5551,
          5541,
          5522,
          5504,
          5528,
          5532,
          5549,
          5507,
          5505,
          5522,
          5539,
          5521,
          5515,
          5541,
          5527,
          5520,
          5529,
          5538,
          5520,
          5551,
          5527,
          5524,
          5522,
          5545,
          5537,
          5528,
          5510,
          5538,
          5512,
          5545,
          5529,
          5549,
          5518,
          4269,
          3784,
          3506,
          3287,
          3172,
          3096,
          3004,
          2955,
          2945,
          2855,
          2830,
          2801,
          2804,
          2765,
          2776,
          2751,
          2744,
          2704,
          2721,
          2698,
          2697,
          2672,
          2700,
          2674,
          2666,
          2656,
          2659,
          2659,
          2645,
          2609,
          2638,
          2639,
          2621,
          2661,
          2668,
          2639,
          2627,
          2622,
          2612,
          2582,
          2610,
          2591,
          2611,
          2603,
          2605,
          2624,
          2609,
          2584,
          2625,
          2616,
          3249,
          3549,
          3827,
          4066,
          4225,
          4355,
          4488,
          4588,
          4676,
          4748,
          4828,
          4865,
          4911,
          4945,
          4997,
          5038,
          5061,
          5085,
          5076,
          5115,
          5140,
          5151,
          5157,
          5178,
          5177,
          5181,
          5175,
          5181,
          5183,
          5201,
          5189,
          5198,
          5207,
          5213,
          5215,
          5193,
          5234,
          5210,
          5219,
          5237,
          5213,
          5219,
          5239,
          5242,
          5239,
          5250,
          5232,
          5248,
          5230,
          8212,
          8925,
          9140,
          9190,
          9215,
          9236,
          9254,
          9244,
          9280,
          9289,
          9254,
          9311,
          9299,
          9297,
          9313,
          9296,
          9304,
          9315,
          9302,
          9305,
          9316,
          9307,
          9321,
          9311,
          9306,
          9305,
          9313,
          9324,
          9303,
          9333,
          9327,
          9313,
          9332,
          9328,
          9336,
          9343,
          9323,
          9332,
          9342,
          9328,
          9298,
          9327,
          9319,
          9305,
          9310,
          9327,
          9297,
          9325,
          9343,
          9323,
          5176,
          5164,
          5200,
          5219,
          5192,
          5198,
          5195,
          5213,
          5194,
          5195,
          5193,
          5219,
          5220,
          5199,
          5221,
          5228,
          5228,
          5224,
          5221,
          5212,
          5204,
          5217,
          5214,
          5218,
          5226,
          5216,
          5209,
          5222,
          5226,
          5212,
          5230,
          5235,
          5234,
          5230,
          5229,
          5242,
          5251,
          5232,
          5228,
          5241,
          5216,
          5222,
          5209,
          5228,
          5229,
          5229,
          5218,
          5245,
          5210,
          5202,
          8372,
          9049,
          9245,
          9303,
          9269,
          9292,
          9274,
          9249,
          9301,
          9289,
          9311,
          9315,
          9307,
          9310,
          9313,
          9308,
          9293,
          9282,
          9284,
          9326,
          9316,
          9317,
          9310,
          9303,
          9287,
          9292,
          9291,
          9316,
          9283,
          9293,
          9298,
          9273,
          9272,
          9303,
          9292,
          9292,
          9298,
          9298,
          9301,
          9312,
          9309,
          9330,
          9315,
          9313,
          9317,
          9292,
          9290,
          9298,
          9299,
          9305,
          5117,
          5145,
          5119,
          5141,
          5166,
          5128,
          5138,
          5157,
          5131,
          5141,
          5134,
          5137,
          5122,
          5140,
          5142,
          5116,
          5149,
          5142,
          5129,
          5127,
          5124,
          5116,
          5111,
          5133,
          5115,
          5120,
          5125,
          5142,
          5130,
          5129,
          5117,
          5128,
          5133,
          5122,
          5112,
          5123,
          5095,
          5146,
          5144,
          5123,
          5150,
          5149,
          5133,
          5141,
          5136,
          5137,
          5139,
          5134,
          5145,
          5145,
          5117,
          3981,
          3569,
          3335,
          3194,
          3108,
          3011,
          2950,
          2902,
          2846,
          2804,
          2779,
          2781,
          2752,
          2697,
          2727,
          2678,
          2674,
          2675,
          2659,
          2645,
          2647,
          2635,
          2631,
          2627,
          2650,
          2631,
          2622,
          2634,
          2631,
          2623,
          2643,
          2614,
          2626,
          2624,
          2608,
          2599,
          2614,
          2603,
          2602,
          2620,
          2602,
          2570,
          2616,
          2607,
          2604,
          2618,
          2596,
          2624,
          2603,
          2608,
          3251,
          3488,
          3664,
          3813,
          3965,
          4087,
          4150,
          4226,
          4297,
          4374,
          4398,
          4471,
          4477,
          4518,
          4570,
          4592,
          4627,
          4616,
          4638,
          4656,
          4692,
          4709,
          4689,
          4734,
          4728,
          4744,
          4754,
          4748,
          4773,
          4778,
          4789,
          4791,
          4777,
          4779,
          4782,
          4794,
          4817,
          4803,
          4791,
          4822,
          4840,
          4832,
          4818,
          4844,
          4838,
          4857,
          4837,
          4844,
          4845,
          8014,
          8845,
          9073,
          9159,
          9174,
          9195,
          9209,
          9188,
          9215,
          9237,
          9244,
          9233,
          9249,
          9228,
          9266,
          9249,
          9245,
          9256,
          9270,
          9256,
          9262,
          9279,
          9267,
          9263,
          9267,
          9259,
          9271,
          9279,
          9271,
          9273,
          9295,
          9280,
          9278,
          9274,
          9248,
          9272,
          9273,
          9256,
          9269,
          9282,
          9298,
          9306,
          9289,
          9271,
          9270,
          9281,
          9275,
          9281,
          9268,
          9285,
          4986,
          4998,
          5012,
          4981,
          4983,
          5009,
          5011,
          4991,
          5023,
          5011,
          4984,
          5007,
          5001,
          5001,
          4987,
          5018,
          5001,
          4995,
          4997,
          4981,
          5001,
          4993,
          4991,
          5006,
          4989,
          4992,
          4991,
          4992,
          4981,
          5007,
          4989,
          4987,
          4986,
          4989,
          5000,
          4985,
          5009,
          4993,
          4989,
          4985,
          4988,
          5004,
          4990,
          4996,
          4980,
          4986,
          4991,
          5008,
          5001,
          4989,
          8277,
          9064,
          9283,
          9330,
          9355,
          9355,
          9360,
          9373,
          9368,
          9355,
          9385,
          9381,
          9376,
          9357,
          9352,
          9371,
          9350,
          9346,
          9384,
          9370,
          9380,
          9371,
          9363,
          9366,
          9373,
          9363,
          9382,
          9360,
          9379,
          9376,
          9377,
          9358,
          9382,
          9375,
          9375,
          9371,
          9374,
          9353,
          9376,
          9366,
          9362,
          9374,
          9371,
          9339,
          9345,
          9381,
          9388,
          9385,
          9389,
          9403,
          4922,
          4902,
          4934,
          4939,
          4930,
          4939,
          4929,
          4924,
          4934,
          4937,
          4924,
          4921,
          4933,
          4934,
          4931,
          4937,
          4924,
          4926,
          4930,
          4911,
          4916,
          4915,
          4911,
          4917,
          4914,
          4902,
          4929,
          4923,
          4888,
          4892,
          4898,
          4912,
          4909,
          4907,
          4904,
          4905,
          4910,
          4907,
          4889,
          4917,
          4924,
          4906,
          4914,
          4900,
          4923,
          4905,
          4915,
          4909,
          4930,
          4935,
          4912,
          3845,
          3483,
          3265,
          3130,
          3047,
          2984,
          2918,
          2855,
          2814,
          2802,
          2780,
          2750,
          2731,
          2724,
          2678,
          2680,
          2668,
          2649,
          2657,
          2676,
          2638,
          2637,
          2638,
          2618,
          2620,
          2620,
          2634,
          2606,
          2610,
          2613,
          2565,
          2599,
          2619,
          2591,
          2618,
          2612,
          2588,
          2575,
          2618,
          2625,
          2593,
          2618,
          2571,
          2562,
          2584,
          2589,
          2580,
          2586,
          2578,
          2573,
          3212,
          3419,
          3582,
          3751,
          3853,
          3935,
          4008,
          4079,
          4136,
          4176,
          4220,
          4245,
          4283,
          4335,
          4341,
          4379,
          4396,
          4411,
          4440,
          4456,
          4458,
          4480,
          4477,
          4501,
          4509,
          4505,
          4539,
          4545,
          4549,
          4556,
          4554,
          4564,
          4555,
          4596,
          4598,
          4601,
          4572,
          4580,
          4594,
          4610,
          4576,
          4627,
          4599,
          4608,
          4628,
          4614,
          4620,
          4626,
          4612,
          7959,
          8850,
          9121,
          9165,
          9228,
          9249,
          9237,
          9259,
          9281,
          9280,
          9283,
          9293,
          9290,
          9297,
          9319,
          9294,
          9311,
          9310,
          9311,
          9313,
          9357,
          9305,
          9321,
          9328,
          9304,
          9327,
          9349,
          9336,
          9354,
          9332,
          9333,
          9338,
          9317,
          9340,
          9340,
          9347,
          9352,
          9355,
          9387,
          9374,
          9363,
          9379,
          9335,
          9346,
          9366,
          9361,
          9342,
          9368,
          9382,
          9361,
          4860,
          4861,
          4888,
          4895,
          4888,
          4894,
          4862,
          4889,
          4902,
          4889,
          4874,
          4874,
          4885,
          4878,
          4882,
          4861,
          4861,
          4865,
          4868,
          4873,
          4880,
          4882,
          4848,
          4876,
          4879,
          4867,
          4871,
          4856,
          4873,
          4854,
          4883,
          4875,
          4870,
          4879,
          4871,
          4866,
          4863,
          4867,
          4884,
          4880,
          4881,
          4891,
          4881,
          4875,
          4867,
          4886,
          4870,
          4881,
          4902,
          4902,
          8223,
          9089,
          9311,
          9365,
          9396,
          9407,
          9392,
          9404,
          9421,
          9428,
          9425,
          9443,
          9422,
          9450,
          9430,
          9437,
          9449,
          9454,
          9444,
          9454,
          9442,
          9443,
          9436,
          9438,
          9416,
          9441,
          9445,
          9446,
          9450,
          9439,
          9463,
          9456,
          9422,
          9449,
          9447,
          9451,
          9449,
          9441,
          9439,
          9452,
          9434,
          9431,
          9464,
          9469,
          9444,
          9443,
          9438,
          9462,
          9469,
          9461,
          4839,
          4828,
          4831,
          4849,
          4836,
          4861,
          4853,
          4828,
          4832,
          4855,
          4855,
          4848,
          4825,
          4831,
          4836,
          4815,
          4839,
          4832,
          4815,
          4845,
          4833,
          4820,
          4856,
          4813,
          4830,
          4840,
          4811,
          4835,
          4846,
          4842,
          4815,
          4832,
          4824,
          4839,
          4827,
          4843,
          4831,
          4835,
          4824,
          4805,
          4833,
          4833,
          4817,
          4814,
          4840,
          4845,
          4805,
          4816,
          4817,
          4848,
          4845,
          3742,
          3428,
          3239,
          3088,
          3027,
          2957,
          2887,
          2829,
          2819,
          2794,
          2760,
          2745,
          2725,
          2703,
          2704,
          2656,
          2674,
          2655,
          2654,
          2639,
          2659,
          2637,
          2626,
          2624,
          2631,
          2620,
          2615,
          2605,
          2599,
          2618,
          2603,
          2625,
          2644,
          2606,
          2604,
          2593,
          2605,
          2615,
          2578,
          2601,
          2592,
          2598,
          2601,
          2603,
          2585,
          2599,
          2573,
          2588,
          2558
        ]
      }
    ]
  ],
  "app_os": "win",
  "app_name": "PhotosynQ",
  "app_version": "0.3.5",
  "app_device": "x86-32",
  "location": [
    "-32.9695041",
    "-60.6258838"
  ],
  "ConsoleMacro": "215"
}
Img 20171030 190259
Created by

Rodrigo Gomez


Protocol connections:
14
Latest Update:
Aug 2016