/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 126 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 = 7169
number of fields = 27
No RA_SUN column yet. Adding RA_SUN/DEC_SUN columns.
Done.


Performing analysis on: 4FGL_J1040.5+0617_daily_bin260
RA = 160.15, Dec = 6.2848
tmin = 306720001, tmax = 306979201
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='62824', job_status='RUN', time_executed='2021-09-02 08:14:44.408545', time_epoch_executed='1630595684.41' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='260'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/62824

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/62824/ft1_4FGL_J1040.5+0617_daily_bin260.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/62824/ft2_4FGL_J1040.5+0617_daily_bin260.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/62824/ft1_4FGL_J1040.5+0617_daily_bin260.fits outfile=/scratch/kocevski/62824/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin260.fits ra=160.15 dec=6.2848 rad=12.0 tmin=306720001.0 tmax=306979201.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.95
user 4.69
sys 0.22

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/62824/ft1_filtered_4FGL_J1040.5+0617_daily_bin260.fits evtable="EVENTS" scfile=/scratch/kocevski/62824/ft2_4FGL_J1040.5+0617_daily_bin260.fits sctable="SC_DATA" expcube=/scratch/kocevski/62824/ltcube_306720001_306979201_4FGL_J1040.5+0617_daily_bin260.fits outfile=/scratch/kocevski/62824/expmap_306720001_306979201_4FGL_J1040.5+0617_daily_bin260.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/62824/ltcube_306720001_306979201_4FGL_J1040.5+0617_daily_bin260.fits
.....................!
real 191.62
user 186.66
sys 4.57

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/62824/ft1_filtered_4FGL_J1040.5+0617_daily_bin260.fits scfile=/scratch/kocevski/62824/ft2_4FGL_J1040.5+0617_daily_bin260.fits outfile=/scratch/kocevski/62824/cmap_306720001_306979201_4FGL_J1040.5+0617_daily_bin260.fits algorithm="CMAP" ebinalg="LOG" emin=30.0 emax=200000.0 ebinfile=NONE tbinalg="LIN" tbinfile=NONE nxpix=160 nypix=160 binsz=0.25 coordsys="CEL" xref=160.15 yref=6.2848 axisrot=0.0 rafield="RA" decfield="DEC" proj="AIT" hpx_ordering_scheme="RING" hpx_order=3 hpx_ebin=yes hpx_region="" evtable="EVENTS" sctable="SC_DATA" efield="ENERGY" tfield="TIME" chatter=2 clobber=yes debug=no gui=no mode="ql"

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

This is gtbin version HEAD
real 0.55
user 0.39
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/62824/ft1_filtered_4FGL_J1040.5+0617_daily_bin260.fits scfile=/scratch/kocevski/62824/ft2_4FGL_J1040.5+0617_daily_bin260.fits outfile=/scratch/kocevski/62824/cmap_HighResolution_306720001_306979201_4FGL_J1040.5+0617_daily_bin260.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.55
user 0.38
sys 0.16

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    8.3770       1.0000         .10000E-03   10000.    
     4 'Prefactor '    12.234       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10012E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10728E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10016E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    9.2549       1.0000         .10000E-03   10000.    
    13 'norm      '    2.6376       1.0000         .10000E-03   10000.    
    14 'Prefactor '    7.4488       1.0000         .10000E-03   10000.    
    15 'norm      '    .56926       1.0000         .10000E-03   10000.    
    16 'Prefactor '    14.261       1.0000         .10000E-03   10000.    
    17 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.1709       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.1135       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=   6357.091     FROM MIGRAD    STATUS=CONVERGED    382 CALLS     1886 TOTAL
                     EDM=   .11E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.2%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    4.3502        .17228E-06** at limit **
   2  Prefactor     .10000E-03    11.653        .44311E-05** at limit **
   3  norm          8.3756        10.213       -.30562E-07    .19546E-04
   4  Prefactor     12.228        10.356       -.30313E-06    .39564E-03
   5  Prefactor     .10000E-03    50.769        .60229E-05** at limit **
   6  Prefactor     .10000E-03    53.876       -.13278E-04** at limit **
   7  Prefactor     .10000E-03    25.672       -.14186E-04** at limit **
   8  norm          .10000E-03    .41436        .14386E-07** at limit **
   9  Prefactor     .10000E-03    5.0255        .22035E-06** at limit **
  10  Prefactor     .10057E-03    1.8292        .99494E-06** at limit **
  11  Prefactor     .10000E-03    11.354       -.39699E-05** at limit **
  12  Prefactor     9.2546        8.1618       -.29387E-06   -.27984E-03
  13  norm          2.6365        .93509        .62508E-07   -.58066E-03
  14  Prefactor     7.4576        12.267       -.85057E-06   -.12994E-03
  15  norm          .56887        1.4272       -.68205E-06   -.15346E-02
  16  Prefactor     14.260        19.503       -.38348E-06   -.15806E-04
  17  norm          .10000E-03    15.650        .18323E-06** at limit **
  18  Normalizat    1.1709        .20131        .59774E-06   -.49355E-04
  19  Prefactor     1.1135        .16654       -.84100E-07   -.12644E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 8.37563
  Prefactor  = 12.2278
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.000100565
  Prefactor  = 0.0001
  Prefactor  = 9.25462
  norm       = 2.63652
  Prefactor  = 7.45764
  norm       = 0.568866
  Prefactor  = 14.2604
  norm       = 0.0001
  Normalizat = 1.17093
  Prefactor  = 1.11348
 **********
 **   18 **HESSE 
 **********

 FCN=   6357.091     FROM HESSE     STATUS=OK           270 CALLS     2156 TOTAL
                     EDM=   .20E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    4.3566        .16238E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    11.610        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          8.3756        10.209        .13851E-03   -1.5129    
   4  Prefactor     12.228        10.311        .11453E-03   -1.5008    
   5  Prefactor     .10000E-03    50.927        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    53.393        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    25.166        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .10000E-03    .42342        .50092E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .10000E-03    5.1339        .17445E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10057E-03    27.865        .20023E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    11.504        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     9.2546        8.0773        .13174E-03   -1.5099    
  13  norm          2.6365        .96117        .36760E-04   -1.5383    
  14  Prefactor     7.4576        12.642        .14695E-03   -1.5162    
  15  norm          .56887        1.4547        .14658E-03   -1.5557    
  16  Prefactor     14.260        19.485        .10606E-03   -1.4953    
  17  norm          .10000E-03    15.794        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    1.1709        .23841        .27903E-03   -.87506    
  19  Prefactor     1.1135        .19841        .24332E-03   -.89037    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.02751e-08
