• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

LSSTDESC / CLMM / 2039
100%

Build:
DEFAULT BRANCH: master
Ran 30 Sep 2020 01:34PM UTC
Jobs 1
Files 18
Run time 2s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
2039

push

travis-ci

web-flow
Issue/282/modeling structure (#299)

* New modeling backend structure (issue #282).

Changes
-------

All backend related code is in the modbackend directory. The main controlling
file is modeling.py, it decides which backend to load depending on the models
availability and the evironment variable CLMM_MODELING_BACKEND value:

- 'ct', or if it is unset, chooses cluster_toolkit + astropy;
- 'nc' chooses NumCosmo backend;
- 'ccl' chooses CCL backend (incomplete);

Both NumCosmo and CCL implement the abstract class CLMModeling
(clmm_modeling.py). This class holds the documentation for all implementations
(TODO) as well as all other details like units, little-h, etc. We also need to agree
on the names and arguments of the methods.

In addition I added a thin layer on top of the OO implementation called
func_layer.py. It mimics the current implementation based on cluster_toolkit.
Thus, all the other implementations will have the same behavior.

The pytest already works with all backends (CCL is currently removed from the
tests), it uses a module scoped fixture to control which backend to use.
Any code can try a different backend by calling
`os.environ['CLMM_MODELING_BACKEND'] = 'nc'`
**before** importing clmm.

In my opinion the ideal is to migrate to a OO interface (like the one in
NumCosmo and CCL), this can be done by instantiating the NumCosmo or
CCL implementation of CLMModel class instead of using the functional layer.

Other points:
-------------

- Increased a bit the tolerance value required in the distance comparison
  (1.0e-8 =>1.2e-8), CCL does not match with NumCosmo and Astropy at
  1.0e-8 level.
- The cosmology is still defined by a simple dictionary. We have to decide
  how to represent cosmology in a backend independent way.
- CCL and NumCosmo/cluster_toolkit do not agree already in the 3d
  density comparison. It does not differ only by an overall factor, I tried
  fixing that but the difference i... (continued)

523 of 523 new or added lines in 9 files covered. (100.0%)

776 of 901 relevant lines covered (86.13%)

0.86 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
100.0
clmm/modbackend/cluster_toolkit.py
3
100.0
clmm/modbackend/ccl.py
11
100.0
clmm/modbackend/clmm_modeling.py
14
100.0
clmm/modeling.py
16
100.0
clmm/modbackend/numcosmo.py
Jobs
ID Job ID Ran Files Coverage
1 2039.1 30 Sep 2020 01:34PM UTC 0
86.13
Travis Job 2039.1
Source Files on build 2039
  • Tree
  • List 18
  • Changed 2
  • Source Changed 2
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Travis Build #2039
  • 0c4318cf on github
  • Prev Build on master (#2014)
  • Next Build on master (#2046)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc