# uvot_fluxes_wget.pl vrs. 2018-11-07 fem at 190811d07h01m29s265286usUT
# /Home/eud/uvot_tdrss/perl/uvot_fluxes_wget.pl -seq=00020914002 -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
# ========= GRB190731A ===================
Could not find/read custom source region custom_020914_src.reg
Used archived XRT position of 339.72017 -76.57744 4.00
Reference: GCN_Circulars-25251-Thu,_1_Aug_2019_17:25:05_-0400
The position is (22:38:52.84, -76:34:38.8)
Using source region:
# Region file format: DS9 version 3.0
# uvot_fluxes.pl xrt
global font="helvetica 12 bold" select=1 edit=1 move=1 delete=1 include=1 fixed=0 source=1
fk5;circle(339.72017,-76.57744,4") # color=red dash=0
Source region spec. is: 339.72017 -76.57744 4"
Region file centered at (339.72017,-76.57744), which is (22:38:52.84, -76:34:38.8)
Could not find/read custom background region custom_020914_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 -23.3197 from uncorrected trigger time of 586305500.37 in BAT summary file
# ============ Reading file sw00020914001uvv_sk.img ================
Use keyword TRIGTIME of 586305523.388 for trigger time.
Long-term sensitivity correction to zero point is -0.271 at 586345072
The processing date in extension 0 is: 2019-08-11T06:47:21
The trigger time is: 586305523.388. The reference is keyword in image file
Using zero point of 17.619 for filter V
Use aperture correction of 1.030 based on aperture of 4.00
Calculate distance from target to edge of image.
Ext Dist.(") RA_cent  DEC_cent width  PA
  1  -29.6 339.97242 -76.62581 0.134 148.3
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(339.72017,-76.57744,25")
fk5;-circle(339.72017,-76.57744,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 vv586345072I   39548.6  0.99  295.0  168.1 204   4509  5821 
   2 vv586345375I   39852.2  0.99  295.0  167.8 204   4450  5813  0.041 0.046 21.09 19.5  0.0410 0.0462 21.09 19.5   295 19.183 21.625 17.08 0.004 
    Sum (T+ 39852 to  40152):             167.8        156.2 (est. in src region)   SNR_unwtd_sum:   0.89 0.9987 signif. UL:  19.46
  0   295 586345525   40002.0    149.9   -149.9    0.0410   0.0462 21.088 77.912  -0.820
Total wtd_rate (for all exposures so far): 19.183 +/-21.280 snr:  0.9 mag: 17.08 UL: 12.80
# ============ Reading file sw00020914002uvv_sk.img ================
Use keyword TRIGTIME of 586305523.388 for trigger time.
Long-term sensitivity correction to zero point is -0.271 at 586368312
The processing date in extension 0 is:  2019-08-11T06:47:49
The trigger time is: 586305523.388. The reference is keyword in image file
Using zero point of 17.619 for filter V
Use aperture correction of  1.030 based on aperture of  4.00
Using background region based on sources found in extension 1:
# 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(339.72017,-76.57744,25")
fk5;-circle(339.72017,-76.57744,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 vv586368312I   62788.8  1.00  129.1   60.9 196   1966  5820 -0.042 0.064 99.00 19.5 -0.0424 0.0637 99.00 19.5   129 -31.221 46.842 99.00 0.003 
    Sum (T+ 62789 to  62920):              60.9         66.2 (est. in src region)   SNR_unwtd_sum:  -0.67 0.9987 signif. UL:  19.52
  0   129 586368378   62854.4     65.6    -65.6   -0.0424   0.0637 99.000 99.000 -99.000
Total wtd_rate (for all exposures so far): 11.381 +/-19.345 snr:  0.6 mag: 17.65 UL: 12.98
Rebinned Data for sw00020914002uvv_sk.img using a zero point of 17.619:
 No Exposure     t-avg        + / -       net_rate      +/-   mag   +/-     t-avg  sum_rate     +/-   mag   +/-   UL3
  0      422   46961.0  15959.0  -7108.9    0.0156   0.0375 22.14  1.33   46961.0    0.0156   0.0375 22.14  1.33 19.81
=========================================================
================ Start New Filter B ==================
=========================================================
# ============ Reading file sw00020914001ubb_sk.img ================
Use keyword TRIGTIME of 586305523.388 for trigger time.
Long-term sensitivity correction to zero point is -0.155 at 586350874
The processing date in extension 0 is:  2019-08-11T06:47:21
The trigger time is: 586305523.388. The reference is keyword in image file
Using zero point of 18.955 for filter B
Use aperture correction of  1.035 based on aperture of  4.00
Using background region based on sources found in extension 1:
# 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(339.72017,-76.57744,25")
fk5;-circle(339.72017,-76.57744,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 bb586350873I   45350.1  0.99  295.0  257.1 200   7532  5832 -0.004 0.058 99.00 20.8 -0.0044 0.0577 99.00 20.8   295 -0.678  8.970 99.00 0.007 
   2 bb586351177I   45653.9  0.99   60.2   53.6 204   1513  5830  0.011 0.129 23.89 19.9 -0.0018 0.0527 99.00 20.9   355 -0.286  8.195 99.00 0.007 
    Sum (T+ 45350 to  45715):             310.7        311.3 (est. in src region)   SNR_unwtd_sum:  -0.03 0.9987 signif. UL:  20.89
  0   355 586351055   45531.3    183.8   -181.1   -0.0018   0.0527 99.000 99.000 -99.000
Total wtd_rate (for all exposures so far):  1.510 +/- 7.444 snr:  0.2 mag: 19.84 UL: 15.46
Rebinned Data for sw00020914001ubb_sk.img using a zero point of 18.955:
 No Exposure     t-avg        + / -       net_rate      +/-   mag   +/-     t-avg  sum_rate     +/-   mag   +/-   UL3
  0      352   45531.3    183.8   -181.1   -0.0018   0.0527 99.00 99.00   45531.3   -0.0018   0.0527 99.00 99.00 20.89
=========================================================
================ Start New Filter U ==================
=========================================================
# ============ Reading file sw00020914002uuu_sk.img ================
Use keyword TRIGTIME of 586305523.388 for trigger time.
Long-term sensitivity correction to zero point is -0.167 at 586363531
The processing date in extension 0 is:  2019-08-11T06:47:49
The trigger time is: 586305523.388. The reference is keyword in image file
Using zero point of 18.173 for filter U
Use aperture correction of  1.032 based on aperture of  4.00
Using background region based on sources found in extension 1:
# 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(339.72017,-76.57744,25")
fk5;-circle(339.72017,-76.57744,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 uu586363531I   58008.0  0.99  295.0  331.0 204   9235  5870  0.036 0.065 21.79 19.7  0.0357 0.0654 21.79 19.7   295 14.597 26.736 17.38 0.002 
   2 uu586363835I   58311.6  0.98  229.5  564.5 196  16414  5817  0.053 0.111 21.37 19.2  0.0431 0.0608 21.59 19.8   525 16.385 23.070 17.25 0.001 
    Sum (T+ 58008 to  58545):             895.6        874.0 (est. in src region)   SNR_unwtd_sum:   0.71 0.9987 signif. UL:  19.76
  0   525 586363800   58276.2    268.6   -268.2    0.0431   0.0608 21.587 77.413  -0.956
Total wtd_rate (for all exposures so far):  2.974 +/- 7.056 snr:  0.4 mag: 19.11 UL: 14.67
Rebinned Data for sw00020914002uuu_sk.img using a zero point of 18.173:
 No Exposure     t-avg        + / -       net_rate      +/-   mag   +/-     t-avg  sum_rate     +/-   mag   +/-   UL3
  0      516   58275.4    269.5   -267.3    0.0431   0.0608 21.59  0.96   58275.4    0.0431   0.0608 21.59  0.96 19.76
=========================================================
================ Start New Filter UVW1 ==================
=========================================================
# ============ Reading file sw00020914002uw1_sk.img ================
Use keyword TRIGTIME of 586305523.388 for trigger time.
Long-term sensitivity correction to zero point is -0.441 at 586362625
The processing date in extension 0 is:  2019-08-11T06:47:49
The trigger time is: 586305523.388. The reference is keyword in image file
Using zero point of 16.999 for filter UVW1
Use aperture correction of  1.035 based on aperture of  4.00
Using background region based on sources found in extension 1:
# 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(339.72017,-76.57744,25")
fk5;-circle(339.72017,-76.57744,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 w1586362625I   57101.7  1.00  885.6   60.1 208   2009  5883 -0.013 0.009 99.00 21.2 -0.0128 0.0092 99.00 21.2   886 -15.287 11.034 99.00 0.010 
    Sum (T+ 57102 to  58002):              60.1         71.0 (est. in src region)   SNR_unwtd_sum:  -1.39 0.9987 signif. UL:  21.17
  0   886 586363075   57551.6    449.9   -449.9   -0.0128   0.0092 99.000 99.000 -99.000
Total wtd_rate (for all exposures so far): -1.847 +/- 5.938 snr: -0.3 mag: 99.00 UL: 13.88
Rebinned Data for sw00020914002uw1_sk.img using a zero point of 16.999:
 No Exposure     t-avg        + / -       net_rate      +/-   mag   +/-     t-avg  sum_rate     +/-   mag   +/-   UL3
  0      885   57551.6    449.9   -449.9   -0.0128   0.0092 99.00 99.00   57551.6   -0.0128   0.0092 99.00 99.00 21.17
=========================================================
================ Start New Filter UVM2 ==================
=========================================================
# ============ Reading file sw00020914002um2_sk.img ================
Use keyword TRIGTIME of 586305523.388 for trigger time.
Long-term sensitivity correction to zero point is -0.413 at 586361718
The processing date in extension 0 is:  2019-08-11T06:47:49
The trigger time is: 586305523.388. The reference is keyword in image file
Using zero point of 16.437 for filter UVM2
Use aperture correction of  1.031 based on aperture of  4.00
Using background region based on sources found in extension 1:
# 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(339.72017,-76.57744,25")
fk5;-circle(339.72017,-76.57744,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 m2586361718I   56194.9  1.00  885.6   23.3 192    607  5832  0.004 0.006 22.47 20.6  0.0039 0.0057 22.47 20.6   886  7.620 11.225 18.09 0.023 
    Sum (T+ 56195 to  57095):              23.3         20.0 (est. in src region)   SNR_unwtd_sum:   0.68 0.9987 signif. UL:  20.61
  0   886 586362168   56644.8    449.9   -449.9    0.0039   0.0057 22.468 76.532  -0.983
Total wtd_rate (for all exposures so far):  0.587 +/- 5.236 snr:  0.1 mag: 20.87 UL: 13.34
Rebinned Data for sw00020914002um2_sk.img using a zero point of 16.437:
 No Exposure     t-avg        + / -       net_rate      +/-   mag   +/-     t-avg  sum_rate     +/-   mag   +/-   UL3
  0      885   56644.8    449.9   -449.9    0.0039   0.0057 22.47  0.98   56644.8    0.0039   0.0057 22.47  0.98 20.61
=========================================================
================ Start New Filter UVW2 ==================
=========================================================
# ============ Reading file sw00020914001uw2_sk.img ================
Use keyword TRIGTIME of 586305523.388 for trigger time.
Long-term sensitivity correction to zero point is -0.539 at 586338895
The processing date in extension 0 is:  2019-08-11T06:47:21
The trigger time is: 586305523.388. The reference is keyword in image file
Using zero point of 16.841 for filter UVW2
Use aperture correction of  1.035 based on aperture of  4.00
Using background region based on sources found in extension 1:
# 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(339.72017,-76.57744,25")
fk5;-circle(339.72017,-76.57744,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 w2586338895I   33372.1  1.00  595.9   24.5 200    684  5824  0.002 0.009 23.74 20.7  0.0017 0.0087 23.74 20.7   596  1.407  7.054 19.92 0.031 
    Sum (T+ 33372 to  33978):              24.5         23.5 (est. in src region)   SNR_unwtd_sum:   0.20 0.9987 signif. UL:  20.67
  0   596 586339198   33674.8    302.7   -302.7    0.0017   0.0087 23.738 75.262  -1.948
Total wtd_rate (for all exposures so far):  0.892 +/- 4.190 snr:  0.2 mag: 20.41 UL: 13.96
# ============ Reading file sw00020914002uw2_sk.img ================
Use keyword TRIGTIME of 586305523.388 for trigger time.
Long-term sensitivity correction to zero point is -0.539 at 586367406
The processing date in extension 0 is:  2019-08-11T06:47:49
The trigger time is: 586305523.388. The reference is keyword in image file
Using zero point of 16.841 for filter UVW2
Use aperture correction of  1.035 based on aperture of  4.00
Using background region based on sources found in extension 1:
# 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(339.72017,-76.57744,25")
fk5;-circle(339.72017,-76.57744,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 w2586367406I   61882.6  1.00  885.6   34.6 200    981  5840  0.001 0.007 24.18 20.9  0.0012 0.0070 24.18 20.9   886  1.731 10.444 19.69 0.018 
    Sum (T+ 61883 to  62782):              34.6         33.6 (est. in src region)   SNR_unwtd_sum:   0.17 0.9987 signif. UL:  20.92
  0   886 586367856   62332.5    449.9   -449.9    0.0012   0.0070 24.181 74.819  -2.118
Total wtd_rate (for all exposures so far):  1.012 +/- 3.880 snr:  0.3 mag: 20.28 UL: 14.03
Rebinned Data for sw00020914002uw2_sk.img using a zero point of 16.841:
 No Exposure     t-avg        + / -       net_rate      +/-   mag   +/-     t-avg  sum_rate     +/-   mag   +/-   UL3
  0 1.48e+03   50805.2  11977.2 -17433.1    0.0014   0.0055 23.98  1.73   50805.2    0.0014   0.0055 23.98  1.73 21.16
The data range from T+33372.1 s (0.39 d) to T+62920.0 s (0.73 d)
Wrote uvot_fluxes_190811d07h01m29s265286usUT.qdp
Wrote uvot_fluxes_190811d07h01m29s265286usUT.gif
Wrote uvot_fluxes_190811d07h01m29s265286usUT.ps
Wrote uvot_fluxes_190811d07h01m29s265286usUT_vis.qdp
Wrote uvot_fluxes_190811d07h01m29s265286usUT_uv.qdp
Wrote uvot_fluxes_190811d07h01m29s265286usUT_vis.gif
Wrote uvot_fluxes_190811d07h01m29s265286usUT_vis.ps
Wrote uvot_fluxes_190811d07h01m29s265286usUT_uv.gif
Wrote uvot_fluxes_190811d07h01m29s265286usUT_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  0.00485   46161.8  16758.3  -6309.6    0.0242   0.1631 24.33  2.22   46161.8    0.0242   0.1631 24.33  2.22 20.95
The data range from T+33372.1 s (0.39 d) to T+62920.0 s (0.73 d)
Wrote uvot_fluxes_wtd_190811d07h01m29s265286usUT.qdp
Wrote uvot_fluxes_wtd_190811d07h01m29s265286usUT.gif
Wrote uvot_fluxes_wtd_190811d07h01m29s265286usUT.ps
Normal end of uvot_fluxes_wget.pl vrs. 2018-11-07 fem