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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin1210
RA = 160.15, Dec = 6.2848
tmin = 552960001, tmax = 553219201
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='68172', job_status='RUN', time_executed='2021-09-02 08:34:53.882813', time_epoch_executed='1630596893.88' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='1210'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/68172

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/68172/ft1_4FGL_J1040.5+0617_daily_bin1210.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/68172/ft2_4FGL_J1040.5+0617_daily_bin1210.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/68172/ft1_4FGL_J1040.5+0617_daily_bin1210.fits outfile=/scratch/kocevski/68172/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin1210.fits ra=160.15 dec=6.2848 rad=12.0 tmin=552960001.0 tmax=553219201.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 2.85
user 2.64
sys 0.18

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/68172/ft2_4FGL_J1040.5+0617_daily_bin1210.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/68172/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin1210.fits evtable="EVENTS" outfile="/scratch/kocevski/68172/ft1_filtered_4FGL_J1040.5+0617_daily_bin1210.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.52
user 0.35
sys 0.15

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/68172/ft1_filtered_4FGL_J1040.5+0617_daily_bin1210.fits" evtable="EVENTS" scfile=/scratch/kocevski/68172/ft2_4FGL_J1040.5+0617_daily_bin1210.fits sctable="SC_DATA" outfile=/scratch/kocevski/68172/ltcube_552960001_553219201_4FGL_J1040.5+0617_daily_bin1210.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/68172/ft2_4FGL_J1040.5+0617_daily_bin1210.fits
.....................!
real 18.26
user 17.61
sys 0.37

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/68172/ft1_filtered_4FGL_J1040.5+0617_daily_bin1210.fits evtable="EVENTS" scfile=/scratch/kocevski/68172/ft2_4FGL_J1040.5+0617_daily_bin1210.fits sctable="SC_DATA" expcube=/scratch/kocevski/68172/ltcube_552960001_553219201_4FGL_J1040.5+0617_daily_bin1210.fits outfile=/scratch/kocevski/68172/expmap_552960001_553219201_4FGL_J1040.5+0617_daily_bin1210.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/68172/ltcube_552960001_553219201_4FGL_J1040.5+0617_daily_bin1210.fits
.....................!
real 193.04
user 187.20
sys 5.16

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/68172/ft1_filtered_4FGL_J1040.5+0617_daily_bin1210.fits scfile=/scratch/kocevski/68172/ft2_4FGL_J1040.5+0617_daily_bin1210.fits outfile=/scratch/kocevski/68172/cmap_552960001_553219201_4FGL_J1040.5+0617_daily_bin1210.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.56
user 0.38
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/68172/ft1_filtered_4FGL_J1040.5+0617_daily_bin1210.fits scfile=/scratch/kocevski/68172/ft2_4FGL_J1040.5+0617_daily_bin1210.fits outfile=/scratch/kocevski/68172/cmap_HighResolution_552960001_553219201_4FGL_J1040.5+0617_daily_bin1210.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.56
user 0.37
sys 0.17

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10006E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10115E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    5.9528       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10064E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10013E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    1.0939       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10009E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .69610       1.0000         .10000E-03   10000.    
    11 'Prefactor '    11.683       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .13333E-01   1.0000         .10000E-03   10000.    
    13 'norm      '    .60127       1.0000         .10000E-03   10000.    
    14 'Prefactor '    6.8128       1.0000         .10000E-03   10000.    
    15 'norm      '    .10018E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    14.068       1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.3404       1.0000         .10000E-01   10.000    
    19 'Prefactor '    .99872       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=   5944.313     FROM MIGRAD    STATUS=CONVERGED    416 CALLS     1711 TOTAL
                     EDM=   .17E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  5.1%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    6.4965        .22713E-07** at limit **
   2  Prefactor     .10000E-03    49.622        .17640E-06** at limit **
   3  norm          5.9523        11.836        .10071E-06   -.22174E-05
   4  Prefactor     .10000E-03    7.3797       -.85122E-07** at limit **
   5  Prefactor     .10001E-03    26.655        .20600E-05** at limit **
   6  Prefactor     .10004E-03    91.620       -.61028E-05** at limit **
   7  Prefactor     .10005E-03    36.792       -.68154E-05** at limit **
   8  norm          1.0940        1.7119        .28434E-06   -.12097E-03
   9  Prefactor     .10000E-03    5.5863       -.94703E-08** at limit **
  10  Prefactor     .69227        3.6477        .20922E-05   -.43625E-03
  11  Prefactor     11.686        9.2032        .15717E-05   -.13065E-03
  12  Prefactor     .10131E-03    6.6320        .21068E-05** at limit **
  13  norm          .60143        .55476        .31621E-07   -.11798E-02
  14  Prefactor     6.8058        8.3105        .51037E-06   -.39851E-04
  15  norm          .10000E-03    .70138       -.81325E-07** at limit **
  16  Prefactor     .10000E-03    19.963       -.47550E-06** at limit **
  17  norm          14.069        11.664        .13484E-06   -.28033E-04
  18  Normalizat    1.3403        .21347       -.12591E-05   -.37810E-03
  19  Prefactor     .99870        .17237       -.32186E-06   -.37885E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 5.95233
  Prefactor  = 0.0001
  Prefactor  = 0.000100005
  Prefactor  = 0.000100036
  Prefactor  = 0.000100045
  norm       = 1.09399
  Prefactor  = 0.0001
  Prefactor  = 0.692273
  Prefactor  = 11.6856
  Prefactor  = 0.000101305
  norm       = 0.601426
  Prefactor  = 6.80579
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 14.0691
  Normalizat = 1.34029
  Prefactor  = 0.9987
 **********
 **   18 **HESSE 
 **********

 FCN=   5944.313     FROM HESSE     STATUS=OK           266 CALLS     1977 TOTAL
                     EDM=   .24E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    6.5088        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    49.774        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          5.9523        11.823        .16458E-03   -1.5220    
   4  Prefactor     .10000E-03    7.4346        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10001E-03    27.251        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10004E-03    95.159        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10005E-03    41.240        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          1.0940        1.6835        .11925E-03   -1.5499    
   9  Prefactor     .10000E-03    5.6825        .17785E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .69227        3.7857        .27741E-03   -1.5542    
  11  Prefactor     11.686        9.4761        .58600E-03   -1.5024    
  12  Prefactor     .10131E-03    57.780        .32138E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .60143        .53332        .48885E-04   -1.5553    
  14  Prefactor     6.8058        8.1733        .15372E-03   -1.5186    
  15  norm          .10000E-03    3.5946        .12224E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     .10000E-03    20.114        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          14.069        11.643        .10679E-03   -1.4958    
  18  Normalizat    1.3403        .24654        .25728E-03   -.82371    
  19  Prefactor     .99870        .20378        .24981E-03   -.92773    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.35564e-08
Minuit parameter uncertainties:
  1  6.23945e-06
  2  9.03048e-05
  3  11.828
  4  1.49203e-05
  5  0.000757514
  6  0.00372618
  7  0.00272842
  8  1.68359
  9  1.09115e-06
  10  3.23784
  11  9.4773
  12  0.0173846
  13  0.533323
  14  8.1746
  15  4.2229e-06
  16  0.000169553
  17  11.6449
  18  0.246754
  19  0.203932
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  6.923e-01  3.238e+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

GAL_V02
   Spectrum: PowerLaw
533    Prefactor:  9.987e-01  2.039e-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.340e+00  2.468e-01  1.000e-02  1.000e+01 ( 1.000e+00)


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

Saving results to:
/scratch/kocevski/68172/likelihoodResults_552960001_553219201_4FGL_J1040.5+0617_daily_bin1210.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) = 5942.26842383
delta logL = 2.04412536625

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5941.9225439
delta logL = 2.3900052929

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 'Index     '    8.5164       1.0000          .0000       10.000    
     3 'Normalizat'    1.1741       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1007       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=   5941.923     FROM MIGRAD    STATUS=FAILED       302 CALLS      576 TOTAL
                     EDM=   .30E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    .42194E-02    .21117E-03** at limit **
   2  Index         8.5163        2.5896        .12671        .20856E-03
   3  Normalizat    1.1747        .74365E-01    .25674E-02    .21301E-03
   4  Prefactor     1.1004        .62161E-01    .24991E-02    .15604E-03
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   5941.923     FROM SIMPLEX   STATUS=UNCHANGED    173 CALLS      749 TOTAL
                     EDM=   .12E-04    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    .42194E-02    .36007E-05** at limit **
   2  Index         8.5163        2.5896        .15838E-04    .20856E-03
   3  Normalizat    1.1747        .74365E-01    .72171E-06    .21301E-03
   4  Prefactor     1.1004        .62161E-01    .85338E-06    .15604E-03
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   5941.923     FROM MIGRAD    STATUS=CONVERGED     34 CALLS      783 TOTAL
                     EDM=   .95E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    .42629E-03    .86273E-05** at limit **
   2  Index         8.5163        .28000        .54136E-02    .40615E-03
   3  Normalizat    1.1747        .24824        .10270E-03    .16475E-03
   4  Prefactor     1.1004        .20974        .99965E-04    .13126E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 8.5163
  Normalizat = 1.17469
  Prefactor  = 1.10041
 **********
 **   18 **HESSE 
 **********

 FCN=   5941.923     FROM HESSE     STATUS=OK            27 CALLS      810 TOTAL
                     EDM=   .45E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    .42507E-03    .17255E-05   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         8.5163        .27627        .10827E-02    .77997    
   3  Normalizat    1.1747        .24823        .20539E-04   -.87389    
   4  Prefactor     1.1004        .20978        .19993E-04   -.89453    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.4561e-11
