Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify documentation of orbital_parameters metadata #950

Merged
merged 10 commits into from
Oct 24, 2019

Conversation

sfinkens
Copy link
Member

@sfinkens sfinkens commented Oct 22, 2019

Clarify documentation of orbital_parameters metadata, as discussed in #922. I also checked the altitude units in abi_l1b, ahi_hsd, goes_imager*, hrit_jma, seviri_l1b* and electrol_hrit. Except for abi_l1b which is in km, they are all in meters. So I changed the units to meters in abi_l1b. Not sure how many users would be affected by this change. If a lot, I could instead add a user warning that the units will be changed in the next release or so.

Copy link
Member

@djhoese djhoese left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job. Commented on a few typos but otherwise I have one main question/point:

I just merged the AMI reader where I made satellite_actual_altitude to be in kilometers. This is likely because I was matching ABI's reader. From what I could tell though this needed to be this way for pyorbital to work correctly in the composites (for generating angles). Could you merge with master (if you don't already have the AMI reader) and fix the kilometer conversion? Could you also verify that pyorbital's angle generation code in the compositors doesn't need kilometers?

@coveralls
Copy link

coveralls commented Oct 22, 2019

Coverage Status

Coverage increased (+0.1%) to 86.06% when pulling 294be54 on sfinkens:doc-orbital-parameters into e40961e on pytroll:master.

@codecov
Copy link

codecov bot commented Oct 22, 2019

Codecov Report

Merging #950 into master will increase coverage by 0.12%.
The diff coverage is 97.1%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #950      +/-   ##
==========================================
+ Coverage   85.92%   86.05%   +0.12%     
==========================================
  Files         174      174              
  Lines       26452    26520      +68     
==========================================
+ Hits        22730    22822      +92     
+ Misses       3722     3698      -24
Impacted Files Coverage Δ
satpy/composites/__init__.py 78.4% <ø> (+3.31%) ⬆️
satpy/readers/abi_l1b.py 98.3% <ø> (ø) ⬆️
satpy/tests/reader_tests/test_ami_l1b.py 94.73% <ø> (ø) ⬆️
satpy/tests/reader_tests/test_abi_l1b.py 96.36% <ø> (ø) ⬆️
satpy/readers/ami_l1b.py 97.32% <ø> (ø) ⬆️
satpy/tests/compositor_tests/__init__.py 99.57% <100%> (+0.02%) ⬆️
satpy/composites/viirs.py 83.78% <100%> (+0.07%) ⬆️
satpy/tests/compositor_tests/test_viirs.py 98.71% <92.3%> (-0.59%) ⬇️
satpy/scene.py 90.35% <0%> (-0.18%) ⬇️

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 e40961e...294be54. Read the comment docs.

@sfinkens
Copy link
Member Author

@djhoese @martin I updated the AMI reader and the compositors. Two things I'm not sure about:

  • The VIIRS compositor uses attrs['satellite_altitude'], but none of the VIIRS readers defines that attribute.
  • I don't have much experience with the LEO readers. Do they usually provide altitude in meters or kilometers?

@djhoese
Copy link
Member

djhoese commented Oct 23, 2019

  1. Which VIIRS compositor?
  2. I've never needed to use the orbit parameters for a polar instrument since they typically provide the angles in their data files (and that's all I have ever needed).

@sfinkens
Copy link
Member Author

Sorry not very precise. I meant satpy.composites.viirs.ReflectanceCorrector.get_angles

@djhoese
Copy link
Member

djhoese commented Oct 23, 2019

I think this was copied from the older version of the pyspectral rayleigh corrector. I think this class is meant as an option for VIIRS/MODIS rayleigh correction (it is what my Polar2Grid project uses), but we also played around with it for ABI/AHI (as a test for my Geo2Grid software). So the get_angles there should match whatever ABI/AHI would have. In normal cases get_angles should not be called when processing VIIRS or MODIS data.

Only other thing I could think of would be the VIIRS compact reader if they don't include the angles in the data files.

@sfinkens
Copy link
Member Author

@djhoese Ok, thanks for the explanation! I've updated viirs.ReflectanceCorrector.get_angles to match ABI/AHI, i.e. expect meters and convert them to kilometers in the get_observer_look call. Could you please try with real ABI data and see if the results are correct?

@sfinkens
Copy link
Member Author

Nevermind, I'll do that. Then I learn something about composites.

@sfinkens
Copy link
Member Author

Ok, I checked the true_color_crefl ABI composite before/after and they are identical 🙂

Copy link
Member

@mraspaud mraspaud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one more line :)

@mraspaud mraspaud merged commit fe75778 into pytroll:master Oct 24, 2019
@sfinkens sfinkens deleted the doc-orbital-parameters branch October 24, 2019 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clarify orbital_parameters metadata
4 participants