Chloroplast movement RG


blue light transmittance
//============================================
// Macro for data evaluation on PhotosynQ.org
// created: 2017-5-10
//============================================

//Define the output object here
var output = {};
var sample_cal = json.detector_read1;
var data = json.data_raw;
var tc = [];
var x = 0;
var sdtc = [];
var RI = [];
var n = 8; //numero de veces que mide
for (i = 1; i < n + 1; i ++) {
  x = (i-1) * 10 + 3;
  tc [i] = MathMEAN(data.slice(x,x+7));
  sdtc [i] = MathSTDERR(data.slice(x,x+7));
  
  RI [i ] = tc [i]/ tc[1];
  
} 

output ["tc" + i ] = tc[i];

for (i = 1; i < n+1; i++) {
 
  output ["tc" + i ] = tc[i];
  
}

for (i = 1; i < n+1; i++) {
 
 
  output ["RI " + i ] = RI[i];
}
//Return data

//Check if the key time exists in json
if (json.time !== undefined){

	//Add key time and value to output
  output["time"] = json.time;
}
return output;
{
  "time_offset": 180,
  "time": 1494442568152,
  "device_name": "MultispeQ",
  "device_version": "1",
  "device_id": "01:06:11:88",
  "device_battery": 84,
  "device_firmware": 1.17,
  "sample": [
    {
      "time": 1494442568164,
      "protocol_id": 1,
      "detector_read1": 333,
      "light_intensity": 6,
      "r": 4,
      "g": 2,
      "b": 1,
      "light_intensity_raw": 7,
      "temperature": 26.690001,
      "humidity": 44.339844,
      "pressure": 1019.831726,
      "temperature2": 26.940001,
      "humidity2": 43.348633,
      "pressure2": 1020.122009,
      "contactless_temp": 27.21,
      "thickness": 0.14,
      "compass_direction": "E",
      "compass": "90.00",
      "angle": 2.01,
      "angle_direction": "E",
      "pitch": 0.17,
      "roll": 2,
      "recall": {
        "time": 1494443168327,
        "colorcal_blank1[1]": 16511.5,
        "colorcal_blank1[2]": 24324.5,
        "colorcal_blank1[3]": 29277.5,
        "colorcal_blank1[4]": 37138,
        "colorcal_blank1[6]": 33194,
        "colorcal_blank1[8]": 28720.5,
        "colorcal_blank1[9]": 31100,
        "colorcal_blank1[10]": 34614,
        "colorcal_blank2[1]": 21662,
        "colorcal_blank2[2]": 18077,
        "colorcal_blank2[3]": 21188.5,
        "colorcal_blank2[4]": 18162,
        "colorcal_blank2[6]": 16493.5,
        "colorcal_blank2[8]": 17087,
        "colorcal_blank2[9]": 18622,
        "colorcal_blank2[10]": 16523.5,
        "colorcal_blank3[1]": 20515.5,
        "colorcal_blank3[2]": 9866,
        "colorcal_blank3[3]": 19621.5,
        "colorcal_blank3[4]": 13418.5,
        "colorcal_blank3[6]": 5898.5,
        "colorcal_blank3[8]": 6295.5,
        "colorcal_blank3[9]": 5582,
        "colorcal_blank3[10]": 6047,
        "colorcal_intensity1_slope[2]": 2.309,
        "colorcal_intensity1_yint[2]": 1.7,
        "colorcal_intensity2_slope[2]": 2.377,
        "colorcal_intensity2_yint[2]": 3,
        "colorcal_intensity3_slope[2]": 2.554,
        "colorcal_intensity3_yint[2]": -17.299999,
        "ir_baseline_slope[5]": 8895,
        "ir_baseline_yint[5]": 13422.5,
        "ir_baseline_slope[3]": 526.5,
        "ir_baseline_yint[3]": 738.5
      },
      "data_raw": [
        184,
        228,
        226,
        227,
        227,
        227,
        227,
        229,
        228,
        227,
        32,
        229,
        225,
        227,
        230,
        225,
        230,
        229,
        227,
        230,
        34,
        233,
        235,
        230,
        231,
        234,
        230,
        231,
        235,
        230,
        30,
        236,
        237,
        238,
        239,
        232,
        237,
        237,
        236,
        240,
        30,
        242,
        238,
        242,
        237,
        242,
        241,
        239,
        241,
        237,
        32,
        245,
        244,
        245,
        242,
        244,
        243,
        243,
        247,
        247
      ]
    }
  ],
  "app_os": "win",
  "app_name": "PhotosynQ",
  "app_version": "0.3.7",
  "app_device": "x86-32",
  "location": [
    "-32.9700473",
    "-60.6247287"
  ],
  "ConsoleMacro": "209"
}
Default avatar
Created by

Rodrigo Gomez


Protocol connections:
2
Latest Update:
May 2017