Skip to content

Commit 0dc213b

Browse files
author
Thomas Satterthwaite
committed
No crosstalk on collided resonators
1 parent 6399494 commit 0dc213b

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

sotodlib/toast/ops/sim_mumux_crosstalk.py

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -285,12 +285,13 @@ def _exec(self, data, detectors=None, **kwargs):
285285
Phi0[det_source],
286286
dPhi0dT[det_source],
287287
)
288-
crosstalk += chi * np.sin(
289-
source_squid_phase - target_squid_phase
290-
)
291-
292-
# Check if collided resonator; disable channel if so
293-
if np.isnan(chi):
288+
# Add crosstalk if not collided resonator
289+
if not np.isnan(chi):
290+
crosstalk += chi * np.sin(
291+
source_squid_phase - target_squid_phase
292+
)
293+
else:
294+
# Otherwise flag
294295
temp_obs.detdata[self.det_flags][det_source] |= self.det_flag_mask
295296
temp_obs.detdata[self.det_flags][det_target] |= self.det_flag_mask
296297

@@ -300,9 +301,6 @@ def _exec(self, data, detectors=None, **kwargs):
300301
crosstalk, dPhi0dT[det_target]
301302
) / det_scale
302303

303-
# Send nans to zero to remove TODs from collided resonators
304-
output_data[row_target][np.isnan(output_data[row_target])] = 0
305-
306304
# Redistribute back
307305
temp_obs.redistribute(
308306
proc_rows,
@@ -316,9 +314,6 @@ def _exec(self, data, detectors=None, **kwargs):
316314
# explicitly here
317315
offset_old = np.median(obs.detdata[self.det_data][det])
318316
offset_new = np.median(temp_obs.detdata[self.det_data][det])
319-
# Zero TODs of collided resonators
320-
if offset_new == 0:
321-
offset_old = 0
322317
# Propagate data
323318
obs.detdata[self.det_data][det] = (
324319
temp_obs.detdata[self.det_data][det] - offset_new + offset_old

0 commit comments

Comments
 (0)