/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 31 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 = 7496
number of fields = 22
No RA_SUN column yet. Adding RA_SUN/DEC_SUN columns.
Done.


Performing analysis on: 4FGL_J1159.0+0939_daily_bin20
RA = 179.751, Dec = 9.6603
tmin = 244512001, tmax = 244771201
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='203191', job_status='RUN', time_executed='2021-09-04 17:52:03.244286', time_epoch_executed='1630803123.24' WHERE source_name='4FGL J1159.0+0939' and cadence='daily' and bin_id='20'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/203191

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/203191/ft1_4FGL_J1159.0+0939_daily_bin20.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/203191/ft2_4FGL_J1159.0+0939_daily_bin20.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/203191/ft1_4FGL_J1159.0+0939_daily_bin20.fits outfile=/scratch/kocevski/203191/ft1_filteredMKT_4FGL_J1159.0+0939_daily_bin20.fits ra=179.751 dec=9.6603 rad=12.0 tmin=244512001.0 tmax=244771201.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 1.47
user 1.27
sys 0.18

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/203191/ft2_4FGL_J1159.0+0939_daily_bin20.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/203191/ft1_filteredMKT_4FGL_J1159.0+0939_daily_bin20.fits evtable="EVENTS" outfile="/scratch/kocevski/203191/ft1_filtered_4FGL_J1159.0+0939_daily_bin20.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.32
sys 0.15

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/203191/ft1_filtered_4FGL_J1159.0+0939_daily_bin20.fits" evtable="EVENTS" scfile=/scratch/kocevski/203191/ft2_4FGL_J1159.0+0939_daily_bin20.fits sctable="SC_DATA" outfile=/scratch/kocevski/203191/ltcube_244512001_244771201_4FGL_J1159.0+0939_daily_bin20.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/203191/ft2_4FGL_J1159.0+0939_daily_bin20.fits
.....................!
real 13.04
user 12.66
sys 0.34

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/203191/ft1_filtered_4FGL_J1159.0+0939_daily_bin20.fits evtable="EVENTS" scfile=/scratch/kocevski/203191/ft2_4FGL_J1159.0+0939_daily_bin20.fits sctable="SC_DATA" expcube=/scratch/kocevski/203191/ltcube_244512001_244771201_4FGL_J1159.0+0939_daily_bin20.fits outfile=/scratch/kocevski/203191/expmap_244512001_244771201_4FGL_J1159.0+0939_daily_bin20.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/203191/ltcube_244512001_244771201_4FGL_J1159.0+0939_daily_bin20.fits
.....................!
real 191.23
user 186.84
sys 4.07

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/203191/ft1_filtered_4FGL_J1159.0+0939_daily_bin20.fits scfile=/scratch/kocevski/203191/ft2_4FGL_J1159.0+0939_daily_bin20.fits outfile=/scratch/kocevski/203191/cmap_244512001_244771201_4FGL_J1159.0+0939_daily_bin20.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.37
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/203191/ft1_filtered_4FGL_J1159.0+0939_daily_bin20.fits scfile=/scratch/kocevski/203191/ft2_4FGL_J1159.0+0939_daily_bin20.fits outfile=/scratch/kocevski/203191/cmap_HighResolution_244512001_244771201_4FGL_J1159.0+0939_daily_bin20.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.37
sys 0.16

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

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/203191/ft1_filtered_4FGL_J1159.0+0939_daily_bin20.fits', '/scratch/kocevski/203191/ft2_4FGL_J1159.0+0939_daily_bin20.fits', expMap='/scratch/kocevski/203191/expmap_244512001_244771201_4FGL_J1159.0+0939_daily_bin20.fits', expCube='/scratch/kocevski/203191/ltcube_244512001_244771201_4FGL_J1159.0+0939_daily_bin20.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/203191/Model_4FGL_J1159.0+0939_daily_bin20.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/203191/ft1_filtered_4FGL_J1159.0+0939_daily_bin20.fits
Spacecraft file(s): /scratch/kocevski/203191/ft2_4FGL_J1159.0+0939_daily_bin20.fits
Exposure map: /scratch/kocevski/203191/expmap_244512001_244771201_4FGL_J1159.0+0939_daily_bin20.fits
Exposure cube: /scratch/kocevski/203191/ltcube_244512001_244771201_4FGL_J1159.0+0939_daily_bin20.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/203191/Model_4FGL_J1159.0+0939_daily_bin20.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) = 6122.26562344

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    1.0333       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10079E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    3.0656       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    18.507       1.0000         .10000E-03   10000.    
     6 'Prefactor '    2.2075       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10128E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    21.114       1.0000         .10000E-03   10000.    
    10 'Prefactor '    1.4350       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10009E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    95.120       1.0000         .10000E-03   10000.    
    13 'Prefactor '    46.835       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    .69068E-02   1.0000         .10000E-03   10000.    
    18 'norm      '    1.1850       1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10069E-03   1.0000         .10000E-03   10000.    
    20 'norm      '    .10307E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    183.87       1.0000         .10000E-03   10000.    
    22 'norm      '    8.8093       1.0000         .10000E-03   10000.    
    23 'Prefactor '    .56978       1.0000         .10000E-03   10000.    
    24 'Prefactor '    .16873E-03   1.0000         .10000E-03   10000.    
    25 'norm      '    .10219E-03   1.0000         .10000E-03   10000.    
    26 'Normalizat'    .63749       1.0000         .10000E-01   10.000    
    27 'Prefactor '    1.3892       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=   6122.248     FROM MIGRAD    STATUS=CONVERGED    688 CALLS     3869 TOTAL
                     EDM=   .30E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.1%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          1.0302        8.5519        .58025E-06    .21925E-04
   2  Prefactor     .10000E-03    15.132        .24594E-06** at limit **
   3  Prefactor     3.0653        2.3468        .12521E-06    .46954E-05
   4  Prefactor     .10000E-03    1.9393        .40864E-07** at limit **
   5  Prefactor     18.507        16.894        .13016E-06   -.32222E-05
   6  Prefactor     2.0452        1359.1       -.26661E-04    .26210E-05
   7  Prefactor     .10000E-03    8.0275       -.91317E-06** at limit **
   8  Prefactor     .10000E-03    2.4408        .33944E-07** at limit **
   9  Prefactor     21.112        17.213        .12432E-06   -.42113E-05
  10  Prefactor     1.4345        3.3521        .95176E-06   -.42130E-04
  11  Prefactor     .10000E-03    26.809        .12471E-06** at limit **
  12  Prefactor     95.123        47.856       -.83545E-06    .20988E-04
  13  Prefactor     46.825        30.642       -.61843E-07   -.60573E-04
  14  Prefactor     .10000E-03    1.0504        .15413E-06** at limit **
  15  Prefactor     .10000E-03    1.3368        .32813E-06** at limit **
  16  Prefactor     .10000E-03    23.465       -.28459E-06** at limit **
  17  Prefactor     .10000E-03    12.499        .81363E-06** at limit **
  18  norm          1.1827        4.2258        .14950E-05    .43369E-04
  19  Prefactor     .10000E-03    12.756       -.37646E-07** at limit **
  20  norm          .10000E-03    34.171       -.22236E-06** at limit **
  21  Prefactor     183.80        161.95       -.68183E-06   -.32367E-04
  22  norm          8.8107        1.1969       -.73872E-07   -.12652E-02
  23  Prefactor     .54229        8.3857       -.81000E-06    .35256E-03
  24  Prefactor     .10000E-03    83.070        .13304E-05** at limit **
  25  norm          .10000E-03    .94043        .23890E-06** at limit **
  26  Normalizat    .63780        .20822       -.24665E-05   -.67358E-04
  27  Prefactor     1.3891        .18672       -.82362E-06   -.11329E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 1.03023
  Prefactor  = 0.0001
  Prefactor  = 3.06528
  Prefactor  = 0.0001
  Prefactor  = 18.507
  Prefactor  = 2.04525
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 21.1117
  Prefactor  = 1.43445
  Prefactor  = 0.0001
  Prefactor  = 95.1231
  Prefactor  = 46.8246
  Prefactor  = 0.0001
  Prefactor  = 0.000100001
  Prefactor  = 0.0001
  Prefactor  = 0.000100004
  norm       = 1.18273
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 183.797
  norm       = 8.81072
  Prefactor  = 0.542288
  Prefactor  = 0.000100001
  norm       = 0.0001
  Normalizat = 0.6378
  Prefactor  = 1.38909
 **********
 **   18 **HESSE 
 **********

 FCN=   6122.248     FROM HESSE     STATUS=OK           498 CALLS     4367 TOTAL
                     EDM=   .31E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          1.0302        24.429        .43407E-02   -1.5505    
   2  Prefactor     .10000E-03    15.159        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     3.0653        2.3458        .10137E-03   -1.5358    
   4  Prefactor     .10000E-03    1.9397        .10642E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     18.507        16.896        .93102E-04   -1.4847    
   6  Prefactor     2.0452        1423.0        .27687E-02   -1.5422    
   7  Prefactor     .10000E-03    8.0213        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    2.4443        .11939E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     21.112        17.236        .87169E-04   -1.4789    
  10  Prefactor     1.4345        3.3321        .21104E-03   -1.5468    
  11  Prefactor     .10000E-03    26.857        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     95.123        47.757        .41210E-04   -1.3754    
  13  Prefactor     46.825        30.645        .58590E-04   -1.4338    
  14  Prefactor     .10000E-03    1.0617        .78250E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .10000E-03    9.8584        .17346E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     .10000E-03    23.536        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     .10000E-03    17.352        .75755E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  norm          1.1827        4.1975        .26781E-03   -1.5490    
  19  Prefactor     .10000E-03    12.767        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  norm          .10000E-03    34.202        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     183.80        161.76        .14887E-03   -1.2988    
  22  norm          8.8107        1.1848        .27950E-04   -1.5114    
  23  Prefactor     .54229        37.369        .42745E-02   -1.5561    
  24  Prefactor     .10000E-03    84.746        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  norm          .10000E-03    1.4012        .14690E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  Normalizat    .63780        .23699        .35322E-03   -1.0640    
  27  Prefactor     1.3891        .21661        .23604E-03   -.80695    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.08855e-09
Minuit parameter uncertainties:
  1  10.0375
  2  1.98423e-05
  3  2.34588
  4  5.0022e-07
  5  16.9005
  6  110.643
  7  5.867e-05
  8  4.98854e-06
  9  17.2399
  10  3.33256
  11  0.000114248
  12  47.7764
  13  30.6554
  14  6.28403e-07
  15  0.000232178
  16  2.17522e-05
  17  0.00053199
  18  4.19858
  19  9.23025e-06
  20  0.000103382
  21  162.156
  22  1.18476
  23  9.00834
  24  0.000623987
  25  7.04071e-06
  26  0.237366
  27  0.216751
Done.

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

Extracting fit parameters...

4FGL J1159.0+0939
   Spectrum: PowerLaw
301    Prefactor:  1.000e-04  5.867e-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.389e+00  2.168e-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:  6.378e-01  2.374e-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: 6.88e-08 ph cm-2 s-1
Energy Flux Upper Limit: 5.22e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/203191/likelihoodResults_244512001_244771201_4FGL_J1159.0+0939_daily_bin20.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) = 6122.24865132
delta logL = -0.000593514711909

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 6122.24805903
delta logL = -1.22539768199e-06

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .11580E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.1527       1.0000          .0000       10.000    
     3 'Normalizat'    .63762       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.3893       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=   6122.248     FROM MIGRAD    STATUS=FAILED        89 CALLS      246 TOTAL
                     EDM=   .28E-06    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    1197.1        .18142E-02** at limit **
   2  Index         2.1733        5.6343        .50000       -.21555E-04
   3  Normalizat    .63780        .79038E-01    .35321E-03    .69491E-04
   4  Prefactor     1.3891        .75536E-01    .23604E-03    .82910E-04
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   6122.248     FROM SIMPLEX   STATUS=UNCHANGED    177 CALLS      423 TOTAL
                     EDM=   .80E-05    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    1197.1        .43450E-03** at limit **
   2  Index         2.1733        5.6343        .22234E-05   -.21555E-04
   3  Normalizat    .63780        .79038E-01    .11322E-06    .69491E-04
   4  Prefactor     1.3891        .75536E-01    .52685E-07    .82910E-04
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   6122.248     FROM MIGRAD    STATUS=CONVERGED     34 CALLS      457 TOTAL
                     EDM=   .62E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    11.204        .36285E-03** at limit **
   2  Index         2.1735        6.0401        .50000       -.21559E-04
   3  Normalizat    .63780        .22295        .14128E-04    .66305E-04
   4  Prefactor     1.3891        .21333        .47208E-04    .78411E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100004
  Index      = 2.17347
  Normalizat = 0.6378
  Prefactor  = 1.38909
 **********
 **   18 **HESSE 
 **********

 FCN=   6122.248     FROM HESSE     STATUS=OK            29 CALLS      486 TOTAL
                     EDM=   .85E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    8.3692        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.1735        6.0852        .50000       -.60080    
   3  Normalizat    .63780        .22296        .28257E-05   -1.0640    
   4  Prefactor     1.3891        .21334        .94416E-05   -.80695    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 8.45787e-10
