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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin604
RA = 160.15, Dec = 6.2848
tmin = 395884801, tmax = 396144001
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='65506', job_status='RUN', time_executed='2021-09-02 08:23:04.960101', time_epoch_executed='1630596184.96' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='604'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/65506

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/65506/ft1_4FGL_J1040.5+0617_daily_bin604.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/65506/ft2_4FGL_J1040.5+0617_daily_bin604.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/65506/ft1_4FGL_J1040.5+0617_daily_bin604.fits outfile=/scratch/kocevski/65506/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin604.fits ra=160.15 dec=6.2848 rad=12.0 tmin=395884801.0 tmax=396144001.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.33
user 3.08
sys 0.20

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/65506/ft1_filtered_4FGL_J1040.5+0617_daily_bin604.fits" evtable="EVENTS" scfile=/scratch/kocevski/65506/ft2_4FGL_J1040.5+0617_daily_bin604.fits sctable="SC_DATA" outfile=/scratch/kocevski/65506/ltcube_395884801_396144001_4FGL_J1040.5+0617_daily_bin604.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/65506/ft2_4FGL_J1040.5+0617_daily_bin604.fits
.....................!
real 14.00
user 13.66
sys 0.30

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/65506/ft1_filtered_4FGL_J1040.5+0617_daily_bin604.fits evtable="EVENTS" scfile=/scratch/kocevski/65506/ft2_4FGL_J1040.5+0617_daily_bin604.fits sctable="SC_DATA" expcube=/scratch/kocevski/65506/ltcube_395884801_396144001_4FGL_J1040.5+0617_daily_bin604.fits outfile=/scratch/kocevski/65506/expmap_395884801_396144001_4FGL_J1040.5+0617_daily_bin604.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/65506/ltcube_395884801_396144001_4FGL_J1040.5+0617_daily_bin604.fits
.....................!
real 191.50
user 186.00
sys 5.07

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

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

This is gtbin version HEAD
real 0.54
user 0.39
sys 0.14

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

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    10.805       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10011E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    .10006E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    8.6680       1.0000         .10000E-03   10000.    
     5 'Prefactor '    26.589       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .13968E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    5.8568       1.0000         .10000E-03   10000.    
     9 'Prefactor '    3.2685       1.0000         .10000E-03   10000.    
    10 'Prefactor '    5.5696       1.0000         .10000E-03   10000.    
    11 'Prefactor '    8.7579       1.0000         .10000E-03   10000.    
    12 'Prefactor '    2.5877       1.0000         .10000E-03   10000.    
    13 'norm      '    .10021E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    1.9315       1.0000         .10000E-03   10000.    
    16 'Prefactor '    10.219       1.0000         .10000E-03   10000.    
    17 'norm      '    32.335       1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.2803       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.0781       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=   6444.527     FROM MIGRAD    STATUS=CONVERGED    426 CALLS     2219 TOTAL
                     EDM=   .15E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  3.3%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     10.804        10.773        .59281E-06    .82735E-04
   2  Prefactor     .10000E-03    24.632       -.36612E-06** at limit **
   3  norm          .10000E-03    27.445        .95104E-06** at limit **
   4  Prefactor     8.6529        12.295       -.13715E-05    .13239E-03
   5  Prefactor     26.619        68.558       -.34877E-05   -.31314E-04
   6  Prefactor     .10000E-03    75.387        .59957E-06** at limit **
   7  Prefactor     .10032E-03    24.333        .60844E-06** at limit **
   8  norm          5.8566        2.0749       -.56283E-07    .36557E-04
   9  Prefactor     3.2658        6.9624        .15911E-05   -.62171E-04
  10  Prefactor     5.5698        4.4334        .14880E-06   -.47906E-05
  11  Prefactor     8.7571        7.6904       -.15669E-06   -.10798E-03
  12  Prefactor     2.5886        8.3519        .23098E-05   -.61998E-04
  13  norm          .10000E-03    .22209       -.34209E-08** at limit **
  14  Prefactor     .10000E-03    5.9369        .16975E-07** at limit **
  15  norm          1.9316        1.4722        .54293E-07    .11361E-03
  16  Prefactor     10.220        27.695        .56880E-07   -.18189E-05
  17  norm          32.338        19.299        .16496E-06    .36177E-05
  18  Normalizat    1.2803        .23499       -.14486E-05   -.12751E-03
  19  Prefactor     1.0781        .17893        .24699E-06    .62874E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 10.8037
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 8.65285
  Prefactor  = 26.6187
  Prefactor  = 0.0001
  Prefactor  = 0.000100322
  norm       = 5.85664
  Prefactor  = 3.26583
  Prefactor  = 5.56976
  Prefactor  = 8.75712
  Prefactor  = 2.58864
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 1.93162
  Prefactor  = 10.2198
  norm       = 32.3383
  Normalizat = 1.28029
  Prefactor  = 1.07806
 **********
 **   18 **HESSE 
 **********

 FCN=   6444.527     FROM HESSE     STATUS=OK           284 CALLS     2503 TOTAL
                     EDM=   .38E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     10.804        10.738        .12188E-03   -1.5050    
   2  Prefactor     .10000E-03    24.693        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .10000E-03    28.051        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     8.6529        14.103        .13615E-03   -1.5120    
   5  Prefactor     26.619        69.263        .77690E-04   -1.4676    
   6  Prefactor     .10000E-03    75.613        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10032E-03    30.625        .10122       -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          5.8566        2.0744        .65345E-04   -1.5224    
   9  Prefactor     3.2658        6.9845        .11200E-02   -1.5347    
  10  Prefactor     5.5698        4.4095        .69472E-03   -1.5236    
  11  Prefactor     8.7571        7.6884        .13545E-03   -1.5116    
  12  Prefactor     2.5886        8.3822        .12684E-02   -1.5386    
  13  norm          .10000E-03    .42309        .72781E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10000E-03    5.9963        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          1.9316        1.4627        .80446E-04   -1.5430    
  16  Prefactor     10.220        27.760        .12534E-03   -1.5068    
  17  norm          32.338        19.352        .70466E-04   -1.4570    
  18  Normalizat    1.2803        .27706        .28573E-03   -.84157    
  19  Prefactor     1.0781        .21372        .25879E-03   -.90171    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.77298e-10
