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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin1624
RA = 160.15, Dec = 6.2848
tmin = 660268801, tmax = 660528001
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='298556', job_status='RUN', time_executed='2021-12-07 21:10:58.357623', time_epoch_executed='1638940258.36' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='1624'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/298556

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/298556/ft1_4FGL_J1040.5+0617_daily_bin1624.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/298556/ft2_4FGL_J1040.5+0617_daily_bin1624.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/298556/ft1_4FGL_J1040.5+0617_daily_bin1624.fits outfile=/scratch/kocevski/298556/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin1624.fits ra=160.15 dec=6.2848 rad=12.0 tmin=660268801.0 tmax=660528001.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.88
user 3.61
sys 0.24

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/298556/ft1_filtered_4FGL_J1040.5+0617_daily_bin1624.fits evtable="EVENTS" scfile=/scratch/kocevski/298556/ft2_4FGL_J1040.5+0617_daily_bin1624.fits sctable="SC_DATA" expcube=/scratch/kocevski/298556/ltcube_660268801_660528001_4FGL_J1040.5+0617_daily_bin1624.fits outfile=/scratch/kocevski/298556/expmap_660268801_660528001_4FGL_J1040.5+0617_daily_bin1624.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/298556/ltcube_660268801_660528001_4FGL_J1040.5+0617_daily_bin1624.fits
.....................!
real 190.41
user 185.25
sys 4.74

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/298556/ft1_filtered_4FGL_J1040.5+0617_daily_bin1624.fits scfile=/scratch/kocevski/298556/ft2_4FGL_J1040.5+0617_daily_bin1624.fits outfile=/scratch/kocevski/298556/cmap_660268801_660528001_4FGL_J1040.5+0617_daily_bin1624.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.37
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/298556/ft1_filtered_4FGL_J1040.5+0617_daily_bin1624.fits scfile=/scratch/kocevski/298556/ft2_4FGL_J1040.5+0617_daily_bin1624.fits outfile=/scratch/kocevski/298556/cmap_HighResolution_660268801_660528001_4FGL_J1040.5+0617_daily_bin1624.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.54
user 0.39
sys 0.14

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    22.427       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10013E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    .10285E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10020E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10006E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    2.9459       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .35199E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    1.3111       1.0000         .10000E-03   10000.    
    11 'Prefactor '    17.345       1.0000         .10000E-03   10000.    
    12 'Prefactor '    19.830       1.0000         .10000E-03   10000.    
    13 'norm      '    1.0794       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .94078       1.0000         .10000E-03   10000.    
    15 'norm      '    .93055       1.0000         .10000E-03   10000.    
    16 'Prefactor '    38.845       1.0000         .10000E-03   10000.    
    17 'norm      '    13.335       1.0000         .10000E-03   10000.    
    18 'Normalizat'    .89147       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.0780       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=   7787.591     FROM MIGRAD    STATUS=CONVERGED    379 CALLS     1630 TOTAL
                     EDM=   .10E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.9%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     22.427        12.977        .10917E-06    .45757E-04
   2  Prefactor     .10000E-03    11.890        .12787E-06** at limit **
   3  norm          .10000E-03    7.2158        .37450E-07** at limit **
   4  Prefactor     .10000E-03    3.0422        .73580E-07** at limit **
   5  Prefactor     .10000E-03    11.365        .31169E-07** at limit **
   6  Prefactor     .10000E-03    13.106        .61653E-07** at limit **
   7  Prefactor     .10000E-03    4.1197        .22680E-07** at limit **
   8  norm          2.9473        1.3419        .27615E-07   -.10299E-02
   9  Prefactor     .10003E-03    3.1604        .19209E-05** at limit **
  10  Prefactor     1.3096        3.7720        .19211E-05    .54596E-04
  11  Prefactor     17.344        8.3087        .67440E-06    .69343E-04
  12  Prefactor     19.836        9.0125       -.65041E-06   -.42287E-03
  13  norm          1.0794        .45042       -.11750E-06   -.11220E-02
  14  Prefactor     .94080        5.7640        .40460E-05    .89700E-04
  15  norm          .93264        1.2328       -.10659E-06   -.38824E-03
  16  Prefactor     38.829        22.809       -.91363E-06   -.76454E-03
  17  norm          13.334        9.8547        .88216E-07   -.13329E-04
  18  Normalizat    .89110        .18021        .22843E-07   -.50342E-03
  19  Prefactor     1.0785        .14376       -.92216E-06   -.55505E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 22.4268
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 2.94725
  Prefactor  = 0.000100031
  Prefactor  = 1.30956
  Prefactor  = 17.3439
  Prefactor  = 19.8357
  norm       = 1.07939
  Prefactor  = 0.940803
  norm       = 0.932645
  Prefactor  = 38.8291
  norm       = 13.3338
  Normalizat = 0.891103
  Prefactor  = 1.07849
 **********
 **   18 **HESSE 
 **********

 FCN=   7787.591     FROM HESSE     STATUS=OK           270 CALLS     1900 TOTAL
                     EDM=   .49E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     22.427        12.991        .84581E-04   -1.4760    
   2  Prefactor     .10000E-03    11.905        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .10000E-03    7.2483        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    3.0545        .15027E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    11.369        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    13.119        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    4.1249        .17493E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          2.9473        1.3351        .65539E-04   -1.5365    
   9  Prefactor     .10003E-03    7.8484        .25624E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     1.3096        3.7792        .25311E-03   -1.5479    
  11  Prefactor     17.344        8.3666        .48085E-03   -1.4875    
  12  Prefactor     19.836        8.9522        .89943E-04   -1.4817    
  13  norm          1.0794        .44816        .35006E-04   -1.5500    
  14  Prefactor     .94080        5.8751        .39338E-03   -1.5514    
  15  norm          .93264        1.1072        .10479E-02   -1.5515    
  16  Prefactor     38.829        22.871        .64309E-04   -1.4461    
  17  norm          13.334        9.8428        .10969E-03   -1.4977    
  18  Normalizat    .89110        .20646        .28603E-03   -.96773    
  19  Prefactor     1.0785        .16590        .22764E-03   -.90157    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.9008e-09
Minuit parameter uncertainties:
  1  12.9924
  2  2.28211e-05
  3  1.45718e-05
  4  9.98606e-07
  5  5.45771e-06
  6  3.72731e-06
  7  1.5556e-06
  8  1.33506
  9  0.000982961
  10  3.77985
  11  8.36715
  12  8.95276
  13  0.448162
  14  4.70246
  15  1.10721
  16  22.8764
  17  9.84401
  18  0.206642
  19  0.165978
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.310e+00  3.780e+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:  1.078e+00  1.660e-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:  8.911e-01  2.066e-01  1.000e-02  1.000e+01 ( 1.000e+00)


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

Saving results to:
/scratch/kocevski/298556/likelihoodResults_660268801_660528001_4FGL_J1040.5+0617_daily_bin1624.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) = 7785.92431229
delta logL = 1.66634993855

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 7785.88089942
delta logL = 1.70976280784

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .14295       1.0000         .10000E-03   10000.    
     2 'Index     '    4.7228       1.0000          .0000       10.000    
     3 'Normalizat'    .78537       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1379       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=   7785.881     FROM MIGRAD    STATUS=CONVERGED     54 CALLS      243 TOTAL
                     EDM=   .14E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .14259        1.0658        .42524E-02    .25243E-02
   2  Index         4.7240        2.2606        .11623        .18895E-03
   3  Normalizat    .78544        .43588E-01    .68296E-01    .22306E-04
   4  Prefactor     1.1379        .38007E-01    .36296E-01   -.23142E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.142589
  Index      = 4.72404
  Normalizat = 0.785439
  Prefactor  = 1.13788
 **********
 **   18 **HESSE 
 **********

 FCN=   7785.881     FROM HESSE     STATUS=NOT POSDEF    33 CALLS      276 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     .14259        2.4731        .19239E-04   -1.5632    
   2  Index         4.7240        3.7935        .43779E-02   -.55220E-01
   3  Normalizat    .78544        .17318        .30219E-03   -1.0061    
   4  Prefactor     1.1379        .14805        .22225E-03   -.88265    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 4.54911e-07
Minuit parameter uncertainties:
  1  1.18732
  2  4.30886
  3  0.173298
  4  0.148101
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/298556': 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) = 7785.88089909
delta logL = 1.70976313855

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.426e-01  1.187e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  4.724e+00  4.309e+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.138e+00  1.481e-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.854e-01  1.733e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 3.89
Ra Dec: 160.150 6.285
Photon Index (Free Index): 4.72 +/- 4.31
Photon Flux (Free Index): 1.02e-07 +/- 6.30e-08
Energy Flux (Free Index): 1.40e-05 +/- 1.17e-05

Creating a high resolution counts map...
INFO: Auto-setting vmin to -1.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  1.110e+00 [aplpy.core]
Saving /scratch/kocevski/298556/cmap_HighResolution_660268801_660528001_4FGL_J1040.5+0617_daily_bin1624.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='8.15e-03', comment='SUCCESS', energy_flux2='1.40e-05', dlogl='1.71e+00', photon_flux2='1.02e-07', job_status='DONE', time_completed='2021-12-07 21:21:15.698820', photon_index_error2='4.31', photon_index2='4.72', ts='0.15', fit_tolerance='1e-08', GAL='1.08', photon_index_error='0.00', photon_flux_upper_limit='1.06e-07', energy_flux_error2='1.17e-05', EG='0.89', time_epoch_completed='1638940875.7', return_code='0', job_id='298556', GAL2='1.14', EG2='0.79', return_code2='102', photon_flux_error2='6.30e-08', ts2='3.89', photon_index='2.37' WHERE bin_id='1624' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Tue Dec  7 21:21:15 PST 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0142>
Subject: Job 298556: <4FGL_J1040.5+0617_daily_bin1624> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin1624> was submitted from host <rhel6-64e> by user <kocevski> in cluster <slac> at Tue Dec  7 21:10:15 2021
Job was executed on host(s) <bullet0142>, in queue <medium>, as user <kocevski> in cluster <slac> at Tue Dec  7 21:10:50 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Tue Dec  7 21:10:50 2021
Terminated at Tue Dec  7 21:21:16 2021
Results reported at Tue Dec  7 21:21:16 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin1624 160.15 6.2848 660268801 660528001 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 :                                   616.37 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             379.09 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   626 sec.
    Turnaround time :                            661 sec.

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

