Add a Simons Observatory sub-module.#190
Conversation
- To ease downstream use and avoid the need for bundling spt3g core into the `so3g` package, create a sub-module called "so". - Add the only unique class used by S.O. data (G3SuperTimestream) to the `so` submodule, along with some numpy helper tools. - Modify the integrated G3SuperTimestream source slightly to allow compilation with -Wall -Werror on both gcc and clang.
There was a problem hiding this comment.
Some preliminary comments on this with some straightforward changes that would make it easier to merge. We strictly avoid linking against numpy everywhere in the core library, and instead rely directly on the python buffer protocol for array access. I think it's feasible to do the same here, but would take some work. Linking against numpy headers is tricky because of the numpy 2 compatibility issues etc. I'd rather avoid that altogether.
Separately, If the intention is to migrate / integrate this class with G3TimestreamMap, I think it would make sense to strip out any unused features.
| G3_POINTERS(G3SuperTimestream); | ||
| G3_SERIALIZABLE(G3SuperTimestream, 0); | ||
|
|
||
| class g3supertimestream_exception : std::exception |
There was a problem hiding this comment.
use the G3Logging stuff instead of creating a custom exception -- SET_LOGGER("G3SuperTimestream") in the class definition, and use log_fatal() instead of throw g3supertimestream_exception
| @@ -0,0 +1,128 @@ | |||
| #pragma once | |||
There was a problem hiding this comment.
Drop this header file in favor of standard python exceptions and G3Logging
| @@ -0,0 +1,2 @@ | |||
| import spt3g._libso | |||
| from spt3g._libso import G3SuperTimestream | |||
There was a problem hiding this comment.
Add this test script: https://github.com/simonsobs/so3g/blob/master/test/test_g3super.py
| @@ -0,0 +1,26 @@ | |||
| # Find the numpy include path | |||
There was a problem hiding this comment.
Make this module build conditionally on finding Bzip2 and FLAC, since these are technically optional libraries in core.
|
Closing this in favor of #192 |
This PR is just a proof of principle / reference implementation showing an up-streaming of the
G3SuperTimestreamclass from Simons Observatory tools:To ease downstream use and avoid the need for bundling spt3g core into the
so3gpackage, create a sub-module called "so".Add the only unique class used by S.O. data (G3SuperTimestream) to the
sosubmodule, along with some numpy helper tools.Modify the integrated G3SuperTimestream source slightly to allow compilation with -Wall -Werror on both gcc and clang.
This work may be superceded by a shim that translates to/from
G3TimestreamMapon the fly. TBD.