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

Detection module refactor: stats.py #416

Merged
merged 24 commits into from
Jul 2, 2020
Merged

Detection module refactor: stats.py #416

merged 24 commits into from
Jul 2, 2020

Conversation

nickdelgrosso
Copy link
Contributor

Hi,

This pull request splits out the algorithmic and data aggregation steps in stats.py, making the code more testable while still user-friendly. The major feature addition here is the ROI dataclass, a frozen class which does data validation on ypix, xpix, and lam and provides handles to the main roi calculation operations, using cached properties to reduce recomputation time on the most heavy and repeated operations.

The compilation of the stats array of dicts is moved out of stats.py and into detect.select_rois() to increase transparency and make optimization simpler. Further refactoring is needed for seperating out the behaviors of sparsery(), sourcery(), and select_rois().

Best wishes,

Nick

@nickdelgrosso nickdelgrosso changed the base branch from master to dev July 2, 2020 14:43
@nickdelgrosso nickdelgrosso merged commit a675c5d into dev Jul 2, 2020
@nickdelgrosso nickdelgrosso deleted the dev-rd2 branch July 2, 2020 17:26
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.

None yet

1 participant