/sdf/group/fermi/u/kocevski/software/conda/envs/fermitools_v1.0.5/lib/python2.7/site-packages/pyfits/__init__.py:22: PyFITSDeprecationWarning: PyFITS is deprecated, please use astropy.io.fits
  PyFITSDeprecationWarning)  # noqa

Likelihood Analysis Tool
Support Contact: Daniel Kocevski (daniel.kocevski@nasa.gov)

Importing modules...
This is make3FGLxml version 01r0.
The default diffuse model files and names are for pass 8 and assume you have v10r00p05 of the Fermi Science Tools or higher.
This is make4FGLDR3xml version 01r09.
The default diffuse model files and names are for P8R3, 4FGL DRs, and the default fermitools directory locations.

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

/sdf/group/fermi/u/kocevski/software/conda/envs/fermitools_v1.0.5/lib/python2.7/site-packages/matplotlib/cbook/deprecation.py:106: MatplotlibDeprecationWarning: The mpl_toolkits.axes_grid module was deprecated in version 2.1. Use mpl_toolkits.axes_grid1 and mpl_toolkits.axisartist provies the same functionality instead.
  warnings.warn(message, mplDeprecation, stacklevel=1)

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

number of points = 17322
number of fields = 31
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J1606.9+5919_weekly_bin853
RA = 241.734, Dec = 59.3201
tmin = 754876801, tmax = 755481601
emin = 100.0, emax = 100000.0
irfs = P8R3_SOURCE_V2
ROI = 12
zmax = 90

Fitting strategies:
Fix sources to their catalog values = True
Leave variable source normalizations free = True
Perform pre-fit where ALL sources are frozen to catalog values = False
Perform secondary fit with a free spectral index = True
Remove all catalog sources = False
Remove weak (TS < 2) catalog sources = False
Freeze Galactic component = False

Likelihood fit parameters:
Statistic: UNBINNED
Optimizer: MINUIT

Catalog: 4FGL

Repository job = True

LAT data source:
Data catalog

Updating database...

UPDATE lightcurve_data_v2 SET job_id='59978175', job_status='RUN', time_executed='2024-12-10 00:51:32.451157', time_epoch_executed='1733820692.45' WHERE source_name='4FGL J1606.9+5919' and cadence='weekly' and bin_id='853'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/59978175

Creating custom pfile directory:
/lscratch/kocevski/59978175/pfiles/

Retrieving the FT1 file...

Issuing command:
datacat find --group FT1 --filter 'nMetStop>=754876801.0 && nMetStart<755481601.0' /Data/Flight/Reprocess/P305

Issuing command:
datacat find --group FT1 --filter 'nMetStart>564945418 && nMetStop>=754876801.0 && nMetStart<755481601.0' /Data/Flight/Level1/LPA

Retrieving 107 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/59978175/ft1_4FGL_J1606.9+5919_weekly_bin853.fits


Retrieving the FT1 file...

Issuing command:
datacat find --group FT2 --filter 'nMetStop>=754876801.0 && nMetStart<755481601.0' /Data/Flight/Level1/LPA

Retrieving 107 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/59978175/ft2_4FGL_J1606.9+5919_weekly_bin853.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/59978175/ft1_4FGL_J1606.9+5919_weekly_bin853.fits outfile=/lscratch/kocevski/59978175/ft1_filteredMKT_4FGL_J1606.9+5919_weekly_bin853.fits ra=241.734 dec=59.3201 rad=12.0 tmin=754876801.0 tmax=755481601.0 emin=100.0 emax=100000.0 zmin=0.0 zmax=90.0 evclass=128 evtype="INDEF" convtype=-1 phasemin=0.0 phasemax=1.0 evtable="EVENTS" chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

Done.
real 3.63
user 3.29
sys 0.26

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/59978175/ft2_4FGL_J1606.9+5919_weekly_bin853.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/59978175/ft2_4FGL_J1606.9+5919_weekly_bin853.fits sctable="SC_DATA" filter="IN_SAA!=T && LIVETIME>0 && gtifilter('/sdf/group/fermi/g/LCRepository/Likelihood/GTIs/nogrb.gti',(START+STOP)/2) && (angsep(RA_SUN,DEC_SUN,RA_ZENITH,DEC_ZENITH)>115 || gtifilter('/sdf/group/fermi/g/LCRepository/Likelihood/GTIs/nosolarflares.gti',(START+STOP)/2))" roicut=no evfile=/lscratch/kocevski/59978175/ft1_filteredMKT_4FGL_J1606.9+5919_weekly_bin853.fits evtable="EVENTS" outfile="/lscratch/kocevski/59978175/ft1_filtered_4FGL_J1606.9+5919_weekly_bin853.fits" apply_filter=yes overwrite=yes header_obstimes=yes tstart=0.0 tstop=0.0 gtifile="default" chatter=3 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

This is gtmktime version HEAD
Applying GTI filter:
IN_SAA!=T && LIVETIME>0 && gtifilter('/sdf/group/fermi/g/LCRepository/Likelihood/GTIs/nogrb.gti',(START+STOP)/2) && (angsep(RA_SUN,DEC_SUN,RA_ZENITH,DEC_ZENITH)>115 || gtifilter('/sdf/group/fermi/g/LCRepository/Likelihood/GTIs/nosolarflares.gti',(START+STOP)/2))
real 0.42
user 0.22
sys 0.14

Number of photons that the gtmktime cut: 2490

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/59978175/ft1_filtered_4FGL_J1606.9+5919_weekly_bin853.fits" evtable="EVENTS" scfile=/lscratch/kocevski/59978175/ft2_4FGL_J1606.9+5919_weekly_bin853.fits sctable="SC_DATA" outfile=/lscratch/kocevski/59978175/ltcube_754876801_755481601_4FGL_J1606.9+5919_weekly_bin853.fits dcostheta=0.025 binsz=1.0 phibins=0 tmin=0.0 tmax=0.0 file_version="1" zmin=0.0 zmax=90.0 chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

Working on file /lscratch/kocevski/59978175/ft2_4FGL_J1606.9+5919_weekly_bin853.fits
.....................!
real 24.26
user 23.54
sys 0.43

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/59978175/ft1_filtered_4FGL_J1606.9+5919_weekly_bin853.fits evtable="EVENTS" scfile=/lscratch/kocevski/59978175/ft2_4FGL_J1606.9+5919_weekly_bin853.fits sctable="SC_DATA" expcube=/lscratch/kocevski/59978175/ltcube_754876801_755481601_4FGL_J1606.9+5919_weekly_bin853.fits outfile=/lscratch/kocevski/59978175/expmap_754876801_755481601_4FGL_J1606.9+5919_weekly_bin853.fits irfs="P8R3_SOURCE_V2" evtype="INDEF" srcrad=30.0 nlong=88 nlat=88 nenergies=10 submap=no nlongmin=0 nlongmax=0 nlatmin=0 nlatmax=0 chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

The exposure maps generated by this tool are meant
to be used for *unbinned* likelihood analysis only.
Do not use them for binned analyses.
Computing the ExposureMap using /lscratch/kocevski/59978175/ltcube_754876801_755481601_4FGL_J1606.9+5919_weekly_bin853.fits
.....................!
real 71.22
user 66.76
sys 4.12

Generating the xml model:
radLim = 0.001
maxRad = 12
normsOnly = True
freeVariableSources = True
Fixing all sources to their catalog values, except variable sources
Creating file and adding sources from 4FGL
Added 221 point sources and 0 extended sources

Setting source of interest to:
4FGL J1606.9+5919 @ 241.734 59.3201

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/59978175/ft1_filtered_4FGL_J1606.9+5919_weekly_bin853.fits scfile=/lscratch/kocevski/59978175/ft2_4FGL_J1606.9+5919_weekly_bin853.fits outfile=/lscratch/kocevski/59978175/cmap_754876801_755481601_4FGL_J1606.9+5919_weekly_bin853.fits algorithm="CMAP" ebinalg="LOG" emin=30.0 emax=200000.0 ebinfile=NONE tbinalg="LIN" tbinfile=NONE nxpix=160 nypix=160 binsz=0.25 coordsys="CEL" xref=241.734 yref=59.3201 axisrot=0.0 rafield="RA" decfield="DEC" proj="AIT" hpx_ordering_scheme="RING" hpx_order=3 hpx_ebin=yes hpx_region="" evtable="EVENTS" sctable="SC_DATA" efield="ENERGY" tfield="TIME" chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

