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

AttributeError: 'FormatParams' object has no attribute 'per' #29

Open
sebastian-zieba opened this issue Feb 26, 2024 · 0 comments
Open

Comments

@sebastian-zieba
Copy link
Owner

When not fitting for period (per) and transit midtime (t0), the plotting in s30 will fail raising the following error:

t_hr = phase_hr * p.per[0] + p.t0[0] + data.toffset
AttributeError: 'FormatParams' object has no attribute 'per'

I should replace that with the following:

try:
    t_hr = phase_hr * p.per[0] + p.t0[0] + data.toffset
except AttributeError:
    # Set a custom value for 'per' attribute
    per_custom = [per_custom_value]
    t0_custom = [t0_custom_value]
    t_hr = phase_hr * per_custom[0] + t0_custom[0] + data.toffset

the per_custom_value and t0_custom_value should come for the fit_par file, as these values were set by the user and are set to be fixed if they are not free parameters.

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

1 participant