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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin1572
RA = 160.15, Dec = 6.2848
tmin = 646790401, tmax = 647049601
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='70535', job_status='RUN', time_executed='2021-09-02 08:44:26.700127', time_epoch_executed='1630597466.7' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='1572'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/70535

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/70535/ft1_4FGL_J1040.5+0617_daily_bin1572.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/70535/ft2_4FGL_J1040.5+0617_daily_bin1572.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/70535/ft1_4FGL_J1040.5+0617_daily_bin1572.fits outfile=/scratch/kocevski/70535/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin1572.fits ra=160.15 dec=6.2848 rad=12.0 tmin=646790401.0 tmax=647049601.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.59
user 3.35
sys 0.21

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/70535/ft2_4FGL_J1040.5+0617_daily_bin1572.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/70535/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin1572.fits evtable="EVENTS" outfile="/scratch/kocevski/70535/ft1_filtered_4FGL_J1040.5+0617_daily_bin1572.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.16

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/70535/ft1_filtered_4FGL_J1040.5+0617_daily_bin1572.fits" evtable="EVENTS" scfile=/scratch/kocevski/70535/ft2_4FGL_J1040.5+0617_daily_bin1572.fits sctable="SC_DATA" outfile=/scratch/kocevski/70535/ltcube_646790401_647049601_4FGL_J1040.5+0617_daily_bin1572.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/70535/ft2_4FGL_J1040.5+0617_daily_bin1572.fits
.....................!
real 13.51
user 13.13
sys 0.33

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/70535/ft1_filtered_4FGL_J1040.5+0617_daily_bin1572.fits evtable="EVENTS" scfile=/scratch/kocevski/70535/ft2_4FGL_J1040.5+0617_daily_bin1572.fits sctable="SC_DATA" expcube=/scratch/kocevski/70535/ltcube_646790401_647049601_4FGL_J1040.5+0617_daily_bin1572.fits outfile=/scratch/kocevski/70535/expmap_646790401_647049601_4FGL_J1040.5+0617_daily_bin1572.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/70535/ltcube_646790401_647049601_4FGL_J1040.5+0617_daily_bin1572.fits
.....................!
real 191.25
user 185.85
sys 5.00

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/70535/ft1_filtered_4FGL_J1040.5+0617_daily_bin1572.fits scfile=/scratch/kocevski/70535/ft2_4FGL_J1040.5+0617_daily_bin1572.fits outfile=/scratch/kocevski/70535/cmap_646790401_647049601_4FGL_J1040.5+0617_daily_bin1572.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.53
user 0.38
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/70535/ft1_filtered_4FGL_J1040.5+0617_daily_bin1572.fits scfile=/scratch/kocevski/70535/ft2_4FGL_J1040.5+0617_daily_bin1572.fits outfile=/scratch/kocevski/70535/cmap_HighResolution_646790401_647049601_4FGL_J1040.5+0617_daily_bin1572.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.54
user 0.38
sys 0.16

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    46.818       1.0000         .10000E-03   10000.    
     3 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    1.4165       1.0000         .10000E-03   10000.    
     5 'Prefactor '    22.925       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10013E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    2.2653       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    3.7551       1.0000         .10000E-03   10000.    
    11 'Prefactor '    39.611       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .17454       1.0000         .10000E-03   10000.    
    14 'Prefactor '    19.417       1.0000         .10000E-03   10000.    
    15 'norm      '    .40228       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10224E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    10.486       1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.1950       1.0000         .10000E-01   10.000    
    19 'Prefactor '    .84324       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.
 MACHINE ACCURACY LIMITS FURTHER IMPROVEMENT.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   6609.721     FROM MIGRAD    STATUS=CONVERGED    388 CALLS     1884 TOTAL
                     EDM=   .50E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    4.1791         .0000    ** at limit **
   2  Prefactor     46.817        40.796         .0000        .12573E-02
   3  norm          .10000E-03    5.1671         .0000    ** at limit **
   4  Prefactor     1.4137        8.7836         .0000        .16857E-01
   5  Prefactor     22.924        47.157         .0000        .77154E-03
   6  Prefactor     .10000E-03    23.618         .0000    ** at limit **
   7  Prefactor     .10000E-03    6.7272         .0000    ** at limit **
   8  norm          2.2654        1.3465         .0000        .32179E-03
   9  Prefactor     .10000E-03    2.0478         .0000    ** at limit **
  10  Prefactor     3.7547        2.7874         .0000        .11394E-03
  11  Prefactor     39.611        11.191         .0000       -.56951E-04
  12  Prefactor     .10000E-03    2.9149         .0000    ** at limit **
  13  norm          .17396        .73397         .0000        .28087E-02
  14  Prefactor     19.425        14.792         .0000       -.12329E-03
  15  norm          .40131        .97273         .0000        .16318E-02
  16  Prefactor     .10000E-03    29.550         .0000    ** at limit **
  17  norm          10.486        13.120         .0000        .94825E-03
  18  Normalizat    1.1952        .19647         .0000       -.10485E-04
  19  Prefactor     .84308        .15660         .0000       -.60829E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 46.8169
  norm       = 0.0001
  Prefactor  = 1.41371
  Prefactor  = 22.9237
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 2.2654
  Prefactor  = 0.0001
  Prefactor  = 3.75468
  Prefactor  = 39.6108
  Prefactor  = 0.0001
  norm       = 0.173958
  Prefactor  = 19.4252
  norm       = 0.401307
  Prefactor  = 0.0001
  norm       = 10.4865
  Normalizat = 1.19522
  Prefactor  = 0.843082
 **********
 **   18 **HESSE 
 **********

 FCN=   6609.721     FROM HESSE     STATUS=OK           270 CALLS     2154 TOTAL
                     EDM=   .12E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    4.1873        .16229E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     46.817        40.815        .58600E-04   -1.4338    
   3  norm          .10000E-03    5.1720        .18045E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     1.4137        8.6389        .18185E-02   -1.5470    
   5  Prefactor     22.924        47.140        .83658E-04   -1.4750    
   6  Prefactor     .10000E-03    23.625        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    6.7325        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          2.2654        1.3415        .69415E-04   -1.5407    
   9  Prefactor     .10000E-03    2.0810        .11359E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     3.7547        2.7890        .11224E-03   -1.5320    
  11  Prefactor     39.611        11.174        .63687E-04   -1.4448    
  12  Prefactor     .10000E-03    2.9244        .13549E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .17396        .58366        .91131E-04   -1.5625    
  14  Prefactor     19.425        12.475        .90895E-04   -1.4826    
  15  norm          .40131        .86083        .11786E-02   -1.5581    
  16  Prefactor     .10000E-03    30.046        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          10.486        13.084        .61865E-03   -1.5060    
  18  Normalizat    1.1952        .23422        .25767E-03   -.86751    
  19  Prefactor     .84308        .18569        .25141E-03   -.98159    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.19291e-08