Minuit parameter uncertainties:
  1  10.7394
  2  4.03085e-05
  3  0.000150878
  4  14.1087
  5  69.4735
  6  0.000172502
  7  0.00628537
  8  2.07444
  9  6.98623
  10  4.40975
  11  7.68927
  12  8.386
  13  2.14278e-06
  14  2.05853e-06
  15  1.46268
  16  27.7954
  17  19.3554
  18  0.277378
  19  0.213887
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  5.570e+00  4.410e+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  2.139e-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.280e+00  2.774e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 2.63
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 6.73e-08 +/- 5.32e-08
Energy Flux (Fixed Index): 2.30e-05 +/- 1.82e-05

TS (Fixed Index): 2.63
Ra Dec: 160.150 6.285
Photon Flux Upper Limit: 1.77e-07 ph cm-2 s-1
Energy Flux Upper Limit: 1.36e-02 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/65506/likelihoodResults_395884801_396144001_4FGL_J1040.5+0617_daily_bin604.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): 0
logL (Free Index) = 6444.51477637
delta logL = 0.0124091500511

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6444.50952064
delta logL = 0.0176648817724

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    5.0893       1.0000         .10000E-03   10000.    
     2 'Index     '    2.5018       1.0000          .0000       10.000    
     3 'Normalizat'    1.2695       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0845       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=   6444.510     FROM MIGRAD    STATUS=CONVERGED     57 CALLS      223 TOTAL
                     EDM=   .47E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     5.0875        97.082        .44557E-02    .51792E-03
   2  Index         2.5023        6.2060        .14642        .13736E-03
   3  Normalizat    1.2694        .10601        .64827E-01   -.50458E-05
   4  Prefactor     1.0846        .73254E-01    .58372E-01    .96278E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 5.08753
  Index      = 2.5023
  Normalizat = 1.26938
  Prefactor  = 1.08464
 **********
 **   18 **HESSE 
 **********

 FCN=   6444.510     FROM HESSE     STATUS=OK            33 CALLS      256 TOTAL
                     EDM=   .70E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     5.0875        5.2958        .13002E-03   -1.5257    
   2  Index         2.5023        .78756        .81133E-02   -.52307    
   3  Normalizat    1.2694        .25843        .28677E-03   -.84485    
   4  Prefactor     1.0846        .21304        .25813E-03   -.89959    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.96712e-11
Minuit parameter uncertainties:
  1  5.2963
  2  0.791963
  3  0.258695
  4  0.213208
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/65506': 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) = 6444.50952027
delta logL = 0.0176652483815

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  5.088e+00  5.296e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.502e+00  7.920e-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.085e+00  2.132e-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.269e+00  2.587e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 2.66
Ra Dec: 160.150 6.285
Photon Index (Free Index): 2.50 +/- 0.79
Photon Flux (Free Index): 7.48e-08 +/- 6.72e-08
Energy Flux (Free Index): 2.17e-05 +/- 1.87e-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/65506/cmap_HighResolution_395884801_396144001_4FGL_J1040.5+0617_daily_bin604.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.36e-02', comment='SUCCESS', photon_flux='6.73e-08', energy_flux2='2.17e-05', photon_flux_error='5.32e-08', dlogl='1.77e-02', energy_flux='2.30e-05', photon_flux2='7.48e-08', job_status='DONE', time_completed='2021-09-02 08:33:28.209624', photon_index_error2='0.79', photon_index2='2.50', ts='2.63', fit_tolerance='1e-08', GAL='1.08', photon_index_error='0.00', photon_flux_upper_limit='1.77e-07', energy_flux_error2='1.87e-05', EG='1.28', time_epoch_completed='1630596808.21', return_code='0', job_id='65506', GAL2='1.08', EG2='1.27', return_code2='0', energy_flux_error='1.82e-05', photon_flux_error2='6.72e-08', ts2='2.66', photon_index='2.37' WHERE bin_id='604' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:33:28 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0169>
Subject: Job 65506: <4FGL_J1040.5+0617_daily_bin604> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin604 160.15 6.2848 395884801 396144001 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 :                                   612.00 sec.
    Max Memory :                                 1093 MB
    Average Memory :                             347.85 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   638 sec.
    Turnaround time :                            743 sec.

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

