Skip to content

Commit

Permalink
a cleaner way of applying the obs_lsst xtalk coefficients
Browse files Browse the repository at this point in the history
  • Loading branch information
jchiang87 committed Nov 22, 2018
1 parent d9a8ec2 commit 3df13ba
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions python/desc/imsim/camera_readout.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,12 +349,11 @@ def _apply_crosstalk(self):
amp_names = self.camera_info.get_amp_names(self.sensor_id)
imarrs = np.array([self.amp_images[amp_name].getArray()
for amp_name in amp_names])
for amp_index, amp_name, row in zip(range(len(amp_names)),
amp_names, xtalk):
xtalk_row = list(row)
xtalk_row[amp_index] = 1.
for amp_index, amp_name, xtalk_row in zip(range(len(amp_names)),
amp_names, xtalk):
self.amp_images[amp_name].getArray()[:, :] \
= sum([x*y for x, y in zip(imarrs, xtalk_row)])
= (imarrs[amp_index] +
sum([x*y for x, y in zip(imarrs, xtalk_row)]))

def get_amplifier_hdu(self, amp_name, compress=True):
"""
Expand Down

0 comments on commit 3df13ba

Please sign in to comment.