This is gtbin version HEAD
real 0.50
user 0.24
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/59978175/ft1_filtered_4FGL_J1606.9+5919_weekly_bin853.fits scfile=/lscratch/kocevski/59978175/ft2_4FGL_J1606.9+5919_weekly_bin853.fits outfile=/lscratch/kocevski/59978175/cmap_HighResolution_754876801_755481601_4FGL_J1606.9+5919_weekly_bin853.fits algorithm="CMAP" ebinalg="LOG" emin=30.0 emax=200000.0 ebinfile=NONE tbinalg="LIN" tbinfile=NONE nxpix=500 nypix=500 binsz=0.1 coordsys="CEL" xref=241.734 yref=59.3201 axisrot=0.0 rafield="RA" decfield="DEC" proj="AIT" hpx_ordering_scheme="RING" hpx_order=3 hpx_ebin=yes hpx_region="" evtable="EVENTS" sctable="SC_DATA" efield="ENERGY" tfield="TIME" chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

This is gtbin version HEAD
real 0.47
user 0.25
sys 0.17

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/59978175/ft1_filtered_4FGL_J1606.9+5919_weekly_bin853.fits evtable="EVENTS" scfile=/lscratch/kocevski/59978175/ft2_4FGL_J1606.9+5919_weekly_bin853.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/59978175/Model_4FGL_J1606.9+5919_weekly_bin853.xml irfs="P8R3_SOURCE_V2" evclsmin=0 evclass="INDEF" evtype="INDEF" convert=yes chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

adding source EG_v02
adding source GAL_V02
Working on...
/lscratch/kocevski/59978175/ft1_filtered_4FGL_J1606.9+5919_weekly_bin853.fits.....................!
real 76.98
user 75.87
sys 0.73

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/59978175/ft1_filtered_4FGL_J1606.9+5919_weekly_bin853.fits', '/lscratch/kocevski/59978175/ft2_4FGL_J1606.9+5919_weekly_bin853.fits', expMap='/lscratch/kocevski/59978175/expmap_754876801_755481601_4FGL_J1606.9+5919_weekly_bin853.fits', expCube='/lscratch/kocevski/59978175/ltcube_754876801_755481601_4FGL_J1606.9+5919_weekly_bin853.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/59978175/Model_4FGL_J1606.9+5919_weekly_bin853.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1606.9+5919'

4FGL J1606.9+5919
   Spectrum: PowerLaw
329    Prefactor:  2.197e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-14)
330        Index:  2.114e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
331        Scale:  2.350e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/59978175/ft1_filtered_4FGL_J1606.9+5919_weekly_bin853.fits
Spacecraft file(s): /lscratch/kocevski/59978175/ft2_4FGL_J1606.9+5919_weekly_bin853.fits
Exposure map: /lscratch/kocevski/59978175/expmap_754876801_755481601_4FGL_J1606.9+5919_weekly_bin853.fits
Exposure cube: /lscratch/kocevski/59978175/ltcube_754876801_755481601_4FGL_J1606.9+5919_weekly_bin853.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/59978175/Model_4FGL_J1606.9+5919_weekly_bin853.xml
Optimizer: MINUIT
Statistic: UNBINNED

Performing an iterative likelihood fit...

Fit tolerance = 1

Performing likelihood fit...
Done.

MINUIT Return Code (Fixed Index): 0
logL (Fixed Index) = 26760.4766305

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Fixed Index): 0
logL (Fixed Index) = 26758.7947187

Fit tolerance = 1e-08

Performing likelihood fit...
 **********
 **   14 **SET NOWARN 
 **********

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .83267E-09   1.0000          .0000       .10000E+07
     2 'Prefactor '    .42411E-06   1.0000          .0000       .10000E+07
     3 'Prefactor '    .57565E-06   1.0000          .0000       .10000E+07
     4 'Prefactor '    20.645       1.0000          .0000       .10000E+07
     5 'norm      '    2.2784       1.0000          .0000       .10000E+07
     6 'Prefactor '    36.601       1.0000          .0000       .10000E+07
     7 'Prefactor '    .27311E-07   1.0000          .0000       .10000E+07
     8 'norm      '    39.989       1.0000          .0000       .10000E+07
     9 'Prefactor '    26.648       1.0000          .0000       .10000E+07
    10 'Prefactor '    21.347       1.0000          .0000       .10000E+07
    11 'Prefactor '    .57535E-05   1.0000          .0000       .10000E+07
    12 'norm      '    .14391E-03   1.0000          .0000       .10000E+07
    13 'Prefactor '    7.1920       1.0000          .0000       .10000E+07
    14 'Prefactor '    .54981       1.0000          .0000       .10000E+07
    15 'norm      '    12.833       1.0000          .0000       .10000E+07
    16 'Prefactor '    1.9028       1.0000          .0000       .10000E+07
    17 'Prefactor '    4.0600       1.0000          .0000       .10000E+07
    18 'Prefactor '    4.7862       1.0000          .0000       .10000E+07
    19 'norm      '    .60116       1.0000          .0000       .10000E+07
    20 'Prefactor '    2.3793       1.0000          .0000       .10000E+07
    21 'Prefactor '    26.433       1.0000          .0000       .10000E+07
    22 'Prefactor '    1.8720       1.0000          .0000       .10000E+07
    23 'Prefactor '    .79103E-07   1.0000          .0000       .10000E+07
    24 'Prefactor '    .15187E-03   1.0000          .0000       .10000E+07
    25 'Normalizat'    1.0613       1.0000         .10000E-01   10.000    
    26 'Prefactor '    .85369       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .7060E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   26758.79     FROM MIGRAD    STATUS=CONVERGED    130 CALLS     1314 TOTAL
                     EDM=   .14E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  3.5%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .55511E-10    1.8105       -.34263E-06** at limit **
   2  Prefactor     .77716E-09    27.925       -.90568E-06** at limit **
   3  Prefactor      .0000        .77838       -.13134E-07** at limit **
   4  Prefactor     20.720        5.7481        .86566E-06    .83675E-01
   5  norm          2.2777        1.1998       -.13769E-06    .22055E-02
   6  Prefactor     36.740        6.4579        .73330E-06   -.12234    
   7  Prefactor      .0000        2.5615       -.26476E-06** at limit **
   8  norm          39.873        5.3055        .30095E-07    .15325E-01
   9  Prefactor     26.701        1.6857        .17155E-06    .88437E-03
  10  Prefactor     21.192        3.4471        .45517E-06   -.25758E-01
  11  Prefactor      .0000        1.1107        .14639E-06** at limit **
  12  norm           .0000        3.6363        .53057E-06** at limit **
  13  Prefactor     7.1968        3.2655       -.92674E-07   -.29580E-02
  14  Prefactor     .66785        16.659       -.55963E-05    .18936E-01
  15  norm          12.831        3.6742        .91334E-07   -.84372E-03
  16  Prefactor     1.9028        1.3762       -.12260E-06   -.64242E-02
  17  Prefactor     4.0746        3.7679        .63942E-07    .12511E-02
  18  Prefactor     4.8010        2.2467        .63890E-06    .67371E-01
  19  norm          .59960        .34589        .95296E-07    .10934E-01
  20  Prefactor     2.3751        2.9760       -.43172E-06   -.24585E-02
  21  Prefactor     26.517        6.0927        .80957E-06    .10930    
  22  Prefactor     1.8705        2.0268       -.13606E-06   -.39776E-02
  23  Prefactor      .0000        .61441       -.69242E-07** at limit **
  24  Prefactor      .0000        5.9865        .20297E-06** at limit **
  25  Normalizat    1.0616        .97481E-01    .38077E-05    .34950E-04
  26  Prefactor     .85349        .93191E-01   -.51121E-05    .89514E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 5.55112e-11
  Prefactor  = 7.77156e-10
  Prefactor  = 0
  Prefactor  = 20.7202
  norm       = 2.27767
  Prefactor  = 36.7403
  Prefactor  = 0
  norm       = 39.873
  Prefactor  = 26.7008
  Prefactor  = 21.1923
  Prefactor  = 0
  norm       = 0
  Prefactor  = 7.19681
  Prefactor  = 0.667853
  norm       = 12.8312
  Prefactor  = 1.90281
  Prefactor  = 4.07455
  Prefactor  = 4.80101
  norm       = 0.599598
  Prefactor  = 2.37506
  Prefactor  = 26.5166
  Prefactor  = 1.87048
  Prefactor  = 0
  Prefactor  = 0
  Normalizat = 1.06158
  Prefactor  = 0.853489
 **********
 **   18 **HESSE 
 **********

 FCN=   26758.79     FROM HESSE     STATUS=OK           522 CALLS     1836 TOTAL
                     EDM=   .18E-05    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .55511E-10    1.8163        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .77716E-09    2.1253        .64317E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor      .0000        .78241        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     20.720        11.705        .22015E-03   -1.5617    
   5  norm          2.2777        1.2242        .67997E-03   -1.5678    
   6  Prefactor     36.740        33.029        .16531E-03   -1.5587    
   7  Prefactor      .0000        2.5609        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          39.873        5.4214        .15815E-03   -1.5582    
   9  Prefactor     26.701        15.411        .19375E-03   -1.5605    
  10  Prefactor     21.192        19.457        .21650E-03   -1.5616    
  11  Prefactor      .0000        1.1105        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm           .0000        3.6364        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     7.1968        3.3010        .37380E-03   -1.5654    
  14  Prefactor     .66785        47.904        .73849E-03   -1.5692    
  15  norm          12.831        3.6967        .27936E-03   -1.5636    
  16  Prefactor     1.9028        1.3884        .75359E-03   -1.5680    
  17  Prefactor     4.0746        3.7819        .50016E-03   -1.5668    
  18  Prefactor     4.8010        7.1424        .45964E-03   -1.5664    
  19  norm          .59960        .38655        .69124E-03   -1.5692    
  20  Prefactor     2.3751        3.0351        .66385E-03   -1.5677    
  21  Prefactor     26.517        11.516        .19454E-03   -1.5605    
  22  Prefactor     1.8705        2.0556        .76089E-03   -1.5681    
  23  Prefactor      .0000        .61611        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor      .0000        6.0062        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Normalizat    1.0616        .85602E-01    .39856E-01   -.90995    
  26  Prefactor     .85349        .81309E-01    .44412E-01   -.97786    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.76219e-06
