Posts

Showing posts from July, 2026

Rebinning Updates!

Image
  Updates on Rebinning in Stingray.jl Welcome back! Over the past couple of weeks, we have been working hard on expanding the capabilities of Stingray.jl. One of the key features we've recently added is data rebinning. Rebinning is an essential part of time series analysis, especially when dealing with noisy light curves or power spectra where we want to trade off some resolution for a higher signal-to-noise ratio. In this post, we'll walk through the two new rebinning functions we've introduced: rebin_data for linear rebinning and rebin_data_log for logarithmic rebinning. Linear Rebinning with rebin_data The rebin_data function allows you to linearly rebin your data array to a new, coarser resolution. You can choose to either sum or average the data points falling into the new bins using the method keyword argument. It also automatically propagates uncertainties if you provide them! Here is a quick example of how you can use it to rebin a light curve or a signal:

Expanding Our Toolkit

Image
It’s Time for Another Update Times have have been incredibly productive and exciting. If you read my last update, you’ll know we successfully wrapped up the implementation of the Core Spectral Types. With that strong foundation in place, the real fun has begun. The Next Frontier: Advanced Methods Now that we have the core types for handling our spectral data, we've started diving into the algorithms that make Stingray so powerful for X-ray astronomers. Conquering the Lomb-Scargle Periodogram Implementing the Lomb-Scargle periodogram. For those who might not be familiar, astronomical data is notoriously messy. We rarely get perfectly, evenly-spaced observations (telescopes have down-time, Earth gets in the way, etc.). Standard Fourier transforms struggle with this unevenly sampled data. Then Enters Lomb-Scargle method! It's a lifesaver for finding periodic signals (like a pulsar spinning or a star orbiting its companion) in this kind of patchy data. Bringing this functionality ...