pttools.ssmtools.ssm
Sound Shell Model functions
Classes
Functions
- pttools.ssmtools.ssm.a2_e_conserving(bub, z, cs, z_st_thresh=const.Z_ST_THRESH, nxi=const.NPTDEFAULT[0])
Returns the value of \(|A(z)|^2\), where \(|\text{Plane wave amplitude}|^2 = T^3 | A(z)|^2\).
- pttools.ssmtools.ssm.a2_e_conserving_bag(z, v_wall, alpha_n, npt=const.NPTDEFAULT, de_method=DE_Method.STANDARD, z_st_thresh=const.Z_ST_THRESH, v_sh=None, v_ip=speedup.NAN_ARR, w_ip=speedup.NAN_ARR, xi=speedup.NAN_ARR)
Returns the value of \(|A(z)|^2\), where \(|\text{Plane wave amplitude}|^2 = T^3 | A(z)|^2\), calculated from self-similar hydro solution obtained with “bubble.fluid_shell”.
- Parameters:
z (ndarray) – array of scaled wavenumbers \(z = kR_*\).
de_method (DE_Method) – Note that ‘standard’ (e-conserving) method is only accurate to linear order, meaning that there is an apparent \(z^0\) piece at very low \(z\), and may exaggerate the GWs at low vw. ATM no other de_methods, but argument allows trials.
v_wall (float)
alpha_n (float)
npt (ndarray | Tuple[int, int, int])
z_st_thresh (float)
v_sh (float)
v_ip (ndarray)
w_ip (ndarray)
xi (ndarray)
- Returns:
\(|A(z)|^2\), fp2_2, lam2
- pttools.ssmtools.ssm.a2_e_conserving_bag_file(z, filename, alpha, skip=1, npt=const.NPTDEFAULT, z_st_thresh=const.Z_ST_THRESH)
Returns the value of \(|A(z)|^2\), where \(|\text{Plane wave amplitude}|^2 = T^3 | A(z)|^2\), calculated from file, output by “spherical-hydro-code”. Uses method respecting energy conservation, although only accurate to linear order, meaning that there is an apparent \(z^0\) piece at very low \(z\).
- pttools.ssmtools.ssm.a2_ssm_func_bag(z, v_wall, alpha, npt=const.NPTDEFAULT, method=Method.E_CONSERVING, de_method=DE_Method.STANDARD, z_st_thresh=const.Z_ST_THRESH)
Returns the value of \(|A(z)|^2\). \(|\text{Plane wave amplitude}|^2 = T^3 | A(z)|^2\)
- Parameters:
z (ndarray) – array of scaled wavenumbers \(z = kR_*\)
method (Method) – correct method for SSM is “e_conserving”. Also allows exploring effect of other incorrect methods
f_onlyandwith_g.de_method (DE_Method) – How energy density fluctuation feeds into GW ps. See A2_ssm_e_conserving.
z_st_thresh (float) – wavenumber at which to switch sin_transform to its approximation.
v_wall (float)
alpha (float)
npt (ndarray | Tuple[int, int, int])
- Returns:
\(|A(z)|^2\)
- pttools.ssmtools.ssm.f_file_bag(z_arr, t, filename, skip=0, npt=const.NPTDEFAULT, z_st_thresh=const.Z_ST_THRESH)
3D FT of radial fluid velocity v(r) from file.
- pttools.ssmtools.ssm.f_ssm_func_bag(z, v_wall, alpha_n, v_sh=None, npt=const.NPTDEFAULT, z_st_thresh=const.Z_ST_THRESH)
3D FT of radial fluid velocity v(r) from Sound Shell Model fluid profile.
- pttools.ssmtools.ssm.g_file_bag(z, t, filename, skip=0)
3D FT of radial fluid acceleration dot{v}(r) from file
- pttools.ssmtools.ssm.g_ssm_func_bag(z, v_wall, alpha, npt=const.NPTDEFAULT)
3D FT of radial fluid acceleration \(\dot{v}\)(r) from Sound Shell Model fluid profile.
- pttools.ssmtools.ssm.lam_ssm_func_bag(z, v_wall, alpha_n, v_sh=None, npt=const.NPTDEFAULT, de_method=DE_Method.STANDARD, z_st_thresh=const.Z_ST_THRESH)
3D FT of radial energy perturbation from Sound Shell Model fluid profile