Skip to content

Commit

Permalink
close #29 by renaming parameter for signal channel column
Browse files Browse the repository at this point in the history
  • Loading branch information
vreuter committed Nov 21, 2024
1 parent bc4ed95 commit cac59bc
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [v0.5.1] - 2024-11-21

### Added
* `__version__` attribute on the top-level package object

### Changed
* Parameter `signal_column` in `compute_pixel_statistics` is now `channel_column`.

## [v0.5.0] - 2024-11-21

### Added
Expand Down
3 changes: 3 additions & 0 deletions gertils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@
RegionalPixelStatistics,
compute_pixel_statistics,
)

__version__ = "0.5.1"

6 changes: 3 additions & 3 deletions gertils/pixel_value_statistics.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def from_image(
pt="Center of region to measure",
channels="Channels of image in which to measure pixels",
diameter="Size (width and height) of region around point in which to measure pixels",
signal_column="Name for the field/column in which to store channel from which pixels were taken",
channel_column="Name for the field/column in which to store channel from which pixels were taken",
),
returns="List of records, each mapping key/field to value",
)
Expand All @@ -123,7 +123,7 @@ def compute_pixel_statistics( # noqa: D103
*,
channels: Iterable[ImagingChannel],
diameter: int,
signal_column: str,
channel_column: str,
) -> list[dict[str, Numeric]]:
left: int = round(pt.x - diameter / 2)
right: int = left + diameter
Expand All @@ -140,5 +140,5 @@ def compute_pixel_statistics( # noqa: D103
for ch in channels:
subimg = img[ch.get, :, max(0, top) : bottom, max(0, left) : right]
stats = RegionalPixelStatistics.from_image(subimg, central_z=pt.z)
result.append({signal_column: ch.get, **bounds, **stats.to_dict})
result.append({channel_column: ch.get, **bounds, **stats.to_dict})
return result
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "gertils"
version = "0.5.0"
version = "0.5.1"
description = "General computing utilities for data processing and analysis in the Gerlich group at IMBA"
authors = [
"Vince Reuter <[email protected]>",
Expand Down

0 comments on commit cac59bc

Please sign in to comment.