MWATelescope / mwalib

Library to read Murchison Widefield Array (MWA) raw visibilities, voltages and metadata into a common structure
Mozilla Public License 2.0
10 stars 2 forks source link

Allow cfitsio code 204 to proceed. #46

Closed cjordan closed 2 years ago

cjordan commented 2 years ago

When attempting to access a key without any value against it, cfitsio returns code 204. Our get_optional_fits_key function handled this code by returning a generic error, which (not very helpfully) prints "keyword value is undefined" and aborts. This commit makes the function return None when there is no value to retrieve.

codecov[bot] commented 2 years ago

Codecov Report

Merging #46 (d2bea60) into master (88a21d2) will increase coverage by 0.31%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #46      +/-   ##
==========================================
+ Coverage   93.80%   94.11%   +0.31%     
==========================================
  Files          22       22              
  Lines        5165     5134      -31     
==========================================
- Hits         4845     4832      -13     
+ Misses        320      302      -18     
Impacted Files Coverage Δ
src/fits_read/mod.rs 81.49% <100.00%> (+3.67%) :arrow_up:
src/convert/mod.rs 98.38% <0.00%> (-0.04%) :arrow_down:
src/metafits_context/mod.rs 96.67% <0.00%> (-0.04%) :arrow_down:
src/rfinput/mod.rs 92.41% <0.00%> (+2.55%) :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 88a21d2...d2bea60. Read the comment docs.