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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin1239
RA = 160.15, Dec = 6.2848
tmin = 560476801, tmax = 560736001
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='69194', job_status='RUN', time_executed='2021-09-02 08:36:58.268569', time_epoch_executed='1630597018.27' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='1239'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/69194

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/69194/ft1_4FGL_J1040.5+0617_daily_bin1239.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/69194/ft2_4FGL_J1040.5+0617_daily_bin1239.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/69194/ft1_4FGL_J1040.5+0617_daily_bin1239.fits outfile=/scratch/kocevski/69194/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin1239.fits ra=160.15 dec=6.2848 rad=12.0 tmin=560476801.0 tmax=560736001.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.85
user 3.55
sys 0.25

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/69194/ft1_filtered_4FGL_J1040.5+0617_daily_bin1239.fits evtable="EVENTS" scfile=/scratch/kocevski/69194/ft2_4FGL_J1040.5+0617_daily_bin1239.fits sctable="SC_DATA" expcube=/scratch/kocevski/69194/ltcube_560476801_560736001_4FGL_J1040.5+0617_daily_bin1239.fits outfile=/scratch/kocevski/69194/expmap_560476801_560736001_4FGL_J1040.5+0617_daily_bin1239.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/69194/ltcube_560476801_560736001_4FGL_J1040.5+0617_daily_bin1239.fits
.....................!
real 194.29
user 188.51
sys 4.88

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/69194/ft1_filtered_4FGL_J1040.5+0617_daily_bin1239.fits scfile=/scratch/kocevski/69194/ft2_4FGL_J1040.5+0617_daily_bin1239.fits outfile=/scratch/kocevski/69194/cmap_560476801_560736001_4FGL_J1040.5+0617_daily_bin1239.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.40
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/69194/ft1_filtered_4FGL_J1040.5+0617_daily_bin1239.fits scfile=/scratch/kocevski/69194/ft2_4FGL_J1040.5+0617_daily_bin1239.fits outfile=/scratch/kocevski/69194/cmap_HighResolution_560476801_560736001_4FGL_J1040.5+0617_daily_bin1239.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.60
user 0.41
sys 0.16

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10326E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    .10903E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    6.1886       1.0000         .10000E-03   10000.    
     5 'Prefactor '    73.862       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    3.5878       1.0000         .10000E-03   10000.    
     8 'norm      '    3.2255       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10987E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    3.1373       1.0000         .10000E-03   10000.    
    11 'Prefactor '    31.757       1.0000         .10000E-03   10000.    
    12 'Prefactor '    15.608       1.0000         .10000E-03   10000.    
    13 'norm      '    .10130E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    3.0960       1.0000         .10000E-03   10000.    
    15 'norm      '    .10023E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    8.6724       1.0000         .10000E-03   10000.    
    17 'norm      '    15.555       1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.6160       1.0000         .10000E-01   10.000    
    19 'Prefactor '    .94094       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=   6581.260     FROM MIGRAD    STATUS=CONVERGED    383 CALLS     1912 TOTAL
                     EDM=   .43E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.2%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    11.034        .93692E-06** at limit **
   2  Prefactor     .10000E-03    13.039       -.35536E-06** at limit **
   3  norm          .10000E-03    11.691        .31272E-06** at limit **
   4  Prefactor     6.1891        8.5953       -.19464E-05   -.96300E-04
   5  Prefactor     73.879        62.800        .59197E-07    .77007E-04
   6  Prefactor     .10000E-03    32.230       -.40383E-06** at limit **
   7  Prefactor     3.5880        14.876        .12722E-04   -.35843E-04
   8  norm          3.2253        1.4712       -.38246E-07   -.61329E-04
   9  Prefactor     .10000E-03    7.5972        .38975E-06** at limit **
  10  Prefactor     3.1384        2.9064       -.35314E-07    .23640E-04
  11  Prefactor     31.774        14.992        .19094E-06    .16619E-03
  12  Prefactor     15.619        11.651       -.12861E-07    .54354E-04
  13  norm          .10000E-03    .31519       -.10988E-06** at limit **
  14  Prefactor     3.1027        10.410        .13738E-05    .76344E-04
  15  norm          .10000E-03    .87257       -.24670E-06** at limit **
  16  Prefactor     8.6226        30.329       -.86704E-05   -.22880E-03
  17  norm          15.561        17.892        .40331E-06    .65797E-04
  18  Normalizat    1.6148        .24419        .18360E-05   -.57080E-04
  19  Prefactor     .94178        .18678       -.18310E-05    .10728E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 6.18907
  Prefactor  = 73.8787
  Prefactor  = 0.0001
  Prefactor  = 3.588
  norm       = 3.22534
  Prefactor  = 0.0001
  Prefactor  = 3.13837
  Prefactor  = 31.7739
  Prefactor  = 15.6192
  norm       = 0.0001
  Prefactor  = 3.10274
  norm       = 0.0001
  Prefactor  = 8.62265
  norm       = 15.5613
  Normalizat = 1.61481
  Prefactor  = 0.941783
 **********
 **   18 **HESSE 
 **********

 FCN=   6581.260     FROM HESSE     STATUS=OK           270 CALLS     2182 TOTAL
                     EDM=   .87E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    11.123        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    13.054        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .10000E-03    11.735        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     6.1891        8.5886        .16137E-03   -1.5210    
   5  Prefactor     73.879        63.201        .46716E-04   -1.3987    
   6  Prefactor     .10000E-03    32.284        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     3.5880        15.225        .10667E-02   -1.5329    
   8  norm          3.2253        1.4712        .63746E-04   -1.5349    
   9  Prefactor     .10000E-03    7.8656        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     3.1384        2.9041        .12733E-03   -1.5354    
  11  Prefactor     31.774        15.163        .71103E-04   -1.4580    
  12  Prefactor     15.619        11.648        .10138E-03   -1.4917    
  13  norm          .10000E-03    2.5361        .79136E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     3.1027        9.4778        .23048E-03   -1.5356    
  15  norm          .10000E-03    .88424        .73862E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     8.6226        31.591        .13612E-03   -1.5121    
  17  norm          15.561        17.906        .10155E-03   -1.4919    
  18  Normalizat    1.6148        .29379        .27738E-03   -.74601    
  19  Prefactor     .94178        .22227        .28287E-03   -.94696    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 8.67545e-10
