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

Split PSF and Electronic effects into subpackages #434

Merged
merged 5 commits into from
Jul 6, 2024
Merged

Conversation

teutoburg
Copy link
Contributor

@teutoburg teutoburg commented Jul 4, 2024

Both the effects.psfs and effects.electronic modules were getting rather large and unübersichtlich, so I decided why not split them up into separate modules and group those in a subpackage (aka folder). The outside behavior is unchanged, any imports still work the same way.

Along the way I also did some minor refactoring and remove the (according to @astronomyk) redundant and obsolete .fov_grid() methods from the PSF classes. Also removed psf_utils.py, because each utils function was only used by one of the now four psf submodules, so is logically better kept there.

Also tested against IRDB, without issues.

@teutoburg teutoburg added refactor Implementation improvement effects Related to a ScopeSim effect labels Jul 4, 2024
@teutoburg teutoburg self-assigned this Jul 4, 2024
Copy link

codecov bot commented Jul 4, 2024

Codecov Report

Attention: Patch coverage is 75.73386% with 248 lines in your changes missing coverage. Please review.

Project coverage is 75.41%. Comparing base (3b751f6) to head (2736f5a).

Files Patch % Lines
scopesim/effects/psfs/discrete.py 68.88% 70 Missing ⚠️
scopesim/effects/electronic/noise.py 67.07% 54 Missing ⚠️
scopesim/effects/psfs/semianalytical.py 63.43% 49 Missing ⚠️
scopesim/effects/psfs/analytical.py 86.61% 19 Missing ⚠️
scopesim/effects/psfs/psf_base.py 82.79% 16 Missing ⚠️
scopesim/effects/electronic/pixels.py 75.00% 14 Missing ⚠️
scopesim/effects/electronic/electrons.py 80.30% 13 Missing ⚠️
scopesim/effects/electronic/dmps.py 78.26% 10 Missing ⚠️
scopesim/effects/electronic/exposure.py 96.34% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #434      +/-   ##
==========================================
+ Coverage   75.32%   75.41%   +0.09%     
==========================================
  Files          56       64       +8     
  Lines        7821     7830       +9     
==========================================
+ Hits         5891     5905      +14     
+ Misses       1930     1925       -5     

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

@teutoburg teutoburg marked this pull request as ready for review July 4, 2024 14:14
Copy link
Collaborator

@hugobuddel hugobuddel 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 the refactoring.

I'm trusting you that nothing really changed in the code. The tests didn't change much, so should be OK.

And I'm trusting @astronomyk that fov_grid() is indeed not necessary anymore.

I got a bit distracted when reviewing this, so I'm a bit late.

@teutoburg teutoburg merged commit a950dcc into main Jul 6, 2024
25 checks passed
@teutoburg teutoburg deleted the fh/subpacks branch July 6, 2024 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effects Related to a ScopeSim effect refactor Implementation improvement
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants