Skip to content

Commit

Permalink
Update pycbc_plot_kde_vals (gwastro#4445)
Browse files Browse the repository at this point in the history
  • Loading branch information
tdent authored and acorreia61201 committed Apr 4, 2024
1 parent 8b7e933 commit 7e2866f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bin/all_sky_search/pycbc_plot_kde_vals
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ if len(args.param) != len(args.log_axis):

if args.signal_file:
signal_data = h5py.File(args.signal_file, 'r')
signal_kde = signal_data['signal_kde'][:]
signal_kde = signal_data['data_kde'][:]
template_data = h5py.File(args.template_file, 'r')
template_kde = template_data['template_kde'][:]
template_kde = template_data['data_kde'][:]
param0 = template_data[args.param[0]][:]
if len(args.param) > 1:
param1 = template_data[args.param[1]][:]
Expand Down Expand Up @@ -63,10 +63,10 @@ if args.plot_type == 'kde_vs_param':
elif args.plot_type == 'param_vs_param':
fig, ax = plt.subplots(1, figsize=(12,7), constrained_layout=True)
if args.which_kde == 'signal_kde':
im = ax.scatter(param0, param1, marker=".", c=signal_kde, cmap='RdBu_r',
im = ax.scatter(param0, param1, marker=".", c=signal_kde, cmap='plasma',
s=5, norm=LogNorm())
elif args.which_kde == 'template_kde':
im = ax.scatter(param0, param1, marker=".", c=template_kde, cmap='RdBu_r',
im = ax.scatter(param0, param1, marker=".", c=template_kde, cmap='plasma',
s=5, norm=LogNorm())
elif args.which_kde == 'ratio_kde':
im = ax.scatter(param0, param1, marker=".", c=signal_kde / template_kde,
Expand Down

0 comments on commit 7e2866f

Please sign in to comment.