waveorder 2.2.1__py3-none-any.whl → 3.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- waveorder/_version.py +16 -3
- waveorder/acq/__init__.py +0 -0
- waveorder/acq/acq_functions.py +166 -0
- waveorder/assets/HSV_legend.png +0 -0
- waveorder/assets/JCh_legend.png +0 -0
- waveorder/assets/waveorder_plugin_logo.png +0 -0
- waveorder/calib/Calibration.py +1512 -0
- waveorder/calib/Optimization.py +470 -0
- waveorder/calib/__init__.py +0 -0
- waveorder/calib/calibration_workers.py +464 -0
- waveorder/cli/apply_inverse_models.py +328 -0
- waveorder/cli/apply_inverse_transfer_function.py +379 -0
- waveorder/cli/compute_transfer_function.py +432 -0
- waveorder/cli/gui_widget.py +58 -0
- waveorder/cli/main.py +39 -0
- waveorder/cli/monitor.py +163 -0
- waveorder/cli/option_eat_all.py +47 -0
- waveorder/cli/parsing.py +122 -0
- waveorder/cli/printing.py +16 -0
- waveorder/cli/reconstruct.py +67 -0
- waveorder/cli/settings.py +187 -0
- waveorder/cli/utils.py +175 -0
- waveorder/filter.py +1 -2
- waveorder/focus.py +136 -25
- waveorder/io/__init__.py +0 -0
- waveorder/io/_reader.py +61 -0
- waveorder/io/core_functions.py +272 -0
- waveorder/io/metadata_reader.py +195 -0
- waveorder/io/utils.py +175 -0
- waveorder/io/visualization.py +160 -0
- waveorder/models/inplane_oriented_thick_pol3d_vector.py +3 -3
- waveorder/models/isotropic_fluorescent_thick_3d.py +92 -0
- waveorder/models/isotropic_fluorescent_thin_3d.py +331 -0
- waveorder/models/isotropic_thin_3d.py +73 -72
- waveorder/models/phase_thick_3d.py +103 -4
- waveorder/napari.yaml +36 -0
- waveorder/plugin/__init__.py +9 -0
- waveorder/plugin/gui.py +1094 -0
- waveorder/plugin/gui.ui +1440 -0
- waveorder/plugin/job_manager.py +42 -0
- waveorder/plugin/main_widget.py +1605 -0
- waveorder/plugin/tab_recon.py +3294 -0
- waveorder/scripts/__init__.py +0 -0
- waveorder/scripts/launch_napari.py +13 -0
- waveorder/scripts/repeat-cal-acq-rec.py +147 -0
- waveorder/scripts/repeat-calibration.py +31 -0
- waveorder/scripts/samples.py +85 -0
- waveorder/scripts/simulate_zarr_acq.py +204 -0
- waveorder/util.py +1 -1
- waveorder/visuals/napari_visuals.py +1 -1
- waveorder-3.0.0.dist-info/METADATA +350 -0
- waveorder-3.0.0.dist-info/RECORD +69 -0
- {waveorder-2.2.1.dist-info → waveorder-3.0.0.dist-info}/WHEEL +1 -1
- waveorder-3.0.0.dist-info/entry_points.txt +5 -0
- {waveorder-2.2.1.dist-info → waveorder-3.0.0.dist-info}/licenses/LICENSE +13 -1
- waveorder-2.2.1.dist-info/METADATA +0 -188
- waveorder-2.2.1.dist-info/RECORD +0 -27
- {waveorder-2.2.1.dist-info → waveorder-3.0.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import subprocess
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class JobManager:
|
|
5
|
+
"""This class manages the reconstruction jobs that are assigned via the GUI"""
|
|
6
|
+
|
|
7
|
+
def __init__(self):
|
|
8
|
+
self.jobs = {} # uID -> Popen
|
|
9
|
+
|
|
10
|
+
def run_job(self, uID, cmd, on_output=None, on_done=None):
|
|
11
|
+
if uID in self.jobs:
|
|
12
|
+
raise ValueError(f"Job {uID} already running.")
|
|
13
|
+
|
|
14
|
+
proc = subprocess.Popen(
|
|
15
|
+
cmd,
|
|
16
|
+
stdout=subprocess.PIPE,
|
|
17
|
+
stderr=subprocess.STDOUT,
|
|
18
|
+
text=True,
|
|
19
|
+
)
|
|
20
|
+
self.jobs[uID] = proc
|
|
21
|
+
|
|
22
|
+
def monitor():
|
|
23
|
+
for line in proc.stdout:
|
|
24
|
+
if on_output:
|
|
25
|
+
on_output(uID, line.strip())
|
|
26
|
+
|
|
27
|
+
proc.wait()
|
|
28
|
+
if on_done:
|
|
29
|
+
on_done(uID, proc.returncode)
|
|
30
|
+
del self.jobs[uID]
|
|
31
|
+
|
|
32
|
+
monitor()
|
|
33
|
+
# threading.Thread(target=monitor, daemon=True).start()
|
|
34
|
+
|
|
35
|
+
def cancel_job(self, uID):
|
|
36
|
+
proc: subprocess.Popen = self.jobs.get(uID)
|
|
37
|
+
if proc and proc.poll() is None:
|
|
38
|
+
proc.terminate()
|
|
39
|
+
|
|
40
|
+
def is_running(self, uID):
|
|
41
|
+
proc: subprocess.Popen = self.jobs.get(uID)
|
|
42
|
+
return proc and proc.poll() is None
|