kartheikiyer / dense_basis Goto Github PK
View Code? Open in Web Editor NEWDense Basis SED fitting
License: MIT License
Dense Basis SED fitting
License: MIT License
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'
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!
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'
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.
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:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.