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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin963
RA = 160.15, Dec = 6.2848
tmin = 488937601, tmax = 489196801
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='66983', job_status='RUN', time_executed='2021-09-02 08:30:46.726565', time_epoch_executed='1630596646.73' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='963'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/66983

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/66983/ft1_4FGL_J1040.5+0617_daily_bin963.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/66983/ft2_4FGL_J1040.5+0617_daily_bin963.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/66983/ft1_4FGL_J1040.5+0617_daily_bin963.fits outfile=/scratch/kocevski/66983/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin963.fits ra=160.15 dec=6.2848 rad=12.0 tmin=488937601.0 tmax=489196801.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.56
user 3.35
sys 0.18

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/66983/ft1_filtered_4FGL_J1040.5+0617_daily_bin963.fits" evtable="EVENTS" scfile=/scratch/kocevski/66983/ft2_4FGL_J1040.5+0617_daily_bin963.fits sctable="SC_DATA" outfile=/scratch/kocevski/66983/ltcube_488937601_489196801_4FGL_J1040.5+0617_daily_bin963.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/66983/ft2_4FGL_J1040.5+0617_daily_bin963.fits
.....................!
real 13.54
user 13.17
sys 0.31

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/66983/ft1_filtered_4FGL_J1040.5+0617_daily_bin963.fits evtable="EVENTS" scfile=/scratch/kocevski/66983/ft2_4FGL_J1040.5+0617_daily_bin963.fits sctable="SC_DATA" expcube=/scratch/kocevski/66983/ltcube_488937601_489196801_4FGL_J1040.5+0617_daily_bin963.fits outfile=/scratch/kocevski/66983/expmap_488937601_489196801_4FGL_J1040.5+0617_daily_bin963.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/66983/ltcube_488937601_489196801_4FGL_J1040.5+0617_daily_bin963.fits
.....................!
real 191.17
user 186.34
sys 4.15

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/66983/ft1_filtered_4FGL_J1040.5+0617_daily_bin963.fits scfile=/scratch/kocevski/66983/ft2_4FGL_J1040.5+0617_daily_bin963.fits outfile=/scratch/kocevski/66983/cmap_488937601_489196801_4FGL_J1040.5+0617_daily_bin963.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.57
user 0.38
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/66983/ft1_filtered_4FGL_J1040.5+0617_daily_bin963.fits scfile=/scratch/kocevski/66983/ft2_4FGL_J1040.5+0617_daily_bin963.fits outfile=/scratch/kocevski/66983/cmap_HighResolution_488937601_489196801_4FGL_J1040.5+0617_daily_bin963.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.60
user 0.40
sys 0.16

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

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/66983/ft1_filtered_4FGL_J1040.5+0617_daily_bin963.fits', '/scratch/kocevski/66983/ft2_4FGL_J1040.5+0617_daily_bin963.fits', expMap='/scratch/kocevski/66983/expmap_488937601_489196801_4FGL_J1040.5+0617_daily_bin963.fits', expCube='/scratch/kocevski/66983/ltcube_488937601_489196801_4FGL_J1040.5+0617_daily_bin963.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/66983/Model_4FGL_J1040.5+0617_daily_bin963.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/66983/ft1_filtered_4FGL_J1040.5+0617_daily_bin963.fits
Spacecraft file(s): /scratch/kocevski/66983/ft2_4FGL_J1040.5+0617_daily_bin963.fits
Exposure map: /scratch/kocevski/66983/expmap_488937601_489196801_4FGL_J1040.5+0617_daily_bin963.fits
Exposure cube: /scratch/kocevski/66983/ltcube_488937601_489196801_4FGL_J1040.5+0617_daily_bin963.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/66983/Model_4FGL_J1040.5+0617_daily_bin963.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) = 5153.13725386

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    28.618       1.0000         .10000E-03   10000.    
     3 'norm      '    .10004E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    2.4153       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10066E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10091E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    2.0227       1.0000         .10000E-03   10000.    
     9 'Prefactor '    1.6850       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    5.0090       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .62055       1.0000         .10000E-03   10000.    
    14 'Prefactor '    16.992       1.0000         .10000E-03   10000.    
    15 'norm      '    2.6538       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10019E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    8.0105       1.0000         .10000E-03   10000.    
    18 'Normalizat'    .86843       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.1506       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.

 FCN=   5153.059     FROM MIGRAD    STATUS=CONVERGED    376 CALLS     1867 TOTAL
                     EDM=   .18E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  4.7%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    7.3706       -.17257E-06** at limit **
   2  Prefactor     28.638        50.454        .69668E-05    .29434E-03
   3  norm          .10000E-03    4.5003       -.79527E-08** at limit **
   4  Prefactor     2.4163        8.6129        .13138E-05   -.76166E-04
   5  Prefactor     .10000E-03    10.694        .10358E-05** at limit **
   6  Prefactor     .10003E-03    27.213        .76062E-05** at limit **
   7  Prefactor     .10000E-03    14.752       -.21738E-05** at limit **
   8  norm          2.0228        1.4280       -.57820E-08   -.16880E-03
   9  Prefactor     1.6844        8.0654        .16820E-05   -.13695E-03
  10  Prefactor     .10000E-03    1.3136        .22014E-07** at limit **
  11  Prefactor     5.0081        6.2073        .41237E-05   -.13398E-02
  12  Prefactor     .10000E-03    5.5010        .99417E-07** at limit **
  13  norm          .62063        .70294        .10213E-06    .20832E-03
  14  Prefactor     16.992        12.375        .11880E-06    .36068E-05
  15  norm          2.6537        1.4444       -.84426E-07   -.44188E-04
  16  Prefactor     .10002E-03    34.561       -.74947E-05** at limit **
  17  norm          8.0095        11.080        .15124E-05   -.23353E-03
  18  Normalizat    .86858        .20866       -.22629E-05   -.80897E-05
  19  Prefactor     1.1505        .17948       -.51112E-06   -.39428E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 28.6383
  norm       = 0.0001
  Prefactor  = 2.41632
  Prefactor  = 0.0001
  Prefactor  = 0.000100026
  Prefactor  = 0.000100002
  norm       = 2.02277
  Prefactor  = 1.68442
  Prefactor  = 0.0001
  Prefactor  = 5.00812
  Prefactor  = 0.0001
  norm       = 0.620632
  Prefactor  = 16.9917
  norm       = 2.6537
  Prefactor  = 0.000100019
  norm       = 8.00946
  Normalizat = 0.868583
  Prefactor  = 1.15048
 **********
 **   18 **HESSE 
 **********

 FCN=   5153.059     FROM HESSE     STATUS=OK           270 CALLS     2137 TOTAL
                     EDM=   .42E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    7.4488        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     28.638        51.788        .74891E-04   -1.4637    
   3  norm          .10000E-03    4.5017        .14872E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     2.4163        8.5879        .26339E-03   -1.5397    
   5  Prefactor     .10000E-03    10.729        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10003E-03    28.979        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    14.992        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          2.0228        1.4227        .68807E-04   -1.5424    
   9  Prefactor     1.6844        8.0932        .32441E-03   -1.5448    
  10  Prefactor     .10000E-03    1.3399        .80308E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     5.0081        6.5663        .89839E-03   -1.5260    
  12  Prefactor     .10000E-03    5.5553        .16431E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .62063        .65528        .52927E-03   -1.5550    
  14  Prefactor     16.992        12.106        .97161E-04   -1.4883    
  15  norm          2.6537        1.4440        .60411E-04   -1.5382    
  16  Prefactor     .10002E-03    36.311        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          8.0095        11.114        .70832E-03   -1.5142    
  18  Normalizat    .86858        .23834        .27403E-03   -.97573    
  19  Prefactor     1.1505        .20612        .21731E-03   -.87869    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.19575e-09
