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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin189
RA = 160.15, Dec = 6.2848
tmin = 288316801, tmax = 288576001
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='60968', job_status='RUN', time_executed='2021-09-02 08:10:00.072900', time_epoch_executed='1630595400.07' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='189'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/60968

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/60968/ft1_4FGL_J1040.5+0617_daily_bin189.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/60968/ft2_4FGL_J1040.5+0617_daily_bin189.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/60968/ft1_4FGL_J1040.5+0617_daily_bin189.fits outfile=/scratch/kocevski/60968/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin189.fits ra=160.15 dec=6.2848 rad=12.0 tmin=288316801.0 tmax=288576001.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.64
user 3.42
sys 0.20

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/60968/ft1_filtered_4FGL_J1040.5+0617_daily_bin189.fits evtable="EVENTS" scfile=/scratch/kocevski/60968/ft2_4FGL_J1040.5+0617_daily_bin189.fits sctable="SC_DATA" expcube=/scratch/kocevski/60968/ltcube_288316801_288576001_4FGL_J1040.5+0617_daily_bin189.fits outfile=/scratch/kocevski/60968/expmap_288316801_288576001_4FGL_J1040.5+0617_daily_bin189.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/60968/ltcube_288316801_288576001_4FGL_J1040.5+0617_daily_bin189.fits
.....................!
real 190.18
user 184.86
sys 4.80

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/60968/ft1_filtered_4FGL_J1040.5+0617_daily_bin189.fits scfile=/scratch/kocevski/60968/ft2_4FGL_J1040.5+0617_daily_bin189.fits outfile=/scratch/kocevski/60968/cmap_288316801_288576001_4FGL_J1040.5+0617_daily_bin189.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.64
user 0.39
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/60968/ft1_filtered_4FGL_J1040.5+0617_daily_bin189.fits scfile=/scratch/kocevski/60968/ft2_4FGL_J1040.5+0617_daily_bin189.fits outfile=/scratch/kocevski/60968/cmap_HighResolution_288316801_288576001_4FGL_J1040.5+0617_daily_bin189.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/60968/ft1_filtered_4FGL_J1040.5+0617_daily_bin189.fits evtable="EVENTS" scfile=/scratch/kocevski/60968/ft2_4FGL_J1040.5+0617_daily_bin189.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/60968/Model_4FGL_J1040.5+0617_daily_bin189.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/60968/ft1_filtered_4FGL_J1040.5+0617_daily_bin189.fits.....................!
real 60.26
user 58.79
sys 1.20

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10053E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    9.8599       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10858E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    39.130       1.0000         .10000E-03   10000.    
     6 'Prefactor '    58.939       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10976E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    .78094       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    1.5974       1.0000         .10000E-03   10000.    
    11 'Prefactor '    1.8680       1.0000         .10000E-03   10000.    
    12 'Prefactor '    2.0230       1.0000         .10000E-03   10000.    
    13 'norm      '    1.2703       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    5.3072       1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.1925       1.0000         .10000E-01   10.000    
    19 'Prefactor '    .88423       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=   6327.469     FROM MIGRAD    STATUS=CONVERGED    385 CALLS     1940 TOTAL
                     EDM=   .14E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.1%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    11.449       -.78754E-06** at limit **
   2  Prefactor     .10000E-03    17.340       -.15166E-05** at limit **
   3  norm          9.8589        12.110        .58646E-06   -.64652E-05
   4  Prefactor     .10000E-03    7.9835        .22525E-05** at limit **
   5  Prefactor     39.119        70.193       -.16538E-04   -.22594E-04
   6  Prefactor     58.949        58.224        .12593E-04   -.53924E-04
   7  Prefactor     .10000E-03    12.890        .32050E-05** at limit **
   8  norm          .78052        1.1251       -.14476E-06   -.47374E-03
   9  Prefactor     .10000E-03    2.6108        .69046E-07** at limit **
  10  Prefactor     1.5994        4.5286        .10729E-06   -.16670E-04
  11  Prefactor     1.8684        5.0664        .41695E-08   -.57611E-03
  12  Prefactor     2.0213        6.3498        .16815E-06   -.44976E-03
  13  norm          1.2704        .55125        .22612E-07    .12983E-02
  14  Prefactor     .10000E-03    9.2526       -.35937E-05** at limit **
  15  norm          .10000E-03    .77666        .12740E-07** at limit **
  16  Prefactor     .10000E-03    6.7548       -.75328E-06** at limit **
  17  norm          5.3072        8.4662       -.51936E-07   -.35224E-05
  18  Normalizat    1.1924        .19130        .64501E-06    .16782E-05
  19  Prefactor     .88428        .15233       -.30082E-06    .71174E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 9.85894
  Prefactor  = 0.0001
  Prefactor  = 39.1186
  Prefactor  = 58.9488
  Prefactor  = 0.0001
  norm       = 0.780521
  Prefactor  = 0.0001
  Prefactor  = 1.59942
  Prefactor  = 1.86837
  Prefactor  = 2.02128
  norm       = 1.27039
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 5.3072
  Normalizat = 1.19241
  Prefactor  = 0.884278
 **********
 **   18 **HESSE 
 **********

 FCN=   6327.469     FROM HESSE     STATUS=OK           272 CALLS     2212 TOTAL
                     EDM=   .18E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    11.540        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    17.363        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          9.8589        12.096        .12761E-03   -1.5080    
   4  Prefactor     .10000E-03    7.9128        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     39.119        71.221        .64076E-04   -1.4456    
   6  Prefactor     58.949        57.737        .52259E-04   -1.4171    
   7  Prefactor     .10000E-03    12.774        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .78052        1.0038        .96868E-03   -1.5531    
   9  Prefactor     .10000E-03    2.6334        .12547E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     1.5994        4.4712        .24194E-03   -1.5455    
  11  Prefactor     1.8684        7.4057        .15239E-02   -1.5435    
  12  Prefactor     2.0213        8.7805        .14547E-02   -1.5424    
  13  norm          1.2704        .54479        .36743E-04   -1.5483    
  14  Prefactor     .10000E-03    9.4226        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          .10000E-03    1.8551        .13483E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     .10000E-03    6.7680        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          5.3072        8.4592        .17446E-03   -1.5247    
  18  Normalizat    1.1924        .23446        .24761E-03   -.86838    
  19  Prefactor     .88428        .18222        .23900E-03   -.96693    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.82017e-09
