/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 108 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 = 7476
number of fields = 22
No RA_SUN column yet. Adding RA_SUN/DEC_SUN columns.
Done.


Performing analysis on: 4FGL_J1040.5+0617_daily_bin100
RA = 160.15, Dec = 6.2848
tmin = 265248001, tmax = 265507201
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='58391', job_status='RUN', time_executed='2021-09-02 08:04:53.748092', time_epoch_executed='1630595093.75' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='100'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/58391

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/58391/ft1_4FGL_J1040.5+0617_daily_bin100.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/58391/ft2_4FGL_J1040.5+0617_daily_bin100.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/58391/ft1_4FGL_J1040.5+0617_daily_bin100.fits outfile=/scratch/kocevski/58391/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin100.fits ra=160.15 dec=6.2848 rad=12.0 tmin=265248001.0 tmax=265507201.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 2.04
user 1.81
sys 0.18

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/58391/ft1_filtered_4FGL_J1040.5+0617_daily_bin100.fits evtable="EVENTS" scfile=/scratch/kocevski/58391/ft2_4FGL_J1040.5+0617_daily_bin100.fits sctable="SC_DATA" expcube=/scratch/kocevski/58391/ltcube_265248001_265507201_4FGL_J1040.5+0617_daily_bin100.fits outfile=/scratch/kocevski/58391/expmap_265248001_265507201_4FGL_J1040.5+0617_daily_bin100.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/58391/ltcube_265248001_265507201_4FGL_J1040.5+0617_daily_bin100.fits
.....................!
real 193.12
user 188.37
sys 4.23

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/58391/ft1_filtered_4FGL_J1040.5+0617_daily_bin100.fits scfile=/scratch/kocevski/58391/ft2_4FGL_J1040.5+0617_daily_bin100.fits outfile=/scratch/kocevski/58391/cmap_265248001_265507201_4FGL_J1040.5+0617_daily_bin100.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.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/58391/ft1_filtered_4FGL_J1040.5+0617_daily_bin100.fits scfile=/scratch/kocevski/58391/ft2_4FGL_J1040.5+0617_daily_bin100.fits outfile=/scratch/kocevski/58391/cmap_HighResolution_265248001_265507201_4FGL_J1040.5+0617_daily_bin100.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.16

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    2.5933       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    .36439E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    9.8977       1.0000         .10000E-03   10000.    
     5 'Prefactor '    145.47       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .35399       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .50669E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    .40700       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10009E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    7.1087       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .26236E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    12.971       1.0000         .10000E-03   10000.    
    13 'norm      '    2.9198       1.0000         .10000E-03   10000.    
    14 'Prefactor '    4.1260       1.0000         .10000E-03   10000.    
    15 'norm      '    .10007E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    16.786       1.0000         .10000E-03   10000.    
    17 'norm      '    .10003E-03   1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.4569       1.0000         .10000E-01   10.000    
    19 'Prefactor '    .84319       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=   10711.70     FROM MIGRAD    STATUS=CONVERGED    691 CALLS     2552 TOTAL
                     EDM=   .66E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     2.5851        7.4048        .25337E-03    .50855E-03
   2  Prefactor     .10000E-03    9.1272        .18142E-02** at limit **
   3  norm          .10012E-03    41.523        .48533E-02** at limit **
   4  Prefactor     9.9100        11.007        .12737E-03   -.83902E-04
   5  Prefactor     145.41        59.945        .16704E-03    .26684E-03
   6  Prefactor     .32221        54.168        .16233        .14706E-03
   7  Prefactor     .10004E-03    46.080        .57648E-02** at limit **
   8  norm          .40667        .97806        .14991E-03   -.33506E-03
   9  Prefactor     .10000E-03    2.6708        .16362E-02** at limit **
  10  Prefactor     7.1091        3.4586        .12411E-03   -.34809E-04
  11  Prefactor     .10002E-03    8.0230        .27676E-02** at limit **
  12  Prefactor     12.971        7.7417        .11122E-03    .51518E-04
  13  norm          2.9191        .87803        .37606E-04   -.23520E-03
  14  Prefactor     4.1299        11.812        .19845E-03   -.61871E-05
  15  norm          .10000E-03    .34913        .11709E-03** at limit **
  16  Prefactor     16.785        12.032        .97756E-04   -.19305E-04
  17  norm          .10000E-03    2.0699        .14533E-02** at limit **
  18  Normalizat    1.4571        .19437        .25718E-03    .71437E-04
  19  Prefactor     .84326        .15824        .27690E-03    .58466E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 2.58509
  Prefactor  = 0.0001
  norm       = 0.000100119
  Prefactor  = 9.90996
  Prefactor  = 145.414
  Prefactor  = 0.322205
  Prefactor  = 0.000100044
  norm       = 0.406671
  Prefactor  = 0.0001
  Prefactor  = 7.10911
  Prefactor  = 0.000100016
  Prefactor  = 12.9706
  norm       = 2.91915
  Prefactor  = 4.12992
  norm       = 0.0001
  Prefactor  = 16.7848
  norm       = 0.0001
  Normalizat = 1.4571
  Prefactor  = 0.843256
 **********
 **   18 **HESSE 
 **********

 FCN=   10711.70     FROM HESSE     STATUS=OK           258 CALLS     2810 TOTAL
                     EDM=   .68E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     2.5851        7.3726        .10135E-04   -1.5386    
   2  Prefactor     .10000E-03    9.1274        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .10012E-03    42.289        .19413E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     9.9100        11.014        .50948E-05   -1.5078    
   5  Prefactor     145.41        59.937        .33408E-04   -1.3290    
   6  Prefactor     .32221        54.480        .16159       -1.5594    
   7  Prefactor     .10004E-03    46.689        .11530E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .40667        .97788        .59962E-05   -1.5580    
   9  Prefactor     .10000E-03    2.6724        .32725E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     7.1091        3.4585        .49644E-05   -1.5175    
  11  Prefactor     .10002E-03    8.0744        .55353E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     12.971        7.7410        .44488E-05   -1.4988    
  13  norm          2.9191        .87710        .15042E-05   -1.5366    
  14  Prefactor     4.1299        11.798        .79380E-05   -1.5301    
  15  norm          .10000E-03    .34913        .23418E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     16.785        12.031        .39102E-05   -1.4888    
  17  norm          .10000E-03    2.0700        .29065E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    1.4571        .19455        .10287E-04   -.78991    
  19  Prefactor     .84326        .15840        .11076E-04   -.98153    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.81711e-09
