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


Performing analysis on: 4FGL_J1018.4+3540_daily_bin422
RA = 154.607, Dec = 35.6802
tmin = 348710401, tmax = 348969601
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='811149', job_status='RUN', time_executed='2021-09-01 17:51:26.609494', time_epoch_executed='1630543886.61' WHERE source_name='4FGL J1018.4+3540' and cadence='daily' and bin_id='422'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/811149

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/811149/ft1_4FGL_J1018.4+3540_daily_bin422.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/811149/ft2_4FGL_J1018.4+3540_daily_bin422.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/811149/ft1_4FGL_J1018.4+3540_daily_bin422.fits outfile=/scratch/kocevski/811149/ft1_filteredMKT_4FGL_J1018.4+3540_daily_bin422.fits ra=154.607 dec=35.6802 rad=12.0 tmin=348710401.0 tmax=348969601.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.47
user 3.20
sys 0.24

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/811149/ft2_4FGL_J1018.4+3540_daily_bin422.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/811149/ft1_filteredMKT_4FGL_J1018.4+3540_daily_bin422.fits evtable="EVENTS" outfile="/scratch/kocevski/811149/ft1_filtered_4FGL_J1018.4+3540_daily_bin422.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.53
user 0.36
sys 0.16

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/811149/ft1_filtered_4FGL_J1018.4+3540_daily_bin422.fits" evtable="EVENTS" scfile=/scratch/kocevski/811149/ft2_4FGL_J1018.4+3540_daily_bin422.fits sctable="SC_DATA" outfile=/scratch/kocevski/811149/ltcube_348710401_348969601_4FGL_J1018.4+3540_daily_bin422.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/811149/ft2_4FGL_J1018.4+3540_daily_bin422.fits
.....................!
real 15.89
user 15.35
sys 0.39

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/811149/ft1_filtered_4FGL_J1018.4+3540_daily_bin422.fits evtable="EVENTS" scfile=/scratch/kocevski/811149/ft2_4FGL_J1018.4+3540_daily_bin422.fits sctable="SC_DATA" expcube=/scratch/kocevski/811149/ltcube_348710401_348969601_4FGL_J1018.4+3540_daily_bin422.fits outfile=/scratch/kocevski/811149/expmap_348710401_348969601_4FGL_J1018.4+3540_daily_bin422.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/811149/ltcube_348710401_348969601_4FGL_J1018.4+3540_daily_bin422.fits
.....................!
real 192.16
user 186.61
sys 5.03

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/811149/ft1_filtered_4FGL_J1018.4+3540_daily_bin422.fits scfile=/scratch/kocevski/811149/ft2_4FGL_J1018.4+3540_daily_bin422.fits outfile=/scratch/kocevski/811149/cmap_348710401_348969601_4FGL_J1018.4+3540_daily_bin422.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.56
user 0.40
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/811149/ft1_filtered_4FGL_J1018.4+3540_daily_bin422.fits scfile=/scratch/kocevski/811149/ft2_4FGL_J1018.4+3540_daily_bin422.fits outfile=/scratch/kocevski/811149/cmap_HighResolution_348710401_348969601_4FGL_J1018.4+3540_daily_bin422.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.56
user 0.42
sys 0.13

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

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/811149/ft1_filtered_4FGL_J1018.4+3540_daily_bin422.fits', '/scratch/kocevski/811149/ft2_4FGL_J1018.4+3540_daily_bin422.fits', expMap='/scratch/kocevski/811149/expmap_348710401_348969601_4FGL_J1018.4+3540_daily_bin422.fits', expCube='/scratch/kocevski/811149/ltcube_348710401_348969601_4FGL_J1018.4+3540_daily_bin422.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/811149/Model_4FGL_J1018.4+3540_daily_bin422.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/811149/ft1_filtered_4FGL_J1018.4+3540_daily_bin422.fits
Spacecraft file(s): /scratch/kocevski/811149/ft2_4FGL_J1018.4+3540_daily_bin422.fits
Exposure map: /scratch/kocevski/811149/expmap_348710401_348969601_4FGL_J1018.4+3540_daily_bin422.fits
Exposure cube: /scratch/kocevski/811149/ltcube_348710401_348969601_4FGL_J1018.4+3540_daily_bin422.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/811149/Model_4FGL_J1018.4+3540_daily_bin422.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) = 6120.72814203

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    5.2202       1.0000         .10000E-03   10000.    
     2 'norm      '    .10220E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    54.327       1.0000         .10000E-03   10000.    
     4 'Prefactor '    26.066       1.0000         .10000E-03   10000.    
     5 'Prefactor '    9.2861       1.0000         .10000E-03   10000.    
     6 'Prefactor '    1.1885       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10017E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .31443       1.0000         .10000E-03   10000.    
     9 'norm      '    .72334E-01   1.0000         .10000E-03   10000.    
    10 'Prefactor '    8.1538       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10037E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .10022E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10049E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    54.782       1.0000         .10000E-03   10000.    
    16 'Prefactor '    14.416       1.0000         .10000E-03   10000.    
    17 'Prefactor '    .62772E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    8.8122       1.0000         .10000E-03   10000.    
    20 'Prefactor '    19.351       1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10006E-03   1.0000         .10000E-03   10000.    
    22 'norm      '    1.4784       1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10430E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10030E-03   1.0000         .10000E-03   10000.    
    25 'norm      '    9.0690       1.0000         .10000E-03   10000.    
    26 'Normalizat'    .91756       1.0000         .10000E-01   10.000    
    27 'Prefactor '    1.1060       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6140E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   6120.599     FROM MIGRAD    STATUS=CONVERGED    113 CALLS     2884 TOTAL
                     EDM=   .17E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  7.8%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          5.2180        2.0366        .23145E-05    .22204E-02
   2  norm          .10014E-03    9.5770        .25845E-04** at limit **
   3  Prefactor     54.328        3.1484       -.25588E-05    .10960E-02
   4  Prefactor     26.030        4.1879       -.12397E-05   -.84166E-03
   5  Prefactor     9.2902        3.7010        .76824E-05   -.14522E-02
   6  Prefactor     1.1936        1.3829        .11858E-05   -.10299E-03
   7  Prefactor     .10000E-03    5.8800        .69438E-05** at limit **
   8  Prefactor     .31363        1.7922       -.90265E-08   -.25567E-03
   9  norm          .74465E-02    499.89       -.15756E-03    .11642E-02
  10  Prefactor     8.1534        4.8401       -.69250E-06   -.21964E-03
  11  Prefactor     .10013E-03    9.6208       -.24436E-04** at limit **
  12  Prefactor     .10000E-03    3.1933       -.95165E-06** at limit **
  13  norm          .10000E-03    5.6049       -.49704E-05** at limit **
  14  Prefactor     .10002E-03    17.492        .46720E-05** at limit **
  15  Prefactor     54.840        6.6130       -.19112E-06    .20777E-02
  16  Prefactor     14.414        1.3387       -.82018E-06   -.35502E-02
  17  Prefactor     .10105E-03    6.4225       -.71697E-05** at limit **
  18  Prefactor     .10000E-03    24.805       -.55711E-05** at limit **
  19  Prefactor     8.8015        4.9200        .91767E-05    .13654E-02
  20  Prefactor     19.325        7.9114       -.11076E-04    .34523E-02
  21  Prefactor     .10000E-03    5.1020        .16461E-05** at limit **
  22  norm          1.4782        .33482       -.12563E-06   -.77764E-03
  23  Prefactor     .18903E-03    154.73        .37024E-04** at limit **
  24  Prefactor     .10000E-03    6.2822       -.31851E-05** at limit **
  25  norm          9.0620        16.363        .31571E-04    .65101E-02
  26  Normalizat    .91745        .20797       -.43930E-05   -.23189E-04
  27  Prefactor     1.1065        .24180        .16459E-05   -.68414E-05
                               ERR DEF=  .500    
Final values: 
  norm       = 5.21803
  norm       = 0.000100144
  Prefactor  = 54.3279
  Prefactor  = 26.0298
  Prefactor  = 9.2902
  Prefactor  = 1.19364
  Prefactor  = 0.000100003
  Prefactor  = 0.313627
  norm       = 0.00744645
  Prefactor  = 8.1534
  Prefactor  = 0.000100135
  Prefactor  = 0.0001
  norm       = 0.000100001
  Prefactor  = 0.000100025
  Prefactor  = 54.8398
  Prefactor  = 14.4139
  Prefactor  = 0.000101046
  Prefactor  = 0.000100001
  Prefactor  = 8.80147
  Prefactor  = 19.3251
  Prefactor  = 0.0001
  norm       = 1.47821
  Prefactor  = 0.000189027
  Prefactor  = 0.000100002
  norm       = 9.06199
  Normalizat = 0.91745
  Prefactor  = 1.10651
 **********
 **   18 **HESSE 
 **********

 FCN=   6120.599     FROM HESSE     STATUS=OK           562 CALLS     3446 TOTAL
                     EDM=   .30E-05    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          5.2180        10.668        .43984E-02   -1.5251    
   2  norm          .10014E-03    10.518        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     54.328        43.158        .13605E-02   -1.4232    
   4  Prefactor     26.030        38.912        .19616E-02   -1.4687    
   5  Prefactor     9.2902        80.359        .32879E-02   -1.5098    
   6  Prefactor     1.1936        12.350        .10453E-01   -1.5489    
   7  Prefactor     .10000E-03    5.8659        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .31363        1.8428        .10488E-01   -1.5596    
   9  norm          .74465E-02    4.6604        .93785E-01   -1.5691    
  10  Prefactor     8.1534        4.8967        .35101E-02   -1.5137    
  11  Prefactor     .10013E-03    10.641        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    3.1682        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .10000E-03    5.5922        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10002E-03    18.180        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     54.840        46.096        .13549E-02   -1.4226    
  16  Prefactor     14.414        6.0119        .26372E-02   -1.4948    
  17  Prefactor     .10105E-03    5.0300        .81658E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10000E-03    24.840        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     8.8015        23.022        .33756E-02   -1.5115    
  20  Prefactor     19.325        105.05        .22762E-02   -1.4828    
  21  Prefactor     .10000E-03    5.0925        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  norm          1.4782        .33931        .47139E-02   -1.5465    
  23  Prefactor     .18903E-03    17.758        .10132       -1.5710    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     .10000E-03    6.2857        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  norm          9.0620        22.386        .33272E-02   -1.5106    
  26  Normalizat    .91745        .18949        .45126E-01   -.95850    
  27  Prefactor     1.1065        .20477        .62649E-01   -.89259    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.96973e-06
