Skip to content

Commit

Permalink
in flattened probability map, fill nans with the minimum between map …
Browse files Browse the repository at this point in the history
…minimum or 1e-16
  • Loading branch information
G-Sommani committed Dec 10, 2024
1 parent c42e683 commit cbec55e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions skyreader/plot/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -832,8 +832,9 @@ def bounding_box(ra, dec, theta, phi):
column_names = ['2DLLH']
else:
# avoid excessively heavy data format for the flattened map
equatorial_map[np.isnan(equatorial_map)] = np.nanmin(
equatorial_map
min_prob = np.nanmin(equatorial_map)
equatorial_map[np.isnan(equatorial_map)] = np.min(
[min_prob, 1e-16]
)
equatorial_map[equatorial_map < 1e-16] = np.mean(
equatorial_map[equatorial_map < 1e-16]
Expand Down

0 comments on commit cbec55e

Please sign in to comment.