Skip to content

Commit

Permalink
Added option to destripe data upon last iteration when creating sourc…
Browse files Browse the repository at this point in the history
…e masks
  • Loading branch information
smeingast committed Nov 30, 2023
1 parent 45640a4 commit 5da2bd0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions vircampype/fits/images/sky.py
Original file line number Diff line number Diff line change
Expand Up @@ -899,6 +899,12 @@ def build_master_source_mask(self):
- 10 * sky_std[:, np.newaxis, np.newaxis]
)

# destripe on last iteration
if (
i == self.setup.source_masks_n_iter - 1
) & self.setup.source_masks_destripe:
cube_raw_temp.destripe(masks=mask_additional)

""" Destriping here is very problematic. Firstly, I can't average,
because I have only frames of a single detector and secondly, any
extended emission that covers a large part of the image will affect
Expand Down
1 change: 1 addition & 0 deletions vircampype/pipeline/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ class Setup(dict):
source_mask_closing: bool = True
source_masks_closing_size: int = 5
source_masks_closing_iter: int = 2
source_masks_destripe: bool = True
# Noisechisel setup for source masks
noisechisel_qthresh: float = 0.9
noisechisel_erode: int = 2
Expand Down

0 comments on commit 5da2bd0

Please sign in to comment.