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


Performing analysis on: 4FGL_J1018.4+3540_daily_bin592
RA = 154.607, Dec = 35.6802
tmin = 392774401, tmax = 393033601
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='811391', job_status='RUN', time_executed='2021-09-01 17:51:57.639700', time_epoch_executed='1630543917.64' WHERE source_name='4FGL J1018.4+3540' and cadence='daily' and bin_id='592'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/811391

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/811391/ft1_4FGL_J1018.4+3540_daily_bin592.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/811391/ft2_4FGL_J1018.4+3540_daily_bin592.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/811391/ft1_4FGL_J1018.4+3540_daily_bin592.fits outfile=/scratch/kocevski/811391/ft1_filteredMKT_4FGL_J1018.4+3540_daily_bin592.fits ra=154.607 dec=35.6802 rad=12.0 tmin=392774401.0 tmax=393033601.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 5.17
user 4.88
sys 0.24

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/811391/ft2_4FGL_J1018.4+3540_daily_bin592.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/811391/ft2_4FGL_J1018.4+3540_daily_bin592.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/811391/ft1_filteredMKT_4FGL_J1018.4+3540_daily_bin592.fits evtable="EVENTS" outfile="/scratch/kocevski/811391/ft1_filtered_4FGL_J1018.4+3540_daily_bin592.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.50
user 0.34
sys 0.15

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/811391/ft1_filtered_4FGL_J1018.4+3540_daily_bin592.fits" evtable="EVENTS" scfile=/scratch/kocevski/811391/ft2_4FGL_J1018.4+3540_daily_bin592.fits sctable="SC_DATA" outfile=/scratch/kocevski/811391/ltcube_392774401_393033601_4FGL_J1018.4+3540_daily_bin592.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/811391/ft2_4FGL_J1018.4+3540_daily_bin592.fits
.....................!
real 14.06
user 13.63
sys 0.34

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/811391/ft1_filtered_4FGL_J1018.4+3540_daily_bin592.fits evtable="EVENTS" scfile=/scratch/kocevski/811391/ft2_4FGL_J1018.4+3540_daily_bin592.fits sctable="SC_DATA" expcube=/scratch/kocevski/811391/ltcube_392774401_393033601_4FGL_J1018.4+3540_daily_bin592.fits outfile=/scratch/kocevski/811391/expmap_392774401_393033601_4FGL_J1018.4+3540_daily_bin592.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/811391/ltcube_392774401_393033601_4FGL_J1018.4+3540_daily_bin592.fits
.....................!
real 192.34
user 187.03
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 195 point sources and 0 extended sources

Setting source of interest to:
4FGL J1018.4+3540 @ 154.607 35.6802

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/811391/ft1_filtered_4FGL_J1018.4+3540_daily_bin592.fits scfile=/scratch/kocevski/811391/ft2_4FGL_J1018.4+3540_daily_bin592.fits outfile=/scratch/kocevski/811391/cmap_392774401_393033601_4FGL_J1018.4+3540_daily_bin592.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=154.607 yref=35.6802 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

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/811391/ft1_filtered_4FGL_J1018.4+3540_daily_bin592.fits scfile=/scratch/kocevski/811391/ft2_4FGL_J1018.4+3540_daily_bin592.fits outfile=/scratch/kocevski/811391/cmap_HighResolution_392774401_393033601_4FGL_J1018.4+3540_daily_bin592.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=154.607 yref=35.6802 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.39
sys 0.15

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/811391/ft1_filtered_4FGL_J1018.4+3540_daily_bin592.fits evtable="EVENTS" scfile=/scratch/kocevski/811391/ft2_4FGL_J1018.4+3540_daily_bin592.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/811391/Model_4FGL_J1018.4+3540_daily_bin592.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/811391/ft1_filtered_4FGL_J1018.4+3540_daily_bin592.fits.....................!
real 51.11
user 49.66
sys 1.27

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/811391/ft1_filtered_4FGL_J1018.4+3540_daily_bin592.fits', '/scratch/kocevski/811391/ft2_4FGL_J1018.4+3540_daily_bin592.fits', expMap='/scratch/kocevski/811391/expmap_392774401_393033601_4FGL_J1018.4+3540_daily_bin592.fits', expCube='/scratch/kocevski/811391/ltcube_392774401_393033601_4FGL_J1018.4+3540_daily_bin592.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/811391/Model_4FGL_J1018.4+3540_daily_bin592.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1018.4+3540'

