Skip to content

Commit

Permalink
Merge pull request #74 from nbiederbeck/remove-dl3-circles
Browse files Browse the repository at this point in the history
remove circles
  • Loading branch information
nbiederbeck committed May 23, 2023
2 parents 8f205c4 + 7899572 commit 4cb3416
Showing 1 changed file with 0 additions and 33 deletions.
33 changes: 0 additions & 33 deletions scripts/plot_skymap_dl3.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
from argparse import ArgumentParser

import numpy as np
from astropy import units as u
from gammapy.maps import WcsNDMap
from matplotlib import pyplot as plt
from matplotlib.collections import PatchCollection
from matplotlib.patches import Circle

parser = ArgumentParser()
parser.add_argument("-i", "--input-path", required=True)
Expand Down Expand Up @@ -34,34 +31,6 @@ def main(input_path, output_path, width, n_bins):
],
).T

patches = PatchCollection(
[
Circle(
(source.ra.to_value(u.deg), source.dec.to_value(u.deg)),
radius=0.3,
color="k",
ec="k",
fc="#0000",
fill=False,
),
]
+ [
Circle(
(
source.ra.to_value(u.deg) + 0.8 * np.sin(phi),
source.dec.to_value(u.deg) + 0.8 * np.cos(phi),
),
radius=0.3,
color="w",
ec="w",
fc="#0000",
fill=False,
)
for phi in np.linspace(0, 2 * np.pi, 7)
],
match_original=True,
)

fig, ax = plt.subplots()

mesh = ax.pcolormesh(
Expand All @@ -84,8 +53,6 @@ def main(input_path, output_path, width, n_bins):
label="Source",
)

ax.add_collection(patches)

ax.legend()

fig.savefig(output_path)
Expand Down

0 comments on commit 4cb3416

Please sign in to comment.