Giter Site home page Giter Site logo

chomp's People

Contributors

mdschneider avatar morriscb avatar

Watchers

 avatar  avatar

chomp's Issues

Issues with Mandelbaum and Kravtsov HOD

What steps will reproduce the problem?

hod_dict = {"log_M_0":12.14, "w":     2}
sdss_hod = hod.HODMandelbaum(hod_dict)

What do you see instead?

Traceback (most recent call last):
  File "../cosmosis-standard-library/chomp-9f8ce3c88c6d/examples/example_halo_model.py", line 77, in <module>
    sdss_hod = hod.HODMandelbaum(hod_dict)
  File "/Users/vinu/software/cosmosis/cosmosis-standard-library/chomp-9f8ce3c88c6d/hod.py", line 301, in __init__
    HOD.__init__(self)
TypeError: __init__() takes exactly 2 arguments (1 given)

What version of the product are you using? On what operating system?
Latest version



Original issue reported on code.google.com by vvinuv on 19 Jun 2014 at 10:45

Issue with dndm in mass_function

The code doesn't properly reflect redshift dependance in dndm within 
mass_function.py, High mass halos have higher values of dndm at higher 
redshifts than lower redshifts according to this code. This is not correct.

See the below code: 

sample = numpy.logspace(11,16,10)
z = 0.5
cosmo = cosmology.SingleEpoch(redshift=z, cosmo_dict=cosmo_dict, with_bao=False)
cosmo_0 = cosmology.SingleEpoch(redshift=0, cosmo_dict=cosmo_dict, 
with_bao=False)
halo = mass_function.MassFunction(redshift=z, cosmo_single_epoch=cosmo, 
halo_dict=halo_dict)
halo_0 = mass_function.MassFunction(redshift=0, cosmo_single_epoch=cosmo_0, 
halo_dict=halo_dict)
#def main(z, Mass, halo_dict=halo_dict, cosmo_dict = cosmo_dict):
for i in sample:
     print i, halo.dndm(i), halo_0.dndm(i)

output: (mass, redshift_0.5, redshift_0)

100000000000.0 8.61351149916e-13 2.65752396915e-13
359381366380.0 7.58494039016e-14 2.38364618837e-14
1.29154966501e+12 6.59518658828e-15 2.11901506138e-15
4.64158883361e+12 5.57429763919e-16 1.83674899106e-16
1.6681005372e+13 4.44080639285e-17 1.50020001669e-17
5.99484250319e+13 3.12979437432e-18 1.06969035187e-18
2.15443469003e+14 1.70217578332e-19 5.59243701388e-20
7.74263682681e+14 5.23716718975e-21 1.40256900589e-21
2.78255940221e+15 4.30629561401e-23 5.63030877376e-24
1e+16 1.35395518901e-26 1.67545857554e-28
benh:chomp-650b1f5371a3 benjaminhorowitz$ python MF_test.py 
100000000000.0 8.61351149916e-13 2.65752396915e-13
359381366380.0 7.58494039016e-14 2.38364618837e-14
1.29154966501e+12 6.59518658828e-15 2.11901506138e-15
4.64158883361e+12 5.57429763919e-16 1.83674899106e-16
1.6681005372e+13 4.44080639285e-17 1.50020001669e-17
5.99484250319e+13 3.12979437432e-18 1.06969035187e-18
2.15443469003e+14 1.70217578332e-19 5.59243701388e-20
7.74263682681e+14 5.23716718975e-21 1.40256900589e-21
2.78255940221e+15 4.30629561401e-23 5.63030877376e-24
1e+16 1.35395518901e-26 1.67545857554e-28


Original issue reported on code.google.com by [email protected] on 27 Jun 2014 at 10:18

cosmology.MultiEpoch.comoving_distance has O(1e-7) interpolation errors with default settings

What steps will reproduce the problem?

import defaults
import cosmology

cosmo1 = cosmology.MultiEpoch(z_min=0, z_max=5, 
cosmo_dict=defaults.default_cosmo_dict)
d1 = cosmo1.comoving_distance(0.2)
print "d(z=1): {}".format(d1)

defaults.default_precision["cosmo_npoints"] = 500
cosmo2 = cosmology.MultiEpoch(z_min=0, z_max=5, 
cosmo_dict=defaults.default_cosmo_dict)
d2 = cosmo2.comoving_distance(0.2)
print "d(z=1): {}".format(d2)

print "Fractional error: {}".format((d1 - d2) / d2)

Proposed solution: Change defaults.default_precision["cosmo_npoints"] to a 
larger number (e.g., 500). This is a slower initialization for cosmology 
objects, but should help users get the expected precision 
(defaults.default_precision["cosmo_precision"] is set to 1.48e-8). 



Original issue reported on code.google.com by [email protected] on 1 Jan 2015 at 8:31

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.