Skip to content

feat(beam): use GridBeam in telescope coordinates#238

Open
ssiegelx wants to merge 9 commits into
mainfrom
ss/beam_stream_telx
Open

feat(beam): use GridBeam in telescope coordinates#238
ssiegelx wants to merge 9 commits into
mainfrom
ss/beam_stream_telx

Conversation

@ssiegelx

Copy link
Copy Markdown
Contributor

Allows the user to generate a HybridVisStream from a GridBeam in telescope coordinates. This avoids problems at the pole when using GridBeams in celestial coordinates that do not span 360 degrees in hour angle.

Allows the user to generate a HybridVisStream from a GridBeam
in telescope coordinates.  This avoids problems at the pole
when using GridBeams in celestial coordinates that do not span
360 degrees in hour angle.
@ssiegelx ssiegelx requested a review from tristpinsm April 11, 2023 19:55
@ssiegelx

Copy link
Copy Markdown
Contributor Author

I have tested the code in a notebook, but have not yet attempted to submit jobs that use this task or examine the results in detail.

The updated task should give the same results if provided a GridBeam in celestial coordinates. However, it was restructured a fair amount, so it's possible there will be some unintended changes. We should confirm that we still get the same result for this case.

@tristpinsm tristpinsm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! I will remake my plots with this code and post the result here.

@tristpinsm

tristpinsm commented Apr 11, 2023

Copy link
Copy Markdown
Contributor

Here are plots generated using the telescope beam input to CreateBeamStream. The ringing near the NCP is a lot more localised in declination, but still present. Also, whereas before the NCP itself appeared to be masked, that no longer seems to be the case.
mmode_beam_477_Y
mmode_beam_477_X

I generated these in a notebook, but I also submitted a job to make maps using the celestial beam as before. Once this is done I can compare to the maps generated from the old code to see if there is a difference.

@ssiegelx

Copy link
Copy Markdown
Contributor Author

Thanks @tristpinsm. I think the remaining ringing in declination is due to the |hour angle| < 90 degree limit that is placed to ignore the antipodal transit. There is roughly +/- 2.5 degrees around the NCP where the beam response is significant at 90 degrees.

I'm not sure there are any great options as that assumptions that are made in the beam generation begin to break down as you approach the NCP. Perhaps we should just set the weight dataset for the beam stream to zero for these declinations?

@tristpinsm

Copy link
Copy Markdown
Contributor

I'm not sure there are any great options as that assumptions that are made in the beam generation begin to break down as you approach the NCP. Perhaps we should just set the weight dataset for the beam stream to zero for these declinations?

Yeah that seems reasonable, there is not much sky area there anyway...

Comment thread draco/analysis/beam.py
# Create output container
out = containers.HybridVisStream(
ra=nra,
ra=ra,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the celestial beam case, ra is defined based on the phi axis of the beam container, which doesn't span the full RA range and causes a crash later on. I will fix this and set the test job running again.

Comment thread draco/analysis/beam.py Outdated
Comment on lines +84 to +86
ra = (ha + 360.0) % 360.0
nra = int(round(360.0 / np.abs(ha[1] - ha[0])))
delta_ra = 360.0 / nra

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ra = (ha + 360.0) % 360.0
nra = int(round(360.0 / np.abs(ha[1] - ha[0])))
delta_ra = 360.0 / nra
ra_beam = (ha + 360.0) % 360.0
nra = int(round(360.0 / np.abs(ha[1] - ha[0])))
delta_ra = 360.0 / nra
ra = np.arange(nra) * delta_ra

With this change (and propagating ra_beam in the next few lines) the code ran to completion and I confirmed that the result is the same as with the previous version by comparing the ringmap and weights for about 20 unflagged randomly selected frequencies in the lower band.

@ssiegelx

Copy link
Copy Markdown
Contributor Author

@Arnab-half-blood-prince This PR enables CreateBeamStream to handle GridBeam containers in telescope coordinates. Unfortunately it never got merged and I don't remember the status of testing. Do you want to try running it?

@tristpinsm

tristpinsm commented Jun 14, 2024

Copy link
Copy Markdown
Contributor

I can push the changes I proposed here, and I think with those it was working well. I see that is already done. Nice.

Seth Siegel and others added 4 commits June 19, 2024 09:27
Older versions of scipy do not support use of RectBivariateSpline
interpolation on complex numbers.  Perform real and imaginary
interpolation separately.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants