Monday, August 8, 2016

Interpreting Flux from Broadband Photometry

Many of the techniques used on optical data to convert broadband photometry to flux, including creating spectral energy distributions and integrating the pseudobolometric flux, don't work very well in the ultraviolet.  After struggling with these issues for years, I wrote the following paper to demonstrate the difficulties and quantify the effects.  It is now on astro-ph and published in the Astronomical Journal.

The figures in the paper were designed to compare effects with a consistent wavelength range within the confines of a two column article.  So many of the figures are tall and hard to read if you are reading or projecting the paper onto a typical wide screen (like for many astro-ph/astrocoffee style discussions).  I have created a pdf with most of the figures reproduced as single panels.  That version is here. 

Comments are welcome.

Wednesday, May 25, 2016

Swift Target of Opportunity Priorities (urgency)

The stated meanings of the Swift Target of Opportunity (ToO) priorities are listed below.  For new supernovae I recommend a "High Urgency" ToO.  During the day it will sometimes be executed within a few hours as an uploaded target directly to the spacecraft.  At the latest it will be discussed the next morning--if you submit it after hours it is visible to the Swift team but does not actively page them until the next morning.  If the SN is older, a medium or low urgency request would be more appropriate.  This includes requests for continued campaigns on Swift SNe which can be planned and rerequested several days before the already requested exposures are completed so that the campaign goes on continuously but without requiring immediate action by the Swift team or bumping out previously planned targets.  The normal planning schedule is also copied from the Swift ToO page below.


A "Highest Urgency" ToO might be appropriate for a very nearby, very young supernova.  SN2011fe, with a very recent upper limit, would certainly qualify.  If a SN is discovered one night and confirmed the next night, it is probably is fine to do it as a high urgency.



From the Swift Target of Opportunity request page:


####################  (previous version used yellow highlighting which was awful to read)



Response Priorities:

    A "Highest Urgency" ToO will immediately page the Swift PI and Science Operations team, even in the middle of the night.
    "High Urgency" ToO requests will page the PI and Science Operations team immediately during working hours.
    "Medium Urgency" requests will be handled during daylight hours.
    "Low Urgency" requests will be handled at the daily planning meeting which is 9-10am Eastern Time (USA) M-F.

Please avoid using the Highest Urgency unless absolutely essential, for example

    Galactic or local-group supernova
    High-probability gravitational wave event
    High-probability neutrino event
    Highly exceptional GRB or SGR

Normal Planning Timeline: Below is the typical schedule for producing and submitting the observing schedules. Please give a few extra days for submitting ToOs around the holidays.





Day of the Week
Submit the Schedule for*
Create the Schedule for
Monday
Tuesday
Wednesday
Tuesday
Wednesday
Thursday
Wednesday
Thursday
Friday & Saturday
Thursday
Friday & Saturday
Sunday & Monday
Friday
Sunday & Monday
Tuesday
All times are in Eastern Time (USA).
*Schedules are submitted in the mornings.

Monday, February 22, 2016

uvot analysis error messages

This is just a listing I'm starting of error messages I see while doing UVOT analysis of supernovae , what the real problem was, and how to fix it.  Most (possibly all) are not issues with the software but problems with how one is trying to use the software.

uvotmaghist getting hung up -- activity monitor listing uvotinteg as taking 99% of the CPU time but not getting anywhere. 

problem -- region files contained two lines, one with the correct source position and one with some other position not in the field of view

fix -- fix the region files, rerun uvotmaghist


uvotmaghist reporting divide by zero error --

problem -- background region was not covered by the image (though it may have fallen within the zero count square made to encompass the full height and width of the image).  Especially a problem when combining full field and smaller hardware/software windows.

fix -- fix the region so it stays within the image for all the images being processed with uvotmaghist

frankenstein images where parts of a summed image seem to be wrapped around rather than just mosaiced

problem -- I think the problem was having multiple instances of uvotimsum running at the same time so the parameter file contained values from the other terminal

fix -- do them one at a time rather than multi-tasking the same command in different windows