Minuit parameter uncertainties:
  1  7.37523
  2  1.44415e-05
  3  0.00448284
  4  11.0164
  5  59.9621
  6  8.38589
  7  0.0028731
  8  0.977923
  9  2.2147e-05
  10  3.45858
  11  0.000709265
  12  7.74155
  13  0.877103
  14  11.8046
  15  9.92886e-08
  16  12.0332
  17  3.82656e-07
  18  0.194652
  19  0.158491
Done.

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

Extracting fit parameters...

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

GAL_V02
   Spectrum: PowerLaw
533    Prefactor:  8.433e-01  1.585e-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.457e+00  1.947e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 6.58
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 8.59e-08 +/- 4.18e-08
Energy Flux (Fixed Index): 2.94e-05 +/- 1.43e-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) = 10710.6487451
delta logL = 1.04632031961

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 10710.6472923
delta logL = 1.04777309741

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    4.0079       1.0000         .10000E-03   10000.    
     2 'Index     '    2.9736       1.0000          .0000       10.000    
     3 'Normalizat'    1.4087       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .87246       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5360E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
 MACHINE ACCURACY LIMITS FURTHER IMPROVEMENT.

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   10710.65     FROM MIGRAD    STATUS=CONVERGED     91 CALLS      283 TOTAL
                     EDM=   .16E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     4.0079        3.8513        .40102E-03   -.54130E-03
   2  Index         2.9737        .58340        .46366E-02    .89904E-03
   3  Normalizat    1.4087        .19096        .26048E-03   -.54121E-05
   4  Prefactor     .87247        .15967        .27269E-03    .16676E-06
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 4.00786
  Index      = 2.97369
  Normalizat = 1.40872
  Prefactor  = 0.872465
 **********
 **   18 **HESSE 
 **********

 FCN=   10710.65     FROM HESSE     STATUS=OK            25 CALLS      308 TOTAL
                     EDM=   .15E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     4.0079        3.1937        .16041E-04   -1.5308    
   2  Index         2.9737        .48388        .92731E-03   -.41726    
   3  Normalizat    1.4087        .19093        .10419E-04   -.80377    
   4  Prefactor     .87247        .15944        .10908E-04   -.97110    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.52523e-10
Minuit parameter uncertainties:
  1  3.1938
  2  0.484786
  3  0.191026
  4  0.159527
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/58391': 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) = 10710.6472923
delta logL = 1.04777311777

Extracting fit parameters...

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

GAL_V02
   Spectrum: PowerLaw
533    Prefactor:  8.725e-01  1.595e-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.409e+00  1.910e-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.97 +/- 0.48
Photon Flux (Free Index): 1.24e-07 +/- 5.33e-08
Energy Flux (Free Index): 2.51e-05 +/- 1.09e-05

Creating a high resolution counts map...
INFO: Auto-setting vmin to -1.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  1.110e+00 [aplpy.core]
Saving /scratch/kocevski/58391/cmap_HighResolution_265248001_265507201_4FGL_J1040.5+0617_daily_bin100.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='8.59e-08', energy_flux2='2.51e-05', photon_flux_error='4.18e-08', dlogl='1.05e+00', energy_flux='2.94e-05', photon_flux2='1.24e-07', job_status='DONE', time_completed='2021-09-02 08:18:12.879809', photon_index_error2='0.48', photon_index2='2.97', ts='6.58', fit_tolerance='1e-08', GAL='0.84', photon_index_error='0.00', energy_flux_error2='1.09e-05', EG='1.46', time_epoch_completed='1630595892.88', return_code='0', job_id='58391', GAL2='0.87', EG2='1.41', return_code2='0', energy_flux_error='1.43e-05', photon_flux_error2='5.33e-08', ts2='8.85', photon_index='2.37' WHERE bin_id='100' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:18:12 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0103>
Subject: Job 58391: <4FGL_J1040.5+0617_daily_bin100> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin100> was submitted from host <rhel6-64h> by user <kocevski> in cluster <slac> at Thu Sep  2 08:02:40 2021
Job was executed on host(s) <bullet0103>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:02:52 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:02:52 2021
Terminated at Thu Sep  2 08:18:13 2021
Results reported at Thu Sep  2 08:18:13 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin100 160.15 6.2848 265248001 265507201 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 :                                   796.28 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             344.68 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   921 sec.
    Turnaround time :                            933 sec.

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

