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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin936
RA = 160.15, Dec = 6.2848
tmin = 481939201, tmax = 482198401
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='66949', job_status='RUN', time_executed='2021-09-02 08:27:53.637494', time_epoch_executed='1630596473.64' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='936'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/66949

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/66949/ft1_4FGL_J1040.5+0617_daily_bin936.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/66949/ft2_4FGL_J1040.5+0617_daily_bin936.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/66949/ft1_4FGL_J1040.5+0617_daily_bin936.fits outfile=/scratch/kocevski/66949/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin936.fits ra=160.15 dec=6.2848 rad=12.0 tmin=481939201.0 tmax=482198401.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.62
user 3.37
sys 0.20

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/66949/ft1_filtered_4FGL_J1040.5+0617_daily_bin936.fits evtable="EVENTS" scfile=/scratch/kocevski/66949/ft2_4FGL_J1040.5+0617_daily_bin936.fits sctable="SC_DATA" expcube=/scratch/kocevski/66949/ltcube_481939201_482198401_4FGL_J1040.5+0617_daily_bin936.fits outfile=/scratch/kocevski/66949/expmap_481939201_482198401_4FGL_J1040.5+0617_daily_bin936.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/66949/ltcube_481939201_482198401_4FGL_J1040.5+0617_daily_bin936.fits
.....................!
real 191.63
user 186.51
sys 4.61

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/66949/ft1_filtered_4FGL_J1040.5+0617_daily_bin936.fits scfile=/scratch/kocevski/66949/ft2_4FGL_J1040.5+0617_daily_bin936.fits outfile=/scratch/kocevski/66949/cmap_481939201_482198401_4FGL_J1040.5+0617_daily_bin936.fits algorithm="CMAP" ebinalg="LOG" emin=30.0 emax=200000.0 ebinfile=NONE tbinalg="LIN" tbinfile=NONE nxpix=160 nypix=160 binsz=0.25 coordsys="CEL" xref=160.15 yref=6.2848 axisrot=0.0 rafield="RA" decfield="DEC" proj="AIT" hpx_ordering_scheme="RING" hpx_order=3 hpx_ebin=yes hpx_region="" evtable="EVENTS" sctable="SC_DATA" efield="ENERGY" tfield="TIME" chatter=2 clobber=yes debug=no gui=no mode="ql"

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

This is gtbin version HEAD
real 0.56
user 0.39
sys 0.15

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

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10106E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    19.256       1.0000         .10000E-03   10000.    
     3 'norm      '    3.6134       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10043E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10014E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10016E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    6.2031       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    2.3545       1.0000         .10000E-03   10000.    
    11 'Prefactor '    19.448       1.0000         .10000E-03   10000.    
    12 'Prefactor '    5.8523       1.0000         .10000E-03   10000.    
    13 'norm      '    2.2566       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10006E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    1.0850       1.0000         .10000E-03   10000.    
    16 'Prefactor '    12.791       1.0000         .10000E-03   10000.    
    17 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    18 'Normalizat'    .73885       1.0000         .10000E-01   10.000    
    19 'Prefactor '    .98383       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=   6383.012     FROM MIGRAD    STATUS=CONVERGED    383 CALLS     1612 TOTAL
                     EDM=   .13E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  3.1%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    6.7082       -.19609E-06** at limit **
   2  Prefactor     19.238        27.973       -.64218E-05   -.53678E-03
   3  norm          3.6106        8.8112        .58829E-05   -.67527E-03
   4  Prefactor     .10000E-03    3.2069       -.12673E-06** at limit **
   5  Prefactor     .10000E-03    16.859       -.55405E-06** at limit **
   6  Prefactor     .10000E-03    14.743        .10779E-05** at limit **
   7  Prefactor     .10000E-03    4.8685       -.16618E-06** at limit **
   8  norm          6.2032        1.6531        .21835E-07    .39454E-04
   9  Prefactor     .10000E-03    2.9461       -.13705E-06** at limit **
  10  Prefactor     2.3548        2.9430       -.51828E-07   -.12213E-03
  11  Prefactor     19.448        8.8290       -.10722E-07   -.18800E-04
  12  Prefactor     5.8530        5.9963        .12332E-05   -.50205E-03
  13  norm          2.2567        .62959       -.34920E-07    .50323E-03
  14  Prefactor     .10000E-03    11.330       -.95313E-06** at limit **
  15  norm          1.0853        .92032        .18573E-07    .39581E-04
  16  Prefactor     12.781        17.581       -.26912E-05   -.39909E-03
  17  norm          .10000E-03    2.8701        .62341E-07** at limit **
  18  Normalizat    .73885        .17266       -.22179E-06    .36203E-04
  19  Prefactor     .98384        .14345        .26439E-06    .20938E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 19.2382
  norm       = 3.61063
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 6.20321
  Prefactor  = 0.0001
  Prefactor  = 2.35483
  Prefactor  = 19.4483
  Prefactor  = 5.85305
  norm       = 2.25673
  Prefactor  = 0.0001
  norm       = 1.08528
  Prefactor  = 12.7807
  norm       = 0.0001
  Normalizat = 0.738852
  Prefactor  = 0.983843
 **********
 **   18 **HESSE 
 **********

 FCN=   6383.012     FROM HESSE     STATUS=OK           270 CALLS     1882 TOTAL
                     EDM=   .32E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    6.7876        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     19.238        29.931        .91272E-04   -1.4830    
   3  norm          3.6106        9.3249        .10628E-02   -1.5328    
   4  Prefactor     .10000E-03    3.2277        .13975E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    16.887        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    14.787        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    4.8761        .17219E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          6.2032        1.6534        .50695E-04   -1.5210    
   9  Prefactor     .10000E-03    2.9886        .13382E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     2.3548        2.9246        .14306E-03   -1.5401    
  11  Prefactor     19.448        8.8704        .90821E-04   -1.4826    
  12  Prefactor     5.8530        6.0308        .83004E-03   -1.5224    
  13  norm          2.2567        .62687        .31604E-04   -1.5408    
  14  Prefactor     .10000E-03    11.583        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          1.0853        .89043        .68071E-03   -1.5500    
  16  Prefactor     12.781        17.950        .11200E-03   -1.4993    
  17  norm          .10000E-03    2.8732        .13219E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    .73885        .20226        .28236E-03   -1.0238    
  19  Prefactor     .98384        .16839        .21431E-03   -.93270    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.21341e-09
