diff --git a/flows/flows_planktonscope.json b/flows/flows_planktonscope.json deleted file mode 100644 index f7cec23..0000000 --- a/flows/flows_planktonscope.json +++ /dev/null @@ -1,1747 +0,0 @@ -[ - { - "id": "7f885510.6173fc", - "type": "tab", - "label": "Flow 1", - "disabled": false, - "info": "" - }, - { - "id": "955fdac.f54f328", - "type": "ui_text_input", - "z": "7f885510.6173fc", - "name": "sample_ship", - "label": "Name of the ship", - "tooltip": "", - "group": "c627ea8d.f886e8", - "order": 2, - "width": 0, - "height": 0, - "passthru": true, - "mode": "text", - "delay": 300, - "topic": "sample_ship", - "x": 170, - "y": 100, - "wires": [ - [ - "3dd9a121.e386de" - ] - ] - }, - { - "id": "dfb29406.d68148", - "type": "ui_dropdown", - "z": "7f885510.6173fc", - "name": "sample_sampling_gear", - "label": "Sampling gear", - "tooltip": "", - "place": "Select", - "group": "c627ea8d.f886e8", - "order": 5, - "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" - } - ], - "payload": "", - "topic": "sample_sampling_gear", - "x": 130, - "y": 220, - "wires": [ - [ - "8861710f.55b92" - ] - ] - }, - { - "id": "bfce92c6.5f66a", - "type": "ui_text_input", - "z": "7f885510.6173fc", - "name": "sample_operator", - "label": "Name of the operator", - "tooltip": "", - "group": "c627ea8d.f886e8", - "order": 4, - "width": 0, - "height": 0, - "passthru": true, - "mode": "text", - "delay": 300, - "topic": "sample_operator", - "x": 150, - "y": 180, - "wires": [ - [ - "3dd9a121.e386de" - ] - ] - }, - { - "id": "bae9c122.3612f", - "type": "ui_text_input", - "z": "7f885510.6173fc", - "name": "sample_project", - "label": "Name of the project*", - "tooltip": "", - "group": "c627ea8d.f886e8", - "order": 1, - "width": 0, - "height": 0, - "passthru": true, - "mode": "text", - "delay": 300, - "topic": "sample_project", - "x": 160, - "y": 40, - "wires": [ - [ - "3dd9a121.e386de", - "a8cb0c6e.7220d" - ] - ] - }, - { - "id": "eb39c21c.a3fec", - "type": "ui_text_input", - "z": "7f885510.6173fc", - "name": "object_lat", - "label": "Lattitude (decimal degrees)", - "tooltip": "", - "group": "106f0e1b.6478a2", - "order": 7, - "width": 0, - "height": 0, - "passthru": true, - "mode": "number", - "delay": 300, - "topic": "object_lat", - "x": 1020, - "y": 320, - "wires": [ - [ - "c650b922.6adef8" - ] - ] - }, - { - "id": "404b41a5.ae3d5", - "type": "ui_text_input", - "z": "7f885510.6173fc", - "name": "object_lon", - "label": "Longitude (decimal degrees)", - "tooltip": "", - "group": "106f0e1b.6478a2", - "order": 8, - "width": 0, - "height": 0, - "passthru": true, - "mode": "number", - "delay": 300, - "topic": "object_lon", - "x": 1010, - "y": 360, - "wires": [ - [ - "c650b922.6adef8" - ] - ] - }, - { - "id": "d90c72f2.cf1ca", - "type": "ui_text_input", - "z": "7f885510.6173fc", - "name": "sample_id", - "label": "Name of the station*", - "tooltip": "", - "group": "c627ea8d.f886e8", - "order": 3, - "width": 0, - "height": 0, - "passthru": true, - "mode": "text", - "delay": 300, - "topic": "sample_id", - "x": 170, - "y": 140, - "wires": [ - [ - "3dd9a121.e386de" - ] - ] - }, - { - "id": "3300f426.cc515c", - "type": "ui_dropdown", - "z": "7f885510.6173fc", - "name": "acq_fnumber_objective", - "label": "M12 Lens*", - "tooltip": "", - "place": "Select option", - "group": "832434ce.ebe498", - "order": 1, - "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": 1030, - "y": 40, - "wires": [ - [ - "de455648.b432f8" - ] - ] - }, - { - "id": "72d57e31.59234", - "type": "ui_template", - "z": "7f885510.6173fc", - "group": "832434ce.ebe498", - "name": "Magnification", - "order": 2, - "width": 0, - "height": 0, - "format": "
\n Magnification : X\n \n \n
", - "storeOutMessages": true, - "fwdInMessages": true, - "templateScope": "local", - "x": 1590, - "y": 40, - "wires": [ - [] - ] - }, - { - "id": "98a4bc0a.f3304", - "type": "ui_template", - "z": "7f885510.6173fc", - "group": "77a6994b.e3efb8", - "name": "Instrument", - "order": 1, - "width": 0, - "height": 0, - "format": "
\n Instrument :\n \n PlanktonScope V2.1\n \n
", - "storeOutMessages": true, - "fwdInMessages": true, - "templateScope": "local", - "x": 170, - "y": 480, - "wires": [ - [] - ] - }, - { - "id": "53b3cb43.2acf04", - "type": "ui_template", - "z": "7f885510.6173fc", - "group": "77a6994b.e3efb8", - "name": "Software", - "order": 2, - "width": 0, - "height": 0, - "format": "
\n Software :\n \n Node-RED Dashboard\n \n
", - "storeOutMessages": true, - "fwdInMessages": true, - "templateScope": "local", - "x": 180, - "y": 520, - "wires": [ - [] - ] - }, - { - "id": "1a0a45f1.2cd7da", - "type": "ui_template", - "z": "7f885510.6173fc", - "group": "77a6994b.e3efb8", - "name": "Camera", - "order": 3, - "width": 0, - "height": 0, - "format": "
\n Camera :\n \n Pi Camera v2.1\n \n
", - "storeOutMessages": true, - "fwdInMessages": true, - "templateScope": "local", - "x": 180, - "y": 560, - "wires": [ - [] - ] - }, - { - "id": "de455648.b432f8", - "type": "function", - "z": "7f885510.6173fc", - "name": "calculate", - "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": 1220, - "y": 40, - "wires": [ - [ - "c83fc403.8ba2d8", - "48d9cc9c.852214", - "44969aec.4e87e4", - "a1201a.dc3f8fe8", - "89b9399b.9389a8" - ] - ] - }, - { - "id": "f3aa18d.65f0de8", - "type": "ui_dropdown", - "z": "7f885510.6173fc", - "name": "acq_celltype", - "label": "Thickness flowcell*", - "tooltip": "", - "place": "Select option", - "group": "a72a9ec6.bb144", - "order": 1, - "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": 170, - "y": 280, - "wires": [ - [ - "8861710f.55b92" - ] - ] - }, - { - "id": "45568fe8.67759", - "type": "ui_numeric", - "z": "7f885510.6173fc", - "name": "acq_minimum_mesh", - "label": "Min fraction size (μm)", - "tooltip": "", - "group": "a72a9ec6.bb144", - "order": 2, - "width": 0, - "height": 0, - "wrap": false, - "passthru": true, - "topic": "acq_minimum_mesh", - "format": "{{value}}", - "min": 0, - "max": "300", - "step": "10", - "x": 140, - "y": 320, - "wires": [ - [ - "8861710f.55b92" - ] - ] - }, - { - "id": "918b69e2.7e6e88", - "type": "ui_numeric", - "z": "7f885510.6173fc", - "name": "acq_maximum_mesh", - "label": "Max fraction size (μm)", - "tooltip": "", - "group": "a72a9ec6.bb144", - "order": 3, - "width": 0, - "height": 0, - "wrap": false, - "passthru": true, - "topic": "acq_maximum_mesh", - "format": "{{value}}", - "min": "200", - "max": "2000", - "step": "100", - "x": 140, - "y": 360, - "wires": [ - [ - "8861710f.55b92" - ] - ] - }, - { - "id": "86d762dc.47911", - "type": "ui_switch", - "z": "7f885510.6173fc", - "name": "light_state", - "label": "Light", - "tooltip": "", - "group": "c62ffbd3.787ef8", - "order": 1, - "width": 2, - "height": 1, - "passthru": true, - "decouple": "false", - "topic": "", - "style": "", - "onvalue": "true", - "onvalueType": "bool", - "onicon": "", - "oncolor": "", - "offvalue": "false", - "offvalueType": "bool", - "officon": "", - "offcolor": "", - "x": 510, - "y": 160, - "wires": [ - [ - "b5a366b4.cb6918" - ] - ] - }, - { - "id": "b5a366b4.cb6918", - "type": "exec", - "z": "7f885510.6173fc", - "command": "python3.7 $HOME/PlanktonScope/scripts/light.py", - "addpay": true, - "append": "", - "useSpawn": "false", - "timer": "", - "oldrc": false, - "name": "light.py", - "x": 820, - "y": 160, - "wires": [ - [], - [], - [] - ], - "icon": "node-red/light.svg" - }, - { - "id": "5ea28a70.42ae14", - "type": "ui_button", - "z": "7f885510.6173fc", - "name": "up", - "group": "c62ffbd3.787ef8", - "order": 3, - "width": 1, - "height": 1, - "passthru": false, - "label": "", - "tooltip": "", - "color": "", - "bgcolor": "", - "icon": "arrow_upwards", - "payload": "up", - "payloadType": "str", - "topic": "up", - "x": 530, - "y": 280, - "wires": [ - [ - "523fdeaa.50c6c" - ] - ] - }, - { - "id": "27f16831.dde938", - "type": "ui_button", - "z": "7f885510.6173fc", - "name": "down", - "group": "c62ffbd3.787ef8", - "order": 5, - "width": 1, - "height": 1, - "passthru": true, - "label": "", - "tooltip": "", - "color": "", - "bgcolor": "", - "icon": "arrow_downward", - "payload": "down", - "payloadType": "str", - "topic": "down", - "x": 530, - "y": 360, - "wires": [ - [ - "523fdeaa.50c6c" - ] - ] - }, - { - "id": "b110542b.5de4f8", - "type": "ui_button", - "z": "7f885510.6173fc", - "name": "kill_focus", - "group": "c62ffbd3.787ef8", - "order": 6, - "width": 2, - "height": 1, - "passthru": false, - "label": "Cancel focus", - "tooltip": "", - "color": "#AD1625", - "bgcolor": "#333333", - "icon": "pause", - "payload": "", - "payloadType": "str", - "topic": "", - "x": 520, - "y": 400, - "wires": [ - [ - "d9dea2bc.47097" - ] - ] - }, - { - "id": "523fdeaa.50c6c", - "type": "function", - "z": "7f885510.6173fc", - "name": "focus", - "func": "if(msg.topic === \"nb_step\"){\n nb_step = msg.payload;\n global.set(\"nb_step\",nb_step);\n}\nif(msg.topic === \"up\"){\n\n nb_step = global.get(\"nb_step\");\n\n orientation = \"up\";\n\n msg.payload = String(nb_step).concat(' ', orientation);\n return msg;\n}\nif(msg.topic === \"down\"){\n \n nb_step = global.get(\"nb_step\");\n\n orientation = \"down\";\n msg.payload = String(nb_step).concat(' ', orientation);\n\n return msg;\n}\n\n", - "outputs": 1, - "noerr": 0, - "x": 670, - "y": 320, - "wires": [ - [ - "ada728bd.8e7818" - ] - ], - "info": "### Focusing\n##### focus.py `nb_step` `orientation`\n\n- `nb_step` : **integer** (from 1 to 100000) - number of step to perform by the stage (about 31um/step)\n- `orientation` : **string** - orientation of the focus either `up` or `down`\n\nExample:\n\n python3.7 $HOME/PlanktonScope/scripts/focus.py 650 up\n" - }, - { - "id": "ada728bd.8e7818", - "type": "exec", - "z": "7f885510.6173fc", - "command": "python3.7 $HOME/PlanktonScope/scripts/focus.py", - "addpay": true, - "append": "", - "useSpawn": "false", - "timer": "", - "oldrc": false, - "name": "focus.py", - "x": 820, - "y": 320, - "wires": [ - [], - [], - [] - ], - "icon": "node-red/sort.svg" - }, - { - "id": "d9dea2bc.47097", - "type": "exec", - "z": "7f885510.6173fc", - "command": "bash $HOME/PlanktonScope/scripts/killer.sh focus.py && bash $HOME/PlanktonScope/scripts/killer.sh focus.py", - "addpay": false, - "append": "", - "useSpawn": "false", - "timer": "", - "oldrc": false, - "name": "Kill Focus", - "x": 820, - "y": 400, - "wires": [ - [], - [], - [] - ], - "icon": "font-awesome/fa-stop" - }, - { - "id": "2d0f6720.0f92f8", - "type": "ui_template", - "z": "7f885510.6173fc", - "group": "832434ce.ebe498", - "name": "Pi Camera settings", - "order": 7, - "width": 0, - "height": 0, - "format": "\n", - "storeOutMessages": true, - "fwdInMessages": true, - "templateScope": "local", - "x": 1010, - "y": 100, - "wires": [ - [] - ] - }, - { - "id": "9599b953.529c28", - "type": "ui_template", - "z": "7f885510.6173fc", - "group": "832434ce.ebe498", - "name": "process_pixel", - "order": 3, - "width": 0, - "height": 0, - "format": "
\n Pixel resolution :\n \n μm\n
", - "storeOutMessages": true, - "fwdInMessages": true, - "templateScope": "local", - "x": 1600, - "y": 80, - "wires": [ - [] - ] - }, - { - "id": "612e2b9b.ed1684", - "type": "ui_template", - "z": "7f885510.6173fc", - "group": "832434ce.ebe498", - "name": "min_size", - "order": 4, - "width": 0, - "height": 0, - "format": "
\n Smallest cells to explore :\n \n μm\n
", - "storeOutMessages": true, - "fwdInMessages": true, - "templateScope": "local", - "x": 1580, - "y": 120, - "wires": [ - [] - ] - }, - { - "id": "f84ab57a.556df8", - "type": "ui_template", - "z": "7f885510.6173fc", - "group": "832434ce.ebe498", - "name": "max_size", - "order": 5, - "width": 0, - "height": 0, - "format": "
\n Biggest cells to explore :\n \n μm\n
", - "storeOutMessages": true, - "fwdInMessages": true, - "templateScope": "local", - "x": 1580, - "y": 160, - "wires": [ - [] - ] - }, - { - "id": "45f53656.d631e8", - "type": "ui_template", - "z": "7f885510.6173fc", - "group": "832434ce.ebe498", - "name": "flowrate", - "order": 6, - "width": 0, - "height": 0, - "format": "
\n Suggested flowrate :\n \n ml/min\n
", - "storeOutMessages": true, - "fwdInMessages": true, - "templateScope": "local", - "x": 1580, - "y": 200, - "wires": [ - [] - ] - }, - { - "id": "53ec5f97.7567c", - "type": "ui_template", - "z": "7f885510.6173fc", - "group": "3d740a07.4674e6", - "name": "Stream Pi Camera", - "order": 1, - "width": 0, - "height": 0, - "format": "
", - "storeOutMessages": true, - "fwdInMessages": true, - "templateScope": "local", - "x": 570, - "y": 40, - "wires": [ - [] - ] - }, - { - "id": "c84f1718.4af6b8", - "type": "ui_switch", - "z": "7f885510.6173fc", - "name": "fan_state", - "label": "Fan", - "tooltip": "", - "group": "c62ffbd3.787ef8", - "order": 2, - "width": 2, - "height": 1, - "passthru": true, - "decouple": "false", - "topic": "", - "style": "", - "onvalue": "true", - "onvalueType": "bool", - "onicon": "", - "oncolor": "", - "offvalue": "false", - "offvalueType": "bool", - "officon": "", - "offcolor": "", - "x": 520, - "y": 220, - "wires": [ - [ - "dec2b84a.6faa18" - ] - ] - }, - { - "id": "dec2b84a.6faa18", - "type": "exec", - "z": "7f885510.6173fc", - "command": "python3.7 $HOME/PlanktonScope/scripts/fan.py", - "addpay": true, - "append": "", - "useSpawn": "false", - "timer": "", - "oldrc": false, - "name": "fan.py", - "x": 810, - "y": 220, - "wires": [ - [], - [], - [] - ], - "icon": "font-awesome/fa-spinner" - }, - { - "id": "477dc1bd.c3de8", - "type": "ui_text_input", - "z": "7f885510.6173fc", - "name": "acq_id", - "label": "Acquisition unique ID*", - "tooltip": "", - "group": "a61f7be8.af6418", - "order": 1, - "width": 4, - "height": 1, - "passthru": true, - "mode": "text", - "delay": 300, - "topic": "acq_id", - "x": 530, - "y": 680, - "wires": [ - [ - "263878b3.e0a478" - ] - ] - }, - { - "id": "3dd9a121.e386de", - "type": "function", - "z": "7f885510.6173fc", - "name": "set global", - "func": "var value = msg.payload.split(' ').join('_');\nvar key = msg.topic;\n\nglobal.set(key,value);", - "outputs": 1, - "noerr": 0, - "x": 340, - "y": 40, - "wires": [ - [] - ] - }, - { - "id": "c83fc403.8ba2d8", - "type": "function", - "z": "7f885510.6173fc", - "name": "get magnification", - "func": "var magnification = global.get(\"magnification\");\nmsg.payload = magnification;\nreturn msg;", - "outputs": 1, - "noerr": 0, - "x": 1410, - "y": 40, - "wires": [ - [ - "72d57e31.59234" - ] - ] - }, - { - "id": "48d9cc9c.852214", - "type": "function", - "z": "7f885510.6173fc", - "name": "get process_pixel", - "func": "var process_pixel = global.get(\"process_pixel\");\nmsg.payload = process_pixel;\nreturn msg;", - "outputs": 1, - "noerr": 0, - "x": 1410, - "y": 80, - "wires": [ - [ - "9599b953.529c28" - ] - ] - }, - { - "id": "44969aec.4e87e4", - "type": "function", - "z": "7f885510.6173fc", - "name": "get sug_min", - "func": "var sug_min = global.get(\"sug_min\");\nmsg.payload = sug_min;\nreturn msg;", - "outputs": 1, - "noerr": 0, - "x": 1390, - "y": 120, - "wires": [ - [ - "612e2b9b.ed1684" - ] - ] - }, - { - "id": "a1201a.dc3f8fe8", - "type": "function", - "z": "7f885510.6173fc", - "name": "get sug_max", - "func": "var sug_max = global.get(\"sug_max\");\nmsg.payload = sug_max;\nreturn msg;", - "outputs": 1, - "noerr": 0, - "x": 1390, - "y": 160, - "wires": [ - [ - "f84ab57a.556df8" - ] - ] - }, - { - "id": "89b9399b.9389a8", - "type": "function", - "z": "7f885510.6173fc", - "name": "get flowrate", - "func": "var sug_flowrate = global.get(\"sug_flowrate\");\nmsg.payload = sug_flowrate\nreturn msg;", - "outputs": 1, - "noerr": 0, - "x": 1390, - "y": 200, - "wires": [ - [ - "45f53656.d631e8" - ] - ] - }, - { - "id": "c650b922.6adef8", - "type": "function", - "z": "7f885510.6173fc", - "name": "set global", - "func": "var value = msg.payload;\nvar key = msg.topic;\n\nglobal.set(key,value);", - "outputs": 1, - "noerr": 0, - "x": 1180, - "y": 320, - "wires": [ - [] - ] - }, - { - "id": "e4c54d5a.19ff3", - "type": "ui_numeric", - "z": "7f885510.6173fc", - "name": "sample_year", - "label": "/", - "tooltip": "", - "group": "106f0e1b.6478a2", - "order": 3, - "width": 2, - "height": 1, - "wrap": false, - "passthru": true, - "topic": "sample_year", - "format": "{{value}}", - "min": "19", - "max": "50", - "step": 1, - "x": 1010, - "y": 480, - "wires": [ - [ - "c650b922.6adef8" - ] - ] - }, - { - "id": "b45db708.cedec8", - "type": "ui_numeric", - "z": "7f885510.6173fc", - "name": "sample_month", - "label": "/", - "tooltip": "", - "group": "106f0e1b.6478a2", - "order": 2, - "width": 2, - "height": 1, - "wrap": false, - "passthru": true, - "topic": "sample_month", - "format": "{{value}}", - "min": "1", - "max": "12", - "step": 1, - "x": 1000, - "y": 440, - "wires": [ - [ - "c650b922.6adef8" - ] - ] - }, - { - "id": "6351d257.6d7f1c", - "type": "ui_numeric", - "z": "7f885510.6173fc", - "name": "sample_day", - "label": "Date*", - "tooltip": "", - "group": "106f0e1b.6478a2", - "order": 1, - "width": 3, - "height": 1, - "wrap": false, - "passthru": true, - "topic": "sample_day", - "format": "{{value}}", - "min": "1", - "max": "31", - "step": 1, - "x": 1010, - "y": 400, - "wires": [ - [ - "c650b922.6adef8" - ] - ] - }, - { - "id": "9ee03294.39987", - "type": "ui_numeric", - "z": "7f885510.6173fc", - "name": "sample_hour", - "label": "Time*", - "tooltip": "", - "group": "106f0e1b.6478a2", - "order": 4, - "width": 5, - "height": 1, - "wrap": false, - "passthru": true, - "topic": "sample_hour", - "format": "{{value}}", - "min": "0", - "max": "24", - "step": 1, - "x": 1010, - "y": 520, - "wires": [ - [ - "c650b922.6adef8" - ] - ] - }, - { - "id": "5bd11314.ae6e4c", - "type": "ui_numeric", - "z": "7f885510.6173fc", - "name": "sample_minute", - "label": ":", - "tooltip": "", - "group": "106f0e1b.6478a2", - "order": 5, - "width": 2, - "height": 1, - "wrap": false, - "passthru": true, - "topic": "sample_minute", - "format": "{{value}}", - "min": "0", - "max": "59", - "step": 1, - "x": 1000, - "y": 560, - "wires": [ - [ - "c650b922.6adef8" - ] - ] - }, - { - "id": "8861710f.55b92", - "type": "function", - "z": "7f885510.6173fc", - "name": "set global", - "func": "var value = msg.payload;\nvar key = msg.topic;\n\nglobal.set(key,value);", - "outputs": 1, - "noerr": 0, - "x": 340, - "y": 280, - "wires": [ - [] - ] - }, - { - "id": "a8cb0c6e.7220d", - "type": "function", - "z": "7f885510.6173fc", - "name": "store generic", - "func": "global.set(\"acq_instrument\",\"PlanktonScope V2.1\");\nglobal.set(\"acq_software\",\"Node-RED Dashboard\");\nglobal.set(\"acq_camera\",\"Pi Camera V2.1\");\nglobal.set(\"acq_instrument_ID\",\"Odezenne\");", - "outputs": 1, - "noerr": 0, - "x": 350, - "y": 420, - "wires": [ - [] - ] - }, - { - "id": "263878b3.e0a478", - "type": "function", - "z": "7f885510.6173fc", - "name": "set global", - "func": "var value = msg.payload;\nvar key = msg.topic;\n\nglobal.set(key,value);", - "outputs": 1, - "noerr": 0, - "x": 680, - "y": 660, - "wires": [ - [] - ] - }, - { - "id": "4b3ea5bd.03248c", - "type": "ui_button", - "z": "7f885510.6173fc", - "name": "backward", - "group": "c62ffbd3.787ef8", - "order": 7, - "width": 3, - "height": 1, - "passthru": false, - "label": "Backward", - "tooltip": "", - "color": "", - "bgcolor": "", - "icon": "arrow_back", - "payload": "backward", - "payloadType": "str", - "topic": "backward", - "x": 520, - "y": 460, - "wires": [ - [ - "84fd85fd.426878" - ] - ] - }, - { - "id": "cfe9783a.286438", - "type": "ui_button", - "z": "7f885510.6173fc", - "name": "foward", - "group": "c62ffbd3.787ef8", - "order": 9, - "width": 3, - "height": 1, - "passthru": true, - "label": "Forward", - "tooltip": "", - "color": "", - "bgcolor": "", - "icon": "arrow_forward", - "payload": "foward", - "payloadType": "str", - "topic": "foward", - "x": 530, - "y": 540, - "wires": [ - [ - "84fd85fd.426878" - ] - ] - }, - { - "id": "83d75b6b.6afa28", - "type": "ui_button", - "z": "7f885510.6173fc", - "name": "kill_pump", - "group": "c62ffbd3.787ef8", - "order": 10, - "width": 2, - "height": 1, - "passthru": false, - "label": "Cancel pump", - "tooltip": "", - "color": "#AD1625", - "bgcolor": "#333333", - "icon": "pause", - "payload": "", - "payloadType": "str", - "topic": "", - "x": 520, - "y": 580, - "wires": [ - [ - "8fc930df.c7ae6" - ] - ] - }, - { - "id": "84fd85fd.426878", - "type": "function", - "z": "7f885510.6173fc", - "name": "pump", - "func": "if(msg.topic === \"volume\"){\n volume = msg.payload;\n global.set(\"volume\",volume);\n}\nif(msg.topic === \"foward\"){\n\n volume = global.get(\"volume\");\n flowrate = global.get(\"flowrate\");\n\n action = \" foward\";\n\n msg.payload = String(volume).concat(' ',flowrate, action);\n return msg;\n}\nif(msg.topic === \"backward\"){\n \n volume = global.get(\"volume\");\n flowrate = global.get(\"flowrate\");\n\n action = \" backward\";\n msg.payload = String(volume).concat(' ',flowrate, action);\n\n return msg;\n}\n\n", - "outputs": 1, - "noerr": 0, - "x": 670, - "y": 500, - "wires": [ - [ - "649f7ec8.06a84" - ] - ], - "info": "### Focusing\n##### focus.py `nb_step` `orientation`\n\n- `nb_step` : **integer** (from 1 to 100000) - number of step to perform by the stage (about 31um/step)\n- `orientation` : **string** - orientation of the focus either `up` or `down`\n\nExample:\n\n python3.7 $HOME/PlanktonScope/scripts/focus.py 650 up\n" - }, - { - "id": "649f7ec8.06a84", - "type": "exec", - "z": "7f885510.6173fc", - "command": "python3.7 $HOME/PlanktonScope/scripts/pump.py", - "addpay": true, - "append": "", - "useSpawn": "false", - "timer": "", - "oldrc": false, - "name": "pump.py", - "x": 820, - "y": 500, - "wires": [ - [], - [], - [] - ], - "icon": "font-awesome/fa-rotate-left" - }, - { - "id": "8fc930df.c7ae6", - "type": "exec", - "z": "7f885510.6173fc", - "command": "bash $HOME/PlanktonScope/scripts/killer.sh pump.py && bash $HOME/PlanktonScope/scripts/killer.sh pump.py", - "addpay": false, - "append": "", - "useSpawn": "false", - "timer": "", - "oldrc": false, - "name": "Kill Pump", - "x": 820, - "y": 580, - "wires": [ - [], - [], - [] - ], - "icon": "font-awesome/fa-stop" - }, - { - "id": "6bf10b4c.c83c84", - "type": "ui_button", - "z": "7f885510.6173fc", - "name": "start", - "group": "a61f7be8.af6418", - "order": 2, - "width": 4, - "height": 1, - "passthru": false, - "label": "Start Acquisition", - "tooltip": "", - "color": "", - "bgcolor": "", - "icon": "play_circle_fill", - "payload": "", - "payloadType": "str", - "topic": "start", - "x": 530, - "y": 760, - "wires": [ - [ - "3fe055c2.6ab7da", - "82c90711.145108", - "e1dbc623.8df898", - "5a95f150.76ab3" - ] - ] - }, - { - "id": "2c9498e7.bf0c38", - "type": "ui_button", - "z": "7f885510.6173fc", - "name": "cancel", - "group": "a61f7be8.af6418", - "order": 3, - "width": 4, - "height": 1, - "passthru": false, - "label": "Cancel Acquisition", - "tooltip": "", - "color": "#AD1625", - "bgcolor": "#333333", - "icon": "pause_circle_filled", - "payload": "", - "payloadType": "str", - "topic": "cancel", - "x": 530, - "y": 980, - "wires": [ - [ - "f2acb5e0.c2c898", - "2bfa509a.9fc06", - "a2a07a68.274a78", - "4cd6d848.672778" - ] - ] - }, - { - "id": "b0fda998.f0ad48", - "type": "file", - "z": "7f885510.6173fc", - "name": "logs.json", - "filename": "/var/www/logs.json", - "appendNewline": true, - "createDir": false, - "overwriteFile": "false", - "encoding": "none", - "x": 820, - "y": 760, - "wires": [ - [] - ] - }, - { - "id": "3fe055c2.6ab7da", - "type": "function", - "z": "7f885510.6173fc", - "name": "get global", - "func": "msg.payload = {\n \"sample\":{\n \"sample_project\":global.get(\"sample_project\"),\n \"sample_ship\":global.get(\"sample_ship\"),\n \"sample_operator\":global.get(\"sample_operator\"),\n \"sample_id\":global.get(\"sample_id\"),\n \"sample_sampling_gear\":global.get(\"sample_sampling_gear\"),\n \"sample_hour\":global.get(\"sample_hour\"),\n \"sample_minute\":global.get(\"sample_minute\"),\n \"sample_day\":global.get(\"sample_day\"),\n \"sample_month\":global.get(\"sample_month\"),\n \"sample_year\":global.get(\"sample_year\")\n },\n \"object\":{\n \"object_lat\":global.get(\"object_lat\"),\n \"object_lon\":global.get(\"object_lon\")\n },\n \"acquisition\":{\n \"acq_id\":global.get(\"acq_id\"),\n \"acq_fnumber_objective\":global.get(\"acq_fnumber_objective\"),\n \"acq_celltype\":global.get(\"acq_celltype\"),\n \"acq_maximum_mesh\":global.get(\"acq_maximum_mesh\"),\n \"acq_minimum_mesh\":global.get(\"acq_minimum_mesh\"),\n \"process_pixel\":global.get(\"process_pixel\"),\n \"acq_camera\":global.get(\"acq_camera\"),\n \"acq_instrument\":global.get(\"acq_instrument\"),\n \"acq_software\":global.get(\"acq_software\"),\n \"acq_instrument_ID\":global.get(\"acq_instrument_ID\")\n },\n \"process\":{\n \"process_pixel\":global.get(\"process_pixel\")\n }\n}\nreturn msg;", - "outputs": 1, - "noerr": 0, - "x": 680, - "y": 760, - "wires": [ - [ - "b0fda998.f0ad48" - ] - ] - }, - { - "id": "f2acb5e0.c2c898", - "type": "exec", - "z": "7f885510.6173fc", - "command": "sed -ie '$d' /home/pi/PlanktonScope/logs.json", - "addpay": false, - "append": "", - "useSpawn": "false", - "timer": "", - "oldrc": false, - "name": "Remove last log", - "x": 700, - "y": 1000, - "wires": [ - [], - [], - [] - ], - "icon": "font-awesome/fa-close" - }, - { - "id": "2bfa509a.9fc06", - "type": "link out", - "z": "7f885510.6173fc", - "name": "cancel_pump", - "links": [ - "eadbf812.3ea798" - ], - "x": 635, - "y": 940, - "wires": [] - }, - { - "id": "eadbf812.3ea798", - "type": "link in", - "z": "7f885510.6173fc", - "name": "", - "links": [ - "2bfa509a.9fc06" - ], - "x": 715, - "y": 600, - "wires": [ - [ - "8fc930df.c7ae6" - ] - ] - }, - { - "id": "217d8bc.8fb7374", - "type": "ui_template", - "z": "7f885510.6173fc", - "group": "79767bcc.30bb94", - "name": "Instructions", - "order": 1, - "width": 0, - "height": 0, - "format": "

In case you forget dude but it's important to read this whenever you are not sure before clicking on any buttons.

\n
\n

Focusing :

\n

To focus, you need to specify a value for the number of steps. Then, you can click once but wait while the stage is moving.

\n

To cancel a focusing, click once on CANCEL FOCUS.

\n
\n

Pumping manually :

\n

To focus, you need to specify a value for the volume. Then, you can click once in order to pump manually a defined volume in a certain direction.

\n

To cancel a pumping event, click once on CANCEL PUMP.

\n

Do not run an acquisition if you are using the pump manually.

\n
\n

Start Acquisition :

\n

Taking images will requires few inputs :

\n
    \n
  1. Name of the project
  2. \n
  3. Name of the station
  4. \n
  5. Acquisition ID
  6. \n
  7. Volume
  8. \n
  9. M12 Lens
  10. \n
\n

If any of the previous settings are missing, it's going to be a real mess and delete previous acquisition. So check twice here !!

\n

The other inputs are always welcome ;)

\n
\n

Cancel Acquisition :

\n

I made this button CANCEL ACQUISITION to cancel an acquisition which maybe be fucked.

\n

Image you click it, it's going to delete the folder in which you save this acquisition, meaning execute :

\n

 

\nrm -r  /var/www/Name_of_the_project/Name_of_the_station/Acquisition_ID\n

 

\n

So if you made a great acquisition, then run a new one with the same input for Acquisition ID and finally click on this button, you are going to delete them both.

\n

Don't use it if you don't need it and please never click twice because the pi might burn.

\n
\n

ssh :

\n

To access the inside of the pi, you can use ssh from from terminal once your are connected to the WiFi by typing this command : ssh -Y planktonscope@192.168.4.1

\n

 

\n

The Password is : raspberry

\n
\n

Data :

\n

In order to access your acquisitions, you can either click on this link or get to the directory via ssh : /var/www/

\n
\n

In order to access the script via ssh, you can get to the directory : /home/pi/PlanktonScope/

\n", - "storeOutMessages": true, - "fwdInMessages": true, - "templateScope": "local", - "x": 570, - "y": 1180, - "wires": [ - [] - ] - }, - { - "id": "82c90711.145108", - "type": "function", - "z": "7f885510.6173fc", - "name": "image", - "func": "var sample_project= global.get(\"sample_project\");\nvar sample_id= global.get(\"sample_id\");\nvar acq_id= global.get(\"acq_id\");\nvar volume= global.get(\"volume\");\nvar flowrate= global.get(\"flowrate\");\nmsg.payload = \"/var/www/\"+sample_project+\"/\"+sample_id+\"/\"+acq_id+\" \"+volume+\" \"+flowrate\nreturn msg;", - "outputs": 1, - "noerr": 0, - "x": 670, - "y": 800, - "wires": [ - [ - "38c8440d.d0139c" - ] - ] - }, - { - "id": "1e9ae141.a0729f", - "type": "exec", - "z": "7f885510.6173fc", - "command": "python3.7 $HOME/PlanktonScope/scripts/image.py", - "addpay": true, - "append": "", - "useSpawn": "false", - "timer": "", - "oldrc": false, - "name": "image.py", - "x": 960, - "y": 800, - "wires": [ - [], - [], - [] - ], - "icon": "font-awesome/fa-file-image-o" - }, - { - "id": "7d2d5235.35f5ec", - "type": "exec", - "z": "7f885510.6173fc", - "command": "bash /home/pi/PlanktonScope/scripts/kill_image.sh", - "addpay": true, - "append": "", - "useSpawn": "false", - "timer": "", - "oldrc": false, - "name": "Kill Image", - "x": 840, - "y": 1060, - "wires": [ - [], - [], - [] - ] - }, - { - "id": "a2a07a68.274a78", - "type": "function", - "z": "7f885510.6173fc", - "name": "get global", - "func": "var in_path= global.get(\"in_path\");\nvar sample_project= global.get(\"sample_project\");\nvar sample_id= global.get(\"sample_id\");\nvar acq_id= global.get(\"acq_id\");\nmsg.payload = \"/var/www/\"+sample_project+\"/\"+sample_id+\"/\"+acq_id\nreturn msg;", - "outputs": 1, - "noerr": 0, - "x": 680, - "y": 1060, - "wires": [ - [ - "7d2d5235.35f5ec" - ] - ] - }, - { - "id": "e1dbc623.8df898", - "type": "exec", - "z": "7f885510.6173fc", - "command": "bash /home/pi/RPi_Cam_Web_Interface/stop.sh", - "addpay": false, - "append": "", - "useSpawn": "false", - "timer": "", - "oldrc": false, - "name": "Stop RPi Web Interface", - "x": 730, - "y": 860, - "wires": [ - [], - [], - [] - ] - }, - { - "id": "597635eb.72154c", - "type": "exec", - "z": "7f885510.6173fc", - "command": "bash /home/pi/RPi_Cam_Web_Interface/start.sh", - "addpay": false, - "append": "", - "useSpawn": "false", - "timer": "", - "oldrc": false, - "name": "Start RPi Web Interface", - "x": 890, - "y": 1120, - "wires": [ - [], - [], - [] - ] - }, - { - "id": "4cd6d848.672778", - "type": "delay", - "z": "7f885510.6173fc", - "name": "", - "pauseType": "delay", - "timeout": "2", - "timeoutUnits": "seconds", - "rate": "1", - "nbRateUnits": "1", - "rateUnits": "second", - "randomFirst": "1", - "randomLast": "5", - "randomUnits": "seconds", - "drop": false, - "x": 680, - "y": 1120, - "wires": [ - [ - "597635eb.72154c" - ] - ] - }, - { - "id": "38c8440d.d0139c", - "type": "delay", - "z": "7f885510.6173fc", - "name": "", - "pauseType": "delay", - "timeout": "2", - "timeoutUnits": "seconds", - "rate": "1", - "nbRateUnits": "1", - "rateUnits": "second", - "randomFirst": "1", - "randomLast": "5", - "randomUnits": "seconds", - "drop": false, - "x": 820, - "y": 800, - "wires": [ - [ - "1e9ae141.a0729f" - ] - ] - }, - { - "id": "5a95f150.76ab3", - "type": "link out", - "z": "7f885510.6173fc", - "name": "start_pump", - "links": [ - "5da0773a.700338" - ], - "x": 635, - "y": 720, - "wires": [] - }, - { - "id": "5da0773a.700338", - "type": "link in", - "z": "7f885510.6173fc", - "name": "", - "links": [ - "5a95f150.76ab3" - ], - "x": 715, - "y": 540, - "wires": [ - [ - "649f7ec8.06a84" - ] - ] - }, - { - "id": "4b817fa7.d0d14", - "type": "ui_numeric", - "z": "7f885510.6173fc", - "name": "flowrate", - "label": "Flowrate (ml/min)*", - "tooltip": "", - "group": "a72a9ec6.bb144", - "order": 4, - "width": 0, - "height": 0, - "wrap": false, - "passthru": true, - "topic": "flowrate", - "format": "{{value}}", - "min": "0.3", - "max": "20", - "step": "0.1", - "x": 180, - "y": 400, - "wires": [ - [ - "8861710f.55b92" - ] - ] - }, - { - "id": "42d9d2cb.9d3f84", - "type": "ui_numeric", - "z": "7f885510.6173fc", - "name": "nb_step", - "label": "nb step (30μm/step)", - "tooltip": "", - "group": "c62ffbd3.787ef8", - "order": 4, - "width": 4, - "height": 1, - "wrap": false, - "passthru": true, - "topic": "nb_step", - "format": "{{value}}", - "min": "1", - "max": "5000", - "step": 1, - "x": 520, - "y": 320, - "wires": [ - [ - "523fdeaa.50c6c" - ] - ] - }, - { - "id": "4287fe47.26a63", - "type": "ui_numeric", - "z": "7f885510.6173fc", - "name": "volume", - "label": "Volume (ml)*", - "tooltip": "", - "group": "c62ffbd3.787ef8", - "order": 8, - "width": 4, - "height": 1, - "wrap": false, - "passthru": true, - "topic": "volume", - "format": "{{value}}", - "min": "1", - "max": "5000", - "step": 1, - "x": 520, - "y": 500, - "wires": [ - [ - "84fd85fd.426878" - ] - ] - }, - { - "id": "c627ea8d.f886e8", - "type": "ui_group", - "z": "", - "name": "Sample", - "tab": "6b01f851.598028", - "order": 1, - "disp": true, - "width": 6, - "collapse": false - }, - { - "id": "106f0e1b.6478a2", - "type": "ui_group", - "z": "", - "name": "Spatio Temporal", - "tab": "6b01f851.598028", - "order": 6, - "disp": true, - "width": 7, - "collapse": false - }, - { - "id": "832434ce.ebe498", - "type": "ui_group", - "z": "", - "name": "Optic Settings", - "tab": "6b01f851.598028", - "order": 3, - "disp": true, - "width": "7", - "collapse": false - }, - { - "id": "77a6994b.e3efb8", - "type": "ui_group", - "z": "", - "name": "Generic info", - "tab": "6b01f851.598028", - "order": 7, - "disp": true, - "width": 6, - "collapse": false - }, - { - "id": "a72a9ec6.bb144", - "type": "ui_group", - "z": "", - "name": "Fluidic settings", - "tab": "6b01f851.598028", - "order": 4, - "disp": true, - "width": 6, - "collapse": false - }, - { - "id": "c62ffbd3.787ef8", - "type": "ui_group", - "z": "", - "name": "Controller", - "tab": "6b01f851.598028", - "order": 5, - "disp": true, - "width": "12", - "collapse": false - }, - { - "id": "3d740a07.4674e6", - "type": "ui_group", - "z": "", - "name": "Preview", - "tab": "6b01f851.598028", - "order": 2, - "disp": true, - "width": 12, - "collapse": false - }, - { - "id": "a61f7be8.af6418", - "type": "ui_group", - "z": "", - "name": "Acquisition", - "tab": "6b01f851.598028", - "order": 8, - "disp": true, - "width": 12, - "collapse": false - }, - { - "id": "79767bcc.30bb94", - "type": "ui_group", - "z": "", - "name": "Reminder", - "tab": "6b01f851.598028", - "order": 9, - "disp": true, - "width": 27, - "collapse": false - }, - { - "id": "6b01f851.598028", - "type": "ui_tab", - "z": "", - "name": "PlanktonScope GUI v2.1", - "icon": "date_range", - "order": 1, - "disabled": false, - "hidden": false - } -]