Minuit parameter uncertainties:
  1  3.57253e-05
  2  4.99777e-05
  3  2.75125e-05
  4  8.59026
  5  63.2587
  6  0.000225828
  7  14.7884
  8  1.47117
  9  8.5263e-06
  10  2.90421
  11  15.1644
  12  11.6498
  13  1.48257e-05
  14  9.48234
  15  2.85954e-06
  16  31.6526
  17  17.9118
  18  0.2941
  19  0.222483
Done.

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

Extracting fit parameters...

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

GAL_V02
   Spectrum: PowerLaw
533    Prefactor:  9.418e-01  2.225e-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.615e+00  2.941e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 3.63
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 3.79e-08 +/- 3.51e-08
Energy Flux (Fixed Index): 1.30e-05 +/- 1.20e-05

TS (Fixed Index): 3.63
Ra Dec: 160.150 6.285
Photon Flux Upper Limit: 1.30e-07 ph cm-2 s-1
Energy Flux Upper Limit: 1.00e-02 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/69194/likelihoodResults_560476801_560736001_4FGL_J1040.5+0617_daily_bin1239.txt

Performing a free index iterative likelihood fit...

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

Done.

Freeing candidate source...
Done.

Fit tolerance = 1

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6580.5934256
delta logL = 0.666529787955

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6580.56724696
delta logL = 0.692708427971

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    2.4207       1.0000         .10000E-03   10000.    
     2 'Index     '    1.5234       1.0000          .0000       10.000    
     3 'Normalizat'    1.6414       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .93096       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=   6580.567     FROM MIGRAD    STATUS=CONVERGED     52 CALLS      205 TOTAL
                     EDM=   .74E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     2.4160        2.3772        .65768E-02    .55635E-03
   2  Index         1.5216        .42844        .25581       -.18445E-03
   3  Normalizat    1.6416        .22741        .62317E-01   -.23369E-03
   4  Prefactor     .93085        .18450        .45398E-01   -.37269E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 2.41602
  Index      = 1.52155
  Normalizat = 1.64155
  Prefactor  = 0.93085
 **********
 **   18 **HESSE 
 **********

 FCN=   6580.567     FROM HESSE     STATUS=OK            29 CALLS      234 TOTAL
                     EDM=   .64E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     2.4160        3.0558        .12082E-03   -1.5397    
   2  Index         1.5216        .65570        .94449E-02   -.76938    
   3  Normalizat    1.6416        .26951        .27560E-03   -.73875    
   4  Prefactor     .93085        .21870        .28437E-03   -.95071    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.39515e-10
Minuit parameter uncertainties:
  1  3.056
  2  0.659402
  3  0.269749
  4  0.218911
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/69194': 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) = 6580.56724283
delta logL = 0.692712554442

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  2.416e+00  3.056e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  1.522e+00  6.594e-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:  9.309e-01  2.189e-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.642e+00  2.697e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 5.02
Ra Dec: 160.150 6.285
Photon Index (Free Index): 1.52 +/- 0.66
Photon Flux (Free Index): 1.20e-08 +/- 1.75e-08
Energy Flux (Free Index): 3.53e-05 +/- 5.31e-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/69194/cmap_HighResolution_560476801_560736001_4FGL_J1040.5+0617_daily_bin1239.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.00e-02', comment='SUCCESS', photon_flux='3.79e-08', energy_flux2='3.53e-05', photon_flux_error='3.51e-08', dlogl='6.93e-01', energy_flux='1.30e-05', photon_flux2='1.20e-08', job_status='DONE', time_completed='2021-09-02 08:47:11.484345', photon_index_error2='0.66', photon_index2='1.52', ts='3.63', fit_tolerance='1e-08', GAL='0.94', photon_index_error='0.00', photon_flux_upper_limit='1.30e-07', energy_flux_error2='5.31e-05', EG='1.61', time_epoch_completed='1630597631.48', return_code='0', job_id='69194', GAL2='0.93', EG2='1.64', return_code2='0', energy_flux_error='1.20e-05', photon_flux_error2='1.75e-08', ts2='5.02', photon_index='2.37' WHERE bin_id='1239' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:47:11 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0218>
Subject: Job 69194: <4FGL_J1040.5+0617_daily_bin1239> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin1239> was submitted from host <rhel6-64d> by user <kocevski> in cluster <slac> at Thu Sep  2 08:36:35 2021
Job was executed on host(s) <bullet0218>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:36:42 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:36:42 2021
Terminated at Thu Sep  2 08:47:11 2021
Results reported at Thu Sep  2 08:47:11 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin1239 160.15 6.2848 560476801 560736001 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 :                                   605.61 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             381.17 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   629 sec.
    Turnaround time :                            636 sec.

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

