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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin768
RA = 160.15, Dec = 6.2848
tmin = 438393601, tmax = 438652801
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='65729', job_status='RUN', time_executed='2021-09-02 08:28:19.415524', time_epoch_executed='1630596499.42' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='768'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/65729

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/65729/ft1_4FGL_J1040.5+0617_daily_bin768.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/65729/ft2_4FGL_J1040.5+0617_daily_bin768.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/65729/ft1_4FGL_J1040.5+0617_daily_bin768.fits outfile=/scratch/kocevski/65729/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin768.fits ra=160.15 dec=6.2848 rad=12.0 tmin=438393601.0 tmax=438652801.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 6.51
user 6.21
sys 0.26

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/65729/ft1_filtered_4FGL_J1040.5+0617_daily_bin768.fits evtable="EVENTS" scfile=/scratch/kocevski/65729/ft2_4FGL_J1040.5+0617_daily_bin768.fits sctable="SC_DATA" expcube=/scratch/kocevski/65729/ltcube_438393601_438652801_4FGL_J1040.5+0617_daily_bin768.fits outfile=/scratch/kocevski/65729/expmap_438393601_438652801_4FGL_J1040.5+0617_daily_bin768.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/65729/ltcube_438393601_438652801_4FGL_J1040.5+0617_daily_bin768.fits
.....................!
real 194.52
user 188.34
sys 5.51

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/65729/ft1_filtered_4FGL_J1040.5+0617_daily_bin768.fits scfile=/scratch/kocevski/65729/ft2_4FGL_J1040.5+0617_daily_bin768.fits outfile=/scratch/kocevski/65729/cmap_438393601_438652801_4FGL_J1040.5+0617_daily_bin768.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.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/65729/ft1_filtered_4FGL_J1040.5+0617_daily_bin768.fits scfile=/scratch/kocevski/65729/ft2_4FGL_J1040.5+0617_daily_bin768.fits outfile=/scratch/kocevski/65729/cmap_HighResolution_438393601_438652801_4FGL_J1040.5+0617_daily_bin768.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.57
user 0.40
sys 0.15

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    9.1357       1.0000         .10000E-03   10000.    
     2 'Prefactor '    20.009       1.0000         .10000E-03   10000.    
     3 'norm      '    .12766E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    11.495       1.0000         .10000E-03   10000.    
     5 'Prefactor '    37.707       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10663E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10489E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    4.9979       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10035E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10119E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    1.3228       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10049E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    2.7515       1.0000         .10000E-03   10000.    
    16 'Prefactor '    8.8435       1.0000         .10000E-03   10000.    
    17 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.1389       1.0000         .10000E-01   10.000    
    19 'Prefactor '    .89893       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=   3493.386     FROM MIGRAD    STATUS=CONVERGED    393 CALLS     1912 TOTAL
                     EDM=   .57E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  3.0%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     9.1383        10.903       -.32945E-06    .25613E-04
   2  Prefactor     19.964        48.628       -.29000E-06   -.63019E-04
   3  norm          .10000E-03    12.417       -.63839E-05** at limit **
   4  Prefactor     11.510        12.452       -.26415E-06    .12624E-03
   5  Prefactor     37.497        81.065       -.44392E-05   -.30045E-04
   6  Prefactor     .10002E-03    84.116       -.12824E-04** at limit **
   7  Prefactor     .10000E-03    20.460       -.44558E-05** at limit **
   8  norm          4.9980        2.4184       -.16310E-06   -.31540E-03
   9  Prefactor     .10000E-03    11.431        .85395E-06** at limit **
  10  Prefactor     .10000E-03    1.4325       -.14561E-06** at limit **
  11  Prefactor     .10000E-03    3.8922        .51956E-06** at limit **
  12  Prefactor     .10000E-03    5.9170        .21082E-06** at limit **
  13  norm          1.3224        .75446       -.11906E-06   -.26953E-03
  14  Prefactor     .10000E-03    5.9811        .24279E-06** at limit **
  15  norm          2.7511        2.3213       -.41451E-06   -.62180E-04
  16  Prefactor     8.7863        28.551       -.37190E-05   -.39178E-04
  17  norm          .10000E-03    8.3955        .44909E-06** at limit **
  18  Normalizat    1.1390        .29763        .16520E-04   -.13462E-03
  19  Prefactor     .89896        .24485       -.14900E-04    .10025E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 9.13826
  Prefactor  = 19.9638
  norm       = 0.000100005
  Prefactor  = 11.5096
  Prefactor  = 37.4975
  Prefactor  = 0.000100019
  Prefactor  = 0.000100003
  norm       = 4.99798
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 1.32245
  Prefactor  = 0.0001
  norm       = 2.75108
  Prefactor  = 8.78631
  norm       = 0.0001
  Normalizat = 1.13902
  Prefactor  = 0.898963
 **********
 **   18 **HESSE 
 **********

 FCN=   3493.386     FROM HESSE     STATUS=OK           262 CALLS     2174 TOTAL
                     EDM=   .12E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     9.1383        10.895        .13260E-03   -1.5103    
   2  Prefactor     19.964        48.711        .89541E-04   -1.4814    
   3  norm          .10000E-03    12.886        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     11.510        12.427        .11816E-03   -1.5029    
   5  Prefactor     37.497        81.303        .32635E-03   -1.4482    
   6  Prefactor     .10002E-03    86.218        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    20.767        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          4.9980        2.4179        .61047E-04   -1.5261    
   9  Prefactor     .10000E-03    11.648        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    1.4406        .69087E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    3.9153        .11387E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    5.9517        .14036E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          1.3224        .75536        .37198E-04   -1.5478    
  14  Prefactor     .10000E-03    5.9932        .14111E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          2.7511        2.3127        .77320E-04   -1.5376    
  16  Prefactor     8.7863        28.573        .13478E-03   -1.5115    
  17  norm          .10000E-03    8.4151        .16728E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    1.1390        .30199        .25017E-03   -.88509    
  19  Prefactor     .89896        .24845        .24241E-03   -.96177    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.24095e-09
