Skip to content

KarlenS/swift-uvot-analysis-tools

Repository files navigation

Swift UVOT analysis wrappers

Python helper wrappers for HEASoft UVOT analysis tools.

- Runs uvotdetect and generates region files for all observations
- Rudimentary data quality check by displaying all images in ds9
- Runs uvotsource on all observations
 -- currently set up for producing observation-by-observation light curve data (if multiple exposures exist per observation, they are summed) and SED points

Required Software

XPA , DS9, HEASoft (at least for Swift), CALDB(with data for at least for Swift)

Python packages:

$> pip -r install requirements.txt

Generating photometry and light curve data

To see all available options:

$> python run_uvot_analysis.py --help

Step1: Run uvotdetect and generate region files for all observations

$> python run_uvot_analysis.py -p /path/to/Swift/data --detect

The directory /path/to/Swift/data/ should contain UVOT data strucutres from all observations (typically directories titled e.g., 00034934001)

To run with a single observation:

$> python run_uvot_analysis.py -p /path/to/Swift/data -obs 00034934001 --detect

Step2: Visually check observation from each image (this will require DS9 and XPA)

$> python run_uvot_analysis.py -p /path/to/Swift/data --check

To view images for a single observations, run:

$> python run_uvot_analysis.py -p /path/to/Swift/data -obs 00034934001 --check

Step3: Run uvotsource and extract photometry

The following will run uvotsource on all observations and store photometry data in photometry.fits (in fits format)

$> python run_uvot_analysis.py -p /path/to/Swift/data --measure

To only parse photometry data and store it in MySource_photometry.cvs (in csv format; same formats as supported by astropy.table).

NOTE: Do this if uvotsource has already been run with --measure

$> python run_uvot_analysis.py -p /path/to/Swift/data --measure -o MySource_phometry.csv --extract_only

As in previous steps, this works for a single observation as well.

$> python run_uvot_analysis.py -p /path/to/Swift/data --measure -obs 00034934001 -o MySource_photometry.fits

About

Python wrappers for running through basic UVOT photometry

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages