Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong definiftion of omega_m = Omega_m*h^2 in classy.pyx? #102

Open
borisbolliet opened this issue May 15, 2016 · 0 comments
Open

Wrong definiftion of omega_m = Omega_m*h^2 in classy.pyx? #102

borisbolliet opened this issue May 15, 2016 · 0 comments

Comments

@borisbolliet
Copy link

Hi,
I think there is a typo at line 1217 of classy.pyx (master branch):

elif name == 'omega_m': value = (self.ba.Omega0_b + self.ba.Omega0_cdm+ self.ba.Omega0_ncdm_tot + self.ba.Omega0_dcdm)/self.ba.h**2

should be:

elif name == 'omega_m': value = (self.ba.Omega0_b + self.ba.Omega0_cdm+ self.ba.Omega0_ncdm_tot + self.ba.Omega0_dcdm)*self.ba.h**2

Indeed, if I am right, omega = Omega *h^2 and not Omega/h^2.

Kind regards,

Boris

@borisbolliet borisbolliet changed the title Wrong definiftion of omega_m = Omega_m*h^2 in classy.pyx ? Wrong definiftion of omega_m = Omega_m*h^2 in classy.pyx? May 15, 2016
lesgourg added a commit that referenced this issue Feb 17, 2025
…l directories (as well as a minor bugfix in tools/arrays.c) (#208)

This commit combines a number of previous commits performed by @lesgourg and @schoeneberg, but in a way that keeps the git history clean and pristine. In particular, the commits included here include (but aren't limited to):

 - schoeneberg (11 April 2022): 7440e659d42c14302491dba56ef58b09461c36f3
   Moved Halofit and HMcode to external module

 - schoeneberg (11 April 2022): 8ea79ac2b072af6e95828c078e784d69020c0b86
   Initial HMcode 2020 implementation

 - schoeneberg (a few commits): 9e981c8c7efeb22186ec48c2fac1c259efd83216, f5a8bb6af8804fa08784e35ab1fad7c02965120d, 1184318eb0ab4f1939e86300f13c317f4a74d2a3, 381750969cf47659341598e793f9954802b89184
   MOSTLY BUGFIXES::
   Correcting some compilation issues,
   Fixed HMcode dark energy correction being incorrect,
   Re-implementation of #113 fixing #102,
   Missing change to last commit about negative dimensions

 - schoeneberg (26 April 2023): 7cf4d3e1cfa6a21fc1f63b599717b16ab76e6080
   Removed hmcode functionality from the python wrapper

 - schoeneberg (27 April 2023): 337b87092fa704861ce83711a2febd9c61e76267, 8e9b960c3c9e3ceade9bf16ba306cebc4b34ef45
   Merge branch 'devel' into class_nonlinear, Missing additions after merge

 - Sefa76, santiagocasas (12 Jul 2023): b48acf542192318008ad3228517e8be654d54d86, 2078711c61a7e235b9941a10597c14e19766f391
   Added funktion to get f_cb from Classy, underscore

 - lsgourg (18 Jan 2024): 247088a
   fixed bug in setup.py

 - lesgourg (14 Feb 2024): 539ea2d1c2d6faed8490aede797a8bff4423da18
   updated explanatory.ini with new HMcode 2020 parameters; made input more consistent for these parameters

 - lesgourg (20 Feb 2024): 59b663250189541c660c4b93e886af960e369b14
   Merge devel up to v3.2.2 into class_nonlinear

 - lesgourg (22 May 2024): c48f4e638a3b191d58078c60027cccb68c7a86b4
   added comments. Moved declaration of fourier_hmcode.c to hmcode.h

 - lesgourg (3-4 Dec 2024): d301d63fc8640eed55f619b467c1176327e3e7f0, 92570f9f5a1e1b113689f9769e6fd1c42c3a17ab, 15c8557a1e852ee4bcc4f54ed13b0470510c44e7, 6ec9833a91ee5da6d97ed05d803e8f84d5c100ba, 7b627101db46c703a0bca23be5587c4b1a235a9c, dd74b486e4baa48aa0547cc0e6bc02ee65130f72, a8e89b57154880dafba939b8f8d44ea4f8de769b, 18f46f30eb2e799ce227ecbab123c229365e5c74, eb8d891230c3273aa703cfa957ff9ea20e4d77cc, c511c5060b389350c8b332ba094e1ae4cb1ba08f
   MOSTLY MERGES::
   Merge tag 'v3.2.3' into class_nonlinear,
   class_nonlinear working with v3.2.3 (parallelised, tested),
   Merge tag 'v3.2.4' into class_nonlinear,
   class_nonlinear working with v3.2.4 (tested; hmcode functions removed from classy just like in previous class_nonlinear, because these functions are defined in external and not in fourier),
   Merge tag 'v3.2.5' into class_nonlinear,
   fourier_workspace moved and renamed hmcode_workspace,
   all hmcode structures and functions renamed hmcode_,
   polished presentation of all hmcode functions,
   renamed halofit function halofit_ instead of fourier_halofit_,
   final polish on hmcode

 - lesgourg (4-17 Dec 2024): 2028ae5ca8b982fac2d975c0da4e325ae7d5e195, 4d90890f7b19264b9f8391f4efbffe1fdd2b8ee2, 479aaca8597d0c13f744810ef737fb57c8a44312, 4e1b6a324ec29487ce19adb1a5e7dee1b38c56bd, 4dd1c3c611fd6573302519d9373a05c6a15a23a8
   MOSTLY DEWIGGLE/ANALYTIC DEWIGGLE::
   prepared things to have pk_l_nw computed inside fourier module
   dewiggled spectrum now computed and stored in fourier module, using the method of HMcode but the structures of Oneloop. TODO: check that it agrees with other HMcode implementation and if yes, switch from one to the other (the old one is still the one used by HMcode)
   analytic pk now computed and stored in fourier structure in fourier_init. TODO: use this single calculation inside Hmcode
   P_analytic computed, stored and splined in fourier_init(). Wiggle and nowiggle spectra computed twice, at different times: in fourier for storage, and in HMcode for internal use; both calculations use with the same functions and avoid redundancy.
   small renamings, comemnts and one bugfix in fourier.c

 - lesgourg (17 Dec 2024): 4bc577b87a0815ccc64eaca8a2b0c9c505cee52f
   Merge branch 'devel' into class_nonlinear

 - lesgourg (18 Dec 2024): a8df4a6c79a443e184b36e2e665906b9064aee67, 5a4d11d8a51044fcbfa02bcd1df3d6d4e081622f
   corrected one sign in array_integrate_spline_table_line_to_line(), only tiny impact for thermodynamics
   corrected the mistake in the formula for spline integration everywhere in arrays.c

 - lesgourg (7,14 Jan 2025): 6ea2e911f970df686fe950cc48e2841fe2a5b872, 5ee599786cf0b72176a19cbeed81731e90011a20
   MOSTLY DEWIGGLE::
   Einsenstein_Hu now normalised, with no impact on smoothing; pk_analytic_nowiggle can be requested with flag mPk_an_nw, written in out put fiels, accessible in classy through pk_analytic_nw(k)
   analytic and numerical nowiggle spectra can now be outputed independently of using Hmcode with the input flags analytic_nowiggle=yes, numerical_nowiggle=yes

 - lesgourg (14 Jan 2025): ac8a02c1ccd96eee497dee13e060e6edc1bdd731
   version number updated to 3.3.0

 - lesgourg (14-15 Jan 2025): d18033422759152e9f82785d9e2ec10ca26c3f6c, b9351585fea3b93f20ffc9cfe3a32eba1904e808, fe7eed6f76225238c92f76b305865d263c3ed712, 73703f9b7791729e0d54fbc4723efb7c9fe4a03f
   MOSTLY BUGFIXES::
   small correction in input.c,
   corrected small comments,
   corrected small bug in fourier.c leading to rare segfaults,
   suppressed tiny memory leak

 - schoeneberg (30 Jan 2025): 65f57f490d967f20fbdfea92fc76b12eabd81422, a2b246f43529f8d1ecb00b068d97d7ee6984f6c3, 62190a978ecb74d5c139d685a70373e54d13ee5f, 55b8fb71644497fffaebf69bde76a2c7cd293b59, 159051e24d3b2c6085eb13cdba2297c5b8b9938a, 3947a904b13b938d4c57e19db4588144fa72f33a
   MOSTLY CLEANING::
   Simplified parameter reading for HMcode by using the class_read_flag macros,
   Spring cleanup: removing unnecessary flat setting in input, simplifying a few lines in output,
   Just whitespace and typo corrections,
   The spline gets atutomatically turned into _SPLINE_NATURAL_ (which works for 2 points) if only 2 points are included. So no need to worry about this line,
   Further spring cleaning,
   Further spring cleaning

Co-authored-by: schoeneberg <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant