RV and Photometry time-series in the presence of stellar activity¶
In this notebook, we model a Sun-like star featuring both spots and faculae over a full stellar rotation. Using these simulations, we generate the corresponding photometric light curve and radial velocity time series, computed via the standard QS FTS CCF method.
In [1]:
Copied!
import numpy as np
import matplotlib.pyplot as plt
from SOAP.visualizer import plot_absorption_map
from SOAP.utils import transit_durations
import SOAP
from IPython.display import HTML
import numpy as np
import matplotlib.pyplot as plt
from SOAP.visualizer import plot_absorption_map
from SOAP.utils import transit_durations
import SOAP
from IPython.display import HTML
In [2]:
Copied!
# Star-like star, rigid rotation
radius=1 # Stellar radius [solar radii]
mass=1 # Stellar mass [solar masses]
prot=24.47 # Stellar rotation period [days]
incl=45 # Stellar inclination [degrees] -> 90 is equator-on, 0 is pole-on
logg= 4.4 # Stellar surface gravity [cgs]
feh= 0.00 # Stellar metallicity [dex]
Teff=5777 # Stellar effective temperature [K]
ldcn=[[0.5,0.16]] # Linear and quadratic limb-darkening coefficients (must agree with λ, see below)
start_psi=0.0 # Starting phase of the star
# Observational parameters
λ =[3782, 7887] # Wavelength range [Angstrom]
Res=140000 # Instrumental resolution
# Star-like star, rigid rotation
radius=1 # Stellar radius [solar radii]
mass=1 # Stellar mass [solar masses]
prot=24.47 # Stellar rotation period [days]
incl=45 # Stellar inclination [degrees] -> 90 is equator-on, 0 is pole-on
logg= 4.4 # Stellar surface gravity [cgs]
feh= 0.00 # Stellar metallicity [dex]
Teff=5777 # Stellar effective temperature [K]
ldcn=[[0.5,0.16]] # Linear and quadratic limb-darkening coefficients (must agree with λ, see below)
start_psi=0.0 # Starting phase of the star
# Observational parameters
λ =[3782, 7887] # Wavelength range [Angstrom]
Res=140000 # Instrumental resolution
Start the simulation¶
In [3]:
Copied!
sim = SOAP.Simulation(wlll=(λ[1]+λ[0])/2, inst_reso=Res, grid=600)
sim = SOAP.Simulation(wlll=(λ[1]+λ[0])/2, inst_reso=Res, grid=600)
In [4]:
Copied!
# Add the active regions to the simulation
sim.active_regions=[SOAP.ActiveRegion(check=True, lon=-41.957, lat=22.092, size=0.084, temp_diff=600, active_region_type=0),
SOAP.ActiveRegion(check=True, lon=152.158, lat=24.510, size=0.0198, temp_diff=600, active_region_type=0),
SOAP.ActiveRegion(check=True, lon=-136.858, lat=-6.387, size=0.0116, temp_diff=600, active_region_type=0),
SOAP.ActiveRegion(check=True, lon=-128.928, lat=-21.913, size=0.0280, temp_diff=600, active_region_type=0),
SOAP.ActiveRegion(check=True, lon=82.256, lat=-12.097, size=0.0101, temp_diff=600, active_region_type=0),
SOAP.ActiveRegion(check=True, lon=33.596, lat=-25.118, size=0.0344, temp_diff=300, active_region_type=1),
SOAP.ActiveRegion(check=True, lon=-102.713, lat=-4.079, size=0.0175, temp_diff=300, active_region_type=1),
SOAP.ActiveRegion(check=True, lon=133.568, lat=15.191, size=0.0232, temp_diff=300, active_region_type=1),
SOAP.ActiveRegion(check=True, lon=163.813, lat=14.113, size=0.0112, temp_diff=300, active_region_type=1),
SOAP.ActiveRegion(check=True, lon=176.567, lat=-27.145, size=0.0101, temp_diff=300, active_region_type=1)]
# Add the active regions to the simulation
sim.active_regions=[SOAP.ActiveRegion(check=True, lon=-41.957, lat=22.092, size=0.084, temp_diff=600, active_region_type=0),
SOAP.ActiveRegion(check=True, lon=152.158, lat=24.510, size=0.0198, temp_diff=600, active_region_type=0),
SOAP.ActiveRegion(check=True, lon=-136.858, lat=-6.387, size=0.0116, temp_diff=600, active_region_type=0),
SOAP.ActiveRegion(check=True, lon=-128.928, lat=-21.913, size=0.0280, temp_diff=600, active_region_type=0),
SOAP.ActiveRegion(check=True, lon=82.256, lat=-12.097, size=0.0101, temp_diff=600, active_region_type=0),
SOAP.ActiveRegion(check=True, lon=33.596, lat=-25.118, size=0.0344, temp_diff=300, active_region_type=1),
SOAP.ActiveRegion(check=True, lon=-102.713, lat=-4.079, size=0.0175, temp_diff=300, active_region_type=1),
SOAP.ActiveRegion(check=True, lon=133.568, lat=15.191, size=0.0232, temp_diff=300, active_region_type=1),
SOAP.ActiveRegion(check=True, lon=163.813, lat=14.113, size=0.0112, temp_diff=300, active_region_type=1),
SOAP.ActiveRegion(check=True, lon=176.567, lat=-27.145, size=0.0101, temp_diff=300, active_region_type=1)]
In [5]:
Copied!
# Set the properties of the star
sim.star.set(prot=prot,incl=incl,u1=ldcn[0][0],u2= ldcn[0][1], start_psi=start_psi,radius=radius,mass=mass,teff=Teff)
# Deactivate the planet
sim.planet.Rp=0
# Set the properties of the star
sim.star.set(prot=prot,incl=incl,u1=ldcn[0][0],u2= ldcn[0][1], start_psi=start_psi,radius=radius,mass=mass,teff=Teff)
# Deactivate the planet
sim.planet.Rp=0
In [6]:
Copied!
# Provide the range of stellar phases to simulate
psi = np.linspace(0,1,100)
# Provide the range of stellar phases to simulate
psi = np.linspace(0,1,100)
In [7]:
Copied!
# Calculate the RV and photometric time series
out=sim.calculate_signal(psi, renormalize_rv=True)
# Calculate the RV and photometric time series
out=sim.calculate_signal(psi, renormalize_rv=True)
Plot the results¶
In [8]:
Copied!
# Create an animation of the flux variation
ani = sim.visualize_animation(
output=out,
plot_type="flux"
)
HTML(ani.to_jshtml())
# Create an animation of the flux variation
ani = sim.visualize_animation(
output=out,
plot_type="flux"
)
HTML(ani.to_jshtml())
Out[8]: