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

Add recipe for simulating synthetic lightcurves and fitting the PSD of an observed curve. #29

Merged
merged 15 commits into from
Aug 30, 2024

Conversation

cgalelli
Copy link
Contributor

This PR adds a recipe which implements some functions to generate synthetic lightcurves, nominally:

  • the TK95 algorithm that will be added in the main gammapy code with 1.3
  • the more complex EMM algorithm

It also adds the function to create envelopes of the periodogram for a lightcurve, and a fitting function for the PSD of an observed curve. These function can also be found in the small package gammapy_SyLC that will probably be adapted to be used here in the future, once problems with installation are resolved.

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@bkhelifi
Copy link
Member

Thanks a lot @cgalelli ...
@registerrier, should we precise in some headers the author, the date and the used Gammapy version?

@bkhelifi bkhelifi added the documentation Improvements or additions to documentation label Aug 23, 2024
Copy link
Contributor

@registerrier registerrier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @cgalelli . This looks good to me. It would be simpler if some of the code could be imported for SyLC indeed. We can keep that for later though.

@registerrier
Copy link
Contributor

Thanks a lot @cgalelli ... @registerrier, should we precise in some headers the author, the date and the used Gammapy version?

The gammapy version is defined in the env.yml. Maybe a print(gammapy.version) would be sufficient.

Regarding names, we have not done it yet, but we could/should. What would be the proposal for that? How does additional changes (maintenance, upgrades) is taken into account?

@cgalelli
Copy link
Contributor Author

I finally could solve the problem with the import of gammapy_SyLC so the new version has everything implemented as a package function. Changed the text accordingly. Also added the author line at the end.

Copy link
Contributor

@registerrier registerrier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @cgalelli . There seems to be a problem with the notebook. It is not recognized as such in the CI. Could you check if there is a problem? Is the very long name a good idea?

@cgalelli
Copy link
Contributor Author

Thanks @registerrier , indeed i had made a bit of a mess in the restructuring of the notebook. Now it should be fine. I had also used an old local name for the notebook that was quite long and cumbersome - returned to the name I had in the first commit.

The CI I think will still fail due to the import of gammapy_SyLC

@cgalelli
Copy link
Contributor Author

Apparently it does not: i am trying to find an alternative way of installing the package in the environment file.

@registerrier registerrier merged commit 8df68e3 into gammapy:master Aug 30, 2024
1 check passed
@cgalelli cgalelli deleted the fit_psd branch August 30, 2024 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants