lincc-frameworks-mask-incubator / corrgi

Fast 2-point correlation estimation with LSDB and gundam
BSD 3-Clause "New" or "Revised" License
2 stars 1 forks source link

Move counting routines to estimator class #25

Closed camposandro closed 1 month ago

camposandro commented 2 months ago

The correlation counts depend on the estimator selected. This pull request creates the Estimator abstract class and adds the counting routine as its method. Currently there is just the implementation for the natural estimator (DD/RR - 1). The remaining ones will be added according to https://github.com/lincc-frameworks-mask-incubator/corrgi/issues/23. Closes #24.

Code Quality

github-actions[bot] commented 2 months ago
Before [a21b9aa9] After [a6448ea3] Ratio Benchmark (Parameter)
4.15±0.5s 2.57±0.9s ~0.62 benchmarks.time_computation
3.94k 2.1k 0.53 benchmarks.mem_list

Click here to view all benchmarks.

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 89.33333% with 8 lines in your changes missing coverage. Please review.

Files Coverage Δ
src/corrgi/correlation/angular_correlation.py 100.00% <100.00%> (ø)
src/corrgi/correlation/projected_correlation.py 100.00% <100.00%> (ø)
src/corrgi/corrgi.py 91.66% <100.00%> (-2.09%) :arrow_down:
src/corrgi/dask.py 72.97% <ø> (-2.64%) :arrow_down:
src/corrgi/estimators/natural_estimator.py 100.00% <100.00%> (ø)
src/corrgi/correlation/correlation.py 87.75% <80.00%> (-0.89%) :arrow_down:
src/corrgi/estimators/estimator.py 96.77% <96.77%> (ø)
src/corrgi/estimators/estimator_factory.py 90.00% <90.00%> (ø)
src/corrgi/correlation/redshift_correlation.py 0.00% <0.00%> (ø)