Skip to content

Conversation

k034b363
Copy link
Contributor

Describe your changes
This PR adds a function pcv.analyze.radial_percentile that calculates the average pixel values within a threshold distance from the center of a focal object, expressed as a percent of maximum distance. It also adds this calculated average to outputs. It can take as input either a grayscale or RGB image, in which case the number of outputs will match the number of channels. It can also take an ROI or list of ROIs to calculate the average for multiple objects.

Type of update

  • New feature or feature enhancement

Associated issues
Closes #1646 (in a simpler way than described in that issue)

Additional context
I am intending to use this function as is for a paper on seed Xray analysis, so the decision to simplify was in service of movement on that project. There are options to make this function more complex in the future if use cases are discovered.

For the reviewer
See this page for instructions on how to review the pull request.

  • PR functionality reviewed in a Jupyter Notebook
  • All tests pass
  • Test coverage remains 100%
  • Documentation tested
  • New documentation pages added to plantcv/mkdocs.yml
  • Changes to function input/output signatures added to updating.md
  • Code reviewed
  • PR approved

@k034b363 k034b363 linked an issue Aug 26, 2025 that may be closed by this pull request
Copy link

deepsource-io bot commented Aug 26, 2025

Here's the code health analysis summary for commits 8f2b592..bcaa177. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource Python LogoPython✅ SuccessView Check ↗
DeepSource Test coverage LogoTest coverage⚠️ Artifact not reportedTimed out: Artifact was never reportedView Check ↗

💡 If you’re a repository administrator, you can configure the quality gates from the settings.

@k034b363 k034b363 self-assigned this Aug 26, 2025
@k034b363 k034b363 added new feature New feature ideas and solutions work in progress Mark work in progress labels Aug 26, 2025
@k034b363 k034b363 modified the milestones: PlantCV v5.0, PlantCV v4.x Aug 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new feature New feature ideas and solutions work in progress Mark work in progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a radial option to analyze.distribution

1 participant