Skip to content

Commit

Permalink
add filtering for center packet loss
Browse files Browse the repository at this point in the history
  • Loading branch information
PyxieLouStar committed Feb 1, 2024
1 parent f87e430 commit 4209b36
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
3 changes: 3 additions & 0 deletions SSINS/data/MWA_EoR_Highband_shape_dict.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ TV8:
TV9:
- 195000000.0
- 202000000.0
center_packet_loss:
- 177000000.0
- 187000000.0
16 changes: 16 additions & 0 deletions SSINS/match_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,22 @@ def match_test(self, INS):
sig = np.absolute(INS.metric_ms[t, f, p])
t = slice(t, t + 1)
f = slice(f, f + 1)
elif shape == 'center_packet_loss':
N = np.count_nonzero(np.logical_not(INS.metric_ms[:, self.slice_dict[shape]].mask),
axis=1)
sliced_arr = (INS.metric_ms[:, self.slice_dict[shape]].mean(axis=1)) * np.sqrt(N)
t, p = np.unravel_index((sliced_arr / self.sig_thresh[shape]).argmin(),
sliced_arr.shape)
t = slice(t, t + 1)
f = self.slice_dict[shape]
# Pull out the number instead of a sliced arr
sig = sliced_arr[t, p][0]
if sig < 0:
print('found packet loss')
print(sig)
sig = np.absolute(sig)
else:
continue
else:
N = np.count_nonzero(np.logical_not(INS.metric_ms[:, self.slice_dict[shape]].mask),
axis=1)
Expand Down

0 comments on commit 4209b36

Please sign in to comment.