# uvot_fluxes_wget.pl vrs. 2023-03-23 fem at 240311d22h47m34s168472usUT
# /Home/eud/uvot_tdrss/perl/uvot_fluxes_wget.pl -seq=01219546992 -use_uvot -rebin -plot_mag -sens_corr -search_src_reg -wrk_dir=/data/uvot/swift_data/home/uvot_lc -web -zp_2011 -gamma=1.0 -use_filter_wtd=white v b u
# Current directory: /data/uvot/swift_data/home/uvot_lc
# ========= GRB240311 ===================
Could not find/read custom source region custom_1219546_src.reg
Used archived XRT position of 299.89560 34.57640 4.00
Reference: GCN_Notice_Mon_11_Mar_24_11:22:42_UT-spacecraft
The position is (19:59:34.94, +34:34:35.0)
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(299.8956,+34.5764,4") # color=red dash=0
Source region spec. is: 299.8956 +34.5764 4"
Region file centered at (299.8956,+34.5764), which is (19:59:34.94, +34:34:35.0)
Could not find/read custom background region custom_1219546_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 -33.05538 from uncorrected trigger time of 731847990.93 in BAT summary file
# ============ Reading file sw01219546992uwh_sk.img ================
Use keyword TRIGTIME of 731848024 for trigger time.
Long-term sensitivity correction to zero point is -0.175 at 731848197
The processing date in extension 0 is: 2024-03-11T22:29:19
The trigger time is: 731848024. The reference is keyword in image file
Using zero point of 20.115 for filter WHITE
Use aperture correction of 1.035 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 299.94118  34.53422 0.134 116.7
  2  -28.6 299.94305  34.53492 0.134 116.7
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(299.8956,+34.5764,25")
fk5;-circle(299.8956,+34.5764,12.5")
fk5;-circle(299.889998,34.574841,6")
fk5;-circle(299.895376,34.574361,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
High bkg:   1 wh731848197I  147.4  56177  5387 70.738  0.298
#  1 wh731848197I     173.4  0.87  147.4 2019.5 198  56177  5368 
High bkg:   2 wh731848197E  146.1  55748  5387 70.826  0.300
#  2 wh731848197E     174.1  0.87  146.1 2010.7 198  55748  5370 
   3 wh731851990I    3966.1  0.94  196.6 1099.3 204  27043  5481  0.520 0.189 20.82 20.0  0.5204 0.1891 20.82 20.0   197  2.487  0.903 19.30 0.038 
    Sum (T+  3966 to   4166):            1099.3       1006.5 (est. in src region)   SNR_unwtd_sum:   2.75 0.9987 signif. UL:  20.02
  0   197 731852090    4066.0     99.9    -99.9    0.5204   0.1891 20.824  0.490  -0.337
Total wtd_rate (for all exposures so far):  2.487 +/- 0.888 snr:  2.8 mag: 19.30 UL: 18.33
Rebinned Data for sw01219546992uwh_sk.img using a zero point of 20.115:
 No Exposure     t-avg        + / -       net_rate      +/-   mag   +/-     t-avg  sum_rate     +/-   mag   +/-   UL3
  0      184    4066.0     99.9    -99.9    0.5204   0.1891 20.82  0.34    4066.0    0.5204   0.1891 20.82  0.34 20.02
=========================================================
================ Start New Filter V ==================
=========================================================
# ============ Reading file sw01219546992uvv_sk.img ================
Use keyword TRIGTIME of 731848024 for trigger time.
Long-term sensitivity correction to zero point is -0.224 at 731848178
The processing date in extension 0 is:  2024-03-11T22:29:20
The trigger time is: 731848024. The reference is keyword in image file
Using zero point of 17.666 for filter V
Use aperture correction of  1.030 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(299.8956,+34.5764,25")
fk5;-circle(299.8956,+34.5764,12.5")
fk5;-circle(299.890010,34.574839,6")
fk5;-circle(299.895216,34.574434,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
High bkg:   1 vv731848178E   10.7   2105  5393 36.376  0.793
#  1 vv731848178E     154.0  0.90   10.7   70.7 198   2105  5604 
   2 vv731852401I    4377.0  0.98  196.6  291.3 204   6927  5378  0.152 0.092 19.71 18.6  0.1515 0.0923 19.71 18.6   197  7.608  4.634 18.09 0.015 
    Sum (T+  4377 to   4577):             291.3        262.8 (est. in src region)   SNR_unwtd_sum:   1.64 0.9987 signif. UL:  18.58
  0   197 731852501    4476.9     99.9    -99.9    0.1515   0.0923 19.714  1.020  -0.516
Total wtd_rate (for all exposures so far):  2.664 +/- 0.868 snr:  3.1 mag: 19.23 UL: 15.86
Rebinned Data for sw01219546992uvv_sk.img using a zero point of 17.666:
 No Exposure     t-avg        + / -       net_rate      +/-   mag   +/-     t-avg  sum_rate     +/-   mag   +/-   UL3
  0      194    4476.9     99.9    -99.9    0.1515   0.0923 19.71  0.52    4476.9    0.1515   0.0923 19.71  0.52 18.58
=========================================================
================ Start New Filter B ==================
=========================================================
# ============ Reading file sw01219546992ubb_sk.img ================
Use keyword TRIGTIME of 731848024 for trigger time.
Long-term sensitivity correction to zero point is -0.211 at 731851785
The processing date in extension 0 is:  2024-03-11T22:29:20
The trigger time is: 731848024. The reference is keyword in image file
Using zero point of 18.899 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(299.8956,+34.5764,25")
fk5;-circle(299.8956,+34.5764,12.5")
fk5;-circle(299.890245,34.575349,6")
fk5;-circle(299.889575,34.573764,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 bb731851785I    3761.1  0.98  196.6  384.4 204   9178  5195  0.129 0.107 21.13 19.8  0.1287 0.1071 21.13 19.8   197  1.788  1.489 19.66 0.038 
    Sum (T+  3761 to   3961):             384.4        360.4 (est. in src region)   SNR_unwtd_sum:   1.20 0.9987 signif. UL:  19.75
  0   197 731851885    3860.9     99.9    -99.9    0.1287   0.1071 21.126  1.939  -0.658
Total wtd_rate (for all exposures so far):  2.448 +/- 0.749 snr:  3.3 mag: 19.32 UL: 17.22
Rebinned Data for sw01219546992ubb_sk.img using a zero point of 18.899:
 No Exposure     t-avg        + / -       net_rate      +/-   mag   +/-     t-avg  sum_rate     +/-   mag   +/-   UL3
  0      193    3860.9     99.9    -99.9    0.1287   0.1071 21.13  0.66    3860.9    0.1287   0.1071 21.13  0.66 19.75
=========================================================
================ Start New Filter U ==================
=========================================================
# ============ Reading file sw01219546992uuu_sk.img ================
Use keyword TRIGTIME of 731848024 for trigger time.
Long-term sensitivity correction to zero point is -0.228 at 731848356
The processing date in extension 0 is:  2024-03-11T22:29:19
The trigger time is: 731848024. The reference is keyword in image file
Using zero point of 18.112 for filter U
Use aperture correction of  1.032 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(299.8956,+34.5764,25")
fk5;-circle(299.8956,+34.5764,12.5")
fk5;-circle(299.889754,34.574893,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
High bkg:   1 uu731848355I  150.7  15502  5395 19.071  0.153
#  1 uu731848355I     331.5  0.96  150.7  557.8 198  15502  5392 
High bkg:   2 uu731848355E  150.7  15561  5395 19.144  0.153
#  2 uu731848355E     331.5  0.96  150.7  579.1 198  15561  5408 
   3 uu731853016I    4992.5  0.99  179.0  131.0 192   3846  5366 -0.038 0.068 99.00 19.9 -0.0381 0.0677 99.00 19.9   179 -1.441  2.559 99.00 0.034 
    Sum (T+  4993 to   5174):             131.0        137.6 (est. in src region)   SNR_unwtd_sum:  -0.56 0.9987 signif. UL:  19.91
  0   179 731853107    5083.5     90.9    -90.9   -0.0381   0.0677 99.000 99.000 -99.000
Total wtd_rate (for all exposures so far):  2.161 +/- 0.716 snr:  3.0 mag: 19.45 UL: 16.52
Rebinned Data for sw01219546992uuu_sk.img using a zero point of 18.112:
 No Exposure     t-avg        + / -       net_rate      +/-   mag   +/-     t-avg  sum_rate     +/-   mag   +/-   UL3
  0      178    5083.5     90.9    -90.9   -0.0381   0.0677 99.00 99.00    5083.5   -0.0381   0.0677 99.00 99.00 19.91
=========================================================
================ Start New Filter UVW1 ==================
=========================================================
# ============ Reading file sw01219546992uw1_sk.img ================
Use keyword TRIGTIME of 731848024 for trigger time.
Long-term sensitivity correction to zero point is -0.271 at 731852812
The processing date in extension 0 is:  2024-03-11T22:29:20
The trigger time is: 731848024. The reference is keyword in image file
Using zero point of 17.169 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(299.8956,+34.5764,25")
fk5;-circle(299.8956,+34.5764,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 w1731852811I    4787.8  1.00  196.6   43.8 208    977  5886  0.049 0.035 20.45 19.2  0.0488 0.0354 20.45 19.2   197  4.227  3.063 18.73 0.066 
    Sum (T+  4788 to   4988):              43.8         34.5 (est. in src region)   SNR_unwtd_sum:   1.38 0.9987 signif. UL:  19.18
  0   197 731852912    4887.7     99.9    -99.9    0.0488   0.0354 20.448  1.399  -0.592
Total wtd_rate (for all exposures so far):  2.296 +/- 0.699 snr:  3.3 mag: 19.39 UL: 15.56
Rebinned Data for sw01219546992uw1_sk.img using a zero point of 17.169:
 No Exposure     t-avg        + / -       net_rate      +/-   mag   +/-     t-avg  sum_rate     +/-   mag   +/-   UL3
  0      196    4887.7     99.9    -99.9    0.0488   0.0354 20.45  0.59    4887.7    0.0488   0.0354 20.45  0.59 19.18
=========================================================
================ Start New Filter UVM2 ==================
=========================================================
# ============ Reading file sw01219546992um2_sk.img ================
Use keyword TRIGTIME of 731848024 for trigger time.
Long-term sensitivity correction to zero point is -0.259 at 731852606
The processing date in extension 0 is:  2024-03-11T22:29:20
The trigger time is: 731848024. The reference is keyword in image file
Using zero point of 16.591 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(299.8956,+34.5764,25")
fk5;-circle(299.8956,+34.5764,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 m2731852605I    4581.9  1.00  196.6    9.6 196    383  5832 -0.017 0.017 99.00 20.0 -0.0172 0.0166 99.00 20.0   197 -2.430  2.344 99.00 0.108 
    Sum (T+  4582 to   4782):               9.6         12.9 (est. in src region)   SNR_unwtd_sum:  -1.04 0.9987 signif. UL:  20.04
  0   197 731852706    4681.8     99.9    -99.9   -0.0172   0.0166 99.000 99.000 -99.000
Total wtd_rate (for all exposures so far):  2.007 +/- 0.669 snr:  3.0 mag: 19.53 UL: 15.08
Rebinned Data for sw01219546992um2_sk.img using a zero point of 16.591:
 No Exposure     t-avg        + / -       net_rate      +/-   mag   +/-     t-avg  sum_rate     +/-   mag   +/-   UL3
  0      197    4681.8     99.9    -99.9   -0.0172   0.0166 99.00 99.00    4681.8   -0.0172   0.0166 99.00 99.00 20.04
=========================================================
================ Start New Filter UVW2 ==================
=========================================================
# ============ Reading file sw01219546992uw2_sk.img ================
Use keyword TRIGTIME of 731848024 for trigger time.
Long-term sensitivity correction to zero point is -0.345 at 731852196
The processing date in extension 0 is:  2024-03-11T22:29:20
The trigger time is: 731848024. The reference is keyword in image file
Using zero point of 17.035 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(299.8956,+34.5764,25")
fk5;-circle(299.8956,+34.5764,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 w2731852196I    4172.0  1.00  196.6   25.7 200    621  5833  0.023 0.027 21.11 19.5  0.0234 0.0271 21.11 19.5   197  2.007  2.320 19.53 0.108 
    Sum (T+  4172 to   4372):              25.7         21.3 (est. in src region)   SNR_unwtd_sum:   0.87 0.9987 signif. UL:  19.46
  0   197 731852296    4271.9     99.9    -99.9    0.0234   0.0271 21.110 77.890  -0.834
Total wtd_rate (for all exposures so far):  2.014 +/- 0.645 snr:  3.1 mag: 19.53 UL: 15.54
Rebinned Data for sw01219546992uw2_sk.img using a zero point of 17.035:
 No Exposure     t-avg        + / -       net_rate      +/-   mag   +/-     t-avg  sum_rate     +/-   mag   +/-   UL3
  0      196    4271.9     99.9    -99.9    0.0234   0.0271 21.11  0.83    4271.9    0.0234   0.0271 21.11  0.83 19.46
The data range from T+3761.1 s (0.04 d) to T+5174.4 s (0.06 d)
Wrote uvot_fluxes_240311d22h47m34s168472usUT.qdp
Wrote uvot_fluxes_240311d22h47m34s168472usUT.gif
Wrote uvot_fluxes_240311d22h47m34s168472usUT.ps
Wrote uvot_fluxes_240311d22h47m34s168472usUT_vis.qdp
Wrote uvot_fluxes_240311d22h47m34s168472usUT_uv.qdp
Wrote uvot_fluxes_240311d22h47m34s168472usUT_vis.gif
Wrote uvot_fluxes_240311d22h47m34s168472usUT_vis.ps
Wrote uvot_fluxes_240311d22h47m34s168472usUT_uv.gif
Wrote uvot_fluxes_240311d22h47m34s168472usUT_uv.ps
# ================ Make Light Curve for Weighted Filters ==========
Use the following filters with indicated color corrections (mags):
  b (0)  , v (0)  , u (0)  , white (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     1.17    4045.5    531.3   -284.5    0.6007   0.2026 20.84  0.32    4045.5    0.6007   0.2026 20.84  0.32 20.08
  1   0.0205    5083.5     90.9    -90.9   -0.2834   0.5033 99.00 99.00    4063.4    0.5816   0.1985 20.88  0.32 20.11
The data range from T+3761.1 s (0.04 d) to T+5174.4 s (0.06 d)
Wrote uvot_fluxes_wtd_240311d22h47m34s168472usUT.qdp
Wrote uvot_fluxes_wtd_240311d22h47m34s168472usUT.gif
Wrote uvot_fluxes_wtd_240311d22h47m34s168472usUT.ps
Found 5 exposures with unusual background rate
Normal end of uvot_fluxes_wget.pl vrs. 2023-03-23 fem