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


Performing analysis on: 4FGL_J1159.0+0939_daily_bin253
RA = 179.751, Dec = 9.6603
tmin = 304905601, tmax = 305164801
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='203557', job_status='RUN', time_executed='2021-09-04 17:52:09.723855', time_epoch_executed='1630803129.72' WHERE source_name='4FGL J1159.0+0939' and cadence='daily' and bin_id='253'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/203557

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/203557/ft1_4FGL_J1159.0+0939_daily_bin253.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/203557/ft2_4FGL_J1159.0+0939_daily_bin253.fits


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

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/203557/ft1_filtered_4FGL_J1159.0+0939_daily_bin253.fits" evtable="EVENTS" scfile=/scratch/kocevski/203557/ft2_4FGL_J1159.0+0939_daily_bin253.fits sctable="SC_DATA" outfile=/scratch/kocevski/203557/ltcube_304905601_305164801_4FGL_J1159.0+0939_daily_bin253.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/203557/ft2_4FGL_J1159.0+0939_daily_bin253.fits
.....................!
real 11.87
user 11.52
sys 0.32

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/203557/ft1_filtered_4FGL_J1159.0+0939_daily_bin253.fits evtable="EVENTS" scfile=/scratch/kocevski/203557/ft2_4FGL_J1159.0+0939_daily_bin253.fits sctable="SC_DATA" expcube=/scratch/kocevski/203557/ltcube_304905601_305164801_4FGL_J1159.0+0939_daily_bin253.fits outfile=/scratch/kocevski/203557/expmap_304905601_305164801_4FGL_J1159.0+0939_daily_bin253.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/203557/ltcube_304905601_305164801_4FGL_J1159.0+0939_daily_bin253.fits
.....................!
real 190.97
user 185.75
sys 4.78

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/203557/ft1_filtered_4FGL_J1159.0+0939_daily_bin253.fits scfile=/scratch/kocevski/203557/ft2_4FGL_J1159.0+0939_daily_bin253.fits outfile=/scratch/kocevski/203557/cmap_304905601_305164801_4FGL_J1159.0+0939_daily_bin253.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/203557/ft1_filtered_4FGL_J1159.0+0939_daily_bin253.fits scfile=/scratch/kocevski/203557/ft2_4FGL_J1159.0+0939_daily_bin253.fits outfile=/scratch/kocevski/203557/cmap_HighResolution_304905601_305164801_4FGL_J1159.0+0939_daily_bin253.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.55
user 0.38
sys 0.15

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10041E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .94380       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .11756E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10304E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    139.75       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10288E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .12617E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    6.1866       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    18 'norm      '    2.6331       1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10026E-03   1.0000         .10000E-03   10000.    
    20 'norm      '    .10019E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    22 'norm      '    4.1573       1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    16.771       1.0000         .10000E-03   10000.    
    25 'norm      '    3.8707       1.0000         .10000E-03   10000.    
    26 'Normalizat'    1.5352       1.0000         .10000E-01   10.000    
    27 'Prefactor '    .81045       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=   6075.568     FROM MIGRAD    STATUS=CONVERGED    684 CALLS     3326 TOTAL
                     EDM=   .32E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .2%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .10000E-03    6.8652        .14442E-06** at limit **
   2  Prefactor     .10000E-03    49.138        .34850E-04** at limit **
   3  Prefactor     .10000E-03    1.2875       -.11617E-08** at limit **
   4  Prefactor     .10000E-03    2.7857        .13138E-07** at limit **
   5  Prefactor     .94339        11.380       -.16429E-05   -.75194E-04
   6  Prefactor     .10001E-03    330.84       -.23698E-03** at limit **
   7  Prefactor     .10000E-03    3.4706       -.88651E-07** at limit **
   8  Prefactor     .10000E-03    3.3721       -.61218E-07** at limit **
   9  Prefactor     .10000E-03    13.356       -.28314E-05** at limit **
  10  Prefactor     .10000E-03    1.9449       -.90478E-08** at limit **
  11  Prefactor     139.75        91.075        .12436E-05    .35883E-04
  12  Prefactor     .10001E-03    164.41        .12155E-03** at limit **
  13  Prefactor     .10000E-03    5.7266        .30774E-07** at limit **
  14  Prefactor     .10002E-03    1.9999       -.22086E-06** at limit **
  15  Prefactor     6.1842        4.6016        .77339E-06   -.22507E-04
  16  Prefactor     .10000E-03    7.4134       -.70077E-07** at limit **
  17  Prefactor     .10000E-03    11.159        .70415E-06** at limit **
  18  norm          2.6327        3.5271       -.27622E-06   -.88410E-03
  19  Prefactor     .10000E-03    27.326       -.36716E-05** at limit **
  20  norm          .10000E-03    99.021        .16215E-04** at limit **
  21  Prefactor     .10000E-03    64.777       -.63370E-04** at limit **
  22  norm          4.1573        .90156        .66685E-08   -.11222E-02
  23  Prefactor     .10000E-03    15.031        .18226E-06** at limit **
  24  Prefactor     16.771        26.878       -.98569E-07   -.10682E-04
  25  norm          3.8707        1.9866        .13283E-07   -.15613E-03
  26  Normalizat    1.5352        .21147       -.31128E-06   -.15710E-03
  27  Prefactor     .81045        .18666       -.27551E-06   -.18129E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.943395
  Prefactor  = 0.000100005
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 139.752
  Prefactor  = 0.000100008
  Prefactor  = 0.0001
  Prefactor  = 0.000100022
  Prefactor  = 6.18424
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 2.63274
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 4.15733
  Prefactor  = 0.0001
  Prefactor  = 16.771
  norm       = 3.87073
  Normalizat = 1.5352
  Prefactor  = 0.810447
 **********
 **   18 **HESSE 
 **********

 FCN=   6075.568     FROM HESSE     STATUS=OK           478 CALLS     3804 TOTAL
                     EDM=   .31E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .10000E-03    6.9080        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    49.416        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .10000E-03    1.3060        .86345E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    2.7905        .12705E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .94339        45.735        .51147E-02   -1.5514    
   6  Prefactor     .10001E-03    332.18        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    3.4734        .14180E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    3.3865        .13978E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .10000E-03    13.422        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    3.5774        .21014E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     139.75        91.077        .34076E-04   -1.3338    
  12  Prefactor     .10001E-03    166.57        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .10000E-03    5.7287        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10002E-03    14.975        .18748E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     6.1842        4.1318        .12213E-03   -1.5211    
  16  Prefactor     .10000E-03    7.4146        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     .10000E-03    11.372        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  norm          2.6327        3.5082        .15662E-03   -1.5383    
  19  Prefactor     .10000E-03    27.469        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  norm          .10000E-03    99.450        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .10000E-03    64.840        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  norm          4.1573        .90081        .31934E-04   -1.5300    
  23  Prefactor     .10000E-03    15.232        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     16.771        26.839        .97801E-04   -1.4889    
  25  norm          3.8707        1.9838        .75777E-04   -1.5314    
  26  Normalizat    1.5352        .25222        .25074E-03   -.76794    
  27  Prefactor     .81045        .22252        .29935E-03   -.99344    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.14196e-08
