parsotat / BatAnalysis

A python HEASOFT wrapper for processing Swift-BAT data.
MIT License
30 stars 11 forks source link

Palmer tte analysis 6 #30

Closed dmopalmer closed 3 months ago

dmopalmer commented 3 months ago

Preliminary implementation of sub-threshold trigger fetching.

Example usage:

from dateutil.parser import parse as parsedate
from astropy.io import fits
import batanalysis as ba
import swifttools.swift_too as swtoo

downloads = ba.download_swift_trigger_data(triggertime=parsedate('2023-11-11T21:35:43'), timewindow=300, match=["*bevsh*"])
for trignum, result in downloads.items():
    print(trignum)
    print(result)
    for r in result:
        fits.info(r.localpath)
        try:
            print(fits.getdata(r.localpath).columns)
        except:
            pass
pass
parsotat commented 3 months ago

This PR looks good to me.