/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 104 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 = 7670
number of fields = 22
No RA_SUN column yet. Adding RA_SUN/DEC_SUN columns.
Done.


Performing analysis on: 4FGL_J1040.5+0617_daily_bin101
RA = 160.15, Dec = 6.2848
tmin = 265507201, tmax = 265766401
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='58393', job_status='RUN', time_executed='2021-09-02 08:04:44.804570', time_epoch_executed='1630595084.8' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='101'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/58393

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

Retrieving the FT1 file...

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

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

Retrieving 48 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/58393/ft1_4FGL_J1040.5+0617_daily_bin101.fits


Retrieving the FT1 file...

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

Retrieving 48 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/58393/ft2_4FGL_J1040.5+0617_daily_bin101.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/58393/ft1_4FGL_J1040.5+0617_daily_bin101.fits outfile=/scratch/kocevski/58393/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin101.fits ra=160.15 dec=6.2848 rad=12.0 tmin=265507201.0 tmax=265766401.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 1.63
user 1.38
sys 0.16

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/58393/ft1_filtered_4FGL_J1040.5+0617_daily_bin101.fits" evtable="EVENTS" scfile=/scratch/kocevski/58393/ft2_4FGL_J1040.5+0617_daily_bin101.fits sctable="SC_DATA" outfile=/scratch/kocevski/58393/ltcube_265507201_265766401_4FGL_J1040.5+0617_daily_bin101.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/58393/ft2_4FGL_J1040.5+0617_daily_bin101.fits
.....................!
real 18.93
user 18.48
sys 0.30

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/58393/ft1_filtered_4FGL_J1040.5+0617_daily_bin101.fits evtable="EVENTS" scfile=/scratch/kocevski/58393/ft2_4FGL_J1040.5+0617_daily_bin101.fits sctable="SC_DATA" expcube=/scratch/kocevski/58393/ltcube_265507201_265766401_4FGL_J1040.5+0617_daily_bin101.fits outfile=/scratch/kocevski/58393/expmap_265507201_265766401_4FGL_J1040.5+0617_daily_bin101.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/58393/ltcube_265507201_265766401_4FGL_J1040.5+0617_daily_bin101.fits
.....................!
real 190.86
user 186.47
sys 3.84

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/58393/ft1_filtered_4FGL_J1040.5+0617_daily_bin101.fits scfile=/scratch/kocevski/58393/ft2_4FGL_J1040.5+0617_daily_bin101.fits outfile=/scratch/kocevski/58393/cmap_265507201_265766401_4FGL_J1040.5+0617_daily_bin101.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.39
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/58393/ft1_filtered_4FGL_J1040.5+0617_daily_bin101.fits scfile=/scratch/kocevski/58393/ft2_4FGL_J1040.5+0617_daily_bin101.fits outfile=/scratch/kocevski/58393/cmap_HighResolution_265507201_265766401_4FGL_J1040.5+0617_daily_bin101.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.40
sys 0.14

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10057E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    41.844       1.0000         .10000E-03   10000.    
     3 'norm      '    .10872E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    10.696       1.0000         .10000E-03   10000.    
     5 'Prefactor '    56.385       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .12115E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10312E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    1.0948       1.0000         .10000E-03   10000.    
     9 'Prefactor '    2.3524       1.0000         .10000E-03   10000.    
    10 'Prefactor '    4.8419       1.0000         .10000E-03   10000.    
    11 'Prefactor '    1.0534       1.0000         .10000E-03   10000.    
    12 'Prefactor '    4.3663       1.0000         .10000E-03   10000.    
    13 'norm      '    2.7882       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    .19968       1.0000         .10000E-03   10000.    
    16 'Prefactor '    33.921       1.0000         .10000E-03   10000.    
    17 'norm      '    .10004E-03   1.0000         .10000E-03   10000.    
    18 'Normalizat'    .67283       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.2765       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=   9232.855     FROM MIGRAD    STATUS=CONVERGED    387 CALLS     1917 TOTAL
                     EDM=   .89E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.0%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    3.4603        .18727E-05** at limit **
   2  Prefactor     41.842        33.251       -.18681E-05    .69463E-06
   3  norm          .10000E-03    11.369        .76957E-06** at limit **
   4  Prefactor     10.697        9.0702       -.33288E-05   -.80748E-04
   5  Prefactor     56.388        49.412        .31018E-05   -.24298E-04
   6  Prefactor     .10000E-03    53.598       -.26632E-06** at limit **
   7  Prefactor     .10000E-03    9.6453       -.21719E-06** at limit **
   8  norm          1.0949        .81856        .38179E-07    .18230E-03
   9  Prefactor     2.3515        .68162       -.41883E-06   -.20048E-02
  10  Prefactor     4.8423        2.9628        .28793E-06   -.50020E-04
  11  Prefactor     1.0528        4.4832        .65423E-05   -.11693E-03
  12  Prefactor     4.3673        7.6633       -.60254E-06   -.48257E-04
  13  norm          2.7882        .60014        .24098E-07   -.86590E-04
  14  Prefactor     .10000E-03    3.0572        .27300E-06** at limit **
  15  norm          .20026        .67453       -.39300E-06   -.37313E-03
  16  Prefactor     33.925        18.397        .78665E-06    .34920E-04
  17  norm          .10000E-03    3.3959       -.22969E-05** at limit **
  18  Normalizat    .67265        .16120       -.15621E-05   -.66456E-04
  19  Prefactor     1.2767        .13298        .45694E-06   -.20229E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 41.8416
  norm       = 0.0001
  Prefactor  = 10.6974
  Prefactor  = 56.388
  Prefactor  = 0.000100002
  Prefactor  = 0.0001
  norm       = 1.09492
  Prefactor  = 2.35153
  Prefactor  = 4.84226
  Prefactor  = 1.05277
  Prefactor  = 4.36726
  norm       = 2.78821
  Prefactor  = 0.0001
  norm       = 0.200261
  Prefactor  = 33.9249
  norm       = 0.0001
  Normalizat = 0.672648
  Prefactor  = 1.27669
 **********
 **   18 **HESSE 
 **********

 FCN=   9232.855     FROM HESSE     STATUS=OK           272 CALLS     2189 TOTAL
                     EDM=   .37E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    3.4789        .17481E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     41.842        33.241        .61971E-04   -1.4413    
   3  norm          .10000E-03    11.483        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     10.697        9.0530        .12251E-03   -1.5054    
   5  Prefactor     56.388        49.545        .53422E-04   -1.4205    
   6  Prefactor     .10000E-03    53.690        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    9.6790        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          1.0949        .80236        .72605E-04   -1.5499    
   9  Prefactor     2.3515        5.0340        .13363E-02   -1.5401    
  10  Prefactor     4.8423        2.9482        .11766E-03   -1.5268    
  11  Prefactor     1.0528        4.5417        .38287E-03   -1.5503    
  12  Prefactor     4.3673        7.6129        .19276E-03   -1.5290    
  13  norm          2.7882        .59868        .32587E-04   -1.5374    
  14  Prefactor     .10000E-03    3.0667        .16387E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          .20026        .95198        .13475E-02   -1.5618    
  16  Prefactor     33.925        18.396        .68803E-04   -1.4542    
  17  norm          .10000E-03    3.4047        .17270E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    .67265        .18445        .31692E-03   -1.0498    
  19  Prefactor     1.2767        .15435        .21361E-03   -.84003    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.70012e-08
Minuit parameter uncertainties:
  1  1.4012e-05
  2  33.2553
  3  0.000127362
  4  9.05417
  5  49.5808
  6  0.000594508
  7  9.0245e-05
  8  0.80237
  9  5.0349
  10  2.94827
  11  4.37361
  12  7.61456
  13  0.598683
  14  1.902e-06
  15  0.873063
  16  18.3989
  17  3.16159e-06
  18  0.184617
  19  0.154402
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  4.842e+00  2.948e+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:  1.277e+00  1.544e-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:  6.726e-01  1.846e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 4.69
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 5.85e-08 +/- 3.56e-08
Energy Flux (Fixed Index): 2.00e-05 +/- 1.22e-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) = 9231.82568901
delta logL = 1.02899752129

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 9231.82316086
delta logL = 1.03152566767

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   9231.823     FROM MIGRAD    STATUS=CONVERGED     55 CALLS      243 TOTAL
                     EDM=   .11E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     2.3365        15.959        .67075E-03    .27850E-02
   2  Index         3.1894        2.6091        .12624        .19833E-03
   3  Normalizat    .61495        .63739E-01    .74544E-01    .53239E-04
   4  Prefactor     1.3099        .51314E-01    .47773E-01    .32775E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 2.33649
  Index      = 3.18939
  Normalizat = 0.614946
  Prefactor  = 1.30989
 **********
 **   18 **HESSE 
 **********

 FCN=   9231.823     FROM HESSE     STATUS=OK            33 CALLS      276 TOTAL
                     EDM=   .21E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     2.3365        3.1494        .13415E-03   -1.5402    
   2  Index         3.1894        .84756        .47371E-02   -.37054    
   3  Normalizat    .61495        .17617        .33001E-03   -1.0735    
   4  Prefactor     1.3099        .15558        .21118E-03   -.83013    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.13252e-08
Minuit parameter uncertainties:
  1  3.14962
  2  0.852306
  3  0.17633
  4  0.155634
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/58393': 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) = 9231.82315934
delta logL = 1.0315271932

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  2.336e+00  3.150e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  3.189e+00  8.523e-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.310e+00  1.556e-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:  6.149e-01  1.763e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 7.00
Ra Dec: 160.150 6.285
Photon Index (Free Index): 3.19 +/- 0.85
Photon Flux (Free Index): 1.04e-07 +/- 5.22e-08
Energy Flux (Free Index): 1.91e-05 +/- 9.34e-06

Creating a high resolution counts map...
INFO: Auto-setting vmin to -1.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  1.110e+00 [aplpy.core]
Saving /scratch/kocevski/58393/cmap_HighResolution_265507201_265766401_4FGL_J1040.5+0617_daily_bin101.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='5.85e-08', energy_flux2='1.91e-05', photon_flux_error='3.56e-08', dlogl='1.03e+00', energy_flux='2.00e-05', photon_flux2='1.04e-07', job_status='DONE', time_completed='2021-09-02 08:15:30.858278', photon_index_error2='0.85', photon_index2='3.19', ts='4.69', fit_tolerance='1e-08', GAL='1.28', photon_index_error='0.00', energy_flux_error2='9.34e-06', EG='0.67', time_epoch_completed='1630595730.86', return_code='0', job_id='58393', GAL2='1.31', EG2='0.61', return_code2='0', energy_flux_error='1.22e-05', photon_flux_error2='5.22e-08', ts2='7.00', photon_index='2.37' WHERE bin_id='101' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:15:30 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0289>
Subject: Job 58393: <4FGL_J1040.5+0617_daily_bin101> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin101> was submitted from host <rhel6-64h> by user <kocevski> in cluster <slac> at Thu Sep  2 08:02:40 2021
Job was executed on host(s) <bullet0289>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:02:52 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:02:52 2021
Terminated at Thu Sep  2 08:15:31 2021
Results reported at Thu Sep  2 08:15:31 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin101 160.15 6.2848 265507201 265766401 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 :                                   642.38 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             321.08 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   759 sec.
    Turnaround time :                            771 sec.

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