Minuit parameter uncertainties:
  1  6.8827e-07
  2  1.53162e-06
  3  10.2108
  4  10.3125
  5  8.86235e-06
  6  0.000117977
  7  0.000104432
  8  2.99865e-07
  9  5.35431e-06
  10  0.00793946
  11  4.53885e-05
  12  8.07821
  13  0.961176
  14  12.6463
  15  1.45483
  16  19.4934
  17  1.33146e-05
  18  0.238632
  19  0.198546
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.006e-04  7.939e-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:  1.113e+00  1.985e-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.171e+00  2.386e-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.00e-07 ph cm-2 s-1
Energy Flux Upper Limit: 7.73e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/62824/likelihoodResults_306720001_306979201_4FGL_J1040.5+0617_daily_bin260.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) = 6357.09103374
delta logL = -0.00017082672548

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 6357.0908663
delta logL = -3.38217250828e-06

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .27431E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.2483       1.0000          .0000       10.000    
     3 'Normalizat'    1.1715       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1131       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=   6357.091     FROM MIGRAD    STATUS=CONVERGED     65 CALLS      257 TOTAL
                     EDM=   .16E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    .13281        .70312E-01** at limit **
   2  Index         2.2448        6.6738        .50000        .22409E-04
   3  Normalizat    1.1709        .14244E-02    .63081E-01    .68959E-04
   4  Prefactor     1.1135        .12204E-02    .55030E-01    .23156E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100001
  Index      = 2.24475
  Normalizat = 1.17093
  Prefactor  = 1.11348
 **********
 **   18 **HESSE 
 **********

 FCN=   6357.091     FROM HESSE     STATUS=NOT POSDEF    43 CALLS      300 TOTAL
                     EDM=   .27E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    .55376        .36584E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.2448        6.1075        .50000       -.58362    
   3  Normalizat    1.1709        .18812E-02    .27903E-03   -.87506    
   4  Prefactor     1.1135        .16124E-02    .24332E-03   -.89037    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 2.74781e-08
Minuit parameter uncertainties:
  1  5.09404e-05
  2  30.7906
  3  0.00188118
  4  0.00161242
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/62824': 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) = 6357.09086193
delta logL = 9.85522092378e-07

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.000e-04  5.094e-05  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.245e+00  3.079e+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.113e+00  1.612e-03  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.171e+00  1.881e-03  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/62824/cmap_HighResolution_306720001_306979201_4FGL_J1040.5+0617_daily_bin260.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='7.73e-03', job_status='DONE', photon_flux_upper_limit='1.00e-07', time_completed='2021-09-02 08:24:36.772559', job_id='62824', GAL2='1.11', fit_tolerance='1e-08', EG2='1.17', EG='1.17', time_epoch_completed='1630596276.77', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.11', dlogl='9.86e-07', ts2='-0.00', photon_index_error='0.00', photon_index='2.37' WHERE bin_id='260' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:24:36 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0287>
Subject: Job 62824: <4FGL_J1040.5+0617_daily_bin260> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin260> was submitted from host <rhel6-64k> by user <kocevski> in cluster <slac> at Thu Sep  2 08:11:16 2021
Job was executed on host(s) <bullet0287>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:12:23 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:12:23 2021
Terminated at Thu Sep  2 08:24:37 2021
Results reported at Thu Sep  2 08:24:37 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin260 160.15 6.2848 306720001 306979201 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 :                                   583.15 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             314.32 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   734 sec.
    Turnaround time :                            801 sec.

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

