Giter Club home page Giter Club logo

classylss's Introduction

Hello there 👋

I am currently a technologist at the Consumer Finance Protection Bureau working to detect and prevent unfair, deceptive, and abusive practices in consumer financial services. I also teach a Python geospatial data science course in the Masters of Urban Spatial Analytics program at the University of Pennsylvania. Prior to working at the CFPB, I was the Finance, Policy, and Data director for the City of Philadelphia's @PhilaController and

I'm a former academic with a Ph.D. in astrophysics from UC Berkeley. I am passionate about data visualization, predictive analytics, and effective communication of complex ideas to a broad audience. I am a strong supporter of transparency in government, open-source software, and the open science framework.

I live in the Wissahickon neighborhood of Philadelphia, PA, with my wife, young daughter, and rescue dog.

classylss's People

Contributors

nickhand avatar rainwoodman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

classylss's Issues

wget not found.

When building on circle-ci for conda-forge, I get a 'wget' not found error.

What about building in a class source code zip file in the source code tarball? Does this violate the copy right of class?

classylss does not read sigma8

If one uses the class command line binary, one can specify the power spectrum amplitude either as:
A_s = 2.215e-9
or as
sigma8 = 0.8607
and class will automatically find the right A_s to match sigma8.

With classylss this does not work: one gets
UserWarning: Class did not read input parameter(s): sigma8

and the output Sigma8/A_s are the defaults.

It would be nice if this did work!

Does not build with python 3.12

numpy.distutils has been removed, see here:
https://numpy.org/doc/stable/reference/distutils_status_migration.html

Simply replacing numpy.distutils with distutils does not quite work:

[spb41]~/codes/classylss% python setup.py install
/usr/lib/python3.12/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
!!

    ********************************************************************************
    Please avoid running ``setup.py`` directly.
    Instead, use pypa/build, pypa/installer or other
    standards-based tools.

    See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
    ********************************************************************************

!!
self.initialize_options()
/usr/lib/python3.12/site-packages/setuptools/_distutils/cmd.py:66: EasyInstallDeprecationWarning: easy_install command is deprecated.
!!

    ********************************************************************************
    Please avoid running ``setup.py`` and ``easy_install``.
    Instead, use pypa/build, pypa/installer or other
    standards-based tools.

    See https://github.com/pypa/setuptools/issues/917 for details.
    ********************************************************************************

!!
self.initialize_options()
error: in 'libraries' option (library 'class'), 'sources' must be present and must be a list of source filenames

Roadmap to turn classylss into a CLASS binding.

Here is what I propose as a roadmap.

  1. Implement pure python classylss.cosmology that can be constructed from Astropy cosmology objects, and yet delegates to CLASS for all function evaluation,

  2. Reimplement a classylss.lss module that contains original functionalities of classylss.legacy, but in pure python, using mcfit.

  3. migrate classylss.cosmology and lss to nbodykit. Now classylss contains only class binding, and nbodykit doesn't contain any compiled code.

  4. Move the original lss routines to a classylss.legacy module. We break all code that uses classylss at this step, such that they can be clearly grepped and switch to nbodykit when necessary.

Suddenly stopped working.

MPITest(commsize=1):test_fftpower ... FlatLambdaCDM(name="Planck15", H0=67.7 km / (Mpc s), Om0=0.307, Tcmb0=2.725 K, Neff=3.05, m_nu=[ 0.    0.    0.06] eV, Ob0=0.0486)


Error in thermodynamics_init 
=>thermodynamics_init(L:301) :error in thermodynamics_helium_from_bbn(ppr,pba,pth);
=>thermodynamics_helium_from_bbn(L:1112) :could not open fA with name /usr/lib64/python2.7/site-packages/classylss/class/bbn/sBBN.dat and mode "r"
ERROR

Update class to 2.8.x

2.8.x of class has moved power spectrum Pk to the non-linear module. We need some non-trivial changes to port there -- just takes some time.
Our local patches applied properly.

from_astropy creates a dictionary of strings.

It creates a dictionary of strings rather than a dictionary of floats -- which looked strange.

I think in nbodykit when we serialize a cosmology we'd like to serialize them as floats.

compilcation error

    compile options: '-Iclassylss/_gcl/include -I/usr/lib64/python2.7/site-packages/numpy/core/include -Ibuild/temp.linux-x86_64-2.7/include -c'
    extra options: '-fopenmp -O2 -std=c++11'
    g++: classylss/_gcl/cpp/PowerSpectrum.cpp
    g++: classylss/_gcl/cpp/ClassParams.cpp
    g++: classylss/_gcl/cpp/Tools.cpp
    g++: classylss/_gcl/cpp/parray.cpp
    g++: classylss/_gcl/cpp/ZeldovichPS.cpp
    g++: classylss/_gcl/cpp/Common.cpp
    classylss/_gcl/cpp/Common.cpp: In function ‘void Common::write(FILE*, const char*, ...)’:
    classylss/_gcl/cpp/Common.cpp:64:25: error: format not a string literal and no format arguments [-Werror=format-security]
         fprintf(stream, dest);
                             ^
    cc1plus: some warnings being treated as errors
    classylss/_gcl/cpp/Common.cpp: In function ‘void Common::write(FILE*, const char*, ...)’:
    classylss/_gcl/cpp/Common.cpp:64:25: error: format not a string literal and no format arguments [-Werror=format-security]
         fprintf(stream, dest);
                             ^
    cc1plus: some warnings being treated as errors
    error: Command "g++ -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -Iclassylss/_gcl/include -I/usr/lib64/python2.7/site-packages/numpy/core/include -Ibuild/temp.linux-x86_64-2.7/include -c classylss/_gcl/cpp/Common.cpp -o build/temp.linux-x86_64-2.7/classylss/_gcl/cpp/Common.o -fopenmp -O2 -std=c++11" failed with exit status 1

    ----------------------------------------
Command "/usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-K8J8zE/classylss/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-pVSOf4-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-K8J8zE/classylss
You are using pip version 7.1.2, however version 8.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

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.