planktoscope/flows/store_retrieve.json

1171 lines
33 KiB
JSON
Raw Normal View History

2020-01-28 01:30:31 +01:00
[
{
"id": "103f6179.d5012f",
"type": "tab",
"label": "Sample",
"disabled": false,
"info": ""
},
{
"id": "f6f450aa.8ed73",
"type": "ui_text_input",
"z": "103f6179.d5012f",
"name": "sample_ship",
"label": "Name of the ship",
"tooltip": "",
"group": "aac2eaf7.0cdab8",
"order": 5,
"width": 0,
"height": 0,
"passthru": true,
"mode": "text",
"delay": 300,
"topic": "sample_ship",
"x": 1170,
"y": 100,
"wires": [
[
"e17096e4.74caf8"
]
]
},
{
"id": "8f3a0dab.4d614",
"type": "ui_dropdown",
"z": "103f6179.d5012f",
"name": "sample_sampling_gear",
"label": "Sampling gear",
"tooltip": "",
"place": "Select",
"group": "aac2eaf7.0cdab8",
"order": 7,
"width": 0,
"height": 0,
"passthru": true,
"options": [
{
"label": "Plankton net",
"value": "net",
"type": "str"
},
{
"label": "Niskin bottle 12L",
"value": "niskin_12L",
"type": "str"
},
{
"label": "Niskin bottle 24L",
"value": "niskin_24L",
"type": "str"
},
{
"label": "Pass Hull",
"value": "pass_hull",
"type": "str"
}
],
"payload": "",
"topic": "sample_sampling_gear",
"x": 1130,
"y": 220,
"wires": [
[
"e17096e4.74caf8"
]
]
},
{
"id": "e046b933.316b28",
"type": "ui_text_input",
"z": "103f6179.d5012f",
"name": "sample_operator",
"label": "Name of the operator",
"tooltip": "",
"group": "aac2eaf7.0cdab8",
"order": 6,
"width": 0,
"height": 0,
"passthru": true,
"mode": "text",
"delay": 300,
"topic": "sample_operator",
"x": 1150,
"y": 180,
"wires": [
[
"e17096e4.74caf8"
]
]
},
{
"id": "2ff04681.e99aea",
"type": "ui_text_input",
"z": "103f6179.d5012f",
"name": "sample_project",
"label": "Name of the project*",
"tooltip": "",
"group": "aac2eaf7.0cdab8",
"order": 1,
"width": 0,
"height": 0,
"passthru": true,
"mode": "text",
"delay": 300,
"topic": "sample_project",
"x": 1160,
"y": 60,
"wires": [
[
"e17096e4.74caf8"
]
]
},
{
"id": "75615576.3a38cc",
"type": "ui_text_input",
"z": "103f6179.d5012f",
"name": "sample_id",
"label": "ID of the station*",
"tooltip": "",
"group": "aac2eaf7.0cdab8",
"order": 2,
"width": 0,
"height": 0,
"passthru": true,
"mode": "number",
"delay": 300,
"topic": "sample_id",
"x": 1170,
"y": 140,
"wires": [
[
"e17096e4.74caf8"
]
]
},
{
"id": "b77eb8b0.a222a8",
"type": "ui_date_picker",
"z": "103f6179.d5012f",
"name": "acq_date",
"label": "Date :",
"group": "aac2eaf7.0cdab8",
"order": 10,
"width": 0,
"height": 0,
"passthru": true,
"topic": "",
"x": 1176,
"y": 640,
"wires": [
[
"4fa687df.1aa1d8"
]
]
},
{
"id": "86d5ed81.6dc99",
"type": "ui_text_input",
"z": "103f6179.d5012f",
"name": "acq_time",
"label": "Time :",
"tooltip": "",
"group": "aac2eaf7.0cdab8",
"order": 11,
"width": 0,
"height": 0,
"passthru": true,
"mode": "time",
"delay": 300,
"topic": "",
"x": 1176,
"y": 680,
"wires": [
[
"26461e30.b461b2"
]
]
},
{
"id": "26461e30.b461b2",
"type": "function",
"z": "103f6179.d5012f",
"name": "set time global",
"func": "var time = new Date(msg.payload);\nglobal.set('generic_acq_time',time);\n\nvar hour = time.getUTCHours();\nif (hour<10){hour = \"0\"+hour;}\nvar minute = time.getUTCMinutes();\nif (minute<10){minute = \"0\"+minute;}\n\nvar time_UTC = \"\"+hour+minute+\"00\";\nglobal.set('object_time',time_UTC);\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 1396,
"y": 680,
"wires": [
[
"da16d746.4b12e8"
]
]
},
{
"id": "4fa687df.1aa1d8",
"type": "function",
"z": "103f6179.d5012f",
"name": "set date global",
"func": "var date = new Date(msg.payload);\nglobal.set('generic_acq_date',date);\n\nvar year = date.getUTCFullYear();\nvar month = date.getUTCMonth()+1;\nif (month<10){month = \"0\"+month;}\nvar day = date.getUTCDate();\nif (day<10){day = \"0\"+day;}\n\nvar date_UTC = \"\"+year+month+day;\nglobal.set('object_date',date_UTC);\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 1396,
"y": 640,
"wires": [
[
"da16d746.4b12e8"
]
]
},
{
"id": "da16d746.4b12e8",
"type": "function",
"z": "103f6179.d5012f",
"name": "get global",
"func": "msg.payload={\n generic:{\n \"generic_sample_date\":global.get(\"generic_sample_date\"),\n \"generic_sample_time\":global.get(\"generic_sample_time\"),\n \"generic_acq_date\":global.get(\"generic_acq_date\"),\n \"generic_acq_time\":global.get(\"generic_acq_time\")\n },\n sample:{\n \"sample_id\":global.get(\"sample_id\"),\n \"sample_date\":global.get(\"sample_date\"),\n \"sample_time\":global.get(\"sample_time\"),\n \"sample_operator\":global.get(\"sample_operator\"),\n \"sample_project\":global.get(\"sample_project\"),\n \"sample_sampling_gear\":global.get(\"sample_sampling_gear\")\n },\n acquisition:{\n \"acq_id\":global.get(\"acq_id\"),\n \"acq_celltype\":global.get(\"acq_celltype\"),\n \"acq_fnumber_objective\":global.get(\"acq_fnumber_objective\"),\n \"acq_instrument\":global.get(\"acq_instrument\"),\n \"acq_minimum_mesh\":global.get(\"acq_minimum_mesh\"),\n \"acq_maximum_mesh\":global.get(\"acq_maximum_mesh\"),\n \"acq_volume\":global.get(\"acq_volume\"),\n \"acq_magnification\":global.get(\"magnification\")\n },\n object:{\n \"object_date\":global.get(\"object_date\"),\n \"object_time\":global.get(\"object_time\"),\n \"object_depth_min\":global.get(\"object_depth_min\"),\n \"object_depth_max\":global.get(\"object_depth_max\")\n \n },\n process:{\n //PROCESS\n \"process_pixel\":global.get(\"process_pixel\"),\n \"process_id\":global.get(\"process_id\")\n }\n};\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 1693,
"y": 60,
"wires": [
[
"28df8fd6.06fb7"
]
]
},
{
"id": "6dd1657e.c52e4c",
"type": "file",
"z": "103f6179.d5012f",
"name": "",
"filename": "/home/pi/PlanktonScope/log/config.txt",
"appendNewline": true,
"createDir": true,
"overwriteFile": "true",
"encoding": "none",
"x": 2043,
"y": 60,
"wires": [
[]
]
},
{
"id": "3a43748d.52464c",
"type": "function",
"z": "103f6179.d5012f",
"name": "set optical config",
"func": "global.set(msg.topic,msg.payload);\nvar acq_fnumber_objective = String(global.get(msg.topic));\n\nswitch(acq_fnumber_objective) {\n case \"25\":\n global.set(\"magnification\",0.6);\n global.set(\"process_pixel\",1.86);\n global.set(\"sug_min\",60);\n global.set(\"sug_max\",670);\n global.set(\"sug_flowrate\",3);\n break;\n case \"16\":\n global.set(\"magnification\",0.94);\n global.set(\"process_pixel\",1.19);\n global.set(\"sug_min\",40);\n global.set(\"sug_max\",430);\n global.set(\"sug_flowrate\",2.4);\n break;\n case \"12\":\n global.set(\"magnification\",1.20);\n global.set(\"process_pixel\",0.94);\n global.set(\"sug_min\",30);\n global.set(\"sug_max\",340);\n global.set(\"sug_flowrate\",1.25);\n break;\n case \"8\":\n global.set(\"magnification\",1.78);\n global.set(\"process_pixel\",0.63);\n global.set(\"sug_min\",20);\n global.set(\"sug_max\",230);\n global.set(\"sug_flowrate\",0.42);\n break;\n case \"6\":\n global.set(\"magnification\",2.36);\n global.set(\"process_pixel\",0.48);\n global.set(\"sug_min\",15);\n global.set(\"sug_max\",170);\n global.set(\"sug_flowrate\",0.32);\n break;\n}\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 1386,
"y": 720,
"wires": [
[
"da16d746.4b12e8"
]
]
},
{
"id": "ff1b2069.b8273",
"type": "ui_dropdown",
"z": "103f6179.d5012f",
"name": "acq_fnumber_objective",
"label": "M12 Lens*",
"tooltip": "",
"place": "Select option",
"group": "aac2eaf7.0cdab8",
"order": 15,
"width": 0,
"height": 0,
"passthru": true,
"options": [
{
"label": "f 25mm 1/2\" 5MP IR",
"value": 25,
"type": "num"
},
{
"label": "f 16mm 1/2.5\" 5MP IR",
"value": 16,
"type": "num"
},
{
"label": "f 12mm 1/2.5\" 5MP IR",
"value": 12,
"type": "num"
},
{
"label": "f 8mm 1/2.5\" 5MP IR",
"value": 8,
"type": "num"
},
{
"label": "f 6mm 1/2.5\" 5MP IR",
"value": 6,
"type": "num"
}
],
"payload": "",
"topic": "acq_fnumber_objective",
"x": 1126,
"y": 720,
"wires": [
[
"3a43748d.52464c"
]
]
},
{
"id": "4d38113f.08c6d",
"type": "ui_numeric",
"z": "103f6179.d5012f",
"name": "acq_minimum_mesh",
"label": "Min fraction size (μm)",
"tooltip": "",
"group": "aac2eaf7.0cdab8",
"order": 16,
"width": 0,
"height": 0,
"wrap": false,
"passthru": true,
"topic": "acq_minimum_mesh",
"format": "{{value}}",
"min": 0,
"max": "300",
"step": "10",
"x": 1136,
"y": 520,
"wires": [
[
"d911efe0.ea7f1"
]
]
},
{
"id": "220c7464.306a8c",
"type": "ui_numeric",
"z": "103f6179.d5012f",
"name": "acq_maximum_mesh",
"label": "Max fraction size (μm)",
"tooltip": "",
"group": "aac2eaf7.0cdab8",
"order": 17,
"width": 0,
"height": 0,
"wrap": false,
"passthru": true,
"topic": "acq_maximum_mesh",
"format": "{{value}}",
"min": "200",
"max": "2000",
"step": "100",
"x": 1136,
"y": 560,
"wires": [
[
"d911efe0.ea7f1"
]
]
},
{
"id": "c3b1ab59.484178",
"type": "ui_text_input",
"z": "103f6179.d5012f",
"name": "acq_id",
"label": "Acquisition unique ID*",
"tooltip": "",
"group": "aac2eaf7.0cdab8",
"order": 9,
"width": 0,
"height": 0,
"passthru": true,
"mode": "number",
"delay": 300,
"topic": "acq_id",
"x": 1186,
"y": 400,
"wires": [
[
"d911efe0.ea7f1"
]
]
},
{
"id": "3bb0adb4.de5412",
"type": "ui_dropdown",
"z": "103f6179.d5012f",
"name": "acq_celltype",
"label": "Thickness flowcell*",
"tooltip": "",
"place": "Select option",
"group": "aac2eaf7.0cdab8",
"order": 13,
"width": 0,
"height": 0,
"passthru": true,
"options": [
{
"label": "200 μm µ-Slide I Luer",
"value": 200,
"type": "num"
},
{
"label": "400 μm µ-Slide I Luer",
"value": 400,
"type": "num"
},
{
"label": "600 μm µ-Slide I Luer",
"value": 600,
"type": "num"
},
{
"label": "800 μm µ-Slide I Luer",
"value": 800,
"type": "num"
}
],
"payload": "",
"topic": "acq_celltype",
"x": 1166,
"y": 480,
"wires": [
[
"d911efe0.ea7f1"
]
]
},
{
"id": "c19a2c73.7512f",
"type": "ui_text_input",
"z": "103f6179.d5012f",
"name": "acq_volume",
"label": "Volume to pass (ml)",
"tooltip": "",
"group": "aac2eaf7.0cdab8",
"order": 14,
"width": 0,
"height": 0,
"passthru": true,
"mode": "number",
"delay": 300,
"topic": "acq_volume",
"x": 1166,
"y": 600,
"wires": [
[
"d911efe0.ea7f1"
]
]
},
{
"id": "c9b2c48c.40d068",
"type": "comment",
"z": "103f6179.d5012f",
"name": "sample",
"info": "SAMPLE: a collection event\n\n sample_id [t] : unique identifier\n sample_*** [f] or [t] : other fields relative to the sample\n",
"x": 990,
"y": 20,
"wires": []
},
{
"id": "8abc2578.2ebcf8",
"type": "comment",
"z": "103f6179.d5012f",
"name": "acquisition",
"info": "ACQUISITION: metadata relative to the image acquisition\n\n acq_id [t] : unique identifier. If your acquisition differ for each sample you must have different identifier.\n acq_instrument [t] : name of the instrument (UVP, ZOOSCAN, FLOWCAM, etc.)\n acq_*** [f] or [t] : other fields relative to the acquisition\n",
"x": 996,
"y": 360,
"wires": []
},
{
"id": "91ab2c80.0f453",
"type": "comment",
"z": "103f6179.d5012f",
"name": "object",
"info": "OBJECT: one object to be classified, usually one organism. One object can be represented by several images. In this tsv file, there is one line per image which means the object data gets repeated on several lines.\n\n object_id [t] : unique object name (will be displayed in Ecotaxa object page)\n object_link [f] : URL of an associated website\n object_lat [f] : latitude, decimal degrees\n object_lon [f] : longitude, decimal degrees\n object_date [f] : ISO8601 YYYYMMJJ UTC\n object_time [f] : ISO8601 HHMMSS UTC\n object_depth_min [f] : minimum depth of object, meters\n object_depth_max [f] : maximum depth of object, meters\n\nAnd, for already classified objects\n\n object_annotation_date [t] : ISO8601 YYYYMMJJ UTC\n object_annotation_time [t] : ISO8601 YYYYMMJJ UTC\n object_annotation_category [t] : class of the object with optionnaly its direct parent following separated by left angle bracket without whitespace \"Cnidaria<Hydrozoa\" or old style between brackets \"Cnidaria (Hydrozoa)\"\n object_annotation_category_id [f] : Ecotaxa ID of the class of the object, generaly from an Ecotaxa export\n object_annotation_person_name [t] : name of the person who identified the object\n object_annotation_person_email [t] : email of the person who identified the object\n object_annotation_status [t] : predicted, dubious, or validated\n",
"x": 990,
"y": 800,
"wires": []
},
{
"id": "cdbf7342.a2e8b",
"type": "ui_text_input",
"z": "103f6179.d5012f",
"name": "acq_instrument",
"label": "Acquisition instrument",
"tooltip": "PlanktonScope V2.1",
"group": "aac2eaf7.0cdab8",
"order": 12,
"width": 0,
"height": 0,
"passthru": true,
"mode": "text",
"delay": 300,
"topic": "acq_instrument",
"x": 1156,
"y": 440,
"wires": [
[
"d911efe0.ea7f1"
]
]
},
{
"id": "28df8fd6.06fb7",
"type": "json",
"z": "103f6179.d5012f",
"name": "",
"property": "payload",
"action": "str",
"pretty": false,
"x": 1823,
"y": 60,
"wires": [
[
"6dd1657e.c52e4c"
]
]
},
{
"id": "e17096e4.74caf8",
"type": "function",
"z": "103f6179.d5012f",
"name": "set global",
"func": "var value = msg.payload;\nvar key = msg.topic;\n\nglobal.set(key,value);\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 1416,
"y": 60,
"wires": [
[
"da16d746.4b12e8"
]
]
},
{
"id": "d911efe0.ea7f1",
"type": "function",
"z": "103f6179.d5012f",
"name": "set global",
"func": "var value = msg.payload;\nvar key = msg.topic;\n\nglobal.set(key,value);\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 1416,
"y": 400,
"wires": [
[
"da16d746.4b12e8"
]
]
},
{
"id": "b4197b46.ce6e18",
"type": "file in",
"z": "103f6179.d5012f",
"name": "",
"filename": "/home/pi/PlanktonScope/log/config.txt",
"format": "utf8",
"chunk": false,
"sendError": false,
"encoding": "none",
"x": 330,
"y": 60,
"wires": [
[
"f2143211.d4d22"
]
]
},
{
"id": "4eee4717.507db8",
"type": "inject",
"z": "103f6179.d5012f",
"name": "on_load",
"topic": "",
"payload": "",
"payloadType": "date",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"x": 110,
"y": 60,
"wires": [
[
"b4197b46.ce6e18"
]
]
},
{
"id": "f2143211.d4d22",
"type": "json",
"z": "103f6179.d5012f",
"name": "",
"property": "payload",
"action": "",
"pretty": false,
"x": 570,
"y": 60,
"wires": [
[
"730df9a0.7c97b8",
"aa759257.2dbd",
"95b3793f.74b6a8",
"3d5be95c.6af716",
"348da0bb.a7a5f",
"aea5add7.8d777",
"e98fdfdf.3bb2b",
"5d8717fe.46fe28",
"13145f4f.268691",
"77595474.1d1dbc",
"59524c4.aaa65b4",
"1dee3edf.26ffd1",
"60af72f2.481a2c",
"19f46aca.503c45",
"17cad370.a4054d",
"8caee06d.7bdc3",
"92289d3.a0a036",
"70cfe0ee.3769b",
"a7f7c424.d9d848"
]
]
},
{
"id": "730df9a0.7c97b8",
"type": "function",
"z": "103f6179.d5012f",
"name": "get sample_projet",
"func": "msg.payload = msg.payload.sample.sample_project;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 826,
"y": 60,
"wires": [
[
"2ff04681.e99aea"
]
]
},
{
"id": "aa759257.2dbd",
"type": "function",
"z": "103f6179.d5012f",
"name": "get sample_ship",
"func": "msg.payload = msg.payload.sample.sample_ship;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 816,
"y": 100,
"wires": [
[
"f6f450aa.8ed73"
]
]
},
{
"id": "95b3793f.74b6a8",
"type": "function",
"z": "103f6179.d5012f",
"name": "get sample_id",
"func": "msg.payload = msg.payload.sample.sample_id+1;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 816,
"y": 140,
"wires": [
[
"75615576.3a38cc"
]
]
},
{
"id": "3d5be95c.6af716",
"type": "function",
"z": "103f6179.d5012f",
"name": "get sample_operator",
"func": "msg.payload = msg.payload.sample.sample_operator;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 836,
"y": 180,
"wires": [
[
"e046b933.316b28"
]
]
},
{
"id": "348da0bb.a7a5f",
"type": "function",
"z": "103f6179.d5012f",
"name": "get sample_sampling_gear",
"func": "msg.payload = msg.payload.sample.sample_sampling_gear;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 856,
"y": 220,
"wires": [
[
"8f3a0dab.4d614"
]
]
},
{
"id": "aea5add7.8d777",
"type": "function",
"z": "103f6179.d5012f",
"name": "get acq_id",
"func": "msg.payload = msg.payload.acquisition.acq_id+1;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 802,
"y": 400,
"wires": [
[
"c3b1ab59.484178"
]
]
},
{
"id": "e98fdfdf.3bb2b",
"type": "function",
"z": "103f6179.d5012f",
"name": "get acq_instrument",
"func": "msg.payload = msg.payload.acquisition.acq_instrument;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 822,
"y": 440,
"wires": [
[
"cdbf7342.a2e8b"
]
]
},
{
"id": "5d8717fe.46fe28",
"type": "function",
"z": "103f6179.d5012f",
"name": "get acq_celltype",
"func": "msg.payload = msg.payload.acquisition.acq_celltype;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 812,
"y": 480,
"wires": [
[
"3bb0adb4.de5412"
]
]
},
{
"id": "13145f4f.268691",
"type": "function",
"z": "103f6179.d5012f",
"name": "get acq_minimum_mesh",
"func": "msg.payload = msg.payload.acquisition.acq_minimum_mesh;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 842,
"y": 520,
"wires": [
[
"4d38113f.08c6d"
]
]
},
{
"id": "77595474.1d1dbc",
"type": "function",
"z": "103f6179.d5012f",
"name": "get acq_maximum_mesh",
"func": "msg.payload = msg.payload.acquisition.acq_maximum_mesh;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 842,
"y": 560,
"wires": [
[
"220c7464.306a8c"
]
]
},
{
"id": "59524c4.aaa65b4",
"type": "function",
"z": "103f6179.d5012f",
"name": "get acq_volume",
"func": "msg.payload = msg.payload.acquisition.acq_volume;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 812,
"y": 600,
"wires": [
[
"c19a2c73.7512f"
]
]
},
{
"id": "1dee3edf.26ffd1",
"type": "function",
"z": "103f6179.d5012f",
"name": "get generic_acq_date",
"func": "msg.payload = msg.payload.generic.generic_acq_date;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 832,
"y": 640,
"wires": [
[
"b77eb8b0.a222a8"
]
]
},
{
"id": "60af72f2.481a2c",
"type": "function",
"z": "103f6179.d5012f",
"name": "get generic_acq_time",
"func": "msg.payload = msg.payload.generic.generic_acq_time;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 832,
"y": 680,
"wires": [
[
"86d5ed81.6dc99"
]
]
},
{
"id": "19f46aca.503c45",
"type": "function",
"z": "103f6179.d5012f",
"name": "get acq_fnumber_objective",
"func": "msg.payload = msg.payload.acquisition.acq_fnumber_objective;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 852,
"y": 720,
"wires": [
[
"ff1b2069.b8273"
]
]
},
{
"id": "17cad370.a4054d",
"type": "function",
"z": "103f6179.d5012f",
"name": "get generic_sample_date",
"func": "msg.payload = msg.payload.generic.generic_sample_date;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 846,
"y": 260,
"wires": [
[
"77296f2a.ae81e"
]
]
},
{
"id": "8caee06d.7bdc3",
"type": "function",
"z": "103f6179.d5012f",
"name": "get generic_sample_time",
"func": "msg.payload = msg.payload.generic.generic_sample_time;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 846,
"y": 300,
"wires": [
[
"6e952bec.7415c4"
]
]
},
{
"id": "6e952bec.7415c4",
"type": "ui_text_input",
"z": "103f6179.d5012f",
"name": "sample_time",
"label": "Time :",
"tooltip": "",
"group": "aac2eaf7.0cdab8",
"order": 4,
"width": 0,
"height": 0,
"passthru": true,
"mode": "time",
"delay": 300,
"topic": "",
"x": 1170,
"y": 300,
"wires": [
[
"7915f991.4fc118"
]
]
},
{
"id": "77296f2a.ae81e",
"type": "ui_date_picker",
"z": "103f6179.d5012f",
"name": "sample_date",
"label": "Date :",
"group": "aac2eaf7.0cdab8",
"order": 3,
"width": 0,
"height": 0,
"passthru": true,
"topic": "",
"x": 1170,
"y": 260,
"wires": [
[
"c658a5c0.0382c8"
]
]
},
{
"id": "c658a5c0.0382c8",
"type": "function",
"z": "103f6179.d5012f",
"name": "set date global",
"func": "var date = new Date(msg.payload);\nglobal.set('generic_sample_date',date);\n\nvar year = date.getUTCFullYear();\nvar month = date.getUTCMonth()+1;\nif (month<10){month = \"0\"+month;}\nvar day = date.getUTCDate();\nif (day<10){day = \"0\"+day;}\n\nvar date_UTC = \"\"+year+month+day;\nglobal.set('sample_date',date_UTC);\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 1400,
"y": 260,
"wires": [
[
"da16d746.4b12e8"
]
]
},
{
"id": "7915f991.4fc118",
"type": "function",
"z": "103f6179.d5012f",
"name": "set time global",
"func": "var time = new Date(msg.payload);\nglobal.set('generic_sample_time',time);\n\nvar hour = time.getUTCHours();\nif (hour<10){hour = \"0\"+hour;}\nvar minute = time.getUTCMinutes();\nif (minute<10){minute = \"0\"+minute;}\n\nvar time_UTC = \"\"+hour+minute+\"00\";\nglobal.set('sample_time',time_UTC);\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 1400,
"y": 300,
"wires": [
[
"da16d746.4b12e8"
]
]
},
{
"id": "ae0b204a.0bd38",
"type": "ui_numeric",
"z": "103f6179.d5012f",
"name": "object_depth_min",
"label": "Minimum depth (m)",
"tooltip": "",
"group": "aac2eaf7.0cdab8",
"order": 18,
"width": 0,
"height": 0,
"wrap": false,
"passthru": true,
"topic": "object_depth_min",
"format": "{{value}}",
"min": "0",
"max": "2000",
"step": "1",
"x": 1146,
"y": 840,
"wires": [
[
"451237c0.9d76e8"
]
]
},
{
"id": "7aef36de.55b0d8",
"type": "ui_numeric",
"z": "103f6179.d5012f",
"name": "object_depth_max",
"label": "Maximum depth (m)",
"tooltip": "",
"group": "aac2eaf7.0cdab8",
"order": 19,
"width": 0,
"height": 0,
"wrap": false,
"passthru": true,
"topic": "object_depth_max",
"format": "{{value}}",
"min": "0",
"max": "2000",
"step": "1",
"x": 1146,
"y": 880,
"wires": [
[
"451237c0.9d76e8"
]
]
},
{
"id": "451237c0.9d76e8",
"type": "function",
"z": "103f6179.d5012f",
"name": "set global",
"func": "var value = msg.payload;\nvar key = msg.topic;\n\nglobal.set(key,value);\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 1416,
"y": 840,
"wires": [
[
"da16d746.4b12e8"
]
]
},
{
"id": "92289d3.a0a036",
"type": "function",
"z": "103f6179.d5012f",
"name": "get object_depth_min",
"func": "msg.payload = msg.payload.object.object_depth_min;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 836,
"y": 840,
"wires": [
[
"ae0b204a.0bd38"
]
]
},
{
"id": "70cfe0ee.3769b",
"type": "function",
"z": "103f6179.d5012f",
"name": "get object_depth_max",
"func": "msg.payload = msg.payload.object.object_depth_max;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 836,
"y": 880,
"wires": [
[
"7aef36de.55b0d8"
]
]
},
{
"id": "ab2b4bd0.b89d58",
"type": "ui_text_input",
"z": "103f6179.d5012f",
"name": "process_id",
"label": "Id of the process",
"tooltip": "",
"group": "aac2eaf7.0cdab8",
"order": 20,
"width": 0,
"height": 0,
"passthru": true,
"mode": "number",
"delay": 300,
"topic": "process_id",
"x": 1170,
"y": 980,
"wires": [
[
"4058069.0618ff8"
]
]
},
{
"id": "d5a7e567.991f78",
"type": "comment",
"z": "103f6179.d5012f",
"name": "process",
"info": "PROCESS: metadata relative to the processing of the raw images\n\n process_id [t] : unique identifier. If your processing differ for each sample you must have different identifier.\n process_*** [f] or [t] : other fields relative to the process\n",
"x": 990,
"y": 940,
"wires": []
},
{
"id": "a7f7c424.d9d848",
"type": "function",
"z": "103f6179.d5012f",
"name": "get process_id",
"func": "msg.payload = msg.payload.process.process_id+1;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 820,
"y": 980,
"wires": [
[
"ab2b4bd0.b89d58"
]
]
},
{
"id": "4058069.0618ff8",
"type": "function",
"z": "103f6179.d5012f",
"name": "set global",
"func": "var value = msg.payload;\nvar key = msg.topic;\n\nglobal.set(key,value);\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 1420,
"y": 980,
"wires": [
[
"da16d746.4b12e8"
]
]
},
{
"id": "1e070d2.86cd6f3",
"type": "watch",
"z": "103f6179.d5012f",
"name": "",
"files": "/home/pi/PlanktonScope/log/config.txt",
"recursive": "",
"x": 210,
"y": 440,
"wires": [
[]
]
},
{
"id": "75de7b34.cd7394",
"type": "comment",
"z": "103f6179.d5012f",
"name": "config.txt has been modified",
"info": "",
"x": 170,
"y": 400,
"wires": []
},
{
"id": "aac2eaf7.0cdab8",
"type": "ui_group",
"name": "Group 1",
"tab": "683b12ac.25a51c",
"order": 1,
"disp": true,
"width": 12
},
{
"id": "683b12ac.25a51c",
"type": "ui_tab",
"name": "Tab 1",
"icon": "dashboard",
"order": 1
}
]