YunyiShen / CeleriteQFD

Celerite Gaussian Process Detrending Combined with Quiet-Firing-Decay HMM for non-supervised Stellar Flare Detection using Photometric data

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Simultaneous Detrending and Flare Detection using Gaussian Process with Hidden Markov Model

A working repo using Gaussian Process as trend model with a Hidden Markov flare detection.

Models implemented

In current stage, several methods for simultaneous detrending and flare detection with photometric data are implemented in Stan, a state-of-the-art platform for statistical modeling.

  • Vanilla HMM: this is the usual HMM model with two normal states, which is not very effective

  • Gaussian Process: this is the usual GP model with 0 mean, can be used to detrend the data

  • Celerite: adopted from Python package exoplanet-celerite2, one could use this to detrend the data and use 3-sigma rule. Check the interface out if you are interested in using celerite2 in Stan environment and thus need an interface between C++ and stan. Cholesky decomposition of several recommended kernels were implemented that ready to use.

  • CeleriteHMM: this type of models combined Celerite2 and HMMs. We used the Celerite as trend model. For flare, we have two states namely a quiet state and a flare state while quiet state the data follow normal with mean of the Celerite trend and flare state follow the trend added by some random variable from different distribution, e.g. Laplace and power-law.

  • QFDexN, this model relies more on the morphology, similar to CeleriteHMM but we have three states, namely Quiet-Firing-Decay, and for F and D state, we model the data generating process as a AR(1) model with an exponential modified normal (exN) random walk for Firing and an exponential decay for Decay, this works well as pure firing model.

  • CeleriteQFDexN, the celerite combined version of QFDexN, With different type of celerite kernels implemented, currently not very stable for time series longer than 2,000 probably due to stan.

Injection recovery

Some amount of injection-recovery simulation was done with TIC-031381302's time series with injected (rather small) Kepler flares.

One example run, compared with Celerite and 1-3-sigma rule

Result for 100 injection recovery simulations, evaluated by sensitivity and specificity:

Real data

An example run from TIC 031381302, with zooming in to part of the light curve that celerite absorbs some flare into trend.

The code to repeat this result is in ./tests/Short_time_series_tests/celeriteQFDexN.R, it requires rstan (currently does not work for cmdstan due to the order it include C++ header files).

About

Celerite Gaussian Process Detrending Combined with Quiet-Firing-Decay HMM for non-supervised Stellar Flare Detection using Photometric data

License:MIT License


Languages

Language:Stan 39.3%Language:R 32.3%Language:C++ 28.1%Language:Shell 0.3%