Skip to content

Files

Latest commit

6b6785d · Apr 28, 2020

History

History
41 lines (31 loc) · 863 Bytes

README.md

File metadata and controls

41 lines (31 loc) · 863 Bytes

cosmostat

Software package for cosmostatistics

Install

To install without thinking:

$ pip install git+https://github.com/CosmoStat/cosmostat.git

To install by cloning:

$ git clone [email protected]:CosmoStat/cosmostat.git
$ cd cosmostat
$ pip install -e .

Example

import numpy as np
import matplotlib.pyplot as plt
import pycs

# Generate a test image
img = np.random.randn(256, 256)

# Take the starlet transform with 5 wavelet scales
st = pycs.astro.wl.image.transforms.starlet2d(img, nscales=5)

# Compute the aperture mass map at scale 4 using the starlet filter
apm = pycs.astro.wl.image.filters.aperture_mass(img, theta=2**4, filter='starlet')

# Plot
fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(6, 5))
ax1.imshow(st[3], cmap='magma')
ax2.imshow(apm, cmap='magma')
for ax in (ax1, ax2, ax3):
    ax.set_axis_off()