diff --git a/CHANGELOG b/CHANGELOG index 848c3a4..deb548b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/README.rst b/README.rst index d5f6e8c..60da468 100644 --- a/README.rst +++ b/README.rst @@ -1,5 +1,5 @@ -|dcnum| -======= +dcnum +===== |PyPI Version| |Build Status| |Coverage Status| |Docs Status| @@ -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 diff --git a/dcnum/logic/ctrl.py b/dcnum/logic/ctrl.py index fc23319..55268a8 100644 --- a/dcnum/logic/ctrl.py +++ b/dcnum/logic/ctrl.py @@ -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 diff --git a/docs/extensions/github_changelog.py b/docs/extensions/github_changelog.py index 5dab508..10e7d72 100644 --- a/docs/extensions/github_changelog.py +++ b/docs/extensions/github_changelog.py @@ -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 @@ -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 diff --git a/docs/sec_design.rst b/docs/sec_design.rst index 006d184..0188cb5 100644 --- a/docs/sec_design.rst +++ b/docs/sec_design.rst @@ -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 @@ -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. diff --git a/docs/sec_pipeline.rst b/docs/sec_pipeline.rst index e2d0bac..4acc10e 100644 --- a/docs/sec_pipeline.rst +++ b/docs/sec_pipeline.rst @@ -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 @@ -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 ~~~~~~~~~~~~~~~~~~~~~~~~~~