/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 = 17341
number of fields = 31
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J1159.0+0939_weekly_bin772
RA = 179.751, Dec = 9.6603
tmin = 705888001, tmax = 706492801
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='17811261', job_status='RUN', time_executed='2023-05-23 00:40:45.027423', time_epoch_executed='1684827645.03' WHERE source_name='4FGL J1159.0+0939' and cadence='weekly' and bin_id='772'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/17811261

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

Retrieving the FT1 file...

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

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

Retrieving 107 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/17811261/ft1_4FGL_J1159.0+0939_weekly_bin772.fits


Retrieving the FT1 file...

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

Retrieving 107 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/17811261/ft2_4FGL_J1159.0+0939_weekly_bin772.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/17811261/ft1_4FGL_J1159.0+0939_weekly_bin772.fits outfile=/lscratch/kocevski/17811261/ft1_filteredMKT_4FGL_J1159.0+0939_weekly_bin772.fits ra=179.751 dec=9.6603 rad=12.0 tmin=705888001.0 tmax=706492801.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 4.92
user 4.64
sys 0.22

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/17811261/ft2_4FGL_J1159.0+0939_weekly_bin772.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/17811261/ft2_4FGL_J1159.0+0939_weekly_bin772.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/17811261/ft1_filteredMKT_4FGL_J1159.0+0939_weekly_bin772.fits evtable="EVENTS" outfile="/lscratch/kocevski/17811261/ft1_filtered_4FGL_J1159.0+0939_weekly_bin772.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.38
user 0.20
sys 0.15

Number of photons that the gtmktime cut: 1266

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/17811261/ft1_filtered_4FGL_J1159.0+0939_weekly_bin772.fits" evtable="EVENTS" scfile=/lscratch/kocevski/17811261/ft2_4FGL_J1159.0+0939_weekly_bin772.fits sctable="SC_DATA" outfile=/lscratch/kocevski/17811261/ltcube_705888001_706492801_4FGL_J1159.0+0939_weekly_bin772.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/17811261/ft2_4FGL_J1159.0+0939_weekly_bin772.fits
.....................!
real 18.14
user 17.74
sys 0.23

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/17811261/ft1_filtered_4FGL_J1159.0+0939_weekly_bin772.fits evtable="EVENTS" scfile=/lscratch/kocevski/17811261/ft2_4FGL_J1159.0+0939_weekly_bin772.fits sctable="SC_DATA" expcube=/lscratch/kocevski/17811261/ltcube_705888001_706492801_4FGL_J1159.0+0939_weekly_bin772.fits outfile=/lscratch/kocevski/17811261/expmap_705888001_706492801_4FGL_J1159.0+0939_weekly_bin772.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/17811261/ltcube_705888001_706492801_4FGL_J1159.0+0939_weekly_bin772.fits
.....................!
real 66.19
user 61.87
sys 3.85

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 193 point sources and 0 extended sources

Setting source of interest to:
4FGL J1159.0+0939 @ 179.751 9.6603

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/17811261/ft1_filtered_4FGL_J1159.0+0939_weekly_bin772.fits scfile=/lscratch/kocevski/17811261/ft2_4FGL_J1159.0+0939_weekly_bin772.fits outfile=/lscratch/kocevski/17811261/cmap_705888001_706492801_4FGL_J1159.0+0939_weekly_bin772.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=179.751 yref=9.6603 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.40
user 0.24
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/17811261/ft1_filtered_4FGL_J1159.0+0939_weekly_bin772.fits scfile=/lscratch/kocevski/17811261/ft2_4FGL_J1159.0+0939_weekly_bin772.fits outfile=/lscratch/kocevski/17811261/cmap_HighResolution_705888001_706492801_4FGL_J1159.0+0939_weekly_bin772.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=179.751 yref=9.6603 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.39
user 0.22
sys 0.15

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/17811261/ft1_filtered_4FGL_J1159.0+0939_weekly_bin772.fits evtable="EVENTS" scfile=/lscratch/kocevski/17811261/ft2_4FGL_J1159.0+0939_weekly_bin772.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/17811261/Model_4FGL_J1159.0+0939_weekly_bin772.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/17811261/ft1_filtered_4FGL_J1159.0+0939_weekly_bin772.fits.....................!
real 45.00
user 43.76
sys 0.88

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/17811261/ft1_filtered_4FGL_J1159.0+0939_weekly_bin772.fits', '/lscratch/kocevski/17811261/ft2_4FGL_J1159.0+0939_weekly_bin772.fits', expMap='/lscratch/kocevski/17811261/expmap_705888001_706492801_4FGL_J1159.0+0939_weekly_bin772.fits', expCube='/lscratch/kocevski/17811261/ltcube_705888001_706492801_4FGL_J1159.0+0939_weekly_bin772.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/17811261/Model_4FGL_J1159.0+0939_weekly_bin772.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1159.0+0939'

