[Git][debian-gis-team/pyorbital][master] 6 commits: New upstream version 1.7.3

Antonio Valentino (@antonio.valentino) gitlab at salsa.debian.org
Tue Jul 12 07:49:25 BST 2022



Antonio Valentino pushed to branch master at Debian GIS Project / pyorbital


Commits:
9128d46c by Antonio Valentino at 2022-07-12T06:23:33+00:00
New upstream version 1.7.3
- - - - -
3c1cd6a9 by Antonio Valentino at 2022-07-12T06:23:34+00:00
Update upstream source from tag 'upstream/1.7.3'

Update to upstream version '1.7.3'
with Debian dir c14128df1d2f5cd9571462bb8521cf412dcf3562
- - - - -
176a1907 by Antonio Valentino at 2022-07-12T06:25:06+00:00
New upstream release

- - - - -
50573d52 by Antonio Valentino at 2022-07-12T06:45:38+00:00
Update lintian overrides

- - - - -
bb033ec7 by Antonio Valentino at 2022-07-12T06:45:39+00:00
Update d/copyright

- - - - -
fc21e509 by Antonio Valentino at 2022-07-12T06:46:06+00:00
Set distribution to unstable

- - - - -


11 changed files:

- CHANGELOG.md
- README.md
- RELEASING.md
- debian/changelog
- debian/copyright
- debian/python3-pyorbital.lintian-overrides
- pyorbital/astronomy.py
- pyorbital/tests/test_astronomy.py
- pyorbital/tlefile.py
- pyorbital/version.py
- setup.py


Changes:

=====================================
CHANGELOG.md
=====================================
@@ -1,5 +1,38 @@
-## Version 1.7.1 (2021/12/22)
+## Version 1.7.3 (2022/07/11)
+
+### Pull Requests Merged
 
