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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin806
RA = 160.15, Dec = 6.2848
tmin = 448243201, tmax = 448502401
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='66708', job_status='RUN', time_executed='2021-09-02 08:30:02.850381', time_epoch_executed='1630596602.85' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='806'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/66708

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/66708/ft1_4FGL_J1040.5+0617_daily_bin806.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/66708/ft2_4FGL_J1040.5+0617_daily_bin806.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/66708/ft1_4FGL_J1040.5+0617_daily_bin806.fits outfile=/scratch/kocevski/66708/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin806.fits ra=160.15 dec=6.2848 rad=12.0 tmin=448243201.0 tmax=448502401.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 5.29
user 5.02
sys 0.24

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/66708/ft1_filtered_4FGL_J1040.5+0617_daily_bin806.fits evtable="EVENTS" scfile=/scratch/kocevski/66708/ft2_4FGL_J1040.5+0617_daily_bin806.fits sctable="SC_DATA" expcube=/scratch/kocevski/66708/ltcube_448243201_448502401_4FGL_J1040.5+0617_daily_bin806.fits outfile=/scratch/kocevski/66708/expmap_448243201_448502401_4FGL_J1040.5+0617_daily_bin806.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/66708/ltcube_448243201_448502401_4FGL_J1040.5+0617_daily_bin806.fits
.....................!
real 193.07
user 187.37
sys 4.30

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/66708/ft1_filtered_4FGL_J1040.5+0617_daily_bin806.fits scfile=/scratch/kocevski/66708/ft2_4FGL_J1040.5+0617_daily_bin806.fits outfile=/scratch/kocevski/66708/cmap_448243201_448502401_4FGL_J1040.5+0617_daily_bin806.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.58
user 0.40
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/66708/ft1_filtered_4FGL_J1040.5+0617_daily_bin806.fits scfile=/scratch/kocevski/66708/ft2_4FGL_J1040.5+0617_daily_bin806.fits outfile=/scratch/kocevski/66708/cmap_HighResolution_448243201_448502401_4FGL_J1040.5+0617_daily_bin806.fits algorithm="CMAP" ebinalg="LOG" emin=30.0 emax=200000.0 ebinfile=NONE tbinalg="LIN" tbinfile=NONE nxpix=500 nypix=500 binsz=0.1 coordsys="CEL" xref=160.15 yref=6.2848 axisrot=0.0 rafield="RA" decfield="DEC" proj="AIT" hpx_ordering_scheme="RING" hpx_order=3 hpx_ebin=yes hpx_region="" evtable="EVENTS" sctable="SC_DATA" efield="ENERGY" tfield="TIME" chatter=2 clobber=yes debug=no gui=no mode="ql"

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

This is gtbin version HEAD
real 0.57
user 0.42
sys 0.14

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .12788E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    20.328       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .15294E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10133E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .22891E-02   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .14763E-02   1.0000         .10000E-03   10000.    
     8 'norm      '    3.4982       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10018E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    9.7028       1.0000         .10000E-03   10000.    
    11 'Prefactor '    14.951       1.0000         .10000E-03   10000.    
    12 'Prefactor '    6.8961       1.0000         .10000E-03   10000.    
    13 'norm      '    2.5309       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    9.8307       1.0000         .10000E-03   10000.    
    16 'Prefactor '    12.626       1.0000         .10000E-03   10000.    
    17 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    18 'Normalizat'    .32942       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.6064       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=   4966.078     FROM MIGRAD    STATUS=CONVERGED    384 CALLS     1650 TOTAL
                     EDM=   .63E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .4%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    16.307       -.17532E-04** at limit **
   2  Prefactor     .10000E-03    15.862        .83306E-05** at limit **
   3  norm          20.309        20.184       -.18772E-05    .18809E-03
   4  Prefactor     .10000E-03    15.706        .76681E-05** at limit **
   5  Prefactor     .10000E-03    61.827        .19446E-04** at limit **
   6  Prefactor     .10000E-03    106.51       -.96521E-04** at limit **
   7  Prefactor     .10044E-03    13.442        .49733E-05** at limit **
   8  norm          3.4988        1.9364       -.92682E-07   -.12928E-03
   9  Prefactor     .10000E-03    6.7102       -.10116E-06** at limit **
  10  Prefactor     9.7041        4.9018        .83470E-06   -.72852E-04
  11  Prefactor     14.956        9.8043        .24690E-06   -.23713E-04
  12  Prefactor     6.8975        7.9642       -.67829E-06   -.63199E-04
  13  norm          2.5309        .86332        .46840E-08    .58687E-04
  14  Prefactor     .10000E-03    5.5542        .10731E-06** at limit **
  15  norm          9.8314        2.4328       -.48135E-07    .77178E-04
  16  Prefactor     12.629        20.297        .37822E-06   -.53422E-05
  17  norm          .10000E-03    3.2611        .54783E-06** at limit **
  18  Normalizat    .32901        .27550       -.31653E-05   -.32011E-04
  19  Prefactor     1.6067        .23889        .15008E-05    .89075E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 20.3091
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.000100443
  norm       = 3.49882
  Prefactor  = 0.0001
  Prefactor  = 9.70414
  Prefactor  = 14.9558
  Prefactor  = 6.89745
  norm       = 2.53089
  Prefactor  = 0.0001
  norm       = 9.83135
  Prefactor  = 12.6295
  norm       = 0.0001
  Normalizat = 0.329009
  Prefactor  = 1.60671
 **********
 **   18 **HESSE 
 **********

 FCN=   4966.078     FROM HESSE     STATUS=OK           268 CALLS     1918 TOTAL
                     EDM=   .60E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    16.369        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    15.872        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          20.309        19.913        .88835E-04   -1.4806    
   4  Prefactor     .10000E-03    15.900        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    62.062        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    107.01        .20104E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10044E-03    72.549        .49081E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          3.4988        1.9306        .69485E-04   -1.5334    
   9  Prefactor     .10000E-03    6.7890        .17815E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     9.7041        4.8775        .10374E-03   -1.5085    
  11  Prefactor     14.956        9.7125        .10358E-03   -1.4934    
  12  Prefactor     6.8975        7.9407        .15278E-03   -1.5183    
  13  norm          2.5309        .86025        .36259E-04   -1.5390    
  14  Prefactor     .10000E-03    5.5734        .16207E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          9.8314        2.4258        .51983E-04   -1.5081    
  16  Prefactor     12.629        20.258        .11273E-03   -1.4997    
  17  norm          .10000E-03    3.2620        .12429E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    .32901        .26769        .48162E-03   -1.2115    
  19  Prefactor     1.6067        .23982        .21222E-03   -.74593    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.03085e-09
