[Git][debian-gis-team/pyorbital][upstream] New upstream version 1.3.1
Antonio Valentino
gitlab at salsa.debian.org
Thu Apr 12 06:44:14 UTC 2018
Antonio Valentino pushed to branch upstream at Debian GIS Project / pyorbital
Commits:
e3f81582 by Antonio Valentino at 2018-04-12T05:45:05+00:00
New upstream version 1.3.1
- - - - -
11 changed files:
- .bumpversion.cfg
- + .stickler.yml
- .travis.yml
- changelog.rst
- doc/source/index.rst
- pyorbital/geoloc_instrument_definitions.py
- pyorbital/orbital.py
- pyorbital/tests/test_geoloc.py
- pyorbital/tests/test_orbital.py
- pyorbital/version.py
- setup.py
Changes:
=====================================
.bumpversion.cfg
=====================================
--- a/.bumpversion.cfg
+++ b/.bumpversion.cfg
@@ -1,5 +1,5 @@
[bumpversion]
-current_version = 1.2.0
+current_version = 1.3.1
commit = True
tag = True
=====================================
.stickler.yml
=====================================
--- /dev/null
+++ b/.stickler.yml
@@ -0,0 +1,5 @@
+linters:
+ flake8:
+ fixer: true
+fixers:
+ enable: true
=====================================
.travis.yml
=====================================
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,10 +1,8 @@
language: python
python:
-- '2.6'
- '2.7'
-- "3.3"
-- "3.4"
- "3.5"
+- "3.6"
install:
- pip install .
- pip install coveralls
=====================================
changelog.rst
=====================================
--- a/changelog.rst
+++ b/changelog.rst
@@ -1,51 +1,93 @@
Changelog
=========
-v1.2.0 (2018-02-13)
+
+v1.3.1 (2018-04-09)
-------------------
+- Update changelog. [Martin Raspaud]
+- Bump version: 1.3.0 → 1.3.1. [Martin Raspaud]
+- Merge branch 'master' of github.com:pytroll/pyorbital. [Martin
+ Raspaud]
+- Merge pull request #24 from pytroll/add-stickler-config. [Martin
+ Raspaud]
-- Update changelog. [Adam.Dybbroe]
+ Adding .stickler.yml configuration file
+- Adding .stickler.yml. [stickler-ci]
-- Bump version: 1.1.1 → 1.2.0. [Adam.Dybbroe]
-- Merge branch 'develop' into new_release. [Adam.Dybbroe]
+v1.3.0 (2018-04-09)
+-------------------
+- Update changelog. [Martin Raspaud]
+- Bump version: 1.2.0 → 1.3.0. [Martin Raspaud]
+- Merge pull request #26 from pytroll/bugfix-avoid-numpy-1.14.0. [Martin
+ Raspaud]
+ Bugfix avoid numpy 1.14.0
+- Add 3.6 and remove 2.6, 3.3 and 3.4 from travis matrix. [Martin
+ Raspaud]
+- Fix numpy version requirement to avoid 1.14.0. [Martin Raspaud]
+- Merge pull request #20 from howff/patch-2. [Martin Raspaud]
+
+ Update index.rst with Installation section
+- Update index.rst with Installation section. [howff]
+
+ For the platforms.txt file
+- Merge pull request #21 from frdcms/master. [Martin Raspaud]
+
+ instrument definitions
+- Better presentation to make flake8 happier. [frdcms]
+- Add tests for viirs, amsua, mhs, hirs4 and atms geometries. [frdcms]
+- Add ATMS support. [frdcms]
+- Add MSH and HIRS/4 support. [frdcms]
+- Fix AMSU-A error. [frdcms]
+- Improve VIIRS (and fix existing error) [frdcms]
+- Merge pull request #23 from pytroll/bugfix-next-passes. [Martin
+ Raspaud]
+
+ Fix computation of apogee in next_passes
+- Add test for #22. [Martin Raspaud]
+- Fix computation of apogee in next_passes. [Martin Raspaud]
+- Merge pull request #25 from pytroll/feature-dask-observer-look.
+ [Martin Raspaud]
+
+ Add conditional check to use `da.where` when inputs are dask arrays
+- Fix styling to satisfy flake8. [davidh-ssec]
+- Add conditional check to use `da.where` when inputs are dask arrays.
+ [davidh-ssec]
+
+
+v1.2.0 (2018-02-13)
+-------------------
+- Update changelog. [Adam.Dybbroe]
+- Bump version: 1.1.1 → 1.2.0. [Adam.Dybbroe]
+- Merge branch 'develop' into new_release. [Adam.Dybbroe]
- Add for NOAA-20. [Adam.Dybbroe]
Signed-off-by: Adam.Dybbroe <adam.dybbroe at smhi.se>
-
- Add github issue and PR templates. [Adam.Dybbroe]
Signed-off-by: Adam.Dybbroe <adam.dybbroe at smhi.se>
-
- Provide units in the get_observer_look documentation. [Martin Raspaud]
Fixes #17
-
- Check that there are required amount of items in the row. [Panu
Lahtinen]
-
- Improve documentation: Emphasize the importance of fresh/actual TLEs.
[Adam.Dybbroe]
Signed-off-by: Adam.Dybbroe <adam.dybbroe at smhi.se>
-
- Add GOES-16 and Himawari-9. [Adam.Dybbroe]
Signed-off-by: Adam.Dybbroe <adam.dybbroe at smhi.se>
-
- Merge pull request #16 from jordanlui/newTLEurl. [Martin Raspaud]
New TLE URLs
-
- Additional TLE URLs from CelesTrak added. [Jordan Lui]
-
- Added additional TLE paths to TLE_URL. [Jordan Lui]
-
- Replace numpy.rank with numpy.ndim to make compatible with future
numpy versions. [Adam.Dybbroe]
@@ -53,220 +95,167 @@ v1.2.0 (2018-02-13)
Signed-off-by: Adam.Dybbroe <a000680 at c20671.ad.smhi.se>
-
- Numpy 1.12 compatible - accepting number of scans to be a float.
[Adam.Dybbroe]
Signed-off-by: Adam.Dybbroe <a000680 at c20671.ad.smhi.se>
-
- Fix avhrr_gac instrument definition. [Martin Raspaud]
-
- Fix conversion to datetime64. [Martin Raspaud]
-
- Fix geoloc tests. [Martin Raspaud]
-
- Add support for 2d time arrays in geoloc. [Martin Raspaud]
-
- Merge branch 'develop' of github.com:pytroll/pyorbital into develop.
[Martin Raspaud]
Conflicts:
pyorbital/tests/test_aiaa.py
-
- Merge pull request #13 from pytroll/feature_np_datetime64. [Martin
Raspaud]
Feature np datetime64
-
- Merge branch 'develop' into feature_np_datetime64. [Martin Raspaud]
-
- Finish conversion to np datetime64. [Martin Raspaud]
-
- Add conversion func between datetime and np.datetime64. [Martin
Raspaud]
-
- Do not crash when start_of_scan already is datetime64. [Martin
Raspaud]
Signed-off-by: Martin Raspaud <martin.raspaud at smhi.se>
-
- Convert input times to datetime64. [Martin Raspaud]
Signed-off-by: Martin Raspaud <martin.raspaud at smhi.se>
-
- Allow offset application to be turned off (avhrr) [Martin Raspaud]
Signed-off-by: Martin Raspaud <martin.raspaud at smhi.se>
-
- Adapt to datetime64. [Martin Raspaud]
Signed-off-by: Martin Raspaud <martin.raspaud at smhi.se>
-
- Cleanup style. [Martin Raspaud]
-
- Fix indexing. [Martin Raspaud]
-
- Merge pull request #19 from howff/patch-1. [Adam Dybbroe]
Update platforms.txt with NOAA-20, MSG 4, GOES-16
-
- Update platforms.txt with NOAA-20, MSG 4, GOES-16. [howff]
-
- Merge pull request #14 from kconkas/master. [Martin Raspaud]
Python3 fixes for fetch()
-
- Python3 fixes for fetch() [Kristijan Conkas]
+
v1.1.1 (2017-01-10)
-------------------
-
- Update changelog. [Martin Raspaud]
-
- Bump version: 1.1.0 → 1.1.1. [Martin Raspaud]
-
- Allow offset application to be turned off (avhrr) [Martin Raspaud]
Signed-off-by: Martin Raspaud <martin.raspaud at smhi.se>
-
- Add a generic get_observer_look function. [Martin Raspaud]
Signed-off-by: Martin Raspaud <martin.raspaud at smhi.se>
-
- Add bump and changelog config files. [Martin Raspaud]
Signed-off-by: Martin Raspaud <martin.raspaud at smhi.se>
+
v1.1.0 (2016-10-27)
-------------------
-
- Update changelog. [Martin Raspaud]
-
- Bump version: 1.0.1 → 1.1.0. [Martin Raspaud]
-
- Merge branch 'master' into develop. [Martin Raspaud]
-
- Enable travis testing for py3. [Antonio Valentino]
-
- Fix regression in TLE reading. [Antonio Valentino]
-
- Python 3 compatibility. [Antonio Valentino]
+
v1.0.1 (2016-02-17)
-------------------
-
- Update changelog. [Martin Raspaud]
-
- Bump version: 1.0.0 → 1.0.1. [Martin Raspaud]
-
- Change sun_angle test to AlmostEqual. [Martin Raspaud]
Signed-off-by: Martin Raspaud <martin.raspaud at smhi.se>
+
v1.0.0 (2015-08-25)
-------------------
-
- Update changelog. [Martin Raspaud]
-
- Bump version: 0.3.2 → 1.0.0. [Martin Raspaud]
-
- Cleanup. [Martin Raspaud]
Signed-off-by: Martin Raspaud <martin.raspaud at smhi.se>
-
- Fix version number. [Martin Raspaud]
Signed-off-by: Martin Raspaud <martin.raspaud at smhi.se>
-
- Cosmetics. [Martin Raspaud]
Signed-off-by: Martin Raspaud <martin.raspaud at smhi.se>
-
- Merge pull request #2 from pnuu/feature_tle_lookup. [Martin Raspaud]
Use NORAD catalog numbers for TLE reading
-
- Example file for mapping OSCAR platform names and NORAD catalog
numbers. [Panu Lahtinen]
-
- Add setup.cfg for easy rpm generation. [Martin Raspaud]
Signed-off-by: Martin Raspaud <martin.raspaud at smhi.se>
-
- Merge branch 'develop' of github.com:mraspaud/pyorbital into develop.
[Martin Raspaud]
-
- Merge pull request #1 from spareeth/develop. [Martin Raspaud]
changes to avhrr_gacfunction and read_tle_decimal
-
- Added '+' as a condition in the read_tle function. [Sajid Pareeth]
-
- Renaming the variable scans_nb to scan_times in offset in avhrr_gac
function. [Sajid Pareeth]
-
- Bugfix: eccentricity too low message formatting. [Martin Raspaud]
Signed-off-by: Martin Raspaud <martin.raspaud at smhi.se>
-
- Allow reading TLE from the most recent file described by the TLES env.
[Martin Raspaud]
Signed-off-by: Martin Raspaud <martin.raspaud at smhi.se>
-
- Change decimate to frequency in avhrr instruments. [Martin Raspaud]
Signed-off-by: Martin Raspaud <martin.raspaud at smhi.se>
-
- Add the avhrr instrument, gac version. [Martin Raspaud]
Signed-off-by: Martin Raspaud <martin.raspaud at smhi.se>
-
- Accept missing zeros in TLE (old noaa compatibility). [Martin Raspaud]
-
- Add the horizon parameter to get_next_passes to get the
risetime/falltime at given angle. [Martin Raspaud]
Signed-off-by: Martin Raspaud <martin.raspaud at smhi.se>
-
- Merge branch 'master' into develop. [Martin Raspaud]
-
- Fix backwards numpy compatibility. [Martin Raspaud]
Signed-off-by: Martin Raspaud <martin.raspaud at smhi.se>
+
v0.3.2 (2014-04-10)
-------------------
-
- Merge branch 'develop' [Martin Raspaud]
-
- Bump up version number. [Martin Raspaud]
Signed-off-by: Martin Raspaud <martin.raspaud at smhi.se>
-
- Merge branch 'feature-no-scipy' into develop. [Martin Raspaud]
-
- Remove scipy dependencies. [Martin Raspaud]
Was depending on scipy.optimize, brent and brentq function.
@@ -275,387 +264,273 @@ v0.3.2 (2014-04-10)
Signed-off-by: Martin Raspaud <martin.raspaud at smhi.se>
-
- Correcting the travis file. [Martin Raspaud]
Signed-off-by: Martin Raspaud <martin.raspaud at smhi.se>
+
v0.3.1 (2014-02-24)
-------------------
-
- Bugfix in travis file. [Martin Raspaud]
-
- Bump up version number. [Martin Raspaud]
Signed-off-by: Martin Raspaud <martin.raspaud at smhi.se>
-
- Fixed documentation. [Martin Raspaud]
Signed-off-by: Martin Raspaud <martin.raspaud at smhi.se>
-
- Cleanup. [Martin Raspaud]
Signed-off-by: Martin Raspaud <martin.raspaud at smhi.se>
-
- New nadir computations for geoloc. [Martin Raspaud]
Signed-off-by: Martin Raspaud <martin.raspaud at smhi.se>
-
- More unit tests. [Martin Raspaud]
Signed-off-by: Martin Raspaud <martin.raspaud at smhi.se>
+
v0.3.0 (2014-01-07)
-------------------
-
- Auto update version number in documentation. [Martin Raspaud]
Signed-off-by: Martin Raspaud <martin.raspaud at smhi.se>
-
- Change to version file and bump up to v0.3.0. [Martin Raspaud]
Signed-off-by: Martin Raspaud <martin.raspaud at smhi.se>
-
- Cleanup the testfiles. [Martin Raspaud]
Signed-off-by: Martin Raspaud <martin.raspaud at smhi.se>
-
- Add a test to read tle from file. [Martin Raspaud]
Signed-off-by: Martin Raspaud <martin.raspaud at smhi.se>
-
- Fix doc path in MANIFEST.in. [Martin Raspaud]
Signed-off-by: Martin Raspaud <martin.raspaud at smhi.se>
+
v0.2.4 (2014-01-07)
-------------------
-
- Merge branch 'feature-travis' into pre-master. [Martin Raspaud]
-
- Add test for tle reading, cleanup and make ready for travis. [Martin
Raspaud]
Signed-off-by: Martin Raspaud <martin.raspaud at smhi.se>
-
- Cleanup. [Martin Raspaud]
Signed-off-by: Martin Raspaud <martin.raspaud at smhi.se>
-
- Add function to fetch the tle files from internet manually. [Martin
Raspaud]
Signed-off-by: Martin Raspaud <martin.raspaud at smhi.se>
-
- Adding the viirs instrument. [Martin Raspaud]
Signed-off-by: Martin Raspaud <martin.raspaud at smhi.se>
-
- Change sphinx theme. [Martin Raspaud]
Signed-off-by: Martin Raspaud <martin.raspaud at smhi.se>
-
- Fix doc for readthedocs. [Martin Raspaud]
Signed-off-by: Martin Raspaud <martin.raspaud at smhi.se>
-
- Remove unused old file. [Martin Raspaud]
Signed-off-by: Martin Raspaud <martin.raspaud at smhi.se>
-
- Merge branch 'geoloc' into pre-master. [Martin Raspaud]
-
- Work on geolocation. [Martin Raspaud]
Signed-off-by: Martin Raspaud <martin.raspaud at smhi.se>
-
- Numpyze the orbital computation. [Martin Raspaud]
Signed-off-by: Martin Raspaud <martin.raspaud at smhi.se>
-
- Add some logging in tle file fetching. [Martin Raspaud]
Signed-off-by: Martin Raspaud <martin.raspaud at smhi.se>
-
- Fix syntax error in doc/conf.py. [Martin Raspaud]
-
- Make the scan angle of avhrr an argument. [Martin Raspaud]
-
- Factorize avhrr code (geoloc definition) [Martin Raspaud]
Signed-off-by: Martin Raspaud <martin.raspaud at smhi.se>
-
- Add Mikhail's definition of AMSU-A. [Martin Raspaud]
-
- Add instrument examples for geoloc. [Martin Raspaud]
Signed-off-by: Martin Raspaud <martin.raspaud at smhi.se>
-
- Merge branch 'geoloc' of github.com:mraspaud/pyorbital into geoloc.
[Martin Raspaud]
-
- Try fixing nadir. [Martin Raspaud]
-
- Fix attitude. [Martin Raspaud]
-
- Updated doc and copyright. [Martin Raspaud]
-
- Add geoloc example. [Martin Raspaud]
Signed-off-by: Martin Raspaud <martin.raspaud at smhi.se>
-
- Merge branch 'feature-vectorize' into geoloc. [Martin Raspaud]
-
- Vectorize the days function. [Martin Raspaud]
-
- Merge branch 'master' into geoloc. [Martin Raspaud]
-
- Merge branch 'pre-master' into geoloc. [Martin Raspaud]
-
- Cosmetics. [Martin Raspaud]
-
- Computations for true nadir. [Martin Raspaud]
-
- Bugfix in the example and added attitude correction (roll and pitch
for now). [Martin Raspaud]
Signed-off-by: Martin Raspaud <martin.raspaud at smhi.se>
-
- Cosmetic, be consistent in name og time argument as 'utc_time' [Lars
Orum Rasmussen]
-
- Get_zenith_overpass replaced by Martin's get_next_passes. [Lars Orum
Rasmussen]
-
- Add sun_earth_distance_correction function. [Martin Raspaud]
+
v0.2.3 (2013-03-07)
-------------------
-
- Merge branch 'release-0.2.3' [Martin Raspaud]
-
- Merge branch 'pre-master' into release-0.2.3. [Martin Raspaud]
-
- Bumped up version number. [Martin Raspaud]
-
- Corrected search for previous an_time with a substracted 10 min. dt.
[Esben S. Nielsen]
-
- Merge branch 'release-0.2.2' [Martin Raspaud]
-
- Import with_statement in test_aiaa.py for python 2.5 compliance.
[Esben S. Nielsen]
-
- Made unit tests python 2.5 and 2.6 compliant. [Esben S. Nielsen]
-
- Removed download URL from setup.py. [Esben S. Nielsen]
-
- Bumped version number and marked as stable. [Esben S. Nielsen]
-
- Better handling of time deltas in test_aiaa.py. [Esben S. Nielsen]
-
- Updated equator test with position check. [Esben S. Nielsen]
-
- Now uses nodal period for orbit number calculation instead of revs/day
for mean motion. [Esben S. Nielsen]
-
- Orbit number now handles epoch AN mis-match. Made AIAA unit test path
agnostic. [Esben S. Nielsen]
-
- Better __main__ [Lars Orum Rasmussen]
-
- Adding risetime and falltime functions, and improving the
get_zenith_overpass function. [Adam Dybbroe]
-
- Editorial. [Adam Dybbroe]
-
- Cleanup. [Martin Raspaud]
Signed-off-by: Martin Raspaud <martin.raspaud at smhi.se>
-
- Feature: Correcting/adding test cases from the aiaa. [Martin Raspaud]
-
- Style: raises NotImplementedErrors instead of just Exceptions. [Martin
Raspaud]
-
- Merge branch 'pre-master' of github.com:mraspaud/pyorbital into pre-
master. [Martin Raspaud]
-
- Adding new function get_zenith_overpass to get the time when the
satellite passes over zenith relative to an observer on ground. [Adam
Dybbroe]
-
- Feature: Added checksum for tle lines. [Martin Raspaud]
+
v0.2.1 (2012-06-01)
-------------------
-
- Updated version number. [Martin Raspaud]
-
- Added pyorbital path to doc/source/conf.py. [Esben S. Nielsen]
-
- Updated docs and added license and manifest. [Esben S. Nielsen]
-
- Merge branch 'pre-master' of https://github.com/mraspaud/pyorbital
into pre-master. [Adam Dybbroe]
-
- Merge branch 'pre-master' of https://github.com/mraspaud/pyorbital
into pre-master. [Lars Orum Rasmussen]
-
- Added access to line1 and line2 in a Tle instance. [Lars Orum
Rasmussen]
Change satellite to platform
-
- Spelling error. [Adam Dybbroe]
+
v0.2.0 (2012-05-14)
-------------------
-
- Prepared for pypi. [Martin Raspaud]
-
- Merge branch 'geoloc' into pre-master. [Martin Raspaud]
-
- Added now compute pixels on the ellipsoid, not on the sphere anymore.
[Martin Raspaud]
-
- Merge branch 'master' into geoloc. [Martin Raspaud]
-
- Updated the geoloc todo list. [Martin Raspaud]
-
- Added the geoloc module. [Martin Raspaud]
-
- Merge branch 'master' into pre-master. [Martin Raspaud]
Conflicts:
pyorbital/tlefile.py
-
- Corrected handling of mean motion and orbitnumber fields in
tlefiles.py. [Esben S. Nielsen]
-
- Testing getting the orbit number from the TLEs. [Adam.Dybbroe]
-
- Fixing bug in tle file reading, so that also NPP and other satellites
with orbit numbers less than 9999 can be handled. [Adam.Dybbroe]
-
- Typo. [Adam.Dybbroe]
-
- Merge branch 'master' into pre-master. [Martin Raspaud]
-
- Removed html submodule. [Martin Raspaud]
-
- Fixing bug in function sun_zenith_angle. Changing interfaces so that
all public functions expects lon,lat in degrees. All internal
functions us radians. Made the lsmt and local_hour_angle functions
private. [Adam.Dybbroe]
-
- Adding main. [Adam.Dybbroe]
-
- Gathering unit tests to the tests-directory. [Adam.Dybbroe]
-
- Added separate test-script for astronomy.py. [Adam.Dybbroe]
-
- Collected all unit test scripts under the tests directory.
[Adam.Dybbroe]
-
- Merge branch 'release-0.2.0' [Martin Raspaud]
Conflicts:
doc/build
setup.py
-
- Bumped version number to 0.2.0. [Martin Raspaud]
-
- Added html documentation. [Martin Raspaud]
-
- Corrected sgp4's propagate in the case of array as input, and cleaned
up. [Martin Raspaud]
-
- Fixed calling test_aiaa from another directory. [Martin Raspaud]
-
- Vectorize merge. [Martin Raspaud]
-
- Merging master branch. [Martin Raspaud]
-
- Remove html submodule. [Martin Raspaud]
-
- Remove html submodule. [Martin Raspaud]
-
- Added Esben in the author field. [Martin Raspaud]
-
- Removed unneded .pyc file. [Martin Raspaud]
-
- Added unittests. [Esben S. Nielsen]
-
- Corrected observer_look function and added first unittest. [Esben S.
Nielsen]
-
- Corrected observer_pos in astronomy. [Esben S. Nielsen]
-
- Setting up documentation. [Martin Raspaud]
+
v0.1.0 (2011-10-03)
-------------------
-
- Merge branch 'release-0.1.0' [Martin Raspaud]
-
- Bumped version number to 0.1.0. [Martin Raspaud]
-
- Merge branch 'dundee_port' into pre-master. [Martin Raspaud]
-
- Cleanup and documentation. [Martin Raspaud]
-
- Now using unittest module for aiaa test cases. [Martin Raspaud]
-
- Added licences, and removed prints. [Martin Raspaud]
-
- Added basic tests to pyorbital. [Martin Raspaud]
-
- Ported SGP4 code to Dundee implementation. [Esben S. Nielsen]
-
- Ported sgp4 init. [Esben S. Nielsen]
-
- Added the first unit test :) [Martin Raspaud]
-
- New gmst function (from AIAA paper). Cleaning. [Martin Raspaud]
-
- Merged DMI and SMHI versions. [Esben S. Nielsen]
-
- Made the package more package-like. [Martin Raspaud]
-
- Cleanup of astronomy file. [Martin Raspaud]
-
- Added a readme file. [Martin Raspaud]
-
- Added astronomy.py file. [Martin Raspaud]
+
=====================================
doc/source/index.rst
=====================================
--- a/doc/source/index.rst
+++ b/doc/source/index.rst
@@ -10,6 +10,13 @@ Pyorbital is a python package to compute orbital parameters for satellites from
TLE files as well as astronomical parameters of interest for satellite remote sensing.
Currently pyorbital only supports low earth orbit satellites.
+Installation
+------------
+Pyorbital comes with a file platforms.txt that maps satellite name to NORAD identifier.
+This file needs to be copied to the appropriate satpy etc directory ($PPP_CONFIG_DIR).
+It is wise to check it contains your satellites of interest. The NORAD identifier can
+be found as the first number of each line in the Two-Line Elements (eg. from celestrak).
+
TLE files
---------
Pyorbital has a module for parsing NORAD TLE-files
=====================================
pyorbital/geoloc_instrument_definitions.py
=====================================
--- a/pyorbital/geoloc_instrument_definitions.py
+++ b/pyorbital/geoloc_instrument_definitions.py
@@ -140,24 +140,31 @@ def avhrr_40_geom(scans_nb):
################################################################
-def viirs(scans_nb, scan_indices=slice(0, None)):
- """Describe VIIRS instrument geometry, I-band.
-
+def viirs(scans_nb, scan_indices=slice(0, None),
+ chn_pixels=6400, scan_lines=32):
+ """Describe VIIRS instrument geometry, I-band by default.
+ VIIRS scans several lines simultaneously (there are 16 detectors for each
+ M-band, 32 detectors for each I-band) so the scan angles (and times) are
+ two-dimensional arrays, contrary to AVHRR for example.
"""
- entire_width = np.arange(6400)
+ entire_width = np.arange(chn_pixels)
scan_points = entire_width[scan_indices]
-
- across_track = (scan_points / 3199.5 - 1) * np.deg2rad(-55.84)
- y_max_angle = np.arctan2(11.87 / 2, 824.0)
- along_track = np.array([-y_max_angle, 0, y_max_angle])
-
scan_pixels = len(scan_points)
- scan = np.vstack((np.tile(across_track, scan_pixels),
- np.repeat(along_track, 6400))).T
-
- npp = np.tile(scan, [scans_nb, 1])
+ ''' initial angle 55.84 deg replaced with 56.28 deg found in
+ VIIRS User's Guide from NESDIS, version 1.2 (09/10/2013).
+ Ref : NOAA Technical Report NESDIS 142.
+ Seems to be better (not quantified)'''
+ across_track = \
+ (scan_points / (chn_pixels / 2. - 0.5) - 1) * np.deg2rad(-56.28)
+ y_max_angle = np.arctan2(11.87 / 2, 824.0)
+ along_track = \
+ -(np.arange(scan_lines) / (scan_lines / 2. - 0.5) - 1) * \
+ y_max_angle
+ scan = np.dstack((np.tile(across_track, (scan_lines, 1)).T,
+ np.tile(along_track, (scan_pixels, 1))))
+ npp = np.tile(scan, [scans_nb, 1]).T
# from the timestamp in the filenames, a granule takes 1:25.400 to record
# (85.4 seconds) so 1.779166667 would be the duration of 1 scanline
@@ -171,11 +178,18 @@ def viirs(scans_nb, scan_indices=slice(0, None)):
# http://www.eoportal.org/directory/pres_NPOESSNationalPolarorbitingOperationalEnvironmentalSatelliteSystem.html
offset = np.arange(scans_nb) * 1.779166667
- times = (np.tile(scan_points * 0.0002779947917, [scans_nb, scan_pixels])
+ times = (np.tile(scan_points * 0.0002779947917,
+ [np.int(scan_lines), np.int(scans_nb)])
+ np.expand_dims(offset, 1))
# build the scan geometry object
- return ScanGeometry(npp, times.ravel())
+ return ScanGeometry(npp, times)
+
+
+def viirs_edge_geom(scans_nb):
+ # we take only edge pixels
+ scan_indices = [0, -1]
+ return viirs(scans_nb, scan_indices)
################################################################
@@ -212,13 +226,180 @@ def amsua(scans_nb, edges_only=False):
# build the instrument (scan angles)
samples = np.vstack(((scan_points / (scan_len * 0.5 - 0.5) - 1)
* np.deg2rad(scan_angle),
- np.zeros((len(scan_points),)))).transpose()
- samples = np.tile(samples, [scans_nb, 1])
+ np.zeros((len(scan_points),))))
+ samples = np.tile(samples[:, np.newaxis, :], [1, np.int(scans_nb), 1])
+
+ # building the corresponding times array
+ offset = np.arange(scans_nb) * scan_rate
+ times = (np.tile(scan_points * sampling_interval + sync_time,
+ [np.int(scans_nb), 1])
+ + np.expand_dims(offset, 1))
+
+ # build the scan geometry object
+ return ScanGeometry(samples, times)
+
+
+def amsua_edge_geom(scans_nb):
+ # we take only edge pixels
+ return amsua(scans_nb, edges_only=True)
+
+
+################################################################
+#
+# MHS
+#
+################################################################
+
+def mhs(scans_nb, edges_only=False):
+ """ Describe MHS instrument geometry
+ See:
+ - https://www.eumetsat.int/website/home/Satellites/CurrentSatellites/Metop/MetopDesign/MHS/index.html
+ - https://www1.ncdc.noaa.gov/pub/data/satellite/publications/podguides/N-15%20thru%20N-19/pdf/0.0%20NOAA%20KLM%20Users%20Guide.pdf
+ (NOAA KLM Users Guide –August 2014 Revision)
+
+ Parameters:
+ scans_nb | int - number of scan lines
+
+ Keywords:
+ * edges_only - use only edge pixels
+
+ Returns:
+ pyorbital.geoloc.ScanGeometry object
+
+ """
+
+ scan_len = 90 # 90 samples per scan
+ scan_rate = 8/3. # single scan, seconds
+ scan_angle = -49.444 # swath, degrees
+ sampling_interval = (8/3.-1)/90. # single view, seconds
+
+ if edges_only:
+ scan_points = np.array([0, scan_len - 1])
+ else:
+ scan_points = np.arange(0, scan_len)
+
+ # build the instrument (scan angles)
+ samples = np.vstack(((scan_points / (scan_len * 0.5 - 0.5) - 1)
+ * np.deg2rad(scan_angle),
+ np.zeros((len(scan_points),))))
+ samples = np.tile(samples[:, np.newaxis, :], [1, np.int(scans_nb), 1])
# building the corresponding times array
offset = np.arange(scans_nb) * scan_rate
- times = (np.tile(scan_points * sampling_interval + sync_time, [scans_nb, 1])
+ times = (np.tile(scan_points * sampling_interval, [np.int(scans_nb), 1])
+ np.expand_dims(offset, 1))
# build the scan geometry object
- return ScanGeometry(samples, times.ravel())
+ return ScanGeometry(samples, times)
+
+
+def mhs_edge_geom(scans_nb):
+ # we take only edge pixels
+ return mhs(scans_nb, edges_only=True)
+
+
+################################################################
+#
+# HIRS/4
+#
+################################################################
+
+def hirs4(scans_nb, edges_only=False):
+ """ Describe HIRS/4 instrument geometry
+ See:
+ - https://www.eumetsat.int/website/home/Satellites/CurrentSatellites/Metop/MetopDesign/HIRS/index.html
+ - https://www1.ncdc.noaa.gov/pub/data/satellite/publications/podguides/N-15%20thru%20N-19/pdf/0.0%20NOAA%20KLM%20Users%20Guide.pdf
+ (NOAA KLM Users Guide –August 2014 Revision)
+
+ Parameters:
+ scans_nb | int - number of scan lines
+
+ Keywords:
+ * edges_only - use only edge pixels
+
+ Returns:
+ pyorbital.geoloc.ScanGeometry object
+
+ """
+
+ scan_len = 56 # 56 samples per scan
+ scan_rate = 6.4 # single scan, seconds
+ scan_angle = -49.5 # swath, degrees
+ sampling_interval = abs(scan_rate)/scan_len # single view, seconds
+
+ if edges_only:
+ scan_points = np.array([0, scan_len - 1])
+ else:
+ scan_points = np.arange(0, scan_len)
+
+ # build the instrument (scan angles)
+ samples = np.vstack(((scan_points / (scan_len * 0.5 - 0.5) - 1)
+ * np.deg2rad(scan_angle),
+ np.zeros((len(scan_points),))))
+ samples = np.tile(samples[:, np.newaxis, :], [1, np.int(scans_nb), 1])
+
+ # building the corresponding times array
+ offset = np.arange(scans_nb) * scan_rate
+ times = (np.tile(scan_points * sampling_interval, [np.int(scans_nb), 1])
+ + np.expand_dims(offset, 1))
+
+ # build the scan geometry object
+ return ScanGeometry(samples, times)
+
+
+def hirs4_edge_geom(scans_nb):
+ # we take only edge pixels
+ return hirs4(scans_nb, edges_only=True)
+
+
+################################################################
+#
+# ATMS
+#
+################################################################
+
+def atms(scans_nb, edges_only=False):
+ """ Describe MHS instrument geometry
+ See:
+ https://dtcenter.org/com-GSI/users/docs/presentations/2013_workshop/Garrett_GSI_2013.pdf (Assimilation of Suomi-NPP ATMS, Kevin Garrett et al., August 8, 2013)
+ https://www.star.nesdis.noaa.gov/star/documents/meetings/2016JPSSAnnual/S4/S4_13_JPSSScience2016_session4Part2_ATMS_Scan_Reversal_HYANG.pdf (Suomi NPP ATMS Scan Reversal Study, Hu (Tiger) Yang, NOAA/STAR ATMS SDR Working Group)
+
+ Parameters:
+ scans_nb | int - number of scan lines
+
+ Keywords:
+ * edges_only - use only edge pixels
+
+ Returns:
+ pyorbital.geoloc.ScanGeometry object
+
+ """
+
+ scan_len = 96 # 96 samples per scan
+ scan_rate = 8/3. # single scan, seconds
+ scan_angle = -52.7 # swath, degrees
+ sampling_interval = 18e-3 # single view, seconds
+
+ if edges_only:
+ scan_points = np.array([0, scan_len - 1])
+ else:
+ scan_points = np.arange(0, scan_len)
+
+ # build the instrument (scan angles)
+ samples = np.vstack(((scan_points / (scan_len * 0.5 - 0.5) - 1)
+ * np.deg2rad(scan_angle),
+ np.zeros((len(scan_points),))))
+ samples = np.tile(samples[:, np.newaxis, :], [1, np.int(scans_nb), 1])
+
+ # building the corresponding times array
+ offset = np.arange(scans_nb) * scan_rate
+ times = (np.tile(scan_points * sampling_interval, [np.int(scans_nb), 1])
+ + np.expand_dims(offset, 1))
+
+ # build the scan geometry object
+ return ScanGeometry(samples, times)
+
+
+def atms_edge_geom(scans_nb):
+ # we take only edge pixels
+ return atms(scans_nb, edges_only=True)
=====================================
pyorbital/orbital.py
=====================================
--- a/pyorbital/orbital.py
+++ b/pyorbital/orbital.py
@@ -111,8 +111,14 @@ def get_observer_look(sat_lon, sat_lat, sat_alt, utc_time, lon, lat, alt):
az_ = np.arctan(-top_e / top_s)
- az_ = np.where(top_s > 0, az_ + np.pi, az_)
- az_ = np.where(az_ < 0, az_ + 2 * np.pi, az_)
+ if hasattr(az_, 'chunks'):
+ # dask array
+ import dask.array as da
+ az_ = da.where(top_s > 0, az_ + np.pi, az_)
+ az_ = da.where(az_ < 0, az_ + 2 * np.pi, az_)
+ else:
+ az_[top_s > 0] += np.pi
+ az_[az_ < 0] += 2 * np.pi
rg_ = np.sqrt(rx * rx + ry * ry + rz * rz)
el_ = np.arcsin(top_z / rg_)
@@ -321,21 +327,18 @@ class Orbital(object):
"""
def elevation(minutes):
- """elevation
- """
+ """Compute the elevation."""
return self.get_observer_look(utc_time +
timedelta(
minutes=np.float64(minutes)),
lon, lat, alt)[1] - horizon
def elevation_inv(minutes):
- """inverse of elevation
- """
+ """Compute the inverse of elevation."""
return -elevation(minutes)
def get_root_secant(fun, start, end, tol=0.01):
- """Secant method
- """
+ """Secant method."""
x_0 = end
x_1 = start
fx_0 = fun(end)
@@ -350,37 +353,34 @@ class Orbital(object):
return x_1
def get_max_parab(fun, start, end, tol=0.01):
- """Successive parabolic interpolation
- """
-
- a = start
- c = end
+ """Successive parabolic interpolation."""
+ a = float(start)
+ c = float(end)
b = (a + c) / 2.0
- x = b
f_a = fun(a)
f_b = fun(b)
f_c = fun(c)
- while abs(c - a) > tol:
- x = b - 0.5 * (((b - a) ** 2 * (f_b - f_c)
+ x = b
+
+ while True:
+ x = x - 0.5 * (((b - a) ** 2 * (f_b - f_c)
- (b - c) ** 2 * (f_b - f_a)) /
((b - a) * (f_b - f_c) - (b - c) * (f_b - f_a)))
- f_x = fun(x)
- if x > b:
- a, b, c = b, x, c
- f_a, f_b, f_c = f_b, f_x, f_c
- else:
- a, b, c = a, x, b
- f_a, f_b, f_c = f_a, f_x, f_b
+ if np.isnan(x):
+ return b
+ if abs(b - x) <= tol:
+ return x
- return x
+ a, b, c = (a + x) / 2.0, x, (x + c) / 2.0
+ f_a, f_b, f_c = fun(a), fun(b), fun(c)
+ # every minute
times = utc_time + np.array([timedelta(minutes=minutes)
for minutes in range(length * 60)])
elev = self.get_observer_look(times, lon, lat, alt)[1] - horizon
zcs = np.where(np.diff(np.sign(elev)))[0]
-
res = []
risetime = None
falltime = None
@@ -396,11 +396,13 @@ class Orbital(object):
falltime = horizon_time
fallmins = horizon_mins
if risetime:
- middle = (risemins + fallmins) / 2.0
+ int_start = max(0, int(np.floor(risemins)))
+ int_end = min(len(elev), int(np.ceil(fallmins) + 1))
+ middle = int_start + np.argmax(elev[int_start:int_end])
highest = utc_time + \
timedelta(minutes=get_max_parab(
elevation_inv,
- middle - 0.1, middle + 0.1,
+ max(risemins, middle - 1), min(fallmins, middle + 1),
tol=tol / 60.0
))
res += [(risetime, falltime, highest)]
=====================================
pyorbital/tests/test_geoloc.py
=====================================
--- a/pyorbital/tests/test_geoloc.py
+++ b/pyorbital/tests/test_geoloc.py
@@ -29,7 +29,7 @@ from datetime import datetime, timedelta
import numpy as np
from pyorbital.geoloc import ScanGeometry, geodetic_lat, qrotate, subpoint
-from pyorbital.geoloc_instrument_definitions import avhrr
+from pyorbital.geoloc_instrument_definitions import avhrr, viirs, amsua, mhs, hirs4, atms
class TestQuaternion(unittest.TestCase):
@@ -184,6 +184,83 @@ class TestGeolocDefs(unittest.TestCase):
self.assertTrue(np.allclose(np.rad2deg(avh.fovs[0]),
np.array([10, 0, -10])))
+ def test_viirs(self):
+ """Test the definition of the viirs instrument
+ """
+ geom = viirs(1, np.array([0, 3200, 6399]))
+ expected_fovs = np.array([
+ np.tile(np.array([[ 0.98, -0. , -0.98]]), [32,1]),
+ np.tile(np.array([[ 0. , -0. , 0 ]]), [32,1])], dtype=np.float)
+ self.assertTrue(np.allclose(geom.fovs,
+ expected_fovs, rtol=1e-2, atol=1e-2))
+
+ def test_amsua(self):
+ """Test the definition of the amsua instrument
+ """
+ geom = amsua(1)
+ expected_fovs = np.array([
+ [[ 0.84, 0.78, 0.73, 0.67, 0.61, 0.55, 0.49, 0.44, 0.38,
+ 0.32, 0.26, 0.2 , 0.15, 0.09, 0.03, -0.03, -0.09, -0.15,
+ -0.2 , -0.26, -0.32, -0.38, -0.44, -0.49, -0.55, -0.61, -0.67,
+ -0.73, -0.78, -0.84]],
+ np.zeros((1, 30))], dtype=np.float)
+ self.assertTrue(np.allclose(geom.fovs, expected_fovs, rtol=1e-2, atol=1e-2))
+
+ def test_mhs(self):
+ """Test the definition of the mhs instrument
+ """
+ geom = mhs(1)
+ expected_fovs = np.array([
+ [[ 0.86, 0.84, 0.82, 0.8 , 0.79, 0.77, 0.75, 0.73, 0.71,
+ 0.69, 0.67, 0.65, 0.63, 0.61, 0.59, 0.57, 0.55, 0.53,
+ 0.51, 0.49, 0.48, 0.46, 0.44, 0.42, 0.4 , 0.38, 0.36,
+ 0.34, 0.32, 0.3 , 0.28, 0.26, 0.24, 0.22, 0.2 , 0.18,
+ 0.16, 0.15, 0.13, 0.11, 0.09, 0.07, 0.05, 0.03, 0.01,
+ -0.01, -0.03, -0.05, -0.07, -0.09, -0.11, -0.13, -0.15, -0.16,
+ -0.18, -0.2 , -0.22, -0.24, -0.26, -0.28, -0.3 , -0.32, -0.34,
+ -0.36, -0.38, -0.4 , -0.42, -0.44, -0.46, -0.48, -0.49, -0.51,
+ -0.53, -0.55, -0.57, -0.59, -0.61, -0.63, -0.65, -0.67, -0.69,
+ -0.71, -0.73, -0.75, -0.77, -0.79, -0.8 , -0.82, -0.84, -0.86]],
+ np.zeros((1, 90))], dtype=np.float)
+ self.assertTrue(np.allclose(geom.fovs,
+ expected_fovs, rtol=1e-2, atol=1e-2))
+
+ def test_hirs4(self):
+ """Test the definition of the hirs4 instrument
+ """
+ geom = hirs4(1)
+ expected_fovs = np.array([
+ [[ 0.86, 0.83, 0.8 , 0.77, 0.74, 0.71, 0.68, 0.64, 0.61,
+ 0.58, 0.55, 0.52, 0.49, 0.46, 0.42, 0.39, 0.36, 0.33,
+ 0.3 , 0.27, 0.24, 0.2 , 0.17, 0.14, 0.11, 0.08, 0.05,
+ 0.02, -0.02, -0.05, -0.08, -0.11, -0.14, -0.17, -0.2 , -0.24,
+ -0.27, -0.3 , -0.33, -0.36, -0.39, -0.42, -0.46, -0.49, -0.52,
+ -0.55, -0.58, -0.61, -0.64, -0.68, -0.71, -0.74, -0.77, -0.8 ,
+ -0.83, -0.86]],
+ np.zeros((1, 56))], dtype=np.float)
+ self.assertTrue(np.allclose(geom.fovs,
+ expected_fovs, rtol=1e-2, atol=1e-2))
+
+ def test_atms(self):
+ """Test the definition of the atms instrument
+ """
+ geom = atms(1)
+ expected_fovs = np.array([
+ [[ 0.92, 0.9 , 0.88, 0.86, 0.84, 0.82, 0.8 , 0.78, 0.76,
+ 0.75, 0.73, 0.71, 0.69, 0.67, 0.65, 0.63, 0.61, 0.59,
+ 0.57, 0.55, 0.53, 0.51, 0.49, 0.47, 0.46, 0.44, 0.42,
+ 0.4 , 0.38, 0.36, 0.34, 0.32, 0.3 , 0.28, 0.26, 0.24,
+ 0.22, 0.2 , 0.18, 0.16, 0.15, 0.13, 0.11, 0.09, 0.07,
+ 0.05, 0.03, 0.01, -0.01, -0.03, -0.05, -0.07, -0.09, -0.11,
+ -0.13, -0.15, -0.16, -0.18, -0.2 , -0.22, -0.24, -0.26, -0.28,
+ -0.3 , -0.32, -0.34, -0.36, -0.38, -0.4 , -0.42, -0.44, -0.46,
+ -0.47, -0.49, -0.51, -0.53, -0.55, -0.57, -0.59, -0.61, -0.63,
+ -0.65, -0.67, -0.69, -0.71, -0.73, -0.75, -0.76, -0.78, -0.8 ,
+ -0.82, -0.84, -0.86, -0.88, -0.9 , -0.92]],
+ np.zeros((1, 96))], dtype=np.float)
+ self.assertTrue(np.allclose(geom.fovs,
+ expected_fovs, rtol=1e-2, atol=1e-2))
+
def suite():
"""The suite for test_geoloc
=====================================
pyorbital/tests/test_orbital.py
=====================================
--- a/pyorbital/tests/test_orbital.py
+++ b/pyorbital/tests/test_orbital.py
@@ -56,7 +56,7 @@ class Test(unittest.TestCase):
self.assertTrue(np.abs(lon - expected_lon) < eps_deg, 'Calculation of sublon failed')
self.assertTrue(np.abs(lat - expected_lat) < eps_deg, 'Calculation of sublat failed')
self.assertTrue(np.abs(alt - expected_alt) < eps_deg, 'Calculation of altitude failed')
-
+
def test_observer_look(self):
sat = orbital.Orbital("ISS (ZARYA)",
line1="1 25544U 98067A 03097.78853147 .00021906 00000-0 28403-3 0 8652",
@@ -67,7 +67,7 @@ class Test(unittest.TestCase):
expected_el = 1.9800219611255456
self.assertTrue(np.abs(az - expected_az) < eps_deg, 'Calculation of azimut failed')
self.assertTrue(np.abs(el - expected_el) < eps_deg, 'Calculation of elevation failed')
-
+
def test_orbit_num_an(self):
sat = orbital.Orbital("METOP-A",
line1="1 29499U 06044A 11254.96536486 .00000092 00000-0 62081-4 0 5221",
@@ -98,6 +98,17 @@ class Test(unittest.TestCase):
self.assertTrue(pos1[2] < 0)
self.assertTrue(pos2[2] > 0)
+ def test_get_next_passes_apogee(self):
+ """Regression test #22."""
+ line1 = "1 24793U 97020B 18065.48735489 .00000075 00000-0 19863-4 0 9994"
+ line2 = "2 24793 86.3994 209.3241 0002020 89.8714 270.2713 14.34246429 90794"
+
+ orb = orbital.Orbital('IRIDIUM 7 [+]', line1=line1, line2=line2)
+ d = datetime(2018, 3, 7, 3, 30, 15)
+ res = orb.get_next_passes(d, 1, 170.556, -43.368, 0.5, horizon=40)
+ self.assertTrue(abs(res[0][2] - datetime(2018, 3, 7, 3, 48, 13, 178439)) < timedelta(seconds=0.01))
+
+
def suite():
"""The suite for test_orbital
=====================================
pyorbital/version.py
=====================================
--- a/pyorbital/version.py
+++ b/pyorbital/version.py
@@ -23,4 +23,4 @@
"""Version file.
"""
-__version__ = "v1.2.0"
+__version__ = "v1.3.1"
=====================================
setup.py
=====================================
--- a/setup.py
+++ b/setup.py
@@ -29,7 +29,7 @@ setup(name='pyorbital',
version=version.__version__,
description='Orbital parameters and astronomical computations in Python',
author='Martin Raspaud, Esben S. Nielsen',
- author_email='martin.raspaud at smhi.se, esn at dmi.dk',
+ author_email='martin.raspaud at smhi.se',
classifiers=["Development Status :: 5 - Production/Stable",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: GNU General Public License v3 " +
@@ -41,8 +41,7 @@ setup(name='pyorbital',
url="https://github.com/mraspaud/pyorbital",
test_suite='pyorbital.tests.suite',
package_dir = {'pyorbital': 'pyorbital'},
- packages = ['pyorbital'],
- install_requires=['numpy>=1.6.0'],
+ packages = ['pyorbital'],
+ install_requires=['numpy>=1.6.0,!=1.14.0'],
zip_safe=False,
)
-
View it on GitLab: https://salsa.debian.org/debian-gis-team/pyorbital/commit/e3f815828838c9a7b494e210b85c44453e3c755f
---
View it on GitLab: https://salsa.debian.org/debian-gis-team/pyorbital/commit/e3f815828838c9a7b494e210b85c44453e3c755f
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-grass-devel/attachments/20180412/e563c592/attachment-0001.html>
More information about the Pkg-grass-devel
mailing list