-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into coadd_utils
- Loading branch information
Showing
15 changed files
with
141 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,11 +23,11 @@ jobs: | |
if [ `echo ${{matrix.os}} | cut -d - -f 1` = "ubuntu" ]; then | ||
sudo apt-get --allow-releaseinfo-change update -y | ||
[ `echo ${{matrix.os}} | cut -d . -f 1` = "ubuntu-20" ] && sudo apt-get install python-is-python3 | ||
sudo apt-get install libboost-all-dev libflac-dev libnetcdf-dev python python3 python3-pip python3-setuptools | ||
sudo apt-get install libbz2-dev libboost-all-dev libflac-dev libnetcdf-dev python python3 python3-pip python3-setuptools | ||
elif [ `echo ${{matrix.os}} | cut -d - -f 1` = "macOS" ]; then | ||
brew install [email protected] | ||
brew link --overwrite [email protected] | ||
brew install boost boost-python3 flac netcdf | ||
brew install bzip2 boost boost-python3 flac netcdf | ||
else | ||
echo 'No installed package manager!' | ||
exit 1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
[tool.poetry] | ||
name = "spt3g" | ||
version = "$Version$" | ||
description = "SPT3G Analysis and DAQ Software" | ||
authors = ["SPT Collaboration"] | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.7" | ||
numpy = "^1.15" | ||
astropy = "^5" | ||
scipy = "^1.4.1" | ||
pandas = "^1" | ||
healpy = "^1.13" | ||
|
||
[build-system] | ||
requires = ["poetry-core>=1.0.0"] | ||
build-backend = "poetry.core.masonry.api" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#!/usr/bin/env python | ||
|
||
from spt3g import core | ||
import time | ||
|
||
# File to disk | ||
pipe = core.G3Pipeline() | ||
pipe.Add(core.G3InfiniteSource, type=core.G3FrameType.Timepoint, n=10) | ||
n = 0 | ||
|
||
|
||
def addinfo(fr): | ||
global n | ||
if fr.type != core.G3FrameType.Timepoint: | ||
return | ||
fr["time"] = core.G3Time(int(time.time() * core.G3Units.s)) | ||
fr["count"] = n | ||
n += 1 | ||
|
||
|
||
pipe.Add(addinfo) | ||
pipe.Add(core.Dump) | ||
pipe.Add(core.G3Writer, filename="test.g3.bz2") | ||
pipe.Run() | ||
|
||
# And back from disk | ||
print("Reading") | ||
pipe = core.G3Pipeline() | ||
pipe.Add(core.G3Reader, filename="test.g3.bz2") | ||
pipe.Add(core.Dump) | ||
n = 0 | ||
|
||
|
||
def checkinfo(fr): | ||
global n | ||
if fr.type != core.G3FrameType.Timepoint: | ||
return | ||
if "time" not in fr: | ||
raise KeyError("time") | ||
if fr["count"] != n: | ||
raise ValueError("Out of order frame") | ||
n += 1 | ||
|
||
|
||
pipe.Add(checkinfo) | ||
pipe.Run() | ||
|
||
if n != 10: | ||
raise ValueError("Wrong number of frames (%d should be %d)" % (n, 10)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters