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


Performing analysis on: 4FGL_J1023.7+0038_daily_bin953
RA = 155.945, Dec = 0.6499
tmin = 486345601, tmax = 486604801
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='847082', job_status='RUN', time_executed='2021-09-01 20:00:25.713863', time_epoch_executed='1630551625.71' WHERE source_name='4FGL J1023.7+0038' and cadence='daily' and bin_id='953'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/847082

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

Retrieving the FT1 file...

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

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

Retrieving 48 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/847082/ft1_4FGL_J1023.7+0038_daily_bin953.fits


Retrieving the FT1 file...

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

Retrieving 48 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/847082/ft2_4FGL_J1023.7+0038_daily_bin953.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/847082/ft1_4FGL_J1023.7+0038_daily_bin953.fits outfile=/scratch/kocevski/847082/ft1_filteredMKT_4FGL_J1023.7+0038_daily_bin953.fits ra=155.945 dec=0.6499 rad=12.0 tmin=486345601.0 tmax=486604801.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.58
user 3.36
sys 0.19

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/847082/ft2_4FGL_J1023.7+0038_daily_bin953.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/847082/ft2_4FGL_J1023.7+0038_daily_bin953.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/847082/ft1_filteredMKT_4FGL_J1023.7+0038_daily_bin953.fits evtable="EVENTS" outfile="/scratch/kocevski/847082/ft1_filtered_4FGL_J1023.7+0038_daily_bin953.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.49
user 0.34
sys 0.14

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/847082/ft1_filtered_4FGL_J1023.7+0038_daily_bin953.fits" evtable="EVENTS" scfile=/scratch/kocevski/847082/ft2_4FGL_J1023.7+0038_daily_bin953.fits sctable="SC_DATA" outfile=/scratch/kocevski/847082/ltcube_486345601_486604801_4FGL_J1023.7+0038_daily_bin953.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/847082/ft2_4FGL_J1023.7+0038_daily_bin953.fits
.....................!
real 13.52
user 13.16
sys 0.30

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/847082/ft1_filtered_4FGL_J1023.7+0038_daily_bin953.fits evtable="EVENTS" scfile=/scratch/kocevski/847082/ft2_4FGL_J1023.7+0038_daily_bin953.fits sctable="SC_DATA" expcube=/scratch/kocevski/847082/ltcube_486345601_486604801_4FGL_J1023.7+0038_daily_bin953.fits outfile=/scratch/kocevski/847082/expmap_486345601_486604801_4FGL_J1023.7+0038_daily_bin953.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/847082/ltcube_486345601_486604801_4FGL_J1023.7+0038_daily_bin953.fits
.....................!
real 189.92
user 185.29
sys 3.86

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 156 point sources and 0 extended sources

Setting source of interest to:
4FGL J1023.7+0038 @ 155.945 0.6499

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/847082/ft1_filtered_4FGL_J1023.7+0038_daily_bin953.fits scfile=/scratch/kocevski/847082/ft2_4FGL_J1023.7+0038_daily_bin953.fits outfile=/scratch/kocevski/847082/cmap_486345601_486604801_4FGL_J1023.7+0038_daily_bin953.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=155.945 yref=0.6499 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.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/847082/ft1_filtered_4FGL_J1023.7+0038_daily_bin953.fits scfile=/scratch/kocevski/847082/ft2_4FGL_J1023.7+0038_daily_bin953.fits outfile=/scratch/kocevski/847082/cmap_HighResolution_486345601_486604801_4FGL_J1023.7+0038_daily_bin953.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=155.945 yref=0.6499 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

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/847082/ft1_filtered_4FGL_J1023.7+0038_daily_bin953.fits evtable="EVENTS" scfile=/scratch/kocevski/847082/ft2_4FGL_J1023.7+0038_daily_bin953.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/847082/Model_4FGL_J1023.7+0038_daily_bin953.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/847082/ft1_filtered_4FGL_J1023.7+0038_daily_bin953.fits.....................!
real 71.32
user 69.97
sys 1.13

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/847082/ft1_filtered_4FGL_J1023.7+0038_daily_bin953.fits', '/scratch/kocevski/847082/ft2_4FGL_J1023.7+0038_daily_bin953.fits', expMap='/scratch/kocevski/847082/expmap_486345601_486604801_4FGL_J1023.7+0038_daily_bin953.fits', expCube='/scratch/kocevski/847082/ltcube_486345601_486604801_4FGL_J1023.7+0038_daily_bin953.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/847082/Model_4FGL_J1023.7+0038_daily_bin953.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1023.7+0038'

4FGL J1023.7+0038
   Spectrum: LogParabola
214         norm:  2.061e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-11)
215        alpha:  2.233e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
216         beta:  1.811e-01  0.000e+00  0.000e+00  1.000e+01 ( 1.000e+00) fixed
217           Eb:  5.178e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/847082/ft1_filtered_4FGL_J1023.7+0038_daily_bin953.fits
Spacecraft file(s): /scratch/kocevski/847082/ft2_4FGL_J1023.7+0038_daily_bin953.fits
Exposure map: /scratch/kocevski/847082/expmap_486345601_486604801_4FGL_J1023.7+0038_daily_bin953.fits
Exposure cube: /scratch/kocevski/847082/ltcube_486345601_486604801_4FGL_J1023.7+0038_daily_bin953.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/847082/Model_4FGL_J1023.7+0038_daily_bin953.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) = 7589.01411657

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    1.3290       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .16197       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10636E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .49206E-02   1.0000         .10000E-03   10000.    
     5 'norm      '    .10151E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10008E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .14742E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .11481E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10254E-03   1.0000         .10000E-03   10000.    
    10 'norm      '    2.7693       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10066E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10097E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    .77300E-03   1.0000         .10000E-03   10000.    
    14 'norm      '    1.2593       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10755E-03   1.0000         .10000E-03   10000.    
    16 'Normalizat'    1.1602       1.0000         .10000E-01   10.000    
    17 'Prefactor '    1.1302       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .4990E+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=   7588.937     FROM MIGRAD    STATUS=FAILED       594 CALLS     1671 TOTAL
                     EDM=   .41E-07    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          1.3289        .67369        .48848E-04   -.18572E-03
   2  Prefactor     .16834        52.615        .36028E-02    .13784E-02
   3  Prefactor     .10000E-03    17.719        .18142E-02** at limit **
   4  Prefactor     .10008E-03    21.631        .11676    ** at limit **
   5  norm          .10000E-03    4.8360        .18142E-02** at limit **
   6  Prefactor     .10000E-03    2.6486        .13834E-02** at limit **
   7  Prefactor     .10000E-03    25.161        .18142E-02** at limit **
   8  Prefactor     .10000E-03    17.559        .18142E-02** at limit **
   9  Prefactor     .10000E-03    6.2917        .18142E-02** at limit **
  10  norm          2.7685        1.6356        .81391E-04   -.49167E-03
  11  Prefactor     .10000E-03    2.9898        .14653E-02** at limit **
  12  Prefactor     .10000E-03    2.2375        .24917E-03** at limit **
  13  Prefactor     .10000E-03    15.796        .32569E-02** at limit **
  14  norm          1.2600        .55382        .41593E-04    .21238E-03
  15  Prefactor     .10000E-03    12.554        .36285E-03** at limit **
  16  Normalizat    1.1600        .21586        .27556E-03   -.21086E-03
  17  Prefactor     1.1303        .17259        .22681E-03    .70173E-05
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   7588.937     FROM SIMPLEX   STATUS=UNCHANGED    724 CALLS     2395 TOTAL
                     EDM=   .19E-04    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          1.3289        .67369        .61286E-06   -1.5477    
   2  Prefactor     .16834        52.615        .13451E-03   -1.5626    
   3  Prefactor     .10000E-03    17.719        .41746E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10008E-03    21.631        .50150E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          .10000E-03    4.8360        .24360E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    2.6486        .21735E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    25.161        .36848E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    17.559        .22638E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .10000E-03    6.2917        .25641E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          2.7685        1.6356        .32985E-07   -1.5375    
  11  Prefactor     .10000E-03    2.9898        .18118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    2.2375        .92574E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .10000E-03    15.796        .16643E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          1.2600        .55382        .32841E-07   -1.5483    
  15  Prefactor     .10000E-03    12.554        .37750E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Normalizat    1.1600        .21586        .19601E-07   -.87847    
  17  Prefactor     1.1303        .17259        .18932E-07   -.88504    
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   7588.937     FROM MIGRAD    STATUS=CONVERGED    220 CALLS     2615 TOTAL
                     EDM=   .85E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          1.3289        .67366        .19539E-05    .30255E-04
   2  Prefactor     .16837        54.341        .72057E-03    .54940E-04
   3  Prefactor     .10000E-03    17.720        .36285E-03** at limit **
   4  Prefactor     .10006E-03    21.078        .11916    ** at limit **
   5  norm          .10000E-03    4.8361        .36285E-03** at limit **
   6  Prefactor     .10000E-03    2.6487        .27669E-03** at limit **
   7  Prefactor     .10000E-03    25.163        .36285E-03** at limit **
   8  Prefactor     .10000E-03    17.560        .36285E-03** at limit **
   9  Prefactor     .10000E-03    6.2922        .36285E-03** at limit **
  10  norm          2.7685        1.6355        .32556E-05    .24444E-04
  11  Prefactor     .10000E-03    2.9903        .29305E-03** at limit **
  12  Prefactor     .10000E-03    2.2375        .49835E-04** at limit **
  13  Prefactor     .10000E-03    16.087        .65137E-03** at limit **
  14  norm          1.2600        .55377        .16637E-05   -.17246E-04
  15  Prefactor     .10000E-03    12.554        .72569E-04** at limit **
  16  Normalizat    1.1600        .21604        .11022E-04    .31767E-04
  17  Prefactor     1.1303        .17274        .90726E-05    .33081E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 1.32891
  Prefactor  = 0.168371
  Prefactor  = 0.0001
  Prefactor  = 0.000100064
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 2.76854
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 1.25996
  Prefactor  = 0.0001
  Normalizat = 1.16004
  Prefactor  = 1.1303
 **********
 **   18 **HESSE 
 **********

 FCN=   7588.937     FROM HESSE     STATUS=OK           217 CALLS     2832 TOTAL
                     EDM=   .20E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          1.3289        .67366        .39079E-06   -1.5477    
   2  Prefactor     .16837        54.380        .14411E-03   -1.5626    
   3  Prefactor     .10000E-03    17.720        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10006E-03    21.196        .11863       -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          .10000E-03    4.8361        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    2.6487        .55337E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    25.163        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    17.560        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .10000E-03    6.2922        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          2.7685        1.6352        .65113E-06   -1.5375    
  11  Prefactor     .10000E-03    2.9903        .58611E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    2.2375        .99669E-05   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .10000E-03    16.099        .13027E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          1.2600        .55375        .36915E-06   -1.5483    
  15  Prefactor     .10000E-03    12.554        .14514E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Normalizat    1.1600        .21614        .22045E-05   -.87847    
  17  Prefactor     1.1303        .17276        .18145E-05   -.88504    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.95223e-11
Minuit parameter uncertainties:
  1  0.673664
  2  6.05556
  3  3.35631e-07
  4  0.00232291
  5  3.10097e-07
  6  1.69722e-07
  7  1.64576e-06
  8  8.78864e-07
  9  3.929e-07
  10  1.63522
  11  2.56731e-07
  12  6.92724e-08
  13  6.279e-06
  14  0.553753
  15  6.74349e-08
  16  0.21631
  17  0.172845
Done.

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

Extracting fit parameters...

4FGL J1023.7+0038
   Spectrum: LogParabola
214         norm:  2.769e+00  1.635e+00  1.000e-04  1.000e+04 ( 1.000e-11)
215        alpha:  2.233e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
216         beta:  1.811e-01  0.000e+00  0.000e+00  1.000e+01 ( 1.000e+00) fixed
217           Eb:  5.178e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
496    Prefactor:  1.130e+00  1.728e-01  0.000e+00  1.000e+01 ( 1.000e+00)
497        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
498        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
495   Normalization:  1.160e+00  2.163e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 4.25
Ra Dec: 155.945 0.650
Photon Index (Fixed Index): 2.23 +/- 0.00
Photon Flux (Fixed Index): 7.05e-08 +/- 4.16e-08
Energy Flux (Fixed Index): 2.42e-05 +/- 1.43e-05

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) = 7588.64940077
delta logL = 0.28786701673

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 7588.6446222
delta logL = 0.292645585821

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    2.4284       1.0000         .10000E-03   10000.    
     2 'alpha     '    2.7230       1.0000          .0000       5.0000    
     3 'Normalizat'    1.1229       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1506       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .4990E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   7588.645     FROM MIGRAD    STATUS=CONVERGED     45 CALLS      230 TOTAL
                     EDM=   .55E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          2.4284        21.558        .65653E-02    .14964E-02
   2  alpha         2.7230        3.7851        .39245        .57973E-04
   3  Normalizat    1.1229        .71578E-01    .63149E-01    .94392E-05
   4  Prefactor     1.1506        .58370E-01    .35919E-01    .79998E-05
                               ERR DEF=  .500    
