Fv/Fm Macro


Fv/Fm Macro for Fv/Fm 650 nm protocoll
//============================================
// Macro for data evaluation on PhotosynQ.org
// created: 27.10.2017
//============================================

var data = json.data_raw;
var output = {};
var Fs = {};
var PhiII = {};
var baseline = 0;

var light_intensity =  {};

// retrieve the baseline information from the data JSON and save (using measuring light 15, calibrating light 14)

var sample_cal = json.detector_read1;//es para la luz 940

var shinyness = (sample_cal-json.recall["ir_baseline_yint[5]"])/json.recall["ir_baseline_slope[5]"]; // where 0 is dull black electrical tape, and 1 is shiny aluminum
var baseline = json.recall["ir_baseline_slope[3]"]*shinyness+json.recall["ir_baseline_yint[3]"];

if (!baseline || !json.recall["ir_baseline_yint[5]"] || sample_cal == 65535) {						// if it hasn't been calibrated or there's an error or it's maxed, set baseline == 0
  baseline = 0;
}



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

var F0 = MathMEAN(data.slice(60,68)) - baseline;
var Fm = MathMEAN(data.slice(73,99)) - baseline;
var fvfm = (Fm-F0)/Fm;
output ["F0"] = MathROUND(F0,0);
output ["Fm"] = MathROUND(Fm,0);
output ["Fv/Fm"] = MathROUND(fvfm,3);

// illumination period

     
    

  
    
 //output ["Fs " + i] = MathROUND(Fs [i], 0);
 //output ["Fm' " + i] = MathROUND(FmP [i],0);
 //output ["F0' calc " + i] = MathROUND(f0p [i],0);
 //output ["PhiII " + i] = MathROUND(PhiII [i],3);
 

          




var thickness = json.thickness;
output ["thickness - mm "] = MathROUND(thickness , 4);

output ["baseline" ] = baseline;

output["Light Intensity (PAR)"] = json.light_intensity;
output["Temperature"] = json.temperature;
output["Humidity"] = json.humidity;
output["Pressure"] = json.pressure;
return output;
{
  "time_offset": -120,
  "time": 1509093876969,
  "device_name": "MultispeQ",
  "device_version": "1",
  "device_id": "01:06:11:94",
  "device_battery": 88,
  "device_firmware": 1.17,
  "sample": [
    {
      "time": 1509093877006,
      "protocol_id": 1,
      "detector_read1": 13919,
      "light_intensity": 15,
      "r": 9,
      "g": 5,
      "b": 4,
      "light_intensity_raw": 16,
      "temperature": 25.299999,
      "humidity": 39.268555,
      "pressure": 1007.0672,
      "temperature2": 25.65,
      "humidity2": 40.695312,
      "pressure2": 1008.098022,
      "contactless_temp": 25.15,
      "thickness": 0.34,
      "compass_direction": "E",
      "compass": "90.00",
      "angle": 1.79,
      "angle_direction": "S",
      "pitch": 1.79,
      "roll": 0,
      "recall": {
        "time": 1509093879117,
        "colorcal_blank1[1]": 22499.5,
        "colorcal_blank1[2]": 25554,
        "colorcal_blank1[3]": 31458,
        "colorcal_blank1[4]": 38876.5,
        "colorcal_blank1[6]": 34085.5,
        "colorcal_blank1[8]": 33723,
        "colorcal_blank1[9]": 30423.5,
        "colorcal_blank1[10]": 36190,
        "colorcal_blank2[1]": 21669.5,
        "colorcal_blank2[2]": 18635,
        "colorcal_blank2[3]": 22455,
        "colorcal_blank2[4]": 19658.5,
        "colorcal_blank2[6]": 16528,
        "colorcal_blank2[8]": 17891.5,
        "colorcal_blank2[9]": 18626,
        "colorcal_blank2[10]": 16696,
        "colorcal_blank3[1]": 20402,
        "colorcal_blank3[2]": 10194,
        "colorcal_blank3[3]": 19539.5,
        "colorcal_blank3[4]": 14416,
        "colorcal_blank3[6]": 5821.5,
        "colorcal_blank3[8]": 6505,
        "colorcal_blank3[9]": 5453.5,
        "colorcal_blank3[10]": 5999,
        "colorcal_intensity1_slope[2]": 2.626,
        "colorcal_intensity1_yint[2]": 0.7,
        "colorcal_intensity2_slope[2]": 2.605,
        "colorcal_intensity2_yint[2]": -2.1,
        "colorcal_intensity3_slope[2]": 2.666,
        "colorcal_intensity3_yint[2]": -19.700001,
        "ir_baseline_slope[5]": 13602,
        "ir_baseline_yint[5]": 20124,
        "ir_baseline_slope[3]": 564,
        "ir_baseline_yint[3]": 751
      },
      "data_raw": [
        68,
        69,
        69,
        63,
        67,
        68,
        75,
        65,
        70,
        68,
        61,
        63,
        75,
        62,
        64,
        62,
        70,
        75,
        71,
        68,
        1971,
        1989,
        1997,
        2006,
        2019,
        2029,
        2038,
        2050,
        2049,
        2065,
        2071,
        2079,
        2099,
        2092,
        2101,
        2108,
        2117,
        2118,
        2126,
        2141,
        2137,
        2147,
        2150,
        2159,
        2166,
        2172,
        2181,
        2184,
        2183,
        2185,
        2197,
        2196,
        2205,
        2209,
        2215,
        2210,
        2215,
        2221,
        2222,
        2233,
        2233,
        2236,
        2236,
        2241,
        2239,
        2238,
        2246,
        2248,
        2257,
        2259,
        2262,
        7356,
        8688,
        9297,
        9587,
        9748,
        9839,
        9893,
        9935,
        9969,
        9986,
        10003,
        10023,
        10039,
        10044,
        10071,
        10066,
        10085,
        10092,
        10103,
        10115,
        10114,
        10124,
        10140,
        10143,
        10150,
        10155,
        10167,
        10168,
        10170,
        10179,
        8813,
        8090,
        7626,
        7295,
        7035,
        6838,
        6677,
        6521,
        6397,
        6292,
        6186,
        6088,
        6012,
        5931,
        5857,
        5781,
        5726,
        5663,
        5603,
        5541,
        5498,
        5447,
        5391,
        5345,
        5310,
        5265,
        5222,
        5187,
        5145,
        5109,
        5065,
        5050,
        5007,
        4968,
        4957,
        4915,
        4889,
        4858,
        4830,
        4803,
        4783,
        4753,
        4723,
        4703,
        4680,
        4663,
        4633,
        4617,
        4595,
        4574,
        4555,
        4539,
        4515,
        4500,
        4476,
        4457,
        4449,
        4433,
        4413,
        4399,
        4387,
        4367,
        4349,
        4333,
        4321,
        4313,
        4288,
        4282,
        4262,
        4256,
        4243,
        4228,
        4221,
        4206,
        4198,
        4183,
        4165,
        4165,
        4155,
        4136,
        4139,
        4126,
        4109,
        4101,
        4089,
        4085,
        4071,
        4065,
        4050,
        4040,
        4033,
        4018,
        4018,
        4011,
        4007,
        3995,
        3984,
        3979,
        3965
      ]
    }
  ],
  "app_os": "win",
  "app_name": "PhotosynQ",
  "app_version": "0.3.9",
  "app_device": "x86-32",
  "location": [
    "50.1563532",
    "8.6352638"
  ],
  "ConsoleMacro": null
}
Default avatar
Created by

Lars Dietzel


Protocol connections:
1
Latest Update:
Oct 2017