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

Negative source flux in FitData.scale_fluxes() and model plotting in example 16 #81

Open
rpoleski opened this issue Feb 24, 2023 · 0 comments
Assignees

Comments

@rpoleski
Copy link
Owner

rpoleski commented Feb 24, 2023

The function _get_ylim_for_best_model_plot() has a condition y_err < 0., but y_err there is scaled flux uncertainty. I think it can be negative only if either data_source_flux or source_flux in FitData.scale_fluxes() is negative. In that case we should probably:

  • add a warning in FitData.scale_fluxes() for negative output of flux uncertainty (because users don't expect that),
  • add a check in UlensModelFit._get_ylim_for_best_model_plot(): if np.sum(mask) == 0: continue; also handle above warning properly.
    Jen - can you do the first change?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants