Skip to content

Commit b83428c

Browse files
Merge pull request #32 from martinkilbinger/xipm
Xipm
2 parents aabb1bc + d7333ff commit b83428c

4 files changed

Lines changed: 54 additions & 4 deletions

File tree

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Create Release
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
create_release:
10+
name: Create Release
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v2
15+
16+
- name: Set up Python
17+
uses: actions/setup-python@v2
18+
with:
19+
python-version: 3.x
20+
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install build twine
25+
26+
- name: Build and upload package
27+
run: |
28+
python -m build --sdist --wheel
29+
twine upload dist/*

cs_util/cat.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
from datetime import datetime
1313
from astropy.io import fits
1414
from astropy.io import ascii
15+
from astropy.table import Table
1516

1617

1718
def write_header_info_sp(primary_header, name="unknown", version="unknown"):
@@ -106,6 +107,26 @@ def add_shear_bias_to_header(primary_header, R, R_shear, R_select, c):
106107
primary_header["c_2"] = (c[1], "Additive bias 2nd comp")
107108

108109

110+
def write_ascii_table_file(cols, names, fname):
111+
"""Write Ascii Table File.
112+
113+
Write ASCII file with table data.
114+
115+
Parameters
116+
----------
117+
cols : list
118+
data columns
119+
names : list of str
120+
column names
121+
fname : str
122+
output file name
123+
124+
"""
125+
t = Table(cols, names=names)
126+
with open(fname, "w") as fout:
127+
ascii.write(t, fout, delimiter="\t")
128+
129+
109130
def write_fits_BinTable_file(
110131
cols,
111132
output_path,

cs_util/cosmo.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -302,9 +302,9 @@ def xipm_theo(
302302
for corr_type in ("GG+", "GG-"):
303303
xipm[corr_type] = ccl.correlation(
304304
cos,
305-
ell,
306-
cl,
307-
theta.to("deg"),
305+
ell=ell,
306+
C_ell=cl,
307+
theta=theta.to("deg"),
308308
type=corr_type,
309309
)
310310

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ astropy
22
datetime
33
numpy
44
matplotlib
5-
pyccl
5+
pyccl==2.6.1
66
vos

0 commit comments

Comments
 (0)