Skip to content

Changes needed to work with new so3g#1591

Open
tskisner wants to merge 1 commit intomasterfrom
tsk/so3g_boostless
Open

Changes needed to work with new so3g#1591
tskisner wants to merge 1 commit intomasterfrom
tsk/so3g_boostless

Conversation

@tskisner
Copy link
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 on lines +12 to +15
if hasattr(so3g.proj.quat, "quat"):
legacy_spt3g = True
else:
legacy_spt3g = False
Copy link
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

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