Skip to content

Commit

Permalink
Fix pygrb skygrid plot (#4888)
Browse files Browse the repository at this point in the history
* Fix pygrb skygrid plot

* Add plot

* Full stop
  • Loading branch information
pannarale authored Sep 23, 2024
1 parent ed37306 commit 6142c52
Showing 1 changed file with 6 additions and 3 deletions.
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()

0 comments on commit 6142c52

Please sign in to comment.