# uvot_fluxes_wget.pl vrs. 2018-11-07 fem at 200601d10h47m21s512875usUT
# /Home/eud/uvot_tdrss/perl/uvot_fluxes_wget.pl -seq=00973628001 -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
# ========= GRB200522A ===================
Could not find/read custom source region custom_973628_src.reg
Used archived XRT position of 5.68233 -0.28242 4.00
Reference: GCN_Circulars-27778-Fri,_22_May_2020_08:03:01_-0400
The position is (00:22:43.76, -00:16:56.7)
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(5.68233,-0.28242,4") # color=red dash=0
Source region spec. is: 5.68233 -0.28242 4"
Region file centered at (5.68233,-0.28242), which is (00:22:43.76, -00:16:56.7)
Could not find/read custom background region custom_973628_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 611840494.12 in BAT summary file
# ============ Reading file sw00973628992uwh_sk.img ================
Use keyword TRIGTIME of 611840519.104 for trigger time.
Long-term sensitivity correction to zero point is -0.225 at 611840967
The processing date in extension 0 is: 2020-05-22T18:18:58
The trigger time is: 611840519.104. The reference is keyword in image file
Using zero point of 20.065 for filter WHITE
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(5.68233,-0.28242,25")
fk5;-circle(5.68233,-0.28242,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
High bkg:   1 wh611840967I  147.4  55496  5843 64.432  0.274
   1 wh611840967I     448.3  0.87  147.4 1965.4 200  55496  5867  0.591 0.362 20.64 19.5  0.5908 0.3617 20.64 19.5   147  0.380  0.233 21.34 0.106 
above line uses coinc_corr_src:  0.874 corr_bkg:  0.878
High bkg:   2 wh611840967E  147.4  55628  5852 64.489  0.273
   2 wh611840967E     448.3  0.88  147.4 1947.3 197  55628  5870  0.645 0.360 20.54 19.5 
above line uses coinc_corr_src:  0.875 corr_bkg:  0.878
    Sum (T+   448 to    598):            1965.4       1891.8 (est. in src region)   SNR_unwtd_sum:   1.63 0.9987 signif. UL:  19.50
  0   147 611841042     523.2     74.9    -74.9    0.5908   0.3617 20.636  1.029  -0.518
Total wtd_rate (for all exposures so far):  0.380 +/- 0.229 snr:  1.7 mag: 21.34 UL: 19.99
# ============ Reading file sw00973628001uwh_sk.img ================
Use keyword TRIGTIME of 611840519.104 for trigger time.
Long-term sensitivity correction to zero point is -0.225 at 611845047
The processing date in extension 0 is:  2020-06-01T10:35:41
The trigger time is: 611840519.104. The reference is keyword in image file
Using zero point of 20.065 for filter WHITE
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(5.68233,-0.28242,25")
fk5;-circle(5.68233,-0.28242,12.5")
fk5;-circle(5.680650,-0.287097,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
   1 wh611845046I    4527.8  0.91  196.6 1881.1 204  50018  5404 -0.041 0.255 99.00 20.3 -0.0408 0.2551 99.00 20.3   197 -0.232  1.453 99.00 0.017 
    Sum (T+  4528 to   4728):            1881.1       1888.2 (est. in src region)   SNR_unwtd_sum:  -0.16 0.9987 signif. UL:  20.32
  0   197 611845147    4627.7     99.9    -99.9   -0.0408   0.2551 99.000 99.000 -99.000
Total wtd_rate (for all exposures so far):  0.366 +/- 0.226 snr:  1.6 mag: 21.38 UL: 20.01
Rebinned Data for sw00973628001uwh_sk.img using a zero point of 20.065:
 No Exposure     t-avg        + / -       net_rate      +/-   mag   +/-     t-avg  sum_rate     +/-   mag   +/-   UL3
  0      129     523.2     74.9    -74.9    0.5908   0.3617 20.64  0.52     523.2    0.5908   0.3617 20.64  0.52 19.50
  1      179    4627.7     99.9    -99.9   -0.0408   0.2551 99.00 99.00    2910.6    0.2234   0.2119 21.69  0.72 20.21
=========================================================
================ Start New Filter V ==================
=========================================================
# ============ Reading file sw00973628992uvv_sk.img ================
Use keyword TRIGTIME of 611840519.104 for trigger time.
Long-term sensitivity correction to zero point is -0.288 at 611841124
The processing date in extension 0 is:  2020-05-22T18:18:57
The trigger time is: 611840519.104. The reference is keyword in image file
Using zero point of 17.602 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(5.68233,-0.28242,25")
fk5;-circle(5.68233,-0.28242,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 vv611841123E     604.6  0.97   19.5   67.5 199   2009  5854 -0.043 0.458 99.00 17.2 -0.0428 0.4578 99.00 17.2    19 -0.313  3.345 99.00 0.038 
    Sum (T+   605 to    624):              67.5         68.3 (est. in src region)   SNR_unwtd_sum:  -0.09 0.9987 signif. UL:  17.21
  0    19 611841134     614.5      9.9     -9.9   -0.0428   0.4578 99.000 99.000 -99.000
Total wtd_rate (for all exposures so far):  0.361 +/- 0.225 snr:  1.6 mag: 21.40 UL: 17.56
# ============ Reading file sw00973628001uvv_sk.img ================
Use keyword TRIGTIME of 611840519.104 for trigger time.
Long-term sensitivity correction to zero point is -0.288 at 611845458
The processing date in extension 0 is:  2020-06-01T10:35:41
The trigger time is: 611840519.104. The reference is keyword in image file
Using zero point of 17.602 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(5.68233,-0.28242,25")
fk5;-circle(5.68233,-0.28242,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 vv611845457I    4938.5  0.98  196.6  525.2 200  14546  5874  0.161 0.125 19.59 18.3  0.1608 0.1251 19.59 18.3   197  9.636  7.492 17.83 0.006 
    Sum (T+  4938 to   5138):             525.2        495.2 (est. in src region)   SNR_unwtd_sum:   1.29 0.9987 signif. UL:  18.27
  0   197 611845557    5038.4     99.9    -99.9    0.1608   0.1251 19.586  1.632  -0.625
Total wtd_rate (for all exposures so far):  0.370 +/- 0.225 snr:  1.6 mag: 21.37 UL: 17.55
Rebinned Data for sw00973628001uvv_sk.img using a zero point of 17.602:
 No Exposure     t-avg        + / -       net_rate      +/-   mag   +/-     t-avg  sum_rate     +/-   mag   +/-   UL3
  0     18.8     614.5      9.9     -9.9   -0.0428   0.4578 99.00 99.00     614.5   -0.0428   0.4578 99.00 99.00 17.21
  1      192    5038.4     99.9    -99.9    0.1608   0.1251 19.59  0.62    4643.4    0.1427   0.1210 19.72  0.67 18.33
=========================================================
================ Start New Filter B ==================
=========================================================
# ============ Reading file sw00973628001ubb_sk.img ================
Use keyword TRIGTIME of 611840519.104 for trigger time.
Long-term sensitivity correction to zero point is -0.164 at 611844842
The processing date in extension 0 is:  2020-06-01T10:35:41
The trigger time is: 611840519.104. The reference is keyword in image file
Using zero point of 18.946 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(5.68233,-0.28242,25")
fk5;-circle(5.68233,-0.28242,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 bb611844842I    4323.0  0.96  196.6  888.7 200  23739  5878  0.444 0.166 19.83 19.0  0.4445 0.1663 19.83 19.0   197  6.778  2.536 18.21 0.015 
    Sum (T+  4323 to   4523):             888.7        807.8 (est. in src region)   SNR_unwtd_sum:   2.67 0.9987 signif. UL:  19.01
  0   197 611844942    4422.9     99.9    -99.9    0.4445   0.1663 19.827  0.508  -0.345
Total wtd_rate (for all exposures so far):  0.426 +/- 0.225 snr:  1.9 mag: 21.22 UL: 18.84
Rebinned Data for sw00973628001ubb_sk.img using a zero point of 18.946:
 No Exposure     t-avg        + / -       net_rate      +/-   mag   +/-     t-avg  sum_rate     +/-   mag   +/-   UL3
  0      188    4422.9     99.9    -99.9    0.4445   0.1663 19.83  0.34    4422.9    0.4445   0.1663 19.83  0.34 19.01
=========================================================
================ Start New Filter U ==================
=========================================================
# ============ Reading file sw00973628001uuu_sk.img ================
Use keyword TRIGTIME of 611840519.104 for trigger time.
Long-term sensitivity correction to zero point is -0.177 at 611844637
The processing date in extension 0 is:  2020-06-01T10:35:41
The trigger time is: 611840519.104. The reference is keyword in image file
Using zero point of 18.163 for filter U
Use aperture correction of  1.032 based on aperture of  4.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(5.68233,-0.28242,25")
fk5;-circle(5.68233,-0.28242,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 uu611844637I    4117.9  0.98  196.6  338.9 204   9408  5842  0.056 0.100 21.30 19.3  0.0555 0.0999 21.30 19.3   197  1.662  2.988 19.74 0.020 
   2 uu611856789I   16270.6  0.98  295.0  556.3 208  15219  5878  0.063 0.085 21.16 19.4  0.0602 0.0650 21.21 19.6   492  2.137  2.862 19.47 0.010 
   3 uu611857093I   16574.3  0.98  295.0  499.1 204  14509  5844 -0.026 0.081 99.00 19.7  0.0279 0.0507 22.05 20.0   787  1.727  2.743 19.70 0.008 
   4 uu611857397I   16878.0  0.98  163.7  287.4 204   8008  5843  0.050 0.110 21.41 19.2  0.0317 0.0460 21.91 20.1   950  1.903  2.686 19.59 0.008 
    Sum (T+  4118 to  17044):            1681.8       1653.0 (est. in src region)   SNR_unwtd_sum:   0.69 0.9987 signif. UL:  20.06
  0   950 611854603   14083.9   2960.4  -9966.0    0.0317   0.0460 21.909 77.091  -0.974
Total wtd_rate (for all exposures so far):  0.436 +/- 0.223 snr:  2.0 mag: 21.19 UL: 18.05
Rebinned Data for sw00973628001uuu_sk.img using a zero point of 18.163:
 No Exposure     t-avg        + / -       net_rate      +/-   mag   +/-     t-avg  sum_rate     +/-   mag   +/-   UL3
  0      193    4217.8     99.9    -99.9    0.0555   0.0999 21.30  1.12    4217.8    0.0555   0.0999 21.30  1.12 19.25
  1      741   16656.9    387.4   -386.3    0.0255   0.0519 22.14  1.20   14082.7    0.0317   0.0460 21.91  0.97 20.06
=========================================================
================ Start New Filter UVW1 ==================
=========================================================
# ============ Reading file sw00973628001uw1_sk.img ================
Use keyword TRIGTIME of 611840519.104 for trigger time.
Long-term sensitivity correction to zero point is -0.509 at 611844432
The processing date in extension 0 is:  2020-06-01T10:35:41
The trigger time is: 611840519.104. The reference is keyword in image file
Using zero point of 16.931 for filter UVW1
Use aperture correction of  1.035 based on aperture of  4.00
Using background region based on sources found in extension 3:
# 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(5.68233,-0.28242,25")
fk5;-circle(5.68233,-0.28242,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 w1611844432I    3913.2  1.00  196.6   59.4 204   1391  5847  0.058 0.041 20.03 18.8  0.0575 0.0413 20.03 18.8   197  5.093  3.653 18.52 0.046 
High bkg:   2 w1611851309I  424.3   3508  5872  1.408  0.024
   2 w1611851309I   10790.7  1.00  424.3  126.9 200   3508  5873  0.018 0.028 21.28 19.4  0.0307 0.0232 20.71 19.4   621  4.961  3.222 18.55 0.024 
   3 w1611855883I   15364.3  1.00  885.6  267.0 200   6735  5854  0.043 0.019 20.34 19.4  0.0380 0.0149 20.48 19.6  1506  6.782  2.910 18.21 0.016 
    Sum (T+  3913 to  16264):             453.3        398.1 (est. in src region)   SNR_unwtd_sum:   2.55 0.9987 signif. UL:  19.64
  0  1506 611853439   12919.9   3344.2  -9006.7    0.0380   0.0149 20.481  0.539  -0.359
Total wtd_rate (for all exposures so far):  0.481 +/- 0.223 snr:  2.2 mag: 21.09 UL: 16.78
Rebinned Data for sw00973628001uw1_sk.img using a zero point of 16.931:
 No Exposure     t-avg        + / -       net_rate      +/-   mag   +/-     t-avg  sum_rate     +/-   mag   +/-   UL3
  0      196    4013.1     99.9    -99.9    0.0575   0.0413 20.03  0.59    4013.1    0.0575   0.0413 20.03  0.59 18.78
  1 1.31e+03   14257.1   2007.0  -3466.4    0.0351   0.0160 20.57  0.41   12920.1    0.0380   0.0149 20.48  0.36 19.64
=========================================================
================ Start New Filter UVM2 ==================
=========================================================
# ============ Reading file sw00973628992um2_sk.img ================
Use keyword TRIGTIME of 611840519.104 for trigger time.
Long-term sensitivity correction to zero point is -0.469 at 611841148
The processing date in extension 0 is:  2020-05-22T18:18:58
The trigger time is: 611840519.104. The reference is keyword in image file
Using zero point of 16.381 for filter UVM2
Use aperture correction of  1.031 based on aperture of  4.00
There are no aspect corrected images to process.
# ============ Reading file sw00973628001um2_sk.img ================
Use keyword TRIGTIME of 611840519.104 for trigger time.
Long-term sensitivity correction to zero point is -0.469 at 611845663
The processing date in extension 0 is:  2020-06-01T10:35:41
The trigger time is: 611840519.104. The reference is keyword in image file
Using zero point of 16.381 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(5.68233,-0.28242,25")
fk5;-circle(5.68233,-0.28242,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 m2611845662I    5143.9  1.00  135.7    5.9 200    161  5860  0.003 0.019 22.62 19.4  0.0032 0.0188 22.62 19.4   136  0.609  3.585 20.83 0.129 
    Sum (T+  5144 to   5282):               5.9          5.5 (est. in src region)   SNR_unwtd_sum:   0.17 0.9987 signif. UL:  19.38
  0   136 611845732    5212.8     68.9    -68.9    0.0032   0.0188 22.621 76.379  -2.095
Total wtd_rate (for all exposures so far):  0.479 +/- 0.222 snr:  2.2 mag: 21.09 UL: 16.23
Rebinned Data for sw00973628001um2_sk.img using a zero point of 16.381:
 No Exposure     t-avg        + / -       net_rate      +/-   mag   +/-     t-avg  sum_rate     +/-   mag   +/-   UL3
  0      136    5212.8     68.9    -68.9    0.0032   0.0188 22.62  2.09    5212.8    0.0032   0.0188 22.62  2.09 19.38
=========================================================
================ Start New Filter UVW2 ==================
=========================================================
# ============ Reading file sw00973628001uw2_sk.img ================
Use keyword TRIGTIME of 611840519.104 for trigger time.
Long-term sensitivity correction to zero point is -0.625 at 611845253
The processing date in extension 0 is:  2020-06-01T10:35:41
The trigger time is: 611840519.104. The reference is keyword in image file
Using zero point of 16.755 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(5.68233,-0.28242,25")
fk5;-circle(5.68233,-0.28242,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 w2611845252I    4733.6  1.00  196.6   30.7 208    639  5878  0.042 0.030 20.19 19.0  0.0423 0.0296 20.19 19.0   197  5.303  3.705 18.48 0.069 
    Sum (T+  4734 to   4933):              30.7         22.6 (est. in src region)   SNR_unwtd_sum:   1.43 0.9987 signif. UL:  18.95
  0   197 611845353    4833.5     99.9    -99.9    0.0423   0.0296 20.189  1.303  -0.575
Total wtd_rate (for all exposures so far):  0.504 +/- 0.222 snr:  2.3 mag: 21.03 UL: 16.58
Rebinned Data for sw00973628001uw2_sk.img using a zero point of 16.755:
 No Exposure     t-avg        + / -       net_rate      +/-   mag   +/-     t-avg  sum_rate     +/-   mag   +/-   UL3
  0      196    4833.5     99.9    -99.9    0.0423   0.0296 20.19  0.57    4833.5    0.0423   0.0296 20.19  0.57 18.95
The data range from T+448.3 s (0.01 d) to T+17044.3 s (0.20 d)
Wrote uvot_fluxes_200601d10h47m21s512875usUT.qdp
Wrote uvot_fluxes_200601d10h47m21s512875usUT.gif
Wrote uvot_fluxes_200601d10h47m21s512875usUT.ps
Wrote uvot_fluxes_200601d10h47m21s512875usUT_vis.qdp
Wrote uvot_fluxes_200601d10h47m21s512875usUT_uv.qdp
Wrote uvot_fluxes_200601d10h47m21s512875usUT_vis.gif
Wrote uvot_fluxes_200601d10h47m21s512875usUT_vis.ps
Wrote uvot_fluxes_200601d10h47m21s512875usUT_uv.gif
Wrote uvot_fluxes_200601d10h47m21s512875usUT_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       15     523.2    101.1    -74.9    0.7262   0.4448 20.64  0.52     523.2    0.7262   0.4448 20.64  0.52 19.50
  1   0.0609    4369.8    153.1   -251.8    1.2476   0.4650 20.05  0.34     538.8    0.7433   0.4305 20.61  0.50 19.51
  2    0.387    4629.3    509.0   -101.5   -0.0419   0.3126 99.00 99.00     641.2    0.6014   0.3572 20.84  0.51 19.73
  3  0.00376   16659.3    385.0   -388.8    0.1698   0.3677 22.21  1.25     645.1    0.5987   0.3549 20.85  0.51 19.73
The data range from T+448.3 s (0.01 d) to T+17044.3 s (0.20 d)
Wrote uvot_fluxes_wtd_200601d10h47m21s512875usUT.qdp
Wrote uvot_fluxes_wtd_200601d10h47m21s512875usUT.gif
Wrote uvot_fluxes_wtd_200601d10h47m21s512875usUT.ps
Found 3 exposures with unusual background rate
Normal end of uvot_fluxes_wget.pl vrs. 2018-11-07 fem