Minuit parameter uncertainties:
  1  1.98855e-05
  2  8.19167e-05
  3  9.97839e-07
  4  11.7054
  5  1.22421
  6  33.0287
  7  1.74936e-06
  8  5.42136
  9  15.4113
  10  19.4569
  11  9.22923e-06
  12  1.23406e-05
  13  3.30097
  14  11.3125
  15  3.69675
  16  1.38837
  17  3.78186
  18  7.14242
  19  0.386554
  20  3.03507
  21  11.5159
  22  2.05556
  23  1.81914e-06
  24  2.22328e-05
  25  0.0856128
  26  0.08132
Done.

MINUIT Return Code (Fixed Index): 0
logL (Fixed Index) = 26758.7942991

Extracting fit parameters...

4FGL J1606.9+5919
   Spectrum: PowerLaw
329    Prefactor:  2.670e+01  1.541e+01  0.000e+00  1.000e+06 ( 1.000e-14)
330        Index:  2.114e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
331        Scale:  2.350e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
703    Prefactor:  8.535e-01  8.132e-02  0.000e+00  1.000e+01 ( 1.000e+00)
704        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
705        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
702   Normalization:  1.062e+00  8.561e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 6.55
Ra Dec: 241.734 59.320
Photon Index (Fixed Index): 2.11 +/- 0.00
Photon Flux (Fixed Index): 1.90e-08 +/- 1.09e-08
Energy Flux (Fixed Index): 1.01e-05 +/- 5.83e-06

Performing a free index iterative likelihood fit...

Freezing all point sources, except source of interest...

Done.

Freeing candidate source...
Done.

Fit tolerance = 1

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 26758.7807784
delta logL = 0.0135206842569

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 26758.7687619
delta logL = 0.0255372071697

Fit tolerance = 1e-08

