v2.0 CALIBRATION: Absorbance Blanks DMK


Blanks at 3 different blank values: 1. blank1 - (empty closed clamp) 1. blank2 - piece of white paper in clamp 1. blank 3 - three pieces of white paper in clamp 8 LEDs have blanks measured (1,2,3,4,6,8,9,10)
var data = json.data_raw;
var output = {"toDevice":"set_colorcal_blanks+"};// output to device, start 1015 to call spad calibration
var lights = [1,2,3,4,6,8,9,10];// define the lights to be calibrated
var pulses = 10;// 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
  value1 = MathMEDIAN(json.data_raw.slice((i*pulses+2),(i*pulses+8)));
  value2 = MathMEDIAN(json.data_raw.slice((i*pulses+82),(i*pulses+88)));
  value3 = MathMEDIAN(json.data_raw.slice((i*pulses+162),(i*pulses+168)));
  output ["light".concat(lights[i].toString(),"_blank1")]  = value1;
  output ["light".concat(lights[i].toString(),"_blank2")]  = value2;
  output ["light".concat(lights[i].toString(),"_blank3")]  = value3;
  output ["toDevice"] += lights[i]; 
  output ["toDevice"] += "+";  
  output ["toDevice"] += MathMEDIAN(json.data_raw.slice((i*pulses+2),(i*pulses)+8)); 
  output ["toDevice"] += "+";    
  output ["toDevice"] += MathMEDIAN(json.data_raw.slice((i*pulses+82),(i*pulses+88))); 
  output ["toDevice"] += "+";    
  output ["toDevice"] += MathMEDIAN(json.data_raw.slice((i*pulses+162),(i*pulses+168))); 
  output ["toDevice"] += "+";
}
  /*
  // check for errors
  if (value1 < 2000 || value2 < 2000 || value3 < 2000) {
    danger("One of these values - " + value1 + "," + value2 + "," + value3 + " is less than 2000, which is too low.  Re-calibrate.",output);
  }
  if (value1 > 64000 || value2 > 64000 || value3 > 64000) {
    danger("One of these values - " + value1 + "," + value2 + "," + value3 + " is greater than 64000, which is too high.  Re-calibrate.",output);
  }
}
*/
  
output["toDevice"] += "-1+";

return output;
{
  "time": 1546560401258,
  "device_name": "MultispeQ",
  "device_version": "2",
  "device_id": "63:00:08:08",
  "device_battery": 106,
  "device_firmware": 2.006,
  "sample": [
    [
      {
        "time": 1546560401287,
        "protocol_id": 1,
        "message": [
          [
            "prompt",
            "Clamp tile 2 and Enter",
            ""
          ],
          [
            "0",
            "0",
            ""
          ],
          [
            "prompt",
            "Clamp tile 3 and Enter",
            ""
          ],
          [
            "0",
            "0",
            ""
          ],
          [
            "prompt",
            "Clamp tile 4 and Enter",
            ""
          ],
          [
            "0",
            "0",
            ""
          ],
          [
            "prompt",
            "Clamp tile 6 and Enter",
            ""
          ],
          [
            "0",
            "0",
            ""
          ],
          [
            "prompt",
            "Clamp tile 7 and Enter",
            ""
          ],
          [
            "0",
            "0",
            ""
          ],
          [
            "prompt",
            "Clamp tile 8 and Enter",
            ""
          ],
          [
            "0",
            "0",
            ""
          ],
          [
            "prompt",
            "Clamp tile 10 and Enter",
            ""
          ],
          [
            "0",
            "0",
            ""
          ],
          [
            "prompt",
            "Clamp tile 11 and Enter",
            ""
          ],
          [
            "0",
            "0",
            ""
          ],
          [
            "prompt",
            "Clamp tile 12 and Enter",
            ""
          ],
          [
            "0",
            "0",
            ""
          ]
        ],
        "recall": {
          "time": 1546560442281,
          "colorcal_blank1[2]": 28207,
          "colorcal_blank2[2]": 23816.5,
          "colorcal_blank3[2]": 20060.5,
          "colorcal_blank1[6]": 37924.5,
          "colorcal_blank2[6]": 65535,
          "colorcal_blank3[6]": 25314.5
        },
        "data_raw": [
          3708,
          3702,
          3702,
          3707,
          3707,
          3705,
          3712,
          3713,
          3710,
          3706,
          2123,
          2117,
          2114,
          2119,
          2113,
          2117,
          2116,
          2113,
          2114,
          2113,
          3513,
          3518,
          3522,
          3515,
          3514,
          3511,
          3520,
          3515,
          3519,
          3530,
          1181,
          1179,
          1179,
          1181,
          1181,
          1177,
          1175,
          1180,
          1177,
          1178,
          1123,
          1118,
          1126,
          1115,
          1121,
          1121,
          1117,
          1116,
          1122,
          1115,
          163,
          161,
          164,
          161,
          161,
          162,
          160,
          161,
          162,
          161,
          8228,
          8218,
          8221,
          8226,
          8227,
          8230,
          8229,
          8226,
          8225,
          8221,
          2535,
          2534,
          2535,
          2537,
          2534,
          2536,
          2535,
          2536,
          2535,
          2535,
          14355,
          14354,
          14349,
          14354,
          14354,
          14361,
          14356,
          14351,
          14356,
          14353,
          449,
          449,
          447,
          448,
          447,
          449,
          448,
          449,
          448,
          447,
          12895,
          12899,
          12898,
          12904,
          12898,
          12911,
          12903,
          12903,
          12902,
          12897,
          319,
          319,
          320,
          317,
          319,
          320,
          320,
          321,
          320,
          321,
          21922,
          21929,
          21937,
          21926,
          21939,
          21941,
          21935,
          21941,
          21940,
          21951,
          7254,
          7257,
          7256,
          7259,
          7260,
          7263,
          7261,
          7262,
          7263,
          7262,
          8845,
          8851,
          8852,
          8858,
          8859,
          8861,
          8871,
          8888,
          8912,
          8940,
          1126,
          1126,
          1125,
          1123,
          1123,
          1127,
          1125,
          1125,
          1125,
          1126,
          14648,
          14649,
          14644,
          14646,
          14647,
          14645,
          14647,
          14647,
          14647,
          14650,
          994,
          989,
          992,
          991,
          993,
          991,
          995,
          996,
          991,
          992
        ]
      }
    ]
  ],
  "app_os": "macOS 17.7.0",
  "app_name": "PhotosynQ",
  "app_version": "1.1.0",
  "app_device": "x64",
  "location": false,
  "time_offset": "America/New_York"
}
Dave in cap img 4615
Created by

David M. Kramer


Protocol connections:
0
Latest Update:
Jan 2019