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


Performing analysis on: 4FGL_J1159.0+0939_daily_bin601
RA = 179.751, Dec = 9.6603
tmin = 395107201, tmax = 395366401
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='205372', job_status='RUN', time_executed='2021-09-04 17:58:33.693285', time_epoch_executed='1630803513.69' WHERE source_name='4FGL J1159.0+0939' and cadence='daily' and bin_id='601'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/205372

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

Retrieving the FT1 file...

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

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

Retrieving 55 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/205372/ft1_4FGL_J1159.0+0939_daily_bin601.fits


Retrieving the FT1 file...

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

Retrieving 55 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/205372/ft2_4FGL_J1159.0+0939_daily_bin601.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/205372/ft1_4FGL_J1159.0+0939_daily_bin601.fits outfile=/scratch/kocevski/205372/ft1_filteredMKT_4FGL_J1159.0+0939_daily_bin601.fits ra=179.751 dec=9.6603 rad=12.0 tmin=395107201.0 tmax=395366401.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 8.04
user 7.73
sys 0.28

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/205372/ft2_4FGL_J1159.0+0939_daily_bin601.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/205372/ft1_filteredMKT_4FGL_J1159.0+0939_daily_bin601.fits evtable="EVENTS" outfile="/scratch/kocevski/205372/ft1_filtered_4FGL_J1159.0+0939_daily_bin601.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.51
user 0.35
sys 0.16

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/205372/ft1_filtered_4FGL_J1159.0+0939_daily_bin601.fits evtable="EVENTS" scfile=/scratch/kocevski/205372/ft2_4FGL_J1159.0+0939_daily_bin601.fits sctable="SC_DATA" expcube=/scratch/kocevski/205372/ltcube_395107201_395366401_4FGL_J1159.0+0939_daily_bin601.fits outfile=/scratch/kocevski/205372/expmap_395107201_395366401_4FGL_J1159.0+0939_daily_bin601.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/205372/ltcube_395107201_395366401_4FGL_J1159.0+0939_daily_bin601.fits
.....................!
real 191.35
user 185.67
sys 4.93

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/205372/ft1_filtered_4FGL_J1159.0+0939_daily_bin601.fits scfile=/scratch/kocevski/205372/ft2_4FGL_J1159.0+0939_daily_bin601.fits outfile=/scratch/kocevski/205372/cmap_395107201_395366401_4FGL_J1159.0+0939_daily_bin601.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.54
user 0.37
sys 0.15

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

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    10.837       1.0000         .10000E-03   10000.    
     2 'Prefactor '    7.8714       1.0000         .10000E-03   10000.    
     3 'Prefactor '    1.2688       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10044E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10112E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .23122E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    14.619       1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .91363       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .27679E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .24078E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    14.821       1.0000         .10000E-03   10000.    
    13 'Prefactor '    .27065E-02   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .33927       1.0000         .10000E-03   10000.    
    15 'Prefactor '    6.7558       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10597E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    4.8162       1.0000         .10000E-03   10000.    
    18 'norm      '    7.2425       1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10069E-03   1.0000         .10000E-03   10000.    
    20 'norm      '    .10025E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    .35666E-03   1.0000         .10000E-03   10000.    
    22 'norm      '    1.9546       1.0000         .10000E-03   10000.    
    23 'Prefactor '    16.111       1.0000         .10000E-03   10000.    
    24 'Prefactor '    31.279       1.0000         .10000E-03   10000.    
    25 'norm      '    3.8517       1.0000         .10000E-03   10000.    
    26 'Normalizat'    1.2051       1.0000         .10000E-01   10.000    
    27 'Prefactor '    .80094       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=   5488.726     FROM MIGRAD    STATUS=CONVERGED    662 CALLS     3378 TOTAL
                     EDM=   .10E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  4.9%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          10.826        10.430       -.40182E-06   -.91047E-05
   2  Prefactor     7.8399        61.010       -.25914E-05    .19527E-04
   3  Prefactor     1.2688        1.2428        .13373E-07   -.29997E-03
   4  Prefactor     .10000E-03    7.7492        .18860E-06** at limit **
   5  Prefactor     .10000E-03    6.3044       -.29383E-06** at limit **
   6  Prefactor     .10000E-03    94.944       -.83341E-05** at limit **
   7  Prefactor     14.610        14.836       -.13633E-05    .23890E-03
   8  Prefactor     .10000E-03    2.8224       -.15204E-05** at limit **
   9  Prefactor     .90237        10.143       -.16262E-05   -.45010E-04
  10  Prefactor     .10000E-03    3.5265       -.13365E-05** at limit **
  11  Prefactor     .10000E-03    38.226       -.59297E-06** at limit **
  12  Prefactor     14.849        39.128       -.37882E-05    .74870E-04
  13  Prefactor     .10001E-03    229.93       -.33187E-04** at limit **
  14  Prefactor     .33970        2.7219       -.10185E-05    .55967E-03
  15  Prefactor     6.7547        4.4906        .68318E-06    .11658E-02
  16  Prefactor     .10000E-03    22.749       -.39681E-05** at limit **
  17  Prefactor     4.8193        7.4383        .15009E-05    .73609E-05
  18  norm          7.2416        4.5786       -.59672E-06    .35157E-03
  19  Prefactor     .10000E-03    15.740       -.74391E-07** at limit **
  20  norm          .10000E-03    27.436        .22973E-05** at limit **
  21  Prefactor     .10000E-03    154.45        .92046E-07** at limit **
  22  norm          1.9546        .72223        .35134E-07    .15316E-03
  23  Prefactor     16.084        22.935       -.15424E-05    .15894E-03
  24  Prefactor     31.323        52.137       -.13992E-05    .35698E-04
  25  norm          3.8514        2.0085       -.12200E-06    .42217E-05
  26  Normalizat    1.2052        .22455        .78605E-05    .13955E-03
  27  Prefactor     .80096        .17542        .18711E-06    .58623E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 10.8259
  Prefactor  = 7.83987
  Prefactor  = 1.26878
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.000100001
  Prefactor  = 14.6096
  Prefactor  = 0.0001
  Prefactor  = 0.902374
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 14.8494
  Prefactor  = 0.000100015
  Prefactor  = 0.339701
  Prefactor  = 6.75472
  Prefactor  = 0.0001
  Prefactor  = 4.8193
  norm       = 7.24158
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 1.95463
  Prefactor  = 16.0841
  Prefactor  = 31.3232
  norm       = 3.85144
  Normalizat = 1.20523
  Prefactor  = 0.800958
 **********
 **   18 **HESSE 
 **********

 FCN=   5488.726     FROM HESSE     STATUS=OK           498 CALLS     3876 TOTAL
                     EDM=   .21E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          10.826        10.427        .12170E-03   -1.5050    
   2  Prefactor     7.8399        61.688        .14292E-03   -1.5148    
   3  Prefactor     1.2688        1.2674        .79605E-04   -1.5483    
   4  Prefactor     .10000E-03    7.7829        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    6.3067        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    94.867        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     14.610        14.741        .10475E-03   -1.4943    
   8  Prefactor     .10000E-03    2.8193        .12140E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .90237        50.428        .44397E-02   -1.5518    
  10  Prefactor     .10000E-03    7.4912        .26641E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    38.232        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     14.849        39.085        .10404E-03   -1.4937    
  13  Prefactor     .10001E-03    224.15        .67486E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .33970        12.100        .19713E-02   -1.5591    
  15  Prefactor     6.7547        4.6345        .10940E-03   -1.5188    
  16  Prefactor     .10000E-03    22.745        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     4.8193        7.3620        .18331E-03   -1.5269    
  18  norm          7.2416        4.5747        .11433E-03   -1.5170    
  19  Prefactor     .10000E-03    15.749        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  norm          .10000E-03    27.441        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .10000E-03    154.53        .21315E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  norm          1.9546        .71918        .35364E-04   -1.5428    
  23  Prefactor     16.084        22.907        .99783E-04   -1.4906    
  24  Prefactor     31.323        52.125        .71642E-04   -1.4588    
  25  norm          3.8514        2.0074        .72567E-04   -1.5315    
  26  Normalizat    1.2052        .25522        .25865E-03   -.86441    
  27  Prefactor     .80096        .20509        .27013E-03   -.99693    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.10238e-08
