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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin1099
RA = 160.15, Dec = 6.2848
tmin = 524188801, tmax = 524448001
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='68020', job_status='RUN', time_executed='2021-09-02 08:33:14.243388', time_epoch_executed='1630596794.24' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='1099'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/68020

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/68020/ft1_4FGL_J1040.5+0617_daily_bin1099.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/68020/ft2_4FGL_J1040.5+0617_daily_bin1099.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/68020/ft1_4FGL_J1040.5+0617_daily_bin1099.fits outfile=/scratch/kocevski/68020/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin1099.fits ra=160.15 dec=6.2848 rad=12.0 tmin=524188801.0 tmax=524448001.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.59
user 3.19
sys 0.24

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/68020/ft1_filtered_4FGL_J1040.5+0617_daily_bin1099.fits evtable="EVENTS" scfile=/scratch/kocevski/68020/ft2_4FGL_J1040.5+0617_daily_bin1099.fits sctable="SC_DATA" expcube=/scratch/kocevski/68020/ltcube_524188801_524448001_4FGL_J1040.5+0617_daily_bin1099.fits outfile=/scratch/kocevski/68020/expmap_524188801_524448001_4FGL_J1040.5+0617_daily_bin1099.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/68020/ltcube_524188801_524448001_4FGL_J1040.5+0617_daily_bin1099.fits
.....................!
real 193.21
user 188.38
sys 4.10

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/68020/ft1_filtered_4FGL_J1040.5+0617_daily_bin1099.fits scfile=/scratch/kocevski/68020/ft2_4FGL_J1040.5+0617_daily_bin1099.fits outfile=/scratch/kocevski/68020/cmap_524188801_524448001_4FGL_J1040.5+0617_daily_bin1099.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.55
user 0.39
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/68020/ft1_filtered_4FGL_J1040.5+0617_daily_bin1099.fits scfile=/scratch/kocevski/68020/ft2_4FGL_J1040.5+0617_daily_bin1099.fits outfile=/scratch/kocevski/68020/cmap_HighResolution_524188801_524448001_4FGL_J1040.5+0617_daily_bin1099.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/68020/ft1_filtered_4FGL_J1040.5+0617_daily_bin1099.fits evtable="EVENTS" scfile=/scratch/kocevski/68020/ft2_4FGL_J1040.5+0617_daily_bin1099.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/68020/Model_4FGL_J1040.5+0617_daily_bin1099.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/68020/ft1_filtered_4FGL_J1040.5+0617_daily_bin1099.fits.....................!
real 58.37
user 56.86
sys 1.22

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    2.7278       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10014E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    .10083E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10205E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    196.78       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .11844E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10335E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    2.4564       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    4.8539       1.0000         .10000E-03   10000.    
    11 'Prefactor '    11.999       1.0000         .10000E-03   10000.    
    12 'Prefactor '    7.9814       1.0000         .10000E-03   10000.    
    13 'norm      '    .58128       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10006E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    .13487       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10147E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.2433       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.1065       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=   6002.571     FROM MIGRAD    STATUS=CONVERGED    384 CALLS     1877 TOTAL
                     EDM=   .42E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  4.3%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     2.7290        6.4493        .20318E-06   -.80986E-04
   2  Prefactor     .10001E-03    27.482        .49072E-05** at limit **
   3  norm          .10000E-03    5.2398       -.12753E-06** at limit **
   4  Prefactor     .10000E-03    4.8099       -.48957E-06** at limit **
   5  Prefactor     196.79        82.331        .72656E-06    .87449E-04
   6  Prefactor     .10000E-03    43.837       -.23990E-05** at limit **
   7  Prefactor     .10000E-03    11.741        .15406E-06** at limit **
   8  norm          2.4564        1.6507        .54295E-07   -.64795E-04
   9  Prefactor     .10000E-03    2.4706        .38246E-07** at limit **
  10  Prefactor     4.8566        5.2508       -.28014E-06   -.11483E-03
  11  Prefactor     12.001        7.7877        .25688E-07   -.47318E-04
  12  Prefactor     7.9807        10.686        .26421E-05   -.38136E-03
  13  norm          .58135        .52441       -.38324E-07   -.37403E-03
  14  Prefactor     .10000E-03    6.5179       -.12124E-06** at limit **
  15  norm          .13488        .95749        .88919E-06   -.46257E-03
  16  Prefactor     .10000E-03    24.313       -.29185E-05** at limit **
  17  norm          .10000E-03    4.8454        .63008E-06** at limit **
  18  Normalizat    1.2427        .21845       -.94624E-06   -.44748E-05
  19  Prefactor     1.1069        .17648       -.14286E-06   -.39307E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 2.72904
  Prefactor  = 0.00010001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 196.786
  Prefactor  = 0.000100003
  Prefactor  = 0.0001
  norm       = 2.45639
  Prefactor  = 0.0001
  Prefactor  = 4.85662
  Prefactor  = 12.0013
  Prefactor  = 7.98069
  norm       = 0.581354
  Prefactor  = 0.0001
  norm       = 0.134879
  Prefactor  = 0.000100003
  norm       = 0.0001
  Normalizat = 1.24275
  Prefactor  = 1.10685
 **********
 **   18 **HESSE 
 **********

 FCN=   6002.571     FROM HESSE     STATUS=OK           268 CALLS     2145 TOTAL
                     EDM=   .93E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     2.7290        6.4331        .24656E-03   -1.5378    
   2  Prefactor     .10001E-03    30.026        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .10000E-03    5.2437        .17324E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    4.8504        .16647E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     196.79        82.869        .28800E-04   -1.2893    
   6  Prefactor     .10000E-03    44.586        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    11.761        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          2.4564        1.6448        .78218E-04   -1.5394    
   9  Prefactor     .10000E-03    2.4779        .11892E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     4.8566        5.2447        .16565E-03   -1.5267    
  11  Prefactor     12.001        7.8169        .11565E-03   -1.5015    
  12  Prefactor     7.9807        10.982        .70962E-03   -1.5143    
  13  norm          .58135        .49361        .50716E-03   -1.5555    
  14  Prefactor     .10000E-03    6.5749        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          .13488        .97853        .14844E-03   -1.5635    
  16  Prefactor     .10000E-03    25.258        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .10000E-03    4.8959        .16728E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    1.2427        .25978        .28228E-03   -.85292    
  19  Prefactor     1.1069        .20993        .25142E-03   -.89248    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 9.29682e-10
Minuit parameter uncertainties:
  1  6.43472
  2  0.00111157
  3  1.49519e-05
  4  4.97908e-05
  5  82.9182
  6  0.000708604
  7  1.26071e-05
  8  1.64481
  9  2.38918e-06
  10  5.24524
  11  7.81761
  12  10.9846
  13  0.493613
  14  1.04711e-05
  15  0.726339
  16  0.000585398
  17  5.81441e-05
  18  0.260047
  19  0.210091
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  4.857e+00  5.245e+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.107e+00  2.101e-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.243e+00  2.600e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 1.13
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 5.87e-08 +/- 6.33e-08
Energy Flux (Fixed Index): 2.01e-05 +/- 2.17e-05

TS (Fixed Index): 1.13
Ra Dec: 160.150 6.285
Photon Flux Upper Limit: 1.81e-07 ph cm-2 s-1
Energy Flux Upper Limit: 1.39e-02 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/68020/likelihoodResults_524188801_524448001_4FGL_J1040.5+0617_daily_bin1099.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) = 6000.43965811
delta logL = 2.13146030073

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 6000.38655547
delta logL = 2.18456294267

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .12827       1.0000         .10000E-03   10000.    
     2 'Index     '    5.1272       1.0000          .0000       10.000    
     3 'Normalizat'    1.0716       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.2145       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=   6000.387     FROM MIGRAD    STATUS=CONVERGED     58 CALLS      289 TOTAL
                     EDM=   .23E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .12653        .85267        .28998E-02    .18563E-02
   2  Index         5.1347        2.3448        .83709E-01    .16745E-03
   3  Normalizat    1.0712        .70767E-01    .67787E-01    .10754E-04
   4  Prefactor     1.2148        .60114E-01    .54621E-01    .22972E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.126531
  Index      = 5.13468
  Normalizat = 1.07115
  Prefactor  = 1.21476
 **********
 **   18 **HESSE 
 **********

 FCN=   6000.387     FROM HESSE     STATUS=NOT POSDEF    33 CALLS      322 TOTAL
                     EDM=   .22E-06    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .12653        1.4760        .12980E-04   -1.5637    
   2  Index         5.1347        3.2347        .34308E-02    .26939E-01
   3  Normalizat    1.0712        .22987        .29990E-03   -.90683    
   4  Prefactor     1.2148        .19120        .24150E-03   -.85878    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 2.24491e-07
Minuit parameter uncertainties:
  1  0.864006
  2  3.51803
  3  0.230088
  4  0.191307
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/68020': 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): 102
logL (Free Index) = 6000.38654837
delta logL = 2.18457003849

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.265e-01  8.640e-01  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  5.135e+00  3.518e+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.215e+00  1.913e-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.071e+00  2.301e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 6.12
Ra Dec: 160.150 6.285
Photon Index (Free Index): 5.13 +/- 3.52
Photon Flux (Free Index): 1.99e-07 +/- 9.90e-08
Energy Flux (Free Index): 2.61e-05 +/- 1.57e-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/68020/cmap_HighResolution_524188801_524448001_4FGL_J1040.5+0617_daily_bin1099.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.39e-02', comment='SUCCESS', photon_flux='5.87e-08', energy_flux2='2.61e-05', photon_flux_error='6.33e-08', dlogl='2.18e+00', energy_flux='2.01e-05', photon_flux2='1.99e-07', job_status='DONE', time_completed='2021-09-02 08:42:58.603666', photon_index_error2='3.52', photon_index2='5.13', ts='1.13', fit_tolerance='1e-08', GAL='1.11', photon_index_error='0.00', photon_flux_upper_limit='1.81e-07', energy_flux_error2='1.57e-05', EG='1.24', time_epoch_completed='1630597378.6', return_code='0', job_id='68020', GAL2='1.21', EG2='1.07', return_code2='102', energy_flux_error='2.17e-05', photon_flux_error2='9.90e-08', ts2='6.12', photon_index='2.37' WHERE bin_id='1099' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:42:58 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0112>
Subject: Job 68020: <4FGL_J1040.5+0617_daily_bin1099> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin1099> was submitted from host <rhel6-64j> by user <kocevski> in cluster <slac> at Thu Sep  2 08:31:31 2021
Job was executed on host(s) <bullet0112>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:32:59 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:32:59 2021
Terminated at Thu Sep  2 08:42:58 2021
Results reported at Thu Sep  2 08:42:58 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin1099 160.15 6.2848 524188801 524448001 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 :                                   573.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             351.80 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   599 sec.
    Turnaround time :                            687 sec.

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