4FGL J1159.0+0939
   Spectrum: PowerLaw
301    Prefactor:  2.838e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-13)
302        Index:  2.132e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
303        Scale:  1.503e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/17811261/ft1_filtered_4FGL_J1159.0+0939_weekly_bin772.fits
Spacecraft file(s): /lscratch/kocevski/17811261/ft2_4FGL_J1159.0+0939_weekly_bin772.fits
Exposure map: /lscratch/kocevski/17811261/expmap_705888001_706492801_4FGL_J1159.0+0939_weekly_bin772.fits
Exposure cube: /lscratch/kocevski/17811261/ltcube_705888001_706492801_4FGL_J1159.0+0939_weekly_bin772.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/17811261/Model_4FGL_J1159.0+0939_weekly_bin772.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) = 14307.9865643

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .53358       1.0000          .0000       .10000E+07
     2 'Prefactor '    3.5075       1.0000          .0000       .10000E+07
     3 'Prefactor '    7.4559       1.0000          .0000       .10000E+07
     4 'Prefactor '    .60711E-03   1.0000          .0000       .10000E+07
     5 'Prefactor '    .24952E-06   1.0000          .0000       .10000E+07
     6 'Prefactor '    2.0855       1.0000          .0000       .10000E+07
     7 'Prefactor '    .71356       1.0000          .0000       .10000E+07
     8 'Prefactor '    .38858E-09   1.0000          .0000       .10000E+07
     9 'Prefactor '    9.6552       1.0000          .0000       .10000E+07
    10 'Prefactor '    13.738       1.0000          .0000       .10000E+07
    11 'Prefactor '    21.915       1.0000          .0000       .10000E+07
    12 'Prefactor '    .38858E-08   1.0000          .0000       .10000E+07
    13 'Prefactor '    .77541       1.0000          .0000       .10000E+07
    14 'Prefactor '    .24784E-03   1.0000          .0000       .10000E+07
    15 'Prefactor '    9.8335       1.0000          .0000       .10000E+07
    16 'norm      '    5.1535       1.0000          .0000       .10000E+07
    17 'Prefactor '    9.4569       1.0000          .0000       .10000E+07
    18 'norm      '    .52716E-03   1.0000          .0000       .10000E+07
    19 'norm      '    1.2408       1.0000          .0000       .10000E+07
    20 'Prefactor '    5.5118       1.0000          .0000       .10000E+07
    21 'norm      '    .43854E-08   1.0000          .0000       .10000E+07
    22 'Normalizat'    1.1536       1.0000         .10000E-01   10.000    
    23 'Prefactor '    1.0069       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6190E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   14307.97     FROM MIGRAD    STATUS=CONVERGED    145 CALLS     1533 TOTAL
                     EDM=   .13E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.3%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .53024        .65808       -.31124E-07   -.14757E-03
   2  Prefactor     3.5070        1.7576       -.18393E-07    .15211E-03
   3  Prefactor     7.4634        7.0695       -.10224E-07   -.20995E-03
   4  Prefactor     .55511E-10    23.033       -.19939E-06** at limit **
   5  Prefactor      .0000        1.7533        .11341E-06** at limit **
   6  Prefactor     2.0800        3.6056        .13336E-07    .16739E-03
   7  Prefactor     .61221        25.149       -.10713E-05    .86594E-02
   8  Prefactor      .0000        .99364        .10048E-06** at limit **
   9  Prefactor     9.8675        41.782        .33638E-06    .44245E-03
  10  Prefactor     13.773        2.7345       -.55738E-07    .98170E-02
  11  Prefactor     21.910        6.1688       -.13241E-06   -.63609E-01
  12  Prefactor      .0000        .60579       -.37683E-07** at limit **
  13  Prefactor     .77476        1.5887       -.17399E-07   -.10239E-04
  14  Prefactor     .55511E-10    7.4870        .70332E-07** at limit **
  15  Prefactor     9.8321        8.2674        .36627E-07    .79383E-02
  16  norm          5.1524        2.6201       -.60490E-07    .44932E-03
  17  Prefactor     9.5289        8.4641        .27901E-06    .21041E-02
  18  norm           .0000        7.9658        .22094E-07** at limit **
  19  norm          1.2405        .43295        .72762E-08   -.51197E-03
  20  Prefactor     5.4891        4.3701       -.18332E-08   -.58647E-04
  21  norm           .0000        .69052        .11392E-06** at limit **
  22  Normalizat    1.1538        .15473        .19241E-05   -.69234E-05
  23  Prefactor     1.0069        .13474       -.97422E-06   -.18506E-05
                               ERR DEF=  .500    
