rss_ringoccs.diffrec.window_functions module

Purpose:
Provide a suite of window functions and functions related to the normalized equivalent width of a given array.
Dependencies:
  1. numpy
  2. spicy
rss_ringoccs.diffrec.window_functions.coss(x, W)
Purpose:
Compute the Cosine Squared Window Function.
Arguments:
x (np.ndarray):Real valued array used for the independent variable, or x-axis.
w_in (float):Width of the window. Positive float.
Outputs:
w_func (np.ndarray):
 Window function of width w_in evaluated along x.
rss_ringoccs.diffrec.window_functions.kb20(x, W)
Purpose:
Compute the Kaiser-Bessel 2.0 Window Function.
Arguments:
x (np.ndarray):Real valued array used for the independent variable, or x-axis.
w_in (float):Width of the window. Positive float.
Outputs:
w_func (np.ndarray):
 Window function of width w_in evaluated along x.
rss_ringoccs.diffrec.window_functions.kb25(x, W)
Purpose:
Compute the Kaiser-Bessel 2.5 Window Function.
Arguments:
x (np.ndarray):Real valued array used for the independent variable, or x-axis.
w_in (float):Width of the window. Positive float.
Outputs:
w_func (np.ndarray):
 Window function of width w_in evaluated along x.
rss_ringoccs.diffrec.window_functions.kb35(x, W)
Purpose:
Compute the Kaiser-Bessel 3.5 Window Function.
Arguments:
x (np.ndarray):Real valued array used for the independent variable, or x-axis.
w_in (float):Width of the window. Positive float.
Outputs:
w_func (np.ndarray):
 Window function of width w_in evaluated along x.
rss_ringoccs.diffrec.window_functions.kbal(x, W, alpha)
Purpose:
Create a Kaiser-Bessel window with a user specified alpha parameter.
Variables:
W (float):Window width.
dx (float):Width of one point.
al (float):The alpha parameter \alpha_0.
Outputs:
w_func (np.ndarray):
 The Kaiser-Bessel alpha window of width w_in and spacing dx between points.
Notes:
  1. The Kaiser-Bessel window is computed using the modified Bessel Function of the First Kind. It’s value is y = I_0(\alpha\sqrt{1-4x^2/w^2})/I_0(\alpha), where w is the window width.
  2. We automatically multiply the alpha parameter by pi, so the kbal window function has an alpha value of \alpha = \alpha_0 \pi
  3. The endpoints of the Kaiser-Bessel function tend to zero faster than (1+2\alpha) / \exp(\alpha)
Warnings:
  1. None of the Kaiser-Bessel windows evaluate to zero at their endpoints. The endpoints are 1/I_0(\alpha). For small values of alpha this can create Gibb’s like effects in reconstruction do to the large discontinuity in the window. For alpha values beyond 2.5\pi this effect is negligible.
rss_ringoccs.diffrec.window_functions.kbmd20(x, W)
Purpose:
Compute the Modified Kaiser-Bessel 2.0 Window Function.
Arguments:
x (np.ndarray):Real valued array used for the independent variable, or x-axis.
w_in (float):Width of the window. Positive float.
Outputs:
w_func (np.ndarray):
 Window function of width w_in evaluated along x.
rss_ringoccs.diffrec.window_functions.kbmd25(x, W)
Purpose:
Compute the Modified Kaiser-Bessel 2.5 Window Function.
Arguments:
x (np.ndarray):Real valued array used for the independent variable, or x-axis.
w_in (float):Width of the window. Positive float.
Outputs:
w_func (np.ndarray):
 Window function of width w_in evaluated along x.
rss_ringoccs.diffrec.window_functions.kbmd35(x, W)
Purpose:
Compute the Modified Kaiser-Bessel 3.5 Window Function.
Arguments:
x (np.ndarray):Real valued array used for the independent variable, or x-axis.
w_in (float):Width of the window. Positive float.
Outputs:
w_func (np.ndarray):
 Window function of width w_in evaluated along x.
rss_ringoccs.diffrec.window_functions.kbmdal(x, W, al)
Purpose:
Create a modifed Kaiser-Bessel window with a user specified alpha parameter.
Variables:
W (float):Window width.
dx (float):Width of one point.
al (float):The alpha parameter \alpha_0.
Outputs:
w_func (np.ndarray):
 The Kaiser-Bessel alpha window of width and w_in spacing dx between points.
Notes:
  1. The Kaiser-Bessel window is computed using the modified Bessel Function of the First Kind. It’s value is y = I_0(\alpha\sqrt{1-4x^2/w^2})/I_0(\alpha), where w is the window width.
  2. We automatically multiply the alpha parameter by pi, so the kbal window function has an alpha value of \alpha = \alpha_0\pi
  3. The endpoints of the Kaiser-Bessel function tend to zero faster than (1+2\alpha)) / \exp(\alpha)
Warnings:
  1. None of the Kaiser-Bessel windows evaluate to zero at their endpoints. The endpoints are 1/I_0(\alpha). For small values of alpha this can create Gibb’s like effects in reconstruction due to the large discontinuity in the window. For alpha values beyond 2.5\pi this effect is negligible.
rss_ringoccs.diffrec.window_functions.normalize(dx, ker, f_scale)
Purpose:
Compute the window normalization
Arguments:
ker (np.ndarray):
 The Fresnel Kernel.
dx (float):The spacing between points in the window. This is equivalent to the sample spacing. This value is in kilometers.
f_scale (np.ndarray):
 The Fresnel Scale in kilometers.
Outputs:
norm_fact (float):
 The normalization of the input Fresnel Kernel.
rss_ringoccs.diffrec.window_functions.rect(x, W)
Purpose:
Compute the rectangular window function.
Arguments:
x (np.ndarray):Real valued array used for the independent variable, or x-axis.
w_in (float):Width of the window. Positive float.
Outputs:
w_func (np.ndarray):
 Window function of width w_in evaluated along x.
rss_ringoccs.diffrec.window_functions.window_width(res, normeq, fsky, fres, rho_dot, sigma, bfac=True, Return_P=False)
Purpose:
Compute the window width as a function of ring radius. This is given from MTR86 Equations 19, 32, and 33.
Variables:
res (float):The requested resolution.
normeq (float):The normalized equivalent width. Unitless.
fsky (float or np.ndarray):
 The sky frequency.
fres (float or np.ndarray):
 The Fresnel scale.
rdot (float) or (np.ndarray):
 The time derivative of the ring radius.
Output:
w_vals (np.ndarray):
 The window width as a function of ring radius.