Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pbc feature location fix #350

Merged

Conversation

w-k-jones
Copy link
Member

@w-k-jones w-k-jones commented Oct 4, 2023

Fixes out-of-bounds error in segmentation due to PBC features in #349

I also changed the location where 'column' seeding places the marker. Previously it took the floor of the array index, but now it goes to the nearest index. This may change the results of segmentation, so I can revert it if it is an issue

  • 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?

…eeding, and to take the modulo of the pixel location to prevent out of bounds errors
@w-k-jones w-k-jones changed the base branch from main to RC_v1.5.x October 4, 2023 13:49
@w-k-jones w-k-jones added the bug Code that is failing or producing the wrong result label Oct 4, 2023
@w-k-jones w-k-jones added this to the Version 1.5.2 milestone Oct 4, 2023
@codecov
Copy link

codecov bot commented Oct 4, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (aa8f0d1) 55.75% compared to head (ec8d401) 55.75%.

Additional details and impacted files
@@            Coverage Diff             @@
##           RC_v1.5.x     #350   +/-   ##
==========================================
  Coverage      55.75%   55.75%           
==========================================
  Files             15       15           
  Lines           3313     3316    +3     
==========================================
+ Hits            1847     1849    +2     
- Misses          1466     1467    +1     
Flag Coverage Δ
unittests 55.75% <87.50%> (+<0.01%) ⬆️

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

Files Coverage Δ
tobac/segmentation.py 92.83% <100.00%> (ø)
tobac/utils/periodic_boundaries.py 97.00% <75.00%> (-0.94%) ⬇️

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

Copy link
Member

@JuliaKukulies JuliaKukulies left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks for the fix @w-k-jones !

Just to clarify the change in the column seeding: did you do this because you encountered any issues with the previous solution or is it mainly that you think it makes more sense to choose the closest index rather than rounding down?

And: any idea what is going on with the RTD check?

Copy link
Member

@freemansw1 freemansw1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm also happy with this pending RTD getting fixed. It seems likely to me that the issue is similar to what I encountered in #337, and we may need to do the same fix here.

@freemansw1
Copy link
Member

I'm also happy with this pending RTD getting fixed. It seems likely to me that the issue is similar to what I encountered in #337, and we may need to do the same fix here.

I meant #341 and not #337, whoops

@w-k-jones
Copy link
Member Author

w-k-jones commented Oct 5, 2023

So it turned out that the RTD issue was with the requirements, but that's fixed now.

The column seeding change was because I think it makes more sense to round to the nearest location (and was how I expected the code to work before I looked into it).

RTD is now building, so should be ok to merge

Copy link
Member

@JuliaKukulies JuliaKukulies left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes that makes also sense in my view with the column seeding! Please go ahead and merge :) great that you solved the RTD issue!

@w-k-jones
Copy link
Member Author

I've just made a small update to segmentation to fix #348 at the same time

Copy link
Member

@freemansw1 freemansw1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for addressing this, @w-k-jones .

@w-k-jones w-k-jones merged commit f87ea1e into tobac-project:RC_v1.5.x Oct 5, 2023
7 checks passed
@JuliaKukulies JuliaKukulies mentioned this pull request Nov 8, 2023
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Code that is failing or producing the wrong result
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants