Closed J-Liptak closed 3 months ago
I can reproduce the same thing, thanks for noticing this! The distance scaling logic goes through the same code, so I'm guessing the scaling is being handled twice somehow, we'll investigate and try to get this out as a bugfix soon.
import phoebe
b=phoebe.default_binary()
b.add_dataset('lc', compute_phases=phoebe.linspace(0,1,101))
b.add_compute('ellc')
b.set_value_all('ld_mode', 'manual')
b.run_compute(kind='ellc', model='ellc_d1')
b.run_compute(kind='phoebe', model='phoebe_d1')
b.set_value('distance', 2)
b.run_compute(kind='phoebe', model='phoebe_d2')
b.run_compute(kind='ellc', model='ellc_d2')
b.plot(show=True, legend=True)
Update: I tracked this down to the 2.4.2 bugfix release which also added distance handling in b.calculate_pblums(pbflux=True)
. This means that ever since then we have been (incorrectly) accounting for distance twice for compute backends other than phoebe and phoebe legacy. I'll need to think about how this plays with other scaling (dataset-coupling, dataset-scaling, third light, etc), but hopefully the code fix itself should be fairly straightforward.
The fix for this is now in the 2.4.13 bugfix release - thanks again for reporting the bug!
Hi everybody, I was trying to do something akin to SED using ellc backend in Phoebe 2.4.11 It seems that fluxes scale as 1/d^4 instead of 1/d^2. I tried to do as an example sun with a small companion and test for a value of solar constant - code below. To obtain reasonable flux around 1360 W/m^2 I came up with b['distance@system']=np.sqrt(1.5e11/np.sqrt(3.14)) and that seems to work. Do you have an idea what is going on?
Using phoebe backend gives correct values.
Thanks a lot, Jozef Liptak
=====================================================================