-
Notifications
You must be signed in to change notification settings - Fork 7
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
Deconvolving ringmap #122
Deconvolving ringmap #122
Conversation
This pull request introduces 1 alert and fixes 1 when merging 47d5bd1 into 0c4b397 - view on LGTM.com new alerts:
fixed alerts:
|
This pull request introduces 1 alert and fixes 1 when merging 839bbf1 into 0c4b397 - view on LGTM.com new alerts:
fixed alerts:
|
Currently, you have the "natural" EW weights as [4,3,2,1], but I think it should be [2,3,2,1]. The 0-cylinder separation baselines don't include any independent negative v baselines, unlike the non-zero cylinder separations (thus reducing their weight by half). Right?
|
Also, when forming the wiener filter, you are summing over the cylinder axis, as well as the +/-m axis in the denominator
But, shouldn't we keep positive and negative m separate until after filtering? I.e. only sum over axis=-2 |
This is a good question. I am pretty sure it's correct, but it's not trivial to come up with a concrete explanation as to why. Here are a few different stabs at it:
|
In order to guarantee the output sky is real, you need to treat the positive/negative m's as separate measurements of the same underlying mode and only infer the m >= 0 modes (as the negative ones on the sky are simple conjugates). This is done in the m-mode papers, although I have a similar derivation of it for the hybrid case that I can tidy up. Ultimately it means that the +/- modes are independent measurements at a similar level to the different cylinders and thus you need to sum over both in the filter. Ultimately I think the fact that the +/- modes are mostly disjoint (coming from above/below the NCP), means that this doesn't really matter a huge amount in the practical output for CHIME. However, any instrument that has an EW baseline length > 0, but < aperture width (i.e. a responses that covers both +/-m in some asymmetric manner) would need to account for this properly to get the right S/N weighting. CHIME gets away with it because either your baseline has + or - m response at a particular declination (but not both), or it is the 0-cyl separation in which case the response is symmetric for +/- m and they should get weighted equally. |
I'm having doubts about the relative cylinder weighting point. I think I'm going to need to write it all out to be sure. I'll circulate it when I've got something written up. |
839bbf1
to
8c42861
Compare
This pull request fixes 1 alert when merging 8c42861 into 0c4b397 - view on LGTM.com fixed alerts:
|
I'm finding that the maps generated with this task are scaled down by a factor of 4 relative to maps created with the standard ringmap maker. Also the flux of point sources is off by a factor of four from their expected value. This is also true of the deconvolving map maker task that I wrote that uses an external beam model. example_normalization_problem_3c295.pdf This plot shows an RA slice through the map at the (RA, Dec) of 3C 295. I'm showing the standard ring map maker in blue (i.e., using the BeamformEW task on the same HybridVis container), this task in red, and my map maker in green. The expected flux of the source is indicated by the black dashed line. @wulfda02 Have you encountered this? |
As I mentioned on the stacking call, I think this can be explained by the dirty beam amplitude after going through the wiener filter. It sounds like there's still some uncertainty as to why this amplitude isn't 1, but in my work I find that re-normalizing by this amplitude produces the correct flux for point sources. |
See PR #126 for an extension to this that allows for an external beam model. |
draco/analysis/ringmapmaker.py
Outdated
@@ -230,7 +231,7 @@ def process(self, gstream): | |||
vmax = nsmax / wv | |||
|
|||
if self.weight == "inverse_variance": | |||
gw = gsw[:, lfi].copy() | |||
gw = gsw[:, lfi].view(np.ndarray).copy() |
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.
Should the view()
occur before the slice?
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.
Yeah, good point. This is fine with the current mpiarray code, but would result in a warning in the new one. Probably the right thing to do is to define gsw
with a .local_array
, but we'll need the new code to get merged first and I'm still a little reticent to do it atm.
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 believe that both .local_array
and moving the view before the slice is old-code compatible!
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.
# Get the effective beamwidth for the polarisation combination | ||
sig_a = beam_width[pa](freq, dec) | ||
sig_b = beam_width[pb](freq, dec) | ||
sig = sig_a * sig_b / (sig_a ** 2 + sig_b ** 2) ** 0.5 |
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.
What is the order of operations that you expect here?
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.
??
…sh` routine Due to some of the logic handling whether the method exists or not, it would mask and silence an AttributeError that was raised for other reasons in the actual `.process_finish` method when it ran.
Transform wasn't exactly invertible as mmax was incorrect.
8c42861
to
09a9fe1
Compare
This pull request fixes 1 alert when merging 09a9fe1 into 63e68d4 - view on LGTM.com fixed alerts:
|
No description provided.