Skip to content

Commit

Permalink
Merge for release 0.2.0 (#2)
Browse files Browse the repository at this point in the history
* Update tests to include coverage of recommendation ITU-R P.618
* Reducing amount of code duplicated.
* Added recommendation ITU-R P.1853-0 and ITU-R P.1853-1
* Added Recommendation ITU-R P.530-17
* Added method to compute scintillation_attenuation_sigma
* Added method slant_inclined_path_equivalent_height
* Added documentation for plot_in_map function
* Added examples for recommendations ITU-1510 and ITU-837
  • Loading branch information
iportillo authored May 30, 2018
1 parent 98b68e8 commit 97321ce
Show file tree
Hide file tree
Showing 10 changed files with 698 additions and 136 deletions.
27 changes: 27 additions & 0 deletions examples/itu_1510_mean_surface_temperature.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# -*- coding: utf-8 -*-
""" This example shows how to compute the anuaml mean surface temperature
over a large region of the Earth.
This image is similar to the one plotted in page 3 of Recommendation
ITU-R P.1510-1.
"""
import itur
import matplotlib.pyplot as plt

# Set Recommendation ITU-R P.837 to version 7
itur.models.itu1510.change_version(1)

# Generate a regular grid of latitude and longitudes with 0.1 degree resolution
# for the region of interest.
lat, lon = itur.utils.regular_lat_lon_grid(resolution_lat=0.1,
resolution_lon=0.1)

# Compute the surface mean temperature
T = itur.models.itu1510.surface_mean_temperature(lat, lon)

# Display the results in a map
fig = plt.figure(figsize=(16, 8))
ax = fig.add_subplot(1, 1, 1)
m = itur.utils.plot_in_map(
T, lat, lon, cmap='jet', vmin=230, vmax=310, ax=ax,
cbar_text='Annual mean surface temperature [K]')
28 changes: 28 additions & 0 deletions examples/itu_837_rainfall_map.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# -*- coding: utf-8 -*-
""" This example shows how to compute the rainfall-rate (mm/hr) exceeded
for 0.01 % of the time of the average year over a large region of the Earth.
This image is similar to the one plotted in page 5 of Recommendation
ITU-R P.837-7.
"""
import itur
import matplotlib.pyplot as plt

# Set Recommendation ITU-R P.837 to version 7
itur.models.itu837.change_version(7)

# Generate a regular grid of latitude and longitudes with 0.1 degree resolution
# for the region of interest.
lat, lon = itur.utils.regular_lat_lon_grid(resolution_lat=0.1,
resolution_lon=0.1)

# Compute the rainfall rate exceeded for 0.01 % of the time.
p = 0.01
R001 = itur.models.itu837.rainfall_rate(lat, lon, p)

# Display the results in a map
fig = plt.figure(figsize=(16, 8))
ax = fig.add_subplot(1, 1, 1)
m = itur.utils.plot_in_map(
R001, lat, lon, cmap='jet', vmin=0, vmax=90, ax=ax,
cbar_text='Rainfall rate exceeded for 0.01% of an average year [mm/hr]')
2 changes: 1 addition & 1 deletion itur/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def atmospheric_attenuation_slant_path(
Total atmospheric attenuation (dB)
Ag, Ac, Ar, As, A : tuple
Gaseous, Cloud, Rain, Scintillation cotributions to total attenuation,
Gaseous, Cloud, Rain, Scintillation contributions to total attenuation,
and total attenuation (dB)
Expand Down
2 changes: 1 addition & 1 deletion itur/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"""Version information."""

# The following line *must* be the last in the module, exactly as formatted:
__version__ = "0.1.6"
__version__ = "0.2.0"
Loading

0 comments on commit 97321ce

Please sign in to comment.