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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin617
RA = 160.15, Dec = 6.2848
tmin = 399254401, tmax = 399513601
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='65525', job_status='RUN', time_executed='2021-09-02 08:23:40.898957', time_epoch_executed='1630596220.9' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='617'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/65525

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/65525/ft1_4FGL_J1040.5+0617_daily_bin617.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/65525/ft2_4FGL_J1040.5+0617_daily_bin617.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/65525/ft1_4FGL_J1040.5+0617_daily_bin617.fits outfile=/scratch/kocevski/65525/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin617.fits ra=160.15 dec=6.2848 rad=12.0 tmin=399254401.0 tmax=399513601.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 7.36
user 5.06
sys 0.23

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/65525/ft2_4FGL_J1040.5+0617_daily_bin617.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/65525/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin617.fits evtable="EVENTS" outfile="/scratch/kocevski/65525/ft1_filtered_4FGL_J1040.5+0617_daily_bin617.fits" apply_filter=yes overwrite=yes header_obstimes=yes tstart=0.0 tstop=0.0 gtifile="default" chatter=3 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

This is gtmktime version HEAD
Applying GTI filter:
IN_SAA!=T && LIVETIME>0 && gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nogrb.gti',(START+STOP)/2) && (angsep(RA_SUN,DEC_SUN,RA_ZENITH,DEC_ZENITH)>115 || gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nosolarflares.gti',(START+STOP)/2))
real 0.50
user 0.33
sys 0.15

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/65525/ft1_filtered_4FGL_J1040.5+0617_daily_bin617.fits" evtable="EVENTS" scfile=/scratch/kocevski/65525/ft2_4FGL_J1040.5+0617_daily_bin617.fits sctable="SC_DATA" outfile=/scratch/kocevski/65525/ltcube_399254401_399513601_4FGL_J1040.5+0617_daily_bin617.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/65525/ft2_4FGL_J1040.5+0617_daily_bin617.fits
.....................!
real 13.48
user 13.14
sys 0.29

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/65525/ft1_filtered_4FGL_J1040.5+0617_daily_bin617.fits evtable="EVENTS" scfile=/scratch/kocevski/65525/ft2_4FGL_J1040.5+0617_daily_bin617.fits sctable="SC_DATA" expcube=/scratch/kocevski/65525/ltcube_399254401_399513601_4FGL_J1040.5+0617_daily_bin617.fits outfile=/scratch/kocevski/65525/expmap_399254401_399513601_4FGL_J1040.5+0617_daily_bin617.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/65525/ltcube_399254401_399513601_4FGL_J1040.5+0617_daily_bin617.fits
.....................!
real 189.99
user 185.54
sys 3.92

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/65525/ft1_filtered_4FGL_J1040.5+0617_daily_bin617.fits scfile=/scratch/kocevski/65525/ft2_4FGL_J1040.5+0617_daily_bin617.fits outfile=/scratch/kocevski/65525/cmap_399254401_399513601_4FGL_J1040.5+0617_daily_bin617.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.39
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/65525/ft1_filtered_4FGL_J1040.5+0617_daily_bin617.fits scfile=/scratch/kocevski/65525/ft2_4FGL_J1040.5+0617_daily_bin617.fits outfile=/scratch/kocevski/65525/cmap_HighResolution_399254401_399513601_4FGL_J1040.5+0617_daily_bin617.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.39
sys 0.15

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .13255E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    13.593       1.0000         .10000E-03   10000.    
     3 'norm      '    .92640       1.0000         .10000E-03   10000.    
     4 'Prefactor '    12.065       1.0000         .10000E-03   10000.    
     5 'Prefactor '    151.80       1.0000         .10000E-03   10000.    
     6 'Prefactor '    37.535       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10406E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    .38522       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    10.398       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10034E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10013E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .10057E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    1.5283       1.0000         .10000E-03   10000.    
    15 'norm      '    1.4623       1.0000         .10000E-03   10000.    
    16 'Prefactor '    20.295       1.0000         .10000E-03   10000.    
    17 'norm      '    .10011E-03   1.0000         .10000E-03   10000.    
    18 'Normalizat'    .69495       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.3036       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=   6404.514     FROM MIGRAD    STATUS=CONVERGED    380 CALLS     1897 TOTAL
                     EDM=   .77E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  4.6%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    10.691        .74004E-06** at limit **
   2  Prefactor     13.589        28.353        .89562E-07    .32945E-04
   3  norm          .89268        18.450        .49766E-05   -.45239E-03
   4  Prefactor     12.060        16.775       -.26166E-06   -.20448E-03
   5  Prefactor     151.65        83.121       -.10397E-05   -.99167E-04
   6  Prefactor     37.648        88.858       -.36979E-06   -.83204E-04
   7  Prefactor     .10001E-03    24.709       -.46086E-05** at limit **
   8  norm          .38483        .93210       -.30259E-06   -.55952E-03
   9  Prefactor     .10000E-03    1.0758       -.26554E-07** at limit **
  10  Prefactor     10.401        4.3642        .34330E-08    .20366E-03
  11  Prefactor     .10000E-03    2.4868       -.10922E-06** at limit **
  12  Prefactor     .10000E-03    4.2872       -.44328E-07** at limit **
  13  norm          .10000E-03    .15197        .40071E-06** at limit **
  14  Prefactor     1.5233        8.0367        .87585E-06    .30280E-03
  15  norm          1.4625        1.0902       -.23168E-07    .83791E-04
  16  Prefactor     20.301        22.125        .47202E-07    .49340E-04
  17  norm          .10000E-03    4.1660       -.91014E-07** at limit **
  18  Normalizat    .69417        .19368        .23500E-06    .19032E-03
  19  Prefactor     1.3043        .16102        .85737E-06    .32252E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 13.5888
  norm       = 0.892681
  Prefactor  = 12.0603
  Prefactor  = 151.655
  Prefactor  = 37.6481
  Prefactor  = 0.000100006
  norm       = 0.384833
  Prefactor  = 0.0001
  Prefactor  = 10.4014
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 1.52334
  norm       = 1.46255
  Prefactor  = 20.3011
  norm       = 0.0001
  Normalizat = 0.69417
  Prefactor  = 1.30434
 **********
 **   18 **HESSE 
 **********

 FCN=   6404.514     FROM HESSE     STATUS=OK           274 CALLS     2171 TOTAL
                     EDM=   .30E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    10.803        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     13.589        28.317        .10864E-03   -1.4971    
   3  norm          .89268        36.487        .44086E-02   -1.5519    
   4  Prefactor     12.060        16.723        .11533E-03   -1.5013    
   5  Prefactor     151.65        82.947        .16358E-03   -1.3239    
   6  Prefactor     37.648        88.576        .65418E-04   -1.4480    
   7  Prefactor     .10001E-03    25.681        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .38483        .90319        .11502E-02   -1.5584    
   9  Prefactor     .10000E-03    1.0792        .81059E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     10.401        4.3682        .50825E-03   -1.5063    
  11  Prefactor     .10000E-03    2.4994        .12327E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    4.3336        .16175E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .10000E-03    .16707        .58762E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     1.5233        8.3726        .17267E-02   -1.5461    
  15  norm          1.4625        1.0904        .35574E-04   -1.5466    
  16  Prefactor     20.301        22.135        .88907E-04   -1.4807    
  17  norm          .10000E-03    4.1739        .15954E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    .69417        .22457        .31689E-03   -1.0412    
  19  Prefactor     1.3043        .18832        .21105E-03   -.83178    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.04534e-09
