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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin684
RA = 160.15, Dec = 6.2848
tmin = 416620801, tmax = 416880001
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='65623', job_status='RUN', time_executed='2021-09-02 08:27:39.578411', time_epoch_executed='1630596459.58' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='684'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/65623

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/65623/ft1_4FGL_J1040.5+0617_daily_bin684.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/65623/ft2_4FGL_J1040.5+0617_daily_bin684.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/65623/ft1_4FGL_J1040.5+0617_daily_bin684.fits outfile=/scratch/kocevski/65623/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin684.fits ra=160.15 dec=6.2848 rad=12.0 tmin=416620801.0 tmax=416880001.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.25
user 4.95
sys 0.27

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/65623/ft2_4FGL_J1040.5+0617_daily_bin684.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/65623/ft2_4FGL_J1040.5+0617_daily_bin684.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/65623/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin684.fits evtable="EVENTS" outfile="/scratch/kocevski/65623/ft1_filtered_4FGL_J1040.5+0617_daily_bin684.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.33
sys 0.16

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/65623/ft1_filtered_4FGL_J1040.5+0617_daily_bin684.fits" evtable="EVENTS" scfile=/scratch/kocevski/65623/ft2_4FGL_J1040.5+0617_daily_bin684.fits sctable="SC_DATA" outfile=/scratch/kocevski/65623/ltcube_416620801_416880001_4FGL_J1040.5+0617_daily_bin684.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/65623/ft2_4FGL_J1040.5+0617_daily_bin684.fits
.....................!
real 13.43
user 13.02
sys 0.35

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/65623/ft1_filtered_4FGL_J1040.5+0617_daily_bin684.fits evtable="EVENTS" scfile=/scratch/kocevski/65623/ft2_4FGL_J1040.5+0617_daily_bin684.fits sctable="SC_DATA" expcube=/scratch/kocevski/65623/ltcube_416620801_416880001_4FGL_J1040.5+0617_daily_bin684.fits outfile=/scratch/kocevski/65623/expmap_416620801_416880001_4FGL_J1040.5+0617_daily_bin684.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/65623/ltcube_416620801_416880001_4FGL_J1040.5+0617_daily_bin684.fits
.....................!
real 192.94
user 187.68
sys 4.67

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

