Swift TOO API
Swift MOC

swift_too module

UVOT_mode example - querying UVOT mode table

API version = 1.2, swifttools version = 2.4

Author: Jamie A. Kennea (Penn State)

For a given UVOT mode hex value, find out exactly what it does.

Initialization

First we import the UVOT_mode class.

from swifttools.swift_too import UVOT_mode

Submit the query

Now submit the query using the function call form of the class. Note that as of swifttools 2.2 the default login is anonymous, so we don't have to give that as a parameter. Note that you can give the requested UVOT mode as an argument either by passing uvotmode = 0x30ed or simply by passing 0x30ed as uvotmode is the default first argument.

query = UVOT_mode(0x30ed)

Now check the query was accepted and worked.

if query.status == 'Accepted':
    print(f"Status: {query.status.status}")
else:
    print(f"Errors in query: {[error for error in query.status.errors]}")
Status: Accepted

Display Results

Now the query has been accepted, we can display the results by simply typing in the name of the query object into the command line.

query

UVOT Mode: 0x30ed

The following table summarizes this mode, ordered by the filter sequence:

Filter Event FOV Image FOV Bin Size Max. Exp. Time Weighting Comments
uvw1 None 17 2 540 1500 BLUE WEIGHTING
u None 17 2 270 750 BLUE WEIGHTING
b None 17 2 270 750 BLUE WEIGHTING
uvw2 None 17 2 1000 3000 BLUE WEIGHTING
v None 17 2 270 750 BLUE WEIGHTING
uvm2 None 17 2 1000 2250 BLUE WEIGHTING

Filter: The particular filter in the sequence.
Event FOV: The size of the FOV (in arc-minutes) for UVOT event data.
Image FOV: The size of the FOV (in arc-minutes) for UVOT image data.
Max. Exp. Time: The maximum amount of time the snapshot will spend on the particular filter in the sequence.
Weighting: Ratio of time spent on the particular filter in the sequence.
Comments: Additional notes that may be useful to know.

This is formatted as a pretty table for Jupyter Notebooks, but also formatted for fixed-width font text if run on the command line Python or printed, e.g.:

print(query)
UVOT Mode: 0x30ed
The following table summarizes this mode, ordered by the filter sequence:
+--------+-----------+-----------+----------+----------------+-----------+----------------+
| Filter | Event FOV | Image FOV | Bin Size | Max. Exp. Time | Weighting |    Comments    |
|  uvw1  |           |    17     |    2     |      540       |   1500    | BLUE WEIGHTING |
|   u    |           |    17     |    2     |      270       |    750    | BLUE WEIGHTING |
|   b    |           |    17     |    2     |      270       |    750    | BLUE WEIGHTING |
|  uvw2  |           |    17     |    2     |      1000      |   3000    | BLUE WEIGHTING |
|   v    |           |    17     |    2     |      270       |    750    | BLUE WEIGHTING |
|  uvm2  |           |    17     |    2     |      1000      |   2250    | BLUE WEIGHTING |
+--------+-----------+-----------+----------+----------------+-----------+----------------+
Filter: The particular filter in the sequence.
Event FOV: The size of the FOV (in arc-minutes) for UVOT event data.
Image FOV: The size of the FOV (in arc-minutes) for UVOT image data.
Max. Exp. Time: The maximum amount of time the snapshot will spend on the particular filter in the sequence.
Weighting: Ratio of time spent on the particular filter in the sequence.
Comments: Additional notes that may be useful to know.

Of course all the data from this table is included in the class, and some data also that is not in the table.

query.entries[0]
Parameter Value
uvotmode 12525
filter_num 6
min_exposure 600
filter_name uvw1
filter_pos 6
filter_seqid 1
field_of_view 17
binning 2
max_exposure 540
weight 1500
comment BLUE WEIGHTING

Swift Mission Operations Center

The Pennsylvania State University
301 Science Park Road,
Building 2 Suite 332,
State College, PA 16801
USA
☎ +1 (814) 865-6834
📧 swiftods@swift.psu.edu

Swift MOC Team Leads

Mission Director: John Nousek
Science Operations: Jamie Kennea
Flight Operations: Mark Hilliard
UVOT: Michael Siegel
XRT: Jamie Kennea