Git Product home page Git Product logo

pyrsd's Introduction

pyRSD

DOI

pyRSD is a Python package for computing the theoretical predictions of the redshift-space power spectrum of galaxies. The package also includes functionality for fitting data measurements and finding the optimal model parameters, using both MCMC and nonlinear optimization techniques.

The software is compatible with Python versions 2.7, 3.5, and 3.6.

Testing is performed via the continuous integration service for Python version 2.7, 3.5, and 3.6. The build status of those tests is below.

Build Status

Installation

The package is installable via the conda utility as

conda install -c nickhand -c astropy pyrsd

Reference

The theoretical models used in this paper are described in more detail in Hand et al. 2017. Please cite this work if you use this package in your research.

Documentation

For installation instructions, examples, and full API documentation, please see Read the Docs.

pyrsd's People

Contributors

eelregit avatar nickhand avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

pyrsd's Issues

Issues with Installation

Hi! I am running Ubuntu 14.04 on a Windows 10 Bash shell. When I try to install pyRSD for Python 3.6, I am not able to build the wheel. I do not have conda, so I have been using two different methods:

  1. When I use the method you suggested in your installation guide on the documentation (downloading the source via GitHub, then using "python3.6 -m pip install ." inside the cloned directory), I fail to build the wheel, receiving the errors:
    error: Command "x86_64-linux-gnu-g++ -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -IpyRSD/_gcl/include -I/mnt/d/Users/brand/Desktop/kind_3d_3/env/lib/python3.6/site-packages/numpy/core/include -Ibuild/temp.linux-x86_64-3.6/include -c pyRSD/_gcl/cpp/Common.cpp -o build/temp.linux-x86_64-3.6/pyRSD/_gcl/cpp/Common.o -MMD -MF build/temp.linux-x86_64-3.6/pyRSD/_gcl/cpp/Common.o.d -O2 -std=c++11" failed with exit status 1

    ----------------------------------------
Command "/mnt/d/Users/brand/Desktop/kind_3d_3/env/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-req-build-guyq9xeo/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-oxuetv99/install-record.txt --single-version-externally-managed --compile --install-headers /mnt/d/Users/brand/Desktop/kind_3d_3/env/include/site/python3.6/pyRSD" failed with error code 1 in /tmp/pip-req-build-guyq9xeo/
  1. I also tried using "python3.6 -m setup.py install", but this also failed. The final error was
error: Command "x86_64-linux-gnu-g++ -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -IpyRSD/_gcl/include -I/mnt/d/Users/brand/Desktop/kind_3d_3/env/lib/python3.6/site-packages/numpy/core/include -Ibuild/temp.linux-x86_64-3.6/include -I/mnt/d/Users/brand/Desktop/kind_3d_3/env/include -I/usr/include/python3.6m -I/mnt/d/Users/brand/Desktop/kind_3d_3/env/lib/python3.6/site-packages/numpy/core/include -c pyRSD/_gcl/cpp/Common.cpp -o build/temp.linux-x86_64-3.6/pyRSD/_gcl/cpp/Common.o -MMD -MF build/temp.linux-x86_64-3.6/pyRSD/_gcl/cpp/Common.o.d -O2 -std=c++11" failed with exit status 1

Of note, I also found earlier in the output that several files were not found by the installation routine; I searched within the source code myself and was also unable to find them:

warning: no files found matching 'pyRSD/gcl_wrap.cpp'
warning: no files found matching 'pyRSD/gcl.py'
warning: no files found matching 'depends/class-v2.6.1.tar.gz'

I have tried all of the common fixes (updating pip, setuptools, python3.6-dev, etc.) to no avail. I am not sure what the issue may be, as I have been unable to find the exact location within the source code of the command that fails to provide context.

If it would be of benefit, I can attach my full error files. If there is any other information I can provide, please let me know. Thank you!

EDIT: Edited for clarity

Cannot Initialize Galaxy Spectrum Model

I'm having trouble performing a basic task, which would be to initialize the galaxy power-spectrum model. I'm running just a few lines of code:

from pyRSD.rsd import GalaxySpectrum
from pyRSD.rsd.cosmology import Planck15
model = GalaxySpectrum('gaussian', False)
model.initialize()

, but I get an error associated to pandas which prints out many lines of traceback, and gives the following message:
AttributeError: 'DataFrame' object has no attribute '_attrs'

I installed pyRSD using anaconda, and created an environment with all the necessary versions and dependencies.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.