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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin817
RA = 160.15, Dec = 6.2848
tmin = 451094401, tmax = 451353601
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='66785', job_status='RUN', time_executed='2021-09-02 08:29:55.484279', time_epoch_executed='1630596595.48' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='817'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/66785

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/66785/ft1_4FGL_J1040.5+0617_daily_bin817.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/66785/ft2_4FGL_J1040.5+0617_daily_bin817.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/66785/ft1_4FGL_J1040.5+0617_daily_bin817.fits outfile=/scratch/kocevski/66785/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin817.fits ra=160.15 dec=6.2848 rad=12.0 tmin=451094401.0 tmax=451353601.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.48
user 3.26
sys 0.20

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/66785/ft2_4FGL_J1040.5+0617_daily_bin817.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/66785/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin817.fits evtable="EVENTS" outfile="/scratch/kocevski/66785/ft1_filtered_4FGL_J1040.5+0617_daily_bin817.fits" apply_filter=yes overwrite=yes header_obstimes=yes tstart=0.0 tstop=0.0 gtifile="default" chatter=3 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

This is gtmktime version HEAD
Applying GTI filter:
IN_SAA!=T && LIVETIME>0 && gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nogrb.gti',(START+STOP)/2) && (angsep(RA_SUN,DEC_SUN,RA_ZENITH,DEC_ZENITH)>115 || gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nosolarflares.gti',(START+STOP)/2))
real 0.52
user 0.33
sys 0.16

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/66785/ft1_filtered_4FGL_J1040.5+0617_daily_bin817.fits evtable="EVENTS" scfile=/scratch/kocevski/66785/ft2_4FGL_J1040.5+0617_daily_bin817.fits sctable="SC_DATA" expcube=/scratch/kocevski/66785/ltcube_451094401_451353601_4FGL_J1040.5+0617_daily_bin817.fits outfile=/scratch/kocevski/66785/expmap_451094401_451353601_4FGL_J1040.5+0617_daily_bin817.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/66785/ltcube_451094401_451353601_4FGL_J1040.5+0617_daily_bin817.fits
.....................!
real 192.98
user 187.93
sys 4.28

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/66785/ft1_filtered_4FGL_J1040.5+0617_daily_bin817.fits scfile=/scratch/kocevski/66785/ft2_4FGL_J1040.5+0617_daily_bin817.fits outfile=/scratch/kocevski/66785/cmap_451094401_451353601_4FGL_J1040.5+0617_daily_bin817.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/66785/ft1_filtered_4FGL_J1040.5+0617_daily_bin817.fits scfile=/scratch/kocevski/66785/ft2_4FGL_J1040.5+0617_daily_bin817.fits outfile=/scratch/kocevski/66785/cmap_HighResolution_451094401_451353601_4FGL_J1040.5+0617_daily_bin817.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.58
user 0.41
sys 0.16

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .90238       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    26.168       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10079E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    42.899       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .13376E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10135E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    3.1310       1.0000         .10000E-03   10000.    
     9 'Prefactor '    3.4691       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .34443E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    3.3353       1.0000         .10000E-03   10000.    
    12 'Prefactor '    18.031       1.0000         .10000E-03   10000.    
    13 'norm      '    1.9064       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10034E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    4.3256       1.0000         .10000E-03   10000.    
    16 'Prefactor '    7.8717       1.0000         .10000E-03   10000.    
    17 'norm      '    .17743E-02   1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.2584       1.0000         .10000E-01   10.000    
    19 'Prefactor '    .78669       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=   5607.363     FROM MIGRAD    STATUS=CONVERGED    396 CALLS     1916 TOTAL
                     EDM=   .14E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.0%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .94539        13.989       -.75080E-05    .40193E-03
   2  Prefactor     .10000E-03    23.648       -.28905E-05** at limit **
   3  norm          26.169        21.395        .14555E-06    .76531E-03
   4  Prefactor     .10000E-03    5.8413       -.14518E-06** at limit **
   5  Prefactor     42.918        62.826        .23854E-04    .16992E-03
   6  Prefactor     .10000E-03    121.85       -.20825E-05** at limit **
   7  Prefactor     .10000E-03    14.952       -.12191E-05** at limit **
   8  norm          3.1307        2.1084       -.82022E-09   -.19189E-03
   9  Prefactor     3.4689        9.2442       -.10938E-06   -.22490E-03
  10  Prefactor     .10007E-03    2.1271        .22033E-06** at limit **
  11  Prefactor     3.3351        4.8682       -.39117E-07   -.29908E-03
  12  Prefactor     18.032        11.931       -.28037E-06   -.98113E-04
  13  norm          1.9064        .75858        .44553E-07   -.19218E-03
  14  Prefactor     .10000E-03    19.634       -.42246E-06** at limit **
  15  norm          4.3252        1.6986        .35535E-07   -.37923E-03
  16  Prefactor     7.8705        17.422        .87194E-06   -.45358E-04
  17  norm          .10012E-03    6.0336        .17405E-05** at limit **
  18  Normalizat    1.2585        .22051       -.19132E-05    .35997E-03
  19  Prefactor     .78661        .17452        .28558E-06    .16191E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.945394
  Prefactor  = 0.0001
  norm       = 26.1686
  Prefactor  = 0.0001
  Prefactor  = 42.9182
  Prefactor  = 0.000100004
  Prefactor  = 0.0001
  norm       = 3.13073
  Prefactor  = 3.4689
  Prefactor  = 0.00010007
  Prefactor  = 3.33514
  Prefactor  = 18.0318
  norm       = 1.90644
  Prefactor  = 0.0001
  norm       = 4.32519
  Prefactor  = 7.87054
  norm       = 0.000100123
  Normalizat = 1.25853
  Prefactor  = 0.786611
 **********
 **   18 **HESSE 
 **********

 FCN=   5607.363     FROM HESSE     STATUS=OK           272 CALLS     2188 TOTAL
                     EDM=   .10E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .94539        42.494        .46393E-02   -1.5514    
   2  Prefactor     .10000E-03    23.656        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          26.169        21.525        .78312E-04   -1.4684    
   4  Prefactor     .10000E-03    5.8652        .17671E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     42.918        63.162        .61207E-04   -1.4397    
   6  Prefactor     .10000E-03    123.10        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    15.038        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          3.1307        2.0931        .81740E-04   -1.5354    
   9  Prefactor     3.4689        9.1901        .21712E-03   -1.5335    
  10  Prefactor     .10007E-03    21.706        .20009E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     3.3351        4.8638        .19248E-03   -1.5343    
  12  Prefactor     18.032        11.657        .94321E-04   -1.4858    
  13  norm          1.9064        .75316        .38560E-04   -1.5432    
  14  Prefactor     .10000E-03    20.115        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          4.3252        1.7026        .58352E-04   -1.5292    
  16  Prefactor     7.8705        17.399        .14292E-03   -1.5147    
  17  norm          .10012E-03    31.227        .35494E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    1.2585        .25954        .25630E-03   -.84813    
  19  Prefactor     .78661        .20636        .26331E-03   -1.0022    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.03737e-08
