/nfs/farm/g/glast/g/LCRepository/bin/miniconda2/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)


Waiting 219 seconds before starting...
Proceeding.

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 make4FGLxml version 01r04.
The default diffuse model files and names are for pass 8 and 4FGL and assume you have v11r5p3 of the Fermi Science Tools or higher.

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

/nfs/farm/g/glast/g/LCRepository/bin/miniconda2/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 = 7474
number of fields = 27
No RA_SUN column yet. Adding RA_SUN/DEC_SUN columns.
Done.


Performing analysis on: 4FGL_J1159.0+0939_daily_bin177
RA = 179.751, Dec = 9.6603
tmin = 285206401, tmax = 285465601
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='203440', job_status='RUN', time_executed='2021-09-04 17:55:29.214773', time_epoch_executed='1630803329.21' WHERE source_name='4FGL J1159.0+0939' and cadence='daily' and bin_id='177'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/203440

Creating custom pfile directory:
/scratch/kocevski/203440/pfiles/

Retrieving the FT1 file...

Issuing command:
/afs/slac.stanford.edu/g/glast/ground/bin/datacat find --group FT1 --filter 'nMetStop>=285206401.0 && nMetStart<285465601.0' /Data/Flight/Reprocess/P305

Issuing command:
/afs/slac.stanford.edu/g/glast/ground/bin/datacat find --group FT1 --filter 'nMetStart>564945418 && nMetStop>=285206401.0 && nMetStart<285465601.0' /Data/Flight/Level1/LPA

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/203440/ft1_4FGL_J1159.0+0939_daily_bin177.fits


Retrieving the FT1 file...

Issuing command:
/afs/slac.stanford.edu/g/glast/ground/bin/datacat find --group FT2 --filter 'nMetStop>=285206401.0 && nMetStart<285465601.0' /Data/Flight/Level1/LPA

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/203440/ft2_4FGL_J1159.0+0939_daily_bin177.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/203440/ft1_4FGL_J1159.0+0939_daily_bin177.fits outfile=/scratch/kocevski/203440/ft1_filteredMKT_4FGL_J1159.0+0939_daily_bin177.fits ra=179.751 dec=9.6603 rad=12.0 tmin=285206401.0 tmax=285465601.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.46
user 3.24
sys 0.21

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/203440/ft2_4FGL_J1159.0+0939_daily_bin177.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/203440/ft2_4FGL_J1159.0+0939_daily_bin177.fits sctable="SC_DATA" filter="IN_SAA!=T && LIVETIME>0 && gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nogrb.gti',(START+STOP)/2) && (angsep(RA_SUN,DEC_SUN,RA_ZENITH,DEC_ZENITH)>115 || gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nosolarflares.gti',(START+STOP)/2))" roicut=no evfile=/scratch/kocevski/203440/ft1_filteredMKT_4FGL_J1159.0+0939_daily_bin177.fits evtable="EVENTS" outfile="/scratch/kocevski/203440/ft1_filtered_4FGL_J1159.0+0939_daily_bin177.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('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nogrb.gti',(START+STOP)/2) && (angsep(RA_SUN,DEC_SUN,RA_ZENITH,DEC_ZENITH)>115 || gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nosolarflares.gti',(START+STOP)/2))
real 0.48
user 0.33
sys 0.14

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/203440/ft1_filtered_4FGL_J1159.0+0939_daily_bin177.fits" evtable="EVENTS" scfile=/scratch/kocevski/203440/ft2_4FGL_J1159.0+0939_daily_bin177.fits sctable="SC_DATA" outfile=/scratch/kocevski/203440/ltcube_285206401_285465601_4FGL_J1159.0+0939_daily_bin177.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 /scratch/kocevski/203440/ft2_4FGL_J1159.0+0939_daily_bin177.fits
.....................!
real 11.94
user 11.60
sys 0.31

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/203440/ft1_filtered_4FGL_J1159.0+0939_daily_bin177.fits evtable="EVENTS" scfile=/scratch/kocevski/203440/ft2_4FGL_J1159.0+0939_daily_bin177.fits sctable="SC_DATA" expcube=/scratch/kocevski/203440/ltcube_285206401_285465601_4FGL_J1159.0+0939_daily_bin177.fits outfile=/scratch/kocevski/203440/expmap_285206401_285465601_4FGL_J1159.0+0939_daily_bin177.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 /scratch/kocevski/203440/ltcube_285206401_285465601_4FGL_J1159.0+0939_daily_bin177.fits
.....................!
real 190.72
user 185.98
sys 4.27

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=/scratch/kocevski/203440/ft1_filtered_4FGL_J1159.0+0939_daily_bin177.fits scfile=/scratch/kocevski/203440/ft2_4FGL_J1159.0+0939_daily_bin177.fits outfile=/scratch/kocevski/203440/cmap_285206401_285465601_4FGL_J1159.0+0939_daily_bin177.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.53
user 0.38
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/203440/ft1_filtered_4FGL_J1159.0+0939_daily_bin177.fits scfile=/scratch/kocevski/203440/ft2_4FGL_J1159.0+0939_daily_bin177.fits outfile=/scratch/kocevski/203440/cmap_HighResolution_285206401_285465601_4FGL_J1159.0+0939_daily_bin177.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.54
user 0.39
sys 0.13

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/203440/ft1_filtered_4FGL_J1159.0+0939_daily_bin177.fits evtable="EVENTS" scfile=/scratch/kocevski/203440/ft2_4FGL_J1159.0+0939_daily_bin177.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/203440/Model_4FGL_J1159.0+0939_daily_bin177.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...
/scratch/kocevski/203440/ft1_filtered_4FGL_J1159.0+0939_daily_bin177.fits.....................!
real 51.00
user 49.67
sys 1.14

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/203440/ft1_filtered_4FGL_J1159.0+0939_daily_bin177.fits', '/scratch/kocevski/203440/ft2_4FGL_J1159.0+0939_daily_bin177.fits', expMap='/scratch/kocevski/203440/expmap_285206401_285465601_4FGL_J1159.0+0939_daily_bin177.fits', expCube='/scratch/kocevski/203440/ltcube_285206401_285465601_4FGL_J1159.0+0939_daily_bin177.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/203440/Model_4FGL_J1159.0+0939_daily_bin177.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  1.000e-04  1.000e+04 ( 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): /scratch/kocevski/203440/ft1_filtered_4FGL_J1159.0+0939_daily_bin177.fits
Spacecraft file(s): /scratch/kocevski/203440/ft2_4FGL_J1159.0+0939_daily_bin177.fits
Exposure map: /scratch/kocevski/203440/expmap_285206401_285465601_4FGL_J1159.0+0939_daily_bin177.fits
Exposure cube: /scratch/kocevski/203440/ltcube_285206401_285465601_4FGL_J1159.0+0939_daily_bin177.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/203440/Model_4FGL_J1159.0+0939_daily_bin177.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) = 5179.91639696

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .55091E-01   1.0000         .10000E-03   10000.    
     2 'Prefactor '    10.773       1.0000         .10000E-03   10000.    
     3 'Prefactor '    5.4689       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10013E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    57.991       1.0000         .10000E-03   10000.    
     6 'Prefactor '    79.982       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10012E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    3.8270       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .18565E-02   1.0000         .10000E-03   10000.    
    11 'Prefactor '    222.00       1.0000         .10000E-03   10000.    
    12 'Prefactor '    12.635       1.0000         .10000E-03   10000.    
    13 'Prefactor '    29.173       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10392E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    5.1605       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10045E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    18 'norm      '    7.9186       1.0000         .10000E-03   10000.    
    19 'Prefactor '    23.075       1.0000         .10000E-03   10000.    
    20 'norm      '    .15258E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10286E-03   1.0000         .10000E-03   10000.    
    22 'norm      '    3.5544       1.0000         .10000E-03   10000.    
    23 'Prefactor '    21.146       1.0000         .10000E-03   10000.    
    24 'Prefactor '    8.6739       1.0000         .10000E-03   10000.    
    25 'norm      '    5.3203       1.0000         .10000E-03   10000.    
    26 'Normalizat'    .78627       1.0000         .10000E-01   10.000    
    27 'Prefactor '    1.1315       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.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   5179.874     FROM MIGRAD    STATUS=CONVERGED    682 CALLS     3368 TOTAL
                     EDM=   .15E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .7%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .10687E-03    7.1315       -.53141E-06** at limit **
   2  Prefactor     10.744        30.884        .30287E-04   -.84403E-05
   3  Prefactor     5.4683        3.3214        .18087E-06   -.12448E-03
   4  Prefactor     .10000E-03    4.8776        .13960E-06** at limit **
   5  Prefactor     57.953        32.850        .12857E-04   -.84704E-05
   6  Prefactor     80.052        89.587        .45482E-04   -.63022E-05
   7  Prefactor     .10000E-03    3.7037       -.30888E-06** at limit **
   8  Prefactor     .10000E-03    5.1841       -.32976E-06** at limit **
   9  Prefactor     3.8505        60.688       -.36802E-04   -.17861E-03
  10  Prefactor     .10406E-03    2.2720       -.81698E-07** at limit **
  11  Prefactor     222.07        165.17        .37381E-04    .10472E-03
  12  Prefactor     12.582        40.946        .60057E-05   -.17244E-04
  13  Prefactor     29.169        29.726        .57033E-06   -.14023E-04
  14  Prefactor     .10000E-03    2.0895        .74564E-06** at limit **
  15  Prefactor     5.1634        4.2749        .48817E-06   -.92399E-03
  16  Prefactor     .10000E-03    13.664       -.21852E-06** at limit **
  17  Prefactor     .10000E-03    6.5361        .66000E-07** at limit **
  18  norm          7.9218        4.8810       -.14496E-06   -.18180E-03
  19  Prefactor     23.044        25.384        .10234E-04   -.14797E-05
  20  norm          .10000E-03    44.123       -.14155E-05** at limit **
  21  Prefactor     .10000E-03    59.632        .78672E-05** at limit **
  22  norm          3.5543        .95134        .63264E-07   -.26043E-03
  23  Prefactor     21.146        18.346        .90582E-06   -.26000E-04
  24  Prefactor     8.6665        43.097       -.52628E-05   -.22908E-04
  25  norm          5.3199        2.3908        .12048E-06   -.69446E-04
  26  Normalizat    .78596        .22904       -.10122E-04    .96357E-04
  27  Prefactor     1.1320        .19284       -.10161E-06   -.18748E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 0.000106872
  Prefactor  = 10.7441
  Prefactor  = 5.46826
  Prefactor  = 0.0001
  Prefactor  = 57.9533
  Prefactor  = 80.0516
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 3.85055
  Prefactor  = 0.000104062
  Prefactor  = 222.069
  Prefactor  = 12.5824
  Prefactor  = 29.1689
  Prefactor  = 0.000100002
  Prefactor  = 5.16338
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 7.92178
  Prefactor  = 23.0438
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 3.55431
  Prefactor  = 21.1459
  Prefactor  = 8.66645
  norm       = 5.31993
  Normalizat = 0.78596
  Prefactor  = 1.132
 **********
 **   18 **HESSE 
 **********

 FCN=   5179.874     FROM HESSE     STATUS=OK           512 CALLS     3880 TOTAL
                     EDM=   .41E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .10687E-03    10.790        .65771E-01   -1.5707    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     10.744        30.812        .12207E-03   -1.5052    
   3  Prefactor     5.4683        3.3224        .98275E-04   -1.5240    
   4  Prefactor     .10000E-03    4.8893        .15522E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     57.953        32.793        .26341E-03   -1.4184    
   6  Prefactor     80.052        89.227        .22454E-03   -1.3916    
   7  Prefactor     .10000E-03    3.7054        .13527E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    5.2085        .15999E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     3.8505        57.988        .20631E-03   -1.5315    
  10  Prefactor     .10406E-03    4.7743        .37209E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     222.07        162.06        .13575E-03   -1.2716    
  12  Prefactor     12.582        40.912        .11269E-03   -1.4998    
  13  Prefactor     29.169        29.718        .74177E-04   -1.4627    
  14  Prefactor     .10000E-03    9.3494        .18195E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     5.1634        3.9645        .11818E-03   -1.5253    
  16  Prefactor     .10000E-03    13.672        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     .10000E-03    6.5493        .17968E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  norm          7.9218        4.8832        .11355E-03   -1.5145    
  19  Prefactor     23.044        25.368        .83386E-04   -1.4748    
  20  norm          .10000E-03    44.186        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .10000E-03    59.630        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  norm          3.5543        .95276        .33421E-04   -1.5331    
  23  Prefactor     21.146        18.211        .87103E-04   -1.4788    
  24  Prefactor     8.6665        42.492        .13610E-03   -1.5119    
  25  norm          5.3199        2.3899        .71527E-04   -1.5247    
  26  Normalizat    .78596        .26523        .31946E-03   -1.0059    
  27  Prefactor     1.1320        .22515        .24715E-03   -.88450    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.0735e-09