if the galaxy count rates come out as negative, it could be that the supernova comes from a clean region and the background region happens to have a higher average count rate.  But the source region file could be bogus -- two entries for example -- confusing the standard 5" aperture that is computed for coincidence loss.

Thursday, January 28, 2016

Swift Supernova Analysis Workflow

I'm writing this mostly for some undergraduates who will help with some data reduction, but others might find the links and steps useful.

Swift supernova spreadsheet

https://docs.google.com/spreadsheets/d/1h1RB28-5BK1D-KmThlyTyvfvWO9oVJJ8-zfa22ZHXR4/

The first few columns of that spreadsheet are used to create the Swift supernova website with links added for images, data, and light curves which exist in the folder

http://people.physics.tamu.edu/pbrown/SwiftSN/swift_sn.html

The official target of opportunity list is at:
https://www.swift.psu.edu/secure/toop/summary.php

Current supernova are listed at
https://www.swift.psu.edu/secure/toop/supernovae.php

Those pages can be used to find which supernovae have been proposed and which are still being observed.  With a name or target id (the name of the supernova or host is preferred when searching as sometimes multiple target ids are used for the same target).

########   Downloading data

For recent (less than one week) data on current supernovae, you can download the data from the quicklook site.  For these quick reductions I just download the *_sk.img images into a folder /currentSwiftSNe/SNname/

>cd Desktop /SN/currentSwiftSNe/

http://swift.gsfc.nasa.gov/cgi-bin/sdc/ql?

For archived data, I download all image files from the Swift Archive checking the Swift auxiliary data and Swift uvot data boxes.  These I download into a /SwiftSNarchive/SNname/ folder

>cd Desktop /SN/SwiftSNarchive/

http://heasarc.gsfc.nasa.gov/cgi-bin/W3Browse/swift.pl

########## Processing data

My scripts look for all the gzipped data (so you can exclude data by unzipping it) so first zip it.  And at some point you might need to go into the tcsh shell

>mkdir SNname
>  cd SNname

>touch SNname_downloadcommands.txt &
>edit  SNname_downloadcommands.txt

Paste the downloaded data from the archive into the text editor and then source it

>source SNname_downloadcommands.txt

create a ds9 region file with a radius of 3 arcseconds centered on the supernova and called SNname_3.reg.  Also make a background region file named SNname_bkg.reg which has a similar background and a SNname_bkgclear.reg region clear of background stars and galaxy flux.

