Skip to content

profile

dr4_beam(r, ell_max, r_c, alpha, off, amps, n_scatter, scatter_pars=None)

1D beam profile as modeled in Lungu et al. (https://arxiv.org/pdf/2112.12226).

Source code in lat_beams/fitting/profile.py
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
def dr4_beam(r, ell_max, r_c, alpha, off, amps, n_scatter, scatter_pars=None):
    """
    1D beam profile as modeled in Lungu et al. (https://arxiv.org/pdf/2112.12226).
    """
    profile = np.zeros_like(r)
    profile[r == 0] = 1.0

    # Core beam
    msk = (r <= r_c) * (r > 0)
    r_ell = r[msk] * ell_max
    for n, amp in enumerate(amps):
        profile[msk] += amp * jv(2 * n + 1, r_ell) / r_ell

    # Wing
    profile = add_profile_wing(profile, r, r_c, alpha, off, scatter_pars)

    return profile