Minuit parameter uncertainties:
  1  2.35713e-05
  2  3.68792e-06
  3  12.0988
  4  0.000116315
  5  71.376
  6  57.792
  7  0.000139767
  8  1.00379
  9  1.33464e-06
  10  4.47214
  11  7.40929
  12  8.42753
  13  0.544787
  14  1.11261e-05
  15  1.11127e-05
  16  1.52532e-06
  17  8.46108
  18  0.23467
  19  0.182347
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.599e+00  4.472e+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

GAL_V02
   Spectrum: PowerLaw
533    Prefactor:  8.843e-01  1.823e-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.192e+00  2.347e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.16
Ra Dec: 160.150 6.285
Photon Flux Upper Limit: 1.24e-07 ph cm-2 s-1
Energy Flux Upper Limit: 9.59e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/60968/likelihoodResults_288316801_288576001_4FGL_J1040.5+0617_daily_bin189.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) = 6324.86660091
delta logL = 2.60199128147

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 6324.83273211
delta logL = 2.63586008929

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .19450       1.0000         .10000E-03   10000.    
     2 'Index     '    4.7821       1.0000          .0000       10.000    
     3 'Normalizat'    1.0225       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .97845       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=   6324.833     FROM MIGRAD    STATUS=CONVERGED     52 CALLS      241 TOTAL
                     EDM=   .25E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .19320        1.2700        .36545E-02    .22010E-02
   2  Index         4.7855        2.3236        .86286E-01    .20652E-03
   3  Normalizat    1.0229        .58747E-01    .43009E-01   -.93168E-05
   4  Prefactor     .97817        .49873E-01    .45997E-01   -.18895E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.193204
  Index      = 4.78546
  Normalizat = 1.02288
  Prefactor  = 0.978168
 **********
 **   18 **HESSE 
 **********

 FCN=   6324.833     FROM HESSE     STATUS=NOT POSDEF    33 CALLS      274 TOTAL
                     EDM=   .51E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .19320        2.2256        .16383E-04   -1.5620    
   2  Index         4.7855        3.2426        .35156E-02   -.42922E-01
   3  Normalizat    1.0229        .20123        .26367E-03   -.92268    
   4  Prefactor     .97817        .16699        .22840E-03   -.93461    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 5.13906e-10
Minuit parameter uncertainties:
  1  1.31121
  2  3.5288
  3  0.201378
  4  0.167078
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/60968': 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) = 6324.83272808
delta logL = 2.63586411837

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.932e-01  1.311e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  4.785e+00  3.529e+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:  9.782e-01  1.671e-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.023e+00  2.014e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 6.03
Ra Dec: 160.150 6.285
Photon Index (Free Index): 4.79 +/- 3.53
Photon Flux (Free Index): 1.56e-07 +/- 7.81e-08
Energy Flux (Free Index): 2.11e-05 +/- 1.37e-05

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/60968/cmap_HighResolution_288316801_288576001_4FGL_J1040.5+0617_daily_bin189.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='9.59e-03', comment='SUCCESS', energy_flux2='2.11e-05', dlogl='2.64e+00', photon_flux2='1.56e-07', job_status='DONE', time_completed='2021-09-02 08:19:51.689180', photon_index_error2='3.53', photon_index2='4.79', ts='0.16', fit_tolerance='1e-08', GAL='0.88', photon_index_error='0.00', photon_flux_upper_limit='1.24e-07', energy_flux_error2='1.37e-05', EG='1.19', time_epoch_completed='1630595991.69', return_code='0', job_id='60968', GAL2='0.98', EG2='1.02', return_code2='102', photon_flux_error2='7.81e-08', ts2='6.03', photon_index='2.37' WHERE bin_id='189' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:19:51 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0067>
Subject: Job 60968: <4FGL_J1040.5+0617_daily_bin189> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin189> was submitted from host <rhel6-64k> by user <kocevski> in cluster <slac> at Thu Sep  2 08:06:22 2021
Job was executed on host(s) <bullet0067>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:08:17 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:08:17 2021
Terminated at Thu Sep  2 08:19:52 2021
Results reported at Thu Sep  2 08:19:52 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin189 160.15 6.2848 288316801 288576001 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 :                                   589.13 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             314.22 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   696 sec.
    Turnaround time :                            810 sec.

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

