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

run_compute on disabled dataset uses pblum_method='absolute' #987

Open
kecnry opened this issue Nov 22, 2024 · 0 comments
Open

run_compute on disabled dataset uses pblum_method='absolute' #987

kecnry opened this issue Nov 22, 2024 · 0 comments
Labels

Comments

@kecnry
Copy link
Member

kecnry commented Nov 22, 2024

Running a forward model on a dataset that is disabled by passing dataset to run_compute ignores options for passband luminosity scaling (and possibly other dataset options - check for third light, irradiation, etc) and for passband luminosity scaling defaults to absolute. For more context, see #986

import phoebe
b = phoebe.default_binary()
b.add_dataset('lc', compute_phases=[0.25], dataset='lc01')
b.set_value('pblum_mode', 'absolute')
b.run_compute(model='enabled_absolute')
b.set_value('pblum_mode', 'component-coupled')
b.run_compute(model='enabled_cc')
b.disable_dataset('lc01')
b.run_compute(dataset='lc01', model='disabled_cc')
print(b.filter(qualifier='fluxes', context='model'))
ParameterSet: 3 parameters
R   fluxes@enabled_absolute@model: [8.70985138e+24] W / m2
R         fluxes@enabled_cc@model: [2.00783523] W / m2
R        fluxes@disabled_cc@model: [8.70985138e+24] W / m2

I don’t remember if passing dataset was an intended feature or not. I know that passing times was intended.
So we’ll need to check if it is and:

  • if so: it should still adhere to all dataset parameters (and so match the component-coupled result)
  • if not: passing anything to dataset should probably be caught immediately and raise an error.
@kecnry kecnry added the bug label Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant