Skip to content

Commit

Permalink
REF use one location for default mask
Browse files Browse the repository at this point in the history
  • Loading branch information
beckermr committed Apr 25, 2024
1 parent 968a7c3 commit 4f49f26
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions des_y6utils/mdet.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
import healsparse


DEFAULT_HSP_MASK = "y6-combined-hleda-gaiafull-des-stars-hsmap131k-mdet-extra-masks-v2.hsp" # noqa: E501


def add_extinction_correction_columns(
data, dust_map_filename="SFD_dust_4096.hsp"
):
Expand Down Expand Up @@ -110,7 +113,7 @@ def _make_mdet_cuts_gauss(
min_t_ratio=0.5,
max_mfrac=0.1,
max_s2n=np.inf,
mask_name="y6-combined-hleda-gaiafull-des-stars-hsmap131k-mdet-extra-masks-v2.hsp",
mask_name=DEFAULT_HSP_MASK,
max_t=100.0,
):
"""
Expand Down Expand Up @@ -159,9 +162,7 @@ def _make_mdet_cuts_v6(d, verbose=False):
)

# apply the mask
hmap = _read_hsp_file(
"y6-combined-hleda-gaiafull-des-stars-hsmap131k-mdet-extra-masks-v2.hsp"
)
hmap = _read_hsp_file(DEFAULT_HSP_MASK)
in_footprint = hmap.get_values_pos(d["ra"], d["dec"], valid_mask=True)
msk &= in_footprint
if verbose:
Expand Down

0 comments on commit 4f49f26

Please sign in to comment.