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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin1585
RA = 160.15, Dec = 6.2848
tmin = 650160001, tmax = 650419201
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='70551', job_status='RUN', time_executed='2021-09-02 08:44:27.224065', time_epoch_executed='1630597467.22' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='1585'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/70551

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/70551/ft1_4FGL_J1040.5+0617_daily_bin1585.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/70551/ft2_4FGL_J1040.5+0617_daily_bin1585.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/70551/ft1_4FGL_J1040.5+0617_daily_bin1585.fits outfile=/scratch/kocevski/70551/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin1585.fits ra=160.15 dec=6.2848 rad=12.0 tmin=650160001.0 tmax=650419201.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.34
user 4.09
sys 0.23

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/70551/ft1_filtered_4FGL_J1040.5+0617_daily_bin1585.fits evtable="EVENTS" scfile=/scratch/kocevski/70551/ft2_4FGL_J1040.5+0617_daily_bin1585.fits sctable="SC_DATA" expcube=/scratch/kocevski/70551/ltcube_650160001_650419201_4FGL_J1040.5+0617_daily_bin1585.fits outfile=/scratch/kocevski/70551/expmap_650160001_650419201_4FGL_J1040.5+0617_daily_bin1585.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/70551/ltcube_650160001_650419201_4FGL_J1040.5+0617_daily_bin1585.fits
.....................!
real 193.50
user 188.23
sys 4.85

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/70551/ft1_filtered_4FGL_J1040.5+0617_daily_bin1585.fits scfile=/scratch/kocevski/70551/ft2_4FGL_J1040.5+0617_daily_bin1585.fits outfile=/scratch/kocevski/70551/cmap_650160001_650419201_4FGL_J1040.5+0617_daily_bin1585.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.79
user 0.40
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/70551/ft1_filtered_4FGL_J1040.5+0617_daily_bin1585.fits scfile=/scratch/kocevski/70551/ft2_4FGL_J1040.5+0617_daily_bin1585.fits outfile=/scratch/kocevski/70551/cmap_HighResolution_650160001_650419201_4FGL_J1040.5+0617_daily_bin1585.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.63
user 0.38
sys 0.18

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10069E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10148E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    21.188       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .11989E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .12369E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .11441E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    3.9885       1.0000         .10000E-03   10000.    
     8 'norm      '    3.9981       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    9.4832       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .75869       1.0000         .10000E-03   10000.    
    13 'norm      '    .45032       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .11323E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    3.7363       1.0000         .10000E-03   10000.    
    16 'Prefactor '    5.6064       1.0000         .10000E-03   10000.    
    17 'norm      '    .58363       1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.5775       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.0495       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.

 FCN=   7366.063     FROM MIGRAD    STATUS=CONVERGED    402 CALLS     1678 TOTAL
                     EDM=   .30E-05    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    9.7156         .0000    ** at limit **
   2  Prefactor     .10000E-03    16.384         .0000    ** at limit **
   3  norm          21.198        15.571         .0000       -.74403E-04
   4  Prefactor     .10000E-03    7.7070         .0000    ** at limit **
   5  Prefactor     .10003E-03    27.296         .0000    ** at limit **
   6  Prefactor     .10000E-03    61.604         .0000    ** at limit **
   7  Prefactor     3.9451        18.436         .0000       -.16336E-03
   8  norm          3.9984        1.7863         .0000        .40144E-03
   9  Prefactor     .10000E-03    1.8494         .0000    ** at limit **
  10  Prefactor     .10000E-03    .72300         .0000    ** at limit **
  11  Prefactor     9.4823        10.391         .0000        .45790E-03
  12  Prefactor     .75934        8.4811         .0000        .41718E-01
  13  norm          .44957        .53604         .0000        .18143E-02
  14  Prefactor     .10000E-03    11.587         .0000    ** at limit **
  15  norm          3.7361        1.9690         .0000        .44882E-03
  16  Prefactor     5.6147        22.568         .0000       -.59271E-03
  17  norm          .68349        7.3011         .0000       -.13788E-03
  18  Normalizat    1.5774        .21396         .0000        .93069E-04
  19  Prefactor     1.0496        .17356         .0000        .90193E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.000100001
  norm       = 21.1982
  Prefactor  = 0.0001
  Prefactor  = 0.000100026
  Prefactor  = 0.000100001
  Prefactor  = 3.94512
  norm       = 3.99841
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 9.48226
  Prefactor  = 0.759339
  norm       = 0.449567
  Prefactor  = 0.0001
  norm       = 3.73608
  Prefactor  = 5.61469
  norm       = 0.683488
  Normalizat = 1.57736
  Prefactor  = 1.04955
 **********
 **   18 **HESSE 
 **********

 FCN=   7366.063     FROM HESSE     STATUS=OK           268 CALLS     1946 TOTAL
                     EDM=   .17E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    9.7637        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    16.396        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          21.198        15.559        .87016E-04   -1.4787    
   4  Prefactor     .10000E-03    7.7245        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10003E-03    27.324        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    61.628        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     3.9451        18.283        .20195E-03   -1.5311    
   8  norm          3.9984        1.7849        .73155E-04   -1.5308    
   9  Prefactor     .10000E-03    1.8548        .11397E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    .72612        .71255E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     9.4823        10.439        .13014E-03   -1.5092    
  12  Prefactor     .75934        8.6107        .23782E-02   -1.5534    
  13  norm          .44957        .50935        .64262E-03   -1.5574    
  14  Prefactor     .10000E-03    11.728        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          3.7361        1.9607        .81649E-04   -1.5321    
  16  Prefactor     5.6147        22.539        .16966E-03   -1.5234    
  17  norm          .68349        39.351        .44410E-02   -1.5543    
  18  Normalizat    1.5774        .25830        .27465E-03   -.75627    
  19  Prefactor     1.0496        .20861        .27424E-03   -.91096    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.7099e-08
Minuit parameter uncertainties:
  1  1.50569e-05
  2  0.000281455
  3  15.5615
  4  1.59236e-05
  5  0.00168992
  6  0.00046401
  7  16.9941
  8  1.78489
  9  2.59544e-06
  10  2.42856e-07
  11  10.441
  12  5.11466
  13  0.50935
  14  0.000105988
  15  1.96077
  16  22.5135
  17  10.3787
  18  0.25852
  19  0.208768
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.000e-04  2.429e-07  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.050e+00  2.088e-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.577e+00  2.585e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 160.150 6.285
Photon Flux Upper Limit: 4.70e-08 ph cm-2 s-1
Energy Flux Upper Limit: 3.62e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/70551/likelihoodResults_650160001_650419201_4FGL_J1040.5+0617_daily_bin1585.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): 102
logL (Free Index) = 7366.06264052
delta logL = -4.74848893646e-05

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 7366.06259301
delta logL = 2.52584868576e-08

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10123E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.3355       1.0000          .0000       10.000    
     3 'Normalizat'    1.5775       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0496       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=   7366.063     FROM MIGRAD    STATUS=CONVERGED     72 CALLS      229 TOTAL
                     EDM=   .89E-12    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    3.9362        .90712E-02** at limit **
   2  Index         1.9351        5.9375        .50000        .44861E-07
   3  Normalizat    1.5774        .11527E-01    .62102E-01    .27518E-05
   4  Prefactor     1.0496        .97093E-02    .62006E-01    .11691E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 1.93509
  Normalizat = 1.57736
  Prefactor  = 1.04955
 **********
 **   18 **HESSE 
 **********

 FCN=   7366.063     FROM HESSE     STATUS=NOT POSDEF    33 CALLS      262 TOTAL
                     EDM=   .99E-11    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    43.908        .77118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         1.9351        6.1198        .50000       -.65983    
   3  Normalizat    1.5774        .40626E-01    .27465E-03   -.75627    
   4  Prefactor     1.0496        .34206E-01    .27424E-03   -.91096    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 9.89382e-12
Minuit parameter uncertainties:
  1  1.32254e-06
  2  345.551
  3  0.0406268
  4  0.0342066
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/70551': 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) = 7366.06258312
delta logL = 9.9121225503e-06

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.000e-04  1.323e-06  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  1.935e+00  3.456e+02  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.050e+00  3.421e-02  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.577e+00  4.063e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 160.150 6.285

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/70551/cmap_HighResolution_650160001_650419201_4FGL_J1040.5+0617_daily_bin1585.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='3.62e-03', job_status='DONE', photon_flux_upper_limit='4.70e-08', time_completed='2021-09-02 08:55:10.781510', job_id='70551', GAL2='1.05', fit_tolerance='1e-08', EG2='1.58', EG='1.58', time_epoch_completed='1630598110.78', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.05', dlogl='9.91e-06', ts2='-0.00', photon_index_error='0.00', photon_index='2.37' WHERE bin_id='1585' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:55:10 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0077>
Subject: Job 70551: <4FGL_J1040.5+0617_daily_bin1585> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin1585> was submitted from host <rhel6-64k> by user <kocevski> in cluster <slac> at Thu Sep  2 08:41:13 2021
Job was executed on host(s) <bullet0077>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:41:47 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Thu Sep  2 08:41:47 2021
Terminated at Thu Sep  2 08:55:11 2021
Results reported at Thu Sep  2 08:55:11 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin1585 160.15 6.2848 650160001 650419201 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 :                                   622.29 sec.
    Max Memory :                                 1255 MB
    Average Memory :                             304.33 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   804 sec.
    Turnaround time :                            838 sec.

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