Minuit parameter uncertainties:
  1  1.5203e-05
  2  51.8694
  3  2.23471e-07
  4  8.59227
  5  0.000144551
  6  0.00174312
  7  0.000356906
  8  1.42275
  9  7.38581
  10  3.48913e-06
  11  6.56728
  12  1.91269e-05
  13  0.655289
  14  12.1073
  15  1.44399
  16  0.00167182
  17  11.1173
  18  0.238624
  19  0.206261
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.000e-04  3.489e-06  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.150e+00  2.063e-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:  8.686e-01  2.386e-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: 6.32e-08 ph cm-2 s-1
Energy Flux Upper Limit: 4.88e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/66983/likelihoodResults_488937601_489196801_4FGL_J1040.5+0617_daily_bin963.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) = 5153.06274997
delta logL = -0.00352904596821

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 5153.05922088
delta logL = 4.23551682616e-08

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.3539       1.0000          .0000       10.000    
     3 'Normalizat'    .86862       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1505       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=   5153.059     FROM MIGRAD    STATUS=CONVERGED     97 CALLS      244 TOTAL
                     EDM=   .23E-10    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    7.5959        .80968E-02** at limit **
   2  Index         2.0270        5.3736        .50000        .45566E-07
   3  Normalizat    .86858        .11158E-01    .27403E-03   -.27655E-03
   4  Prefactor     1.1505        .10088E-01    .21731E-03   -.33036E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 2.02699
  Normalizat = 0.868583
  Prefactor  = 1.15048
 **********
 **   18 **HESSE 
 **********

 FCN=   5153.059     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      273 TOTAL
                     EDM=   .31E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    103.98        .85076E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.0270        5.2899        .50000       -.63677    
   3  Normalizat    .86858        .44583E-01    .10961E-04   -.97573    
   4  Prefactor     1.1505        .40305E-01    .43462E-04   -.87869    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 3.10458e-10
Minuit parameter uncertainties:
  1  6.97627e-05
  2  589.022
  3  0.0445852
  4  0.0403064
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/66983': 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) = 5153.05921722
delta logL = 3.71074838768e-06

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.000e-04  6.976e-05  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.027e+00  5.890e+02  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.150e+00  4.031e-02  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:  8.686e-01  4.459e-02  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/66983/cmap_HighResolution_488937601_489196801_4FGL_J1040.5+0617_daily_bin963.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='4.88e-03', job_status='DONE', photon_flux_upper_limit='6.32e-08', time_completed='2021-09-02 08:39:43.790440', job_id='66983', GAL2='1.15', fit_tolerance='1e-08', EG2='0.87', EG='0.87', time_epoch_completed='1630597183.79', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.15', dlogl='3.71e-06', ts2='-0.00', photon_index_error='0.00', photon_index='2.37' WHERE bin_id='963' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:39:43 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0252>
Subject: Job 66983: <4FGL_J1040.5+0617_daily_bin963> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin963> was submitted from host <rhel6-64l> by user <kocevski> in cluster <slac> at Thu Sep  2 08:26:41 2021
Job was executed on host(s) <bullet0252>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:26:51 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:26:51 2021
Terminated at Thu Sep  2 08:39:44 2021
Results reported at Thu Sep  2 08:39:44 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin963 160.15 6.2848 488937601 489196801 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 :                                   532.44 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             220.76 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   773 sec.
    Turnaround time :                            783 sec.

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

