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:
- numpy
- 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
.- Outputs:
w_func (np.ndarray): The Kaiser-Bessel alpha window of width w_in and spacing dx between points. - Notes:
- The Kaiser-Bessel window is computed using the
modified Bessel Function of the First Kind. It’s
value is
,
where w is the window width. - We automatically multiply the alpha parameter by pi,
so the kbal window function has an alpha value of

- The endpoints of the Kaiser-Bessel function tend to
zero faster than

- The Kaiser-Bessel window is computed using the
modified Bessel Function of the First Kind. It’s
value is
- Warnings:
- None of the Kaiser-Bessel windows evaluate to zero at
their endpoints. The endpoints are
.
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
this effect is negligible.
- None of the Kaiser-Bessel windows evaluate to zero at
their endpoints. The endpoints are
-
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
.- Outputs:
w_func (np.ndarray): The Kaiser-Bessel alpha window of width and w_in spacing dx between points. - Notes:
- The Kaiser-Bessel window is computed using the
modified Bessel Function of the First Kind. It’s
value is
,
where w is the window width. - We automatically multiply the alpha parameter by pi,
so the kbal window function has an alpha value of

- The endpoints of the Kaiser-Bessel function tend to
zero faster than

- The Kaiser-Bessel window is computed using the
modified Bessel Function of the First Kind. It’s
value is
- Warnings:
- None of the Kaiser-Bessel windows evaluate to zero at
their endpoints. The endpoints are
.
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
this effect is negligible.
- None of the Kaiser-Bessel windows evaluate to zero at
their endpoints. The endpoints are
-
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.