surhudm / aum Goto Github PK
View Code? Open in Web Editor NEWaum
License: GNU General Public License v3.0
aum
License: GNU General Public License v3.0
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.
It might be better to move to the python setup.py installation method rather than GNU autotools. It fails on some platforms.
hod::avmass_tot returns average mass / 1e12, docs should reflect that.
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
The documentation about how to use the hod related functions is sparse.
A number of different functions in the cosmology and hod classes are not properly assigned to public and private components.
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?
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.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.