/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 223 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 = 7438
number of fields = 27
No RA_SUN column yet. Adding RA_SUN/DEC_SUN columns.
Done.


Performing analysis on: 4FGL_J1040.5+0617_daily_bin375
RA = 160.15, Dec = 6.2848
tmin = 336528001, tmax = 336787201
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='64234', job_status='RUN', time_executed='2021-09-02 08:20:27.576356', time_epoch_executed='1630596027.58' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='375'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/64234

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/64234/ft1_4FGL_J1040.5+0617_daily_bin375.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/64234/ft2_4FGL_J1040.5+0617_daily_bin375.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/64234/ft1_4FGL_J1040.5+0617_daily_bin375.fits outfile=/scratch/kocevski/64234/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin375.fits ra=160.15 dec=6.2848 rad=12.0 tmin=336528001.0 tmax=336787201.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.90
user 5.54
sys 0.26

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/64234/ft1_filtered_4FGL_J1040.5+0617_daily_bin375.fits" evtable="EVENTS" scfile=/scratch/kocevski/64234/ft2_4FGL_J1040.5+0617_daily_bin375.fits sctable="SC_DATA" outfile=/scratch/kocevski/64234/ltcube_336528001_336787201_4FGL_J1040.5+0617_daily_bin375.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/64234/ft2_4FGL_J1040.5+0617_daily_bin375.fits
.....................!
real 14.71
user 14.32
sys 0.34

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/64234/ft1_filtered_4FGL_J1040.5+0617_daily_bin375.fits evtable="EVENTS" scfile=/scratch/kocevski/64234/ft2_4FGL_J1040.5+0617_daily_bin375.fits sctable="SC_DATA" expcube=/scratch/kocevski/64234/ltcube_336528001_336787201_4FGL_J1040.5+0617_daily_bin375.fits outfile=/scratch/kocevski/64234/expmap_336528001_336787201_4FGL_J1040.5+0617_daily_bin375.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/64234/ltcube_336528001_336787201_4FGL_J1040.5+0617_daily_bin375.fits
.....................!
real 192.34
user 186.70
sys 5.18

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

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

This is gtbin version HEAD
real 0.56
user 0.39
sys 0.17

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .26505       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10050E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    .10030E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10555E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10174E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    7.0013       1.0000         .10000E-03   10000.    
     8 'norm      '    .40198E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10072E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    25.770       1.0000         .10000E-03   10000.    
    11 'Prefactor '    21.786       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .69899E-02   1.0000         .10000E-03   10000.    
    13 'norm      '    1.8789       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .13090E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    .92154       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    5.5409       1.0000         .10000E-03   10000.    
    18 'Normalizat'    .99546       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.8648       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=   5003.178     FROM MIGRAD    STATUS=CONVERGED    683 CALLS     1947 TOTAL
                     EDM=   .42E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .33673        170.72        .49625E-02   -.13031E-03
   2  Prefactor     .10000E-03    37.804        .18142E-02** at limit **
   3  norm          .10000E-03    9.0514        .18142E-02** at limit **
   4  Prefactor     .10000E-03    4.1417        .14053E-02** at limit **
   5  Prefactor     .10000E-03    36.607        .18142E-02** at limit **
   6  Prefactor     .10000E-03    31.005        .18142E-02** at limit **
   7  Prefactor     6.9942        20.960        .15161E-03    .12447E-04
   8  norm          .10000E-03    13.648        .13546E-02** at limit **
   9  Prefactor     .10000E-03    4.6423        .14863E-02** at limit **
  10  Prefactor     25.761        8.0064        .78913E-04    .57237E-03
  11  Prefactor     21.789        12.408        .85815E-04    .15831E-03
  12  Prefactor     .10029E-03    105.89        .44493E-02** at limit **
  13  norm          1.8783        .94263        .46664E-04   -.11789E-02
  14  Prefactor     .10000E-03    35.096        .36285E-03** at limit **
  15  norm          .91786        1.4300        .11134E-02   -.29273E-03
  16  Prefactor     .10000E-03    10.278        .18142E-02** at limit **
  17  norm          5.5527        15.699        .17068E-03    .63411E-04
  18  Normalizat    .99497        .33900        .36929E-03    .26475E-05
  19  Prefactor     1.8651        .29130        .25560E-03    .46034E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.336731
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 6.99421
  norm       = 0.000100004
  Prefactor  = 0.0001
  Prefactor  = 25.7614
  Prefactor  = 21.7891
  Prefactor  = 0.00010029
  norm       = 1.87833
  Prefactor  = 0.0001
  norm       = 0.917865
  Prefactor  = 0.0001
  norm       = 5.55274
  Normalizat = 0.994971
  Prefactor  = 1.86505
 **********
 **   18 **HESSE 
 **********

 FCN=   5003.178     FROM HESSE     STATUS=OK           252 CALLS     2199 TOTAL
                     EDM=   .49E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .33673        174.33        .19850E-03   -1.5592    
   2  Prefactor     .10000E-03    37.805        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .10000E-03    9.0515        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    4.1417        .28106E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    36.608        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    31.005        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     6.9942        20.952        .60646E-05   -1.5179    
   8  norm          .10000E-03    13.962        .27093E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .10000E-03    4.6426        .29727E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     25.761        7.9970        .15783E-04   -1.4692    
  11  Prefactor     21.789        12.399        .34326E-05   -1.4774    
  12  Prefactor     .10029E-03    108.26        .17797E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          1.8783        .94189        .18666E-05   -1.5434    
  14  Prefactor     .10000E-03    35.097        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          .91786        1.4286        .44538E-04   -1.5516    
  16  Prefactor     .10000E-03    10.278        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          5.5527        15.694        .68272E-05   -1.5237    
  18  Normalizat    .99497        .33810        .14772E-04   -.93199    
  19  Prefactor     1.8651        .29151        .10224E-04   -.67768    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.87143e-09
Minuit parameter uncertainties:
  1  15.3662
  2  1.96088e-05
  3  1.32386e-05
  4  1.33283e-05
  5  0.000131384
  6  7.05475e-06
  7  20.9739
  8  0.000453701
  9  7.94454e-07
  10  7.99735
  11  12.4008
  12  0.0112235
  13  0.941899
  14  0.000259901
  15  1.4287
  16  3.65241e-06
  17  15.7056
  18  0.338826
  19  0.291783
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  2.576e+01  7.997e+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.865e+00  2.918e-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:  9.950e-01  3.388e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 20.21
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 3.11e-07 +/- 9.66e-08
Energy Flux (Fixed Index): 1.07e-04 +/- 3.31e-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) = 5002.9286622
delta logL = 0.249016687026

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5002.91542256
delta logL = 0.262256327658

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    20.409       1.0000         .10000E-03   10000.    
     2 'Index     '    2.5947       1.0000          .0000       10.000    
     3 'Normalizat'    .95047       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.8955       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=   5002.915     FROM MIGRAD    STATUS=CONVERGED     98 CALLS      279 TOTAL
                     EDM=   .11E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     20.424        10.586        .44330E-03   -.11951E-04
   2  Index         2.5944        .34775        .29522E-02    .40763E-03
   3  Normalizat    .95043        .32796        .37660E-03    .37433E-05
   4  Prefactor     1.8955        .29238        .25403E-03    .71159E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 20.4242
  Index      = 2.59439
  Normalizat = 0.950432
  Prefactor  = 1.89549
 **********
 **   18 **HESSE 
 **********

 FCN=   5002.915     FROM HESSE     STATUS=OK            25 CALLS      304 TOTAL
                     EDM=   .14E-12    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     20.424        10.095        .17732E-04   -1.4804    
   2  Index         2.5944        .33152        .59044E-03   -.50193    
   3  Normalizat    .95043        .32792        .15064E-04   -.94710    
   4  Prefactor     1.8955        .29228        .10161E-04   -.66989    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.4286e-13
Minuit parameter uncertainties:
  1  10.0963
  2  0.331836
  3  0.328614
  4  0.292549
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/64234': 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) = 5002.91542124
delta logL = 0.262257647351

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  2.042e+01  1.010e+01  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.594e+00  3.318e-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.895e+00  2.925e-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:  9.504e-01  3.286e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 20.79
Ra Dec: 160.150 6.285
Photon Index (Free Index): 2.59 +/- 0.33
Photon Flux (Free Index): 3.45e-07 +/- 1.12e-07
Energy Flux (Free Index): 9.10e-05 +/- 3.28e-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/64234/cmap_HighResolution_336528001_336787201_4FGL_J1040.5+0617_daily_bin375.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='3.11e-07', energy_flux2='9.10e-05', photon_flux_error='9.66e-08', dlogl='2.62e-01', energy_flux='1.07e-04', photon_flux2='3.45e-07', job_status='DONE', time_completed='2021-09-02 08:29:06.707819', photon_index_error2='0.33', photon_index2='2.59', ts='20.21', fit_tolerance='1e-08', GAL='1.87', photon_index_error='0.00', energy_flux_error2='3.28e-05', EG='0.99', time_epoch_completed='1630596546.71', return_code='0', job_id='64234', GAL2='1.90', EG2='0.95', return_code2='0', energy_flux_error='3.31e-05', photon_flux_error2='1.12e-07', ts2='20.79', photon_index='2.37' WHERE bin_id='375' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:29:06 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0152>
Subject: Job 64234: <4FGL_J1040.5+0617_daily_bin375> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin375> was submitted from host <rhel6-64p> by user <kocevski> in cluster <slac> at Thu Sep  2 08:16:15 2021
Job was executed on host(s) <bullet0152>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:16:35 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:16:35 2021
Terminated at Thu Sep  2 08:29:07 2021
Results reported at Thu Sep  2 08:29:07 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin375 160.15 6.2848 336528001 336787201 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 :                                   516.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             253.91 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   752 sec.
    Turnaround time :                            772 sec.

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