Minuit parameter uncertainties:
  1  10.4286
  2  44.0455
  3  1.26739
  4  8.01014e-05
  5  1.91895e-06
  6  0.000548107
  7  14.7443
  8  3.2683e-05
  9  13.5027
  10  3.77446e-06
  11  1.70397e-05
  12  39.1521
  13  0.00365941
  14  4.05517
  15  4.63472
  16  0.000177192
  17  7.36335
  18  4.57488
  19  2.89037e-05
  20  9.89839e-05
  21  0.000245055
  22  0.719187
  23  22.9192
  24  52.2004
  25  2.00745
  26  0.255481
  27  0.205291
Done.

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

Extracting fit parameters...

4FGL J1159.0+0939
   Spectrum: PowerLaw
301    Prefactor:  1.461e+01  1.474e+01  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.010e-01  2.053e-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.205e+00  2.555e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 1.38
Ra Dec: 179.751 9.660
Photon Index (Fixed Index): 2.13 +/- 0.00
Photon Flux (Fixed Index): 4.17e-08 +/- 4.21e-08
Energy Flux (Fixed Index): 2.14e-05 +/- 2.16e-05

TS (Fixed Index): 1.38
Ra Dec: 179.751 9.660
Photon Flux Upper Limit: 1.31e-07 ph cm-2 s-1
Energy Flux Upper Limit: 9.97e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/205372/likelihoodResults_395107201_395366401_4FGL_J1159.0+0939_daily_bin601.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): 0
logL (Free Index) = 5488.08113237
delta logL = 0.64515011055

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5488.05979243
delta logL = 0.666490047934

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    5.8294       1.0000         .10000E-03   10000.    
     2 'Index     '    3.0417       1.0000          .0000       10.000    
     3 'Normalizat'    1.1191       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .84796       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=   5488.060     FROM MIGRAD    STATUS=CONVERGED     80 CALLS      279 TOTAL
                     EDM=   .40E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     5.8306        17.980        .11195E-03    .24377E-02
   2  Index         3.0417        1.5318        .39905E-02    .66855E-03
   3  Normalizat    1.1192        .25922        .26696E-03    .70561E-03
   4  Prefactor     .84789        .21757        .26329E-03    .71970E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 5.83061
  Index      = 3.04166
  Normalizat = 1.11925
  Prefactor  = 0.847893
 **********
 **   18 **HESSE 
 **********

 FCN=   5488.060     FROM HESSE     STATUS=OK            23 CALLS      302 TOTAL
                     EDM=   .25E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     5.8306        10.155        .44779E-05   -1.5225    
   2  Index         3.0417        .87403        .15962E-03   -.40244    
   3  Normalizat    1.1192        .25018        .53391E-04   -.89136    
   4  Prefactor     .84789        .21059        .52658E-04   -.97986    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.49757e-09
Minuit parameter uncertainties:
  1  10.1579
  2  0.879379
  3  0.250449
  4  0.210793
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/205372': 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) = 5488.05979208
delta logL = 0.666490403279

Extracting fit parameters...

4FGL J1159.0+0939
   Spectrum: PowerLaw
301    Prefactor:  5.831e+00  1.016e+01  1.000e-04  1.000e+04 ( 1.000e-13)
302        Index:  3.042e+00  8.794e-01  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.479e-01  2.108e-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.119e+00  2.504e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 2.82
Ra Dec: 179.751 9.660
Photon Index (Free Index): 3.04 +/- 0.88
Photon Flux (Free Index): 1.09e-07 +/- 8.36e-08
Energy Flux (Free Index): 2.13e-05 +/- 1.46e-05

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/205372/cmap_HighResolution_395107201_395366401_4FGL_J1159.0+0939_daily_bin601.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='9.97e-03', comment='SUCCESS', photon_flux='4.17e-08', energy_flux2='2.13e-05', photon_flux_error='4.21e-08', dlogl='6.66e-01', energy_flux='2.14e-05', photon_flux2='1.09e-07', job_status='DONE', time_completed='2021-09-04 18:11:27.333645', photon_index_error2='0.88', photon_index2='3.04', ts='1.38', fit_tolerance='1e-08', GAL='0.80', photon_index_error='0.00', photon_flux_upper_limit='1.31e-07', energy_flux_error2='1.46e-05', EG='1.21', time_epoch_completed='1630804287.33', return_code='0', job_id='205372', GAL2='0.85', EG2='1.12', return_code2='0', energy_flux_error='2.16e-05', photon_flux_error2='8.36e-08', ts2='2.82', photon_index='2.13' WHERE bin_id='601' AND source_name='4FGL J1159.0+0939' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep  4 18:11:27 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0244>
Subject: Job 205372: <4FGL_J1159.0+0939_daily_bin601> in cluster <slac> Done

Job <4FGL_J1159.0+0939_daily_bin601> was submitted from host <rhel6-64f> by user <kocevski> in cluster <slac> at Sat Sep  4 17:56:25 2021
Job was executed on host(s) <bullet0244>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Sep  4 17:56:27 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:56:27 2021
Terminated at Sat Sep  4 18:11:28 2021
Results reported at Sat Sep  4 18:11:28 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1159.0+0939_daily_bin601 179.751 9.6603 395107201 395366401 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 :                                   771.31 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             310.11 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   900 sec.
    Turnaround time :                            903 sec.

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