Minuit parameter uncertainties:
  1  0.00035814
  2  4.14751
  3  0.223278
  4  0.213473
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/203191': 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): 0
logL (Free Index) = 6122.24805759
delta logL = 2.10054167837e-07

Extracting fit parameters...

4FGL J1159.0+0939
   Spectrum: PowerLaw
301    Prefactor:  1.000e-04  3.581e-04  1.000e-04  1.000e+04 ( 1.000e-13)
302        Index:  2.173e+00  4.148e+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.389e+00  2.135e-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:  6.378e-01  2.233e-01  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/203191/cmap_HighResolution_244512001_244771201_4FGL_J1159.0+0939_daily_bin20.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='5.22e-03', job_status='DONE', photon_flux_upper_limit='6.88e-08', time_completed='2021-09-04 18:06:30.520768', job_id='203191', GAL2='1.39', fit_tolerance='1e-08', EG2='0.64', EG='0.64', time_epoch_completed='1630803990.52', return_code2='0', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.39', dlogl='2.10e-07', ts2='-0.00', photon_index_error='0.00', photon_index='2.13' WHERE bin_id='20' AND source_name='4FGL J1159.0+0939' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep  4 18:06:30 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0290>
Subject: Job 203191: <4FGL_J1159.0+0939_daily_bin20> in cluster <slac> Done

Job <4FGL_J1159.0+0939_daily_bin20> was submitted from host <rhel6-64p> by user <kocevski> in cluster <slac> at Sat Sep  4 17:51:21 2021
Job was executed on host(s) <bullet0290>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Sep  4 17:51:23 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:23 2021
Terminated at Sat Sep  4 18:06:31 2021
Results reported at Sat Sep  4 18:06:31 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1159.0+0939_daily_bin20 179.751 9.6603 244512001 244771201 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 :                                   866.21 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             292.57 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   907 sec.
    Turnaround time :                            910 sec.

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

