LSSTDESC / rail_base

Base classes for RAIL
MIT License
0 stars 1 forks source link

Fix bug that overwrites ensemble ancil data in `calculate_point_estimates` method #83

Closed drewoldag closed 6 months ago

drewoldag commented 6 months ago

This fixes issue #82

Updated logic in calculate_point_estimates to conditionally create or append to ancil dictionary.

Problem & Solution Description (including issue #)

Prior to this change the last step in the calculate_point_estimates function would call qp_ensemble.set_ancil(...). That function will replace any existing ancil dictionary with the new one that is passed in.

Now, we'll check to see if the ensemble's ancil data is non-None. If so, we append the new dictionary to the existing ancil dictionary. If an ancil dictionary hasn't already been created, we'll add the new dictionary to the ensemble as the ancil dict.

Code Quality

codecov[bot] commented 6 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (fd13285) 97.17% compared to head (06847f1) 97.18%. Report is 5 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #83 +/- ## ======================================= Coverage 97.17% 97.18% ======================================= Files 32 32 Lines 1736 1738 +2 ======================================= + Hits 1687 1689 +2 Misses 49 49 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.