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

Temperature Issues in MCMC Calculation #804

Open
mzb123 opened this issue Dec 3, 2023 · 2 comments
Open

Temperature Issues in MCMC Calculation #804

mzb123 opened this issue Dec 3, 2023 · 2 comments

Comments

@mzb123
Copy link

mzb123 commented Dec 3, 2023

In my model, I have fixed the temperature of the primary star at 6125 K, while iterating over the temperature ratio parameter teffratio .

I have successfully run the MCMC calculation, but I encountered issues when attempting to extract the temperature of the secondary star. When running the following code, the secondary star temperature and teffratio obtained are comparable. This presents itself as an error. Could you provide guidance on resolving this issue?

The attachment includes my bundle file. OO Leo-LC9-fixed-spot on primary.zip

b.uncertainties_from_distribution_collection(solution='emcee_sol', parameters=['teff@secondary'], tex=True)

@mzb123
Copy link
Author

mzb123 commented Dec 4, 2023

b.get_parameter('teff', component='secondary', context='component').get_distribution('emcee_sol')
Out:<distl.composite {teffratio@binary} * <distl.delta loc=1.0611573111573112 unit=> unit=>
Does this mean just doing the panning?

@kecnry
Copy link
Member

kecnry commented Dec 4, 2023

Thanks for reporting this and attaching the file - I do think this appears to be a bug, I'm guessing with the way the units are handled when propagating the constraints, but that will take a little more investigation before we can fix the bug. In the meantime, you can get the expected result by sampling manually from the teffratio distribution and multiplying by the (fixed) primary temperature to get a distribution for the secondary temperature.

import phoebe

b = phoebe.open('OO Leo-LC9-fixed-spot on primary.bundle')
b.plot_distribution_collection('emcee_sol', parameters=['teffratio', 'teff@secondary', 'teff@primary'], show=True)
image
>>> print(b.filter(qualifier='teff'))

ParameterSet: 3 parameters
           teff@primary@component: 6125.0 K
C        teff@secondary@component: 6390.493770110515 K
                  teff@constraint: {teffratio@binary@component} * {teff@primary@component}

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

No branches or pull requests

2 participants