Brightness maps

The brightness maps are defined in "brightness_maps.c". Additional models can be added here by the user.


In [6]:
%load_ext autoreload
%autoreload 2

% matplotlib inline
import matplotlib.pyplot as plt
import numpy as np
import spiderman as sp

Zhang

The Zhang model (Zhang and Showman 2016, appendix 2) is considered the "Default mode" of Spiderman. It provides a decent balance between model simplicity and explanitory power. It is able to simulate offset hotspots and equatorial jet formation implicitely, and provides a good match to high quality GCM's


In [3]:
spider_params = sp.ModelParams(brightness_model='zhang')

spider_params.n_layers= 20

spider_params.t0= 200               # Central time of PRIMARY transit [days]
spider_params.per= 0.81347753       # Period [days]
spider_params.a_abs= 0.01526        # The absolute value of the semi-major axis [AU]
spider_params.inc= 82.33            # Inclination [degrees]
spider_params.ecc= 0.0              # Eccentricity
spider_params.w= 90                 # Argument of periastron
spider_params.rp= 0.1594            # Planet to star radius ratio
spider_params.a= 4.855              # Semi-major axis scaled by stellar radius
spider_params.p_u1= 0               # Planetary limb darkening parameter
spider_params.p_u2= 0               # Planetary limb darkening parameter

spider_params.xi= 0.3       # Ratio of radiative to advective timescale             
spider_params.T_n= 1128     # Temperature of nightside
spider_params.delta_T= 942  # Day-night temperature contrast
spider_params.T_s = 4500    # Temperature of the star

spider_params.l1 = 1.1e-6   # Lower wavelength bound (m)
spider_params.l2 = 1.7e-6   # upper wavelength bound (m)

min_temp = spider_params.T_n
max_temp = spider_params.T_n + spider_params.delta_T

spider_params.plot_quad(min_temp=min_temp,max_temp=max_temp,temp_map=True)

fname = 'b51'
plt.savefig('../docs/images/'+fname+'.png',bbox_inches='tight')
plt.savefig('../docs/images/'+fname+'.pdf',bbox_inches='tight')

plt.show()

p = np.linspace(0,1,100)

lc = spider_params.lightcurve(p,use_phase=True)
plt.plot(p,lc)

fname = 'b52'
plt.savefig('../docs/images/'+fname+'.png',bbox_inches='tight')
plt.savefig('../docs/images/'+fname+'.pdf',bbox_inches='tight')

plt.show()


Note - quad phase plots have an additional 'theme' parameter, the default is black and looks better on screens, but a white background version exists which is more printer friendly


In [5]:
spider_params.plot_quad(min_temp=min_temp,max_temp=max_temp,temp_map=True,theme='white')
fname = 'b53'
plt.savefig('../docs/images/'+fname+'.png',bbox_inches='tight')
plt.savefig('../docs/images/'+fname+'.pdf',bbox_inches='tight')



In [29]:
spider_params = sp.ModelParams(brightness_model='zhang')

spider_params.n_layers= 20

spider_params.t0= 200               # Central time of PRIMARY transit [days]
spider_params.per= 0.81347753       # Period [days]
spider_params.a_abs= 0.01526        # The absolute value of the semi-major axis [AU]
spider_params.inc= 82.33            # Inclination [degrees]
spider_params.ecc= 0.0              # Eccentricity
spider_params.w= 90                 # Argument of periastron
spider_params.rp= 0.1594            # Planet to star radius ratio
spider_params.a= 4.855              # Semi-major axis scaled by stellar radius
spider_params.p_u1= 0               # Planetary limb darkening parameter
spider_params.p_u2= 0               # Planetary limb darkening parameter

spider_params.xi= 0.3       # Ratio of radiative to advective timescale             
spider_params.T_n= 1128     # Temperature of nightside
spider_params.delta_T= 942  # Day-night temperature contrast
spider_params.T_s = 4500    # Temperature of the star

spider_params.l1 = 1.1e-6   # Lower wavelength bound (m)
spider_params.l2 = 1.7e-6   # upper wavelength bound (m)

min_temp = spider_params.T_n
max_temp = spider_params.T_n + spider_params.delta_T

fig, axs = plt.subplots(2,2,figsize=(8,8))

spider_params.plot_planet(0,use_phase=True,ax=axs[0,0],show_cax=False,min_temp=min_temp,max_temp=max_temp,temp_map=True)
spider_params.plot_planet(0.25,use_phase=True,ax=axs[0,1],show_cax=False,min_temp=min_temp,max_temp=max_temp,temp_map=True)
spider_params.plot_planet(0.5,use_phase=True,ax=axs[1,0],show_cax=False,min_temp=min_temp,max_temp=max_temp,temp_map=True)
spider_params.plot_planet(0.75,use_phase=True,ax=axs[1,1],show_cax=False,min_temp=min_temp,max_temp=max_temp,temp_map=True)

fig.subplots_adjust(wspace=0, hspace=0)

fname = 'b51'
plt.savefig('../docs/images/'+fname+'.png',bbox_inches='tight')
plt.savefig('../docs/images/'+fname+'.pdf',bbox_inches='tight')

plt.show()

p = np.linspace(0,1,100)

lc = spider_params.lightcurve(p,use_phase=True)
plt.plot(p,lc)

fname = 'b52'
plt.savefig('../docs/images/'+fname+'.png',bbox_inches='tight')
plt.savefig('../docs/images/'+fname+'.pdf',bbox_inches='tight')

plt.show()


Uniform brightness


In [24]:
spider_params = sp.ModelParams(brightness_model='uniform brightness')

spider_params.n_layers= 20

spider_params.t0= 200               # Central time of PRIMARY transit [days]
spider_params.per= 0.81347753       # Period [days]
spider_params.a_abs= 0.01526        # The absolute value of the semi-major axis [AU]
spider_params.inc= 82.33            # Inclination [degrees]
spider_params.ecc= 0.0              # Eccentricity
spider_params.w= 90                 # Argument of periastron
spider_params.rp= 0.1594            # Planet to star radius ratio
spider_params.a= 4.855              # Semi-major axis scaled by stellar radius
spider_params.p_u1= 0               # Planetary limb darkening parameter
spider_params.p_u2= 0               # Planetary limb darkening parameter

spider_params.pb= 0.01       # Total brightness relative to star. Star = 1.0

fig, axs = plt.subplots(2,2,figsize=(8,8))

spider_params.plot_planet(0,use_phase=True,ax=axs[0,0],show_cax=False)
spider_params.plot_planet(0.25,use_phase=True,ax=axs[0,1],show_cax=False)
spider_params.plot_planet(0.5,use_phase=True,ax=axs[1,0],show_cax=False)
spider_params.plot_planet(0.75,use_phase=True,ax=axs[1,1],show_cax=False)

fig.subplots_adjust(wspace=0, hspace=0)

fname = 'b11'
plt.savefig('../docs/images/'+fname+'.png',bbox_inches='tight')
plt.savefig('../docs/images/'+fname+'.pdf',bbox_inches='tight')

plt.show()

p = np.linspace(0,1,100)

lc = spider_params.lightcurve(p,use_phase=True)
plt.plot(p,lc)

fname = 'b12'
plt.savefig('../docs/images/'+fname+'.png',bbox_inches='tight')
plt.savefig('../docs/images/'+fname+'.pdf',bbox_inches='tight')

plt.show()


Uniform temperature


In [25]:
spider_params = sp.ModelParams(brightness_model='uniform temperature')

spider_params.n_layers= 20

spider_params.t0= 200               # Central time of PRIMARY transit [days]
spider_params.per= 0.81347753       # Period [days]
spider_params.a_abs= 0.01526        # The absolute value of the semi-major axis [AU]
spider_params.inc= 82.33            # Inclination [degrees]
spider_params.ecc= 0.0              # Eccentricity
spider_params.w= 90                 # Argument of periastron
spider_params.rp= 0.1594            # Planet to star radius ratio
spider_params.a= 4.855              # Semi-major axis scaled by stellar radius
spider_params.p_u1= 0               # Planetary limb darkening parameter
spider_params.p_u2= 0               # Planetary limb darkening parameter

