Example 1: Plotting H density profiles

[5]:
#pip install EXOSpy==2.3
Collecting EXOSpy==2.3
  Downloading EXOSpy-2.3.tar.gz (11 kB)
Requirement already satisfied: scikit-learn in /Users/gcuchopa/opt/anaconda3/lib/python3.8/site-packages (from EXOSpy==2.3) (0.24.1)
Requirement already satisfied: numpy in /Users/gcuchopa/opt/anaconda3/lib/python3.8/site-packages (from EXOSpy==2.3) (1.20.1)
Requirement already satisfied: scipy in /Users/gcuchopa/opt/anaconda3/lib/python3.8/site-packages (from EXOSpy==2.3) (1.6.2)
Requirement already satisfied: matplotlib in /Users/gcuchopa/opt/anaconda3/lib/python3.8/site-packages (from EXOSpy==2.3) (3.3.4)
Requirement already satisfied: kiwisolver>=1.0.1 in /Users/gcuchopa/opt/anaconda3/lib/python3.8/site-packages (from matplotlib->EXOSpy==2.3) (1.3.1)
Requirement already satisfied: cycler>=0.10 in /Users/gcuchopa/opt/anaconda3/lib/python3.8/site-packages (from matplotlib->EXOSpy==2.3) (0.10.0)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.3 in /Users/gcuchopa/opt/anaconda3/lib/python3.8/site-packages (from matplotlib->EXOSpy==2.3) (2.4.7)
Requirement already satisfied: pillow>=6.2.0 in /Users/gcuchopa/opt/anaconda3/lib/python3.8/site-packages (from matplotlib->EXOSpy==2.3) (8.2.0)
Requirement already satisfied: python-dateutil>=2.1 in /Users/gcuchopa/opt/anaconda3/lib/python3.8/site-packages (from matplotlib->EXOSpy==2.3) (2.8.1)
Requirement already satisfied: six in /Users/gcuchopa/opt/anaconda3/lib/python3.8/site-packages (from cycler>=0.10->matplotlib->EXOSpy==2.3) (1.15.0)
Requirement already satisfied: threadpoolctl>=2.0.0 in /Users/gcuchopa/opt/anaconda3/lib/python3.8/site-packages (from scikit-learn->EXOSpy==2.3) (2.1.0)
Requirement already satisfied: joblib>=0.11 in /Users/gcuchopa/opt/anaconda3/lib/python3.8/site-packages (from scikit-learn->EXOSpy==2.3) (1.0.1)
Building wheels for collected packages: EXOSpy
  Building wheel for EXOSpy (setup.py) ... done
  Created wheel for EXOSpy: filename=EXOSpy-2.3-py3-none-any.whl size=11228 sha256=e7ddee153ea8c14db2819ce7ff22d25f644d31d921c2b2b1a8ad5b1d6bcad01c
  Stored in directory: /Users/gcuchopa/Library/Caches/pip/wheels/de/bd/2b/306ae35dae95d2797948aaba380cffcc2f9d220115b3873e6d
Successfully built EXOSpy
Installing collected packages: EXOSpy
  Attempting uninstall: EXOSpy
    Found existing installation: EXOSpy 2.2
    Uninstalling EXOSpy-2.2:
      Successfully uninstalled EXOSpy-2.2
Successfully installed EXOSpy-2.3
Note: you may need to restart the kernel to use updated packages.
[1]:
#------- EXAMPLE OUTER EXOSPHERE PLOTS -----------------------------------------
import exospy.exospy as ep
import numpy.matlib
#import matplotlib.pyplot as plt

# Create a Class exosgrid
myexosgrid = ep.exosgrid()

# Initial values for geometric structure
myexosgrid.rmin   = 3
myexosgrid.rmax   = 8
myexosgrid.rstep  = 0.25
myexosgrid.pmin   = 0
myexosgrid.pmax   = 360
myexosgrid.pstep  = 5
myexosgrid.tmin   = 0
myexosgrid.tmax   = 180
myexosgrid.tstep  = 5

# Calculate internal values
myexosgrid.calculate_intvals()

# Plot 3D H model - Zoennchen (2015) Solar minimum conditions
[MapExo,H]         = ep.draw3DHmodel('Z15MAX',myexosgrid,'map',3,True)

[MeridionalExo,H]  = ep.draw3DHmodel('Z15MAX',myexosgrid,'meridional',0,True)

[EquatorialExo,H]  = ep.draw3DHmodel('Z15MAX',myexosgrid,'equatorial',0,True)
/Users/gcuchopa/opt/anaconda3/lib/python3.8/site-packages/exospy/exospy.py:972: MatplotlibDeprecationWarning: shading='flat' when X and Y have the same dimensions as C is deprecated since 3.3.  Either specify the corners of the quadrilaterals with X and Y, or pass shading='auto', 'nearest' or 'gouraud', or set rcParams['pcolor.shading'].  This will become an error two minor releases later.
  im = ax.pcolormesh(X1,X2,np.log10(toPlot),cmap='inferno',linewidth=0,rasterized = True)
/Users/gcuchopa/opt/anaconda3/lib/python3.8/site-packages/exospy/exospy.py:993: MatplotlibDeprecationWarning: shading='flat' when X and Y have the same dimensions as C is deprecated since 3.3.  Either specify the corners of the quadrilaterals with X and Y, or pass shading='auto', 'nearest' or 'gouraud', or set rcParams['pcolor.shading'].  This will become an error two minor releases later.
  im = ax.pcolormesh(X1,X2,np.log10(toPlot),cmap='inferno',linewidth=0,rasterized = True)
../_images/notebooks_Example1_2_1.png
../_images/notebooks_Example1_2_2.png
../_images/notebooks_Example1_2_3.png