Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix pygrb skygrid plot #4888

Merged
merged 3 commits into from
Sep 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions bin/pygrb/pycbc_pygrb_plot_skygrid
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ trig_file = os.path.abspath(opts.trig_file)
outfile = opts.output_file
if opts.plot_title is None:
opts.plot_title = 'PyGRB sky grid'
plot_caption = 'Search sky grid points.'

logging.info("Imported and ready to go.")

Expand Down Expand Up @@ -100,13 +101,15 @@ if opts.verbose:

fig = plt.figure()
ax = fig.gca()
ax.set_xlabel(xlabel)#, fontsize=16)
ax.set_ylabel(ylabel)#, fontsize=16)
ax.grid()
ax.set_xlabel(xlabel)
ax.set_ylabel(ylabel)
# Trigger RA/Dec data is stored in radians, so convert to degrees
ax.plot(numpy.rad2deg(trig_data['network/ra']), numpy.rad2deg(trig_data['network/dec']),
'ko', markerfacecolor='blue')
# Wrap up
plt.tight_layout()
save_fig_with_metadata(fig, outfile, cmd=' '.join(sys.argv),
title=opts.plot_title, caption=opts.plot_caption)
title=opts.plot_title, caption=plot_caption)
#fig_kwds=fig_kwds,
plt.close()
Loading