-
Notifications
You must be signed in to change notification settings - Fork 84
Description
I've been reviewing the monitoring code (step 3) and believe there is a typo in this line supposed to filter CCFs corresponding to the right component (cc_comp) and with enough windows in the substack (cc_ngood) :
indx = np.where( (cc_comp.lower() == comp.lower()) & cc_ngood==1 )[0]
The second argument (cc_ngood==1) doesn't make any sense as parenthesis are missing around it. Instead of checking where the stacks are made from one window which would be indx = np.where( (cc_comp.lower() == comp.lower()) & (cc_ngood==1) )[0] it does a bitwise operation on cc_ngood and return true for all odd numbers in cc_ngood (so it indeed does exclude 0s).
If this was it I would have made a pull request but I also don't understand the condition in the first place. From what i understood cc_ngood contains for each substack the number of windows used. In this example it is set to 24 : config.substack_windows = 24 (no overlap). Therefore cc_ngood is an array of integers between 0 and 24 and we would like to keep the substack close to 24 windows for instance (cc_ngood==24) or (cc_ngood>=24*.8) if we want to set a threshold.
Original code removing odd values in cc_ngood

Keeping only maxed substacks (cc_ngood==24)

Keeping substacks with 80% values (cc_ngood>=24*.8)

Of course here the value is config.substack_windows (24) but when there is an overlap the value is probably config.substack_windows * config.cc_len // config.step. Tell me if this was a typo or if it was intended and cc_ngood has a deeper meaning.
Thank you, I would love to contribute to the project when I'll understand it more.
Valentin