CALIBRATION: Blank


Calibration of lights with nothing inserted in the leaf clamp. This is used for SPAD and any other protocols using absorbance which must compare to a blank baseline.
var data = json.data_raw;
var output = {"toDevice":"1015+"};// output to device, start 1015 to call spad calibration
var lights = [15,16,11,12,20,2,14,10];// define the lights to be calibrated
var pulses = 200;// number of pulses in a cycle
for (var i = 0;i<lights.length;i++) { // loop through and save one averaged 'point' for each of the cycles
    output [lights[i]]  = MathROUND(MathMEAN(json.data_raw.slice((i*pulses+40),(i*pulses+160))),2);
	output ["toDevice"] += lights[i]; 
	output ["toDevice"] += "+";  
    output ["toDevice"] += MathMEAN(json.data_raw.slice((i*pulses+40),(i*pulses+160))); 
	output ["toDevice"] += "+";    
	output ["toDevice"] += "0"; 
	output ["toDevice"] += "+";
}

output["toDevice"] += "-1+";

return output;
{
  "time_offset": 300,
  "time": 1422926602340,
  "device_id": 68,
  "firmware_version": "0.370",
  "sample": [
    [
      {
        "time": 1422926602340,
        "protocol_id": 1,
        "data_raw": [
          29843,
          30304,
          30022,
          30155,
          29843,
          30051,
          29783,
          30327,
          30044,
          30291,
          30193,
          29987,
          30117,
          30628,
          29926,
          30447,
          29693,
          30218,
          30236,
          30027,
          30207,
          30024,
          30117,
          30126,
          30284,
          29652,
          29674,
          30341,
          29972,
          29987,
          30128,
          29592,
          30022,
          30288,
          29895,
          29882,
          30325,
          30244,
          30286,
          30237,
          29949,
          30628,
          30520,
          30214,
          30372,
          30155,
          30008,
          30271,
          30308,
          30452,
          30427,
          29779,
          30419,
          30253,
          29865,
          30358,
          29820,
          30266,
          30594,
          29809,
          30128,
          30339,
          29873,
          30224,
          30250,
          30738,
          30134,
          30164,
          30194,
          29857,
          30069,
          30327,
          30053,
          30335,
          29901,
          30092,
          29939,
          30227,
          30240,
          30570,
          30537,
          29720,
          30460,
          30322,
          30087,
          30341,
          30196,
          30369,
          30366,
          30062,
          30013,
          30096,
          30050,
          30433,
          30294,
          30110,
          30586,
          29691,
          30513,
          30131,
          30422,
          29824,
          30101,
          29831,
          30380,
          30151,
          30331,
          30206,
          30414,
          30134,
          30091,
          30250,
          30045,
          30399,
          30249,
          30399,
          30281,
          30078,
          30367,
          30422,
          29916,
          30211,
          30555,
          30185,
          30190,
          30401,
          30171,
          30175,
          30240,
          30079,
          29988,
          29878,
          30600,
          30021,
          30311,
          30129,
          30670,
          30371,
          30288,
          29803,
          30439,
          30636,
          30201,
          29981,
          30331,
          30268,
          29983,
          30180,
          30032,
          29940,
          29832,
          29896,
          30154,
          30273,
          29825,
          30541,
          30067,
          29804,
          30513,
          29752,
          30016,
          30076,
          30226,
          30254,
          30314,
          30230,
          30030,
          30364,
          30298,
          30259,
          30010,
          30070,
          29741,
          29841,
          30229,
          30449,
          30054,
          29839,
          30211,
          30286,
          30216,
          30174,
          29915,
          29833,
          29895,
          30163,
          30113,
          30011,
          30096,
          30837,
          30128,
          29923,
          30340,
          30185,
          30372,
          30314,
          30133,
          30307,
          30337,
          30458,
          24833,
          24134,
          24881,
          25041,
          24791,
          25454,
          24881,
          25072,
          25372,
          24313,
          25032,
          25161,
          25147,
          25148,
          24303,
          24700,
          24941,
          25484,
          25347,
          24953,
          24876,
          25256,
          25193,
          25127,
          25224,
          25227,
          24816,
          24883,
          25302,
          25081,
          25168,
          25429,
          25131,
          25419,
          25659,
          25252,
          25260,
          25400,
          25349,
          24406,
          25133,
          25490,
          25135,
          25182,
          25227,
          25092,
          25244,
          25780,
          24743,
          24792,
          25186,
          24703,
          24275,
          25446,
          25185,
          25339,
          25122,
          24819,
          25620,
          24839,
          25303,
          25145,
          24871,
          25689,
          25333,
          25228,
          24083,
          25184,
          25428,
          25666,
          25322,
          24711,
          23895,
          24910,
          25531,
          25179,
          25679,
          25337,
          25613,
          25859,
          24743,
          24755,
          25171,
          25158,
          24901,
          24632,
          25253,
          25342,
          24888,
          25013,
          25029,
          25385,
          25147,
          24818,
          25211,
          25373,
          25297,
          25132,
          24744,
          25177,
          25096,
          25060,
          25308,
          24864,
          25210,
          25519,
          24574,
          24449,
          25529,
          25132,
          25123,
          25021,
          25193,
          24256,
          25029,
          25316,
          25311,
          24912,
          25269,
          24946,
          24987,
          24741,
          25483,
          24789,
          25164,
          24989,
          25122,
          24162,
          25071,
          25399,
          25605,
          25150,
          25186,
          25492,
          25347,
          25110,
          24991,
          24365,
          23850,
          24836,
          24902,
          24498,
          25542,
          25027,
          25270,
          24887,
          24182,
          24221,
          25265,
          25508,
          25286,
          25340,
          25264,
          25203,
          25248,
          25153,
          24871,
          25196,
          24549,
          25042,
          24515,
          24848,
          25040,
          25084,
          25463,
          25073,
          25353,
          24777,
          24801,
          25308,
          25643,
          25198,
          25261,
          24819,
          24741,
          24117,
          25172,
          24808,
          25490,
          25708,
          25098,
          24992,
          25588,
          25068,
          24736,
          25036,
          25275,
          24394,
          25121,
          24820,
          25135,
          25130,
          24907,
          25362,
          25246,
          23985,
          24870,
          25740,
          24854,
          25164,
          10914,
          10961,
          10991,
          10975,
          10934,
          10957,
          10914,
          10904,
          10986,
          10936,
          10950,
          10971,
          10934,
          10947,
          10979,
          10907,
          10929,
          10994,
          10957,
          10952,
          10932,
          10921,
          10931,
          10960,
          11034,
          10986,
          10997,
          10946,
          10941,
          10952,
          10932,
          10950,
          10999,
          10936,
          10957,
          10985,
          10911,
          10970,
          10976,
          10961,
          10950,
          10935,
          10988,
          10962,
          10935,
          10975,
          10992,
          10933,
          10957,
          10939,
          11008,
          10990,
          10948,
          10947,
          10942,
          11002,
          10991,
          10950,
          10974,
          10924,
          10938,
          10954,
          10988,
          10989,
          10908,
          10927,
          11011,
          10925,
          10971,
          10968,
          10947,
          10953,
          10981,
          10997,
          10979,
          10972,
          10932,
          10970,
          10937,
          10989,
          10993,
          10970,
          10965,
          11003,
          11004,
          10958,
          11011,
          10981,
          10999,
          10999,
          10970,
          10949,
          10897,
          11005,
          10991,
          10938,
          10954,
          10981,
          10985,
          11021,
          10978,
          10978,
          10980,
          10986,
          10978,
          10942,
          10949,
          10960,
          10942,
          10911,
          10971,
          10934,
          10958,
          10975,
          10953,
          10973,
          10991,
          10982,
          10982,
          11010,
          10928,
          10989,
          11004,
          10985,
          10944,
          10957,
          10907,
          10966,
          10944,
          10960,
          10973,
          10973,
          10930,
          10994,
          11007,
          10977,
          11002,
          10999,
          10966,
          10960,
          10963,
          11003,
          10948,
          10928,
          11009,
          10949,
          10990,
          11001,
          10985,
          10929,
          10931,
          10956,
          10970,
          10943,
          10980,
          10974,
          10962,
          10979,
          10967,
          10988,
          11013,
          10982,
          10952,
          10984,
          10987,
          10991,
          10960,
          11035,
          10995,
          10945,
          10971,
          10981,
          10972,
          10959,
          10987,
          10935,
          10956,
          10974,
          10998,
          11007,
          10981,
          10960,
          10962,
          11006,
          10995,
          10988,
          10958,
          10943,
          10987,
          10925,
          10940,
          10963,
          10913,
          10905,
          10913,
          10966,
          10986,
          10991,
          10967,
          11001,
          27971,
          27971,
          27963,
          27981,
          28042,
          27954,
          28013,
          27974,
          28003,
          27964,
          27997,
          28024,
          28000,
          27995,
          27987,
          27862,
          27880,
          28019,
          27995,
          28004,
          27948,
          28025,
          27974,
          27994,
          28021,
          27993,
          27990,
          28021,
          28012,
          27943,
          27970,
          27963,
          27890,
          27982,
          27946,
          28005,
          27881,
          28018,
          28023,
          27947,
          27977,
          28013,
          27985,
          28022,
          28024,
          28004,
          28030,
          28008,
          27960,
          27928,
          28018,
          27952,
          28011,
          28058,
          27963,
          28009,
          28030,
          27974,
          28015,
          28035,
          27978,
          28024,
          27959,
          27974,
          28013,
          28041,
          28039,
          27999,
          27995,
          28006,
          28021,
          28017,
          27999,
          27976,
          27880,
          27968,
          27981,
          27939,
          28052,
          28042,
          27939,
          27953,
          28045,
          28020,
          27941,
          27971,
          27991,
          27940,
          27979,
          28013,
          27967,
          27819,
          27987,
          27945,
          27947,
          27961,
          28015,
          28025,
          28065,
          27948,
          27872,
          27981,
          27974,
          27988,
          28042,
          28030,
          27846,
          27939,
          27977,
          27997,
          28098,
          27960,
          27941,
          28015,
          27991,
          28037,
          28035,
          28023,
          28022,
          28008,
          27935,
          27999,
          27976,
          28016,
          27983,
          28020,
          28025,
          27928,
          28035,
          27985,
          27999,
          27935,
          27966,
          28003,
          27982,
          27857,
          28031,
          27946,
          28011,
          27962,
          28020,
          27978,
          28005,
          27935,
          27985,
          28031,
          28011,
          27971,
          27999,
          27856,
          28063,
          27805,
          28021,
          27956,
          27962,
          28003,
          28008,
          27930,
          27961,
          27997,
          27991,
          28033,
          27994,
          27998,
          28010,
          27955,
          27899,
          27962,
          28000,
          27975,
          27841,
          27937,
          27986,
          28042,
          28040,
          27981,
          27957,
          27974,
          27989,
          27952,
          28030,
          28001,
          28024,
          28012,
          27962,
          28006,
          27856,
          27958,
          27871,
          27963,
          27999,
          27987,
          27962,
          28021,
          27994,
          27990,
          27935,
          27989,
          27928,
          28033,
          29890,
          31194,
          30933,
          31157,
          30895,
          30833,
          31448,
          31364,
          30895,
          30760,
          31332,
          31187,
          31188,
          31188,
          30999,
          31199,
          31506,
          31621,
          31492,
          31360,
          30844,
          30721,
          31381,
          31509,
          31543,
          31214,
          31409,
          31053,
          31137,
          31354,
          31310,
          31050,
          31041,
          31094,
          30806,
          30648,
          31341,
          31217,
          31008,
          30920,
          30913,
          31116,
          31067,
          31298,
          31059,
          31508,
          31016,
          31405,
          31174,
          31461,
          31124,
          31028,
          30852,
          30929,
          30800,
          31036,
          30965,
          30813,
          30577,
          30655,
          30847,
          30994,
          31402,
          31536,
          31565,
          31077,
          30831,
          30747,
          30844,
          30710,
          30908,
          31299,
          31317,
          31212,
          31146,
          30865,
          31332,
          31502,
          31110,
          31032,
          31192,
          31217,
          31393,
          31240,
          30906,
          30926,
          30916,
          30973,
          31067,
          31068,
          30920,
          31149,
          31439,
          31449,
          31439,
          31484,
          31376,
          31173,
          31435,
          31211,
          31009,
          30982,
          31009,
          31010,
          31118,
          30681,
          30807,
          30757,
          30695,
          30710,
          30569,
          30864,
          30661,
          31159,
          31347,
          31142,
          31216,
          31500,
          31180,
          31117,
          30965,
          31115,
          31032,
          31107,
          31504,
          31041,
          30981,
          31002,
          31101,
          31326,
          30958,
          31007,
          31485,
          31533,
          31432,
          31448,
          31491,
          31250,
          31239,
          31299,
          31358,
          31181,
          31290,
          30641,
          31391,
          31129,
          30901,
          31501,
          31076,
          30631,
          31023,
          31110,
          31316,
          31407,
          31424,
          31084,
          31068,
          31123,
          30952,
          31083,
          31042,
          31129,
          31108,
          31097,
          30989,
          30935,
          30870,
          30913,
          30888,
          31043,
          30909,
          30967,
          30911,
          30844,
          30899,
          31483,
          31531,
          31454,
          30990,
          30689,
          30710,
          31296,
          31313,
          30987,
          30931,
          31407,
          31449,
          31082,
          30935,
          30925,
          30877,
          30496,
          30795,
          30979,
          31438,
          31109,
          31130,
          30844,
          30946,
          31250,
          21,
          26,
          26,
          26,
          11,
          18,
          21,
          21,
          35,
          16,
          31,
          22,
          15,
          7,
          9,
          16,
          22,
          22,
          18,
          20,
          23,
          23,
          21,
          24,
          23,
          15,
          14,
          35,
          22,
          32,
          34,
          32,
          30,
          30,
          35,
          21,
          34,
          27,
          25,
          18,
          24,
          37,
          22,
          18,
          30,
          30,
          23,
          20,
          18,
          21,
          31,
          30,
          27,
          27,
          18,
          41,
          23,
          21,
          29,
          33,
          36,
          23,
          30,
          25,
          15,
          25,
          25,
          21,
          20,
          22,
          33,
          19,
          22,
          19,
          26,
          11,
          17,
          29,
          16,
          16,
          19,
          12,
          17,
          18,
          18,
          20,
          12,
          20,
          19,
          17,
          11,
          17,
          22,
          18,
          15,
          20,
          25,
          25,
          20,
          26,
          20,
          26,
          24,
          20,
          19,
          19,
          28,
          22,
          28,
          24,
          29,
          21,
          13,
          17,
          28,
          18,
          27,
          28,
          23,
          17,
          24,
          22,
          19,
          24,
          17,
          25,
          21,
          31,
          25,
          28,
          17,
          25,
          21,
          25,
          26,
          17,
          26,
          25,
          23,
          21,
          20,
          3,
          14,
          21,
          25,
          13,
          22,
          16,
          22,
          32,
          20,
          26,
          24,
          18,
          12,
          25,
          19,
          20,
          14,
          36,
          25,
          23,
          23,
          16,
          22,
          14,
          28,
          5,
          25,
          28,
          24,
          34,
          36,
          25,
          23,
          30,
          38,
          32,
          34,
          27,
          41,
          32,
          28,
          19,
          13,
          24,
          27,
          26,
          28,
          30,
          32,
          31,
          35,
          32,
          14,
          26,
          32,
          24,
          27,
          23,
          7,
          -25,
          -8,
          -16,
          10,
          4,
          -19,
          11,
          -13,
          0,
          -14,
          -31,
          18,
          -18,
          2,
          -2,
          0,
          -27,
          -35,
          12,
          9,
          -17,
          -36,
          -14,
          -16,
          -17,
          -11,
          15,
          -5,
          9,
          8,
          15,
          -18,
          -13,
          21,
          -19,
          -2,
          -16,
          -18,
          -18,
          -16,
          -6,
          8,
          -13,
          13,
          9,
          -25,
          0,
          4,
          -9,
          12,
          19,
          4,
          21,
          -14,
          4,
          0,
          23,
          23,
          10,
          -19,
          -4,
          -5,
          2,
          12,
          2,
          -24,
          14,
          -29,
          -14,
          -5,
          16,
          10,
          -15,
          -8,
          29,
          13,
          5,
          26,
          -1,
          29,
          16,
          -24,
          -14,
          -1,
          37,
          -28,
          22,
          -4,
          -7,
          -10,
          -12,
          -13,
          19,
          -2,
          -21,
          -1,
          -8,
          -4,
          -12,
          -20,
          -23,
          -34,
          -13,
          5,
          -32,
          7,
          12,
          7,
          -1,
          -9,
          -13,
          0,
          -25,
          1,
          -14,
          5,
          20,
          -21,
          -16,
          -14,
          -14,
          -29,
          -60,
          -55,
          -51,
          -49,
          -41,
          -21,
          -59,
          -8,
          -19,
          -10,
          -5,
          1,
          -6,
          -23,
          -24,
          7,
          3,
          -10,
          -32,
          -16,
          8,
          3,
          6,
          3,
          11,
          -1,
          0,
          -6,
          -22,
          17,
          -44,
          11,
          -23,
          4,
          -33,
          -2,
          -11,
          -8,
          1,
          -16,
          15,
          -21,
          2,
          -5,
          -32,
          0,
          -18,
          -23,
          -27,
          -21,
          -13,
          1,
          13,
          -32,
          -5,
          -6,
          -7,
          2,
          -7,
          -24,
          2,
          -14,
          -19,
          -27,
          -11,
          -14,
          -12,
          -6,
          -21,
          21,
          -12,
          -9,
          -8,
          30,
          13,
          4,
          16,
          38098,
          38196,
          38200,
          38101,
          38003,
          38129,
          38124,
          37992,
          38166,
          38139,
          37997,
          37876,
          38147,
          38141,
          38187,
          38211,
          38231,
          38135,
          38138,
          38033,
          37983,
          38148,
          38190,
          38227,
          37957,
          37915,
          38161,
          38122,
          38221,
          38217,
          38122,
          38037,
          38110,
          38160,
          38196,
          38014,
          38259,
          38219,
          38130,
          38001,
          37991,
          38116,
          38110,
          38143,
          38152,
          38183,
          38214,
          38165,
          38116,
          38053,
          38034,
          37879,
          38120,
          38155,
          38212,
          38211,
          38192,
          38088,
          37973,
          38139,
          38189,
          38245,
          38089,
          37951,
          38135,
          38125,
          38139,
          38154,
          38127,
          38042,
          38126,
          38147,
          38161,
          38109,
          38207,
          38228,
          38220,
          38201,
          38171,
          38099,
          38088,
          38072,
          38001,
          37993,
          37800,
          38003,
          38132,
          37964,
          38146,
          38193,
          38175,
          38214,
          38060,
          38142,
          38264,
          38203,
          38153,
          38114,
          38103,
          38064,
          38057,
          38069,
          37951,
          38148,
          38159,
          38136,
          38207,
          38112,
          38252,
          38187,
          38114,
          38081,
          38026,
          37988,
          37986,
          38009,
          37960,
          38143,
          38163,
          38173,
          38225,
          38168,
          38070,
          37957,
          38170,
          38149,
          38136,
          38201,
          38247,
          38278,
          38160,
          38124,
          37994,
          38155,
          38157,
          38147,
          38147,
          38224,
          38232,
          38189,
          38149,
          38044,
          37845,
          38164,
          38108,
          38219,
          38248,
          38176,
          38017,
          38011,
          38064,
          38140,
          38155,
          38127,
          38129,
          38165,
          38206,
          38239,
          38218,
          38201,
          38133,
          38002,
          37953,
          38174,
          38170,
          38151,
          38208,
          38214,
          38211,
          38118,
          38119,
          38082,
          37965,
          38128,
          38119,
          38105,
          38173,
          38238,
          38031,
          38089,
          38145,
          38135,
          38199,
          38193,
          38142,
          38074,
          38004,
          37820,
          38148,
          38118,
          38146,
          38207,
          38108,
          38212,
          38134,
          38036,
          38096,
          38158,
          38139,
          38135
        ]
      }
    ]
  ]
}
012409 pbi 160 low low res headshot
Created by

Greg Austic


Protocol connections:
4
Latest Update:
Feb 2015