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

free_params option in lightcurve config does not work as expected? #613

Open
aaguasca opened this issue Oct 21, 2024 · 0 comments
Open

free_params option in lightcurve config does not work as expected? #613

aaguasca opened this issue Oct 21, 2024 · 0 comments

Comments

@aaguasca
Copy link

Describe the bug
It seems that when computing the lightcurve, the "norm" and "shape" of the source of interest will always be free (for niter == 0) if the source has a ts > shape_ts_threshold even if the option free_params is specified, for example, with only one parameter of the shape.

Expected behavior
I would expect inside the conditional something like:

        if niter == 0:
            gta.free_sources_by_name(free_sources_norm, pars='norm')
            gta.free_sources_by_name(free_sources_shape, pars='shape')
            if free_params:
                gta.free_source(name, False)
                gta.free_source(name, True, pars='norm')
                gta.free_source(name, True, pars=free_params)

Also, I would add in the description of the option free_paramssomething like "if the TS of the source is above shape_ts_threshold"

Additional context
The option free_params in lightcurve is meant to set the parameters of the source of interest that will be re-fit in each time bin. If this list is empty then all parameters will be freed.

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