# uvot_fluxes_wget.pl vrs. 2018-01-16 fem at 180221d15h23m27s548942usUT
# /Home/eud/uvot_tdrss/perl/uvot_fluxes_wget.pl -seq=00811074992 -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
# ========= GRB180221 ===================
Could not find/read custom source region custom_811074_src.reg
Used archived BAT position of 326.77200 -72.86800
Reference: GCN_Position_Notice_Wed_21_Feb_18_06:32:58_UT
The position is (21:47:05.28, -72:52:04.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(326.772,-72.868,3") # color=red dash=0
Source region spec. is: 326.772 -72.868 3"
Region file centered at (326.772,-72.868), which is (21:47:05.28, -72:52:04.8)
Could not find/read custom background region custom_811074_bkg.reg
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 -20.4855 from uncorrected trigger time of 540887444.83 in BAT summary file
# ============ Reading file sw00811074992uwh_sk.img ================
Long-term sensitivity correction to zero point is -0.189 at 540890416
The processing date in extension 0 is: 2018-02-21T15:14:25
The trigger time is: 540887465.3155. The reference is BAT GRB summary file
Using zero point of 20.101 for filter WHITE
Use aperture correction of 1.108 based on aperture of 3.00
Using background region based on sources found in extension 7:
# 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(326.772,-72.868,25")
fk5;-circle(326.772,-72.868,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
High bkg:   1 wh540890415I  147.4  57584  5847 66.811  0.278
   1 wh540890415I    2950.3  0.87  147.4 1140.5 115  57584  5847  0.000 0.293 99.00 19.7  0.0000 0.2925 99.00 19.7   147  0.000  1.053 99.00 0.032 
above line uses coinc_corr_src:  0.873 corr_bkg:  0.873
High bkg:   2 wh540890415E  147.4  57502  5847 66.719  0.278
   2 wh540890415E    2950.3  0.87  147.4 1119.4 113  57502  5847  0.000 0.289 99.00 19.7 
above line uses coinc_corr_src:  0.874 corr_bkg:  0.874
   3 wh540890984I    3519.5  0.91  196.6  969.9 108  53604  5796  0.000 0.196 99.00 20.1  0.0000 0.1673 99.00 20.3   344  0.000  0.659 99.00 0.036 
High bkg:   4 wh540896147I  295.0 116864  5860 67.591  0.198
   4 wh540896147I    8682.0  0.87  295.0 2196.6 112 116864  5860  0.000 0.206 99.00 20.1  0.0000 0.1307 99.00 20.5   639  0.000  0.631 99.00 0.023 
above line uses coinc_corr_src:  0.869 corr_bkg:  0.869
   5 wh540896450I    8985.5  0.89  295.0 2016.0 116 100956  5872  0.000 0.190 99.00 20.1  0.0000 0.1078 99.00 20.8   934  0.000  0.603 99.00 0.020 
above line uses coinc_corr_src:  0.889 corr_bkg:  0.889
   6 wh540896754I    9289.0  0.92  295.0 1397.4 116  70339  5852  0.000 0.154 99.00 20.4  0.0000 0.0896 99.00 21.0  1229  0.000  0.570 99.00 0.019 
   7 wh540902777I   15312.7  0.94  295.0 1013.3 116  54679  5872  0.000 0.133 99.00 20.5  0.0000 0.0764 99.00 21.1  1524  0.000  0.555 99.00 0.019 
   8 wh540903081I   15616.3  0.97  295.0  669.0 128  30572  5892  0.000 0.101 99.00 20.8  0.0000 0.0656 99.00 21.3  1819  0.000  0.532 99.00 0.019 
   9 wh540903385I   15920.0  0.97  295.0  499.4 112  23659  5840  0.000 0.083 99.00 21.0  0.0000 0.0573 99.00 21.4  2114  0.000  0.505 99.00 0.020 
    Sum (T+  2950 to  16220):            9951.7       9951.7 (est. in src region)   SNR_unwtd_sum:   0.00 0.999999638888889 signif. UL:  21.44
  0  2114 540898438   10972.3   5247.5  -8022.0    0.0000   0.0573 99.000 99.000 -99.000
Total wtd_rate (for all exposures so far):  0.000 +/- 0.500 snr:  0.0 mag: 99.00 UL: 19.09
Rebinned Data for sw00811074992uwh_sk.img using a zero point of 20.101:
 No Exposure     t-avg        + / -       net_rate      +/-   mag   +/-     t-avg  sum_rate     +/-   mag   +/-   UL3
  0      309    3371.6    347.7   -421.3    0.0000   0.1673 99.00 99.00    3371.6    0.0000   0.1673 99.00 99.00 20.77
  1 1.64e+03   12574.1   3645.7  -3892.1    0.0000   0.0603 99.00 99.00   11116.6    0.0000   0.0573 99.00 99.00 21.94
=========================================================
================ Start New Filter V ==================
=========================================================
# ============ Reading file sw00811074992uvv_sk.img ================
Long-term sensitivity correction to zero point is -0.240 at 540890397
The processing date in extension 0 is:  2018-02-21T15:14:25
The trigger time is: 540887465.3155. The reference is BAT GRB summary file
Using zero point of 17.650 for filter V
Use aperture correction of  1.087 based on aperture of  3.00
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(326.772,-72.868,25")
fk5;-circle(326.772,-72.868,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 vv540890397E    2931.9  0.97    9.7   21.6 114    896  5844  0.000 0.486 99.00 16.7 
   2 vv540891396I    3930.8  0.99  196.6  157.5 116   8221  5844  0.000 0.072 99.00 18.7  0.0000 0.0723 99.00 18.7   197  0.000  3.318 99.00 0.026 
   3 vv540897966I   10501.1  0.99  164.0   64.7 128   2989  5888  0.000 0.054 99.00 19.0  0.0000 0.0465 99.00 19.2   361  0.000  2.960 99.00 0.024 
    Sum (T+  3931 to  10668):             228.2        228.2 (est. in src region)   SNR_unwtd_sum:   0.00 0.999999638888889 signif. UL:  19.21
  0   361 540894476    7011.0   3656.7  -3080.2    0.0000   0.0465 99.000 99.000 -99.000
Total wtd_rate (for all exposures so far):  0.000 +/- 0.484 snr:  0.0 mag: 99.00 UL: 16.67
Rebinned Data for sw00811074992uvv_sk.img using a zero point of 17.650:
 No Exposure     t-avg        + / -       net_rate      +/-   mag   +/-     t-avg  sum_rate     +/-   mag   +/-   UL3
  0      194    4030.7     99.9    -99.9    0.0000   0.0723 99.00 99.00    4030.7    0.0000   0.0723 99.00 99.00 19.23
  1      163   10584.4     83.3    -83.3    0.0000   0.0544 99.00 99.00    7023.6    0.0000   0.0465 99.00 99.00 19.71
=========================================================
================ Start New Filter B ==================
=========================================================
# ============ Reading file sw00811074992ubb_sk.img ================
Long-term sensitivity correction to zero point is -0.138 at 540890780
The processing date in extension 0 is:  2018-02-21T15:14:25
The trigger time is: 540887465.3155. The reference is BAT GRB summary file
Using zero point of 18.972 for filter B
Use aperture correction of  1.108 based on aperture of  3.00
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(326.772,-72.868,25")
fk5;-circle(326.772,-72.868,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 bb540890780I    3314.7  0.96  196.6  484.6 108  26639  5828  0.000 0.132 99.00 19.4  0.0000 0.1322 99.00 19.4   197  0.000  1.520 99.00 0.033 
   2 bb540892216I    4751.2  0.99  178.3  119.9 116   5395  5832  0.000 0.066 99.00 20.2  0.0000 0.0752 99.00 20.0   375  0.000  0.875 99.00 0.045 
   3 bb540901866I   14400.7  0.95  295.0  853.0 116  42356  5832  0.000 0.115 99.00 19.5  0.0000 0.0658 99.00 20.2   670  0.000  0.865 99.00 0.023 
   4 bb540902169I   14704.3  0.95  295.0  948.5 116  46068  5880  0.000 0.121 99.00 19.5  0.0000 0.0586 99.00 20.3   965  0.000  0.856 99.00 0.016 
   5 bb540902472I   15007.7  0.96  295.0  707.3 116  34870  5860  0.000 0.104 99.00 19.7  0.0000 0.0510 99.00 20.4  1260  0.000  0.845 99.00 0.014 
    Sum (T+  3315 to  15307):            3042.5       3042.5 (est. in src region)   SNR_unwtd_sum:   0.00 0.999999638888889 signif. UL:  20.44
  0  1260 540899118   11652.5   3655.0  -8337.8    0.0000   0.0510 99.000 99.000 -99.000
Total wtd_rate (for all exposures so far):  0.000 +/- 0.425 snr:  0.0 mag: 99.00 UL: 18.14
Rebinned Data for sw00811074992ubb_sk.img using a zero point of 18.972:
 No Exposure     t-avg        + / -       net_rate      +/-   mag   +/-     t-avg  sum_rate     +/-   mag   +/-   UL3
  0      364    4105.9    826.5   -791.2    0.0000   0.0752 99.00 99.00    4105.9    0.0000   0.0752 99.00 99.00 20.51
  1      844   14854.9    452.5   -454.2    0.0000   0.0655 99.00 99.00   11614.7    0.0000   0.0510 99.00 99.00 20.93
=========================================================
================ Start New Filter U ==================
=========================================================
# ============ Reading file sw00811074992uuu_sk.img ================
Long-term sensitivity correction to zero point is -0.149 at 540890574
The processing date in extension 0 is:  2018-02-21T15:14:25
The trigger time is: 540887465.3155. The reference is BAT GRB summary file
Using zero point of 18.191 for filter U
Use aperture correction of  1.100 based on aperture of  3.00
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(326.772,-72.868,25")
fk5;-circle(326.772,-72.868,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 uu540890574I    3109.1  0.97  196.6  343.9 112  15780  5832  0.000 0.101 99.00 18.9  0.0000 0.1009 99.00 18.9   197  0.000  2.239 99.00 0.028 
   2 uu540892011I    4545.7  1.00  196.6   57.4 116   2402  5876  0.000 0.039 99.00 19.9  0.0000 0.0537 99.00 19.6   393  0.000  1.094 99.00 0.042 
    Sum (T+  3109 to   4746):             350.5        350.5 (est. in src region)   SNR_unwtd_sum:   0.00 0.999999638888889 signif. UL:  19.60
  0   393 540891393    3927.3    818.2   -818.2    0.0000   0.0537 99.000 99.000 -99.000
Total wtd_rate (for all exposures so far):  0.000 +/- 0.393 snr:  0.0 mag: 99.00 UL: 17.44
Rebinned Data for sw00811074992uuu_sk.img using a zero point of 18.191:
 No Exposure     t-avg        + / -       net_rate      +/-   mag   +/-     t-avg  sum_rate     +/-   mag   +/-   UL3
  0      387    3935.4    810.1   -826.4    0.0000   0.0537 99.00 99.00    3935.4    0.0000   0.0537 99.00 99.00 20.10
=========================================================
================ Start New Filter UVW1 ==================
=========================================================
# ============ Reading file sw00811074992uw1_sk.img ================
Long-term sensitivity correction to zero point is -0.339 at 540891806
The processing date in extension 0 is:  2018-02-21T15:14:25
The trigger time is: 540887465.3155. The reference is BAT GRB summary file
Using zero point of 17.101 for filter UVW1
Use aperture correction of  1.123 based on aperture of  3.00
Using background region based on sources found in extension 1:
# 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(326.772,-72.868,25")
fk5;-circle(326.772,-72.868,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 w1540891806I    4340.8  1.00  196.6    8.3 112    530  5856  0.000 0.018 99.00 19.7  0.0000 0.0184 99.00 19.7   197  0.000  1.538 99.00 0.232 
    Sum (T+  4341 to   4541):              10.1         10.1 (est. in src region)   SNR_unwtd_sum:   0.00 0.999999638888889 signif. UL:  19.68
  0   197 540891906    4440.7     99.9    -99.9    0.0000   0.0184 99.000 99.000 -99.000
Total wtd_rate (for all exposures so far):  0.000 +/- 0.388 snr:  0.0 mag: 99.00 UL: 16.36
Rebinned Data for sw00811074992uw1_sk.img using a zero point of 17.101:
 No Exposure     t-avg        + / -       net_rate      +/-   mag   +/-     t-avg  sum_rate     +/-   mag   +/-   UL3
  0      196    4440.7     99.9    -99.9    0.0000   0.0184 99.00 99.00    4440.7    0.0000   0.0184 99.00 99.00 20.17
=========================================================
================ Start New Filter UVM2 ==================
=========================================================
# ============ Reading file sw00811074992um2_sk.img ================
Long-term sensitivity correction to zero point is -0.326 at 540891601
The processing date in extension 0 is:  2018-02-21T15:14:25
The trigger time is: 540887465.3155. The reference is BAT GRB summary file
Using zero point of 16.524 for filter UVM2
Use aperture correction of  1.106 based on aperture of  3.00
Using background region based on sources found in extension 1:
# 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(326.772,-72.868,25")
fk5;-circle(326.772,-72.868,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 m2540891600I    4135.6  1.00  196.6    3.2 112    169  5832  0.000 0.010 99.00 19.7  0.0000 0.0102 99.00 19.7   197  0.000  1.391 99.00 0.445 
    Sum (T+  4136 to   4335):               3.2          3.2 (est. in src region)   SNR_unwtd_sum:   0.00 0.999999638888889 signif. UL:  19.73
  0   197 540891701    4235.5     99.9    -99.9    0.0000   0.0102 99.000 99.000 -99.000
Total wtd_rate (for all exposures so far):  0.000 +/- 0.368 snr:  0.0 mag: 99.00 UL: 15.84
Rebinned Data for sw00811074992um2_sk.img using a zero point of 16.524:
 No Exposure     t-avg        + / -       net_rate      +/-   mag   +/-     t-avg  sum_rate     +/-   mag   +/-   UL3
  0      197    4235.5     99.9    -99.9    0.0000   0.0102 99.00 99.00    4235.5    0.0000   0.0102 99.00 99.00 20.23
=========================================================
================ Start New Filter UVW2 ==================
=========================================================
# ============ Reading file sw00811074992uw2_sk.img ================
Long-term sensitivity correction to zero point is -0.412 at 540891191
The processing date in extension 0 is:  2018-02-21T15:14:25
The trigger time is: 540887465.3155. The reference is BAT GRB summary file
Using zero point of 16.968 for filter UVW2
Use aperture correction of  1.108 based on aperture of  3.00
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(326.772,-72.868,25")
fk5;-circle(326.772,-72.868,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 w2540891191I    3726.0  1.00  196.6    8.7 104    453  5820  0.000 0.016 99.00 19.7  0.0000 0.0162 99.00 19.7   197  0.000  1.319 99.00 0.298 
   2 w2540897060I    9594.8  1.00  885.6   31.5 112   1510  5836  0.000 0.007 99.00 20.6  0.0000 0.0063 99.00 20.7  1082  0.000  0.978 99.00 0.176 
   3 w2540903691I   16226.0  1.00  172.6    0.7 112    244  5840  0.000 0.014 99.00 19.8  0.0000 0.0058 99.00 20.8  1255  0.000  0.959 99.00 0.169 
    Sum (T+  3726 to  16401):              41.7         41.7 (est. in src region)   SNR_unwtd_sum:   0.00 0.999999638888889 signif. UL:  20.80
  0  1255 540897398    9932.7   6468.7  -6206.7    0.0000   0.0058 99.000 99.000 -99.000
Total wtd_rate (for all exposures so far):  0.000 +/- 0.344 snr:  0.0 mag: 99.00 UL: 16.36
Rebinned Data for sw00811074992uw2_sk.img using a zero point of 16.968:
 No Exposure     t-avg        + / -       net_rate      +/-   mag   +/-     t-avg  sum_rate     +/-   mag   +/-   UL3
  0      196    3825.8     99.9    -99.9    0.0000   0.0162 99.00 99.00    3825.8    0.0000   0.0162 99.00 99.00 20.18
  1 1.06e+03   11067.4   5333.9  -1472.6    0.0000   0.0061 99.00 99.00    9932.9    0.0000   0.0058 99.00 99.00 21.30
The data range from T+2950.3 s (0.03 d) to T+16401.4 s (0.19 d)
Wrote uvot_fluxes_180221d15h23m27s548942usUT.qdp
Wrote uvot_fluxes_180221d15h23m27s548942usUT.gif
Wrote uvot_fluxes_180221d15h23m27s548942usUT.ps
Wrote uvot_fluxes_180221d15h23m27s548942usUT_vis.qdp
Wrote uvot_fluxes_180221d15h23m27s548942usUT_uv.qdp
Wrote uvot_fluxes_180221d15h23m27s548942usUT_vis.gif
Wrote uvot_fluxes_180221d15h23m27s548942usUT_vis.ps
Wrote uvot_fluxes_180221d15h23m27s548942usUT_uv.gif
Wrote uvot_fluxes_180221d15h23m27s548942usUT_uv.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     2.45    3589.2   1343.1   -638.9    0.0000   0.1508 99.00 99.00    3589.2    0.0000   0.1508 99.00 99.00 21.08
  1      1.4   12681.2   3538.6  -3999.3    0.0000   0.0608 99.00 99.00    6889.5    0.0000   0.0644 99.00 99.00 22.00
The data range from T+2950.3 s (0.03 d) to T+16401.4 s (0.19 d)
Wrote uvot_fluxes_wtd_180221d15h23m27s548942usUT.qdp
Wrote uvot_fluxes_wtd_180221d15h23m27s548942usUT.gif
Wrote uvot_fluxes_wtd_180221d15h23m27s548942usUT.ps
Found 3 exposures with unusual background rate
Normal end of uvot_fluxes_wget.pl vrs. 2018-01-16 fem