Skip to content
New issue

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

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

Already on GitHub? # to your account

Issue computing prior weights using Munari grid #170

Open
meredith-durbin opened this issue Feb 6, 2018 · 6 comments
Open

Issue computing prior weights using Munari grid #170

meredith-durbin opened this issue Feb 6, 2018 · 6 comments

Comments

@meredith-durbin
Copy link
Contributor

I get an unexpected error while trying to build the physics model using Munari stellar atmospheres. It appears as though there is a complex number somewhere that scipy can't handle. This occurs about halfway through computing the age-mass-metallicity prior weights (i.e., it will run just fine for the first several metallicities, and then this error occurs). I'm using the grid file from https://cass.ucsd.edu/~lcj/beast/.

Any advice would be appreciated!

Traceback (most recent call last):
  File "run_beast.py", line 98, in <module>
    g_spec)
  File "/astro/store/gradscratch/tmp/mdurbin/beast_sandbox/e1_f2_munari/beast/physicsmodel/model_grid.py", line 204, in add_stellar_priors
    compute_age_mass_metallicity_weights(specgrid.grid, **kwargs)
  File "/astro/store/gradscratch/tmp/mdurbin/beast_sandbox/e1_f2_munari/beast/physicsmodel/grid_and_prior_weights.py", line 78, in compute_age_mass_metallicity_weights
    mass_prior_weights = compute_mass_prior_weights(cur_masses)
  File "/astro/store/gradscratch/tmp/mdurbin/beast_sandbox/e1_f2_munari/beast/physicsmodel/prior_weights.py", line 111, in compute_mass_prior_weights
    mass_bounds[i+1]))[0]
  File "/astro/apps6/opt/anaconda/envs/py3/lib/python3.5/site-packages/scipy/integrate/quadpack.py", line 323, in quad
    points)
  File "/astro/apps6/opt/anaconda/envs/py3/lib/python3.5/site-packages/scipy/integrate/quadpack.py", line 388, in _quad
    return _quadpack._qagse(func,a,b,args,full_output,epsabs,epsrel,limit)
TypeError: can't convert complex to float
@karllark
Copy link
Member

karllark commented Feb 6, 2018

I have not used these stellar atmospheres. But maybe it is not just the stellar atmospheres, but also the stellar evolutionary model used (isochrones). At least that would be my guess given the issue seems to be with the masses that should originate in the isochrones. No idea how a complex number got in there.

@karllark karllark added the bug label Feb 6, 2018
@lcjohnso
Copy link
Member

lcjohnso commented Feb 6, 2018

Huh. I have not made any use of this spectral library after assembling the file, so likely there's something in the atmosphere file that isn't right. I'll take a look, but would advise using an alternate library for the time being.

@karllark
Copy link
Member

Please try this again and see if it works with the latest version of the BEAST. May have been fixed by pull request #172.

@lcjohnso
Copy link
Member

lcjohnso commented Jun 1, 2018

Please note: the fluxes in the previous version of the Munari library file were low by a factor of pi. Be sure to download the updated library file (available at UCSD link above) before using.

@karllark
Copy link
Member

karllark commented May 3, 2019

@lcjohnso : is this fixed now? Can I close this issue?

@karllark karllark added this to the BEAST v2.0 milestone May 3, 2019
@karllark
Copy link
Member

Ping

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

3 participants