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

Third light problems with component-coupled luminosities #771

Open
J-Liptak opened this issue Aug 2, 2023 · 2 comments
Open

Third light problems with component-coupled luminosities #771

J-Liptak opened this issue Aug 2, 2023 · 2 comments

Comments

@J-Liptak
Copy link

J-Liptak commented Aug 2, 2023

Hello all,
For one of the systems I'm dealing with light contamination in LC,
so I was trying to use a third light implementation.
I found something weird - using pblum-mode dataset-scaled (I am imputing LC normalized on out of eclipse flux),
when using l3-mode fluxes, my primary eclipse minima goes shallower linearly with l3,
and for l3>1 instead of going down it goes up!
Something like New depth=Old depth*(1-l3)

When using l3-mode frac, the minimum quickly shallows and then slowly tapers to nothingness.
By eye, it looks like a part of a 1/x function.

This is happening using both phoebe and ellc backend,
but not if I use component-coupled pblums - then it's like the examples.

Therefore I think the problem is somewhere in-between third light and luminosity scaling implementation.
Minimal working example code attached bellow. I use Phoebe 2.4.11

import phoebe
from phoebe import u # units
import numpy as np

logger = phoebe.logger()

b = phoebe.default_binary()
b.add_dataset('lc', compute_phases=phoebe.linspace(0,1,101))
b.run_compute(irrad_method='none')

times = b.get_value('times', context='model')
fluxes = b.get_value('fluxes', context='model')/2 + np.random.normal(size=times.shape) * 0.005

b = phoebe.default_binary()
b.add_dataset('lc', times=times, fluxes=fluxes, sigmas=np.full_like(fluxes, fill_value=0.005))

b.set_value_all('pblum_mode', 'dataset-scaled')
#b.set_value_all('pblum_mode', 'component-coupled')
b.set_value('l3_mode', 'flux')
b.set_value_all(qualifier='ld_mode', value='lookup')
#b.set_value('l3_frac', 0.0)
b.set_value('l3', 1.4)
b.run_compute(model='with_l3', compute='phoebe01', #computing using ellc si doing the same
               overwrite=True)

afig, mplfig  = b.plot( x='phases', #y='residuals', 
                            #linestyle={'init': 'dashed'},
                            marker={'dataset': ','}, show=True)
@kecnry
Copy link
Member

kecnry commented Aug 2, 2023

Thanks for the report - we have seen a similar report to this a while back, so this is already on our radar but has been difficult to track down and fix all cases, so I'm hoping having more concrete examples to test against will help. In what combinations of pblum_mode and l3_mode are you seeing incorrect behavior (I see you have one of each of those lines commented out in your scripts above)?

@J-Liptak
Copy link
Author

J-Liptak commented Aug 2, 2023

The troublesome is the case of dataset-scaled pblum mode,
for l3 flux mode it can change eclipse into a brightening (for l3>1)
for l3 frac mode it changes quite quickly and than saturates like 1/x

Maybe they are somehow switched in the conversion?
It could maybe explain the discrepancy.
(Once again, for the l3 it needs to be just >0, l3_frac needs to be between 0-1)

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