Minuit parameter uncertainties:
  1  0.000164175
  2  1.30587e-06
  3  19.9197
  4  5.94919e-05
  5  0.00012004
  6  0.000102672
  7  0.0113473
  8  1.93068
  9  3.24998e-06
  10  4.8777
  11  9.71349
  12  7.94194
  13  0.860251
  14  1.13312e-06
  15  2.4258
  16  20.2695
  17  2.46477e-07
  18  0.268735
  19  0.239995
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  9.704e+00  4.878e+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.607e+00  2.400e-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:  3.290e-01  2.687e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 8.90
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 1.17e-07 +/- 5.89e-08
Energy Flux (Fixed Index): 4.01e-05 +/- 2.02e-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) = 4966.07514101
delta logL = 0.00249765879471

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 4966.07338591
delta logL = 0.00425275828638

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    10.049       1.0000         .10000E-03   10000.    
     2 'Index     '    2.3283       1.0000          .0000       10.000    
     3 'Normalizat'    .33281       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.6041       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=   4966.073     FROM MIGRAD    STATUS=CONVERGED     47 CALLS      206 TOTAL
                     EDM=   .73E-10    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     10.049        104.17        .31600E-02    .58203E-03
   2  Index         2.3283        3.4464        .12297        .12592E-03
   3  Normalizat    .33280        .14286        .10814        .65868E-04
   4  Prefactor     1.6041        .12027        .48045E-01   -.19645E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 10.0493
  Index      = 2.32827
  Normalizat = 0.332803
  Prefactor  = 1.60407
 **********
 **   18 **HESSE 
 **********

 FCN=   4966.073     FROM HESSE     STATUS=OK            33 CALLS      239 TOTAL
                     EDM=   .67E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     10.049        6.3648        .10602E-03   -1.5074    
   2  Index         2.3283        .43818        .49186E-02   -.56373    
   3  Normalizat    .33280        .26118        .47897E-03   -1.2093    
   4  Prefactor     1.6041        .23902        .21236E-03   -.74665    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.69548e-11
Minuit parameter uncertainties:
  1  6.36528
  2  0.438971
  3  0.262142
  4  0.239192
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/66708': 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) = 4966.07338591
delta logL = 0.00425275962789

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.005e+01  6.365e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.328e+00  4.390e-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.604e+00  2.392e-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:  3.328e-01  2.621e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 8.85
Ra Dec: 160.150 6.285
Photon Index (Free Index): 2.33 +/- 0.44
Photon Flux (Free Index): 1.15e-07 +/- 6.29e-08
Energy Flux (Free Index): 4.16e-05 +/- 2.74e-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/66708/cmap_HighResolution_448243201_448502401_4FGL_J1040.5+0617_daily_bin806.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='1.17e-07', energy_flux2='4.16e-05', photon_flux_error='5.89e-08', dlogl='4.25e-03', energy_flux='4.01e-05', photon_flux2='1.15e-07', job_status='DONE', time_completed='2021-09-02 08:38:20.051790', photon_index_error2='0.44', photon_index2='2.33', ts='8.90', fit_tolerance='1e-08', GAL='1.61', photon_index_error='0.00', energy_flux_error2='2.74e-05', EG='0.33', time_epoch_completed='1630597100.05', return_code='0', job_id='66708', GAL2='1.60', EG2='0.33', return_code2='0', energy_flux_error='2.02e-05', photon_flux_error2='6.29e-08', ts2='8.85', photon_index='2.37' WHERE bin_id='806' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:38:20 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0187>
Subject: Job 66708: <4FGL_J1040.5+0617_daily_bin806> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin806> was submitted from host <rhel6-64l> by user <kocevski> in cluster <slac> at Thu Sep  2 08:26:06 2021
Job was executed on host(s) <bullet0187>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:26:10 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:26:10 2021
Terminated at Thu Sep  2 08:38:20 2021
Results reported at Thu Sep  2 08:38:20 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin806 160.15 6.2848 448243201 448502401 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 :                                   493.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             247.04 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   730 sec.
    Turnaround time :                            734 sec.

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

