Skip to content

Commit

Permalink
style(beamtransfer): blacken
Browse files Browse the repository at this point in the history
  • Loading branch information
sjforeman committed Jan 8, 2025
1 parent 5c88d6d commit 1c4a115
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions drift/core/beamtransfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1740,15 +1740,15 @@ class BeamTransferNoSVD(BeamTransfer):
to be set. (In this case, the value of `skip_svd` is ignored,
because the SVD step is automatically skipped.)
"""

# No SV cut
svcut = 0.0

noise_weight = False

def _svd_num(self, mi):
"""Compute number of SVD modes meeting the cut.
Parameters
----------
mi : integer
Expand Down Expand Up @@ -1882,7 +1882,9 @@ def project_vector_svd_to_sky(self, mi, vec, temponly=False, conj=False):
"""

if temponly:
raise NotImplementedError("temponly not implemented for no-SVD project_vector_svd_to_sky!")
raise NotImplementedError(
"temponly not implemented for no-SVD project_vector_svd_to_sky!"
)

# Create the output matrix
svec = np.zeros(
Expand All @@ -1897,17 +1899,23 @@ def project_vector_svd_to_sky(self, mi, vec, temponly=False, conj=False):

# Loop through frequencies, doing tel-to-sky projection at each freq
for fi in range(self.nfreq):
svec[fi] = np.dot(beam[fi].T.conj(), vec.reshape(self.nfreq, self.ntel, -1)[fi]).reshape(
(self.telescope.num_pol_sky, self.telescope.lmax + 1) + vec.shape[1:]
svec[fi] = np.dot(
beam[fi].T.conj(), vec.reshape(self.nfreq, self.ntel, -1)[fi]
).reshape(
(self.telescope.num_pol_sky, self.telescope.lmax + 1)
+ vec.shape[1:]
)

else:
ibeam = self.invbeam_m(mi).reshape((self.nfreq, self.nsky, self.ntel))

# Loop through frequencies, doing tel-to-sky projection at each freq
for fi in range(self.nfreq):
svec[fi] = np.dot(ibeam[fi], vec.reshape(self.nfreq, self.ntel, -1)[fi]).reshape(
(self.telescope.num_pol_sky, self.telescope.lmax + 1) + vec.shape[1:]
svec[fi] = np.dot(
ibeam[fi], vec.reshape(self.nfreq, self.ntel, -1)[fi]
).reshape(
(self.telescope.num_pol_sky, self.telescope.lmax + 1)
+ vec.shape[1:]
)

return svec
Expand Down

0 comments on commit 1c4a115

Please sign in to comment.