Final values: 
  norm       = 0.530244
  Prefactor  = 3.50703
  Prefactor  = 7.4634
  Prefactor  = 5.55112e-11
  Prefactor  = 0
  Prefactor  = 2.08
  Prefactor  = 0.61221
  Prefactor  = 0
  Prefactor  = 9.86749
  Prefactor  = 13.7728
  Prefactor  = 21.9096
  Prefactor  = 0
  Prefactor  = 0.77476
  Prefactor  = 5.55112e-11
  Prefactor  = 9.83213
  norm       = 5.15239
  Prefactor  = 9.52894
  norm       = 0
  norm       = 1.24046
  Prefactor  = 5.48909
  norm       = 0
  Normalizat = 1.15378
  Prefactor  = 1.00686
 **********
 **   18 **HESSE 
 **********

 FCN=   14307.97     FROM HESSE     STATUS=OK           428 CALLS     1961 TOTAL
                     EDM=   .88E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .53024        17.676        .75401E-03   -1.5693    
   2  Prefactor     3.5070        1.7631        .53958E-03   -1.5671    
   3  Prefactor     7.4634        7.0907        .36706E-03   -1.5653    
   4  Prefactor     .55511E-10    23.044        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor      .0000        1.7582        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     2.0800        3.6723        .71468E-03   -1.5679    
   7  Prefactor     .61221        38.639        .59614E-03   -1.5692    
   8  Prefactor      .0000        .98937        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     9.8675        43.422        .32226E-03   -1.5645    
  10  Prefactor     13.773        20.877        .26998E-03   -1.5634    
  11  Prefactor     21.910        15.280        .21367E-03   -1.5614    
  12  Prefactor      .0000        .60413        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .77476        1.6022        .54786E-03   -1.5690    
  14  Prefactor     .55511E-10    7.4763        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     9.8321        8.6985        .31931E-03   -1.5645    
  16  norm          5.1524        2.6406        .44261E-03   -1.5663    
  17  Prefactor     9.5289        19.477        .32564E-03   -1.5646    
  18  norm           .0000        7.9589        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  norm          1.2405        .44394        .94792E-03   -1.5686    
  20  Prefactor     5.4891        4.3699        .42773E-03   -1.5661    
  21  norm           .0000        .32547        .25695E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Normalizat    1.1538        .13286        .60217E-01   -.88043    
  23  Prefactor     1.0069        .11498        .43821E-01   -.92501    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 8.76716e-07
Minuit parameter uncertainties:
  1  6.12289
  2  1.76312
  3  7.09072
  4  7.04616e-05
  5  2.87949e-06
  6  3.67227
  7  9.72733
  8  1.47425e-06
  9  41.3994
  10  20.8774
  11  15.2797
  12  5.61841e-07
  13  1.60225
  14  3.4369e-05
  15  8.69854
  16  2.64063
  17  19.4774
  18  2.54189e-05
  19  0.443943
  20  4.36993
  21  8.09463e-07
  22  0.132897
  23  0.115008
