# uvot_fluxes_wget.pl vrs. 2012-06-15 fem at 140412d08h40m13s891360usUT
# /Home/eud/uvot_tdrss/perl/uvot_fluxes_wget.pl -seq=00020373001 -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
# ========= GRB140402A ===================
Used archived BAT position of 207.59200 5.97100
Reference: GCN_Circ_16073
The position is (13:50:22.08, +05:58:15.6)
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(207.592,+5.971,3") # color=red dash=0
Region file centered at (207.592,+5.971), which is (13:50:22.08, +05:58:15.6)
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 3136.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.99999959.
No adjustment has been made for the confidence limits for the rebinned data or the plots.
Subtract UTCF of -11.83308 from trigger time of 418090207 in BAT summary file
# ============ Reading file sw00020373001uwh_sk.img ================
Long-term sensitivity correction is 0.094 at 418123814
The processing date in extension 0 is: 2014-04-12T08:13:41
The trigger time is: 418090218.83308. 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
Calculate distance from target to edge of image.
Ext Dist.(") RA_cent  DEC_cent width  PA
  1   14.1 207.47095   5.83818 0.286  65.2
  2   73.5 207.46983   5.82173 0.286  65.2
Using background region based on sources found in extension 3:
# 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(207.592,+5.971,25")
fk5;-circle(207.592,+5.971,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
Low  bkg:   1 wh418123813I  811.8  47435  5848  9.992  0.046
%  1 wh418123813I   33595.1  0.98  811.8 1617.2 112  47435  5848 
Low  bkg:   2 wh418129571I  284.9      0  1892  0.000  0.002
%  2 wh418129571I   39352.6  1.00  284.9    0.0   0      0  1892 
   3 wh418136098I   45879.9  0.97  447.6  838.9 116  42829  5840  0.000 0.075 99.00 21.4  0.0000 0.0752 99.00 21.4   448  0.000  3.180 99.00 0.012 
    Sum (T+ 45880 to  46335):             850.7        850.7 (est. in src region)   SNR_unwtd_sum:   0.00 0.999999585459184 signif. UL:  21.43
  0   448 418136326   46107.3    227.4   -227.4    0.0000   0.0752 99.000 99.000 -99.000
Total wtd_rate (for all exposures so far):  0.000 +/- 3.149 snr:  0.0 mag: 99.00 UL: 17.38
Rebinned Data for sw00020373001uwh_sk.img using a zero point of 20.384:
 No Exposure     t-avg        + / -       net_rate      +/-   mag   +/-     t-avg  sum_rate     +/-   mag   +/-   UL3
  0      434   46107.3    227.4   -227.4    0.0000   0.0752 99.00 99.00   46107.3    0.0000   0.0752 99.00 99.00 21.93
=========================================================
================ Start New Filter V ==================
=========================================================
# ============ Reading file sw00020373001uvv_sk.img ================
Long-term sensitivity correction is  0.139 at 418124646
The processing date in extension 0 is:  2014-04-12T08:13:41
The trigger time is: 418090218.83308. The reference is BAT GRB summary file
Using zero point of 18.029 for filter V
Use aperture correction of  1.087 based on aperture of  3.00
Calculate distance from target to edge of image.
Ext Dist.(") RA_cent  DEC_cent width  PA
  1   13.3 207.47054   5.83845 0.286  65.2
Using background region based on sources found in extension 2:
# 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(207.592,+5.971,25")
fk5;-circle(207.592,+5.971,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 vv418124645I   34427.1  1.00  172.4   75.9 116   2338  5864 
   2 vv418136559I   46341.0  0.99  447.6  210.8 116  10055  5856  0.000 0.035 99.00 19.9  0.0000 0.0349 99.00 19.9   448  0.000 13.037 99.00 0.006 
   3 vv418137018I   46799.9  0.99   13.7    4.6 116    350  5856  0.000 0.212 99.00 18.0  0.0000 0.0344 99.00 19.9   461  0.000 12.866 99.00 0.006 
    Sum (T+ 46341 to  46814):             206.1        206.1 (est. in src region)   SNR_unwtd_sum:   0.00 0.999999585459184 signif. UL:  19.93
  0   461 418136794   46575.5    238.4   -234.5    0.0000   0.0344 99.000 99.000 -99.000
Total wtd_rate (for all exposures so far):  0.000 +/- 3.005 snr:  0.0 mag: 99.00 UL: 15.07
Rebinned Data for sw00020373001uvv_sk.img using a zero point of 18.029:
 No Exposure     t-avg        + / -       net_rate      +/-   mag   +/-     t-avg  sum_rate     +/-   mag   +/-   UL3
  0      458   46575.5    238.4   -234.5    0.0000   0.0344 99.00 99.00   46575.5    0.0000   0.0344 99.00 99.00 20.42
=========================================================
================ Start New Filter U ==================
=========================================================
# ============ Reading file sw00020373001uuu_sk.img ================
Long-term sensitivity correction is  0.094 at 418122982
The processing date in extension 0 is:  2014-04-12T08:13:41
The trigger time is: 418090218.83308. The reference is BAT GRB summary file
Using zero point of 18.434 for filter U
Use aperture correction of  1.100 based on aperture of  3.00
Calculate distance from target to edge of image.
Ext Dist.(") RA_cent  DEC_cent width  PA
  1   13.2 207.47053   5.83847 0.286  65.2
  2   75.9 207.47025   5.82103 0.286  65.2
  3  105.7 207.46899   5.81281 0.286  65.2
  5   26.5 207.46231   5.83536 0.286  65.2
Using background region based on sources found in extension 4:
# 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(207.592,+5.971,25")
fk5;-circle(207.592,+5.971,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 uu418122982I   32763.5  1.00  811.8  263.4 116   7376  5864 
Low  bkg:   2 uu418128739I  811.8      0  1556  0.000  0.001
%  2 uu418128739I   38520.9  1.00  811.8    0.0   0      0  1556 
%  3 uu418134498I   44280.0  1.00   41.5    0.0   0      0     0 
   4 uu418135637I   45419.1  0.99  447.6  129.9 112   7066  5840  0.000 0.029 99.00 20.5  0.0000 0.0290 99.00 20.5   448  0.000  7.317 99.00 0.013 
Low  bkg:   5 uu418140254I   46.1    139  5880  0.513  0.044
%  5 uu418140254I   50035.4  1.00   46.1    0.0 128    139  5880 
   6 uu418141399I   51180.7  1.00   15.5    3.9 116    223  5844  0.000 0.152 99.00 18.7  0.0000 0.0285 99.00 20.5   463  0.000  7.212 99.00 0.013 
    Sum (T+ 45419 to  51196):             139.9        139.9 (est. in src region)   SNR_unwtd_sum:   0.00 0.999999585459184 signif. UL:  20.54
  0   463 418136050   45831.5   5364.9   -412.5    0.0000   0.0285 99.000 99.000 -99.000
Total wtd_rate (for all exposures so far):  0.000 +/- 2.796 snr:  0.0 mag: 99.00 UL: 15.56
Rebinned Data for sw00020373001uuu_sk.img using a zero point of 18.434:
 No Exposure     t-avg        + / -       net_rate      +/-   mag   +/-     t-avg  sum_rate     +/-   mag   +/-   UL3
  0      461   45831.6   5364.8   -412.5    0.0000   0.0285 99.00 99.00   45831.6    0.0000   0.0285 99.00 99.00 21.03
The data range from T+45419.1 s (0.53 d) to T+51196.4 s (0.59 d)
Wrote uvot_fluxes_140412d08h40m13s891360usUT.qdp
Wrote uvot_fluxes_140412d08h40m13s891360usUT.gif
Wrote uvot_fluxes_140412d08h40m13s891360usUT.ps
Wrote uvot_fluxes_140412d08h40m13s891360usUT_vis.qdp
Wrote uvot_fluxes_140412d08h40m13s891360usUT_uv.qdp
Wrote uvot_fluxes_140412d08h40m13s891360usUT_vis.gif
Wrote uvot_fluxes_140412d08h40m13s891360usUT_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.112   46101.0   5095.4   -681.9    0.0000   0.0666 99.00 99.00   46101.0    0.0000   0.0666 99.00 99.00 21.96
The data range from T+45419.1 s (0.53 d) to T+51196.4 s (0.59 d)
Wrote uvot_fluxes_wtd_140412d08h40m13s891360usUT.qdp
Wrote uvot_fluxes_wtd_140412d08h40m13s891360usUT.gif
Wrote uvot_fluxes_wtd_140412d08h40m13s891360usUT.ps
Found 4 exposures with unusual background rate
Normal end of uvot_fluxes_wget.pl vrs. 2012-06-15 fem