Minuit parameter uncertainties:
  1  10.6715
  2  0.00246354
  3  43.1826
  4  38.9495
  5  54.7451
  6  7.68055
  7  0.000268314
  8  1.52028
  9  0.370097
  10  4.89698
  11  0.00239615
  12  5.87797e-05
  13  0.0001065
  14  0.00134067
  15  46.1258
  16  6.01213
  17  0.00458713
  18  0.000248233
  19  23.0447
  20  90.3599
  21  1.12304e-05
  22  0.339308
  23  0.0795454
  24  0.000202455
  25  22.4064
  26  0.189629
  27  0.204917
Done.

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

Extracting fit parameters...

4FGL J1018.4+3540
   Spectrum: PowerLaw
303    Prefactor:  1.000e-04  5.878e-05  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:  1.107e+00  2.049e-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:  9.174e-01  1.896e-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: 8.50e-08 ph cm-2 s-1
Energy Flux Upper Limit: 6.65e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/811149/likelihoodResults_348710401_348969601_4FGL_J1018.4+3540_daily_bin422.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) = 6120.60006149
delta logL = -0.00149413035797

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 6120.59856762
delta logL = -2.63285073743e-07

Fit tolerance = 1e-08

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

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

 FCN=   6120.599     FROM MIGRAD    STATUS=CONVERGED    108 CALLS      259 TOTAL
                     EDM=   .90E-11    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    .44680E-01    .41999E-01** at limit **
   2  Index         3.5730        8.2118        .50000        .58658E-06
   3  Normalizat    .91745        .97683E-03    .25570E-03   -.54981E-03
   4  Prefactor     1.1065        .11562E-02    .27709E-03   -.64535E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 3.57297
  Normalizat = 0.917448
  Prefactor  = 1.10651
 **********
 **   18 **HESSE 
 **********

 FCN=   6120.599     FROM HESSE     STATUS=NOT POSDEF    31 CALLS      290 TOTAL
                     EDM=   .25E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    43.248        .14187E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         3.5730        5.7352        .50000       -.28943    
   3  Normalizat    .91745        .14412E-01    .51141E-04   -.95850    
   4  Prefactor     1.1065        .17059E-01    .55418E-04   -.89259    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 2.50556e-09
Minuit parameter uncertainties:
  1  9.2268e-05
  2  311.798
  3  0.0144125
  4  0.0170587
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/811149': 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) = 6120.59856435
delta logL = 3.00855663227e-06

Extracting fit parameters...

4FGL J1018.4+3540
   Spectrum: PowerLaw
303    Prefactor:  1.000e-04  9.227e-05  1.000e-04  1.000e+04 ( 1.000e-12)
304        Index:  3.573e+00  3.118e+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:  1.107e+00  1.706e-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:  9.174e-01  1.441e-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/811149/cmap_HighResolution_348710401_348969601_4FGL_J1018.4+3540_daily_bin422.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='6.65e-03', job_status='DONE', photon_flux_upper_limit='8.50e-08', time_completed='2021-09-01 18:04:18.348525', job_id='811149', GAL2='1.11', fit_tolerance='1e-08', EG2='0.92', EG='0.92', time_epoch_completed='1630544658.35', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.11', dlogl='3.01e-06', ts2='-0.00', photon_index_error='0.00', photon_index='2.59' WHERE bin_id='422' AND source_name='4FGL J1018.4+3540' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Wed Sep  1 18:04:18 PDT 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0136>
Subject: Job 811149: <4FGL_J1018.4+3540_daily_bin422> in cluster <slac> Done

Job <4FGL_J1018.4+3540_daily_bin422> was submitted from host <rhel6-64h> by user <kocevski> in cluster <slac> at Wed Sep  1 17:50:53 2021
Job was executed on host(s) <bullet0136>, in queue <medium>, as user <kocevski> in cluster <slac> at Wed Sep  1 17:51:10 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:10 2021
Terminated at Wed Sep  1 18:04:19 2021
Results reported at Wed Sep  1 18:04:19 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1018.4+3540_daily_bin422 154.607 35.6802 348710401 348969601 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 :                                   769.17 sec.
    Max Memory :                                 1095 MB
    Average Memory :                             298.30 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   788 sec.
    Turnaround time :                            806 sec.

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

