nasa / dorado-scheduling

Dorado observation planning and scheduling simulations
Other
23 stars 8 forks source link

Add unit test for sky grid module #56

Closed lpsinger closed 3 years ago

lpsinger commented 3 years ago

Also, fix conversion of area to linear scale in sinusoidal grid method. The new test_skygrid unit test fails without this.

Where was the factor of 2/pi from, @mcoughlin? Is this a bug in sinusoidal, or a bug in the new test?

codecov[bot] commented 3 years ago

Codecov Report

Merging #56 (1a486a7) into main (529dd1e) will increase coverage by 4.13%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #56      +/-   ##
==========================================
+ Coverage   27.05%   31.18%   +4.13%     
==========================================
  Files          27       28       +1     
  Lines        1327     1337      +10     
==========================================
+ Hits          359      417      +58     
+ Misses        968      920      -48     
Impacted Files Coverage Δ
dorado/scheduling/skygrid/_sinusoidal.py 100.00% <100.00%> (+66.66%) :arrow_up:
dorado/scheduling/tests/test_skygrid.py 100.00% <100.00%> (ø)
dorado/scheduling/skygrid/_healpix.py 100.00% <0.00%> (+40.00%) :arrow_up:
dorado/scheduling/skygrid/_spiral.py 100.00% <0.00%> (+44.44%) :arrow_up:
dorado/scheduling/skygrid/_geodesic.py 97.56% <0.00%> (+78.04%) :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 529dd1e...1a486a7. Read the comment docs.

lpsinger commented 3 years ago

Yeah, that makes sense. area = pi r^2, r = sqrt(area) / pi, diameter = 2 / pi * sqrt(area).