Minuit parameter uncertainties:
  1  8.47859e-10
  2  0.276546
  3  0.248481
  4  0.209938
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/68172': 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) = 5941.92253946
delta logL = 2.39000973244

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.000e-04  8.479e-10  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  8.516e+00  2.765e-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:  1.100e+00  2.099e-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.175e+00  2.485e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 5.24
Ra Dec: 160.150 6.285
Photon Index (Free Index): 8.52 +/- 0.28
Photon Flux (Free Index): 1.29e-07 +/- 7.06e-08
Energy Flux (Free Index): 1.48e-05 +/- 8.06e-06

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/68172/cmap_HighResolution_552960001_553219201_4FGL_J1040.5+0617_daily_bin1210.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='8.10e-03', comment='SUCCESS', energy_flux2='1.48e-05', dlogl='2.39e+00', photon_flux2='1.29e-07', job_status='DONE', time_completed='2021-09-02 08:44:56.821890', photon_index_error2='0.28', photon_index2='8.52', ts='0.05', fit_tolerance='1e-08', GAL='1.00', photon_index_error='0.00', photon_flux_upper_limit='1.05e-07', energy_flux_error2='8.06e-06', EG='1.34', time_epoch_completed='1630597496.82', return_code='0', job_id='68172', GAL2='1.10', EG2='1.17', return_code2='0', photon_flux_error2='7.06e-08', ts2='5.24', photon_index='2.37' WHERE bin_id='1210' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:44:56 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0072>
Subject: Job 68172: <4FGL_J1040.5+0617_daily_bin1210> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin1210> was submitted from host <rhel6-64j> by user <kocevski> in cluster <slac> at Thu Sep  2 08:31:42 2021
Job was executed on host(s) <bullet0072>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:34:37 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:34:37 2021
Terminated at Thu Sep  2 08:44:57 2021
Results reported at Thu Sep  2 08:44:57 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin1210 160.15 6.2848 552960001 553219201 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 :                                   594.14 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             355.50 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   620 sec.
    Turnaround time :                            795 sec.

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

