Skip to content

Commit 2cf8999

Browse files
committed
Some more docstring reworks
1 parent 8157954 commit 2cf8999

1 file changed

Lines changed: 29 additions & 24 deletions

File tree

src/imcflibs/imagej/bdv.py

Lines changed: 29 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -683,8 +683,9 @@ def fmt_acitt_options(self):
683683
"""Format Angle / Channel / Illumination / Tile / Timepoint options.
684684
685685
Build a string providing the `multiple_angles`, `multiple_channels`,
686-
`multiple_illuminations_directions`, `multiple_tiles` and `multiple_timepoints` options
687-
that can be used in a BDV-related `IJ.run` call.
686+
`multiple_illuminations_directions`, `multiple_tiles` and
687+
`multiple_timepoints` options that can be used in a BDV-related `IJ.run`
688+
call.
688689
689690
Returns
690691
-------
@@ -708,14 +709,15 @@ def fmt_acitt_options(self):
708709
def check_processing_input(value, range_end):
709710
"""Sanitize and clarifies the acitt input selection.
710711
711-
Check if the input is valid by checking the type and returning the expected output.
712+
Validate the input by checking the type and returning the expected output.
712713
713714
Parameters
714715
----------
715716
value : str, int, list of int or list of str
716-
Contains the list of input dimensions, the first input dimension of a range or a single channel
717+
Contains the list of input dimensions, the first input dimension of a
718+
range or a single channel.
717719
range_end : int or None
718-
Contains the end of the range if need be
720+
Contains the end of the range if need be.
719721
720722
Returns
721723
-------
@@ -747,10 +749,11 @@ def check_processing_input(value, range_end):
747749

748750

749751
def get_processing_settings(dimension, selection, value, range_end):
750-
"""Get the variables corresponding to the dimension selection and processing mode.
752+
"""Generate processing strings for selected dimension and processing mode.
751753
752-
Get the processing option and dimension selection string that corresponds
753-
to the selected processing mode.
754+
Generate the processing option and dimension selection strings that
755+
correspond to the selected processing mode and the given dimension
756+
selection.
754757
755758
Parameters
756759
----------
@@ -761,14 +764,16 @@ def get_processing_settings(dimension, selection, value, range_end):
761764
generated string needs to be assembled according to the given dimension
762765
and value / range settings.
763766
value : str, int, list of int or list of str
764-
Contains the list of input dimensions, the first input dimension of a range or a single channel
767+
The list of input dimensions, the first input dimension of a range or a
768+
single dimension value in case `selection == "single"` (e.g. for
769+
selecting a single channel).
765770
range_end : int or None
766-
Contains the end of the range if need be
771+
Contains the end of the range if need be.
767772
768773
Returns
769774
-------
770-
list of str
771-
processing options string, dimension selection string
775+
tuple of str
776+
processing_option, dimension_select
772777
"""
773778

774779
if selection == "single":
@@ -806,9 +811,9 @@ def get_processing_settings(dimension, selection, value, range_end):
806811
def backup_xml_files(source_directory, subfolder_name):
807812
"""Create a backup of BDV-XML files inside a subfolder of `xml-backup`.
808813
809-
Copies all `.xml` and `.xml~` files to a subfolder with the given name inside a
810-
folder called `xml-backup` in the source directory. Uses the `shutil.copy2()`
811-
command, which will overwrite existing files.
814+
Copies all `.xml` and `.xml~` files to a subfolder with the given name
815+
inside a folder called `xml-backup` in the source directory. Uses the
816+
`shutil.copy2()` command, which will overwrite existing files.
812817
813818
Parameters
814819
----------
@@ -854,8 +859,8 @@ def define_dataset_auto(
854859
with an extension.
855860
dataset_save_path : str
856861
Output path for the `.xml`.
857-
bf_series_type : str
858-
One of "Angles" or "Tiles", specifying how Bio-Formats interprets the series.
862+
bf_series_type : {`Angles`,`Tiles`}
863+
Defines how Bio-Formats interprets the series.
859864
timepoints_per_partition : int, optional
860865
Split the output dataset by timepoints. Use `0` for no split, resulting
861866
in a single HDF5 file containing all timepoints. By default `1`,
@@ -959,8 +964,8 @@ def define_dataset_manual(
959964
source_directory : str
960965
Path to the folder containing the file(s).
961966
image_file_pattern : str
962-
Regular expression corresponding to the names of your files and how to read the
963-
different dimensions.
967+
Regular expression corresponding to the names of your files and how to
968+
read the different dimensions.
964969
dataset_organisation : str
965970
Organisation of the dataset and the dimensions to process.
966971
Allows for defining the range of interest of the different dimensions.
@@ -1658,7 +1663,7 @@ def fuse_dataset_bdvp(
16581663
):
16591664
"""Export a BigDataViewer project using the BIOP Kheops exporter.
16601665
1661-
This function uses the BIOP Kheops exporter to convert a BigDataViewer project into a
1666+
Use the BIOP Kheops exporter to convert a BigDataViewer project into
16621667
OME-TIFF files, with optional compression.
16631668
16641669
Parameters
@@ -1668,11 +1673,11 @@ def fuse_dataset_bdvp(
16681673
command : CommandService
16691674
The Scijava CommandService instance to execute the export command.
16701675
processing_opts : ProcessingOptions, optional
1671-
Options defining which parts of the dataset to process. If None, default processing
1672-
options will be used (process all angles, channels, etc.).
1676+
Options defining which parts of the dataset to process. If None, default
1677+
processing options will be used (process all angles, channels, etc.).
16731678
result_path : str, optional
1674-
Path where to store the exported files. If None, files will be saved in the same
1675-
directory as the input project.
1679+
Path where to store the exported files. If None, files will be saved in
1680+
the same directory as the input project.
16761681
compression : str, optional
16771682
Compression method to use for the TIFF files. Default is "LZW".
16781683

0 commit comments

Comments
 (0)