Skip to content

Conversation

@keskitalo
Copy link
Member

@keskitalo keskitalo commented Nov 19, 2025

Check that TOAST and sotodlib assign same samples to same pixels given the same WCS configuration.

Unit tests will not pass until hpc4cmb/toast#894 is merged.

Copy link
Member

@tskisner tskisner left a comment

Choose a reason for hiding this comment

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

Thanks for improving these tests. We can't merge this in until the upstream toast PR is merged and a new tag is made.

@keskitalo
Copy link
Member Author

keskitalo commented Nov 19, 2025

This is the comparison to current tip of toast3:

image

This is the map comparison after 1/2 pixel offset added to TOAST (note the different plotting scales):

image

@keskitalo
Copy link
Member Author

Turns out that the 1/2 pixel offset was only needed before a recent crpix data type fix in so3g. I removed the offset from this PR.

@Bai-Chiang noticed that the exact weather parameters used in qpoint azel->radec conversion impact the TOAST/so3g agreement. SimGround now has a special so3g_compat_mode where the pointing conversion assumes typical Atacama weather just like so3g.

@keskitalo keskitalo requested a review from Bai-Chiang November 24, 2025 23:08
box = np.radians([[dec_start, ra_start], [dec_stop, ra_stop]])
reso = np.radians(1.0 / 60)
shape, wcs = enmap.geometry(box, res=reso, proj="car")
wcs.wcs.crpix[1] -= 0.5
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this half pixel offset removed or not?

Copy link
Member Author

Choose a reason for hiding this comment

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

Here we create a geometry with non-integer center pixel. It is separate from TOAST applying an offset in translating between pixel numbers and pointing angles.

The half-pixel offset turned out to be not needed in TOAST.

Copy link
Contributor

@Bai-Chiang Bai-Chiang left a comment

Choose a reason for hiding this comment

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

Also it's better change the default weather to "toco" in mlmapmaker

weather = Unicode("vacuum", help="Weather to assume when making maps")

and add so3g_compat_mode to workflow script

toast.ops.SimGround(
name="sim_ground",
weather="atacama",
detset_key="pixel",
session_split_key="wafer_slot",
enabled=False,

@keskitalo
Copy link
Member Author

Excellent points! Implemented both.

We won't be able to merge this PR until there is a tagged version of TOAST with so3g_compat_mode.

@keskitalo keskitalo merged commit 4c39943 into master Jan 2, 2026
5 checks passed
@keskitalo keskitalo deleted the wcs_pointing_test branch January 2, 2026 20:01
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.

4 participants