# uvot_fluxes_wget.pl vrs. 2012-06-15 fem at 140401d14h18m04s934053usUT
# /Home/eud/uvot_tdrss/perl/uvot_fluxes_wget.pl -seq=00020372001 -use_uvot -rebin -plot_mag -sens_corr -search_src_reg -wrk_dir=/local/home/khamseen/khamseen10/uvot_tdrss/uvot_lc -web -useprev -zp_2011 -search_src_reg -gamma=1.0 -use_filter_wtd=white v b u
# Current directory: /local/home/khamseen/khamseen10/uvot_tdrss/uvot_lc
# ========= GRB140330A ===================
Used archived BAT position of 325.59000 -64.30000
Reference: GCN_Circ-16048
The position is (21:42:21.60, -64:17:60.0)
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(325.59,-64.30,3") # color=red dash=0
Region file centered at (325.59,-64.30), which is (21:42:21.60, -64:17:60.0)
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 57600.0,
3 sigma should become about 5.6 sigma and 2 sigma should become about 5.1 sigma.
Accordingly confidence limits in the tables have been adjusted from 0.9987 to 0.99999998.
No adjustment has been made for the confidence limits for the rebinned data or the plots.
Subtract UTCF of -11.8103 from trigger time of 417845994.45 in BAT summary file
# ============ Reading file sw00020372001uwh_sk.img ================
Long-term sensitivity correction is 0.094 at 417948027
The processing date in extension 0 is: 2014-04-01T14:01:13
The trigger time is: 417846006.2603. The reference is BAT GRB summary file
Using zero point of 20.384 for filter WHITE
Use aperture correction of 1.108 based on aperture of 3.00
Using background region based on sources found in extension 13:
# 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(325.59,-64.30,25")
fk5;-circle(325.59,-64.30,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 wh417948026I  102020.3  0.94   57.8  223.6 116  10385  5864  0.000 0.309 99.00 19.8  0.0000 0.3089 99.00 19.8    58  0.000 28.898 99.00 0.003 
   2 wh417948088I  102081.8  0.91  358.8 1752.7 108  93409  5828  0.000 0.146 99.00 20.6  0.0000 0.1331 99.00 20.7   417  0.000 12.414 99.00 0.002 
High bkg:   3 wh417948680I   19.3   9162  5856 81.266  0.849
   3 wh417948680I  102674.7  0.84   19.3  168.7 112   9162  5856  0.000 0.951 99.00 18.6  0.0000 0.1334 99.00 20.7   436  0.000 12.297 99.00 0.002 
above line uses coinc_corr_src:  0.845 corr_bkg:  0.845
   4 wh417953806I  107799.8  0.94   55.9  181.9 116   9829  5848  0.000 0.307 99.00 19.8  0.0000 0.1232 99.00 20.8   492  0.000 11.399 99.00 0.002 
   5 wh417953865I  107859.4  0.91  342.1 1623.7 108  90324  5820  0.000 0.151 99.00 20.6  0.0000 0.0956 99.00 21.1   834  0.000  9.078 99.00 0.002 
   6 wh417954438I  108432.3  0.89   19.6  104.0 116   6269  5864  0.000 0.732 99.00 18.9  0.0000 0.0949 99.00 21.1   854  0.000  9.008 99.00 0.002 
above line uses coinc_corr_src:  0.894 corr_bkg:  0.894
   7 wh417957692I  111686.4  0.98  210.4  281.3 108  14405  5824  0.000 0.089 99.00 21.1  0.0000 0.0774 99.00 21.3  1064  0.000  6.407 99.00 0.002 
   8 wh417957909I  111903.2  0.98  227.9  336.5 120  16000  5876  0.000 0.091 99.00 21.1  0.0000 0.0653 99.00 21.5  1292  0.000  5.282 99.00 0.003 
   9 wh417959800I  113794.0  0.92   36.2  164.7 112   9190  5856  0.000 0.474 99.00 19.3  0.0000 0.0648 99.00 21.5  1328  0.000  5.253 99.00 0.003 
  10 wh417959839I  113833.3  0.91  224.9 1098.6 104  61256  5796  0.000 0.187 99.00 20.3  0.0000 0.0616 99.00 21.5  1553  0.000  5.073 99.00 0.002 
High bkg:  11 wh417960214I   10.7   4182  5864 66.417  1.027
  11 wh417960214I  114208.5  0.87   10.7   87.0 116   4182  5864  0.000 1.134 99.00 18.4  0.0000 0.0616 99.00 21.5  1564  0.000  5.068 99.00 0.002 
above line uses coinc_corr_src:  0.872 corr_bkg:  0.872
  12 wh417963452I  117445.8  0.98  210.4  273.0 116  14652  5868  0.000 0.093 99.00 21.1  0.0000 0.0552 99.00 21.7  1774  0.000  4.519 99.00 0.003 
  13 wh417963669I  117662.8  0.98  641.6  948.0 112  48672  5832  0.000 0.055 99.00 21.7  0.0000 0.0428 99.00 21.9  2416  0.000  3.590 99.00 0.003 
  14 wh417965786I  119780.2  0.92   17.5   87.6 104   4614  5812  0.000 0.684 99.00 18.9  0.0000 0.0428 99.00 21.9  2433  0.000  3.586 99.00 0.003 
  15 wh417965806I  119800.6  0.91  130.6  715.9 112  37920  5820  0.000 0.266 99.00 20.0  0.0000 0.0427 99.00 21.9  2564  0.000  3.559 99.00 0.003 
    Sum (T+102020 to 119982):            8094.9       8094.9 (est. in src region)   SNR_unwtd_sum:   0.00 0.999999977430556 signif. UL:  21.94
  0  2564 417958338  112332.0   7649.5 -10311.8    0.0000   0.0427 99.000 99.000 -99.000
Total wtd_rate (for all exposures so far):  0.000 +/- 3.496 snr:  0.0 mag: 99.00 UL: 17.16
Rebinned Data for sw00020372001uwh_sk.img using a zero point of 20.384:
 No Exposure     t-avg        + / -       net_rate      +/-   mag   +/-     t-avg  sum_rate     +/-   mag   +/-   UL3
  0 2.42e+03  112440.1   7541.5 -10419.8    0.0000   0.0427 99.00 99.00  112440.1    0.0000   0.0427 99.00 99.00 22.54
The data range from T+102020.3 s (1.18 d) to T+119981.5 s (1.39 d)
Wrote uvot_fluxes_140401d14h18m04s934053usUT.qdp
Wrote uvot_fluxes_140401d14h18m04s934053usUT.gif
Wrote uvot_fluxes_140401d14h18m04s934053usUT.ps
Wrote uvot_fluxes_140401d14h18m04s934053usUT_vis.qdp
Wrote uvot_fluxes_140401d14h18m04s934053usUT_uv.qdp
Wrote uvot_fluxes_140401d14h18m04s934053usUT_vis.gif
Wrote uvot_fluxes_140401d14h18m04s934053usUT_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.0862  113968.2   6013.3 -11948.0    0.0000   0.0312 99.00 99.00  113968.2    0.0000   0.0312 99.00 99.00 22.79
The data range from T+102020.3 s (1.18 d) to T+119981.5 s (1.39 d)
Wrote uvot_fluxes_wtd_140401d14h18m04s934053usUT.qdp
Wrote uvot_fluxes_wtd_140401d14h18m04s934053usUT.gif
Wrote uvot_fluxes_wtd_140401d14h18m04s934053usUT.ps
Found 2 exposures with unusual background rate
Normal end of uvot_fluxes_wget.pl vrs. 2012-06-15 fem