> gzip -f */uvot/image/*sk.img
> tcsh
> source $SNSCRIPTS/makecommands14.1.txt   <SNname>  <optional template obs id>

This generates commands to sum together the data by observation id and then append them together into one multi-extension fits file per filter plus the template images

> source SNname_all.reg
> source $SNSCRIPTS/SNgalsub15.1.maghist.txt SNname

and a bunch of figures might pop up and a SNname_uvotB15.1.dat file will be created (among others).  Then I exit tcsh and make a plot with xmgrace.


> exit
> xmgrace &

I save it as a pnm file and then convert it to jpg
> convert SNname_lightcurve.pnm SNname_lightcurve.jpg

I also make a three color image

ds9 -scale log -rgb -red SNname_vv_sum.img.gz -green SNname_uu_sum.img.gz -blue SNname_m2_sum.img.gz

adjust the colors contrast and brightness.
Then save image > png >    save as SNname_uvot.png





Wednesday, November 18, 2015

Making Swift out of Science (instead of just science from Swift)

A few weeks ago for our Swift Satellite​ meeting I made some "value-added" Swift models by printing or photoshopping science papers onto the pdf model that was made by the education/public outreach group from Swift.
http://science.nasa.gov/media/medialibrary/2010/03/31/swmodguide5.pdf


These models were meant to represent the different science coming out of Swift. 



Paper models aren't easy to take safely on an airplane, so I kept them flat and began assembling them at my sister-in-law's house Saturday night before driving up to the meeting Monday morning.

 Originally I had planned on printing the models on top of the science paper.  I used a recent paper from Peter Milne showing some exciting results enabled by Swift -- the discovery of multiple classes of type Ia supernova based on their ultraviolet colors and the apparent change in the fractions of those classes with redshift.  The first one went into the printer upside down, so I used the original model to tell me where to cut and fold, but only the science paper is visible from the outside.  The hotel next to mine had a really cool looking purple light shining on its wall so I went over there to take a few pictures.





The second one I wanted to look more like Swift, so I took the pdf model and photoshopped (gimp-ed?) titles, author lists, figures, and tables from several key Swift papers onto the parts of the model.  When possible I tried to make it match -- there is a picture of someone assembling the BAT printed on the side of the BAT, the UVOT features pretty pictures, the XRT includes an image of the mirrors and an awesome X-ray echo from a bursting star.  The solar panels feature the four main instrument papers, Gehrels et al. 2004, Roming et al. 2005, Burrows et al. 2005, and Barthelmy et al. 2005.  I finished assembling this one during the conference dinner and gave it to the Swift Principle Investigator Neil Gehrels.
 I brought along the printouts for a third model but didn't know if I'd actually make it.  This one featured a paper by the conference organizer's grad student printed on top of the model.  Both were printed in black and white, which is why the picture below looks like it was taken in b&w.  Dieter Hartmann expressed enough interest in the other models I made, that I figured I should make the model I had planned to give to him anyway (being a local he wouldn't have to worry about transporting it).

Wednesday, March 4, 2015

SOUSA data use

So the Swift data is all public.  Different people request observations of different supernovae.  Sometimes multiple people request data on the same supernova.  Other people could have requested data on a particular supernova but it was already being observed.  Some of us people spend a lot of time monitoring the observations and modifying the observing plans accordingly.  Some of us were involved in getting template observations.  Others might have just pulled the public data from the archive and published it.  Sometimes there are multiple versions of the photometry independently done and published.  With my SOUSA archive, the same data might be tabulated and used by different people.  So proper credit is a tricky thing, so here are some of my thoughts.

I recommend citing any papers which originally presented Swift data on that object and where the data actually comes from (making clear whether you are using their photometry or your own reduction for example).  For the data available on my website, you should cite the Swift Optical/Ultraviolet Supernova Archive (SOUSA) paper as the source < http://adsabs.harvard.edu/abs/2014Ap%26SS.354...89B >, and the data files usually indicate if there was a previous publication.  If you make extensive use of the UVOT data and/or want advice on the analysis, it might be appropriate to involve me and add me as a coauthor.   If you are using your own reduction of the data, make sure to indicate the calibration you used (which should be the updated version of Breeveld et al. 2011) and whether they are Vega or AB magnitudes.

If using the SOUSA data, I suggest adding something like this to the observations section:

This supernova was also observed in the UV with the Ultra-Violet/Optical Telescope (UVOT; \citealp{Roming_etal_2005} on the Swift spacecraft \citep{Gehrels_etal_2004}.   The UV photometry was obtained from the Swift Optical/Ultraviolet Supernova Archive\footnote{http://swift.gsfc.nasa.gov/docs/swift/sne/swift\_sn.html} (SOUSA; \citealp{Brown_etal_2014}).  The reduction is based on that of \citet{Brown_etal_2009}, including subtraction of the host galaxy count rates and uses the revised UV zeropoints and time-dependent sensitivity from \citet{Breeveld_etal_2011}.


 and in the acknowledgements:

The work made use of Swift/UVOT data reduced by P. J. Brown and released in the Swift Optical/Ultraviolet Supernova Archive (SOUSA).   SOUSA is supported by NASA's Astrophysics Data Analysis Program through grant NNX13AF35G.

Thursday, November 20, 2014

Happy Birthday Swift !!

Ten years ago the Swift satellite was launched into space.  In honor of that anniversary I made this montage of one hundred of the supernovae Swift has observed.  Here's to ten more years !!



The picture is a mosaic of 100 supernovae and their galaxies observed by Swift.  The rendering of Swift is by NASA E/PO, Sonoma State University, Aurore Simonnet