Minuit parameter uncertainties:
  1  2.16129e-06
  2  0.000122068
  3  1.11303e-06
  4  8.4688e-08
  5  13.1472
  6  0.0026399
  7  1.56649e-06
  8  4.06801e-06
  9  9.91279e-06
  10  2.71991e-06
  11  91.169
  12  0.00226156
  13  7.24511e-08
  14  0.00114239
  15  4.13194
  16  3.86593e-07
  17  2.35558e-06
  18  3.50849
  19  2.35765e-05
  20  3.53617e-05
  21  1.31022e-05
  22  0.90081
  23  8.05974e-06
  24  26.8578
  25  1.9838
  26  0.252429
  27  0.222763
Done.

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

Extracting fit parameters...

4FGL J1159.0+0939
   Spectrum: PowerLaw
301    Prefactor:  1.000e-04  1.566e-06  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:  8.104e-01  2.228e-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.535e+00  2.524e-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.19e-08 ph cm-2 s-1
Energy Flux Upper Limit: 3.93e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/203557/likelihoodResults_304905601_305164801_4FGL_J1159.0+0939_daily_bin253.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) = 6075.5698251
delta logL = -0.00133496419858

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 6075.56849008
delta logL = 5.00322130392e-08

Fit tolerance = 1e-08

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

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

 FCN=   6075.568     FROM MIGRAD    STATUS=CONVERGED     86 CALLS      242 TOTAL
                     EDM=   .13E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10150E-03    36.295        .14506E-02** at limit **
   2  Index         2.0517        7.7122        .50000        .47657E-04
   3  Normalizat    1.5352        .16630E-01    .25074E-03    .74749E-04
   4  Prefactor     .81045        .15063E-01    .29935E-03    .78994E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000101501
  Index      = 2.05174
  Normalizat = 1.5352
  Prefactor  = 0.810447
 **********
 **   18 **HESSE 
 **********

 FCN=   6075.568     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      271 TOTAL
                     EDM=   .56E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10150E-03    150.38        .29012E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.0517        6.4250        .50000       -.63063    
   3  Normalizat    1.5352        .35125E-01    .50147E-04   -.76794    
   4  Prefactor     .81045        .31813E-01    .11974E-04   -.99344    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 5.58748e-08
Minuit parameter uncertainties:
  1  0.0301271
  2  352.759
  3  0.0351251
  4  0.0318137
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/203557': 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) = 6075.5684893
delta logL = 8.37697371026e-07

Extracting fit parameters...

4FGL J1159.0+0939
   Spectrum: PowerLaw
301    Prefactor:  1.015e-04  3.013e-02  1.000e-04  1.000e+04 ( 1.000e-13)
302        Index:  2.052e+00  3.528e+02  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:  8.104e-01  3.181e-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:  1.535e+00  3.513e-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/203557/cmap_HighResolution_304905601_305164801_4FGL_J1159.0+0939_daily_bin253.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='3.93e-03', job_status='DONE', photon_flux_upper_limit='5.19e-08', time_completed='2021-09-04 18:05:51.177027', job_id='203557', GAL2='0.81', fit_tolerance='1e-08', EG2='1.54', EG='1.54', time_epoch_completed='1630803951.18', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.81', dlogl='8.38e-07', ts2='-0.00', photon_index_error='0.00', photon_index='2.13' WHERE bin_id='253' AND source_name='4FGL J1159.0+0939' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep  4 18:05:51 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0230>
Subject: Job 203557: <4FGL_J1159.0+0939_daily_bin253> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1159.0+0939_daily_bin253 179.751 9.6603 304905601 305164801 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 :                                   818.37 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             331.07 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   840 sec.
    Turnaround time :                            842 sec.

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

