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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin471
RA = 160.15, Dec = 6.2848
tmin = 361411201, tmax = 361670401
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='64371', job_status='RUN', time_executed='2021-09-02 08:18:30.209924', time_epoch_executed='1630595910.21' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='471'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/64371

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/64371/ft1_4FGL_J1040.5+0617_daily_bin471.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/64371/ft2_4FGL_J1040.5+0617_daily_bin471.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/64371/ft1_4FGL_J1040.5+0617_daily_bin471.fits outfile=/scratch/kocevski/64371/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin471.fits ra=160.15 dec=6.2848 rad=12.0 tmin=361411201.0 tmax=361670401.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.62
user 3.36
sys 0.21

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/64371/ft1_filtered_4FGL_J1040.5+0617_daily_bin471.fits" evtable="EVENTS" scfile=/scratch/kocevski/64371/ft2_4FGL_J1040.5+0617_daily_bin471.fits sctable="SC_DATA" outfile=/scratch/kocevski/64371/ltcube_361411201_361670401_4FGL_J1040.5+0617_daily_bin471.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/64371/ft2_4FGL_J1040.5+0617_daily_bin471.fits
.....................!
real 16.85
user 16.41
sys 0.36

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/64371/ft1_filtered_4FGL_J1040.5+0617_daily_bin471.fits evtable="EVENTS" scfile=/scratch/kocevski/64371/ft2_4FGL_J1040.5+0617_daily_bin471.fits sctable="SC_DATA" expcube=/scratch/kocevski/64371/ltcube_361411201_361670401_4FGL_J1040.5+0617_daily_bin471.fits outfile=/scratch/kocevski/64371/expmap_361411201_361670401_4FGL_J1040.5+0617_daily_bin471.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/64371/ltcube_361411201_361670401_4FGL_J1040.5+0617_daily_bin471.fits
.....................!
real 193.27
user 187.22
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/64371/ft1_filtered_4FGL_J1040.5+0617_daily_bin471.fits scfile=/scratch/kocevski/64371/ft2_4FGL_J1040.5+0617_daily_bin471.fits outfile=/scratch/kocevski/64371/cmap_361411201_361670401_4FGL_J1040.5+0617_daily_bin471.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.40
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/64371/ft1_filtered_4FGL_J1040.5+0617_daily_bin471.fits scfile=/scratch/kocevski/64371/ft2_4FGL_J1040.5+0617_daily_bin471.fits outfile=/scratch/kocevski/64371/cmap_HighResolution_361411201_361670401_4FGL_J1040.5+0617_daily_bin471.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.16

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    10.668       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10020E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    22.651       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10043E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10464E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10020E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    16.199       1.0000         .10000E-03   10000.    
     8 'norm      '    2.1222       1.0000         .10000E-03   10000.    
     9 'Prefactor '    3.3069       1.0000         .10000E-03   10000.    
    10 'Prefactor '    3.0219       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .33516       1.0000         .10000E-03   10000.    
    12 'Prefactor '    11.152       1.0000         .10000E-03   10000.    
    13 'norm      '    2.5782       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    2.1410       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10032E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.1990       1.0000         .10000E-01   10.000    
    19 'Prefactor '    .62293       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=   5282.783     FROM MIGRAD    STATUS=CONVERGED    391 CALLS     1891 TOTAL
                     EDM=   .15E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .5%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     10.675        18.346        .45784E-05    .23419E-04
   2  Prefactor     .10000E-03    52.050        .20000E-04** at limit **
   3  norm          22.643        20.971       -.50733E-05    .74568E-04
   4  Prefactor     .10000E-03    7.1581        .11973E-06** at limit **
   5  Prefactor     .10000E-03    59.041       -.20096E-04** at limit **
   6  Prefactor     .10000E-03    26.412       -.44621E-05** at limit **
   7  Prefactor     16.200        18.546        .10269E-05    .38597E-04
   8  norm          2.1225        1.6785        .12844E-06   -.27809E-03
   9  Prefactor     3.3104        7.4420       -.25027E-05   -.36973E-03
  10  Prefactor     3.0226        2.5362       -.89204E-07   -.23333E-04
  11  Prefactor     .40944        4.1101       -.75030E-06    .75559E-04
  12  Prefactor     11.155        8.1156        .33718E-06   -.32171E-04
  13  norm          2.5786        .74902       -.37214E-07   -.38434E-04
  14  Prefactor     .10000E-03    3.7131        .25075E-06** at limit **
  15  norm          2.1406        1.2954       -.55444E-07    .15973E-03
  16  Prefactor     .10000E-03    19.558       -.70863E-06** at limit **
  17  norm          .10000E-03    5.3182       -.23471E-06** at limit **
  18  Normalizat    1.1985        .19990        .56994E-06    .11257E-03
  19  Prefactor     .62307        .15891       -.16397E-06    .77193E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 10.6746
  Prefactor  = 0.0001
  norm       = 22.643
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 16.1996
  norm       = 2.12245
  Prefactor  = 3.31038
  Prefactor  = 3.02259
  Prefactor  = 0.40944
  Prefactor  = 11.1551
  norm       = 2.57863
  Prefactor  = 0.0001
  norm       = 2.14057
  Prefactor  = 0.0001
  norm       = 0.0001
  Normalizat = 1.19849
  Prefactor  = 0.623069
 **********
 **   18 **HESSE 
 **********

 FCN=   5282.783     FROM HESSE     STATUS=OK           272 CALLS     2163 TOTAL
                     EDM=   .39E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     10.675        18.308        .12267E-03   -1.5054    
   2  Prefactor     .10000E-03    51.984        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          22.643        20.802        .84161E-04   -1.4756    
   4  Prefactor     .10000E-03    7.1785        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    58.648        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    26.408        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     16.200        18.536        .99511E-04   -1.4903    
   8  norm          2.1225        1.6667        .78654E-04   -1.5417    
   9  Prefactor     3.3104        7.5443        .22262E-03   -1.5344    
  10  Prefactor     3.0226        2.5345        .10140E-03   -1.5360    
  11  Prefactor     .40944        25.548        .27427E-02   -1.5580    
  12  Prefactor     11.155        8.1231        .11997E-03   -1.5040    
  13  norm          2.5786        .74871        .32147E-04   -1.5387    
  14  Prefactor     .10000E-03    3.7202        .13666E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          2.1406        1.2949        .61503E-04   -1.5415    
  16  Prefactor     .10000E-03    19.679        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .10000E-03    5.3284        .16369E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    1.1985        .23658        .23534E-03   -.86649    
  19  Prefactor     .62307        .18618        .26035E-03   -1.0662    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.94022e-10
