dcnum 0.11.5__py3-none-any.whl → 0.11.6__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.

Potentially problematic release.


This version of dcnum might be problematic. Click here for more details.

dcnum/_version.py CHANGED
@@ -1,4 +1,4 @@
1
1
  # file generated by setuptools_scm
2
2
  # don't change, don't track in version control
3
- __version__ = version = '0.11.5'
4
- __version_tuple__ = version_tuple = (0, 11, 5)
3
+ __version__ = version = '0.11.6'
4
+ __version_tuple__ = version_tuple = (0, 11, 6)
@@ -257,7 +257,21 @@ class QueueEventExtractor:
257
257
  if self.finalize_extraction.value:
258
258
  # The manager told us that there is nothing more coming.
259
259
  self.logger.debug(
260
- f"Finalizing worker {self} with PID {os.getpid()}")
260
+ f"Finalizing worker {self} with PID {os.getpid()}. "
261
+ f"{self.event_queue.qsize()} events are still queued.")
262
+ # Tell the queue background thread to flush all data to
263
+ # the queue. The background thread will quit once it has
264
+ # flushed all buffered data to the pipe.
265
+ self.event_queue.close()
266
+ self.logger.debug(
267
+ f"Closed event queue from Process PID {os.getpid()}")
268
+ # Join the queue background thread. It blocks until the
269
+ # background thread exits, ensuring that all data in the
270
+ # buffer has been flushed to the pipe.
271
+ self.event_queue.join_thread()
272
+ self.logger.debug(
273
+ f"Joined event queue background thread from"
274
+ f"Process PID {os.getpid()}")
261
275
  break
262
276
  else:
263
277
  try:
@@ -183,7 +183,9 @@ class QueueCollectorThread(threading.Thread):
183
183
  continue
184
184
 
185
185
  if len(cur_nevents) == 0:
186
- self.logger.warning("Encountered empty nevents array!")
186
+ self.logger.info(
187
+ "Reached the end of the current dataset (frame "
188
+ f"{cur_frame + 1} of {len(self.feat_nevents)}).")
187
189
  break
188
190
 
189
191
  # We have reached the writer threshold. This means the extractor
@@ -214,6 +216,7 @@ class QueueCollectorThread(threading.Thread):
214
216
  try:
215
217
  idx, events = self.event_queue.get(timeout=.3)
216
218
  except queue.Empty:
219
+ # No time.sleep here, because we are using timeout above.
217
220
  continue
218
221
  if cur_frame <= idx < cur_frame + self.write_threshold:
219
222
  stash.add_events(index=idx, events=events)
@@ -253,6 +256,8 @@ class QueueCollectorThread(threading.Thread):
253
256
 
254
257
  # Write the number of events.
255
258
  self.writer_dq.append(("nevents",
259
+ # Get nevents for each event from the
260
+ # frame-based cur_nevents array.
256
261
  np.array(stash.feat_nevents)[
257
262
  indices - stash.index_offset]
258
263
  ))
@@ -261,4 +266,4 @@ class QueueCollectorThread(threading.Thread):
261
266
  self.written_frames += stash.num_frames
262
267
 
263
268
  # Increment current frame index.
264
- cur_frame += self.write_threshold
269
+ cur_frame += len(cur_nevents)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dcnum
3
- Version: 0.11.5
3
+ Version: 0.11.6
4
4
  Summary: numerics toolbox for imaging deformability cytometry
5
5
  Author: Paul Müller
6
6
  Maintainer-email: Paul Müller <dev@craban.de>
@@ -1,9 +1,9 @@
1
1
  dcnum/__init__.py,sha256=hcawIKS7utYiOyVhOAX9t7K3xYzP1b9862VV0b6qSrQ,74
2
- dcnum/_version.py,sha256=jiK_H5XzS5m5RjvdJPS7TjMLp9xoI0RwBjbJNoggUgQ,162
2
+ dcnum/_version.py,sha256=3Gew5At6W5w-3RNIQtvr0brz3P-MJACFL9J-IorkINc,162
3
3
  dcnum/feat/__init__.py,sha256=0oX765AyfL1BcVt-FI6R_i6x5LgYYLeyO5lkxSauI0Y,299
