# uvot_fluxes_wget.pl vrs. 2018-11-07 fem at 200622d11h24m14s159330usUT
# /Home/eud/uvot_tdrss/perl/uvot_fluxes_wget.pl -seq=00021004005 -use_uvot -rebin -plot_mag -sens_corr -search_src_reg -wrk_dir=./ -web -zp_2011 -gamma=1.0 -use_filter_wtd=white v b u
# Current directory: /local/data/khamseenssd/khamseen/khamseen10/uvot_tdrss/uvot_lc/grb200613a
# ========= GRB200613A ===================
Could not find/read custom source region custom_021004_src.reg
Used archived uvot source position of 153.04178 45.75391 3.00
Reference: GCN_Circ_27944
The position is (10:12:10.03, +45:45:14.1)
Using source region:
# Region file format: DS9 version 3.0
# uvot_fluxes.pl uvot
global font="helvetica 12 bold" select=1 edit=1 move=1 delete=1 include=1 fixed=0 source=1
fk5;circle(153.04178,45.75391,3") # color=red dash=0
Source region spec. is: 153.04178 45.75391 3"
Region file centered at (153.04178,45.75391), which is (10:12:10.03, +45:45:14.1)
Could not find/read custom background region custom_021004_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.
Subtract UTCF of -25.09998 from uncorrected trigger time of 613719008.21 in BAT summary file
# ============ Reading file sw00021004005uwh_sk.img ================
Use keyword TRIGTIME of 613719033.174 for trigger time.
Long-term sensitivity correction to zero point is -0.226 at 614405620
The processing date in extension 0 is: 2020-06-21T18:08:39
The trigger time is: 613719033.174. The reference is keyword in image file
Using zero point of 20.064 for filter WHITE
Use aperture correction of 1.108 based on aperture of 3.00
Using background region based on sources found in extension 8:
# 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(153.04178,45.75391,25")
fk5;-circle(153.04178,45.75391,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 wh614405620I  686587.3  0.94  132.6  475.6 116  24749  5864 
#  2 wh614405758I  686724.9  0.95 1299.1 3478.4 116 173858  5879 
#  3 wh614407115I  688082.2  0.96  143.2  325.0 112  17681  5840 
   4 wh614410978I  691945.3  0.91   46.0  275.0 116  13105  5861  0.416 0.444 21.02 19.4  0.4159 0.4444 21.02 19.4    46 354.525 378.842 13.92 0.000 
   5 wh614411027I  691994.7  0.93  319.2 1436.9 112  69221  5846  0.415 0.143 21.02 20.2  0.4151 0.1370 21.02 20.3   365 353.988 116.225 13.92 0.000 
   6 wh614411501I  692468.2  0.93   14.9   53.4 112   2563  5917  0.389 0.589 21.09 19.2  0.4141 0.1336 21.02 20.3   380 352.827 113.237 13.92 0.000 
   7 wh614417081I  698048.0  0.95  132.6  385.4 112  18492  5876  0.289 0.174 21.41 20.3  0.3811 0.1085 21.11 20.4   513 314.700 90.267 14.04 0.000 
   8 wh614417218I  698185.7  0.95 1333.4 3789.6 112 175291  5864  0.384 0.054 21.10 20.7  0.3836 0.0492 21.10 20.7  1846 327.711 41.352 14.00 0.000 
   9 wh614418579I  699545.9  0.96  139.7  358.3 112  16925  5880  0.298 0.158 21.38 20.3  0.3775 0.0471 21.12 20.8  1986 321.824 39.573 14.02 0.000 
  10 wh614434622I  715589.1  0.95   90.3  270.5 116  13114  5857  0.138 0.213 22.21 20.3  0.3671 0.0460 21.15 20.8  2076 313.921 38.730 14.05 0.000 
  11 wh614434716I  715683.6  0.95  901.3 2503.1 112 118258  5864  0.315 0.065 21.32 20.8  0.3511 0.0376 21.20 20.9  2977 302.614 32.090 14.09 0.000 
  12 wh614435637I  716603.9  0.96  121.9  291.4 104  14950  5812  0.226 0.163 21.68 20.4  0.3462 0.0367 21.21 20.9  3099 297.870 31.322 14.11 0.000 
    Sum (T+691945 to 716728):            9363.7       8442.5 (est. in src region)   SNR_unwtd_sum:   9.44 0.9987 signif. UL:  20.91
  0  3099 614423296  704262.5  12465.2 -12317.2    0.3462   0.0367 21.215  0.122  -0.109
Total wtd_rate (for all exposures so far): 297.870 +/-31.058 snr:  9.6 mag: 14.11 UL: 13.58
Rebinned Data for sw00021004005uwh_sk.img using a zero point of 20.064:
 No Exposure     t-avg        + / -       net_rate      +/-   mag   +/-     t-avg  sum_rate     +/-   mag   +/-   UL3
  0 2.95e+03  704311.9  12415.8 -12366.7    0.3462   0.0367 21.21  0.11  704311.9    0.3462   0.0367 21.21  0.11 20.91
The data range from T+691945.3 s (8.01 d) to T+716727.8 s (8.30 d)
Wrote uvot_fluxes_200622d11h24m14s159330usUT.qdp
Wrote uvot_fluxes_200622d11h24m14s159330usUT.gif
Wrote uvot_fluxes_200622d11h24m14s159330usUT.ps
Wrote uvot_fluxes_200622d11h24m14s159330usUT_vis.qdp
Wrote uvot_fluxes_200622d11h24m14s159330usUT_uv.qdp
Wrote uvot_fluxes_200622d11h24m14s159330usUT_vis.gif
Wrote uvot_fluxes_200622d11h24m14s159330usUT_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.000828  704827.3  11900.4 -12882.0    0.4217   0.0444 21.23  0.11  704827.3    0.4217   0.0444 21.23  0.11 20.93
The data range from T+691945.3 s (8.01 d) to T+716727.8 s (8.30 d)
Wrote uvot_fluxes_wtd_200622d11h24m14s159330usUT.qdp
Wrote uvot_fluxes_wtd_200622d11h24m14s159330usUT.gif
Wrote uvot_fluxes_wtd_200622d11h24m14s159330usUT.ps
Normal end of uvot_fluxes_wget.pl vrs. 2018-11-07 fem