# uvot_fluxes_wget.pl vrs. 2018-01-16 fem at 180924d19h17m51s099766usUT
# /Home/eud/uvot_tdrss/perl/uvot_fluxes_wget.pl -seq=00863053992 -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
# ========= GRB180924 ===================
Could not find/read custom source region custom_863053_src.reg
Used archived BAT position of 267.57400 -31.76700
Reference: GCN_Position_Notice_Mon_24_Sep_18_00:14:56_UT
The position is (17:50:17.76, -31:46:01.2)
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(267.574,-31.767,3") # color=red dash=0
Source region spec. is: 267.574 -31.767 3"
Region file centered at (267.574,-31.767), which is (17:50:17.76, -31:46:01.2)
Could not find/read custom background region custom_863053_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 -21.64226 from uncorrected trigger time of 559440090.35 in BAT summary file
# ============ Reading file sw00863053992uwh_sk.img ================
Use keyword TRIGTIME of 559440112 for trigger time.
Long-term sensitivity correction to zero point is -0.198 at 559441038
The processing date in extension 0 is: 2018-09-24T19:04:29
The trigger time is: 559440112. The reference is keyword in image file
Using zero point of 20.092 for filter WHITE
Use aperture correction of 1.108 based on aperture of 3.00
Using background region based on sources found in extension 5:
# 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(267.574,-31.767,25")
fk5;-circle(267.574,-31.767,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 wh559441037I     925.9  0.91  147.4  725.9 111  39656  5840  0.000 0.228 99.00 19.9  0.0000 0.2280 99.00 19.9   147  0.000  0.274 99.00 0.149 
   2 wh559441037E     925.9  0.91  147.4  728.8 111  39697  5843  0.000 0.228 99.00 19.9 
   3 wh559441269E    1157.5  0.91   19.5   92.7 112   5154  5838  0.000 0.626 99.00 18.8  0.0000 0.2143 99.00 20.0   167  0.000  0.261 99.00 0.146 
   4 wh559441443E    1331.5  0.92   19.5   91.1 109   5113  5848  0.000 0.613 99.00 18.9  0.0000 0.2023 99.00 20.1   186  0.000  0.253 99.00 0.143 
   5 wh559446724I    6612.7  0.93  196.6  803.0 108  40721  5808  0.000 0.167 99.00 20.3  0.0000 0.1304 99.00 20.5   383  0.000  0.248 99.00 0.093 
    Sum (T+   926 to   6812):            1705.1       1705.1 (est. in src region)   SNR_unwtd_sum:   0.00 0.999999638888889 signif. UL:  20.54
  0   383 559444071    3959.3   2853.1  -3033.4    0.0000   0.1304 99.000 99.000 -99.000
Total wtd_rate (for all exposures so far):  0.000 +/- 0.246 snr:  0.0 mag: 99.00 UL: 19.85
Rebinned Data for sw00863053992uwh_sk.img using a zero point of 20.092:
 No Exposure     t-avg        + / -       net_rate      +/-   mag   +/-     t-avg  sum_rate     +/-   mag   +/-   UL3
  0      170    1053.8    297.4   -127.9    0.0000   0.2023 99.00 99.00    1053.8    0.0000   0.2023 99.00 99.00 20.56
  1      184    6712.6     99.9    -99.9    0.0000   0.1674 99.00 99.00    3991.7    0.0000   0.1304 99.00 99.00 21.04
=========================================================
================ Start New Filter V ==================
=========================================================
# ============ Reading file sw00863053992uvv_sk.img ================
Use keyword TRIGTIME of 559440112 for trigger time.
Long-term sensitivity correction to zero point is -0.253 at 559441319
The processing date in extension 0 is:  2018-09-24T19:04:30
The trigger time is: 559440112. The reference is keyword in image file
Using zero point of 17.637 for filter V
Use aperture correction of  1.087 based on aperture of  3.00
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(267.574,-31.767,25")
fk5;-circle(267.574,-31.767,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 vv559441319E    1207.4  0.98   19.5   26.9 115   1057  5844  0.000 0.262 99.00 17.3  0.0000 0.2620 99.00 17.3    19  0.000  3.671 99.00 0.066 
   2 vv559441493E    1381.2  0.98    7.5    5.5 111    402  5843  0.000 0.410 99.00 16.8  0.0000 0.2209 99.00 17.5    27  0.000  3.201 99.00 0.064 
   3 vv559445699I    5587.5  0.97  196.6  340.6 116  17404  5876  0.000 0.107 99.00 18.3  0.0000 0.0974 99.00 18.4   224  0.000  2.909 99.00 0.013 
   4 vv559447135I    7023.1  0.98  196.6  177.9 116   9638  5844  0.000 0.079 99.00 18.6  0.0000 0.0634 99.00 18.9   420  0.000  2.651 99.00 0.013 
    Sum (T+  1207 to   7223):             563.3        563.3 (est. in src region)   SNR_unwtd_sum:   0.00 0.999999638888889 signif. UL:  18.86
  0   420 559446187    6075.0   1147.9  -4867.6    0.0000   0.0634 99.000 99.000 -99.000
Total wtd_rate (for all exposures so far):  0.000 +/- 0.241 snr:  0.0 mag: 99.00 UL: 17.42
Rebinned Data for sw00863053992uvv_sk.img using a zero point of 17.637:
 No Exposure     t-avg        + / -       net_rate      +/-   mag   +/-     t-avg  sum_rate     +/-   mag   +/-   UL3
  0     26.5    1264.1    124.8    -56.7    0.0000   0.2209 99.00 99.00    1264.1    0.0000   0.2209 99.00 99.00 18.01
  1      384    6409.9    813.0   -822.4    0.0000   0.0661 99.00 99.00    6077.9    0.0000   0.0634 99.00 99.00 19.36
=========================================================
================ Start New Filter B ==================
=========================================================
# ============ Reading file sw00863053992ubb_sk.img ================
Use keyword TRIGTIME of 559440112 for trigger time.
Long-term sensitivity correction to zero point is -0.145 at 559441245
The processing date in extension 0 is:  2018-09-24T19:04:30
The trigger time is: 559440112. The reference is keyword in image file
Using zero point of 18.965 for filter B
Use aperture correction of  1.108 based on aperture of  3.00
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(267.574,-31.767,25")
fk5;-circle(267.574,-31.767,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 bb559441245E    1133.2  0.97   19.5   27.7 110   1697  5841  0.000 0.334 99.00 18.4  0.0000 0.3342 99.00 18.4    19  0.000  1.294 99.00 0.153 
   2 bb559441418E    1306.5  0.97   19.5   39.0 110   1668  5856  0.000 0.331 99.00 18.4  0.0000 0.2351 99.00 18.8    39  0.000  0.973 99.00 0.144 
   3 bb559446520I    6408.0  0.97  196.6  366.3 112  17777  5872  0.000 0.108 99.00 19.6  0.0000 0.0981 99.00 19.7   236  0.000  0.901 99.00 0.044 
    Sum (T+  1133 to   6608):             402.4        402.4 (est. in src region)   SNR_unwtd_sum:   0.00 0.999999638888889 signif. UL:  19.72
  0   236 559445748    5636.0    971.9  -4502.7    0.0000   0.0981 99.000 99.000 -99.000
Total wtd_rate (for all exposures so far):  0.000 +/- 0.236 snr:  0.0 mag: 99.00 UL: 18.77
Rebinned Data for sw00863053992ubb_sk.img using a zero point of 18.965:
 No Exposure     t-avg        + / -       net_rate      +/-   mag   +/-     t-avg  sum_rate     +/-   mag   +/-   UL3
  0     37.8    1229.7     96.5    -96.5    0.0000   0.2351 99.00 99.00    1229.7    0.0000   0.2351 99.00 99.00 19.27
  1      191    6507.9     99.9    -99.9    0.0000   0.1080 99.00 99.00    5634.2    0.0000   0.0981 99.00 99.00 20.22
=========================================================
================ Start New Filter U ==================
=========================================================
# ============ Reading file sw00863053992uuu_sk.img ================
Use keyword TRIGTIME of 559440112 for trigger time.
Long-term sensitivity correction to zero point is -0.157 at 559441220
The processing date in extension 0 is:  2018-09-24T19:04:30
The trigger time is: 559440112. The reference is keyword in image file
Using zero point of 18.183 for filter U
Use aperture correction of  1.100 based on aperture of  3.00
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(267.574,-31.767,25")
fk5;-circle(267.574,-31.767,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 uu559441220E    1108.4  0.98   19.5   21.4 116   1096  5841  0.000 0.271 99.00 17.8  0.0000 0.2712 99.00 17.8    19  0.000  2.111 99.00 0.113 
   2 uu559441393E    1281.5  0.98   19.4   14.0 113   1103  5846  0.000 0.269 99.00 17.8  0.0000 0.1908 99.00 18.2    39  0.000  1.589 99.00 0.106 
   3 uu559446314I    6202.7  0.99  196.6  175.7 108   7969  5824  0.000 0.070 99.00 19.3  0.0000 0.0660 99.00 19.4   236  0.000  1.409 99.00 0.047 
    Sum (T+  1108 to   6402):             190.9        190.9 (est. in src region)   SNR_unwtd_sum:   0.00 0.999999638888889 signif. UL:  19.37
  0   236 559445573    5460.5    941.9  -4352.1    0.0000   0.0660 99.000 99.000 -99.000
Total wtd_rate (for all exposures so far):  0.000 +/- 0.231 snr:  0.0 mag: 99.00 UL: 18.01
Rebinned Data for sw00863053992uuu_sk.img using a zero point of 18.183:
 No Exposure     t-avg        + / -       net_rate      +/-   mag   +/-     t-avg  sum_rate     +/-   mag   +/-   UL3
  0     38.2    1204.8     96.5    -96.4    0.0000   0.1908 99.00 99.00    1204.8    0.0000   0.1908 99.00 99.00 18.71
  1      194    6302.6     99.9    -99.9    0.0000   0.0695 99.00 99.00    5464.4    0.0000   0.0660 99.00 99.00 19.87
=========================================================
================ Start New Filter UVW1 ==================
=========================================================
# ============ Reading file sw00863053992uw1_sk.img ================
Use keyword TRIGTIME of 559440112 for trigger time.
Long-term sensitivity correction to zero point is -0.378 at 559441196
The processing date in extension 0 is:  2018-09-24T19:04:30
The trigger time is: 559440112. The reference is keyword in image file
Using zero point of 17.062 for filter UVW1
Use aperture correction of  1.123 based on aperture of  3.00
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(267.574,-31.767,25")
fk5;-circle(267.574,-31.767,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 w1559441196E   19.5    239  5844  2.105  0.136
   1 w1559441196E    1084.1  1.00   19.5    3.2 115    239  5844  0.000 0.127 99.00 17.5  0.0000 0.1270 99.00 17.5    19  0.000  2.718 99.00 0.192 
High bkg:   2 w1559441369E   19.5    216  5840  1.904  0.129
   2 w1559441369E    1257.0  1.00   19.5    2.2 112    216  5840  0.000 0.119 99.00 17.6  0.0000 0.0871 99.00 17.9    39  0.000  1.999 99.00 0.191 
High bkg:   3 w1559446109I  196.6   2201  5856  1.912  0.041
   3 w1559446109I    5997.4  1.00  196.6   49.1 112   2201  5856  0.000 0.038 99.00 18.9  0.0000 0.0345 99.00 19.0   236  0.000  1.826 99.00 0.065 
    Sum (T+  1084 to   6197):              51.0         51.0 (est. in src region)   SNR_unwtd_sum:   0.00 0.999999638888889 signif. UL:  18.95
  0   236 559445397    5285.2    912.0  -4201.1    0.0000   0.0345 99.000 99.000 -99.000
Total wtd_rate (for all exposures so far):  0.000 +/- 0.234 snr:  0.0 mag: 99.00 UL: 16.87
Rebinned Data for sw00863053992uw1_sk.img using a zero point of 17.062:
 No Exposure     t-avg        + / -       net_rate      +/-   mag   +/-     t-avg  sum_rate     +/-   mag   +/-   UL3
  0     38.8    1180.5     96.3    -96.3    0.0000   0.0871 99.00 99.00    1180.5    0.0000   0.0871 99.00 99.00 18.44
  1      196    6097.3     99.9    -99.9    0.0000   0.0376 99.00 99.00    5285.3    0.0000   0.0345 99.00 99.00 19.45
=========================================================
================ Start New Filter UVM2 ==================
=========================================================
# ============ Reading file sw00863053992um2_sk.img ================
Use keyword TRIGTIME of 559440112 for trigger time.
Long-term sensitivity correction to zero point is -0.360 at 559441344
The processing date in extension 0 is:  2018-09-24T19:04:30
The trigger time is: 559440112. The reference is keyword in image file
Using zero point of 16.490 for filter UVM2
Use aperture correction of  1.106 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(267.574,-31.767,25")
fk5;-circle(267.574,-31.767,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 m2559441344E   19.5    172  5845  1.514  0.115
#  1 m2559441344E    1232.3  1.00   19.5    2.0 110    172  5845 
High bkg:   2 m2559445904I  196.6    555  5820  0.485  0.021
   2 m2559445904I    5792.2  1.00  196.6    8.8 104    555  5820  0.000 0.018 99.00 19.1  0.0000 0.0179 99.00 19.1   197  0.000  3.489 99.00 0.101 
High bkg:   3 m2559447339I   40.5    108  5828  0.457  0.044
   3 m2559447339I    7227.8  1.00   40.5    1.0 108    108  5828  0.000 0.039 99.00 18.2  0.0000 0.0163 99.00 19.2   237  0.000  3.269 99.00 0.099 
    Sum (T+  5792 to   7269):              11.9         11.9 (est. in src region)   SNR_unwtd_sum:   0.00 0.999999638888889 signif. UL:  19.20
  0   237 559446236    6123.6   1145.3   -331.3    0.0000   0.0163 99.000 99.000 -99.000
Total wtd_rate (for all exposures so far):  0.000 +/- 0.230 snr:  0.0 mag: 99.00 UL: 16.32
Rebinned Data for sw00863053992um2_sk.img using a zero point of 16.490:
 No Exposure     t-avg        + / -       net_rate      +/-   mag   +/-     t-avg  sum_rate     +/-   mag   +/-   UL3
  0      237    6123.6   1145.3   -331.3    0.0000   0.0163 99.00 99.00    6123.6    0.0000   0.0163 99.00 99.00 19.69
=========================================================
================ Start New Filter UVW2 ==================
=========================================================
# ============ Reading file sw00863053992uw2_sk.img ================
Use keyword TRIGTIME of 559440112 for trigger time.
Long-term sensitivity correction to zero point is -0.461 at 559441295
The processing date in extension 0 is:  2018-09-24T19:04:30
The trigger time is: 559440112. The reference is keyword in image file
Using zero point of 16.919 for filter UVW2
Use aperture correction of  1.108 based on aperture of  3.00
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(267.574,-31.767,25")
fk5;-circle(267.574,-31.767,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 w2559441294E   19.5    152  5845  1.334  0.108
   1 w2559441294E    1183.0  1.00   19.5    3.0 114    152  5845  0.000 0.099 99.00 17.7  0.0000 0.0991 99.00 17.7    19  0.000  2.636 99.00 0.247 
High bkg:   2 w2559441468E   19.5    137  5835  1.202  0.103
   2 w2559441468E    1356.8  1.00   19.5    3.0 113    137  5835  0.000 0.094 99.00 17.7  0.0000 0.0682 99.00 18.1    39  0.000  1.936 99.00 0.244 
High bkg:   3 w2559446930I  196.6   1229  5872  1.065  0.030
   3 w2559446930I    6818.4  1.00  196.6   27.6 116   1229  5872  0.000 0.028 99.00 19.0  0.0000 0.0260 99.00 19.1   236  0.000  1.768 99.00 0.088 
    Sum (T+  1183 to   7018):              29.9         29.9 (est. in src region)   SNR_unwtd_sum:   0.00 0.999999638888889 signif. UL:  19.11
  0   236 559446098    5986.4   1031.8  -4803.4    0.0000   0.0260 99.000 99.000 -99.000
Total wtd_rate (for all exposures so far):  0.000 +/- 0.229 snr:  0.0 mag: 99.00 UL: 16.76
Rebinned Data for sw00863053992uw2_sk.img using a zero point of 16.919:
 No Exposure     t-avg        + / -       net_rate      +/-   mag   +/-     t-avg  sum_rate     +/-   mag   +/-   UL3
  0     38.8    1279.8     96.8    -96.8    0.0000   0.0682 99.00 99.00    1279.8    0.0000   0.0682 99.00 99.00 18.57
  1      196    6918.3     99.9    -99.9    0.0000   0.0281 99.00 99.00    5986.7    0.0000   0.0260 99.00 99.00 19.61
The data range from T+925.9 s (0.01 d) to T+7268.9 s (0.08 d)
Wrote uvot_fluxes_180924d19h17m51s099766usUT.qdp
Wrote uvot_fluxes_180924d19h17m51s099766usUT.gif
Wrote uvot_fluxes_180924d19h17m51s099766usUT.ps
Wrote uvot_fluxes_180924d19h17m51s099766usUT_vis.qdp
Wrote uvot_fluxes_180924d19h17m51s099766usUT_uv.qdp
Wrote uvot_fluxes_180924d19h17m51s099766usUT_vis.gif
Wrote uvot_fluxes_180924d19h17m51s099766usUT_vis.ps
Wrote uvot_fluxes_180924d19h17m51s099766usUT_uv.gif
Wrote uvot_fluxes_180924d19h17m51s099766usUT_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     13.4    1042.0    346.8   -116.1    0.0000   0.2368 99.00 99.00    1042.0    0.0000   0.2368 99.00 99.00 20.59
  1    0.529    6678.6    544.3  -1091.1    0.0000   0.1788 99.00 99.00    1255.9    0.0000   0.1924 99.00 99.00 20.81
The data range from T+925.9 s (0.01 d) to T+7268.9 s (0.08 d)
Wrote uvot_fluxes_wtd_180924d19h17m51s099766usUT.qdp
Wrote uvot_fluxes_wtd_180924d19h17m51s099766usUT.gif
Wrote uvot_fluxes_wtd_180924d19h17m51s099766usUT.ps
Found 9 exposures with unusual background rate
Normal end of uvot_fluxes_wget.pl vrs. 2018-01-16 fem