-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed window function math for tapering function #84
Conversation
the |
Out of curiosity, what do you need from |
Right now we have something that returns Omega_pp(\nu_i) ~ \int A^2 (\nu_i) dOmega. Turns out we'll need Omega_pp(\nu_i, \nu_j) ~ \int A(\nu_i) A(\nu_j) dOmega as well. |
What does the i & j index? different antennas, frequencies, or something else? |
Different frequencies. |
Ok, just pushed. Hopefully this time it's a little less buggy. I mentioned to @nkern today that in working through this, I realized that the pspec scalar normalization infrastructure is not currently able to accommodate non-trivial tapers + non-trivial weighting matrices simultaneously. Details in the notes that I've attached, which will be posted to the HERA memo series. There is a hacky way to do this, involving assigning half (i.e., the square root) of the weighting matrix to Q and having another square root of the weight act on the data. But this is beginning to feel like epicycles upon epicycles, so if there is a need to push further along this direction I'm ripping out the old stuff and implementing Q "properly" (i.e., I'll subclass and make a version where Q is truly equal to dC/dp). Notes here: main.pdf |
@acliu On p6 of your note, should I read an "and" between the bullet points below Eq. 31, or an "or"? In light of this, should we raise a warning when |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved, pending some small changes to a few exception strings.
@@ -681,6 +685,75 @@ def get_G(self, key1, key2): | |||
G[i,j] += np.einsum('ab,ba', iR1Q[i], iR2Q[j]) | |||
|
|||
return G / 2. | |||
|
|||
def get_H(self, key1, key2, taper='none'): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see H_ab
defined anywhere in the note?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, it's there. Equation 33. Unfortunate page break location makes it hard to see.
hera_pspec/pspecdata.py
Outdated
(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^{yet_another} rather than Q_b, where |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yet_another
is not a great name for a variable...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed it to Q^{tapered}
hera_pspec/pspecdata.py
Outdated
M = np.linalg.pinv(G, rcond=1e-12) | ||
#U,S,V = np.linalg.svd(F) | ||
#M = np.einsum('ij,j,jk', V.T, 1./S, U.T) | ||
raise NotImplementedError |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please say what's not implemented, e.g. NoteImplementedError("G^-1 mode not currently supported.")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
(OK, I now see that you do raise warnings about this.) |
This fixes the window functions to account for tapering. Currently it assumes a frequency-independent primary beam, but fixing this will require some changes to pyuvdata that haven't been implemented yet.