Skip to main content

Routines for dealing with data from BAT on the Neil Gehrels Swift Observatory

Project description

Swiftbat is a set of Python library routines and command-line utilities that have been developed for the purpose of retrieving, analyzing, and displaying data from NASA's Swift spacecraft, especially the data from the Swift Burst Alert Telescope (BAT). Development started before the launch of Swift for private use by the author and was how he learned Python. As a result, it is not a well-packaged, well-written, coherent library.

All of this data is available from the Swift data archive, but some routines in this library use other access methods that are not available to the general public. These routines will not be useful except to Swift team members. This software is provided under the '3-clause BSD license' (https://opensource.org/licenses/BSD-3-Clause) . It is provided as-is with no expressed or implied warranty of fitness for any purpose.

If you want to find the exposure of BAT to a point in the FOV, use

swiftbat.batExposure(theta, phi)

where theta is distance from boresight, phi is angle around the boresight, both in radians.

This package also installs a command-line program 'swinfo' that tells you Swift Information such as what the MET (onboard-clock) time is, where Swift was pointing, and whether a specific source was above the horizon and/or in the field of view.

% swinfo 2020-05-05T12:34:56 -o -s "cyg X-1"
Swift Zenith(RA,dec):         232.97, -20.46
Swift Location(lon,lat,alt):  -179.31 E, -20.53 N, 549 km
Time(MET + UTCF -> UT):   610374920.889 + -24.888 -> 2020-05-05T12:34:55.999
YYMMDD_SOD:                   200505_45295.999       DOY=126
Obs Sequence Number:          00033349058
Obs Target Name:              SGR 1935+2154
Obs Date and Times:           2020-05-05   12:32:37 - 13:01:34
Obs Pointing(ra,dec,roll):    293.724, 21.897, 62.77
Cyg_X-1_imageloc (boresight_dist, angle): (14, -133)
Cyg_X-1_exposure (cm^2 cos adjusted): 4230
Cyg_X-1_altitude: 29 (up)

Use swinfo --help for more details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

swiftbat-0.1.6.tar.gz (96.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

swiftbat-0.1.6-py3-none-any.whl (97.3 kB view details)

Uploaded Python 3

File details

Details for the file swiftbat-0.1.6.tar.gz.

File metadata

  • Download URL: swiftbat-0.1.6.tar.gz
  • Upload date:
  • Size: 96.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for swiftbat-0.1.6.tar.gz
Algorithm Hash digest
SHA256 bbed4748c264b5a94050e6312d56abbfbd8ae094014167f5fdf81f572ea17ffc
MD5 ce76ad4b96ad102a7ae9ac0c4722c4f0
BLAKE2b-256 be92ead61036ae9baaee2e05a11bb1e7956fa203ecdd783341b03b524cbfab03

See more details on using hashes here.

File details

Details for the file swiftbat-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: swiftbat-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 97.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for swiftbat-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 75fdd504870b81f4fb5f45e58192f43bbd6d44c2e1a7fe615c639e4ef6386667
MD5 6d957eb29797f32949eee839b8ee52d7
BLAKE2b-256 e5bd2d59813ecfe8773cde896b3d0972e514476be6ed145b1f63bbf1683d01b4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page