# uvot_fluxes_wget.pl vrs. 2018-11-07 fem at 200604d04h50m06s476599usUT
# /Home/eud/uvot_tdrss/perl/uvot_fluxes_wget.pl -seq=00021002002 -use_uvot -rebin -plot_mag -sens_corr -search_src_reg -wrk_dir=/local/home/khamseen/khamseen10/uvot_tdrss/uvot_lc -web -useprev -zp_2011 -gamma=1.0 -use_filter_wtd=white v b u
# Current directory: /local/data/khamseenssd/khamseen/khamseen10/uvot_tdrss/uvot_lc
# ========= GRB200524A ===================
Could not find/read custom source region custom_021002_src.reg
Used archived opt source position of 213.04304 60.90529 3.00
Reference: GCN_Circ-27799
The position is (14:12:10.33, +60:54:19.0)
Using source region:
# Region file format: DS9 version 3.0
# uvot_fluxes.pl opt
global font="helvetica 12 bold" select=1 edit=1 move=1 delete=1 include=1 fixed=0 source=1
fk5;circle(213.043037,60.905288,3") # color=red dash=0
Source region spec. is: 213.043037 60.905288 3"
Region file centered at (213.043037,60.905288), which is (14:12:10.33, +60:54:19.0)
Could not find/read custom background region custom_021002_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 -24.98374 from uncorrected trigger time of 611989440.36 in BAT summary file
# ============ Reading file sw00021002002uwh_sk.img ================
Long-term sensitivity correction to zero point is -0.225 at 612106132
The processing date in extension 0 is: 2020-06-04T04:36:30
The trigger time is: 611989465.34374. The reference is BAT GRB summary file
Using zero point of 20.065 for filter WHITE
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(213.043037,60.905288,25")
fk5;-circle(213.043037,60.905288,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 wh612106132I  209.4  11635  5820  9.546  0.089
   1 wh612106132I  116667.0  0.98  209.4  278.3 108  11635  5828  0.339 0.091 21.24 20.6  0.3385 0.0907 21.24 20.6   209 48.650 13.028 16.07 0.007 
Low  bkg:   2 wh612106348I  858.8  45977  5848  9.154  0.043
   2 wh612106348I  116882.9  0.98  858.8 1001.8 112  45977  5855  0.161 0.042 22.05 21.4  0.1956 0.0381 21.84 21.3  1068 28.212  5.499 16.66 0.007 
Low  bkg:   3 wh612108293I   29.4   1598  5868  9.262  0.232
   3 wh612108293I  118827.7  0.98   29.4   44.4 116   1598  5890  0.499 0.259 20.82 19.8  0.2037 0.0377 21.79 21.3  1098 29.324  5.444 16.62 0.007 
Low  bkg:   4 wh612108325I  291.1  16256  5848  9.549  0.075
   4 wh612108325I  118860.1  0.98  291.1  316.5 112  16256  5845  0.020 0.070 24.34 21.6  0.1651 0.0332 22.02 21.5  1389 24.077  4.809 16.84 0.007 
   5 wh612108624I  119159.1  0.98    9.5   15.6 104    580  5861  0.626 0.472 20.57 19.3  0.1682 0.0331 22.00 21.5  1398 24.504  4.799 16.82 0.007 
Low  bkg:   6 wh612111924I  204.5  11246  5820  9.450  0.089
   6 wh612111924I  122458.9  0.98  204.5  221.8 108  11246  5821  0.073 0.083 22.91 21.3  0.1561 0.0308 22.08 21.6  1603 22.877  4.482 16.89 0.007 
Low  bkg:   7 wh612112134I    5.8    303  5876  8.894  0.511
   7 wh612112134I  122669.6  0.99    5.8    3.7 116    303  5854 -0.444 0.379 99.00 20.2  0.1539 0.0307 22.10 21.6  1609 22.573  4.471 16.91 0.007 
Low  bkg:   8 wh612114020I   29.3   1585  5876  9.209  0.231
   8 wh612114020I  124555.2  0.98   29.3   35.7 116   1585  5885  0.172 0.232 21.98 20.2  0.1542 0.0304 22.09 21.6  1638 22.632  4.436 16.90 0.007 
Low  bkg:   9 wh612114052I  288.9  16174  5876  9.527  0.075
   9 wh612114052I  124587.5  0.98  288.9  354.7 116  16174  5880  0.139 0.074 22.21 21.2  0.1519 0.0282 22.11 21.6  1927 22.465  4.134 16.91 0.006 
    Sum (T+116667 to 124881):            2272.5       2013.2 (est. in src region)   SNR_unwtd_sum:   5.39 0.9987 signif. UL:  21.63
  0  1927 612108808  119342.2   5538.9  -2675.2    0.1519   0.0282 22.111  0.222  -0.185
Total wtd_rate (for all exposures so far): 22.465 +/- 4.099 snr:  5.5 mag: 16.91 UL: 16.21
Rebinned Data for sw00021002002uwh_sk.img using a zero point of 20.065:
 No Exposure     t-avg        + / -       net_rate      +/-   mag   +/-     t-avg  sum_rate     +/-   mag   +/-   UL3
  0 1.89e+03  119342.4   5538.6  -2675.5    0.1519   0.0282 22.11  0.19  119342.4    0.1519   0.0282 22.11  0.19 21.63
The data range from T+116667.0 s (1.35 d) to T+124881.0 s (1.45 d)
Wrote uvot_fluxes_200604d04h50m06s476599usUT.qdp
Wrote uvot_fluxes_200604d04h50m06s476599usUT.gif
Wrote uvot_fluxes_200604d04h50m06s476599usUT.ps
Wrote uvot_fluxes_200604d04h50m06s476599usUT_vis.qdp
Wrote uvot_fluxes_200604d04h50m06s476599usUT_uv.qdp
Wrote uvot_fluxes_200604d04h50m06s476599usUT_vis.gif
Wrote uvot_fluxes_200604d04h50m06s476599usUT_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.00479  116773.4    106.4   -106.4    0.4166   0.1116 21.24  0.26  116773.4    0.4166   0.1116 21.24  0.26 20.60
  1   0.0431  119502.7   5378.4  -2619.8    0.1525   0.0364 22.33  0.23  119229.6    0.1784   0.0346 22.16  0.19 21.66
The data range from T+116667.0 s (1.35 d) to T+124881.0 s (1.45 d)
Wrote uvot_fluxes_wtd_200604d04h50m06s476599usUT.qdp
Wrote uvot_fluxes_wtd_200604d04h50m06s476599usUT.gif
Wrote uvot_fluxes_wtd_200604d04h50m06s476599usUT.ps
Found 8 exposures with unusual background rate
Normal end of uvot_fluxes_wget.pl vrs. 2018-11-07 fem