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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin824
RA = 160.15, Dec = 6.2848
tmin = 452908801, tmax = 453168001
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='66795', job_status='RUN', time_executed='2021-09-02 08:29:45.625586', time_epoch_executed='1630596585.63' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='824'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/66795

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/66795/ft1_4FGL_J1040.5+0617_daily_bin824.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/66795/ft2_4FGL_J1040.5+0617_daily_bin824.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/66795/ft1_4FGL_J1040.5+0617_daily_bin824.fits outfile=/scratch/kocevski/66795/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin824.fits ra=160.15 dec=6.2848 rad=12.0 tmin=452908801.0 tmax=453168001.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.15
user 3.87
sys 0.22

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/66795/ft1_filtered_4FGL_J1040.5+0617_daily_bin824.fits" evtable="EVENTS" scfile=/scratch/kocevski/66795/ft2_4FGL_J1040.5+0617_daily_bin824.fits sctable="SC_DATA" outfile=/scratch/kocevski/66795/ltcube_452908801_453168001_4FGL_J1040.5+0617_daily_bin824.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/66795/ft2_4FGL_J1040.5+0617_daily_bin824.fits
.....................!
real 13.81
user 13.42
sys 0.33

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/66795/ft1_filtered_4FGL_J1040.5+0617_daily_bin824.fits evtable="EVENTS" scfile=/scratch/kocevski/66795/ft2_4FGL_J1040.5+0617_daily_bin824.fits sctable="SC_DATA" expcube=/scratch/kocevski/66795/ltcube_452908801_453168001_4FGL_J1040.5+0617_daily_bin824.fits outfile=/scratch/kocevski/66795/expmap_452908801_453168001_4FGL_J1040.5+0617_daily_bin824.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/66795/ltcube_452908801_453168001_4FGL_J1040.5+0617_daily_bin824.fits
.....................!
real 192.14
user 186.54
sys 5.11

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/66795/ft1_filtered_4FGL_J1040.5+0617_daily_bin824.fits scfile=/scratch/kocevski/66795/ft2_4FGL_J1040.5+0617_daily_bin824.fits outfile=/scratch/kocevski/66795/cmap_452908801_453168001_4FGL_J1040.5+0617_daily_bin824.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 2.62
user 0.37
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/66795/ft1_filtered_4FGL_J1040.5+0617_daily_bin824.fits scfile=/scratch/kocevski/66795/ft2_4FGL_J1040.5+0617_daily_bin824.fits outfile=/scratch/kocevski/66795/cmap_HighResolution_452908801_453168001_4FGL_J1040.5+0617_daily_bin824.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 1.10
user 0.39
sys 0.19

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10009E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10110E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    54.071       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    18.294       1.0000         .10000E-03   10000.    
     8 'norm      '    2.7582       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10820E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10038E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    21.906       1.0000         .10000E-03   10000.    
    12 'Prefactor '    19.209       1.0000         .10000E-03   10000.    
    13 'norm      '    .60959       1.0000         .10000E-03   10000.    
    14 'Prefactor '    11.460       1.0000         .10000E-03   10000.    
    15 'norm      '    3.4223       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10128E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    .52936E-03   1.0000         .10000E-03   10000.    
    18 'Normalizat'    .79732       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.3398       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=   5986.344     FROM MIGRAD    STATUS=CONVERGED    395 CALLS     1900 TOTAL
                     EDM=   .77E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  8.2%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    5.4856        .27684E-06** at limit **
   2  Prefactor     .10000E-03    19.228        .33997E-06** at limit **
   3  norm          .10000E-03    4.6493        .19639E-06** at limit **
   4  Prefactor     .10000E-03    4.1281        .36088E-06** at limit **
   5  Prefactor     54.048        53.182       -.32537E-05    .29490E-04
   6  Prefactor     .10000E-03    22.152       -.17967E-06** at limit **
   7  Prefactor     18.274        17.161       -.82207E-08    .19428E-04
   8  norm          2.7557        1.6430       -.92963E-08    .59019E-04
   9  Prefactor     .10000E-03    6.3038       -.15551E-06** at limit **
  10  Prefactor     .10000E-03    3.4787        .72905E-07** at limit **
  11  Prefactor     21.906        10.156       -.42076E-07    .28009E-04
  12  Prefactor     19.236        11.975        .40082E-06    .99983E-04
  13  norm          .60744        .89389       -.89495E-07   -.65382E-03
  14  Prefactor     11.484        15.374       -.10569E-05   -.10786E-03
  15  norm          3.4240        1.7418       -.17473E-07    .11372E-03
  16  Prefactor     .10000E-03    45.417        .18494E-06** at limit **
  17  norm          .10000E-03    92.729       -.96246E-05** at limit **
  18  Normalizat    .79721        .22827       -.12665E-05    .10882E-03
  19  Prefactor     1.3401        .18840        .16615E-05    .16132E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 54.048
  Prefactor  = 0.0001
  Prefactor  = 18.2737
  norm       = 2.75567
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 21.9065
  Prefactor  = 19.2358
  norm       = 0.607437
  Prefactor  = 11.4843
  norm       = 3.42403
  Prefactor  = 0.0001
  norm       = 0.0001
  Normalizat = 0.797213
  Prefactor  = 1.3401
 **********
 **   18 **HESSE 
 **********

 FCN=   5986.344     FROM HESSE     STATUS=OK           270 CALLS     2170 TOTAL
                     EDM=   .12E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    5.5177        .17706E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    19.239        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .10000E-03    4.6546        .16299E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    4.1477        .15369E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     54.048        53.577        .54548E-04   -1.4236    
   6  Prefactor     .10000E-03    22.116        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     18.274        17.151        .93641E-04   -1.4853    
   8  norm          2.7557        1.6403        .73365E-04   -1.5376    
   9  Prefactor     .10000E-03    6.3908        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    3.5793        .28094E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     21.906        10.221        .85580E-04   -1.4772    
  12  Prefactor     19.236        11.942        .91385E-04   -1.4831    
  13  norm          .60744        .87721        .62003E-03   -1.5552    
  14  Prefactor     11.484        15.669        .59170E-03   -1.5030    
  15  norm          3.4240        1.7308        .68528E-04   -1.5338    
  16  Prefactor     .10000E-03    45.930        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .10000E-03    90.382        .44019E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    .79721        .25770        .32613E-03   -1.0017    
  19  Prefactor     1.3401        .20996        .22701E-03   -.82122    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.19904e-10
Minuit parameter uncertainties:
  1  1.6865e-05
  2  1.19092e-05
  3  1.16764e-05
  4  1.96511e-05
  5  53.6245
  6  7.56182e-05
  7  17.1551
  8  1.64033
  9  1.42371e-05
  10  1.93542e-06
  11  10.222
  12  11.9436
  13  0.877228
  14  15.6744
  15  1.73081
  16  0.000136153
  17  0.000127401
  18  0.258094
  19  0.21009
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.000e-04  1.935e-06  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.340e+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:  7.972e-01  2.581e-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: 9.91e-08 ph cm-2 s-1
Energy Flux Upper Limit: 7.64e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/66795/likelihoodResults_452908801_453168001_4FGL_J1040.5+0617_daily_bin824.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) = 5986.34530613
delta logL = -0.00133316111078

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5986.34397218
delta logL = 7.87562385085e-07

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.4050       1.0000          .0000       10.000    
     3 'Normalizat'    .79722       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.3401       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.
 MIGRAD TERMINATED WITHOUT CONVERGENCE.

 FCN=   5986.344     FROM MIGRAD    STATUS=FAILED        95 CALLS      258 TOTAL
                     EDM=   .33E-05    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10004E-03    352.90        .29736E-02** at limit **
   2  Index         2.4452        7.5104        .50000       -.95824E-04
   3  Normalizat    .79721        .54810E-01    .32613E-03    .59610E-05
   4  Prefactor     1.3401        .48285E-01    .22701E-03   -.71154E-04
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   5986.344     FROM SIMPLEX   STATUS=UNCHANGED    154 CALLS      412 TOTAL
                     EDM=   .82E-05    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10004E-03    352.90        .30122E-03** at limit **
   2  Index         2.4452        7.5104        .11376E-04   -.95824E-04
   3  Normalizat    .79721        .54810E-01    .68429E-06    .59610E-05
   4  Prefactor     1.3401        .48285E-01    .18995E-06   -.71154E-04
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   5986.344     FROM MIGRAD    STATUS=CONVERGED     34 CALLS      446 TOTAL
                     EDM=   .78E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10004E-03    898.15        .59471E-03** at limit **
   2  Index         2.4460        6.0880        .50000       -.95893E-04
   3  Normalizat    .79721        .15342        .13045E-04   -.27016E-04
   4  Prefactor     1.3401        .13531        .45402E-04   -.11729E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100038
  Index      = 2.44601
  Normalizat = 0.797212
  Prefactor  = 1.3401
 **********
 **   18 **HESSE 
 **********

 FCN=   5986.344     FROM HESSE     STATUS=OK            29 CALLS      475 TOTAL
                     EDM=   .15E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10004E-03    4.3452        .11894E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.4460        6.2230        .50000       -.53611    
   3  Normalizat    .79721        .23215        .26090E-05   -1.0017    
   4  Prefactor     1.3401        .20511        .90804E-05   -.82122    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.47867e-08
Minuit parameter uncertainties:
  1  0.000812512
  2  4.44402
  3  0.232437
  4  0.205235
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/66795': No such file or directory
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5986.34397128
delta logL = 1.68508995557e-06

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.000e-04  8.125e-04  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.446e+00  4.444e+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.340e+00  2.052e-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:  7.972e-01  2.324e-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/66795/cmap_HighResolution_452908801_453168001_4FGL_J1040.5+0617_daily_bin824.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='7.64e-03', job_status='DONE', photon_flux_upper_limit='9.91e-08', time_completed='2021-09-02 08:39:36.872010', job_id='66795', GAL2='1.34', fit_tolerance='1e-08', EG2='0.80', EG='0.80', time_epoch_completed='1630597176.87', return_code2='0', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.34', dlogl='1.69e-06', ts2='-0.00', photon_index_error='0.00', photon_index='2.37' WHERE bin_id='824' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:39:36 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0196>
Subject: Job 66795: <4FGL_J1040.5+0617_daily_bin824> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin824 160.15 6.2848 452908801 453168001 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 :                                   585.00 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             272.44 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              7
    Max Threads :                                21
    Run time :                                   789 sec.
    Turnaround time :                            791 sec.

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