+#### Bugs fixed
+
+* [PR 103](https://github.com/pytroll/pyorbital/pull/103) - www.celestrak.org → celestrak.org ([101](https://github.com/pytroll/pyorbital/issues/101))
+
+#### Documentation changes
+
+* [PR 104](https://github.com/pytroll/pyorbital/pull/104) - Fixed comment in sun_earth_distance_correction
+
+In this release 2 pull requests was closed.
+
+
+## Version 1.7.2 (2022/07/07)
+
+### Issues Closed
+
+* [Issue 100](https://github.com/pytroll/pyorbital/issues/100) - TLE URIs land at redirect page ([PR 101](https://github.com/pytroll/pyorbital/pull/101) by [@gerritholl](https://github.com/gerritholl))
+* [Issue 97](https://github.com/pytroll/pyorbital/issues/97) - sun_earth_distance_correction returns the square of the sun-earth distance relativ to 1 AU ([PR 99](https://github.com/pytroll/pyorbital/pull/99) by [@depion](https://github.com/depion))
+
+In this release 2 issues were closed.
+
+### Pull Requests Merged
+
+#### Bugs fixed
+
+* [PR 101](https://github.com/pytroll/pyorbital/pull/101) - Update celestrak URIs ([100](https://github.com/pytroll/pyorbital/issues/100))
+* [PR 99](https://github.com/pytroll/pyorbital/pull/99) - Fixed earth sun distance ([97](https://github.com/pytroll/pyorbital/issues/97))
+
+In this release 2 pull requests were closed.
+
+
+## Version 1.7.1 (2021/12/22)
 
 ### Pull Requests Merged
 


=====================================
README.md
=====================================
@@ -4,6 +4,8 @@ Pyorbital
 [![Build status](https://github.com/pytroll/pyorbital/workflows/CI/badge.svg?branch=main)](https://github.com/pytroll/pyorbital/workflows/CI/badge.svg?branch=main)
 [![Coverage Status](https://coveralls.io/repos/github/pytroll/pyorbital/badge.svg?branch=main)](https://coveralls.io/github/pytroll/pyorbital?branch=main)
 [![PyPI version](https://badge.fury.io/py/pyorbital.svg)](https://badge.fury.io/py/pyorbital)
+[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.6078954.svg)](https://doi.org/10.5281/zenodo.6078954)
+
 
 
 This is the Pyorbital, a Python package for computing orbital parameters from TLE


=====================================
RELEASING.md
=====================================
@@ -6,10 +6,14 @@
 4. run `loghub` and update the `CHANGELOG.md` file:
 
 ```
-loghub pytroll/pysorbital --token <personal access token (see https://github.com/settings/tokens)>  -st v<previous version> -plg bug "Bugs fixed" -plg enhancement "Features added" -plg documentation "Documentation changes"
-
+loghub pytroll/pyorbital --token $LOGHUB_GITHUB_TOKEN -st $(git tag --sort=-version:refname --list 'v*' | head -n 1) -plg bug "Bugs fixed" -plg enhancement "Features added" -plg documentation "Documentation changes"
 ```
 
+This uses a `LOGHUB_GITHUB_TOKEN` environment variable. This must be created
+on GitHub and it is recommended that you add it to your `.bashrc` or
+`.bash_profile` or equivalent. See https://github.com/settings/tokens for
+details on GitHub tokens.
+
 Don't forget to commit!
 
 5. Create a tag with the new version number, starting with a 'v', eg:


=====================================
debian/changelog
=====================================
@@ -1,10 +1,15 @@
-pyorbital (1.7.1-2) UNRELEASED; urgency=medium
+pyorbital (1.7.3-1) unstable; urgency=medium
 
-  * Team upload.
+  [ Bas Couwenberg ]
   * Bump Standards-Version to 4.6.1, no changes.
   * Use supported python3 versions in autopkgtest.
 
- -- Bas Couwenberg <sebastic at debian.org>  Tue, 21 Jun 2022 07:18:57 +0200
+  [ Antonio Valentino ]
+  * New upstream release.
+  * Update lintian overrides.
+  * Update d/copyright.
+
+ -- Antonio Valentino <antonio.valentino at tiscali.it>  Tue, 12 Jul 2022 06:45:58 +0000
 
 pyorbital (1.7.1-1) unstable; urgency=medium
 


=====================================
debian/copyright
=====================================
@@ -18,7 +18,7 @@ Copyright: 2018, Brian Warner
 License: CC0-1.0
 
 Files: debian/*
-Copyright: 2014-2021, Antonio Valentino <antonio.valentino at tiscali.it>
+Copyright: 2014-2022, Antonio Valentino <antonio.valentino at tiscali.it>
 License: GPL-3+
 
 License: GPL-3+


=====================================
debian/python3-pyorbital.lintian-overrides
=====================================
@@ -1,3 +1,4 @@
-application-in-library-section python usr/bin/fetch_tles
-library-package-name-for-application usr/bin/fetch_tles
-package-contains-documentation-outside-usr-share-doc usr/lib/python3/dist-packages/pyorbital/etc/platforms.txt
+# helper tool for downloading data needed by the Python package
+application-in-library-section python [usr/bin/fetch_tles]
+library-package-name-for-application [usr/bin/fetch_tles]
+package-contains-documentation-outside-usr-share-doc [usr/lib/python3/dist-packages/pyorbital/etc/platforms.txt]


=====================================
pyorbital/astronomy.py
=====================================
@@ -155,18 +155,26 @@ def sun_zenith_angle(utc_time, lon, lat):
 def sun_earth_distance_correction(utc_time):
     """Calculate the sun earth distance correction, relative to 1 AU.
     """
-    year = 365.256363004
-    # This is computed from
-    # http://curious.astro.cornell.edu/question.php?number=582
-    # AU = 149597870700.0
-    # a = 149598261000.0
-    # theta = (jdays2000(utc_time) - 2) * (2 * np.pi) / year
-    # e = 0.01671123
-    # r = a*(1-e*e)/(1+e * np.cos(theta))
-    # corr_me = (r / AU) ** 2
-
-    # from known software.
-    corr = 1 - 0.0334 * np.cos(2 * np.pi * (jdays2000(utc_time) - 2) / year)
+
+    # Computation according to
+    #  https://web.archive.org/web/20150117190838/http://curious.astro.cornell.edu/question.php?number=582
+    # with
+    #  Astronomical unit: AU = 149597870700.0 meter (https://ssd.jpl.nasa.gov/glossary/au.html)
+    #  Semi-major axis:    a = 1.00000261 AU = 149598261150.0 m (https://ssd.jpl.nasa.gov/planets/approx_pos.html)
+    #  Eccentricity:       e = 0.01671123 (https://ssd.jpl.nasa.gov/planets/approx_pos.html)
+    #  Length of year:  year = 365.25636 days (https://ssd.jpl.nasa.gov/astro_par.html)
+    #  Perihelion:         p = 3 (day of year with Earth in perihelion, varies between Jan 2 and Jan 5,
+    #                             http://www.astropixels.com/ephemeris/perap2001.html
+    #                             https://web.archive.org/web/20080328044924/http://aa.usno.navy.mil/data/docs/EarthSeasons)
+    # Formula:
+    #  theta = (jdays2000(utc_time) - p) * (2 * np.pi) / year
+    #  r = a * (1 - e * e) / (1 + e * np.cos(theta))
+    #  corr := r/AU
+    #        =  a * (1 - e * e) / AU / (1 + e * np.cos(theta))
+    #       "=" a * (1 - e * e) / AU * (1 - e * np.cos(theta))
+    #       "=" 1 - 0.0167 * np.cos(theta)
+
+    corr = 1 - 0.0167 * np.cos(2 * np.pi * (jdays2000(utc_time) - 3) / 365.25636)
 
     return corr
 


=====================================
pyorbital/tests/test_astronomy.py
=====================================
@@ -50,6 +50,13 @@ class TestAstronomy(unittest.TestCase):
         sun_theta = astr.sun_zenith_angle(time_slot, 0., 0.)
         self.assertAlmostEqual(sun_theta, 1.8751916863323426, places=8)
 
+    def test_sun_earth_distance_correction(self):
+        """Test the sun-earth distance correction."""
+        utc_time = datetime(2022, 6, 15, 12, 0, 0)
+        corr = astr.sun_earth_distance_correction(utc_time)
+        corr_exp = 1.0156952156742332
+        self.assertAlmostEqual(corr, corr_exp, places=8)
+
 
 def suite():
     """The suite for test_astronomy."""


=====================================
pyorbital/tlefile.py
=====================================
@@ -38,15 +38,15 @@ from xml.etree import ElementTree as ET
 from itertools import zip_longest
 
 
-TLE_URLS = ('http://www.celestrak.com/NORAD/elements/active.txt',
-            'http://celestrak.com/NORAD/elements/weather.txt',
-            'http://celestrak.com/NORAD/elements/resource.txt',
-            'https://www.celestrak.com/NORAD/elements/cubesat.txt',
-            'http://celestrak.com/NORAD/elements/stations.txt',
-            'https://www.celestrak.com/NORAD/elements/sarsat.txt',
-            'https://www.celestrak.com/NORAD/elements/noaa.txt',
-            'https://www.celestrak.com/NORAD/elements/amateur.txt',
-            'https://www.celestrak.com/NORAD/elements/engineering.txt')
+TLE_URLS = ('https://celestrak.org/NORAD/elements/active.txt',
+            'https://celestrak.org/NORAD/elements/weather.txt',
+            'https://celestrak.org/NORAD/elements/resource.txt',
+            'https://celestrak.org/NORAD/elements/cubesat.txt',
+            'https://celestrak.org/NORAD/elements/stations.txt',
+            'https://celestrak.org/NORAD/elements/sarsat.txt',
+            'https://celestrak.org/NORAD/elements/noaa.txt',
+            'https://celestrak.org/NORAD/elements/amateur.txt',
+            'https://celestrak.org/NORAD/elements/engineering.txt')
 
 
 LOGGER = logging.getLogger(__name__)


=====================================
pyorbital/version.py
=====================================
@@ -23,9 +23,9 @@ def get_keywords():
     # setup.py/versioneer.py will grep for the variable names, so they must
     # each be defined on a line of their own. _version.py will just call
     # get_keywords().
-    git_refnames = " (HEAD -> main, tag: v1.7.1)"
-    git_full = "1bf73c834befb6d7f060c636dae85bb91230a556"
-    git_date = "2021-12-22 11:02:02 +0100"
+    git_refnames = " (HEAD -> main, tag: v1.7.3)"
+    git_full = "f7038d4b2a94a226fbbccc6680a797a7f62d0680"
+    git_date = "2022-07-11 13:51:48 -0500"
     keywords = {"refnames": git_refnames, "full": git_full, "date": git_date}
     return keywords
 


=====================================
setup.py
=====================================
@@ -57,5 +57,6 @@ setup(name='pyorbital',
       package_data={'pyorbital': [os.path.join('etc', 'platforms.txt')]},
       scripts=['bin/fetch_tles.py', ],
       install_requires=['numpy>=1.19.0', 'scipy', 'requests'],
+      python_requires='>=3.8',
       zip_safe=False,
       )



View it on GitLab: https://salsa.debian.org/debian-gis-team/pyorbital/-/compare/cd68b1d0c579a5f73df64b7726af85a82ff8e28f...fc21e509a9856b7c238e1899ff169bc2dbf13ba3

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/pyorbital/-/compare/cd68b1d0c579a5f73df64b7726af85a82ff8e28f...fc21e509a9856b7c238e1899ff169bc2dbf13ba3
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20220712/655c4b76/attachment-0001.htm>


More information about the Pkg-grass-devel mailing list