web ui
This commit is contained in:
@@ -149,11 +149,15 @@ class MultiWellManager:
|
|||||||
uuid = f'{self.process.data.session}-{multiwell.position}-{wl.well.name}'
|
uuid = f'{self.process.data.session}-{multiwell.position}-{wl.well.name}'
|
||||||
self._grid_scanning_capture(uuid, multiwell.duration)
|
self._grid_scanning_capture(uuid, multiwell.duration)
|
||||||
|
|
||||||
|
self.process._send(uuid=uuid)
|
||||||
|
|
||||||
logger.info(f"Scan terminé — retour à l'origine (X={xnext:.1f} Y={ynext:.1f})")
|
logger.info(f"Scan terminé — retour à l'origine (X={xnext:.1f} Y={ynext:.1f})")
|
||||||
self.cnc_controller.move_to(xnext, ynext, feed=multiwell.feed*2)
|
self.cnc_controller.move_to(xnext, ynext, feed=multiwell.feed*2)
|
||||||
|
|
||||||
|
|
||||||
def _start_scanning(self, session, observations):
|
def _start_scanning(self, session, observations):
|
||||||
|
self.process.cam._aligner.debug = False
|
||||||
|
|
||||||
xynext = []
|
xynext = []
|
||||||
for obs in observations:
|
for obs in observations:
|
||||||
xynext.append((obs.multiwell.xbase, obs.multiwell.ybase))
|
xynext.append((obs.multiwell.xbase, obs.multiwell.ybase))
|
||||||
@@ -256,7 +260,8 @@ class MultiWellManager:
|
|||||||
self.cnc_controller.move_to(self.cnc_controller.x + dx_mm, self.cnc_controller.y + dy_mm, feed=150)
|
self.cnc_controller.move_to(self.cnc_controller.x + dx_mm, self.cnc_controller.y + dy_mm, feed=150)
|
||||||
self.process._send(state='center', msg=msg)
|
self.process._send(state='center', msg=msg)
|
||||||
|
|
||||||
elif cam.align_detection.get('action') in ['none',]:
|
elif cam.align_detection.get('action') in ['none']:
|
||||||
|
msg = f"Ok centre trouvé. {msg}"
|
||||||
logger.info(msg)
|
logger.info(msg)
|
||||||
self.process._send(state='save', msg=msg)
|
self.process._send(state='save', msg=msg)
|
||||||
wl.x, wl.y = self.cnc_controller.x, self.cnc_controller.y
|
wl.x, wl.y = self.cnc_controller.x, self.cnc_controller.y
|
||||||
|
|||||||
@@ -1,38 +1,4 @@
|
|||||||
|
|
||||||
.container {
|
|
||||||
height: 100%;
|
|
||||||
padding: 0.25em;
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: 180px 1fr 150px;
|
|
||||||
grid-template-rows: 64px 1fr;
|
|
||||||
|
|
||||||
gap: 1em 1em;
|
|
||||||
grid-auto-flow: row;
|
|
||||||
grid-template-areas:
|
|
||||||
"header header header"
|
|
||||||
"move scanner scan"
|
|
||||||
}
|
|
||||||
.header {
|
|
||||||
align-self: stretch;
|
|
||||||
grid-area: header;
|
|
||||||
}
|
|
||||||
|
|
||||||
.scanner {
|
|
||||||
justify-self: center;
|
|
||||||
align-self: center;
|
|
||||||
grid-area: scanner;
|
|
||||||
}
|
|
||||||
|
|
||||||
.scan {
|
|
||||||
padding: 0 0.25em;
|
|
||||||
align-self: start;
|
|
||||||
grid-area: scan;
|
|
||||||
}
|
|
||||||
.move {
|
|
||||||
align-self: start;
|
|
||||||
grid-area: move;
|
|
||||||
}
|
|
||||||
|
|
||||||
.well {
|
.well {
|
||||||
padding: 0.2em;
|
padding: 0.2em;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,18 +1,13 @@
|
|||||||
|
|
||||||
.multiwell_cards {
|
.multiwell_cards {
|
||||||
display: grid;
|
display: grid;
|
||||||
/*grid-auto-columns: 1fr;
|
grid-template-columns: repeat(6, 1fr);
|
||||||
grid-auto-rows: 1fr;*/
|
justify-items: center;
|
||||||
grid-template-columns: 1fr 1fr;
|
align-items: center;
|
||||||
grid-template-rows: 1fr 1fr 1fr;
|
|
||||||
gap: 0.1em;
|
|
||||||
grid-template-areas:
|
|
||||||
". ."
|
|
||||||
". ."
|
|
||||||
". .";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
button.multiwell {
|
button.multiwell {
|
||||||
padding: 0.15em ;
|
padding: 0.2em ;
|
||||||
}
|
}
|
||||||
|
|
||||||
#image-grid {
|
#image-grid {
|
||||||
|
|||||||
@@ -1,30 +1 @@
|
|||||||
|
|
||||||
|
|
||||||
.container {
|
|
||||||
height: 100%;
|
|
||||||
padding: 0.25em;
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: 180px 1fr;
|
|
||||||
grid-template-rows: 64px 0.5fr;
|
|
||||||
|
|
||||||
gap: 1em 1em;
|
|
||||||
grid-auto-flow: row;
|
|
||||||
grid-template-areas:
|
|
||||||
"header header"
|
|
||||||
"scan scanner"
|
|
||||||
}
|
|
||||||
.header {
|
|
||||||
align-self: stretch;
|
|
||||||
grid-area: header;
|
|
||||||
}
|
|
||||||
|
|
||||||
.scanner {
|
|
||||||
justify-self: center;
|
|
||||||
align-self: center;
|
|
||||||
grid-area: scanner;
|
|
||||||
}
|
|
||||||
|
|
||||||
.scan {
|
|
||||||
align-self: start;
|
|
||||||
grid-area: scan;
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,19 +1,15 @@
|
|||||||
|
|
||||||
.multiwell_cards {
|
.multiwell_cards {
|
||||||
display: grid;
|
display: grid;
|
||||||
/*grid-auto-columns: 1fr;
|
grid-template-columns: repeat(6, 1fr);
|
||||||
grid-auto-rows: 1fr;*/
|
justify-items: center;
|
||||||
grid-template-columns: 1fr 1fr;
|
align-items: center;
|
||||||
grid-template-rows: 1fr 1fr 1fr;
|
|
||||||
gap: 0.1em;
|
|
||||||
grid-template-areas:
|
|
||||||
". ."
|
|
||||||
". ."
|
|
||||||
". .";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
button.multiwell {
|
button.multiwell {
|
||||||
padding: 0.15em ;
|
padding: 0.2em ;
|
||||||
}
|
}
|
||||||
|
|
||||||
#replay-grid {
|
#replay-grid {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(var(--grid-columns, 1), 1fr);
|
grid-template-columns: repeat(var(--grid-columns, 1), 1fr);
|
||||||
|
|||||||
@@ -1,31 +0,0 @@
|
|||||||
|
|
||||||
.container {
|
|
||||||
padding: 0.25em;
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: 0.25fr 1.5fr;
|
|
||||||
grid-template-rows: 0.5fr 3fr 0.5fr;
|
|
||||||
grid-auto-columns: 1fr;
|
|
||||||
gap: 1em 1em;
|
|
||||||
grid-auto-flow: row;
|
|
||||||
grid-template-areas:
|
|
||||||
"header header"
|
|
||||||
"move scanner"
|
|
||||||
"command command";
|
|
||||||
}
|
|
||||||
.header {
|
|
||||||
align-self: stretch;
|
|
||||||
grid-area: header;
|
|
||||||
}
|
|
||||||
|
|
||||||
.command { grid-area: command; }
|
|
||||||
|
|
||||||
.scanner {
|
|
||||||
justify-self: center;
|
|
||||||
align-self: center;
|
|
||||||
grid-area: scanner;
|
|
||||||
}
|
|
||||||
|
|
||||||
.move {
|
|
||||||
align-self: stretch;
|
|
||||||
grid-area: move;
|
|
||||||
}
|
|
||||||
@@ -16,12 +16,13 @@ class ScannerManager {
|
|||||||
this.halt_bt = options.halt;
|
this.halt_bt = options.halt;
|
||||||
this.debug = options.debug;
|
this.debug = options.debug;
|
||||||
this.median = options.median;
|
this.median = options.median;
|
||||||
this._rop = options.crop;
|
this.crop = options.crop;
|
||||||
this.speed_px_s = options.speed_px_s;
|
this.speed_px_s = options.speed_px_s;
|
||||||
this.axial_speed = options.axial_speed;
|
this.axial_speed = options.axial_speed;
|
||||||
this.axial_pos = options.axial_pos;
|
this.axial_pos = options.axial_pos;
|
||||||
this.area_px = options.area_px;
|
this.area_px = options.area_px;
|
||||||
this.frame_count = options.frame_count;
|
this.frame_count = options.frame_count;
|
||||||
|
this.uuid = options.uuid;
|
||||||
}
|
}
|
||||||
|
|
||||||
init_controls() {
|
init_controls() {
|
||||||
|
|||||||
@@ -8,175 +8,180 @@
|
|||||||
{% block columns %}{% endblock %}
|
{% block columns %}{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="container w3-black">
|
<div class="w3-row w3-black">
|
||||||
<div class="header">
|
<div class="w3-quarter w3-center">
|
||||||
<div class="w3-row w3-row-padding">
|
<div class="w3-row w3-row-padding">
|
||||||
<div class="w3-col" style="width:20%">
|
<div class="w3-col w3-margin-bottom">
|
||||||
{% trans 'Position multi-puit' %}<br>
|
{% trans 'Position multi-puit' %}<br>
|
||||||
<select id="_well" class="w3-select">
|
<select id="_well" class="w3-select">
|
||||||
{% for w in wells %}
|
{% for w in wells %}
|
||||||
<option value="{{ w.position }}" {% if w.position == default_position %}selected{% endif %}>{{ w }}</option>
|
<option value="{{ w.position }}" {% if w.position == default_position %}selected{% endif %}>{{ w }}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="w3-col" style="width:15%">
|
<div class="w3-twothird">
|
||||||
<div>{% trans 'Vitesse' %}</div>
|
<div>{% trans 'Vitesse' %}</div>
|
||||||
<select id="_feed" class="w3-select">
|
<select id="_feed" class="w3-select" title="{% trans 'Vitesse en mm / mn' %}">
|
||||||
<option value="500">500 mm/mn</option>
|
<option value="500">500</option>
|
||||||
<option value="750">750 mm/mn</option>
|
<option value="750">750</option>
|
||||||
<option value="1000" selected>1000 mm/mn</option>
|
<option value="1000" selected>1000</option>
|
||||||
<option value="1200">1200 mm/mn</option>
|
<option value="1200">1200</option>
|
||||||
<option value="1500">1500 mm/mn</option>
|
<option value="1500">1500</option>
|
||||||
<option value="2000">2000 mm/mn</option>
|
<option value="2000">2000</option>
|
||||||
<option value="3000">3000 mm/mn</option>
|
<option value="3000">3000</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="w3-third">
|
||||||
<div class="w3-col" style="width:10%">
|
<div>{% trans 'Pas' %}</div>
|
||||||
<div>{% trans 'Pas' %}</div>
|
<select id="_step" class="w3-select" title="{% trans 'Pas en mm' %}">
|
||||||
<select id="_step" class="w3-select">
|
<option value="0.1">0.1</option>
|
||||||
<option value="0.1">0.1 mm</option>
|
<option value="0.25">0.25</option>
|
||||||
<option value="0.25">0.25 mm</option>
|
<option value="0.5">0.5</option>
|
||||||
<option value="0.5">0.5 mm</option>
|
<option value="1.0" selected>1.0</option>
|
||||||
<option value="1.0" selected>1.0 mm</option>
|
<option value="1.5">1.5</option>
|
||||||
<option value="1.5">1.5 mm</option>
|
<option value="2.0">2.0</option>
|
||||||
<option value="2.0">2.0 mm</option>
|
<option value="2.5">2.5</option>
|
||||||
<option value="2.5">2.5 mm</option>
|
<option value="5.0">5.0</option>
|
||||||
<option value="5.0">5.0 mm</option>
|
<option value="10.0">10.0</option>
|
||||||
<option value="10.0">10.0 mm</option>
|
<option value="20.0">20.0</option>
|
||||||
<option value="20.0">20.0 mm</option>
|
<option value="30.0">30.0</option>
|
||||||
<option value="30.0">30.0 mm</option>
|
<option value="40.0">40.0</option>
|
||||||
<option value="40.0">40.0 mm</option>
|
<option value="50.0">50.0</option>
|
||||||
<option value="50.0">50.0 mm</option>
|
</select>
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div class="w3-col" style="width:10%">
|
|
||||||
<div>{% trans 'Durée' %}</div>
|
|
||||||
<select id="_duration" class="w3-select" title="{% trans 'Durée entre vidéos' %}">
|
|
||||||
<option value="1.0">1 s</option>
|
|
||||||
<option value="2.0">2 s</option>
|
|
||||||
<option value="3.0">3 s</option>
|
|
||||||
<option value="4.0">4 s</option>
|
|
||||||
<option value="5.0" selected>5 s</option>
|
|
||||||
<option value="10">10 s</option>
|
|
||||||
<option value="15">15 s</option>
|
|
||||||
<option value="20">20 s</option>
|
|
||||||
<option value="30">30 s</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div class="w3-col" style="width:45%">
|
|
||||||
<div class="w3-margin-top w3-padding w3-right-align">
|
|
||||||
<span id="_ts"></span><br>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="w3-row w3-row-padding">
|
||||||
<div class="move w3-center">
|
<div class="w3-col">
|
||||||
<div class="w3-row w3-border w3-bold w3-margin-bottom">
|
<button id="_xy-base" class="w3-button w3-dark-xlight w3-round-large w3-margin-top w3-margin-bottom w3-block"
|
||||||
<div class="w3-half">X<br><span id="_x"></span></div>
|
title="{% trans 'Définir la base (x, y) du multi-puit' %}">
|
||||||
<div class="w3-half">Y<br><span id="_y"></span></div>
|
{% trans 'Définir base' %}<br><i class="fa-solid fa-circle-check w3-text-orange w3-xlarge"></i>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="w3-row">
|
<div class="w3-col">
|
||||||
<div class="w3-col">
|
<button id="_right" class="w3-button w3-dark-xlight w3-round-large w3-margin-bottom w3-padding-small">
|
||||||
<button id="_xy-base" class="w3-button w3-dark-xlight w3-round-large w3-margin-small w3-block"
|
+X<br><i class="fa-solid fa-circle-up w3-xlarge"></i>
|
||||||
title="{% trans 'Définir la base (x, y) du multi-puit' %}">
|
</button>
|
||||||
{% trans 'Définir base' %}<br><i class="fa-solid fa-circle-check w3-text-orange w3-xxlarge"></i>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<div class="w3-col">
|
|
||||||
<button id="_right" class="w3-button w3-dark-xlight w3-round-large w3-padding-small">
|
|
||||||
+X<br><i class="fa-solid fa-circle-up w3-xxlarge"></i>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<div class="w3-third">
|
|
||||||
<button id="_down" class="w3-button w3-dark-xlight w3-round-large w3-padding-small">
|
|
||||||
-Y<br><i class="fa-solid fa-circle-arrow-left w3-xxlarge"></i>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<div class="w3-third">
|
|
||||||
<button id="_set_well" class="w3-button w3-dark-xlight w3-round-large w3-padding-small"
|
|
||||||
title="{% trans 'Sauvegarder la position du puit courant' %}">
|
|
||||||
<span class="w3-small">Position</span><br><i class="fa-solid fa-circle-check w3-xxlarge w3-text-orange"></i>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<div class="w3-third">
|
|
||||||
<button id="_up" class="w3-button w3-dark-xlight w3-round-large w3-padding-small">
|
|
||||||
+Y<br><i class="fa-solid fa-circle-arrow-right w3-xxlarge"></i>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<div class="w3-col">
|
|
||||||
<button id="_left" class="w3-button w3-dark-xlight w3-round-large w3-padding-small">
|
|
||||||
-X<br><i class="fa-solid fa-circle-down w3-xxlarge"></i>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="w3-third">
|
||||||
<div class="w3-row">
|
<button id="_down" class="w3-button w3-dark-xlight w3-round-large w3-padding-small">
|
||||||
<div id="_well_btn" class="w3-col w3-margin-top w3-margin-bottom"></div>
|
-Y<br><i class="fa-solid fa-circle-arrow-left w3-xlarge"></i>
|
||||||
|
</button>
|
||||||
<div class="w3-third">
|
</div>
|
||||||
<button id="_previous" class="w3-button w3-dark-xlight w3-round-large w3-padding-small">
|
<div class="w3-third">
|
||||||
<span class="w3-small">{% trans 'Précéd.' %}</span><br><i class="fa-solid fa-circle-left w3-xxlarge"></i>
|
<button id="_set_well" class="w3-button w3-dark-xlight w3-round-large w3-padding-small"
|
||||||
</button>
|
title="{% trans 'Sauvegarder la position du puit courant' %}">
|
||||||
</div>
|
<span class="w3-small">Position</span><br><i class="fa-solid fa-circle-check w3-xlarge w3-text-orange"></i>
|
||||||
<div class="w3-third">
|
</button>
|
||||||
<button id="_calib_center" class="w3-button w3-dark-xlight w3-round-large w3-padding-small" title="{% trans 'Centrer manuellement' %}">
|
</div>
|
||||||
<span class="w3-small">{% trans 'Centrer' %}</span><br><i class="fa-regular fa-circle w3-xxlarge w3-text-orange"></i>
|
<div class="w3-third">
|
||||||
</button>
|
<button id="_up" class="w3-button w3-dark-xlight w3-round-large w3-padding-small">
|
||||||
</div>
|
+Y<br><i class="fa-solid fa-circle-arrow-right w3-xlarge"></i>
|
||||||
<div class="w3-third">
|
</button>
|
||||||
<button id="_next" class="w3-button w3-dark-xlight w3-round-large w3-padding-small">
|
</div>
|
||||||
<span class="w3-small">{% trans 'Suivant' %}</span><br><i class="fa-solid fa-circle-right w3-xxlarge"></i>
|
<div class="w3-col">
|
||||||
</button>
|
<button id="_left" class="w3-button w3-dark-xlight w3-round-large w3-padding-small w3-margin-top">
|
||||||
</div>
|
-X<br><i class="fa-solid fa-circle-down w3-xlarge"></i>
|
||||||
<div class="w3-col">
|
</button>
|
||||||
<button id="_calib_auto" class="w3-button w3-dark-xlight w3-round-large w3-margin-small w3-block"
|
|
||||||
title="{% trans 'Centrage auto et sauvegarde des positions' %}">
|
|
||||||
{% trans 'Calibrage auto' %}<br><i class="fa-solid fa-robot w3-text-orange w3-xxlarge"></i>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="scan w3-center">
|
<div class="w3-row">
|
||||||
<button id="_goto-0" class="w3-button w3-dark-xlight w3-round w3-round-large w3-margin-small w3-block">
|
<div id="_well_btn" class="w3-col w3-margin-top w3-margin-bottom"></div>
|
||||||
Origine (0, 0)<br><i class="fa-solid fa-house w3-text-amber w3-xlarge"></i>
|
<div class="w3-third">
|
||||||
</button>
|
<button id="_previous" class="w3-button w3-dark-xlight w3-round-large w3-padding-small">
|
||||||
<button id="_goto-xy" class="w3-button w3-dark-xlight w3-round-large w3-margin-small w3-block w3-margin-bottom">
|
<span class="w3-small">{% trans 'Précéd.' %}</span><br><i class="fa-solid fa-circle-left w3-xlarge"></i>
|
||||||
{% trans 'Aller à la base' %}<br>(<span id="_xbase"></span>, <span id="_ybase"></span>)<br><i class="fa-solid fa-bullseye w3-text-amber w3-xlarge"></i>
|
</button>
|
||||||
</button>
|
</div>
|
||||||
<div class="w3-row">
|
<div class="w3-third">
|
||||||
<div class="w3-half">
|
<button id="_calib_center" class="w3-button w3-dark-xlight w3-round-large w3-padding-small" title="{% trans 'Centrer manuellement' %}">
|
||||||
<button id="_calib_debug" class="w3-button w3-dark-xlight w3-round-large w3-padding-small">
|
<span class="w3-small">{% trans 'Centrer' %}</span><br><i class="fa-regular fa-circle w3-xlarge w3-text-orange"></i>
|
||||||
{% trans 'Debug' %}<br><i class="fa-solid fa-triangle-exclamation w3-text-amber w3-xlarge"></i>
|
</button>
|
||||||
</button>
|
</div>
|
||||||
</div>
|
<div class="w3-third">
|
||||||
<div class="w3-half">
|
<button id="_next" class="w3-button w3-dark-xlight w3-round-large w3-padding-small">
|
||||||
<button id="_median" class="w3-button w3-dark-xlight w3-round-large w3-padding-small">
|
<span class="w3-small">{% trans 'Suivant' %}</span><br><i class="fa-solid fa-circle-right w3-xlarge"></i>
|
||||||
{% trans 'Axes' %} <br><i class="fa-solid fa-crosshairs w3-text-amber w3-xlarge"></i>
|
</button>
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<div class="w3-col">
|
|
||||||
<button id="_crop" class="w3-button w3-dark-xlight w3-round-large w3-padding-small w3-margin-top w3-block">
|
|
||||||
{% trans 'Recadrer' %}<br><i class="fa-solid fa-crop w3-text-amber w3-xlarge"></i>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<div class="w3-col w3-padding-small w3-border w3-round-large w3-margin-top">
|
|
||||||
<span class="w3-bold w3-text-amber">{% trans 'Rayon' %}</span><br>
|
|
||||||
<input id="_crop_radius" type="number" min="100" max="1200" step="1" class="w3-round" title="{% trans 'Rayon du recadrement' %}"
|
|
||||||
value="{{ conf.calibration_crop_radius }}" title="{% trans 'Rayon de cadrage' %}"> px
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<button id="_test" class="w3-button w3-dark-xlight w3-round-large w3-margin-small w3-block">
|
|
||||||
{% trans 'Tester le cirduit' %}<br><i class="fa-solid fa-circle-check w3-text-orange w3-xxlarge"></i>
|
|
||||||
</button>
|
|
||||||
<button id="_halt" class="w3-button w3-red w3-round-large w3-margin-small w3-block">
|
|
||||||
{% trans 'ARRET' %}<br><i class="fa-solid fa-hand w3-xxlarge"></i>
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
{% include 'scanner/scan-image.html' %}
|
|
||||||
</div>
|
</div>
|
||||||
<ul id="_debug" class="w3-scroll-y" style="height: 30vh"></ul>
|
<div class="w3-half">
|
||||||
|
{% include 'scanner/scan-image.html' %}
|
||||||
|
</div>
|
||||||
|
<div class="w3-quarter w3-center">
|
||||||
|
<div class="w3-row w3-row-padding">
|
||||||
|
<div class="w3-col">
|
||||||
|
<div class="w3-right-align w3-small"><span id="_ts"></span></div>
|
||||||
|
</div>
|
||||||
|
<div class="w3-half">X<br><span id="_x"></span></div>
|
||||||
|
<div class="w3-half">Y<br><span id="_y"></span></div>
|
||||||
|
|
||||||
|
<div class="w3-col w3-margin-bottom">
|
||||||
|
<button id="_goto-0" class="w3-button w3-dark-xlight w3-round w3-round-large w3-block">
|
||||||
|
Origine (0, 0)<br><i class="fa-solid fa-house w3-text-amber w3-xlarge"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="w3-col w3-margin-bottom">
|
||||||
|
<button id="_goto-xy" class="w3-button w3-dark-xlight w3-round-large w3-block">
|
||||||
|
{% trans 'Aller à la base' %}<br>(<span id="_xbase"></span>, <span id="_ybase"></span>)<br><i class="fa-solid fa-bullseye w3-text-amber w3-xlarge"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="w3-row w3-row-padding">
|
||||||
|
<div class="w3-half">
|
||||||
|
<button id="_calib_debug" class="w3-button w3-dark-xlight w3-round-large w3-padding-small w3-block">
|
||||||
|
{% trans 'Debug' %}<br><i class="fa-solid fa-triangle-exclamation w3-text-amber w3-xlarge"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="w3-half">
|
||||||
|
<button id="_median" class="w3-button w3-dark-xlight w3-round-large w3-padding-small w3-block">
|
||||||
|
{% trans 'Axes' %} <br><i class="fa-solid fa-crosshairs w3-text-amber w3-xlarge"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="w3-col">
|
||||||
|
<button id="_crop" class="w3-button w3-dark-xlight w3-round-large w3-padding-small w3-margin-top w3-block">
|
||||||
|
{% trans 'Recadrer' %}<br><i class="fa-solid fa-crop w3-text-amber w3-xlarge"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="w3-row w3-row-padding ">
|
||||||
|
<div class="w3-half w3-margin-top">
|
||||||
|
<span>{% trans 'Rayon' %} px</span><br>
|
||||||
|
<input id="_crop_radius" type="number" min="100" max="1200" step="1" class="w3-round w3-input" title="{% trans 'Rayon du recadrement' %}"
|
||||||
|
value="{{ conf.calibration_crop_radius }}" title="{% trans 'Rayon de cadrage' %}">
|
||||||
|
</div>
|
||||||
|
<div class="w3-half w3-margin-top">
|
||||||
|
<div>{% trans 'Durée' %}</div>
|
||||||
|
<select id="_duration" class="w3-select w3-round" title="{% trans 'Durée entre vidéos' %}">
|
||||||
|
<option value="1.0">1 s</option>
|
||||||
|
<option value="2.0">2 s</option>
|
||||||
|
<option value="3.0">3 s</option>
|
||||||
|
<option value="4.0">4 s</option>
|
||||||
|
<option value="5.0" selected>5 s</option>
|
||||||
|
<option value="10">10 s</option>
|
||||||
|
<option value="15">15 s</option>
|
||||||
|
<option value="20">20 s</option>
|
||||||
|
<option value="30">30 s</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="w3-col">
|
||||||
|
<button id="_test" class="w3-button w3-dark-xlight w3-round-large w3-margin-top w3-block">
|
||||||
|
{% trans 'Tester le cirduit' %}<br><i class="fa-solid fa-circle-check w3-text-orange w3-xlarge"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="w3-col">
|
||||||
|
<button id="_calib_auto" class="w3-button w3-dark-xlight w3-round-large w3-margin-top w3-block"
|
||||||
|
title="{% trans 'Centrage auto et sauvegarde des positions' %}">
|
||||||
|
{% trans 'Calibrage auto' %}<br><i class="fa-solid fa-robot w3-text-orange w3-xlarge"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="w3-col">
|
||||||
|
<button id="_halt" class="w3-button w3-red w3-round-large w3-margin-top w3-block">
|
||||||
|
{% trans 'ARRET' %}<br><i class="fa-solid fa-hand w3-xlarge"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<ul id="_debug" class="w3-scroll-y" style="height: 30vh"></ul>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block js_footer %}
|
{% block js_footer %}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<link href="/static/scanner/css/images.css" rel="stylesheet">
|
<link href="/static/scanner/css/images.css" rel="stylesheet">
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block sidebar_list %}
|
{% block sidebar_list %}
|
||||||
<a href="/" class="w3-bar-item w3-btn w3-hover-opacity"><i class="fa-solid fa-house w3-text-orange"></i> {% trans "Retour accueil" %}</a>
|
<a href="/" class="w3-bar-item w3-btn w3-hover-opacity"><i class="fa-solid fa-house w3-text-orange w3-xlarge"></i> {% trans "Retour accueil" %}</a>
|
||||||
<form method="post" class="w3-bar-item" action="">
|
<form method="post" class="w3-bar-item" action="">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<select id="_sid" name="_sid" class="w3-select w3-margin-bottom" onchange="this.form.submit()">
|
<select id="_sid" name="_sid" class="w3-select w3-margin-bottom" onchange="this.form.submit()">
|
||||||
@@ -16,14 +16,12 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
{% if cursid %}
|
{% if cursid %}
|
||||||
<div class="multiwell_cards">
|
{% multiwell_cards cursid observations %}
|
||||||
{% multiwell_cards cursid observations %}
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</form>
|
</form>
|
||||||
{% if cursid %}
|
{% if cursid %}
|
||||||
<a href="#" class="w3-bar-item w3-btn w3-hover-opacity" onclick="download_all_images()">
|
<a href="#" class="w3-bar-item w3-btn w3-hover-opacity" onclick="download_all_images()">
|
||||||
<i class="fa-solid fa-file-export w3-text-red"></i> {% trans "Exporter l'ensemble des images" %}
|
<i class="fa-solid fa-file-export w3-text-red w3-xlarge"></i> {% trans "Exporter l'ensemble des images" %}
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@@ -8,45 +8,63 @@
|
|||||||
{% block columns %}{% endblock %}
|
{% block columns %}{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="container w3-black">
|
<div class="w3-row w3-row-padding w3-black">
|
||||||
<div class="header">
|
<div class="w3-quarter w3-center">
|
||||||
<div class="w3-row w3-row-padding">
|
<div class="w3-col">
|
||||||
<div class="w3-half">
|
<div>{% trans "Choix de la session" %}</div>
|
||||||
<div>{% trans "Choix de la session" %}</div>
|
<select id="_session" class="w3-select">
|
||||||
<select id="_session" class="w3-select">
|
{% for s in sessions %}
|
||||||
{% for s in sessions %}
|
<option value="{{ s.id }}">{{ s.name }}</option>
|
||||||
<option value="{{ s.id }}">{{ s.name }}</option>
|
{% endfor %}
|
||||||
{% endfor %}
|
</select>
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div class="w3-half">
|
|
||||||
<div class="w3-margin-top w3-padding w3-right">
|
|
||||||
<span id="_ts"></span><br>
|
|
||||||
(<span id="_x"></span>, <span id="_y"></span>)
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="scan">
|
<div class="w3-col">
|
||||||
<button id="_median" class="w3-button w3-teal w3-round-large w3-margin-small w3-block"><i class="fa-solid fa-crosshairs"></i> {% trans 'Axes' %}</button>
|
<div class="w3-row w3-bold">
|
||||||
<button id="_crop" class="w3-button w3-teal w3-round-large w3-margin-small w3-block w3-margin-bottom"><i class="fa-solid fa-crop"></i> {% trans 'Recadrer' %}</button>
|
<div class="w3-half">X<br><span id="_x"></span></div>
|
||||||
<hr>
|
<div class="w3-half">Y<br><span id="_y"></span></div>
|
||||||
<button id="_scan" class="w3-button w3-warning w3-round-large w3-large w3-block">
|
<div class="w3-col w3-padding"><span id="_uuid"></span></div>
|
||||||
<i class="fa-solid fa-camera"></i><br>{% trans 'Lancer le balayage' %}
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="w3-col">
|
||||||
|
<button id="_median" class="w3-button w3-dark-xlight w3-round-large w3-padding-small w3-block">
|
||||||
|
{% trans 'Axes' %} <br><i class="fa-solid fa-crosshairs w3-text-amber w3-xlarge"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="w3-col">
|
||||||
|
<button id="_crop" class="w3-button w3-dark-xlight w3-round-large w3-padding-top w3-margin-top w3-block">
|
||||||
|
{% trans 'Recadrer' %}<br><i class="fa-solid fa-crop w3-text-amber w3-xlarge"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="w3-col">
|
||||||
|
<button id="_scan" class="w3-button w3-dark-xlight w3-round-large w3-margin-top w3-block">
|
||||||
|
{% trans 'Lancer le balayage' %}<br><i class="fa-solid fa-circle-check w3-text-orange w3-xlarge"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="w3-col">
|
||||||
|
<button id="_halt" class="w3-button w3-red w3-round-large w3-margin-top w3-block">
|
||||||
|
{% trans 'ARRET' %}<br><i class="fa-solid fa-hand w3-xlarge"></i>
|
||||||
</button>
|
</button>
|
||||||
<button id="_halt" class="w3-button w3-red w3-round-large w3-padding-16 w3-block w3-margin-top"><i class="fa-solid fa-hand"></i><br>{% trans 'ARRET' %}</button>
|
|
||||||
</div>
|
</div>
|
||||||
{% include 'scanner/scan-image.html' %}
|
<div class="w3-col">
|
||||||
|
<div class="w3-margin-top w3-padding w3-small">
|
||||||
|
<span id="_ts"></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<ul id="_debug" class="w3-scroll-y" style="height: 50vh"></ul>
|
<div class="w3-threequarter">
|
||||||
|
{% include 'scanner/scan-image.html' %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<ul id="_debug" class="w3-scroll-y" style="height: 50vh"></ul>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block js_footer %}
|
{% block js_footer %}
|
||||||
{{ block.super }}
|
{{ block.super }}
|
||||||
<script>
|
<script>
|
||||||
const container = sId("scan-img");
|
const container = sId("scan-img");
|
||||||
const ws_route = "{{ ws_route }}";
|
const ws_route = "{{ ws_route }}";
|
||||||
const use_tracking = "{{ use_tracking }}" == "True";
|
const use_tracking = "{{ use_tracking }}" == "True";
|
||||||
const options = {
|
const options = {
|
||||||
ts: sId("_ts"),
|
ts: sId("_ts"),
|
||||||
cx: sId("_cx"),
|
cx: sId("_cx"),
|
||||||
@@ -63,7 +81,8 @@
|
|||||||
axial_speed : sId("_axial_speed"),
|
axial_speed : sId("_axial_speed"),
|
||||||
axial_pos : sId("_axial_pos"),
|
axial_pos : sId("_axial_pos"),
|
||||||
area_px : sId("_area_px"),
|
area_px : sId("_area_px"),
|
||||||
frame_count : sId("_count")
|
frame_count : sId("_count"),
|
||||||
|
uuid: sId("_uuid")
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<script src="/static/scanner/js/main.js"></script>
|
<script src="/static/scanner/js/main.js"></script>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block columns %}{% endblock %}
|
{% block columns %}{% endblock %}
|
||||||
{% block sidebar_list %}
|
{% block sidebar_list %}
|
||||||
<a href="/" class="w3-bar-item w3-btn w3-hover-opacity"><i class="fa-solid fa-house w3-text-orange"></i> {% trans "Retour accueil" %}</a>
|
<a href="/" class="w3-bar-item w3-btn w3-hover-opacity"><i class="fa-solid fa-house w3-text-orange w3-xlarge"></i> {% trans "Retour accueil" %}</a>
|
||||||
<form method="post" class="w3-bar-item" action="">
|
<form method="post" class="w3-bar-item" action="">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<select id="_sid" name="_sid" class="w3-select w3-margin-bottom" onchange="this.form.submit()">
|
<select id="_sid" name="_sid" class="w3-select w3-margin-bottom" onchange="this.form.submit()">
|
||||||
@@ -17,14 +17,12 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
{% if cursid %}
|
{% if cursid %}
|
||||||
<div class="multiwell_cards">
|
{% multiwell_cards cursid observations %}
|
||||||
{% multiwell_cards cursid observations %}
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</form>
|
</form>
|
||||||
{% if cursid %}
|
{% if cursid %}
|
||||||
<a href="#" class="w3-bar-item w3-btn w3-hover-opacity" onclick="download_all_videos()">
|
<a href="#" class="w3-bar-item w3-btn w3-hover-opacity" onclick="download_all_videos()">
|
||||||
<i class="fa-solid fa-file-export w3-text-red"></i> {% trans "Exporter l'ensemble des vidéos" %}
|
<i class="fa-solid fa-file-export w3-text-red w3-xlarge"></i> {% trans "Exporter l'ensemble des vidéos" %}
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
<div class="scanner w3-row">
|
<div class="w3-row">
|
||||||
{% if use_tracking %}
|
{% if use_tracking %}
|
||||||
<div class="w3-col w3-small" style="width:180px">
|
<div class="w3-col w3-small" style="width:180px">
|
||||||
<div>Num: <span id="_count"></span></div>
|
<div>Num: <span id="_count"></span></div>
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
from django import template
|
from django import template
|
||||||
from django.utils.html import mark_safe
|
from django.utils.html import mark_safe
|
||||||
from .. import models
|
|
||||||
|
|
||||||
register = template.Library()
|
register = template.Library()
|
||||||
|
|
||||||
@@ -12,16 +11,14 @@ def multiwell_cards(sid, observations):
|
|||||||
row_def = obs.multiwell.row_def.split(',')
|
row_def = obs.multiwell.row_def.split(',')
|
||||||
multiwells.append(
|
multiwells.append(
|
||||||
f'''
|
f'''
|
||||||
<div class="w3-border w3-small">
|
|
||||||
<div class="w3-center w3-sand">{obs.title}</div>
|
<div class="w3-center w3-sand">{obs.title}</div>
|
||||||
|
<div class="w3-border multiwell_cards">
|
||||||
''')
|
''')
|
||||||
for row in range(obs.multiwell.rows):
|
for row in range(obs.multiwell.rows):
|
||||||
multiwells.append('''<div class="w3-padding-small">''')
|
|
||||||
for col in range(obs.multiwell.cols):
|
for col in range(obs.multiwell.cols):
|
||||||
btn = f'{row_def[row]}{col+1}'
|
btn = f'{row_def[row]}{col+1}'
|
||||||
uuid = f'{sid}-{obs.multiwell.position}-{btn}'
|
uuid = f'{sid}-{obs.multiwell.position}-{btn}'
|
||||||
multiwells.append(f"""<button id="btn-{uuid}" name="_multiwell" class="multiwell w3-button" value="{uuid}" onclick="this.form.submit()">{btn}</button>""")
|
multiwells.append(f"""<button id="btn-{uuid}" name="_multiwell" class="multiwell w3-button" value="{uuid}" onclick="this.form.submit()">{btn}</button>""")
|
||||||
multiwells.append('''</div>''')
|
|
||||||
multiwells.append('''</div>''')
|
multiwells.append('''</div>''')
|
||||||
|
|
||||||
return mark_safe("\n".join(multiwells))
|
return mark_safe("\n".join(multiwells))
|
||||||
|
|||||||
Reference in New Issue
Block a user