Minuit parameter uncertainties:
  1  0.0172249
  2  30.858
  3  3.32254
  4  2.42783e-05
  5  32.8031
  6  89.3765
  7  2.43623e-05
  8  4.18639e-05
  9  29.9197
  10  0.00880806
  11  162.393
  12  41.0029
  13  29.7329
  14  0.000251393
  15  3.96468
  16  1.86101e-05
  17  3.81642e-06
  18  4.88345
  19  25.3802
  20  5.4697e-05
  21  3.38611e-06
  22  0.952764
  23  18.2155
  24  38.4237
  25  2.38992
  26  0.265668
  27  0.225341
Done.

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

Extracting fit parameters...

4FGL J1159.0+0939
   Spectrum: PowerLaw
301    Prefactor:  1.000e-04  2.436e-05  1.000e-04  1.000e+04 ( 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.132e+00  2.253e-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:  7.860e-01  2.657e-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: 5.81e-08 ph cm-2 s-1
Energy Flux Upper Limit: 4.40e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/203440/likelihoodResults_285206401_285465601_4FGL_J1159.0+0939_daily_bin177.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) = 5179.87502339
delta logL = -0.00125507240591

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 5179.87376823
delta logL = 9.14333213586e-08

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10060E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.1145       1.0000          .0000       10.000    
     3 'Normalizat'    .78594       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1320       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.

 MIGRAD MINIMIZATION HAS CONVERGED.

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

 FCN=   5179.874     FROM MIGRAD    STATUS=FAILED        89 CALLS      247 TOTAL
                     EDM=   .25E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10206E-03    68.417        .13703E-02** at limit **
   2  Index         2.0337        5.7942        .50000        .32692E-04
   3  Normalizat    .78596        .22944E-01    .31947E-03    .50176E-05
   4  Prefactor     1.1320        .21061E-01    .24715E-03    .18031E-04
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   5179.874     FROM SIMPLEX   STATUS=PROGRESS     124 CALLS      371 TOTAL
                     EDM=   .64E-05    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10191E-03    68.417        .27892E-03** at limit **
   2  Index         2.0331        5.7942        .20186E-03    .32692E-04
   3  Normalizat    .78594        .22944E-01    .65486E-05    .50176E-05
   4  Prefactor     1.1320        .21061E-01    .34976E-05    .18031E-04
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   5179.874     FROM MIGRAD    STATUS=CONVERGED     50 CALLS      421 TOTAL
                     EDM=   .16E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    78.793        .27407E-02** at limit **
   2  Index         1.6499        8.6539        .50000        .23942E-07
   3  Normalizat    .78596        .23076E-01    .12779E-04   -.72240E-04
   4  Prefactor     1.1320        .21183E-01    .98861E-05   -.86247E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 1.64991
  Normalizat = 0.785955
  Prefactor  = 1.132
 **********
 **   18 **HESSE 
 **********

 FCN=   5179.874     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      450 TOTAL
                     EDM=   .70E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    344.80        .54814E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         1.6499        5.3005        .50000       -.73423    
   3  Normalizat    .78596        .52423E-01    .25558E-05   -1.0059    
   4  Prefactor     1.1320        .48125E-01    .19772E-05   -.88450    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 7.00633e-10