Final values: 
  norm       = 2.42841
  alpha      = 2.72298
  Normalizat = 1.12293
  Prefactor  = 1.1506
 **********
 **   18 **HESSE 
 **********

 FCN=   7588.645     FROM HESSE     STATUS=OK            33 CALLS      263 TOTAL
                     EDM=   .60E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          2.4284        1.7131        .68584E-04   -1.5396    
   2  alpha         2.7230        .69367        .14839E-01    .89310E-01
   3  Normalizat    1.1229        .21789        .27933E-03   -.89019    
   4  Prefactor     1.1506        .17532        .22505E-03   -.87865    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 5.96908e-11
Minuit parameter uncertainties:
  1  1.71315
  2  0.70297
  3  0.21806
  4  0.175411
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/847082': 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) = 7588.6446222
delta logL = 0.29264558619

Extracting fit parameters...

4FGL J1023.7+0038
   Spectrum: LogParabola
214         norm:  2.428e+00  1.713e+00  1.000e-04  1.000e+04 ( 1.000e-11)
215        alpha:  2.723e+00  7.030e-01  0.000e+00  5.000e+00 ( 1.000e+00)
216         beta:  1.811e-01  0.000e+00  0.000e+00  1.000e+01 ( 1.000e+00) fixed
217           Eb:  5.178e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
496    Prefactor:  1.151e+00  1.754e-01  0.000e+00  1.000e+01 ( 1.000e+00)
497        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
498        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
495   Normalization:  1.123e+00  2.181e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 4.85
Ra Dec: 155.945 0.650
Photon Index (Free Index): 2.72 +/- 0.70
Photon Flux (Free Index): 9.63e-08 +/- 5.66e-08
Energy Flux (Free Index): 2.32e-05 +/- 1.29e-05

Creating a high resolution counts map...
INFO: Auto-setting vmin to -1.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  1.110e+00 [aplpy.core]
Saving /scratch/kocevski/847082/cmap_HighResolution_486345601_486604801_4FGL_J1023.7+0038_daily_bin953.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='7.05e-08', energy_flux2='2.32e-05', photon_flux_error='4.16e-08', dlogl='2.93e-01', energy_flux='2.42e-05', photon_flux2='9.63e-08', job_status='DONE', time_completed='2021-09-01 20:10:36.902223', photon_index_error2='0.70', photon_index2='2.72', ts='4.25', fit_tolerance='1e-08', GAL='1.13', photon_index_error='0.00', energy_flux_error2='1.29e-05', EG='1.16', time_epoch_completed='1630552236.9', return_code='0', job_id='847082', GAL2='1.15', EG2='1.12', return_code2='0', energy_flux_error='1.43e-05', photon_flux_error2='5.66e-08', ts2='4.85', photon_index='2.23' WHERE bin_id='953' AND source_name='4FGL J1023.7+0038' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Wed Sep  1 20:10:36 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0117>
Subject: Job 847082: <4FGL_J1023.7+0038_daily_bin953> in cluster <slac> Done

Job <4FGL_J1023.7+0038_daily_bin953> was submitted from host <rhel6-64j> by user <kocevski> in cluster <slac> at Wed Sep  1 19:55:33 2021
Job was executed on host(s) <bullet0117>, in queue <medium>, as user <kocevski> in cluster <slac> at Wed Sep  1 19:56:37 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Wed Sep  1 19:56:37 2021
Terminated at Wed Sep  1 20:10:37 2021
Results reported at Wed Sep  1 20:10:37 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1023.7+0038_daily_bin953 155.945 0.6499 486345601 486604801 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1023.7+0038 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   609.13 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             222.54 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   840 sec.
    Turnaround time :                            904 sec.

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

