Skip to content

SVM-Based Glitch Detection and Removal#96

Closed
katefoyle wants to merge 7 commits into
mainfrom
MLupdate
Closed

SVM-Based Glitch Detection and Removal#96
katefoyle wants to merge 7 commits into
mainfrom
MLupdate

Conversation

@katefoyle

Copy link
Copy Markdown
Contributor

This pull request transforms the glitch detection pipeline into a machine learning approach (with SVM classifier) capable of finding instrumental glitches at lower S/N thresholds and removes only those with glitch likelihoods that exceed a specified threshold (set to .45).

Key Changes

Added SVM glitch detection:

  • Added SVM_dpi_eval function to analyze 64ms DPI segments and flag likely glitches
  • Lowered SNR candidates ((stds > 6) and (stds / np.abs(stds2)) > 2) (previously hard-coded to 10 and 3)
  • Glitch probabilities of candidates logged
  • Those with glitch likelihood > .45 get flagged and their interval removed from event GTI

Interval handling:

  • Updated get_btis_for_glitches to set customizable S/N thresholds
  • t_min, t_max tuples are returned and used to update GTI

Code integration:

  • Imported pickle
  • SVM loaded from config
  • Glitch likelihood logged

Why?

  • Lowering the heat pipe glitch parameters allows for more to be detected by the SVM, which has proven highly effective in separating these types of glitches from GRBs, SGRs, and plain background.
  • More rejection lowers overall noise at any S/N, increasing the sensitivity to GRBs in ground-based searches.
  • Avoids data loss caused by previously hard-coded glitch parameters.

Testing:

  • Ran event, hk mask, and attitude pat.fits files test for a real algorithm-caught glitch (obsid 00013856003)
  • Returned high glitch probability and GTI was successfully updated with removed glitch bti
  • Did the same process with obsid 00012872142 where no glitch occurs
  • No GTI update/bti removal and no glitch prediction printed as there was no glitch present.
  • Test folders moved elsewhere before PR

@katefoyle katefoyle closed this Aug 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant