Coverage for pesummary/conf/configuration.py: 100.0%

46 statements  

« prev     ^ index     » next       coverage.py v7.4.4, created at 2024-05-02 08:42 +0000

1import numpy as np 

2import os 

3from pesummary import conf 

4 

5# matplotlib style file 

6_path = conf.__path__[0] 

7style_file = os.path.join(_path, "matplotlib_rcparams.sty") 

8 

9# checkpoint file 

10checkpoint_dir = lambda webdir: os.path.join(webdir, "checkpoint") 

11resume_file = "pesummary_resume.pickle" 

12 

13# Overwrite message 

14overwrite = "Overwriting {} from {} to {}" 

15 

16# The palette to be used to distinguish result files 

17palette = "colorblind" 

18 

19# Include the prior on the posterior plots 

20include_prior = False 

21 

22# The user that submitted the job 

23user = "albert.einstein" 

24 

25# The number of samples to disregard as burnin 

26burnin = 0 

27 

28# The method to use to remove the samples as burnin 

29burnin_method = "burnin_by_step_number" 

30 

31# delimiter to use when saving files to dat with np.savetxt 

32delimiter = "\t" 

33 

34# Minimum length of h5 dataset for compression. Compressing small datasets can 

35# lead to an increased file size 

36compression_min_length = 1 

37 

38# Plot 1d kdes rather than 1d histograms 

39kde_plot = False 

40 

41# color for non-comparison plots 

42color = 'b' 

43 

44# color cycle for different mcmc chains 

45colorcycle = "brgkmc" 

46 

47# color cycle for different cmaps 

48cmapcycle = ["YlOrBr", "Blues", "Purples", "Greens", "PuRd", "inferno"] 

49 

50# color for injection lines 

51injection_color = 'orange' 

52 

53# color for prior histograms 

54prior_color = 'k' 

55 

56# Produce public facing summarypages 

57public = False 

58 

59# Number of cores to run on 

60multi_process = 1 

61 

62# Default f_low to use for GW specific conversions 

63default_flow = 20.0 

64 

65# Default f_final to use for GW specific conversions 

66default_f_final = 1024.0 

67 

68# Default delta_f to use for GW specific conversions 

69default_delta_f = 1. / 256 

70 

71# Standard meta_data names 

72log_evidence = "ln_evidence" 

73evidence = "evidence" 

74log_evidence_error = "ln_evidence_error" 

75log_bayes_factor = "ln_bayes_factor" 

76bayes_factor = "bayes_factor" 

77log_noise_evidence = "ln_noise_evidence" 

78log_prior_volume = "ln_prior_volume" 

79 

80# corner.corner colors 

81corner_colors = ['#0072C1', '#b30909', '#8809b3', '#b37a09'] 

82 

83# corner.corner default kwargs 

84corner_kwargs = dict( 

85 bins=50, smooth=0.9, label_kwargs=dict(fontsize=16), 

86 title_kwargs=dict(fontsize=16), color=corner_colors[0], 

87 truth_color='tab:orange', quantiles=[0.16, 0.84], 

88 levels=(1 - np.exp(-0.5), 1 - np.exp(-2), 1 - np.exp(-9 / 2.)), 

89 plot_density=False, plot_datapoints=True, fill_contours=True, 

90 max_n_ticks=3 

91) 

92 

93# Parameters to use for GW corner plot 

94gw_corner_parameters = [ 

95 "luminosity_distance", "dec", "a_2", "a_1", "geocent_time", "phi_jl", 

96 "psi", "ra", "phase", "mass_2", "mass_1", "phi_12", "tilt_2", "theta_jn", 

97 "tilt_1", "chi_p", "chirp_mass", "mass_ratio", "symmetric_mass_ratio", 

98 "total_mass", "chi_eff", "redshift", "mass_1_source", "mass_2_source", 

99 "total_mass_source", "chirp_mass_source", "lambda_1", "lambda_2", 

100 "delta_lambda", "lambda_tilde", "log_likelihood" 

101] 

102 

103# Parameters to use for GW source frame corner plot 

104gw_source_frame_corner_parameters = [ 

105 "luminosity_distance", "mass_1_source", "mass_2_source", 

106 "total_mass_source", "chirp_mass_source", "redshift" 

107] 

108 

109# List of precessing angles 

110precessing_angles = [ 

111 "cos_tilt_1", "cos_tilt_2", "tilt_1", "tilt_2", "phi_12", "phi_jl" 

112] 

113# List of precessing spins 

114precessing_spins = ["spin_1x", "spin_1y", "spin_2x", "spin_2y"] 

115# Parameters to use for GW extrinsic corner plot 

116gw_extrinsic_corner_parameters = ["luminosity_distance", "psi", "ra", "dec"] 

117 

118# List of 2d plots to generate for GW analyses 

119gw_2d_plots = [ 

120 ["mass_1", "mass_2"], ["mass_1_source", "mass_2_source"], ["a_1", "a_2"], 

121 ["mass_ratio", "chi_eff"], ["chi_p", "chi_eff"], ["cos_theta_jn", "chi_p"], 

122 ["cos_theta_jn", "luminosity_distance"], ["chirp_mass", "luminosity_distance"], 

123 ["lambda_1", "lambda_2"], ["mass_ratio", "lambda_tilde"] 

124] 

125 

126# Cosmology to use when calculating redshift 

127cosmology = "Planck15" 

128 

129# Analytic PSD to use for conversions when no PSD file is provided 

130psd = "aLIGOZeroDetHighPower" 

131 

132# GraceDB service url to use 

133gracedb_server = "https://gracedb.ligo.org/api/" 

134 

135# Information required for reproducing a GW analysis 

136gw_reproducibility = ["config", "psd"] 

137 

138# Additional 1d histogram pages that combine multiple GW marginalized posterior 

139# distributions 

140additional_1d_pages = { 

141 "precession": ["chi_p", "chi_p_2spin", "network_precessing_snr", "beta"], 

142 "subdominant_multipoles": [ 

143 "network_matched_filter_snr", "network_21_multipole_snr", 

144 "network_33_multipole_snr", "network_44_multipole_snr" 

145 ] 

146}