4FGL J1018.4+3540
   Spectrum: PowerLaw
303    Prefactor:  1.799e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-12)
304        Index:  2.590e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
305        Scale:  6.553e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/811391/ft1_filtered_4FGL_J1018.4+3540_daily_bin592.fits
Spacecraft file(s): /scratch/kocevski/811391/ft2_4FGL_J1018.4+3540_daily_bin592.fits
Exposure map: /scratch/kocevski/811391/expmap_392774401_393033601_4FGL_J1018.4+3540_daily_bin592.fits
Exposure cube: /scratch/kocevski/811391/ltcube_392774401_393033601_4FGL_J1018.4+3540_daily_bin592.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/811391/Model_4FGL_J1018.4+3540_daily_bin592.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) = 5779.56497054

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .64964E-03   1.0000         .10000E-03   10000.    
     2 'norm      '    .10040E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    21.057       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10043E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    47.689       1.0000         .10000E-03   10000.    
     6 'Prefactor '    1.3115       1.0000         .10000E-03   10000.    
     7 'Prefactor '    2.3322       1.0000         .10000E-03   10000.    
     8 'Prefactor '    4.1713       1.0000         .10000E-03   10000.    
     9 'norm      '    5.6291       1.0000         .10000E-03   10000.    
    10 'Prefactor '    4.1396       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    1.4829       1.0000         .10000E-03   10000.    
    14 'Prefactor '    34.431       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 '    4.4027       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    17.058       1.0000         .10000E-03   10000.    
    20 'Prefactor '    .23931E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    18.131       1.0000         .10000E-03   10000.    
    22 'norm      '    2.8912       1.0000         .10000E-03   10000.    
    23 'Prefactor '    4.4770       1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    25 'norm      '    7.4231       1.0000         .10000E-03   10000.    
    26 'Normalizat'    1.0848       1.0000         .10000E-01   10.000    
    27 'Prefactor '    .75394       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6140E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   5779.549     FROM MIGRAD    STATUS=CONVERGED    649 CALLS     3304 TOTAL
                     EDM=   .13E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.2%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .10000E-03    6.4120        .51587E-06** at limit **
   2  norm          .10000E-03    12.556        .19367E-06** at limit **
   3  Prefactor     21.108        36.266        .19918E-06   -.79676E-04
   4  Prefactor     .10000E-03    14.351       -.11044E-06** at limit **
   5  Prefactor     47.689        35.529        .24629E-06    .56929E-04
   6  Prefactor     1.3064        8.8882        .58506E-06   -.17478E-03
   7  Prefactor     2.3319        6.4355        .49398E-05   -.48448E-04
   8  Prefactor     4.1711        2.4372       -.96512E-07   -.47241E-03
   9  norm          5.6294        5.7303       -.49042E-07   -.10747E-03
  10  Prefactor     4.1396        2.9526       -.43231E-07    .58562E-04
  11  Prefactor     .10000E-03    11.968       -.25243E-06** at limit **
  12  Prefactor     .10000E-03    1.4285       -.11058E-06** at limit **
  13  norm          1.4825        4.0449        .33506E-06    .44372E-04
  14  Prefactor     34.444        47.057       -.13281E-06    .95366E-05
  15  Prefactor     .10000E-03    12.420       -.76154E-07** at limit **
  16  Prefactor     .10000E-03    .89512       -.53867E-07** at limit **
  17  Prefactor     4.4024        3.3983        .17161E-07   -.19905E-04
  18  Prefactor     .10000E-03    13.658        .14260E-06** at limit **
  19  Prefactor     17.057        18.248       -.18127E-06    .23933E-04
  20  Prefactor     .10000E-03    291.16       -.59623E-06** at limit **
  21  Prefactor     18.130        14.907       -.23561E-06    .36664E-04
  22  norm          2.8912        .45275        .80029E-08    .26742E-03
  23  Prefactor     4.4775        10.966        .25147E-06    .51792E-05
  24  Prefactor     .10000E-03    5.9828       -.61632E-07** at limit **
  25  norm          7.4229        8.2114        .92742E-08    .20330E-05
  26  Normalizat    1.0849        .17729       -.15738E-05   -.15528E-03
  27  Prefactor     .75392        .20626        .14176E-05    .88253E-05
                               ERR DEF=  .500    
Final values: 
  norm       = 0.0001
  norm       = 0.0001
  Prefactor  = 21.1085
  Prefactor  = 0.0001
  Prefactor  = 47.6895
  Prefactor  = 1.30637
  Prefactor  = 2.33192
  Prefactor  = 4.17111
  norm       = 5.62942
  Prefactor  = 4.13964
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 1.48253
  Prefactor  = 34.4444
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 4.40238
  Prefactor  = 0.0001
  Prefactor  = 17.0568
  Prefactor  = 0.000100004
  Prefactor  = 18.1296
  norm       = 2.89117
  Prefactor  = 4.4775
  Prefactor  = 0.0001
  norm       = 7.42293
  Normalizat = 1.08487
  Prefactor  = 0.753921
 **********
 **   18 **HESSE 
 **********

 FCN=   5779.549     FROM HESSE     STATUS=OK           492 CALLS     3796 TOTAL
                     EDM=   .30E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .10000E-03    19.171        .37126E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  norm          .10000E-03    12.623        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     21.108        36.162        .87285E-04   -1.4789    
   4  Prefactor     .10000E-03    14.379        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     47.689        35.577        .58065E-04   -1.4326    
   6  Prefactor     1.3064        8.8418        .38493E-03   -1.5479    
   7  Prefactor     2.3319        6.4646        .13426E-02   -1.5403    
   8  Prefactor     4.1711        2.4385        .86503E-04   -1.5299    
   9  norm          5.6294        5.7287        .16932E-03   -1.5233    
  10  Prefactor     4.1396        2.9044        .10428E-03   -1.5301    
  11  Prefactor     .10000E-03    12.020        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    2.1692        .17372E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          1.4825        3.9981        .24554E-03   -1.5464    
  14  Prefactor     34.444        47.110        .68293E-04   -1.4534    
  15  Prefactor     .10000E-03    12.432        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     .10000E-03    .89751        .70248E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     4.4024        3.3978        .11940E-03   -1.5288    
  18  Prefactor     .10000E-03    13.692        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     17.057        18.256        .96975E-04   -1.4882    
  20  Prefactor     .10000E-03    294.74        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     18.130        14.929        .94062E-04   -1.4856    
  22  norm          2.8912        .45402        .19099E-04   -1.5368    
  23  Prefactor     4.4775        10.964        .19030E-03   -1.5285    
  24  Prefactor     .10000E-03    5.9878        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  norm          7.4229        8.2059        .14721E-03   -1.5163    
  26  Normalizat    1.0849        .20778        .22063E-03   -.90239    
  27  Prefactor     .75392        .24219        .31475E-03   -1.0145    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.97039e-10
Minuit parameter uncertainties:
  1  6.75095e-05
  2  2.26048e-05
  3  36.1997
  4  3.19081e-05
  5  35.5927
  6  6.79844
  7  6.46653
  8  2.43853
  9  5.72925
  10  2.90454
  11  1.67479e-05
  12  9.57912e-06
  13  3.99885
  14  47.1606
  15  1.90485e-05
  16  3.08262e-06
  17  3.39798
  18  3.95823e-05
  19  18.2618
  20  0.00208378
  21  14.9317
  22  0.454019
  23  10.9688
  24  1.06162e-05
  25  8.20715
  26  0.207935
  27  0.242527
Done.

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

Extracting fit parameters...

4FGL J1018.4+3540
   Spectrum: PowerLaw
303    Prefactor:  1.000e-04  9.579e-06  1.000e-04  1.000e+04 ( 1.000e-12)
304        Index:  2.590e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
305        Scale:  6.553e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
611    Prefactor:  7.539e-01  2.425e-01  0.000e+00  1.000e+01 ( 1.000e+00)
612        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
613        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
610   Normalization:  1.085e+00  2.079e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 154.607 35.680
Photon Flux Upper Limit: 5.00e-08 ph cm-2 s-1
Energy Flux Upper Limit: 3.91e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/811391/likelihoodResults_392774401_393033601_4FGL_J1018.4+3540_daily_bin592.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) = 5779.55125394
delta logL = -0.0021910209598

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 5779.54906368
delta logL = -7.65480763221e-07

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10505E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.5673       1.0000          .0000       10.000    
     3 'Normalizat'    1.0849       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .75386       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6140E+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=   5779.549     FROM MIGRAD    STATUS=FAILED        96 CALLS      259 TOTAL
                     EDM=   .48E-06    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10283E-03    31.221        .17710E-02** at limit **
   2  Index         2.4570        6.7950        .50000        .60473E-04
   3  Normalizat    1.0849        .14970E-01    .22063E-03   -.83013E-04
   4  Prefactor     .75392        .18185E-01    .31475E-03    .90805E-04
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   5779.549     FROM SIMPLEX   STATUS=UNCHANGED    121 CALLS      380 TOTAL
                     EDM=   .86E-05    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10283E-03    31.221        .26296E-03** at limit **
   2  Index         2.4570        6.7950        .33452E-03    .60473E-04
   3  Normalizat    1.0849        .14970E-01    .29063E-05   -.83013E-04
   4  Prefactor     .75392        .18185E-01    .37234E-05    .90805E-04
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   5779.549     FROM MIGRAD    STATUS=CONVERGED     48 CALLS      428 TOTAL
                     EDM=   .10E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    24.554        .35419E-02** at limit **
   2  Index         2.2166        5.8156        .50000        .16812E-06
   3  Normalizat    1.0849        .12730E-01    .88251E-05   -.24579E-03
   4  Prefactor     .75392        .15463E-01    .12590E-04   -.10980E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 2.21656
  Normalizat = 1.08487
  Prefactor  = 0.75392
 **********
 **   18 **HESSE 
 **********

 FCN=   5779.549     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      457 TOTAL
                     EDM=   .48E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    115.68        .70839E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.2166        7.9209        .50000       -.59039    
   3  Normalizat    1.0849        .28730E-01    .17650E-05   -.90239    
   4  Prefactor     .75392        .34903E-01    .25180E-05   -1.0145    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 4.81477e-10
Minuit parameter uncertainties:
  1  1.73021e-05
  2  456.995
  3  0.0287302
  4  0.0349042
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/811391': 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) = 5779.54905895
delta logL = 3.96469204134e-06

Extracting fit parameters...

4FGL J1018.4+3540
   Spectrum: PowerLaw
303    Prefactor:  1.000e-04  1.730e-05  1.000e-04  1.000e+04 ( 1.000e-12)
304        Index:  2.217e+00  4.570e+02  0.000e+00  1.000e+01 (-1.000e+00)
305        Scale:  6.553e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
611    Prefactor:  7.539e-01  3.490e-02  0.000e+00  1.000e+01 ( 1.000e+00)
612        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
613        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
610   Normalization:  1.085e+00  2.873e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 154.607 35.680

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/811391/cmap_HighResolution_392774401_393033601_4FGL_J1018.4+3540_daily_bin592.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='3.91e-03', job_status='DONE', photon_flux_upper_limit='5.00e-08', time_completed='2021-09-01 18:05:29.521973', job_id='811391', GAL2='0.75', fit_tolerance='1e-08', EG2='1.08', EG='1.08', time_epoch_completed='1630544729.52', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.75', dlogl='3.96e-06', ts2='-0.00', photon_index_error='0.00', photon_index='2.59' WHERE bin_id='592' AND source_name='4FGL J1018.4+3540' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Wed Sep  1 18:05:29 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0297>
Subject: Job 811391: <4FGL_J1018.4+3540_daily_bin592> in cluster <slac> Done

Job <4FGL_J1018.4+3540_daily_bin592> was submitted from host <rhel6-64h> by user <kocevski> in cluster <slac> at Wed Sep  1 17:51:13 2021
Job was executed on host(s) <bullet0297>, in queue <medium>, as user <kocevski> in cluster <slac> at Wed Sep  1 17:51:43 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Wed Sep  1 17:51:43 2021
Terminated at Wed Sep  1 18:05:30 2021
Results reported at Wed Sep  1 18:05:30 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1018.4+3540_daily_bin592 154.607 35.6802 392774401 393033601 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1018.4+3540 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   810.05 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             341.22 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   826 sec.
    Turnaround time :                            857 sec.

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

