Stellar line#
Here we’ll create a proxy stellar line by integrating over a grid representing a stellar disk with local velocity fields stemming from rotation as well as macro- and micro-turbulence. We are thus creating a model cross-correlation function (CCF).
First we’ll import the module, instantiate our grid, and take a look. The darkening towards the limbs is simply showing the intensity falling with the distance from the center. We’ll apply some more physical limb-darkening below.
[1]:
import obscurae as obsc
disk = obsc.Disk()
disk.Grid() # instantiate grid
disk.showGrid()
Next we’ll create a “real” star using the Star class and assign some values for the projected rotation velocity of the star (\(v \sin i=7\) km/s) as well as the macro- (\(\zeta=3\) km/s) and micro-turbulence (\(\xi=2.0\) km/s) parameters. We will also apply a quadratic limb-darkening law with parameters (\(c_1=0.8\), \(c_2=0.2\)). Note that Star inherits from the Disk class, so properties of Disk are also available for Star, however, this is a new,
separate instance.
[2]:
star = obsc.Star(vsini=7.,zeta=3.0,xi=2.0,cs=[0.8,0.2])
star.Grid() # instantiate grid
star.showGrid(rings=True)# rings are regions of different macro-turbulence
Now that our stellar disk is nicely setup, we’ll create a stellar line by integrating over the disk.
[3]:
star.Line() # compute line profile
star.starLight() # limb-darkened, rotating stellar disk
star.starLine() # the line profile of the star
/Users/emilkn/Library/CloudStorage/OneDrive-Chalmers/Desktop/postdoc/obscurae/src/obscurae/shadow.py:337: RuntimeWarning: divide by zero encountered in divide
tan = np.exp(-1*np.power(vel_1d/(zeta*y),2))/y
/Users/emilkn/Library/CloudStorage/OneDrive-Chalmers/Desktop/postdoc/obscurae/src/obscurae/shadow.py:337: RuntimeWarning: invalid value encountered in divide
tan = np.exp(-1*np.power(vel_1d/(zeta*y),2))/y