Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

uncertainties_from_distribution_collection() UnitConversionError for requiv #690

Open
jackieblaum opened this issue Feb 7, 2023 · 4 comments · Fixed by #894
Open

uncertainties_from_distribution_collection() UnitConversionError for requiv #690

jackieblaum opened this issue Feb 7, 2023 · 4 comments · Fixed by #894
Assignees
Labels

Comments

@jackieblaum
Copy link

Running this line of code to get uncertainties from my posteriors
b.uncertainties_from_distribution_collection(distribution='emcee_posteriors', parameters=['requiv@secondary'], sigma=3, tex=True)
results in the following error:
UnitConversionError: 'solRad2' (area) and 'solRad' (length) are not convertible
This function works for all my fit parameters as well as for individual masses and effective temperatures but results in the same error for either stellar radius.

@kecnry kecnry added the bug label Feb 7, 2023
@kecnry
Copy link
Member

kecnry commented Feb 7, 2023

Just to help us reproduce - what parameters are you sampling over (what do you have set for fit_parameters)? And what are your versions of phoebe and astropy?

@jackieblaum
Copy link
Author

Thanks so much for your quick reply!
fit_parameters=['teffratio', 'requivfrac@primary', 'incl@binary', 'q', 'asini@binary', 'teff@primary', 'requivfrac@secondary', 't0_supconj']
phoebe version: 2.4.3
astropy version: 5.1

@kecnry kecnry self-assigned this Mar 7, 2023
@jackieblaum
Copy link
Author

Hi! A bit more related information on this bug - it appears that requivfrac has units of solar radii rather than being unitless.

@kecnry
Copy link
Member

kecnry commented May 31, 2023

ok, that's useful! Sorry this is taking us a while to get around to - we're preparing for the upcoming workshop and trying to fix a few science-related bugs, but this is still on my list. Can you get around this for now by fitting for radii directly or is this blocking you from being able to fit your system?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants