Skip to content

Add utility to construct artificial interest fields from detected features#566

Open
Sven-248 wants to merge 4 commits intotobac-project:RC_v1.6.xfrom
Sven-248:feature/feature-to-interest-field
Open

Add utility to construct artificial interest fields from detected features#566
Sven-248 wants to merge 4 commits intotobac-project:RC_v1.6.xfrom
Sven-248:feature/feature-to-interest-field

Conversation

@Sven-248
Copy link
Collaborator

@Sven-248 Sven-248 commented Mar 5, 2026

This PR handles #540 and introduces a new utility function features_to_interest_field that reconstructs an artificial interest field from a feature table (e.g. output of tobac feature detection).

The function places blobs at the detected feature positions and generates a corresponding field on a given template grid. Blob amplitude can be derived from a feature property and blob size can be estimated from feature area.

  • Have you followed our guidelines in CONTRIBUTING.md?
  • Have you self-reviewed your code and corrected any misspellings?
  • Have you written documentation that is easy to understand?
  • Have you written descriptive commit messages?
  • Have you added NumPy docstrings for newly added functions?
  • Have you formatted your code using black?
  • If you have introduced a new functionality, have you added adequate unit tests?
  • Have all tests passed in your local clone?
  • If you have introduced a new functionality, have you added an example notebook?
  • Have you kept your pull request small and limited so that it is easy to review?
  • Have the newest changes from this branch been merged?

@Sven-248 Sven-248 requested a review from fsenf March 5, 2026 09:15
@Sven-248 Sven-248 self-assigned this Mar 5, 2026
@github-actions
Copy link

github-actions bot commented Mar 5, 2026

Linting results by Pylint:

Your code has been rated at 8.36/10 (previous run: 8.37/10, -0.01)
The linting score is an indicator that reflects how well your code version follows Pylint’s coding standards and quality metrics with respect to the RC_v1.6.x branch.
A decrease usually indicates your new code does not fully meet style guidelines or has potential errors.

@codecov
Copy link

codecov bot commented Mar 5, 2026

Codecov Report

❌ Patch coverage is 74.60317% with 16 lines in your changes missing coverage. Please review.
✅ Project coverage is 65.01%. Comparing base (8639ece) to head (fe49b39).

Files with missing lines Patch % Lines
tobac/utils/features_to_field.py 74.60% 16 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##           RC_v1.6.x     #566      +/-   ##
=============================================
+ Coverage      64.86%   65.01%   +0.14%     
=============================================
  Files             27       28       +1     
  Lines           4047     4110      +63     
=============================================
+ Hits            2625     2672      +47     
- Misses          1422     1438      +16     
Flag Coverage Δ
unittests 65.01% <74.60%> (+0.14%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant