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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin620
RA = 160.15, Dec = 6.2848
tmin = 400032001, tmax = 400291201
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='65529', job_status='RUN', time_executed='2021-09-02 08:25:46.293404', time_epoch_executed='1630596346.29' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='620'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/65529

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/65529/ft1_4FGL_J1040.5+0617_daily_bin620.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/65529/ft2_4FGL_J1040.5+0617_daily_bin620.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/65529/ft1_4FGL_J1040.5+0617_daily_bin620.fits outfile=/scratch/kocevski/65529/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin620.fits ra=160.15 dec=6.2848 rad=12.0 tmin=400032001.0 tmax=400291201.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 4.56
user 4.16
sys 0.22

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/65529/ft1_filtered_4FGL_J1040.5+0617_daily_bin620.fits" evtable="EVENTS" scfile=/scratch/kocevski/65529/ft2_4FGL_J1040.5+0617_daily_bin620.fits sctable="SC_DATA" outfile=/scratch/kocevski/65529/ltcube_400032001_400291201_4FGL_J1040.5+0617_daily_bin620.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/65529/ft2_4FGL_J1040.5+0617_daily_bin620.fits
.....................!
real 13.69
user 13.31
sys 0.32

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/65529/ft1_filtered_4FGL_J1040.5+0617_daily_bin620.fits evtable="EVENTS" scfile=/scratch/kocevski/65529/ft2_4FGL_J1040.5+0617_daily_bin620.fits sctable="SC_DATA" expcube=/scratch/kocevski/65529/ltcube_400032001_400291201_4FGL_J1040.5+0617_daily_bin620.fits outfile=/scratch/kocevski/65529/expmap_400032001_400291201_4FGL_J1040.5+0617_daily_bin620.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/65529/ltcube_400032001_400291201_4FGL_J1040.5+0617_daily_bin620.fits
.....................!
real 191.04
user 185.71
sys 4.69

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/65529/ft1_filtered_4FGL_J1040.5+0617_daily_bin620.fits scfile=/scratch/kocevski/65529/ft2_4FGL_J1040.5+0617_daily_bin620.fits outfile=/scratch/kocevski/65529/cmap_400032001_400291201_4FGL_J1040.5+0617_daily_bin620.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.13

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/65529/ft1_filtered_4FGL_J1040.5+0617_daily_bin620.fits scfile=/scratch/kocevski/65529/ft2_4FGL_J1040.5+0617_daily_bin620.fits outfile=/scratch/kocevski/65529/cmap_HighResolution_400032001_400291201_4FGL_J1040.5+0617_daily_bin620.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/65529/ft1_filtered_4FGL_J1040.5+0617_daily_bin620.fits evtable="EVENTS" scfile=/scratch/kocevski/65529/ft2_4FGL_J1040.5+0617_daily_bin620.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/65529/Model_4FGL_J1040.5+0617_daily_bin620.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/65529/ft1_filtered_4FGL_J1040.5+0617_daily_bin620.fits.....................!
real 68.04
user 66.47
sys 1.30

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    16.889       1.0000         .10000E-03   10000.    
     3 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    68.216       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10021E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    18.853       1.0000         .10000E-03   10000.    
     8 'norm      '    1.6935       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .78758E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .96208       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10007E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    39.593       1.0000         .10000E-03   10000.    
    13 'norm      '    .67902       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .13006E-02   1.0000         .10000E-03   10000.    
    15 'norm      '    1.6965       1.0000         .10000E-03   10000.    
    16 'Prefactor '    24.408       1.0000         .10000E-03   10000.    
    17 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.2070       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.2288       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=   7061.079     FROM MIGRAD    STATUS=CONVERGED    386 CALLS     1884 TOTAL
                     EDM=   .18E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.9%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    3.6125       -.25313E-07** at limit **
   2  Prefactor     16.901        38.090        .96863E-06    .61266E-04
   3  norm          .10000E-03    4.7856       -.45718E-07** at limit **
   4  Prefactor     .10000E-03    5.1624       -.18089E-06** at limit **
   5  Prefactor     68.206        50.936       -.70193E-06   -.14713E-03
   6  Prefactor     .10000E-03    34.276       -.11329E-06** at limit **
   7  Prefactor     18.851        15.946       -.33605E-07   -.36075E-04
   8  norm          1.6942        1.3494       -.26099E-08   -.84482E-03
   9  Prefactor     .10008E-03    8.2986        .33491E-05** at limit **
  10  Prefactor     .96317        3.6910        .17093E-05    .14446E-03
  11  Prefactor     .10000E-03    8.5636       -.19209E-06** at limit **
  12  Prefactor     39.574        15.471        .31249E-08    .18995E-03
  13  norm          .67715        .60651        .51767E-06    .39997E-02
  14  Prefactor     .10001E-03    7.9689       -.19358E-05** at limit **
  15  norm          1.6967        1.3712       -.18838E-07   -.36738E-04
  16  Prefactor     24.393        32.704       -.44751E-06   -.14923E-03
  17  norm          .10000E-03    7.6902        .31416E-06** at limit **
  18  Normalizat    1.2070        .21664        .70944E-06   -.18792E-03
  19  Prefactor     1.2289        .17789       -.89086E-06   -.11473E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 16.9011
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 68.2057
  Prefactor  = 0.0001
  Prefactor  = 18.8508
  norm       = 1.69423
  Prefactor  = 0.000100082
  Prefactor  = 0.963168
  Prefactor  = 0.0001
  Prefactor  = 39.574
  norm       = 0.67715
  Prefactor  = 0.000100011
  norm       = 1.69672
  Prefactor  = 24.3933
  norm       = 0.0001
  Normalizat = 1.20703
  Prefactor  = 1.2289
 **********
 **   18 **HESSE 
 **********

 FCN=   7061.079     FROM HESSE     STATUS=OK           270 CALLS     2154 TOTAL
                     EDM=   .65E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    3.6213        .15597E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     16.901        38.157        .97457E-04   -1.4886    
   3  norm          .10000E-03    4.7892        .17953E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    5.2025        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     68.206        51.051        .48597E-04   -1.4054    
   6  Prefactor     .10000E-03    34.303        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     18.851        15.931        .92243E-04   -1.4839    
   8  norm          1.6942        1.3472        .83142E-04   -1.5448    
   9  Prefactor     .10008E-03    16.932        .37530E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .96317        3.5524        .28196E-03   -1.5512    
  11  Prefactor     .10000E-03    8.7092        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     39.574        14.853        .63702E-04   -1.4449    
  13  norm          .67715        .62650        .62009E-03   -1.5543    
  14  Prefactor     .10001E-03    43.289        .40535E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          1.6967        1.3697        .84438E-04   -1.5447    
  16  Prefactor     24.393        32.880        .81081E-04   -1.4720    
  17  norm          .10000E-03    7.7373        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    1.2070        .25503        .29978E-03   -.86386    
  19  Prefactor     1.2289        .21145        .25427E-03   -.85447    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.49383e-09
Minuit parameter uncertainties:
  1  1.91337e-06
  2  38.2126
  3  5.52711e-06
  4  1.81933e-05
  5  51.084
  6  2.62715e-05
  7  15.9346
  8  1.3472
  9  0.00235808
  10  3.55314
  11  7.28817e-05
  12  14.854
  13  0.626505
  14  0.00140566
  15  1.36972
  16  32.9046
  17  8.06467e-05
  18  0.255298
  19  0.211599
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  9.632e-01  3.553e+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.229e+00  2.116e-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.207e+00  2.553e-01  1.000e-02  1.000e+01 ( 1.000e+00)


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

Saving results to:
/scratch/kocevski/65529/likelihoodResults_400032001_400291201_4FGL_J1040.5+0617_daily_bin620.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) = 7061.04836969
delta logL = 0.0302809595823

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 7061.04782595
delta logL = 0.0308246921031

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .95091       1.0000         .10000E-03   10000.    
     2 'Index     '    2.7517       1.0000          .0000       10.000    
     3 'Normalizat'    1.1985       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.2325       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=   7061.048     FROM MIGRAD    STATUS=CONVERGED    101 CALLS      262 TOTAL
                     EDM=   .71E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .94501        3.1796        .20881E-03   -.22649E-04
   2  Index         2.7536        1.6491        .85808E-02    .69153E-04
   3  Normalizat    1.1985        .24854        .30064E-03   -.14672E-04
   4  Prefactor     1.2326        .21047        .25392E-03   -.10163E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.945009
  Index      = 2.75357
  Normalizat = 1.1985
  Prefactor  = 1.23258
 **********
 **   18 **HESSE 
 **********

 FCN=   7061.048     FROM HESSE     STATUS=OK            25 CALLS      287 TOTAL
                     EDM=   .81E-12    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .94501        3.0079        .83523E-05   -1.5514    
   2  Index         2.7536        1.5635        .17162E-02   -.46597    
   3  Normalizat    1.1985        .24883        .12026E-04   -.86649    
   4  Prefactor     1.2326        .21059        .10157E-04   -.85334    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 8.0813e-13
Minuit parameter uncertainties:
  1  3.00838
  2  1.59733
  3  0.249072
  4  0.210738
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/65529': 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) = 7061.04782395
delta logL = 0.0308266977909

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  9.450e-01  3.008e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.754e+00  1.597e+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:  1.233e+00  2.107e-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.198e+00  2.491e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.09
Ra Dec: 160.150 6.285

Creating a high resolution counts map...
INFO: Auto-setting vmin to -2.500e-04 [aplpy.core]
INFO: Auto-setting vmax to  2.775e-03 [aplpy.core]
Saving /scratch/kocevski/65529/cmap_HighResolution_400032001_400291201_4FGL_J1040.5+0617_daily_bin620.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='9.02e-03', job_status='DONE', photon_flux_upper_limit='1.17e-07', time_completed='2021-09-02 08:36:06.203035', job_id='65529', GAL2='1.23', fit_tolerance='1e-08', EG2='1.20', EG='1.21', time_epoch_completed='1630596966.2', return_code2='0', ts='0.09', comment='SUCCESS', return_code='0', GAL='1.23', dlogl='3.08e-02', ts2='0.15', photon_index_error='0.00', photon_index='2.37' WHERE bin_id='620' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:36:06 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0006>
Subject: Job 65529: <4FGL_J1040.5+0617_daily_bin620> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin620> was submitted from host <rhel6-64k> by user <kocevski> in cluster <slac> at Thu Sep  2 08:21:07 2021
Job was executed on host(s) <bullet0006>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:23: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:23:10 2021
Terminated at Thu Sep  2 08:36:06 2021
Results reported at Thu Sep  2 08:36:06 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin620 160.15 6.2848 400032001 400291201 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 :                                   617.00 sec.
    Max Memory :                                 1093 MB
    Average Memory :                             288.36 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   777 sec.
    Turnaround time :                            899 sec.

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