Minuit parameter uncertainties:
  1  3.41386e-05
  2  29.9546
  3  9.32861
  4  1.3192e-05
  5  0.000100554
  6  0.000152132
  7  1.78074e-05
  8  1.65344
  9  1.18454e-06
  10  2.92476
  11  8.87098
  12  6.03145
  13  0.626874
  14  0.000109732
  15  0.890438
  16  17.9575
  17  3.86144e-06
  18  0.20247
  19  0.168484
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  2.355e+00  2.925e+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.838e-01  1.685e-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:  7.389e-01  2.025e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.88
Ra Dec: 160.150 6.285
Photon Flux Upper Limit: 1.07e-07 ph cm-2 s-1
Energy Flux Upper Limit: 8.22e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/66949/likelihoodResults_481939201_482198401_4FGL_J1040.5+0617_daily_bin936.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) = 6382.80553279
delta logL = 0.206923208347

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6382.80458049
delta logL = 0.207875511662

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    1.5235       1.0000         .10000E-03   10000.    
     2 'Index     '    3.0076       1.0000          .0000       10.000    
     3 'Normalizat'    .71107       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .99906       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=   6382.805     FROM MIGRAD    STATUS=CONVERGED     54 CALLS      245 TOTAL
                     EDM=   .16E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     1.5230        33.726        .86512E-02    .11046E-02
   2  Index         3.0072        6.4786        .13921        .16426E-03
   3  Normalizat    .71124        .49480E-01    .64940E-01    .26682E-04
   4  Prefactor     .99900        .41923E-01    .46255E-01   -.59397E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 1.52299
  Index      = 3.00715
  Normalizat = 0.711237
  Prefactor  = 0.999002
 **********
 **   18 **HESSE 
 **********

 FCN=   6382.805     FROM HESSE     STATUS=OK            33 CALLS      278 TOTAL
                     EDM=   .11E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     1.5230        3.4387        .91445E-04   -1.5461    
   2  Index         3.0072        1.3978        .80121E-02   -.40996    
   3  Normalizat    .71124        .20009        .28732E-03   -1.0345    
   4  Prefactor     .99900        .17027        .21285E-03   -.92763    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.06484e-10
Minuit parameter uncertainties:
  1  3.43915
  2  1.42038
  3  0.200294
  4  0.170359
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/66949': 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) = 6382.80457965
delta logL = 0.207876350913

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.523e+00  3.439e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  3.007e+00  1.420e+00  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.990e-01  1.704e-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:  7.112e-01  2.003e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.33
Ra Dec: 160.150 6.285
Photon Index (Free Index): 3.01 +/- 1.42
Photon Flux (Free Index): 4.98e-08 +/- 5.18e-08
Energy Flux (Free Index): 9.91e-06 +/- 1.05e-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/66949/cmap_HighResolution_481939201_482198401_4FGL_J1040.5+0617_daily_bin936.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='8.22e-03', comment='SUCCESS', energy_flux2='9.91e-06', dlogl='2.08e-01', photon_flux2='4.98e-08', job_status='DONE', time_completed='2021-09-02 08:37:26.489489', photon_index_error2='1.42', photon_index2='3.01', ts='0.88', fit_tolerance='1e-08', GAL='0.98', photon_index_error='0.00', photon_flux_upper_limit='1.07e-07', energy_flux_error2='1.05e-05', EG='0.74', time_epoch_completed='1630597046.49', return_code='0', job_id='66949', GAL2='1.00', EG2='0.71', return_code2='0', photon_flux_error2='5.18e-08', ts2='1.33', photon_index='2.37' WHERE bin_id='936' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:37:26 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0233>
Subject: Job 66949: <4FGL_J1040.5+0617_daily_bin936> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin936 160.15 6.2848 481939201 482198401 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 :                                   570.10 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             291.14 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   639 sec.
    Turnaround time :                            650 sec.

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

