# uvot_fluxes_wget.pl vrs. 2018-11-07 fem at 191211d04h34m54s863808usUT
# /Home/eud/uvot_tdrss/perl/uvot_fluxes_wget.pl -seq=00020957001 -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/home/khamseen/khamseen10/uvot_tdrss/uvot_lc
# ========= unknown GRB ===================
Could not find/read custom source region custom_020957_src.reg
Used archived BAT position of 210.63400 -1.22300
Reference: GCN_FOM_Notice_Tue_10_Dec_19_17:06:23_UT
The position is (14:02:32.16, -01:13:22.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(210.634,-1.223,3") # color=red dash=0
Source region spec. is: 210.634 -1.223 3"
Region file centered at (210.634,-1.223), which is (14:02:32.16, -01:13:22.8)
Could not find/read custom background region custom_020957_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.
Failed to find trigger time in BAT summary file for trigger 00020957
# ============ Reading file sw00020957001uuu_sk.img ================
Long-term sensitivity correction to zero point is -0.172 at 597690421
The processing date in extension 0 is: 2019-12-11T04:26:10
The trigger time is: 0. The reference is trigger time unknown
Using zero point of 18.168 for filter U
Use aperture correction of 1.100 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(210.634,-1.223,25")
fk5;-circle(210.634,-1.223,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 uu597690421I 597690421.1  0.98  114.7  117.9 108   6610  5848  0.000 0.109 99.00 18.8  0.0000 0.1089 99.00 18.8   115  0.000 459619.621 99.00 0.000 
   2 uu597696887I 597696887.7  0.98  108.7   96.2 108   5429  5816  0.000 0.104 99.00 18.9  0.0000 0.0755 99.00 19.2   223  0.000 317605.715 99.00 0.000 
   3 uu597703035I 597703035.9  0.98  101.7  131.8 112   6426  5820  0.000 0.124 99.00 18.7  0.0000 0.0648 99.00 19.4   325  0.000 271484.063 99.00 0.000 
   4 uu597708031I 597708031.5  0.98  115.1  130.3 116   6192  5896  0.000 0.108 99.00 18.8  0.0000 0.0556 99.00 19.5   440  0.000 233442.655 99.00 0.000 
    Sum (T+597690421 to 597708148):             468.4        468.4 (est. in src region)   SNR_unwtd_sum:   0.00 0.999999638888889 signif. UL:  19.54
  0   440 597699593 597699593.0   8555.4  -9171.9    0.0000   0.0556 99.000 99.000 -99.000
Total wtd_rate (for all exposures so far):  0.000 +/-231259.943 snr:  0.0 mag: 99.00 UL:  2.99
Rebinned Data for sw00020957001uuu_sk.img using a zero point of 18.168:
 No Exposure     t-avg        + / -       net_rate      +/-   mag   +/-     t-avg  sum_rate     +/-   mag   +/-   UL3
  0      432 597699592.0   8556.4  -9171.0    0.0000   0.0556 99.00 99.00 597699592.0    0.0000   0.0556 99.00 99.00 20.04
The data range from T+597690421.1 s (6917.71 d) to T+597708148.4 s (6917.92 d)
Wrote uvot_fluxes_191211d04h34m54s863808usUT.qdp
Wrote uvot_fluxes_191211d04h34m54s863808usUT.gif
Wrote uvot_fluxes_191211d04h34m54s863808usUT.ps
Wrote uvot_fluxes_191211d04h34m54s863808usUT_vis.qdp
Wrote uvot_fluxes_191211d04h34m54s863808usUT_uv.qdp
Wrote uvot_fluxes_191211d04h34m54s863808usUT_vis.gif
Wrote uvot_fluxes_191211d04h34m54s863808usUT_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  2.6e-12 597699404.3   8744.1  -8983.2    0.0000   0.3906 99.00 99.00 597699404.3    0.0000   0.3906 99.00 99.00 20.04
The data range from T+597690421.1 s (6917.71 d) to T+597708148.4 s (6917.92 d)
Wrote uvot_fluxes_wtd_191211d04h34m54s863808usUT.qdp
Wrote uvot_fluxes_wtd_191211d04h34m54s863808usUT.gif
Wrote uvot_fluxes_wtd_191211d04h34m54s863808usUT.ps
Normal end of uvot_fluxes_wget.pl vrs. 2018-11-07 fem