Minuit parameter uncertainties:
  1  0.000300275
  2  1055.02
  3  0.0524267
  4  0.0481269
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/203440': No such file or directory
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 5179.87376589
delta logL = 2.42720307142e-06

Extracting fit parameters...

4FGL J1159.0+0939
   Spectrum: PowerLaw
301    Prefactor:  1.000e-04  3.003e-04  1.000e-04  1.000e+04 ( 1.000e-13)
302        Index:  1.650e+00  1.055e+03  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.132e+00  4.813e-02  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:  7.860e-01  5.243e-02  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  0.000e+00 [aplpy.core]
INFO: Auto-setting vmax to  0.000e+00 [aplpy.core]
Saving /scratch/kocevski/203440/cmap_HighResolution_285206401_285465601_4FGL_J1159.0+0939_daily_bin177.png

Cleaning up...

** Nuclear option initiated! **
rmdir /scratch/kocevski/203440

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='4.40e-03', job_status='DONE', photon_flux_upper_limit='5.81e-08', time_completed='2021-09-04 18:07:40.409679', job_id='203440', GAL2='1.13', fit_tolerance='1e-08', EG2='0.79', EG='0.79', time_epoch_completed='1630804060.41', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.13', dlogl='2.43e-06', ts2='-0.00', photon_index_error='0.00', photon_index='2.13' WHERE bin_id='177' AND source_name='4FGL J1159.0+0939' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep  4 18:07:40 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0204>
Subject: Job 203440: <4FGL_J1159.0+0939_daily_bin177> in cluster <slac> Done

Job <4FGL_J1159.0+0939_daily_bin177> was submitted from host <rhel6-64p> by user <kocevski> in cluster <slac> at Sat Sep  4 17:51:41 2021
Job was executed on host(s) <bullet0204>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Sep  4 17:51:42 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Sat Sep  4 17:51:42 2021
Terminated at Sat Sep  4 18:07:41 2021
Results reported at Sat Sep  4 18:07:41 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1159.0+0939_daily_bin177 179.751 9.6603 285206401 285465601 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1159.0+0939 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   730.00 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             293.69 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   958 sec.
    Turnaround time :                            960 sec.

The output (if any) is above this job summary.

