Skip to content

Commit

Permalink
Address PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremykubica committed Jan 12, 2024
1 parent 8d0a3b9 commit 53fb617
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/kbmod/masking.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def apply_mask_operations(config, stack):
for i in range(stack.img_count()):
stack.get_single_image(i).grow_mask(config["mask_grow"])

# Apply the masks to the images.
# Apply the masks to the images. Use 0xFFFFFF to apply all active masking bits.
for i in range(stack.img_count()):
stack.get_single_image(i).apply_mask(0xFFFFFF)

Expand Down
2 changes: 1 addition & 1 deletion src/kbmod/search/layered_image.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class LayeredImage {
PSF psf;
RawImage science;
RawImage mask;
RawImage variance;
RawImage variance;
};

} /* namespace search */
Expand Down
2 changes: 1 addition & 1 deletion src/kbmod/search/pydocs/image_stack_docs.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ static const auto DOC_ImageStack_build_zeroed_times = R"doc(
")doc";

static const auto DOC_ImageStack_make_global_mask = R"doc(
Create a new global mask that from a set of flags and a threshold.
Create a new global mask from a set of flags and a threshold.
The global mask marks a pixel as masked if and only if it is masked
by one of the given flags in at least ``threshold`` individual images.
The returned mask is binary.
Expand Down
4 changes: 2 additions & 2 deletions tests/test_layered_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def test_binarize_mask(self):
for x in range(9):
mask.set_pixel(10, x, x)

# Only keep the mask at for pixels with flags at
# Only keep the mask for pixels with flags at
# bit positions 0 and 2 (1 + 4 = 5).
self.image.binarize_mask(5)
self.assertEqual(mask.get_pixel(10, 0), 0)
Expand Down Expand Up @@ -204,7 +204,7 @@ def test_add_threshold_mask_flags(self):
masked_pixels[index] = True
self.assertGreater(len(masked_pixels), 0)

# Reset the mask an perform threshold masking.
# Reset the mask and perform threshold masking.
mask = self.image.get_mask()
mask.set_all(0.0)
self.image.union_threshold_masking(threshold)
Expand Down

0 comments on commit 53fb617

Please sign in to comment.