Minuit parameter uncertainties:
  1  18.3177
  2  1.12359e-05
  3  20.8085
  4  8.25855e-06
  5  0.000209811
  6  1.98554e-06
  7  18.5421
  8  1.66678
  9  7.5465
  10  2.53461
  11  6.47061
  12  8.12391
  13  0.748716
  14  1.05187e-07
  15  1.29496
  16  6.5798e-06
  17  4.2431e-07
  18  0.236796
  19  0.186368
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  3.023e+00  2.535e+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:  6.231e-01  1.864e-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.198e+00  2.368e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 4.07
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 3.65e-08 +/- 3.06e-08
Energy Flux (Fixed Index): 1.25e-05 +/- 1.05e-05

Performing a free index iterative likelihood fit...

Freezing all point sources, except source of interest...

Done.

Freeing candidate source...
Done.

Fit tolerance = 1

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5282.56213505
delta logL = 0.220621325846

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5282.55833128
delta logL = 0.224425099434

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    3.1661       1.0000         .10000E-03   10000.    
     2 'Index     '    1.8915       1.0000          .0000       10.000    
     3 'Normalizat'    1.2153       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .61514       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=   5282.558     FROM MIGRAD    STATUS=CONVERGED     92 CALLS      242 TOTAL
                     EDM=   .17E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     3.1661        2.8672        .11047E-03    .26694E-03
   2  Index         1.8914        .67333        .91372E-02   -.75869E-04
   3  Normalizat    1.2153        .22191        .23400E-03    .54949E-04
   4  Prefactor     .61516        .18270        .26215E-03    .39551E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 3.16608
  Index      = 1.89142
  Normalizat = 1.21527
  Prefactor  = 0.61516
 **********
 **   18 **HESSE 
 **********

 FCN=   5282.558     FROM HESSE     STATUS=OK            25 CALLS      267 TOTAL
                     EDM=   .22E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     3.1661        2.8842        .44190E-05   -1.5352    
   2  Index         1.8914        .67733        .18274E-02   -.67093    
   3  Normalizat    1.2153        .22209        .93599E-05   -.86132    
   4  Prefactor     .61516        .18285        .10486E-04   -1.0695    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.2346e-11
Minuit parameter uncertainties:
  1  2.88429
  2  0.680757
  3  0.222259
  4  0.183024
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/64371': 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) = 5282.55833126
delta logL = 0.22442511818

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  3.166e+00  2.884e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  1.891e+00  6.808e-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:  6.152e-01  1.830e-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.215e+00  2.223e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 4.52
Ra Dec: 160.150 6.285
Photon Index (Free Index): 1.89 +/- 0.68
Photon Flux (Free Index): 2.10e-08 +/- 2.72e-08
Energy Flux (Free Index): 1.93e-05 +/- 2.47e-05

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/64371/cmap_HighResolution_361411201_361670401_4FGL_J1040.5+0617_daily_bin471.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='3.65e-08', energy_flux2='1.93e-05', photon_flux_error='3.06e-08', dlogl='2.24e-01', energy_flux='1.25e-05', photon_flux2='2.10e-08', job_status='DONE', time_completed='2021-09-02 08:27:02.415825', photon_index_error2='0.68', photon_index2='1.89', ts='4.07', fit_tolerance='1e-08', GAL='0.62', photon_index_error='0.00', energy_flux_error2='2.47e-05', EG='1.20', time_epoch_completed='1630596422.42', return_code='0', job_id='64371', GAL2='0.62', EG2='1.22', return_code2='0', energy_flux_error='1.05e-05', photon_flux_error2='2.72e-08', ts2='4.52', photon_index='2.37' WHERE bin_id='471' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:27:02 PDT 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0015>
Subject: Job 64371: <4FGL_J1040.5+0617_daily_bin471> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin471> was submitted from host <rhel6-64p> by user <kocevski> in cluster <slac> at Thu Sep  2 08:16:27 2021
Job was executed on host(s) <bullet0015>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:18:14 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:18:14 2021
Terminated at Thu Sep  2 08:27:03 2021
Results reported at Thu Sep  2 08:27:03 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin471 160.15 6.2848 361411201 361670401 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 :                                   508.29 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             328.42 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   530 sec.
    Turnaround time :                            636 sec.

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

