FoFm Dark macro for "Phi2" basic zero light


This is the macro as shown in the tutorial, modified for my purposes
/**
 * Macro for data evaluation on PhotosynQ.org
 * created: July 28, 2017 7:22 PM
 * edited: November 15 2017, 11:53AM
 */

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

var fo = MathMEAN(json.data_raw.slice(1,5));
var fm = MathMEAN(json.data_raw.slice(63,68));
var fv = fm-fo;
var fvfm = fv/fm;


output.Fo = fo;
output.Fm = fm;
output.Fv = fv;
output['Fv/Fm'] = fvfm;
output.PAR = json.light_intensity;

//Return data
return output;
{
  "time": 1501283341143,
  "device_name": "MultispeQ",
  "device_version": "1",
  "device_id": "00:00:00:01",
  "device_battery": 100,
  "device_firmware": 1.2,
  "sample": [
    {
      "time": 1501283341154,
      "protocol_id": 1,
      "label": "",
      "light_intensity": 17.95,
      "r": 15,
      "g": 7,
      "b": 4,
      "light_intensity_raw": 26,
      "data_raw": [
        15064,
        15232,
        15307,
        15334,
        15353,
        15351,
        15350,
        15341,
        15330,
        15331,
        15317,
        15315,
        15310,
        15298,
        15298,
        15290,
        15293,
        15289,
        15279,
        15280,
        20357,
        20671,
        20781,
        20838,
        20870,
        20894,
        20910,
        20924,
        20935,
        20953,
        20957,
        20958,
        20966,
        20974,
        20975,
        20978,
        20983,
        20986,
        20987,
        20992,
        20990,
        20996,
        20996,
        20991,
        20988,
        20991,
        20996,
        20993,
        20991,
        20985,
        20985,
        20983,
        20981,
        20977,
        20974,
        20971,
        20966,
        20965,
        20961,
        20960,
        20954,
        20951,
        20943,
        20943,
        20933,
        20931,
        20930,
        20922,
        20921,
        20912,
        19360,
        18530,
        18110,
        17863,
        17695,
        17565,
        17448,
        17349,
        17263,
        17171,
        17082,
        17006,
        16932,
        16851,
        16786,
        16715,
        16649,
        16594,
        16534,
        16471
      ]
    }
  ],
  "app_os": "darwin-15.6.0",
  "app_name": "PhotosynQ",
  "app_version": "0.0.18",
  "app_device": "x64",
  "location": [
    "42.7243050",
    "-84.4796047"
  ],
  "time_offset": "America/Detroit"
}
Default avatar
Created by

Alan McClain


Protocol connections:
1
Latest Update:
Nov 2017