GithubHelp home page GithubHelp logo

javicarron / pynkowski Goto Github PK

View Code? Open in Web Editor NEW
16.0 3.0 6.0 3.91 MB

Pynkowski is a Python package to compute Minkowski Functionals, as well as their expected values for different fields.

Home Page: https://javicarron.github.io/pynkowski

License: GNU General Public License v3.0

Python 100.00%
cmb gaussian healpix healpy minkowski non-gaussian polarization spherical topology cosmology

pynkowski's People

Contributors

alecarones avatar javicarron avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

pynkowski's Issues

inconsistency in the interface between from TheoryP2 and TheoryTemperature functions

There's currently an inconsistency in the way
TheoryP2 is initialized

def __init__(self, us=None, Cls=None, μ=None, average_bin=True, edges=False):

wrt TheoryTemperature
def __init__(self, us=None, cls=None, μ=None, average_bin=True, edges=False):

i suggest more internal consistency between the two interface .Ie:

mf.TheoryP2(us, Cls= cl ) and mf.TheoryTemperature(us, cls= cl) .

Moreover,

when i call
theo, mu = mf.TheoryP2(us, Cls= cl )
i get the following error message :

UnboundLocalError                         Traceback (most recent call last)
<ipython-input-151-bf0c8dc5f467> in <module>
      1 #theo = mf.TheoryTemperature(us, cls=(input_cl[0] *(1-fl )*fl2 )  )
----> 2 theo, mu  = mf.TheoryP2(us, Cls=(input_cl[1:3] *(1-fl )*fl2 )  )

~/miniconda/envs/compsep/lib/python3.9/site-packages/pynkowski/theory/p2.py in __init__(self, us, Cls, μ, average_bin, edges)
    134         if (Cls is not None) and (μ is None):
    135             if (Cls.ndim == 2) and (Cls.shape[0]==2):
--> 136                 cls = (cls[0]+cls[1])/2.
    137             elif (Cls.ndim == 1):
    138                 cls = cls/2.

UnboundLocalError: local variable 'cls' referenced before assignment

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.