Skip to content

Changes needed to work with new so3g#1591

Merged
tskisner merged 2 commits intomasterfrom
tsk/so3g_boostless
Mar 27, 2026
Merged

Changes needed to work with new so3g#1591
tskisner merged 2 commits intomasterfrom
tsk/so3g_boostless

Conversation

@tskisner
Copy link
Copy Markdown
Member

These changes are designed to allow sotodlib to pass unit tests with both the legacy so3g / spt3g as well as current spt3g plus the in-development version of so3g which uses pybind11 instead of boost.

This PR just enables the passing of unit tests, which do not test the creation and loading of books. In particular, the book binding code and all other uses of G3SuperTimestream need to be updated before we can use the new so3g.

I verified that this branch works both with the latest release of so3g and also the code in simonsobs/so3g#229

These changes are designed to allow sotodlib to pass unit tests
with both the legacy so3g / spt3g as well as current spt3g plus
the in-development version of so3g which uses pybind11 instead
of boost.

This PR just enables the passing of unit tests, which do not
test the creation and loading of books.  In particular, the
book binding code and all other uses of G3SuperTimestream need
to be updated before we can use the new so3g.
Comment thread sotodlib/coords/helpers.py Outdated
Comment on lines +12 to +15
if hasattr(so3g.proj.quat, "quat"):
legacy_spt3g = True
else:
legacy_spt3g = False
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why not mask so3g.proj.quat.quat and so3g.proj.quat.Quat here so that you do not have to check if it is legacy or not every time it is called?

For example:

if hasattr(so3g.proj.quat, "quat"):
    legacy_spt3g = True
    quat = so3g.proj.quat.quat
else:
    legacy_spt3g = False
    quat = so3g.proj.quat.Quat

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Thanks, I simplified this and removed the legacy_spt3g bool, which is not needed.

@tskisner tskisner requested a review from iparask March 27, 2026 14:20
Copy link
Copy Markdown
Member

@iparask iparask left a comment

Choose a reason for hiding this comment

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

This looks good to me.

@tskisner tskisner merged commit aee910a into master Mar 27, 2026
5 checks passed
@tskisner tskisner deleted the tsk/so3g_boostless branch March 27, 2026 18:52
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