Skip to content

Commit

Permalink
Updated docstrings for get_H and scalar_delay_adjustment to reflect h…
Browse files Browse the repository at this point in the history
…ow we actually account for tapering in our code (#342)

Co-authored-by: Adrian Liu <[email protected]>
  • Loading branch information
acliu and Adrian Liu committed Jun 16, 2021
1 parent 1b11373 commit 13e89d6
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions hera_pspec/pspecdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -1439,15 +1439,7 @@ def get_H(self, key1, key2, sampling=False, exact_norm=False, pol=False):
H_ab = (1/2) Tr[R_1 Q_a^alt R_2 Q_b]
(See HERA memo #44). As currently implemented, this approximates the
primary beam as frequency independent. Under this approximation, the
our H_ab is defined using the equation above *except* we have
Q^tapered rather than Q_b, where
\overline{Q}^{tapered,beta}
= e^{i 2pi eta_beta (nu_i - nu_j)} gamma(nu_i) gamma(nu_j)
where gamma is the tapering function. Again, see HERA memo #44 for
details.
primary beam as frequency independent.
The sampling option determines whether one is assuming that the
output points are integrals over k bins or samples at specific
Expand Down Expand Up @@ -2587,8 +2579,10 @@ def scalar(self, polpair, little_h=True, num_steps=2000, beam=None,
def scalar_delay_adjustment(self, key1=None, key2=None, sampling=False,
Gv=None, Hv=None):
"""
Computes an adjustment factor for the pspec scalar that is needed
when the number of delay bins is not equal to the number of
Computes an adjustment factor for the pspec scalar. There are
two reasons why this might be needed:
1) When the number of delay bins is not equal to the number of
frequency channels.
This adjustment is necessary because
Expand All @@ -2603,6 +2597,14 @@ def scalar_delay_adjustment(self, key1=None, key2=None, sampling=False,
we generally need a separate scalar adjustment for each
alpha.
2) Even when the number of delay bins is equal to the number
of frequency channels, there is an extra adjustment necessary
to account for tapering functions. The reason for this is that
our current code accounts for the tapering function in the
normalization matrix M *and* accounts for it again in the
pspec scalar. The adjustment provided by this function
essentially cancels out one of these extra copies.
This function uses the state of self.taper in constructing adjustment.
See PSpecData.pspec for details.
Expand Down

0 comments on commit 13e89d6

Please sign in to comment.