Setting source of interest to:
4FGL J1040.5+0617 @ 160.15 6.2848

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/65623/ft1_filtered_4FGL_J1040.5+0617_daily_bin684.fits scfile=/scratch/kocevski/65623/ft2_4FGL_J1040.5+0617_daily_bin684.fits outfile=/scratch/kocevski/65623/cmap_416620801_416880001_4FGL_J1040.5+0617_daily_bin684.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=160.15 yref=6.2848 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.36
sys 0.17

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/65623/ft1_filtered_4FGL_J1040.5+0617_daily_bin684.fits scfile=/scratch/kocevski/65623/ft2_4FGL_J1040.5+0617_daily_bin684.fits outfile=/scratch/kocevski/65623/cmap_HighResolution_416620801_416880001_4FGL_J1040.5+0617_daily_bin684.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=160.15 yref=6.2848 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.58
user 0.38
sys 0.16

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/65623/ft1_filtered_4FGL_J1040.5+0617_daily_bin684.fits evtable="EVENTS" scfile=/scratch/kocevski/65623/ft2_4FGL_J1040.5+0617_daily_bin684.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/65623/Model_4FGL_J1040.5+0617_daily_bin684.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/65623/ft1_filtered_4FGL_J1040.5+0617_daily_bin684.fits.....................!
real 50.59
user 49.20
sys 1.15

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/65623/ft1_filtered_4FGL_J1040.5+0617_daily_bin684.fits', '/scratch/kocevski/65623/ft2_4FGL_J1040.5+0617_daily_bin684.fits', expMap='/scratch/kocevski/65623/expmap_416620801_416880001_4FGL_J1040.5+0617_daily_bin684.fits', expCube='/scratch/kocevski/65623/ltcube_416620801_416880001_4FGL_J1040.5+0617_daily_bin684.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/65623/Model_4FGL_J1040.5+0617_daily_bin684.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1040.5+0617'

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  2.877e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.368e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
218        Scale:  8.643e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/65623/ft1_filtered_4FGL_J1040.5+0617_daily_bin684.fits
Spacecraft file(s): /scratch/kocevski/65623/ft2_4FGL_J1040.5+0617_daily_bin684.fits
Exposure map: /scratch/kocevski/65623/expmap_416620801_416880001_4FGL_J1040.5+0617_daily_bin684.fits
Exposure cube: /scratch/kocevski/65623/ltcube_416620801_416880001_4FGL_J1040.5+0617_daily_bin684.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/65623/Model_4FGL_J1040.5+0617_daily_bin684.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) = 4836.82614714

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    8.0912       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10106E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    .10106E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    12.877       1.0000         .10000E-03   10000.    
     5 'Prefactor '    49.323       1.0000         .10000E-03   10000.    
     6 'Prefactor '    51.274       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10100E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    2.4893       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .13616E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    1.1936       1.0000         .10000E-03   10000.    
    12 'Prefactor '    1.3586       1.0000         .10000E-03   10000.    
    13 'norm      '    .10062E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    33.394       1.0000         .10000E-03   10000.    
    15 'norm      '    1.5095       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .18507E-01   1.0000         .10000E-03   10000.    
    17 'norm      '    15.245       1.0000         .10000E-03   10000.    
    18 'Normalizat'    .95251       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.1009       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5360E+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=   4836.813     FROM MIGRAD    STATUS=CONVERGED    708 CALLS     2518 TOTAL
                     EDM=   .20E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     8.0941        17.343        .14095E-03    .28311E-04
   2  Prefactor     .10000E-03    45.674        .18142E-02** at limit **
   3  norm          .10000E-03    11.169        .18142E-02** at limit **
   4  Prefactor     12.872        18.135        .11162E-03    .56424E-04
   5  Prefactor     49.416        48.150        .28550E-03    .29945E-04
   6  Prefactor     51.294        75.184        .56008E-04    .36456E-04
   7  Prefactor     .10000E-03    17.009        .18142E-02** at limit **
   8  norm          2.4896        1.6291        .68916E-04    .18410E-03
   9  Prefactor     .10000E-03    4.9519        .15041E-02** at limit **
  10  Prefactor     .10000E-03    7.8244        .20205E-02** at limit **
  11  Prefactor     1.1906        13.456        .41647E-03    .17839E-03
  12  Prefactor     1.3386        22.930        .37481E-03    .89599E-04
  13  norm          .10000E-03    .43882        .76142E-03** at limit **
  14  Prefactor     33.404        15.873        .69343E-04   -.76872E-03
  15  norm          1.5095        1.6767        .90466E-04    .18260E-03
  16  Prefactor     .10000E-03    37.884        .97702E-01** at limit **
  17  norm          15.243        15.527        .10258E-03    .15516E-04
  18  Normalizat    .95247        .27574        .28743E-03    .19302E-03
  19  Prefactor     1.1010        .21981        .23111E-03    .26378E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 8.09415
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 12.8718
  Prefactor  = 49.4163
  Prefactor  = 51.2941
  Prefactor  = 0.0001
  norm       = 2.4896
  Prefactor  = 0.0001
  Prefactor  = 0.000100003
  Prefactor  = 1.19062
  Prefactor  = 1.3386
  norm       = 0.0001
  Prefactor  = 33.4037
  norm       = 1.50949
  Prefactor  = 0.000100004
  norm       = 15.2434
  Normalizat = 0.952474
  Prefactor  = 1.10095
 **********
 **   18 **HESSE 
 **********

 FCN=   4836.813     FROM HESSE     STATUS=OK           258 CALLS     2776 TOTAL
                     EDM=   .21E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     8.0941        17.338        .56380E-05   -1.5139    
   2  Prefactor     .10000E-03    45.679        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .10000E-03    11.169        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     12.872        18.131        .44649E-05   -1.4990    
   5  Prefactor     49.416        48.147        .11420E-04   -1.4301    
   6  Prefactor     51.294        75.173        .11202E-04   -1.4274    
   7  Prefactor     .10000E-03    17.010        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          2.4896        1.6290        .27566E-05   -1.5392    
   9  Prefactor     .10000E-03    4.9531        .30082E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    7.8562        .40410E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     1.1906        13.435        .16659E-04   -1.5490    
  12  Prefactor     1.3386        22.855        .14993E-04   -1.5477    
  13  norm          .10000E-03    .43890        .15228E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     33.404        15.857        .13869E-04   -1.4551    
  15  norm          1.5095        1.6765        .36186E-05   -1.5462    
  16  Prefactor     .10000E-03    35.048        .10244       -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          15.243        15.526        .41032E-05   -1.4927    
  18  Normalizat    .95247        .27578        .11497E-04   -.94640    
  19  Prefactor     1.1010        .21999        .46223E-04   -.89436    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.0612e-09
