# uvot_fluxes_wget.pl vrs. 2020-11-03a fem at 210513d00h04m31s704108usUT
# /Home/eud/uvot_tdrss/perl/uvot_fluxes_wget.pl -seq=00021428002 -use_uvot -rebin -plot_mag -sens_corr -search_src_reg -wrk_dir=/data/uvot/swift_data/home/uvot_lc -web -useprev -zp_2011 -gamma=1.0 -use_filter_wtd=white v b u
# Current directory: /data/uvot/swift_data/home/uvot_lc
# ========= GRB210413B ===================
Could not find/read custom source region custom_021428_src.reg
Used archived uvot source position of 182.53230 56.04970 3.00
Reference: GCN_Circ_29912
The position is (12:10:07.75, +56:02:58.9)
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(182.53230,56.04970,3") # color=red dash=0
Source region spec. is: 182.53230 56.04970 3"
Region file centered at (182.53230,56.04970), which is (12:10:07.75, +56:02:58.9)
Could not find/read custom background region custom_021428_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 -26.82714 from uncorrected trigger time of 640050412.45 in BAT summary file
# ============ Reading file sw00021428002uwh_sk.img ================
Use keyword TRIGTIME of 640050439.2907 for trigger time.
Long-term sensitivity correction to zero point is -0.178 at 642495552
The processing date in extension 0 is: 2021-05-12T23:52:19
The trigger time is: 640050439.2907. The reference is keyword in image file
Using zero point of 20.112 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   -3.0 182.50173  55.89988 0.286 312.3
  2    7.7 182.50188  55.89676 0.286 312.3
  3    2.5 182.50073  55.89806 0.286 312.3
  4    0.5 182.47943  55.89461 0.286 312.3
  5    9.8 182.47870  55.89173 0.286 312.3
  6    7.5 182.47876  55.89242 0.286 312.3
Using background region based on sources found in extension 11:
# 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(182.53230,56.04970,25")
fk5;-circle(182.53230,56.04970,12.5")
fk5;-circle(182.539248,56.050309,6")
 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 wh642495552I   37.2   1173  5524  5.713  0.167
%  1 wh642495552I 2445113.0  0.98   37.2   57.8 116   1173  5593 
Low  bkg:   2 wh642495592I  375.7  10429  5528  5.021  0.049
%  2 wh642495592I 2445153.3  0.98  375.7  716.3 116  10429  5589 
Low  bkg:   3 wh642495977I   42.4   1456  5548  6.190  0.162
%  3 wh642495977I 2445538.5  0.97   42.4   97.3 116   1456  5628 
Low  bkg:   4 wh642506772I   66.7    894  5572  2.405  0.080
%  4 wh642506772I 2456333.4  1.00   66.7    0.0 116    894  5547 
Low  bkg:   5 wh642506843I  671.0   9499  5548  2.552  0.026
%  5 wh642506843I 2456403.9  1.00  671.0    0.0 104   9499  5521 
Low  bkg:   6 wh642507529I   70.8   1311  5548  3.339  0.092
%  6 wh642507529I 2457089.7  1.00   70.8    0.0 112   1311  5512 
   7 wh642513183I 2462743.9  0.97   11.6   31.1 116    652  5573  1.726 0.550 19.52 18.8  1.7258 0.5504 19.52 18.8    12 5009.262 1597.760 11.04 0.000 
   8 wh642513197I 2462758.2  0.97  116.9  247.9 108   6687  5544  1.146 0.154 19.96 19.6  1.1980 0.1488 19.91 19.6   128 3470.950 431.470 11.44 0.000 
   9 wh642513319I 2462879.8  0.97   30.3   87.9 112   1742  5599  2.008 0.356 19.36 18.9  1.3517 0.1382 19.78 19.5   159 3906.191 400.243 11.31 0.000 
  10 wh642541683I 2491244.2  0.98   45.1   92.7 120   2568  5576  0.942 0.244 20.18 19.6  1.2607 0.1204 19.86 19.6   204 3672.967 350.490 11.38 0.000 
  11 wh642541731I 2491292.5  0.98  304.2  572.3 116  17061  5567  0.808 0.090 20.34 20.0  0.9895 0.0723 20.12 19.9   508 2904.735 211.730 11.63 0.000 
    Sum (T+2462744 to 2491602):            1031.9        589.5 (est. in src region)   SNR_unwtd_sum:  13.69 0.9987 signif. UL:  19.91
  0   508 642532925 2482485.4   9116.1 -19741.5    0.9895   0.0723 20.123  0.082  -0.077
Total wtd_rate (for all exposures so far): 2904.735 +/-210.504 snr: 13.8 mag: 11.63 UL: 11.24
Rebinned Data for sw00021428002uwh_sk.img using a zero point of 20.112:
 No Exposure     t-avg        + / -       net_rate      +/-   mag   +/-     t-avg  sum_rate     +/-   mag   +/-   UL3
  0      495 2482515.3   9086.3 -19771.4    0.9895   0.0723 20.12  0.08 2482515.3    0.9895   0.0723 20.12  0.08 19.91
The data range from T+2462743.9 s (28.50 d) to T+2491601.6 s (28.84 d)
Wrote uvot_fluxes_210513d00h04m31s704108usUT.qdp
Wrote uvot_fluxes_210513d00h04m31s704108usUT.gif
Wrote uvot_fluxes_210513d00h04m31s704108usUT.ps
Wrote uvot_fluxes_210513d00h04m31s704108usUT_vis.qdp
Wrote uvot_fluxes_210513d00h04m31s704108usUT_uv.qdp
Wrote uvot_fluxes_210513d00h04m31s704108usUT_vis.gif
Wrote uvot_fluxes_210513d00h04m31s704108usUT_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 3.32e-07 2462749.8      5.9     -5.9    2.0340   0.6488 19.52  0.30 2462749.8    2.0340   0.6488 19.52  0.30 18.79
  1 6.69e-06 2469863.2  21426.8  -7105.0    1.4106   0.1442 19.92  0.11 2469526.3    1.4401   0.1408 19.89  0.10 19.61
  2 1.22e-05 2491447.0    154.5   -154.5    0.9529   0.1058 20.34  0.11 2483442.9    1.1298   0.0846 20.16  0.08 19.94
The data range from T+2462743.9 s (28.50 d) to T+2491601.6 s (28.84 d)
Wrote uvot_fluxes_wtd_210513d00h04m31s704108usUT.qdp
Wrote uvot_fluxes_wtd_210513d00h04m31s704108usUT.gif
Wrote uvot_fluxes_wtd_210513d00h04m31s704108usUT.ps
Found 6 exposures with unusual background rate
Normal end of uvot_fluxes_wget.pl vrs. 2020-11-03a fem