Minuit parameter uncertainties:
  1  10.8978
  2  48.8077
  3  0.00048475
  4  12.4301
  5  81.545
  6  0.0025934
  7  0.000487059
  8  2.41798
  9  2.81876e-05
  10  9.25978e-06
  11  1.51238e-05
  12  1.86045e-06
  13  0.75537
  14  2.28086e-06
  15  2.31278
  16  28.6175
  17  2.7732e-05
  18  0.302452
  19  0.248762
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.000e-04  9.260e-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:  8.990e-01  2.488e-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:  1.139e+00  3.025e-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: 8.39e-08 ph cm-2 s-1
Energy Flux Upper Limit: 6.47e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/65729/likelihoodResults_438393601_438652801_4FGL_J1040.5+0617_daily_bin768.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) = 3493.38878255
delta logL = -0.00320262794003

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 3493.3855799
delta logL = 1.9170329324e-08

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.3617       1.0000          .0000       10.000    
     3 'Normalizat'    1.1390       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .89898       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.
 MIGRAD TERMINATED WITHOUT CONVERGENCE.

 FCN=   3493.386     FROM MIGRAD    STATUS=FAILED        86 CALLS      237 TOTAL
                     EDM=   .69E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10066E-03    97.393        .69211E-03** at limit **
   2  Index         2.2945        5.5990        .50000        .30686E-04
   3  Normalizat    1.1390        .54144E-01    .25015E-03    .13407E-04
   4  Prefactor     .89896        .47451E-01    .24242E-03    .24879E-04
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   3493.386     FROM SIMPLEX   STATUS=UNCHANGED    135 CALLS      372 TOTAL
                     EDM=   .16E-04    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10066E-03    97.393        .24086E-03** at limit **
   2  Index         2.2945        5.5990        .66872E-04    .30686E-04
   3  Normalizat    1.1390        .54144E-01    .17089E-05    .13407E-04
   4  Prefactor     .89896        .47451E-01    .18248E-05    .24879E-04
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   3493.386     FROM MIGRAD    STATUS=CONVERGED     38 CALLS      410 TOTAL
                     EDM=   .31E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    3.2908        .13842E-03** at limit **
   2  Index         2.0576        5.6494        .50000       -.23707E-06
   3  Normalizat    1.1390        .27788        .10006E-04   -.26360E-04
   4  Prefactor     .89896        .24361        .96967E-05   -.19228E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 2.05759
  Normalizat = 1.13902
  Prefactor  = 0.898958
 **********
 **   18 **HESSE 
 **********

 FCN=   3493.386     FROM HESSE     STATUS=OK            29 CALLS      439 TOTAL
                     EDM=   .45E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    1.5381        .27684E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.0576        8.9698        .50000       -.62918    
   3  Normalizat    1.1390        .27795        .20012E-05   -.88509    
   4  Prefactor     .89896        .24365        .19393E-05   -.96178    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.54479e-11
Minuit parameter uncertainties:
  1  1.40728e-05
  2  92.8414
  3  0.278305
  4  0.243949
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/65729': 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) = 3493.38557843
delta logL = 1.48791832544e-06

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.000e-04  1.407e-05  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.058e+00  9.284e+01  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:  8.990e-01  2.439e-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:  1.139e+00  2.783e-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/65729/cmap_HighResolution_438393601_438652801_4FGL_J1040.5+0617_daily_bin768.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='6.47e-03', job_status='DONE', photon_flux_upper_limit='8.39e-08', time_completed='2021-09-02 08:36:36.698968', job_id='65729', GAL2='0.90', fit_tolerance='1e-08', EG2='1.14', EG='1.14', time_epoch_completed='1630596996.7', return_code2='0', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.90', dlogl='1.49e-06', ts2='-0.00', photon_index_error='0.00', photon_index='2.37' WHERE bin_id='768' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:36:36 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0224>
Subject: Job 65729: <4FGL_J1040.5+0617_daily_bin768> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin768> was submitted from host <rhel6-64k> by user <kocevski> in cluster <slac> at Thu Sep  2 08:21:23 2021
Job was executed on host(s) <bullet0224>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:24:08 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:24:08 2021
Terminated at Thu Sep  2 08:36:37 2021
Results reported at Thu Sep  2 08:36:37 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin768 160.15 6.2848 438393601 438652801 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 :                                   492.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             243.79 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   749 sec.
    Turnaround time :                            914 sec.

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

