# uvot_fluxes_wget.pl vrs. 2016-02-01 fem at 170118d14h46m37s053830usUT
# /Home/eud/uvot_tdrss/perl/uvot_fluxes_wget.pl -seq=00020728992 -use_uvot -rebin -plot_mag -sens_corr -search_src_reg -wrk_dir=/local/home/khamseen/khamseen10/uvot_tdrss/uvot_lc -web -zp_2011 -gamma=1.0 -use_filter_wtd=white v b u
# Current directory: /local/home/khamseen/khamseen10/uvot_tdrss/uvot_lc
# ========= GRB170117A ===================
Used archived BAT position of 61.58900 21.74300
Reference: GCN_Circ-20480
The position is (04:06:21.36, +21:44:34.8)
Using source region:
# Region file format: DS9 version 3.0
# uvot_fluxes.pl bat
global font="helvetica 12 bold" select=1 edit=1 move=1 delete=1 include=1 fixed=0 source=1
fk5;circle(61.589,+21.743,3") # color=red dash=0
Region file centered at (61.589,+21.743), which is (04:06:21.36, +21:44:34.8)
Made source region file with 5" aper with name uvot_flux_src5.reg
Coincidence losses are calculated using a 5" aperture.
Exposure times (t_exp) have NOT been corrected for coinc. loss, but rates and mags have been.
The no. of background pixels has been corrected by the ratio of coincidence loss corrections in the source and background regions.
The errors have been adjusted to account for the binomial distribution of counts at large rates.
A table entry starting with # is an exposure with no aspect solution.
A table entry starting with ! has no pixels in either source or background region.
A table entry starting with % is unreliable because it is not well inside the image.
Upper limits in tables give the 0.9987 confidence limit using Bayesian analysis for detection taking the observed counts into account.
Upper limits in plots give the 0.9772 confidence limit using Bayesian analysis.
Weighted rates in tables (wtd_rate) combine rates from different exposures weighted by the expected source rate divided by the background rate
The source is assumed to produce the same magnitude in all filters.
The source is assumed to decay as t**(-1.0), and the rate is normalized so that the white filter produces 1 cps at 1000 sec.
The Rebinned Data for All_files combine rates from different exposures weighted by the expected rate divided by the observed sigma squared.
A plot of these data is stored in uvot_fluxes_wtd_date.ps and .gif.
A zero point of 20.29 is adopted for weighting rates.
*** Since no accurate position is available, set rates to 0. and compute ULs based on expected background in source aperture.
Because there are many possible positions for a source, the confidence levels should be increased for upper limits.
Using the ratio of the BAT region and the aperture of 3600.0,
3 sigma should become about 5.1 sigma and 2 sigma should become about 4.5 sigma.
Accordingly confidence limits in the tables have been adjusted from 0.9987 to 0.99999964.
No adjustment has been made for the confidence limits for the rebinned data or the plots.
Subtract UTCF of -18.46592 from uncorrected trigger time of 506317068 in BAT summary file
# ============ Reading file sw00020728992uwh_sk.img ================
Long-term sensitivity correction to zero point is -0.172 at 506403338
The processing date in extension 0 is: 2017-01-18T14:36:45
The trigger time is: 506317086.46592. The reference is BAT GRB summary file
Using zero point of 20.118 for filter WHITE
Use aperture correction of 1.108 based on aperture of 3.00
Using background region based on sources found in extension 14:
# Region file format: DS9 version 3.0
global color=red font="helvetica 10 normal" select=1 edit=1 move=1 delete=1 include=1 fixed=0 source
fk5;circle(61.589,+21.743,25")
fk5;-circle(61.589,+21.743,12.5")
 Ext   Exposure      t-trig coinc  t_exp   src  pix    bkg   pix net_rate +/-   mag   UL sum_rate  +/-    mag  UL sumexp wtd_rate  +/-   mag  wt/t
   1 wh506403337I   86251.2  0.96   90.3  220.0 112  11203  5820  0.000 0.190 99.00 20.2  0.0000 0.1896 99.00 20.2    90  0.000 19.165 99.00 0.004 
   2 wh506403432I   86345.7  0.96   47.9  134.4 116   6062  5832  0.000 0.268 99.00 19.8  0.0000 0.1548 99.00 20.4   138  0.000 15.641 99.00 0.004 
   3 wh506407680I   90594.0  0.90  169.5  952.7 108  50026  5820  0.000 0.222 99.00 20.0  0.0000 0.1391 99.00 20.5   308  0.000 13.038 99.00 0.002 
   4 wh506407892I   90805.8  0.95  170.4  537.9 108  29476  5812  0.000 0.162 99.00 20.3  0.0000 0.1065 99.00 20.8   478  0.000 10.411 99.00 0.002 
   5 wh506409635I   92548.9  0.96   44.1  102.1 108   5372  5844  0.000 0.263 99.00 19.8  0.0000 0.0999 99.00 20.9   522  0.000  9.781 99.00 0.002 
   6 wh506409682I   92596.4  0.96  155.6  339.5 108  19460  5800  0.000 0.142 99.00 20.5  0.0000 0.0835 99.00 21.0   678  0.000  8.264 99.00 0.003 
   7 wh506413725I   96638.7  0.95  179.9  552.7 112  28771  5856  0.000 0.154 99.00 20.4  0.0000 0.0734 99.00 21.2   858  0.000  7.468 99.00 0.003 
   8 wh506413910I   96824.4  0.96  482.3 1161.1 108  61444  5824  0.000 0.082 99.00 21.1  0.0000 0.0554 99.00 21.5  1340  0.000  5.819 99.00 0.003 
   9 wh506415336I   98249.9  0.96   47.0  100.6 116   5810  5832  0.000 0.267 99.00 19.8  0.0000 0.0542 99.00 21.5  1387  0.000  5.717 99.00 0.003 
  10 wh506415387I   98300.6  0.96  151.5  414.7 128  19007  5884  0.000 0.157 99.00 20.4  0.0000 0.0513 99.00 21.6  1538  0.000  5.450 99.00 0.003 
  11 wh506427306I  110219.6  0.96   68.7  168.5 116   8790  5872  0.000 0.224 99.00 20.0  0.0000 0.0500 99.00 21.6  1607  0.000  5.356 99.00 0.003 
  13 wh506432048I  114962.4  0.96   89.3  203.8 104  11203  5796  0.000 0.185 99.00 20.2  0.0000 0.0484 99.00 21.6  1696  0.000  5.236 99.00 0.003 
  14 wh506432142I  115055.9  0.96  897.4 2151.8 120 112874  5868  0.000 0.063 99.00 21.4  0.0000 0.0383 99.00 21.9  2594  0.000  4.453 99.00 0.003 
  15 wh506433058I  115972.3  0.96   60.3  155.9 112   7601  5864  0.000 0.233 99.00 19.9  0.0000 0.0378 99.00 21.9  2654  0.000  4.410 99.00 0.003 
    Sum (T+ 86251 to 116034):            7320.7       7320.7 (est. in src region)   SNR_unwtd_sum:   0.00 0.999999638888889 signif. UL:  21.91
  0  2654 506420147  103060.8  12972.7 -16809.6    0.0000   0.0378 99.000 99.000 -99.000
Total wtd_rate (for all exposures so far):  0.000 +/- 4.367 snr:  0.0 mag: 99.00 UL: 16.75
Rebinned Data for sw00020728992uwh_sk.img using a zero point of 20.118:
 No Exposure     t-avg        + / -       net_rate      +/-   mag   +/-     t-avg  sum_rate     +/-   mag   +/-   UL3
  0 2.53e+03  103115.3  12918.3 -16864.1    0.0000   0.0378 99.00 99.00  103115.3    0.0000   0.0378 99.00 99.00 22.41
The data range from T+86251.2 s (1.00 d) to T+116033.5 s (1.34 d)
Wrote uvot_fluxes_170118d14h46m37s053830usUT.qdp
Wrote uvot_fluxes_170118d14h46m37s053830usUT.gif
Wrote uvot_fluxes_170118d14h46m37s053830usUT.ps
Wrote uvot_fluxes_170118d14h46m37s053830usUT_vis.qdp
Wrote uvot_fluxes_170118d14h46m37s053830usUT_uv.qdp
Wrote uvot_fluxes_170118d14h46m37s053830usUT_vis.gif
Wrote uvot_fluxes_170118d14h46m37s053830usUT_vis.ps
# ================ Make Light Curve for Weighted Filters ==========
Use the following filters with indicated color corrections (mags):
  u (0)  , white (0)  , b (0)  , v (0)  , 
Rebinned Data for All_files using a zero point of 20.290:
 No Exposure     t-avg        + / -       net_rate      +/-   mag   +/-     t-avg  sum_rate     +/-   mag   +/-   UL3
  0   0.0439  101451.6  14582.0 -15200.4    0.0000   0.0435 99.00 99.00  101451.6    0.0000   0.0435 99.00 99.00 22.43
The data range from T+86251.2 s (1.00 d) to T+116033.5 s (1.34 d)
Wrote uvot_fluxes_wtd_170118d14h46m37s053830usUT.qdp
Wrote uvot_fluxes_wtd_170118d14h46m37s053830usUT.gif
Wrote uvot_fluxes_wtd_170118d14h46m37s053830usUT.ps
Normal end of uvot_fluxes_wget.pl vrs. 2016-02-01 fem