Performing likelihood fit...
 **********
 **   14 **SET NOWARN 
 **********

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    23.874       1.0000          .0000       .10000E+07
     2 'Index     '    2.2211       1.0000          .0000       10.000    
     3 'Normalizat'    1.0585       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .85528       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .7060E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
 MIGRAD TERMINATED WITHOUT CONVERGENCE.

 FCN=   26758.77     FROM MIGRAD    STATUS=FAILED        99 CALLS      268 TOTAL
                     EDM=   .65E-07    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     23.882        21.550        .81884E-05   -.13717E-02
   2  Index         2.2205        .54512        .93368E-02    .18825E-02
   3  Normalizat    1.0585        .96097E-01    .23551E-03   -.57000E-03
   4  Prefactor     .85524        .92774E-01    .25212E-03   -.11436E-03
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   26758.77     FROM SIMPLEX   STATUS=UNCHANGED     74 CALLS      342 TOTAL
                     EDM=   .14E-04    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     23.882        21.550        .14785E-04   -1.5610    
   2  Index         2.2205        .54512        .50498E-03   -.58945    
   3  Normalizat    1.0585        .96097E-01    .12736E-03   -.91096    
   4  Prefactor     .85524        .92774E-01    .14126E-03   -.97723    
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   26758.77     FROM MIGRAD    STATUS=CONVERGED     28 CALLS      370 TOTAL
                     EDM=   .75E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     23.882        19.180        .32754E-06   -.43498E-03
   2  Index         2.2205        .48533        .18674E-02    .10325E-04
   3  Normalizat    1.0585        .95857E-01    .94204E-05   -.10620E-04
   4  Prefactor     .85524        .92718E-01    .10085E-04   -.54112E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 23.8822
  Index      = 2.22049
  Normalizat = 1.05849
  Prefactor  = 0.855236
 **********
 **   18 **HESSE 
 **********

 FCN=   26758.77     FROM HESSE     STATUS=OK            23 CALLS      393 TOTAL
                     EDM=   .55E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     23.882        18.760        .37218E-06   -1.5610    
   2  Index         2.2205        .47471        .74694E-04   -.58945    
   3  Normalizat    1.0585        .95979E-01    .18841E-05   -.91096    
   4  Prefactor     .85524        .92867E-01    .20169E-05   -.97723    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 5.51894e-12
Minuit parameter uncertainties:
  1  18.76
  2  0.47575
  3  0.0959952
  4  0.0928838
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 26758.7687595
delta logL = 0.0255395217027

Extracting fit parameters...

4FGL J1606.9+5919
   Spectrum: PowerLaw
329    Prefactor:  2.388e+01  1.876e+01  0.000e+00  1.000e+06 ( 1.000e-14)
330        Index:  2.220e+00  4.758e-01  0.000e+00  1.000e+01 (-1.000e+00)
331        Scale:  2.350e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
703    Prefactor:  8.552e-01  9.288e-02  0.000e+00  1.000e+01 ( 1.000e+00)
704        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
705        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
702   Normalization:  1.058e+00  9.600e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 6.63
Ra Dec: 241.734 59.320
Photon Index (Free Index): 2.22 +/- 0.48
Photon Flux (Free Index): 2.17e-08 +/- 1.70e-08
Energy Flux (Free Index): 9.38e-06 +/- 5.89e-06

Creating a high resolution counts map...
INFO: Auto-setting vmin to -1.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  1.110e+00 [aplpy.core]
Saving /lscratch/kocevski/59978175/cmap_HighResolution_754876801_755481601_4FGL_J1606.9+5919_weekly_bin853.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='1.90e-08', energy_flux2='9.38e-06', photon_flux_error='1.09e-08', dlogl='2.55e-02', energy_flux='1.01e-05', photon_flux2='2.17e-08', job_status='DONE', time_completed='2024-12-10 01:03:58.423847', photon_index_error2='0.48', photon_index2='2.22', ts='6.55', fit_tolerance='1e-08', GAL='0.85', photon_index_error='0.00', energy_flux_error2='5.89e-06', EG='1.06', time_epoch_completed='1733821438.42', return_code='0', job_id='59978175', GAL2='0.86', EG2='1.06', return_code2='0', energy_flux_error='5.83e-06', photon_flux_error2='1.70e-08', ts2='6.63', photon_index='2.11' WHERE bin_id='853' AND source_name='4FGL J1606.9+5919' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Dec 10 01:03:58 PST 2024