spider_params.T_s= 4500       # Total brightness relative to star. Star = 1.0
spider_params.T_p= 1600       # Total brightness relative to star. Star = 1.0

spider_params.l1 = 1.1e-6   # Lower wavelength bound (m)
spider_params.l2 = 1.7e-6   # upper wavelength bound (m)

fig, axs = plt.subplots(2,2,figsize=(8,8))

spider_params.plot_planet(0,use_phase=True,ax=axs[0,0],show_cax=False)
spider_params.plot_planet(0.25,use_phase=True,ax=axs[0,1],show_cax=False)
spider_params.plot_planet(0.5,use_phase=True,ax=axs[1,0],show_cax=False)
spider_params.plot_planet(0.75,use_phase=True,ax=axs[1,1],show_cax=False)

fig.subplots_adjust(wspace=0, hspace=0)

fname = 'b21'
plt.savefig('../docs/images/'+fname+'.png',bbox_inches='tight')
plt.savefig('../docs/images/'+fname+'.pdf',bbox_inches='tight')

plt.show()

p = np.linspace(0,1,100)

lc = spider_params.lightcurve(p,use_phase=True)
plt.plot(p,lc)

fname = 'b22'
plt.savefig('../docs/images/'+fname+'.png',bbox_inches='tight')
plt.savefig('../docs/images/'+fname+'.pdf',bbox_inches='tight')

plt.show()


Two brightness


In [26]:
spider_params = sp.ModelParams(brightness_model='two brightness')

spider_params.n_layers= 20

spider_params.t0= 200               # Central time of PRIMARY transit [days]
spider_params.per= 0.81347753       # Period [days]
spider_params.a_abs= 0.01526        # The absolute value of the semi-major axis [AU]
spider_params.inc= 82.33            # Inclination [degrees]
spider_params.ecc= 0.0              # Eccentricity
spider_params.w= 90                 # Argument of periastron
spider_params.rp= 0.1594            # Planet to star radius ratio
spider_params.a= 4.855              # Semi-major axis scaled by stellar radius
spider_params.p_u1= 0               # Planetary limb darkening parameter
spider_params.p_u2= 0               # Planetary limb darkening parameter

spider_params.pb_d= 0.02       # Total brightness relative to star. Star = 1.0
spider_params.pb_n = 0.01       # Total brightness relative to star. Star = 1.0

fig, axs = plt.subplots(2,2,figsize=(8,8))

min_temp = spider_params.pb_n/np.pi
max_temp = spider_params.pb_d/np.pi

spider_params.plot_planet(0,use_phase=True,ax=axs[0,0],show_cax=False,max_temp=max_temp,min_temp=min_temp)
spider_params.plot_planet(0.25,use_phase=True,ax=axs[0,1],show_cax=False,max_temp=max_temp,min_temp=min_temp)
spider_params.plot_planet(0.5,use_phase=True,ax=axs[1,0],show_cax=False,max_temp=max_temp,min_temp=min_temp)
spider_params.plot_planet(0.75,use_phase=True,ax=axs[1,1],show_cax=False,max_temp=max_temp,min_temp=min_temp)

fig.subplots_adjust(wspace=0, hspace=0)

fname = 'b31'
plt.savefig('../docs/images/'+fname+'.png',bbox_inches='tight')
plt.savefig('../docs/images/'+fname+'.pdf',bbox_inches='tight')

plt.show()

p = np.linspace(0,1,100)

lc = spider_params.lightcurve(p,use_phase=True)
plt.plot(p,lc)

fname = 'b32'
plt.savefig('../docs/images/'+fname+'.png',bbox_inches='tight')
plt.savefig('../docs/images/'+fname+'.pdf',bbox_inches='tight')

plt.show()


Two temperatures


In [27]:
spider_params = sp.ModelParams(brightness_model='two temperature')

spider_params.n_layers= 20

