Giter Site home page Giter Site logo

eelregit / mcfit Goto Github PK

View Code? Open in Web Editor NEW
28.0 5.0 12.0 334 KB

multiplicatively convolutional fast integral transforms implementing FFTLog

License: GNU General Public License v3.0

Python 100.00%
fftlog integral-transform numerical-integration cosmology

mcfit's People

Contributors

azhou00 avatar eelregit avatar nickhand avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

mcfit's Issues

Issue with P2xi function

Figure_1
correlation_function.pdf

Hi,

I downloaded and installed the code a few weeks ago and it worked great and produced the PDF figure attached using the P2xi function. This week however I had to reinstall the code and now when I use the P2xi function on exactly the same power spectrum and k values I get the PNG image which doesn't look right.

I don't think that it is a problem with the power spectrum/k values because they are from the exact same numpy array as was used before.

Thanks

Bug when l is odd for P2xi and xi2P

Hello,

There seems to be a bug: when l is chosen odd P2xi returns a zero array.
E.g. for the first spherical bessel function

r, xi = P2xi(k, l=1)(P)

we get all zeros whereas

r, xi1 = P2xi(k, l=0, deriv=1)(-P) # or
r, xi2 = SphericalBessel(k, nu=1)(P/(2.*pi)**1.5))

both produce the correct output (ignoring multiplication by i). This affects xi2P as well.

The issue is because you have multiplied by i^l and np.fft.rfft ignores the imaginary part, so computes FFT for a zero array.
Ideally for me there is a cosmology class that can evaluate xi^l_n (equation 18 in https://arxiv.org/abs/1603.04405). Then there would be no need to have to worry about the imaginary units.

Thanks for a great package.

Question about how the y values are calculated

Hi,

I was wondering whether you could give a brief description of the method used to calculate the y values that are returned when using the SphericalBessel transformation. Does it depend on the x values you input into the function?

I had a look through the source code but couldn't quite figure out the process.

Thank you,

Fran Lane

From power spectrum to correlation function and vice-versa

Hello,

I'm a cosmologist and I'm following the basic examples that are provided in the README file to obtain the correlation function from a given power spectrum and vice-versa. I'm producing the linear PS with Class and inputting it into P2xi I found very weird results. Moreover, when I transform xi to PS using xi2P and then compare the result with the input PS I see deviations (oscillations basically) that are of order 5-15 %, too big for the accuracy need. Is there a way to set the accuracy for the Fourier transform? I went through the code but wasn't able to spot it.
Thanks!

Marco

Automate the release procedure.

The instructions are at:

https://docs.travis-ci.com/user/deployment/pypi/

You can refer to the example in bigfile:

https://github.com/rainwoodman/bigfile/blob/1a2d05977fc8edebd8ddf9e81fdb97648596266d/.travis.yml#L47

The basic idea is run the auto deployment on tags and builds that ends with .0. Then when you do

git tag 1.0.0
git push --tags

Then very first build in the build matrix will run auto deployment and create a release on PyPI. In bigfile I added a script (check_tag.sh) to assert the tag agrees with the version number before sending the release to PyPI, since it is a common mistake the claimed version in the package disagrees with the tag name.

You do need to compute your encrypted pypi password via the travis CLI command. The procedure is described in their guide (I don't think they have a web interface for that).

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.