parsotat / BatAnalysis

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

Adding a check for caldb initalization #18

Closed Parrazyte closed 2 months ago

Parrazyte commented 4 months ago

Issue: If caldb is not initialized when running batsurvey_analysis, the run fails in heasoftpy (no gtis are created) but doesn't give back an obvious error to warn the user that this is the reason, instead returning a lack of gtis.

Proposed fix: Test for $CALDB and $CALDBCONFIG in os.environ when importing bat_analysis and/or running batsurvey_analysis, parse the batsurvey response with high chatter to check for the presence of such an error ?