spider_params.t0= 200               # Central time of PRIMARY transit [days]
spider_params.per= 0.81347753       # Period [days]
spider_params.a_abs= 0.01526        # The absolute value of the semi-major axis [AU]
spider_params.inc= 82.33            # Inclination [degrees]
spider_params.ecc= 0.0              # Eccentricity
spider_params.w= 90                 # Argument of periastron
spider_params.rp= 0.1594            # Planet to star radius ratio
spider_params.a= 4.855              # Semi-major axis scaled by stellar radius
spider_params.p_u1= 0               # Planetary limb darkening parameter
spider_params.p_u2= 0               # Planetary limb darkening parameter

spider_params.T_s= 4500       # Total brightness relative to star. Star = 1.0
spider_params.T_p_d= 1900       # Total brightness relative to star. Star = 1.0
spider_params.T_p_n= 1200       # Total brightness relative to star. Star = 1.0

spider_params.l1 = 1.1e-6   # Lower wavelength bound (m)
spider_params.l2 = 1.7e-6   # upper wavelength bound (m)

fig, axs = plt.subplots(2,2,figsize=(8,8))

min_temp = spider_params.T_p_n
max_temp = spider_params.T_p_d

spider_params.plot_planet(0,use_phase=True,ax=axs[0,0],show_cax=False,temp_map=True,max_temp=max_temp,min_temp=min_temp)
spider_params.plot_planet(0.25,use_phase=True,ax=axs[0,1],show_cax=False,temp_map=True,max_temp=max_temp,min_temp=min_temp)
spider_params.plot_planet(0.5,use_phase=True,ax=axs[1,0],show_cax=False,temp_map=True,max_temp=max_temp,min_temp=min_temp)
spider_params.plot_planet(0.75,use_phase=True,ax=axs[1,1],show_cax=False,temp_map=True,max_temp=max_temp,min_temp=min_temp)

fig.subplots_adjust(wspace=0, hspace=0)

fname = 'b41'
plt.savefig('../docs/images/'+fname+'.png',bbox_inches='tight')
plt.savefig('../docs/images/'+fname+'.pdf',bbox_inches='tight')

plt.show()

p = np.linspace(0,1,100)

lc = spider_params.lightcurve(p,use_phase=True)
plt.plot(p,lc)

fname = 'b42'
plt.savefig('../docs/images/'+fname+'.png',bbox_inches='tight')
plt.savefig('../docs/images/'+fname+'.pdf',bbox_inches='tight')

plt.show()


Spherical Harmonics


In [1]:
%load_ext autoreload
%autoreload 2

% matplotlib inline
import matplotlib.pyplot as plt
import numpy as np
import spiderman as sp

In [2]:
spider_params = sp.ModelParams(brightness_model='spherical')

spider_params.n_layers= 20

spider_params.t0= 200               # Central time of PRIMARY transit [days]
spider_params.per= 0.81347753       # Period [days]
spider_params.a_abs= 0.01526        # The absolute value of the semi-major axis [AU]
spider_params.inc= 82.33            # Inclination [degrees]
spider_params.ecc= 0.0              # Eccentricity
spider_params.w= 90                 # Argument of periastron
spider_params.rp= 0.1594            # Planet to star radius ratio
spider_params.a= 4.855              # Semi-major axis scaled by stellar radius
spider_params.p_u1= 0               # Planetary limb darkening parameter
spider_params.p_u2= 0               # Planetary limb darkening parameter

spider_params.sph= 1.0       # vector of spherical harmonic weights

spider_params.plot_quad()

fname = 'b51'
plt.savefig('../docs/images/'+fname+'.png',bbox_inches='tight')
plt.savefig('../docs/images/'+fname+'.pdf',bbox_inches='tight')

plt.show()

p = np.linspace(0,1,100)

lc = spider_params.lightcurve(p,use_phase=True)
plt.plot(p,lc)

fname = 'b52'
plt.savefig('../docs/images/'+fname+'.png',bbox_inches='tight')
plt.savefig('../docs/images/'+fname+'.pdf',bbox_inches='tight')

plt.show()


Physical hotspot

Coming soon!

Orange segment

Coming soon!

Lambertian sphere

Coming soon!

Scattering spere

Coming soon!


In [ ]: