Giter Site home page Giter Site logo

kartheikiyer / dense_basis Goto Github PK

View Code? Open in Web Editor NEW
20.0 3.0 7.0 237.14 MB

Dense Basis SED fitting

License: MIT License

Python 4.40% Jupyter Notebook 94.54% ReScript 1.06%
sed-fitting galaxy-evolution star-formation-history data-compression

dense_basis's People

Contributors

kartheikiyer avatar kmlgould avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

dense_basis's Issues

about AttributeError: 'NoneType' object has no attribute 'params'

Hi Kartheik,

Thank you very much for sharing this code. I am trying to learn how to use it follow the example here: https://dense-basis.readthedocs.io/en/latest/tutorials/getting_started.html, and got stuck in this step:

fname = 'test_atlas'
N_pregrid = 1000
priors.Nparam = 3
db.generate_atlas(N_pregrid = N_pregrid,priors = priors, fname = fname, store=True,filter_list = filter_list, filt_dir = filt_dir)

Here are the message I got. Could you help me about this issue?


AttributeError Traceback (most recent call last)
in ()
4
5 db.generate_atlas(N_pregrid = N_pregrid,priors = priors,fname = fname,
----> 6 store=True,filter_list = filter_list, filt_dir = filt_dir)
7

~/anaconda3/lib/python3.6/site-packages/dense_basis-0.1.4-py3.6.egg/dense_basis/pre_grid.py in generate_atlas(N_pregrid, priors, initial_seed, store, filter_list, filt_dir, norm_method, z_step, sp, cosmology, fname, path)
302 Nparam = priors.Nparam
303 rand_sfh_tuple, rand_Z, rand_Av, rand_z = priors.sample_all_params_safesSFR(random_seed = initial_seed)
--> 304 _, lam = make_spec(rand_sfh_tuple, rand_Z, rand_Av, rand_z, igmval = True, return_lam = True, sp = mocksp, cosmology = cosmo)
305
306 fc_zgrid = np.arange(priors.z_min-z_step, priors.z_max+z_step, z_step)

~/anaconda3/lib/python3.6/site-packages/dense_basis-0.1.4-py3.6.egg/dense_basis/pre_grid.py in make_spec(sfh_tuple, metval, dustval, zval, igmval, return_lam, return_ms, sp, cosmology)
66 """
67
---> 68 sp.params['add_igm_absorption'] = igmval
69 sp.params['zred'] = zval
70 sfh, timeax = tuple_to_sfh(sfh_tuple, zval = zval)

AttributeError: 'NoneType' object has no attribute 'params'

Insufficient requirements

requirements.txt file or install_requires statement in setup.py does not seem to include all packages that are called when importing dense_basis. This results in having to manually install dependent packages one by one when importing dense_basis in Python. Having complete requirements correctly documented/packaged on PyPI would greatly help users. Thanks!

Missing 'make_spec' in dense_basis

In Dense_Basis_Standalone.ipynb, I hit a traceback at
_, sfr_true, mstar_true = db.make_spec(rand_sfh_tuple, rand_Z, rand_Av, rand_z, return_ms = True)

module 'dense_basis' has no attribute 'make_spec'

Installation - python requiremement

Dependences page on rtd says that code is written in Python 3.7, but running the installation with that version of Python fails at scipy RuntimeError: Python version >= 3.8 required..

Running the installation in Python 3.8 works.

Versions of site-packages needed to install fsps + dense basis

Hi!

Just to make note of it here for future reference/others as of 11/17/22!

For a conda environment running python 3.8, I updated the following site-packages in order to run fsps and dense basis correctly:

  1. numpy -- 1.23.1
  2. scipy -- 1.9.1
  3. astropy -- 5.1

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.