Git Product home page Git Product logo

aum's People

Contributors

surhudm avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aum's Issues

Remove unnecessary functions from hod.cpp

There are a few unused and obsolete functions in hod.cpp:

changepar
getnewpar

These functions were used when mcmc was run within cpp. Now this is obsolete. Better MCMC samplers like emcee can be used. So these functions can be removed.

Setting HOD parameters causes core dump

Hello Surhud,

I've run the following simple script to set HOD parameters (a straight copy from the examples in the python help file). It proceeds without a problem until it tries to calculate D2gg_num(), upon which GSL throws an error:

#!/usr/bin/env python                                                                                 
import sys
from math import *
sys.path.append('/users/reiko/2code/aum/install/lib/python2.7/site-packages')
import hod as h


## BEGIN: main function                                                                               
if __name__=='__main__':

    cosmo = h.cosmo()
    cosmo.Om0 = 0.307115
    cosmo.w0 = -1
    cosmo.wa = 0
    cosmo.Omk = 0.0
    cosmo.hval = 0.6777
    cosmo.Omb = 0.048206
    cosmo.th = 2.726
    cosmo.s8 = 0.8228
    cosmo.nspec = 0.96
    cosmo.ximax = log10(8.0)

    hodp = h.hodpars()
    hodp.cfac = 1.0
    hodp.Mmin = 13.0
    hodp.siglogM = 0.5
    hodp.Msat = 14.0
    hodp.alpsat = 1.0
    hodp.Mcut = 13.5
    hodp.csbycdm = 1.0
    hodp.fac = 1.0

    a = h.hod(cosmo, hodp)  # gsl error "function value is not finite"                                
    #a = h.hod()            # calculates D2gg_num without any problems                                

    kk = 0.1
    z = 0.5
    print( a.D2gg_num( kk, z ) )

and the corresponding error message is:

gsl: brent.c:57: ERROR: function value is not finite
Default GSL error handler invoked.
Aborted (core dumped)

When I run the HOD in the default, it calculates D2gg_num without any problem. Would you know how/where to fix it?

Cheers, Reiko

setup.py not working on our end

Hi,

after cloning the repository, we run the command
python setup.py install --prefix=pwd/install
but we get the following error:
running install
running build
running build_py
file src/cosmology.py (for module cosmology) not found
file src/hod.py (for module hod) not found
file src/cosmology.py (for module cosmology) not found
file src/hod.py (for module hod) not found
running build_ext
building '_cosmology' extension
swigging src/cosmology.i to src/cosmology_wrap.cpp
swig -python -c++ -o src/cosmology_wrap.cpp src/cosmology.i
src/cosmology.h:142: Error: Syntax error in input(3).
error: command 'swig' failed with exit status 1

Not sure whether you have seen this before, any suggestion?

Citation

If I want to reference the aum code in a paper, is there a preferred citation method? Maybe this could be added to the README? I can't find an ASCL link, which would be my usual go to.

Error message trying to run the `Chiofz()` function (AttributeError)

I get an error message trying to run the Chiofz() function:

>>> print a.Chiofz(2.0)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/reiko/2code/aum/install/lib/python2.7/site-packages/cosmology.py", line 364, in <lambda>
    __getattr__ = lambda self, name: _swig_getattr(self, cosmology, name)
  File "/Users/reiko/2code/aum/install/lib/python2.7/site-packages/cosmology.py", line 54, in _swig_getattr
    raise AttributeError(name)
AttributeError: Chiofz

Thanks for your help, Surhud.

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.