Done.

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

Extracting fit parameters...

4FGL J1159.0+0939
   Spectrum: PowerLaw
301    Prefactor:  0.000e+00  2.879e-06  0.000e+00  1.000e+06 ( 1.000e-13)
302        Index:  2.132e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
303        Scale:  1.503e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
616    Prefactor:  1.007e+00  1.150e-01  0.000e+00  1.000e+01 ( 1.000e+00)
617        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
618        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
615   Normalization:  1.154e+00  1.329e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.00
Ra Dec: 179.751 9.660
Photon Flux Upper Limit: 2.60125710732e-08 ph cm-2 s-1
Energy Flux Upper Limit: 0.0019717389632 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/17811261/likelihoodResults_705888001_706492801_4FGL_J1159.0+0939_weekly_bin772.txt

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): 102
logL (Free Index) = 14307.9666342
delta logL = -0.000598546137553

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 14307.9660357
delta logL = -4.00868884753e-08

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
  MNHESS FAILS AND WILL RETURN DIAGONAL MATRIX. 

 FCN=   14307.97     FROM MIGRAD    STATUS=CONVERGED     36 CALLS      246 TOTAL
                     EDM=   .29E-12  STRATEGY=1  ERROR MATRIX UNCERTAINTY=100.0%

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor      .0000        1.4277        .42118E-03** at limit **
   2  Index         2.4970        1.7009        .10793E-04     .0000    
   3  Normalizat    1.1538        1.1247        .61221E-06    .16772E-04
   4  Prefactor     1.0069        1.2770        .44016E-05    .64392E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0
  Index      = 2.49703
  Normalizat = 1.15378
  Prefactor  = 1.00686
 **********
 **   18 **HESSE 
 **********
  MNHESS FAILS AND WILL RETURN DIAGONAL MATRIX. 

 FCN=   14307.97     FROM HESSE     STATUS=FAILED         9 CALLS      255 TOTAL
                     EDM=   .29E-12  STRATEGY=1  ERROR MATRIX UNCERTAINTY=100.0%

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor      .0000        1.4277        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         .70251        1.9959        .10793E-04   -.52429    
   3  Normalizat    1.1538        1.1247        .61221E-06   -.88043    
   4  Prefactor     1.0069        1.2770        .44016E-05   -.92501    
                               ERR DEF=  .500    
Minuit fit quality: 1   estimated distance: 2.9422e-13
Minuit parameter uncertainties:
  1  1.12608e-06
  2  1.74803
  3  1.14957
  4  1.31878
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Done.

MINUIT Return Code (Free Index): 101
logL (Free Index) = 14307.9660357
delta logL = 0.0

Extracting fit parameters...

4FGL J1159.0+0939
   Spectrum: PowerLaw
301    Prefactor:  0.000e+00  1.126e-06  0.000e+00  1.000e+06 ( 1.000e-13)
302        Index:  2.497e+00  1.748e+00  0.000e+00  1.000e+01 (-1.000e+00)
303        Scale:  1.503e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
616    Prefactor:  1.007e+00  1.319e+00  0.000e+00  1.000e+01 ( 1.000e+00)
617        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
618        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
615   Normalization:  1.154e+00  1.150e+00  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.00
Ra Dec: 179.751 9.660

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/17811261/cmap_HighResolution_705888001_706492801_4FGL_J1159.0+0939_weekly_bin772.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.97e-03', job_status='DONE', photon_flux_upper_limit='2.60e-08', time_completed='2023-05-23 00:48:07.441962', job_id='17811261', GAL2='1.01', fit_tolerance='1e-08', EG2='1.15', EG='1.15', time_epoch_completed='1684828087.44', return_code2='101', ts='0.00', comment='SUCCESS', return_code='0', GAL='1.01', dlogl='0.00e+00', ts2='0.00', photon_index_error='0.00', photon_index='2.13' WHERE bin_id='772' AND source_name='4FGL J1159.0+0939' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue May 23 00:48:07 PDT 2023