4
4
  dcnum/feat/event_extractor_manager_thread.py,sha256=54eCKbLBkv3U7RLGfqtiMB1CnqHNKcTm9vJE84qu9X8,5681
5
5
  dcnum/feat/gate.py,sha256=UEHbj3hkMWNm4tlY8Tz8sOsruhByjJxgO1s-ztQ7WTw,6235
6
- dcnum/feat/queue_event_extractor.py,sha256=_CwtEcJ-zzChkiPbRHC-WdVNy9sNWOYTzZPd2oEvtrU,11493
6
+ dcnum/feat/queue_event_extractor.py,sha256=8IJZ6_2Snv0qr79hxKF-FPw9tBvTxbaLaZMYQyIZHyc,12375
7
7
  dcnum/feat/feat_background/__init__.py,sha256=mL8QJYK6m3hxTqF6Cuosu__Fm5tZUMa-hTgSGcNw9AE,458
8
8
  dcnum/feat/feat_background/base.py,sha256=YCkkxgl19dslqmbkbtMv8CH6oUrrdHmoheBlpDQZHa0,5021
9
9
  dcnum/feat/feat_background/bg_roll_median.py,sha256=3zwXlNE-CWu30RI8s3Z_ihKUPUVi_cm3yAaXIHlMz7Y,13626
@@ -31,10 +31,10 @@ dcnum/segm/segmenter_gpu.py,sha256=F-6H425eQc9B2-k5PURJziU5uQubdF96GTkoysD2JDM,1
31
31
  dcnum/segm/segmenter_manager_thread.py,sha256=xtuk7gnk7xhoRoV_J97rrv7IR3JgeRvVewCDT-chqpk,5172
32
32
  dcnum/write/__init__.py,sha256=Oy-ORTyzUUswsaJvd0C6LyXtOgAY0iTIRqFNU9d7M8Y,160
33
33
  dcnum/write/deque_writer_thread.py,sha256=UUn5OYxDvckvhLw3llLYu7y8MI7RfsOhdJhMonKKB3k,1625
34
- dcnum/write/queue_collector_thread.py,sha256=sFOeb2Mt4i8ID_SoABmNDDlVtXqCm9qvdz5PnhE9AK4,11088
34
+ dcnum/write/queue_collector_thread.py,sha256=mO4sSDB9gQW9ttugqAFFEcXlxz2E5QDjQcdZU_NT-BY,11404
35
35
  dcnum/write/writer.py,sha256=aUg_F1Ocs_wkV47lJJgkqGa8IRFhHH30NI7q0VxBNUA,3092
36
- dcnum-0.11.5.dist-info/LICENSE,sha256=YRChA1C8A2E-amJbudwMcbTCZy_HzmeY0hMIvduh1MM,1089
37
- dcnum-0.11.5.dist-info/METADATA,sha256=sz4TVML0tpLIpLpqWYwErdhbWQcoI3WJH5fvg3zwfBQ,2180
38
- dcnum-0.11.5.dist-info/WHEEL,sha256=AtBG6SXL3KF_v0NxLf0ehyVOh0cold-JbJYXNGorC6Q,92
39
- dcnum-0.11.5.dist-info/top_level.txt,sha256=Hmh38rgG_MFTVDpUDGuO2HWTSq80P585Het4COQzFTg,6
40
- dcnum-0.11.5.dist-info/RECORD,,
36
+ dcnum-0.11.6.dist-info/LICENSE,sha256=YRChA1C8A2E-amJbudwMcbTCZy_HzmeY0hMIvduh1MM,1089
37
+ dcnum-0.11.6.dist-info/METADATA,sha256=5nNFMRnm1iAuuK_hX7m0alvm-P_ISS7FEGQrbNKI828,2180
38
+ dcnum-0.11.6.dist-info/WHEEL,sha256=AtBG6SXL3KF_v0NxLf0ehyVOh0cold-JbJYXNGorC6Q,92
39
+ dcnum-0.11.6.dist-info/top_level.txt,sha256=Hmh38rgG_MFTVDpUDGuO2HWTSq80P585Het4COQzFTg,6
40
+ dcnum-0.11.6.dist-info/RECORD,,
File without changes