Minuit parameter uncertainties:
  1  3.05868e-05
  2  28.3451
  3  11.421
  4  16.7293
  5  83.0113
  6  88.8877
  7  0.000800609
  8  0.903226
  9  1.21119e-06
  10  4.36831
  11  8.12649e-06
  12  9.88313e-06
  13  3.9081e-06
  14  7.14395
  15  1.09039
  16  22.1443
  17  7.74789e-06
  18  0.224871
  19  0.188423
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.040e+01  4.368e+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.304e+00  1.884e-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.942e-01  2.249e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 9.90
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 1.26e-07 +/- 5.27e-08
Energy Flux (Fixed Index): 4.30e-05 +/- 1.81e-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) = 6402.96983587
delta logL = 1.54384996199

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6402.96627191
delta logL = 1.54741391512

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    4.2826       1.0000         .10000E-03   10000.    
     2 'Index     '    3.1926       1.0000          .0000       10.000    
     3 'Normalizat'    .60347       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.3629       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=   6402.966     FROM MIGRAD    STATUS=CONVERGED     57 CALLS      255 TOTAL
                     EDM=   .38E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     4.2822        20.629        .48670E-02    .23166E-03
   2  Index         3.1928        2.4175        .80325E-01    .15296E-03
   3  Normalizat    .60358        .91546E-01    .76263E-01    .35917E-04
   4  Prefactor     1.3629        .74514E-01    .46848E-01   -.48531E-06
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 4.28217
  Index      = 3.19277
  Normalizat = 0.603575
  Prefactor  = 1.3629
 **********
 **   18 **HESSE 
 **********

 FCN=   6402.966     FROM HESSE     STATUS=OK            33 CALLS      288 TOTAL
                     EDM=   .82E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     4.2822        4.7987        .56321E-04   -1.5294    
   2  Index         3.1928        .69002        .33642E-02   -.36982    
   3  Normalizat    .60358        .22239        .33765E-03   -1.0783    
   4  Prefactor     1.3629        .19316        .20708E-03   -.81455    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 8.18411e-09
Minuit parameter uncertainties:
  1  4.79915
  2  0.692562
  3  0.222718
  4  0.193258
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/65525': 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) = 6402.96627038
delta logL = 1.54741545027

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  4.282e+00  4.799e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  3.193e+00  6.926e-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.363e+00  1.933e-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.036e-01  2.227e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 13.56
Ra Dec: 160.150 6.285
Photon Index (Free Index): 3.19 +/- 0.69
Photon Flux (Free Index): 1.91e-07 +/- 7.41e-08
Energy Flux (Free Index): 3.51e-05 +/- 1.39e-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/65525/cmap_HighResolution_399254401_399513601_4FGL_J1040.5+0617_daily_bin617.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='1.26e-07', energy_flux2='3.51e-05', photon_flux_error='5.27e-08', dlogl='1.55e+00', energy_flux='4.30e-05', photon_flux2='1.91e-07', job_status='DONE', time_completed='2021-09-02 08:32:54.412118', photon_index_error2='0.69', photon_index2='3.19', ts='9.90', fit_tolerance='1e-08', GAL='1.30', photon_index_error='0.00', energy_flux_error2='1.39e-05', EG='0.69', time_epoch_completed='1630596774.41', return_code='0', job_id='65525', GAL2='1.36', EG2='0.60', return_code2='0', energy_flux_error='1.81e-05', photon_flux_error2='7.41e-08', ts2='13.56', photon_index='2.37' WHERE bin_id='617' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:32:54 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0245>
Subject: Job 65525: <4FGL_J1040.5+0617_daily_bin617> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin617 160.15 6.2848 399254401 399513601 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 :                                   547.03 sec.
    Max Memory :                                 1255 MB
    Average Memory :                             335.00 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   587 sec.
    Turnaround time :                            708 sec.

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

