March 22, 2023: Warning about incorrectly formatted ISO8601 dates
March 17, 2023:
March 17, 2023:
source_namewasn't being set correctly.
March 16, 2023:
TOORequestswas not correctly assigning the name of the TOO target name into
source_name, this has been corrected.
February 27, 2023: GUANO update
executedflag, which indicate if the GUANO command has been uplinked to Swift, and executed onboard. If you set
successful=Falsewhen executing a
GUANOAPI call, it will load GUANO entries that have no data associated with them yet. This way, you can fetch recent GUANO commands that have not yet been fully processed by the Swift SDC.
December 2, 2022: Bug fix release
GUANOEntrydid not get clock corrected.
clock_correct()on a zero length entry or an already corrected entry could cause a hang.
November 30, 2022: Update class names to new style. Add better support for date formats.
datetime, they are converted to naive UTC
Swift_Calendarto support searching for scheduling information. The Swift Scheduling Calendar is the long-term plan for Swift observations. Note that an entry into the Calendar does not guarantee that an observation will be scheduled, however it does mean that it is in the calendar to be scheduled for that day. You can now use
Calendarclass to query upcoming plans, by date range, coordinate, TOO ID and target ID.
September 23rd, 2022: Add
astropy units support.
astropy units support, so now for values like radius, lengths of time etc, you can add units using the standard
astropy.units module. So for example, if you want to query the visibility of Sgr A for the 2 weeks: `VisQuery(name='Sgr A',length=2u.week)
, or say query all observations within 30 arc-mins of the Vela Pulsar:ObsQuery(name='Vela Pulsar',radius=30u.arcmin)`.
In preparation for a future update, many class aliases have been updated for better PEP8 compliance, and internal consistency. So for example,
UVOTMode etc. The old class names still work, but will be deprecated upon moving to API version 1.3. Where necessary example Jupyter Notebooks are being updated for the new style class name.
September 8nd, 2022: Add
downloadmethod for easy downloading of SDC data for any class with an associated observation id. See Jupyter notebook
UVOT_mode example notebook.ipynbfor examples of use.
September 2nd, 2022: Bug fix release
UVOT_modeconsistent with other classes.
September 2nd, 2022: Add support for checking if UVOT mode is valid for a give coordinate
UVOT_mode. Now if you pass
nameto resolve a target name to coordinates, it will check if mode associated with
uvotmodeis valid for this position. This on the server side performs a bright star check, and if it fails for any reason, the request will be rejected with an error along the lines of 'The following UVOT filters are not allowed due to a bright star: White'.
August 10th, 2022: Subthreshold data support
Swift_GUANO_Dataindicating if GUANO data are located in the "BAT Data For Subthreshold Triggers" section of the Swift SDC, rather than being associated with normal data. If this is true then
subthresh = True, otherwise
subthresh = False.
Data). To download subthreshold trigger data, give the
obsidand set argument
subthresh = True. Data will be downloaded into a directory named after the obsid containing just the subthreshold trigger data.
July 1st, 2022: Bug fix release
June 27th, 2022: Bug fix release
quietoption wasn't available in
Swift_Dataand only worked in Jupyter Notebooks.
June 24th, 2022: Bug fix and new feature release
fetchargument was not working.
Swift_Datawhich allows user to filter on filenames using unix-style filename pattern matches. Multiple matches can be passed as a list, and files matching any of the matches will be downloaded.
June 16th, 2022: Bug fix release
May 2nd, 2022: Bug fix release.
May 2nd, 2022: Bug fix release.
keyringmodule on macOS, where module was called non-interactively or over an ssh login.
April 1st, 2022: Added
Swift_SAA method for calculating times when Swift is inside the South Atlantic Anomaly (SAA). Bug fix.
SAAclass added for calculating SAA passage times for the Spacecraft definition of SAA (default) or an estimate of the Burst Alert Telescope SAA passage times.
clock_correctmultiple times could cause issues with times.
March 29th, 2022: Bug fix release
GUANOentries were not being set.
March 28th, 2022: Added clock correction through both
Swift_Clock class and universal
Swift_Clockthat for a time in either Swift Time, UTC Time or Mission Elapsed Time (MET), will return an object containing all three, along with the Universal Time Correction Factor (UTCF) that is used to correct Swift Time to UTC. The UTCF corrects for both Swift's clock drift and for any leap seconds.
clock_correct()method to classes that return dates. Using this you can add UTCF to any returned time, and thereofer MET, UTC and Swift Time using the
swiftdatetimewhich is an extended version of datetime that is either based on Swift Time or UTC Time.
swiftdatetimeact like datetimes, except that you can now obtain MET, UTC, UTCF or Swift Time using the
swiftattributes. In additionthe
frommetclassmethod allows you to construct a
swiftdatetimefrom an MET.
isutcparameter defines if the basis of the
swiftdatetimeis UT time or Swift Time. Standard
datetimearithmetic can be performed, however UTCF is not propogated.
GUANOquery results are now clock corrected by default, to avoid confusion.
February 7th, 2022:
swift_too module updated to 1.2.7 with the following updates / fixes:
Swift_Datato download from the Space Science Data Center in Italy. Set
itsdc = Trueto download from Italian site,
uksdc = Truefrom the UK site. Default is to download from the HEASARC (US site).
Swift_GUANOthat could crash.
February 3rd , 2022:
swift_too module updated to 1.2.5. Add new classes designed to make access to Swift SDC data easier, provide an API for accessing GUANO and universal name resolution. Here are the details of the upgrade
Swift_GUANO. This class and it's support classes allow for querying data generated by the Gamma-Ray Urgent Archiver for Novel Opportunities (GUANO).
Swift_Data. This class makes downloading of Swift data from the USA and UK Swift Data Centers easy.
Swift_Resolve. For a give source name, this returns the coordinates as resolved by various name resolvers.
nameparameter to classes that take coordinates (including
Swift_TOO) will now automatically resolve the name to
Swift_ObsQueryyou can omit the
Swift_and use the more simple
None, that can occur when
username != 'anonymous'.
January 24th, 2022: Bug fix release.
December 17th, 2021:
swifttools 2.2. Updates made in response to feedback from original release, and various quality of life improvements. Also new products can be fetched from the TOO API, details below.
keyringsupport. If you have
keyringinstalled and it works on your system, your
shared_secretwill be saved to it when you first pass it as an argument. On subsequent uses, you can give just your
SkyCoordobjects can be returned instead of RA and Dec from any Class now, if
astropyis installed. Note
astropywill not be installed as a dependency of swifttools.
anonymous, meaning that requests can now be made without passing
Swift_TOO_Requestssupport. This new request allows for the querying of approved Swift TOO requests sent to Swift by yourself and others. The approved XRT/BAT/UVOT modes and exposure time are reported. You can also choose to retrieve detailed information from the TOO Request, including justification texts. However, this detailed information is only available for TOOs you submitted.
Swift_Calendarsupport. In this version you may retrieve calendar information for any TOO. These are automatically attached to entries in a
Swift_TOO_Requestsentry. The Calendar shows all planned observations for a TOO, along with an estimate of how much time was actually observed during the calendar window. Note that this is different from the Swift Plan, insofar as the Swift Calendar lists requested observations and can go much farther into the future. However, due to Swift's oversubscription, and other issues, even if an object is in the Calendar, that is not guarantee that Swift will observe it on that day, only that it is in the queue to be observed.
dec_object. These attributes give the RA/Dec of the object that was the intended target of an observation. We note that the original choice of using ''point'' to indicate this is not consistent with other missions where ''point'' is used to indicate where the telescope pointed. For now, these new variables are simply aliases of
dec_point. These will be deprecated upon the release of the next API version (1.3), but not necessarily the next release of
swifttools. API version will only be updated if compatibility of the API format needs to be broken, and every effort will be made to make API changes transparent to