/nfs/farm/g/glast/g/LCRepository/bin/miniconda2/envs/fermitools_v1.0.5/lib/python2.7/site-packages/matplotlib/font_manager.py:281: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment.
  'Matplotlib is building the font cache using fc-list. '
/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 54 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 = 7362
number of fields = 30
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J1040.5+0617_daily_bin1129
RA = 160.15, Dec = 6.2848
tmin = 531964801, tmax = 532224001
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='68072', job_status='RUN', time_executed='2021-09-02 08:34:29.164005', time_epoch_executed='1630596869.16' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='1129'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/68072

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/68072/ft1_4FGL_J1040.5+0617_daily_bin1129.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/68072/ft2_4FGL_J1040.5+0617_daily_bin1129.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/68072/ft1_4FGL_J1040.5+0617_daily_bin1129.fits outfile=/scratch/kocevski/68072/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin1129.fits ra=160.15 dec=6.2848 rad=12.0 tmin=531964801.0 tmax=532224001.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 3.53
user 3.34
sys 0.17

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/68072/ft1_filtered_4FGL_J1040.5+0617_daily_bin1129.fits evtable="EVENTS" scfile=/scratch/kocevski/68072/ft2_4FGL_J1040.5+0617_daily_bin1129.fits sctable="SC_DATA" expcube=/scratch/kocevski/68072/ltcube_531964801_532224001_4FGL_J1040.5+0617_daily_bin1129.fits outfile=/scratch/kocevski/68072/expmap_531964801_532224001_4FGL_J1040.5+0617_daily_bin1129.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/68072/ltcube_531964801_532224001_4FGL_J1040.5+0617_daily_bin1129.fits
.....................!
real 191.75
user 186.92
sys 4.36

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/68072/ft1_filtered_4FGL_J1040.5+0617_daily_bin1129.fits scfile=/scratch/kocevski/68072/ft2_4FGL_J1040.5+0617_daily_bin1129.fits outfile=/scratch/kocevski/68072/cmap_531964801_532224001_4FGL_J1040.5+0617_daily_bin1129.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.54
user 0.39
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/68072/ft1_filtered_4FGL_J1040.5+0617_daily_bin1129.fits scfile=/scratch/kocevski/68072/ft2_4FGL_J1040.5+0617_daily_bin1129.fits outfile=/scratch/kocevski/68072/cmap_HighResolution_531964801_532224001_4FGL_J1040.5+0617_daily_bin1129.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.40
sys 0.15

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10157E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .11135E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    15.445       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .38419E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    39.472       1.0000         .10000E-03   10000.    
     6 'Prefactor '    1.9195       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    3.6011       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .11524E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    23.270       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .52066E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    1.4200       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    .23768       1.0000         .10000E-03   10000.    
    16 'Prefactor '    1.1222       1.0000         .10000E-03   10000.    
    17 'norm      '    .10211E-03   1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.2404       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.1099       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=   8558.621     FROM MIGRAD    STATUS=CONVERGED    679 CALLS     2475 TOTAL
                     EDM=   .18E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    7.3725        .18142E-02** at limit **
   2  Prefactor     .10000E-03    34.136        .18142E-02** at limit **
   3  norm          15.467        12.966        .10191E-03   -.31904E-04
   4  Prefactor     .10000E-03    13.589        .35520E-02** at limit **
   5  Prefactor     39.515        48.811        .63798E-04    .14577E-03
   6  Prefactor     1.9331        95.460        .29994E-03    .33886E-04
   7  Prefactor     .10000E-03    4.0439        .18142E-02** at limit **
   8  norm          3.6011        1.3511        .63346E-04   -.18737E-03
   9  Prefactor     .10000E-03    1.3207        .10364E-02** at limit **
  10  Prefactor     .10000E-03    5.5946        .20016E-02** at limit **
  11  Prefactor     23.272        8.3108        .41518E-03   -.19283E-03
  12  Prefactor     .10001E-03    27.609        .35442E-02** at limit **
  13  norm          1.4192        .51308        .38241E-04   -.88177E-03
  14  Prefactor     .10000E-03    3.3508        .16480E-02** at limit **
  15  norm          .23778        .73172        .11791E-02    .86221E-02
  16  Prefactor     1.0999        72.519        .62984E-02   -.57894E-04
  17  norm          .10000E-03    8.0084        .18142E-02** at limit **
  18  Normalizat    1.2404        .21067        .27238E-03   -.25971E-03
  19  Prefactor     1.1099        .17583        .24737E-03   -.10442E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 15.4673
  Prefactor  = 0.000100001
  Prefactor  = 39.5147
  Prefactor  = 1.93315
  Prefactor  = 0.0001
  norm       = 3.60108
  Prefactor  = 0.0001
  Prefactor  = 0.000100003
  Prefactor  = 23.2716
  Prefactor  = 0.000100006
  norm       = 1.41918
  Prefactor  = 0.0001
  norm       = 0.237784
  Prefactor  = 1.09987
  norm       = 0.0001
  Normalizat = 1.2404
  Prefactor  = 1.10994
 **********
 **   18 **HESSE 
 **********

 FCN=   8558.621     FROM HESSE     STATUS=OK           252 CALLS     2727 TOTAL
                     EDM=   .14E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    7.3743        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    34.157        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          15.467        12.966        .40765E-05   -1.4921    
   4  Prefactor     .10000E-03    13.630        .71040E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     39.515        48.792        .12760E-04   -1.4450    
   6  Prefactor     1.9331        94.600        .11997E-04   -1.5430    
   7  Prefactor     .10000E-03    4.0439        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          3.6011        1.3508        .25338E-05   -1.5328    
   9  Prefactor     .10000E-03    1.3208        .20728E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    5.6245        .40032E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     23.272        8.3093        .16607E-04   -1.4743    
  12  Prefactor     .10001E-03    28.577        .14177E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          1.4192        .51300        .15296E-05   -1.5470    
  14  Prefactor     .10000E-03    3.3512        .32959E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          .23778        .73063        .23582E-03   -1.5610    
  16  Prefactor     1.0999        72.626        .25194E-03   -1.5498    
  17  norm          .10000E-03    8.0124        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    1.2404        .21047        .54476E-04   -.85363    
  19  Prefactor     1.1099        .17597        .98947E-05   -.89150    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.41453e-09
