Skip to content

Commit fdf9871

Browse files
committedApr 28, 2020
first stab at some content
1 parent 1d7a3f3 commit fdf9871

File tree

8 files changed

+58
-1
lines changed

8 files changed

+58
-1
lines changed
 

‎.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "cxx/Sparse2D"]
2+
path = cxx/Sparse2D
3+
url = git@github.com:CosmoStat/Sparse2D.git

‎README.md

+40-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,41 @@
11
# cosmostat
2-
Software package for cosmostatistics
2+
Software package for cosmostatistics
3+
4+
5+
## Install
6+
7+
To install without thinking:
8+
```
9+
$ pip install git+https://github.com/CosmoStat/cosmostat.git
10+
```
11+
12+
To install by cloning:
13+
```
14+
$ git clone git@github.com:CosmoStat/cosmostat.git
15+
$ cd cosmostat
16+
$ pip install -e .
17+
```
18+
19+
## Example
20+
21+
```
22+
import numpy as np
23+
import matplotlib.pyplot as plt
24+
import pycs
25+
26+
# Generate a test image
27+
img = np.random.randn(256, 256)
28+
29+
# Take the starlet transform with 5 wavelet scales
30+
st = pycs.astro.wl.image.transforms.starlet2d(img, nscales=5)
31+
32+
# Compute the aperture mass map at scale 4 using the starlet filter
33+
apm = pycs.astro.wl.image.filters.aperture_mass(img, theta=2**4, filter='starlet')
34+
35+
# Plot
36+
fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(6, 5))
37+
ax1.imshow(st[3], cmap='magma')
38+
ax2.imshow(apm, cmap='magma')
39+
for ax in (ax1, ax2, ax3):
40+
ax.set_axis_off()
41+
```

‎pycs/__init__.py

Whitespace-only changes.

‎pycs/astro/__init__.py

Whitespace-only changes.

‎pycs/astro/wl/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from lenspack import *

‎pycs/sparse/__init__.py

Whitespace-only changes.

‎setup.py

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
from setuptools import setup, find_packages
2+
import os
3+
4+
setup(
5+
name="pycs",
6+
author="CosmoStat Laboratory",
7+
author_email="",
8+
version="0.0.1rc1",
9+
packages=find_packages(),
10+
install_requires = [
11+
'lenspack @ git+https://github.com/CosmoStat/lenspack.git@master#egg=lenspack',
12+
]
13+
)

‎src/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# C/CXX source directory

0 commit comments

Comments
 (0)