testingmacro


test
//============================================
// Macro for data evaluation on PhotosynQ.org
// created: 4/7/2017
//============================================

//Define the output object here
var output = {};

var fs = MathMEAN(json.data_raw.slice(1,5));
var fmp = MathMEAN(json.data_raw.slice(63,68));

var phi2 = (fmp-fs)/fmp;
var lef = phi2 * json.light_intensity * 0.4;

output['Fs'] = fs;
output['Fmp'] = fmp;
output['Phi2'] = phi2;
output['LEF'] = lef; 
output['PAR'] = json.light_intensity;

//Return data
return output;
{
  "time_offset": -120,
  "time": 1493376071699,
  "device_name": "MultispeQ",
  "device_version": "1",
  "device_id": "01:12:39:22",
  "device_battery": 96,
  "device_firmware": 1.17,
  "sample": [
    [
      {
        "time": 1493376071714,
        "protocol_id": 1,
        "light_intensity": 14,
        "r": 8,
        "g": 4,
        "b": 2,
        "light_intensity_raw": 14,
        "data_raw": [
          20554,
          20646,
          20695,
          20730,
          20743,
          20748,
          20765,
          20782,
          20789,
          20795,
          20809,
          20819,
          20823,
          20835,
          20843,
          20851,
          20855,
          20866,
          20874,
          20871,
          22780,
          22903,
          22933,
          22959,
          22988,
          23007,
          23027,
          23038,
          23066,
          23074,
          23079,
          23088,
          23093,
          23093,
          23095,
          23100,
          23094,
          23093,
          23079,
          23084,
          23079,
          23079,
          23084,
          23076,
          23077,
          23063,
          23062,
          23055,
          23061,
          23050,
          23044,
          23051,
          23039,
          23031,
          23024,
          23037,
          23021,
          23019,
          23013,
          23014,
          23013,
          23011,
          23009,
          22999,
          22993,
          22990,
          22991,
          22983,
          22982,
          22979,
          22500,
          21921,
          21595,
          21397,
          21273,
          21173,
          21103,
          21038,
          20999,
          20953,
          20922,
          20888,
          20861,
          20829,
          20803,
          20780,
          20759,
          20735,
          20717,
          20697
        ]
      }
    ]
  ],
  "app_os": "win",
  "app_name": "PhotosynQ",
  "app_version": "0.3.6",
  "app_device": "x86-64",
  "location": [
    "51.9807871",
    "5.6502037"
  ],
  "ConsoleMacro": null
}

Protocol connections:
1
Latest Update:
Apr 2017