Minuit parameter uncertainties:
  1  6.94948e-06
  2  6.22643e-05
  3  12.9687
  4  0.000182394
  5  48.8414
  6  27.0911
  7  8.94752e-06
  8  1.35078
  9  2.83037e-06
  10  0.000258548
  11  8.3097
  12  0.000827262
  13  0.513
  14  8.08119e-06
  15  0.730659
  16  17.897
  17  1.09505e-05
  18  0.210613
  19  0.176065
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.000e-04  2.585e-04  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.110e+00  1.761e-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.240e+00  2.106e-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: 7.93e-08 ph cm-2 s-1
Energy Flux Upper Limit: 6.11e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/68072/likelihoodResults_531964801_532224001_4FGL_J1040.5+0617_daily_bin1129.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) = 8558.62208939
delta logL = -0.000851725335451

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 8558.62124033
delta logL = -2.66947608907e-06

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .12752E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.4324       1.0000          .0000       10.000    
     3 'Normalizat'    1.2408       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1096       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=   8558.621     FROM MIGRAD    STATUS=CONVERGED     68 CALLS      246 TOTAL
                     EDM=   .62E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10004E-03    .79555        .61206E-01** at limit **
   2  Index         2.5149        3.3761        .50000       -.10991E-03
   3  Normalizat    1.2404        .39454E-02    .61583E-01    .84188E-04
   4  Prefactor     1.1099        .34286E-02    .55943E-01    .67144E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100042
  Index      = 2.51488
  Normalizat = 1.24041
  Prefactor  = 1.10994
 **********
 **   18 **HESSE 
 **********

 FCN=   8558.621     FROM HESSE     STATUS=NOT POSDEF    35 CALLS      281 TOTAL
                     EDM=   .32E-05    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10004E-03    938.32        .18078E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.5149        8.5944        .50000       -.52017    
   3  Normalizat    1.2404        .51965E-01    .27238E-03   -.85363    
   4  Prefactor     1.1099        .44933E-01    .24737E-03   -.89150    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 3.17327e-06
Minuit parameter uncertainties:
  1  0.0128102
  2  43.9484
  3  0.0519671
  4  0.044935
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/68072': 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) = 8558.62123399
delta logL = 3.67252869182e-06

Extracting fit parameters...

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

GAL_V02
   Spectrum: PowerLaw
533    Prefactor:  1.110e+00  4.494e-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.240e+00  5.197e-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/68072/cmap_HighResolution_531964801_532224001_4FGL_J1040.5+0617_daily_bin1129.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='6.11e-03', job_status='DONE', photon_flux_upper_limit='7.93e-08', time_completed='2021-09-02 08:47:05.454914', job_id='68072', GAL2='1.11', fit_tolerance='1e-08', EG2='1.24', EG='1.24', time_epoch_completed='1630597625.45', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.11', dlogl='3.67e-06', ts2='-0.00', photon_index_error='0.00', photon_index='2.37' WHERE bin_id='1129' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:47:05 PDT 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0129>
Subject: Job 68072: <4FGL_J1040.5+0617_daily_bin1129> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin1129> was submitted from host <rhel6-64j> by user <kocevski> in cluster <slac> at Thu Sep  2 08:31:34 2021
Job was executed on host(s) <bullet0129>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:33:18 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:33:18 2021
Terminated at Thu Sep  2 08:47:06 2021
Results reported at Thu Sep  2 08:47:06 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin1129 160.15 6.2848 531964801 532224001 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 :                                   749.00 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             313.11 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   827 sec.
    Turnaround time :                            932 sec.

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

