-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cube_recenter_satspots with filter_freq #621
Conversation
Codecov Report
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. @@ Coverage Diff @@
## master #621 +/- ##
==========================================
- Coverage 57.38% 57.38% -0.00%
==========================================
Files 67 67
Lines 13545 13549 +4
==========================================
+ Hits 7772 7774 +2
- Misses 5773 5775 +2
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
vip_hci/preproc/recentering.py
Outdated
@@ -308,8 +308,8 @@ def cube_shift(cube, shift_y, shift_x, imlib='vip-fft', | |||
|
|||
def frame_center_satspots(array, xy, subi_size=19, sigfactor=6, shift=False, | |||
imlib='vip-fft', interpolation='lanczos4', | |||
fit_type='moff', border_mode='reflect', debug=False, | |||
verbose=True): | |||
fit_type='moff', filter_freq=(0,0), border_mode='reflect', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Best practice is to limit each line of python code to 80 characters. Some text editors can show you where the imaginary line would be. Here to not go beyond the limit, border_mode...
should have been placed on the next line.
vip_hci/preproc/recentering.py
Outdated
@@ -343,6 +343,10 @@ def frame_center_satspots(array, xy, subi_size=19, sigfactor=6, shift=False, | |||
See the documentation of the ``vip_hci.preproc.frame_shift`` function. | |||
fit_type: str, optional {'gaus','moff'} | |||
Type of 2d fit to infer the centroid of the satellite spots. | |||
filter_freq: tuple of 2 elements. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replace with tuple of 2 floats, optional
vip_hci/preproc/recentering.py
Outdated
@@ -343,6 +343,10 @@ def frame_center_satspots(array, xy, subi_size=19, sigfactor=6, shift=False, | |||
See the documentation of the ``vip_hci.preproc.frame_shift`` function. | |||
fit_type: str, optional {'gaus','moff'} | |||
Type of 2d fit to infer the centroid of the satellite spots. | |||
filter_freq: tuple of 2 elements. | |||
If the first and second elements are bigger than 0, then the first element |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This block needs to be indented the same way as the description for other parameters
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace with:
"If the first (resp. second) element of the tuple is larger than 0, a high-pass (resp. low-pass) filter is applied to the image, before fitting the satellite spots. The elements should correspond to the fwhm_size
of the frame_filter_highpass
and frame_filter_lowpass
functions, respectively. If both elements are non-zero, both high-pass and low-pass filter of the image are applied, in that order. This can be useful to better isolate the signal from the satellite spots."
vip_hci/preproc/recentering.py
Outdated
@@ -445,7 +449,13 @@ def intersection(L1, L2): | |||
centx = [] | |||
centy = [] | |||
subims = [] | |||
|
|||
if filter_freq[0] > 0: | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove blank line
vip_hci/preproc/recentering.py
Outdated
array = frame_filter_highpass(array, mode='gauss-subt', | ||
fwhm_size=filter_freq[0]) | ||
if filter_freq[1] > 0: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove blank line
vip_hci/preproc/recentering.py
Outdated
@@ -503,7 +513,7 @@ def intersection(L1, L2): | |||
|
|||
|
|||
def cube_recenter_satspots(array, xy, subi_size=19, sigfactor=6, plot=True, | |||
fit_type='moff', lbda=None, border_mode='constant', | |||
fit_type='moff', lbda=None, filter_freq=(0,0), border_mode='constant', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line is longer than 80 characters
vip_hci/preproc/recentering.py
Outdated
@@ -541,6 +551,10 @@ def cube_recenter_satspots(array, xy, subi_size=19, sigfactor=6, plot=True, | |||
lbda: 1d array or list, opt | |||
Wavelength vector. If provided, the subimages will be scaled accordingly | |||
to follow the motion of the satellite spots. | |||
filter_freq: tuple of 2 elements. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same suggestion as above
vip_hci/preproc/recentering.py
Outdated
@@ -541,6 +551,10 @@ def cube_recenter_satspots(array, xy, subi_size=19, sigfactor=6, plot=True, | |||
lbda: 1d array or list, opt | |||
Wavelength vector. If provided, the subimages will be scaled accordingly | |||
to follow the motion of the satellite spots. | |||
filter_freq: tuple of 2 elements. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indent and use similar description as suggested above (replace the occurrences of "image" into "images" though)
I integrated cube_filter_highpass and cube_filter_lowpass into the frame_center_satspots and mentioned in the cube_recenter_satspots