Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@
post-processing), Haralick texture features, and the sparsemed
background assignment after cleansing
- docs: `concatenated_hdf5_data` does not include the "time" feature
- docs: fix broken logo in README, inconsistent background note and
incomplete gating description, building the docs from the
repository root, and typos in the changelog
0.31.2
- fix: online gates for `size_x` and `size_y` were ignored (regression in 0.16.6)
- fix: "pipeline:dcnum yield" and "experiment:event count" were set to
Expand Down Expand Up @@ -465,7 +468,7 @@
- ref: several changes and deprecations in the PPID helper functions
- build: change flat-layout to src-layout (issues with editable installs)
0.14.0
- fix: protected features (e.g. time, frame) were not included in ouptut
- fix: protected features (e.g. time, frame) were not included in output
files when the input file was basin-based
- ref: increment DCNUM_PPID_GENERATION to 6
0.13.3
Expand Down Expand Up @@ -546,7 +549,7 @@
- feat: introduce GPUSegmenter base class
- fix: handle bytes-values in HDF5 attributes
- ref: correctly introduce `requires_background_correction` for segmenters
- setup: don't requrie cibuildwheel
- setup: don't require cibuildwheel
0.10.0
- enh: some minor improvements in efficiency
- ref: increment DCNUM_PPID_GENERATION for the sake of clarity
Expand All @@ -560,7 +563,7 @@
0.0.8
- feat: introduce QueueCollectorThread
- feat: introduce SegmenterManagerThread
- feat: instroduce EventExtractorManagerThread and corresponding workers
- feat: introduce EventExtractorManagerThread and corresponding workers
- enh: minor improvements for HDF5ImageCache and ImageCorrCache
- enh: use data size as cache size if smaller than requested chunk size
- enh: return dictionary for brightness feature computation
Expand Down
5 changes: 2 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
|dcnum|
=======
dcnum
=====

|PyPI Version| |Build Status| |Coverage Status| |Docs Status|

Expand Down Expand Up @@ -27,7 +27,6 @@ For more options, please check out the `documentation



.. |dcnum| image:: https://raw.github.com/DC-analysis/dcnum/main/docs/logo/dcnum.png
.. |PyPI Version| image:: https://img.shields.io/pypi/v/dcnum.svg
:target: https://pypi.python.org/pypi/dcnum
.. |Build Status| image:: https://img.shields.io/github/actions/workflow/status/DC-analysis/dcnum/check.yml
Expand Down
2 changes: 1 addition & 1 deletion dcnum/logic/ctrl.py
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,7 @@ def _transfer_raw_basin_features(self, hw, feats, basinmap0):

Parameters
----------
hw: HDF5Writer
hw: dcnum.write.HDF5Writer
writer for the output file
feats: list of str
features to transfer
Expand Down
13 changes: 9 additions & 4 deletions docs/extensions/github_changelog.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@
.. include_changelog:: ../CHANGELOG

adds the content of the changelog file into the current document.
The path is relative to the document that contains the directive.
References to GitHub issues are identified as "(#XY)" (with parentheses
and hash) and a link is inserted

https://github.com/RI-imaging/{PROJECT}/issues/{XY}
https://github.com/{GITHUB_PROJECT}/issues/{XY}

where PROJECT ist the `project` variable defined in conf.py.
where GITHUB_PROJECT is the `github_project` variable defined in conf.py
(e.g. "DC-analysis/dcnum").
"""
import io
import re
Expand All @@ -28,8 +30,11 @@ class IncludeDirective(Directive):
optional_arguments = 0

def run(self):
full_path = self.arguments[0]
project = self.state.document.settings.env.config.github_project
env = self.state.document.settings.env
# resolve the path relative to the current document (not to the
# current working directory)
_, full_path = env.relfn2path(self.arguments[0])
project = env.config.github_project

def insert_github_link(reobj):
line = reobj.string
Expand Down
9 changes: 5 additions & 4 deletions docs/sec_design.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ What the individual steps do is explained in :ref:`sec_pipeline`.

The following happens when you run the above code snippet:

1. The file `input.rtdc` is opened using the module :mod:`.read`.
1. The file ``input.rtdc`` is opened using the module :mod:`.read`.
2. If necessary, the background image data are computed with the
background method selected in the job (a subclass of
:class:`.feat.feat_background.base.Background`) and written to a
Expand Down Expand Up @@ -101,9 +101,10 @@ The following happens when you run the above code snippet:
:class:`.segm.segmenter_sto.STOSegmenter`, e.g. ``"torchmpo"`` and
``"torchsto"``), a :class:`.segm.segmenter_manager_thread.SegmenterManagerThread`
performs the segmentation of the chunk slots.
5. A :class:`.write.queue_writer_process.QueueWriterProcess` takes the
events from the event queue, puts them in the right order, and writes
them in chunks to the output file.
5. A :class:`.write.queue_writer_process.QueueWriterProcess` (or a
:class:`.write.queue_writer_thread.QueueWriterThread` with
``debug=True``) takes the events from the event queue, puts them in
the right order, and writes them in chunks to the output file.
6. Finally, the basin strategy is applied, metadata, logs and pipeline
identifiers are written, and the temporary output file is renamed to
the output path.
19 changes: 12 additions & 7 deletions docs/sec_pipeline.rst
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,13 @@ file to make sure that the model is applicable to the dataset

.. note::

The background data are computed for every pipeline run, regardless of
Background data are required for every pipeline run, regardless of
the segmenter, because they are needed for some of the features
(see below) and are stored in the output file. If the input file
already contains background data, you can save time by setting
(see below) and are stored in the output file. As described above, the
background computation is skipped if the input file already contains
background data that were computed with the same settings. If the
input file contains background data that were computed with different
settings and you would like to use them anyway, set
``background_code="copy"``.

4. Labeling and mask post-processing
Expand Down Expand Up @@ -182,10 +185,12 @@ also used in pipelines with U-Net segmentation.
~~~~~~~~~
Not every labeled object is a valid event. The gating step
(:class:`.feat.gate.Gate`, ``gate_kwargs``) discards masks that consist of
too few pixels (``size_thresh_mask``, 10 pixels by default) and, if
``online_gates=True``, events outside the feature ranges that were
applied during the measurement (as stored in the metadata of the input
file).
``size_thresh_mask`` pixels or fewer (10 by default, ``0`` keeps all
masks) and, if ``online_gates=True``, events outside the feature ranges
that were applied during the measurement (as stored in the metadata of the
input file). With ``online_gates=True``, ``size_thresh_mask`` defaults to
the minimum area that was used during the measurement ("bin area min" in
the metadata), if available.

7. Writing the output file
~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
Loading