Skip to content

Commit

Permalink
Updating convolution augmentaiton default behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
mb010 committed Feb 11, 2022
1 parent 0a22686 commit c3f4216
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion astroaugmentations/augmentations.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,9 +273,19 @@ class CustomKernelConvolution():
Kernel value above which to set kernel values to 1.
psf_radius (float):
Radius of psf centre to clip out. Default=None; FIRST=2.4 (resolution in arcsec).
sidelobe_scaling (float):
Factor to upweight sidelobes by, default: 1.
mode (str):
How to manage the kernel interacting with existing signal. Default: 'sum'.
Options:
'sum': Adds original image back onto convolved image.
'masked': Masks non-zeros in convolved image
before adding back in kernel (can create sharp edges).
'delta': Adds a delta function to centre of kernel
(can create signifcant artifacts from non-smooth kernel).
"""
def __init__(self, kernel, rfi_dropout=None, rfi_dropout_p=1, beam_cut=None,
psf_radius=None, sidelobe_scaling=1, show_kernel=False, mode='masked'):
psf_radius=None, sidelobe_scaling=1, show_kernel=False, mode='sum'):
self.mode = mode
assert self.mode in ["masked", "sum", "delta"]
self.kernel = kernel
Expand Down

0 comments on commit c3f4216

Please sign in to comment.