Minuit parameter uncertainties:
  1  1.63077e-06
  2  40.8398
  3  3.3759e-06
  4  6.99066
  5  47.2169
  6  7.37604e-06
  7  9.76017e-06
  8  1.3415
  9  1.59588e-06
  10  2.7891
  11  11.1749
  12  1.03996e-07
  13  0.583675
  14  12.4763
  15  0.860861
  16  5.07956e-05
  17  13.0874
  18  0.234429
  19  0.185825
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  3.755e+00  2.789e+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:  8.431e-01  1.858e-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.195e+00  2.344e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 4.51
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 4.54e-08 +/- 3.37e-08
Energy Flux (Fixed Index): 1.55e-05 +/- 1.15e-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) = 6609.71823144
delta logL = 0.00296346505365

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6609.71770867
delta logL = 0.0034862408429

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    3.8332       1.0000         .10000E-03   10000.    
     2 'Index     '    2.3131       1.0000          .0000       10.000    
     3 'Normalizat'    1.1983       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .84147       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=   6609.718     FROM MIGRAD    STATUS=CONVERGED     87 CALLS      243 TOTAL
                     EDM=   .24E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     3.8331        3.0271        .11458E-03    .83954E-03
   2  Index         2.3131        .66223        .93156E-02    .81108E-04
   3  Normalizat    1.1983        .22396        .25738E-03   -.40946E-04
   4  Prefactor     .84148        .18528        .25162E-03   -.52275E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 3.83312
  Index      = 2.3131
  Normalizat = 1.19835
  Prefactor  = 0.841484
 **********
 **   18 **HESSE 
 **********

 FCN=   6609.718     FROM HESSE     STATUS=OK            25 CALLS      268 TOTAL
                     EDM=   .22E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     3.8331        2.9853        .45830E-05   -1.5316    
   2  Index         2.3131        .65250        .37262E-03   -.56733    
   3  Normalizat    1.1983        .22405        .10295E-04   -.86654    
   4  Prefactor     .84148        .18541        .10065E-04   -.98217    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.22165e-10
Minuit parameter uncertainties:
  1  2.98539
  2  0.655128
  3  0.224229
  4  0.185545
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/70535': 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) = 6609.71770864
delta logL = 0.00348626749201

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  3.833e+00  2.985e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.313e+00  6.551e-01  0.000e+00  1.000e+01 (-1.000e+00)
218        Scale:  8.643e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
533    Prefactor:  8.415e-01  1.855e-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.242e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 4.51
Ra Dec: 160.150 6.285
Photon Index (Free Index): 2.31 +/- 0.66
Photon Flux (Free Index): 4.29e-08 +/- 4.39e-08
Energy Flux (Free Index): 1.59e-05 +/- 1.29e-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/70535/cmap_HighResolution_646790401_647049601_4FGL_J1040.5+0617_daily_bin1572.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='4.54e-08', energy_flux2='1.59e-05', photon_flux_error='3.37e-08', dlogl='3.49e-03', energy_flux='1.55e-05', photon_flux2='4.29e-08', job_status='DONE', time_completed='2021-09-02 08:53:51.309381', photon_index_error2='0.66', photon_index2='2.31', ts='4.51', fit_tolerance='1e-08', GAL='0.84', photon_index_error='0.00', energy_flux_error2='1.29e-05', EG='1.20', time_epoch_completed='1630598031.31', return_code='0', job_id='70535', GAL2='0.84', EG2='1.20', return_code2='0', energy_flux_error='1.15e-05', photon_flux_error2='4.39e-08', ts2='4.51', photon_index='2.37' WHERE bin_id='1572' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:53:51 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0244>
Subject: Job 70535: <4FGL_J1040.5+0617_daily_bin1572> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin1572> was submitted from host <rhel6-64k> by user <kocevski> in cluster <slac> at Thu Sep  2 08:41:11 2021
Job was executed on host(s) <bullet0244>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:41:38 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:41:38 2021
Terminated at Thu Sep  2 08:53:52 2021
Results reported at Thu Sep  2 08:53:52 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin1572 160.15 6.2848 646790401 647049601 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 :                                   548.08 sec.
    Max Memory :                                 1093 MB
    Average Memory :                             293.75 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   733 sec.
    Turnaround time :                            761 sec.

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

