Skip to main content

Swiftbat (swiftbat_py on pypi) 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.

If your man-in-the-middle proxy/VPN is giving you certificate errors when you try to get pointing information or other data services, use the swutil.trust_proxy() function.

Metadata

Release files for swiftbat 0.1.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for swiftbat 0.1.7
File Size Uploaded Provenance
swiftbat-0.1.7.tar.gz 96.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for swiftbat 0.1.7
File Interpreter ABI Platform
swiftbat-0.1.7-py3-none-any.whl Python 3 none any Details

Total release size: 194.4 kB

Release files / swiftbat-0.1.7.tar.gz

Download URL swiftbat-0.1.7.tar.gz
Size 96.8 kB
Tags Source
SHA-256 checksum
How to use checksums
701d882902d0d930ee6f2f781331d4daa97f492f1160e2714893eec5ce776a46
BLAKE2b-256 checksum
How to use checksums
f989af82c975b19541f44450e7996c67755086017fda5a08ca4722ea24b0989a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.7

Release files / swiftbat-0.1.7-py3-none-any.whl

Download URL swiftbat-0.1.7-py3-none-any.whl
Size 97.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
950225fff229f13682017a909ef7b3367c824fbbbf23ddf8aacaabe40cf97a65
BLAKE2b-256 checksum
How to use checksums
ba8c13c23ab5135fc6c9d91d9203e1ab62e97e0a3f51fc9ba9f9e4cd34654470
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.7

Security for swiftbat 0.1.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page