RECIPES RECIPES WHAT KIND OF RECIPES? :)
Exploring Light Curve Plotting in Stingray.jl: Recipes and Examples:
In my continued work with Stingray.jl, so hello everyone, let's learns about plotting my favorite topic:)
Light curves are essential in high-energy astrophysics, as they represent the brightness of an astronomical object as a function of time. Precise visualization and filtering of these curves help astronomers perform accurate timing analysis, detect variability, and identify astrophysical phenomena.
This post demonstrates how to generate and customize light curve plots using Stingray.jl, leveraging real NICER datasets.
Dataset and Setup:
For this demonstration, I used a dataset from NICER-HESRAC-CL.EVT. The first step is to load the event data into an EventList
object:
Output:
Basic Light Curve Plotting
The simplest way to visualize the event list is:
Output:
Energy Filtering
To restrict the light curve to specific energy ranges, use energy_filter
:
Output:
Time Range Filtering
For a specific time interval, provide tstart
and tstop
:
Output:
Axis Limits and GTI/BTI Visualization
You can highlight Good Time Intervals (GTIs) and Bad Time Intervals (BTIs):
Adjust transparency with gti_alpha
and bti_alpha
:
Output:
You can also plot using a custom GTI matrix or file:
Rebinning Light Curves
Rebinning improves visualization and helps in reducing noise:
Output:
Adding Poisson Errors
Output:
Now with monal_testA :
Gaussian Confidence Bands:[this one is just for testing, like what we can do next, I will work on bayesian_block]
(hehe, u got next blog hint)
For smoother visualization with statistical confidence intervals:[focus "smoothed_counts" a small function to smoothing the lightcurve:)]
Segmenting Light Curves
For dividing data into segments:
Output:
GitHub Reference
For detailed code and implementation, check out my PR:
GitHub PR #54 – Stingray.jl
These plotting recipes make it easier to visualize event lists and light curves with GTIs, BTIs, and advanced error handling in Stingray.jl. They serve as a foundation for advanced timing analysis techniques, such as power spectral density, periodograms, and others.
Stay tuned for my next post:) find hint for my next post ::}
Comments
Post a Comment