tests.paper.ssm_paper_utils
Compare SSM prediction with data Creates and plots velocity and GW power spectra from SSM
Modified from sound-shell-model/paper/python/ssm_paper_utils.py.
Functions
- tests.paper.ssm_paper_utils.add_cwg_fit(f_gw, y, pow_gw)
- tests.paper.ssm_paper_utils.cwg_fitfun(k, p0, p1)
- tests.paper.ssm_paper_utils.do_all_plot_ps_1bubble(save_id=None, graph_file_type=None, debug=False)
- tests.paper.ssm_paper_utils.do_all_plot_ps_compare_nuc(save_id=None, graph_file_type=None)
- Parameters:
save_id (str)
graph_file_type (str)
- tests.paper.ssm_paper_utils.double_broken_power_law(z, A, z0, z1, a, b, c, d=4., e=2.)
- Parameters:
d (float)
e (float)
- tests.paper.ssm_paper_utils.load_compare_nuc_data(file)
- Parameters:
file (str)
- tests.paper.ssm_paper_utils.make_1dh_compare_table(params_list, v2_list, file_name='table_1dh_compare.tex')
- tests.paper.ssm_paper_utils.make_3dh_compare_table(params_list, v2_list, Omgw_list, p_list, file_name='table_3dh_compare.tex')
Prints table to file, comparing selected statistics between SSM and “Prace” 3dh hydro simulations (Hindmarsh et al 2017) Mean square fluid velocity.
The results are precomputed, and therefore this function doesn’t call pttools.
- Parameters:
file_name (str | TextIOBase)
- Return type:
None
- tests.paper.ssm_paper_utils.make_nuc_compare_table(params_list, v2_list, Omgw_list, p_sim_list, p_exp_list, file_name='table_nuc_compare.tex')
Prints table to stdout, displaying selected statistics comparing between simulataneous and exponential nucleation.
The results are precomputed, and therefore this function doesn’t call pttools.
- Parameters:
file_name (str | TextIOBase)
- Return type:
None
- tests.paper.ssm_paper_utils.plot_and_save(vw, alpha, method=ssm.Method.E_CONSERVING, v_xi_file=None, suffix=None)
Plots the Velocity power spectrum as a function of \(kR_*\). Plots the scaled GW power spectrum as a function of \(kR_*\). Saves power spectra in files pow_v_*, pow_gw_* if suffix is set.
- Parameters:
vw (float)
alpha (float)
method (Method)
- tests.paper.ssm_paper_utils.plot_ps_1bubble(vw, alpha, save_id=None, graph_file_type=None, Np=const.NP_ARR[-1], debug=False)
Plots power spectra predictions of 1 bubble. Shown are \(\mid A \mid^2, \mid f'(z) \mid^2/2\) and \(\mid l(z) \mid^2/2\) Saves data if save_id is set Saves graph file if graph_file_type is set
- tests.paper.ssm_paper_utils.plot_ps_compare_nuc(vw, alpha, save_id=None, graph_file_type=None)
Plots power spectra predictions of SSM with different nucleation models Saves data if save_id is set. Saves graph file if graph_file_type is set.
- Parameters:
vw (float)
alpha (float)
save_id (str)
graph_file_type (str)
- Return type:
Tuple[list, list, list, list]
- tests.paper.ssm_paper_utils.plot_ps_compare_res(vw, alpha, nuc_type=ssm.NucType.SIMULTANEOUS, nuc_args=(1.,), save_id=None, graph_file_type=None, method=ssm.Method.E_CONSERVING)
Plots power spectra predictions of SSM with different resolutions in Np_list Saves data and graphs if save_id is set
- tests.paper.ssm_paper_utils.ps_from_ssm(vw, alpha, nuc_type=ssm.NucType.SIMULTANEOUS, nuc_args=(1.,), Np=const.NP_ARR[-1], method=ssm.Method.E_CONSERVING)
Get velocity and GW power spectra from SSM
- tests.paper.ssm_paper_utils.save_compare_nuc_data(file, params_list, v2_list, Omgw_list, p_cwg_list, p_ssm_list)
- Return type:
list
- tests.paper.ssm_paper_utils.ssm_fitfun(z, A, z0, z1)
Attributes
- tests.paper.ssm_paper_utils.VW_INTER_LIST = [0.92, 0.8, 0.731, 0.56, 0.44]
Wall velocities for intermediate transition strength