AstarVienna / ScopeSim

A telescope observation simulator for Python.
GNU General Public License v3.0
16 stars 10 forks source link

Source object data scaling fix #485

Closed janusbrink closed 2 weeks ago

janusbrink commented 3 weeks ago

Fixed case where original source object's image data was multiplied by 1/fov.pixel_area each time a fov is processed in the optical train.

codecov[bot] commented 3 weeks ago

Codecov Report

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

Project coverage is 76.60%. Comparing base (c33f0fe) to head (8a5b219). Report is 23 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main AstarVienna/ScopeSim#485 +/- ## ========================================== + Coverage 76.58% 76.60% +0.01% ========================================== Files 66 66 Lines 8094 8099 +5 ========================================== + Hits 6199 6204 +5 Misses 1895 1895 ```

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

hugobuddel commented 3 weeks ago

Perhaps it would be good to add a test for this?

hugobuddel commented 2 weeks ago

It looks reasonable, as we already discussed. It's a rather dense part of the code, though, and it's hard to see what is supposed to be going on (that makes it diffic to formulate a test...).

For sure @janusbrink performed some action that showed the problematic behavior (otherwise there would be no trigger to fix it), so it would probably be possible to create some kind of test for this, even if it would be an integration test in the IRDB.

We keep breaking things accidentally when we fix something else because we don' t have proper tests, e.g. https://github.com/AstarVienna/irdb/issues/193 . But I'll trust your assessment.

janusbrink commented 2 weeks ago

I can show @oczoske how I noticed the issue, then perhaps together we can come up with a minimal test - probably as part of the FOV tests?