Change the stereographic projection radius scale

Now the scale is linear (as it should be...)
This commit is contained in:
Sylvain Tricot 2024-03-11 09:51:47 +01:00
parent 6c7038cdde
commit 583eb08924
1 changed files with 6 additions and 4 deletions

View File

@ -17,8 +17,8 @@
# along with this msspec. If not, see <http://www.gnu.org/licenses/>. # along with this msspec. If not, see <http://www.gnu.org/licenses/>.
# #
# Source file : src/msspec/iodata.py # Source file : src/msspec/iodata.py
# Last modified: Mon, 27 Sep 2021 17:49:48 +0200 # Last modified: Mon, 11 Mar 2024 09:51:47 +0100
# Committed by : sylvain tricot <sylvain.tricot@univ-rennes1.fr> # Committed by : Sylvain Tricot <sylvain.tricot@univ-rennes.fr>
""" """
@ -885,8 +885,10 @@ class _DataSetView(object):
R = np.sin(np.radians(theta)) R = np.sin(np.radians(theta))
R_ticks = np.sin(np.radians(theta_ticks)) R_ticks = np.sin(np.radians(theta_ticks))
elif proj == 'stereo': elif proj == 'stereo':
R = 2 * np.tan(np.radians(theta/2.)) #R = 2 * np.tan(np.radians(theta/2.))
R_ticks = 2 * np.tan(np.radians(theta_ticks/2.)) #R_ticks = 2 * np.tan(np.radians(theta_ticks/2.))
R = theta/90.
R_ticks = theta_ticks/90.
#R = np.tan(np.radians(theta/2.)) #R = np.tan(np.radians(theta/2.))
X, Y = np.meshgrid(np.radians(phi), R) X, Y = np.meshgrid(np.radians(phi), R)
im = axes.pcolormesh(X, Y, Xsec, shading='gouraud') im = axes.pcolormesh(X, Y, Xsec, shading='gouraud')