Skip to content

Commit cc558cb

Browse files
committed
fix: dont error if we are missing expected flags and some minor changes requested by carlos
1 parent 2494a7e commit cc558cb

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

sotodlib/mapmaking/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ def rangemat_sum(rangemat):
579579

580580
def find_usable_detectors(obs, maxcut=0.1, glitch_flags: str = "flags.glitch_flags", to_null : str = "flags.expected_flags"):
581581
flag = obs[glitch_flags]
582-
if to_null != "":
582+
if to_null != "" and to_null in obs._fields:
583583
flag *= ~obs[to_null]
584584
ncut = rangemat_sum(flag)
585585
good = ncut < obs.samps.count * maxcut

sotodlib/site_pipeline/make_ml_map.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def get_parser(parser=None):
3535
parser.add_argument("-T", "--tiled" , type=int, default=1, help="0: untiled maps. Nonzero: tiled maps")
3636
parser.add_argument( "--srcsamp", type=str, default=None, help="path to mask file where True regions indicate where bright object mitigation should be applied. Mask is in equatorial coordinates. Not tiled, so should be low-res to not waste memory.")
3737
parser.add_argument( "--unit", type=str, default="uK", help="Unit of the maps")
38-
parser.add_argument( "--maxcut", type=float, default=.1, help="Maximum fraction of cut samples in a detector.")
38+
parser.add_argument( "--maxcut", type=float, default=.3, help="Maximum fraction of cut samples in a detector.")
3939
return parser
4040

4141
sens_limits = {"f030":120, "f040":80, "f090":100, "f150":140, "f220":300, "f280":750}
@@ -73,7 +73,6 @@ def main(**args):
7373
from sotodlib.core import metadata
7474
from pixell import enmap, utils, fft, bunch, wcsutils, mpi, bench
7575
import yaml
76-
from mpi4py import MPI
7776

7877
LoaderError = metadata.loader.LoaderError
7978

0 commit comments

Comments
 (0)