blur_rotate

tayph.blur_rotate(wl, order, dv, Rp, P, inclination, status=False, fast=False)[source] [edit on github]

This function takes a spectrum and blurs it using a rotation x Gaussian kernel which has a FWHM width of dv km/s everywhere. Meaning that its width changes dynamically. Because the kernel needs to be recomputed on each element of the wavelength axis individually, this operation is much slower than convolution with a constant kernel, in which a simple shifting of the array, rather than a recomputation of the rotation profile is sufficient. By setting the fast keyword, the input array will first be oversampled onto a constant-velocity grid to enable the usage of a constant kernel, after which the result is interpolated back to the original grid.

Input: The wavelength axis wl. The spectral axis order. The FHWM width of the resolution element in km/s. The Radius of the rigid body in Rj. The periodicity of the rigid body rotation in days. The inclination of the spin axis in degrees.

Wavelength and order need to be numpy arrays and have the same number of elements. Rp, P and i need to be scalar floats.

Output: The blurred spectral axis, with the same dimensions as wl and order.

WARNING: THIS FUNCTION HANDLES NANS POORLY. I HAVE THEREFORE DECIDED CURRENTLY TO REQUIRE NON-NAN INPUT.

This computes the simple numerical derivative of x by convolving with kernel [-1,0,1].

Parameters
wllist, np.ndarray

The wavelength array.

orderlist, np.ndarray.

The spectral axis.

dv: float

The FWHM of a resolution element in km/s.

Rp: float

The radius of the planet in jupiter radii.

P: float

The rotation period of the planet. For tidally locked planets, this is equal to the orbital period.

inclination:

The inclination of the spin axis in degrees. Presumed to be close to 90 degrees for transiting planets

status: bool

Output a statusbar, but only if fast == False.

fast: bool

Re-interpolate the input on a constant-v grid in order to speed up the computation of the convolution by eliminating the need to re-interpolate the kernel every step.

Returns
order_blurrednp.array

The rotation-broadened spectrum on the same wavelength grid as the input.