HERA-Team / uvtools

Tools useful for the handling, visualization, and analysis of interferometric data.
MIT License
1 stars 1 forks source link

Build uniform grid in 1d fit #112

Closed aewallwi closed 3 years ago

aewallwi commented 3 years ago

Technically depends on #114 and #113. Reviewer should focuse on changes to dspec.py and test_dspec.py. This PR allows _fit_basis_1d to handle missing integrations by replacing them with flagged zeros on a uniform grid. Missing data causes the x-axis to not be uniformly spaced but it is spaced by integer multiples of a fundamental dx so we can fill in these gaps with flagged weight zero data to make the basis fitting behave and then throw away these points when we return the model fits.

coveralls commented 3 years ago

Coverage Status

Coverage increased (+0.03%) to 93.438% when pulling 40dd7f5df21b4c1b2a0cfac26977e4b6560997d0 on build_uniform_grid_in_1d_fit into 3fe2074491fcdb240e3774da19365503be86877a on main.

codecov[bot] commented 3 years ago

Codecov Report

Merging #112 (ee8bf61) into main (01d0e32) will increase coverage by 0.23%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #112      +/-   ##
==========================================
+ Coverage   86.84%   87.08%   +0.23%     
==========================================
  Files           7        7              
  Lines        1460     1487      +27     
==========================================
+ Hits         1268     1295      +27     
  Misses        192      192              
Flag Coverage Δ
unittests 87.08% <100.00%> (+0.23%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
uvtools/dspec.py 96.53% <100.00%> (+0.11%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 01d0e32...ee8bf61. Read the comment docs.

aewallwi commented 3 years ago

Thanks for the review @r-pascua, especially the helpful pytest tips. I've restricted this PR to only address the 1d gridding stuff. I've moved the remainder of pytest migration to #116 (which is translating the existing tests verbatum into pytest compatible lines and tweaking the imports and test dir structure to accomodate codecov). I've moved the suggestions on reorganizing the existing tests (which is beyond the verbatum pytest translation) into their own issues which can be addressed in #117 . I think the gridding specific stuff is ready for another look when you have time! After that, I think its worth taking a look at #116 focusing on issues with the verbatum migration. We can take care of the test reorg in #117.