Draft: Add Phase-Resolved Analysis Tutorial and Tools.#497
Draft
KoothodilAbhijithAugustine wants to merge 1 commit intocositools:developfrom
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Resolves #395 and #413
This draft PR introduces a complete tutorial and a set of supporting Python tools for performing phase-resolved pulsar analysis within the
cosipyframework.Currently, the workflow demonstrates how to process Data Challenge 2 (DC2) FITS data for the Crab pulsar and its corresponding albedo background. The end goal of this pipeline is to prepare isolated on-pulse and off-pulse FITS files that are ready for downstream COSI Spectral Fitting.
Key Additions
example_notebook.ipynb): A step-by-step Jupyter Notebook guiding users through combining unbinned data, slicing by Mission Elapsed Time (MET), assigning phases, plotting the pulse profile, and selecting phase intervals.phase_assigner.py: A new module that reads a pulsar ephemeris file (e.g.,crab.par) and calculates/appends the exact rotational phase to individual photon events in a FITS file.plot_pulse_profile.py: A plotting utility to generate and visualize the folded light curve/pulse profile from the phase-assigned data.phase_selector.py: A filtering tool to extract specific phase windows (e.g., on-pulse and off-pulse regions) and save them as new FITS files.