Minuit parameter uncertainties:
  1  17.3488
  2  0.000118515
  3  8.16578e-05
  4  18.1385
  5  48.1846
  6  75.3127
  7  0.000102391
  8  1.62904
  9  2.6361e-05
  10  0.000308793
  11  8.00079
  12  11.0667
  13  2.44803e-05
  14  15.8586
  15  1.67651
  16  0.000782968
  17  15.53
  18  0.276191
  19  0.220172
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.000e-04  3.088e-04  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.368e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
218        Scale:  8.643e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
533    Prefactor:  1.101e+00  2.202e-01  0.000e+00  1.000e+01 ( 1.000e+00)
534        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
535        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
532   Normalization:  9.525e-01  2.762e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 160.150 6.285
Photon Flux Upper Limit: 1.12e-07 ph cm-2 s-1
Energy Flux Upper Limit: 8.67e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/65623/likelihoodResults_416620801_416880001_4FGL_J1040.5+0617_daily_bin684.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) = 4836.81332728
delta logL = -0.000609059296949

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 4836.81271839
delta logL = -1.66453901329e-07

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10032E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.3828       1.0000          .0000       10.000    
     3 'Normalizat'    .95243       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1010       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5360E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   4836.813     FROM MIGRAD    STATUS=CONVERGED     59 CALLS      228 TOTAL
                     EDM=   .92E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    3.2182        .55982E-01** at limit **
   2  Index         2.3977        6.1483        .50000       -.16746E-04
   3  Normalizat    .95247        .67695E-02    .45568E-01    .14884E-03
   4  Prefactor     1.1010        .58362E-02    .37547E-01    .21337E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100002
  Index      = 2.39775
  Normalizat = 0.952474
  Prefactor  = 1.10095
 **********
 **   18 **HESSE 
 **********

 FCN=   4836.813     FROM HESSE     STATUS=OK            33 CALLS      261 TOTAL
                     EDM=   .36E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    16.052        .19903E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.3977        6.0031        .50000       -.54738    
   3  Normalizat    .95247        .25105        .28743E-03   -.94640    
   4  Prefactor     1.1010        .21660        .23111E-03   -.89436    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.56072e-10
Minuit parameter uncertainties:
  1  0.000351882
  2  6.07021
  3  0.251363
  4  0.216775
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/65623': 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) = 4836.81271811
delta logL = 1.17161107482e-07

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.000e-04  3.519e-04  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.398e+00  6.070e+00  0.000e+00  1.000e+01 (-1.000e+00)
218        Scale:  8.643e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
533    Prefactor:  1.101e+00  2.168e-01  0.000e+00  1.000e+01 ( 1.000e+00)
534        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
535        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
532   Normalization:  9.525e-01  2.514e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 160.150 6.285

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/65623/cmap_HighResolution_416620801_416880001_4FGL_J1040.5+0617_daily_bin684.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='8.67e-03', job_status='DONE', photon_flux_upper_limit='1.12e-07', time_completed='2021-09-02 08:37:03.663855', job_id='65623', GAL2='1.10', fit_tolerance='1e-08', EG2='0.95', EG='0.95', time_epoch_completed='1630597023.66', return_code2='0', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.10', dlogl='1.17e-07', ts2='-0.00', photon_index_error='0.00', photon_index='2.37' WHERE bin_id='684' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:37:03 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0272>
Subject: Job 65623: <4FGL_J1040.5+0617_daily_bin684> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin684> was submitted from host <rhel6-64k> by user <kocevski> in cluster <slac> at Thu Sep  2 08:21:13 2021
Job was executed on host(s) <bullet0272>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:23:49 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Thu Sep  2 08:23:49 2021
Terminated at Thu Sep  2 08:37:04 2021
Results reported at Thu Sep  2 08:37:04 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin684 160.15 6.2848 416620801 416880001 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1040.5+0617 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   559.03 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             274.37 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   795 sec.
    Turnaround time :                            951 sec.

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