Minuit parameter uncertainties:
  1  12.6854
  2  1.12669e-05
  3  21.5309
  4  3.95279e-05
  5  63.2612
  6  0.00133216
  7  0.000107764
  8  2.09313
  9  9.19379
  10  0.00246682
  11  4.86436
  12  11.658
  13  0.753159
  14  4.9141e-05
  15  1.70265
  16  17.4097
  17  0.00392965
  18  0.259812
  19  0.206566
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.001e-04  2.467e-03  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:  7.866e-01  2.066e-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.259e+00  2.598e-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: 1.16e-07 ph cm-2 s-1
Energy Flux Upper Limit: 8.98e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/66785/likelihoodResults_451094401_451353601_4FGL_J1040.5+0617_daily_bin817.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) = 5607.36338176
delta logL = -0.000219547082452

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 5607.36303195
delta logL = 0.000130257014462

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .36073E-02   1.0000         .10000E-03   10000.    
     2 'Index     '    2.5243       1.0000          .0000       10.000    
     3 'Normalizat'    1.2585       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .78670       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=   5607.067     FROM MIGRAD    STATUS=CONVERGED     83 CALLS      257 TOTAL
                     EDM=   .14E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .45358        8.2730        .98098E-02    .14875E-02
   2  Index         3.8350        2.7223        .18220        .80883E-04
   3  Normalizat    1.1866        .37118E-01    .59379E-01    .25153E-04
   4  Prefactor     .82156        .31157E-01    .43544E-01    .17194E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.453583
  Index      = 3.83496
  Normalizat = 1.18662
  Prefactor  = 0.82156
 **********
 **   18 **HESSE 
 **********

 FCN=   5607.067     FROM HESSE     STATUS=NOT POSDEF    33 CALLS      290 TOTAL
                     EDM=   .45E-06    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .45358        36.063        .61966E-04   -1.5573    
   2  Index         3.8350        6.4425        .64010E-02   -.23517    
   3  Normalizat    1.1866        .24029        .26262E-03   -.87017    
   4  Prefactor     .82156        .20030        .25811E-03   -.98938    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 4.46867e-07
Minuit parameter uncertainties:
  1  8.09301
  2  9.54119
  3  0.240512
  4  0.200482
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/66785': 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) = 5607.06711022
delta logL = 0.296051986966

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  4.536e-01  8.093e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  3.835e+00  9.541e+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:  8.216e-01  2.005e-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.187e+00  2.405e-01  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  0.000e+00 [aplpy.core]
INFO: Auto-setting vmax to  0.000e+00 [aplpy.core]
Saving /scratch/kocevski/66785/cmap_HighResolution_451094401_451353601_4FGL_J1040.5+0617_daily_bin817.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='8.98e-03', job_status='DONE', photon_flux_upper_limit='1.16e-07', time_completed='2021-09-02 08:39:17.650247', job_id='66785', GAL2='0.82', fit_tolerance='1e-08', EG2='1.19', EG='1.26', time_epoch_completed='1630597157.65', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.79', dlogl='2.96e-01', ts2='0.65', photon_index_error='0.00', photon_index='2.37' WHERE bin_id='817' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:39:17 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0293>
Subject: Job 66785: <4FGL_J1040.5+0617_daily_bin817> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin817> was submitted from host <rhel6-64l> by user <kocevski> in cluster <slac> at Thu Sep  2 08:26:25 2021
Job was executed on host(s) <bullet0293>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:26:27 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:26:27 2021
Terminated at Thu Sep  2 08:39:18 2021
Results reported at Thu Sep  2 08:39:18 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin817 160.15 6.2848 451094401 451353601 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 :                                   560.25 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             251.17 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   770 sec.
    Turnaround time :                            773 sec.

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

