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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin1140
RA = 160.15, Dec = 6.2848
tmin = 534816001, tmax = 535075201
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='68085', job_status='RUN', time_executed='2021-09-02 08:36:25.477129', time_epoch_executed='1630596985.48' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='1140'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/68085

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/68085/ft1_4FGL_J1040.5+0617_daily_bin1140.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/68085/ft2_4FGL_J1040.5+0617_daily_bin1140.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/68085/ft1_4FGL_J1040.5+0617_daily_bin1140.fits outfile=/scratch/kocevski/68085/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin1140.fits ra=160.15 dec=6.2848 rad=12.0 tmin=534816001.0 tmax=535075201.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.70
user 3.37
sys 0.21

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/68085/ft2_4FGL_J1040.5+0617_daily_bin1140.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/68085/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin1140.fits evtable="EVENTS" outfile="/scratch/kocevski/68085/ft1_filtered_4FGL_J1040.5+0617_daily_bin1140.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.53
user 0.34
sys 0.16

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/68085/ft1_filtered_4FGL_J1040.5+0617_daily_bin1140.fits evtable="EVENTS" scfile=/scratch/kocevski/68085/ft2_4FGL_J1040.5+0617_daily_bin1140.fits sctable="SC_DATA" expcube=/scratch/kocevski/68085/ltcube_534816001_535075201_4FGL_J1040.5+0617_daily_bin1140.fits outfile=/scratch/kocevski/68085/expmap_534816001_535075201_4FGL_J1040.5+0617_daily_bin1140.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/68085/ltcube_534816001_535075201_4FGL_J1040.5+0617_daily_bin1140.fits
.....................!
real 192.80
user 187.07
sys 5.20

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/68085/ft1_filtered_4FGL_J1040.5+0617_daily_bin1140.fits scfile=/scratch/kocevski/68085/ft2_4FGL_J1040.5+0617_daily_bin1140.fits outfile=/scratch/kocevski/68085/cmap_534816001_535075201_4FGL_J1040.5+0617_daily_bin1140.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.56
user 0.39
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/68085/ft1_filtered_4FGL_J1040.5+0617_daily_bin1140.fits scfile=/scratch/kocevski/68085/ft2_4FGL_J1040.5+0617_daily_bin1140.fits outfile=/scratch/kocevski/68085/cmap_HighResolution_534816001_535075201_4FGL_J1040.5+0617_daily_bin1140.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.39
sys 0.15

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    6.1615       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10008E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    .10197E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .12277E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .15548E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    2.7521       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10991E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    5.0904       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10874       1.0000         .10000E-03   10000.    
    10 'Prefactor '    38.413       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .23259E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    8.3696       1.0000         .10000E-03   10000.    
    13 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    3.3831       1.0000         .10000E-03   10000.    
    15 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10014E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    10.655       1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.2545       1.0000         .10000E-01   10.000    
    19 'Prefactor '    .75926       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5360E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   5309.555     FROM MIGRAD    STATUS=CONVERGED    689 CALLS     1985 TOTAL
                     EDM=   .39E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     6.1501        12.406        .16173E-03   -.14663E-03
   2  Prefactor     .10000E-03    12.129        .18142E-02** at limit **
   3  norm          .10007E-03    188.16        .46659E-02** at limit **
   4  Prefactor     .10000E-03    17.197        .18142E-02** at limit **
   5  Prefactor     .10004E-03    141.34        .18142E-02** at limit **
   6  Prefactor     2.7054        253.92        .24539E-03    .42531E-04
   7  Prefactor     .10000E-03    20.654        .18142E-02** at limit **
   8  norm          5.0905        1.9010        .58897E-04    .12354E-04
   9  Prefactor     .96047E-01    39.239        .29859E-02   -.39006E-03
  10  Prefactor     38.412        6.7561        .32334E-03   -.62786E-03
  11  Prefactor     .10000E-03    11.570        .30679E-02** at limit **
  12  Prefactor     8.3698        9.8697        .13857E-03   -.86309E-04
  13  norm          .10000E-03    .17330        .58450E-04** at limit **
  14  Prefactor     3.3780        10.038        .21998E-03   -.31525E-05
  15  norm          .10000E-03    .39803        .88645E-04** at limit **
  16  Prefactor     .10000E-03    6.7049        .18142E-02** at limit **
  17  norm          10.652        13.235        .12274E-03    .46311E-05
  18  Normalizat    1.2548        .24053        .24841E-03   -.18084E-03
  19  Prefactor     .75918        .19729        .26302E-03    .89083E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 6.15013
  Prefactor  = 0.0001
  norm       = 0.00010007
  Prefactor  = 0.0001
  Prefactor  = 0.000100039
  Prefactor  = 2.70545
  Prefactor  = 0.0001
  norm       = 5.09046
  Prefactor  = 0.0960467
  Prefactor  = 38.4118
  Prefactor  = 0.000100002
  Prefactor  = 8.36982
  norm       = 0.0001
  Prefactor  = 3.37796
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 10.6518
  Normalizat = 1.25482
  Prefactor  = 0.759178
 **********
 **   18 **HESSE 
 **********

 FCN=   5309.555     FROM HESSE     STATUS=OK           250 CALLS     2235 TOTAL
                     EDM=   .50E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     6.1501        12.345        .64693E-05   -1.5212    
   2  Prefactor     .10000E-03    12.129        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .10007E-03    192.07        .18664E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    17.199        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10004E-03    141.39        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     2.7054        252.97        .98154E-05   -1.5379    
   7  Prefactor     .10000E-03    20.655        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          5.0905        1.8992        .23559E-05   -1.5257    
   9  Prefactor     .96047E-01    40.759        .11944E-03   -1.5646    
  10  Prefactor     38.412        6.7560        .64668E-04   -1.4468    
  11  Prefactor     .10000E-03    11.633        .61358E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     8.3698        9.8674        .55428E-05   -1.5129    
  13  norm          .10000E-03    .17330        .11690E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     3.3780        10.034        .87993E-05   -1.5340    
  15  norm          .10000E-03    .39803        .17729E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     .10000E-03    6.7051        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          10.652        13.233        .49097E-05   -1.5055    
  18  Normalizat    1.2548        .24058        .49683E-04   -.84925    
  19  Prefactor     .75918        .19741        .10521E-04   -1.0125    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.96218e-09
Minuit parameter uncertainties:
  1  12.3498
  2  3.94453e-05
  3  0.00735435
  4  0.000182699
  5  0.00470506
  6  52.5513
  7  8.38561e-05
  8  1.89918
  9  3.95782
  10  6.75613
  11  0.000288902
  12  9.86934
  13  6.62652e-07
  14  10.0388
  15  2.58041e-07
  16  5.78454e-06
  17  13.2371
  18  0.240797
  19  0.19759
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  3.841e+01  6.756e+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:  7.592e-01  1.976e-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.255e+00  2.408e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 107.43
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 4.64e-07 +/- 8.16e-08
Energy Flux (Fixed Index): 1.59e-04 +/- 2.79e-05

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) = 5309.42077763
delta logL = 0.134545923621

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5309.28942763
delta logL = 0.265895927547

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    42.575       1.0000         .10000E-03   10000.    
     2 'Index     '    2.2410       1.0000          .0000       10.000    
     3 'Normalizat'    1.2898       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .73911       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=   5309.289     FROM MIGRAD    STATUS=CONVERGED     46 CALLS      204 TOTAL
                     EDM=   .11E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     42.575        15.517        .15360E-02    .66095E-03
   2  Index         2.2410        .28538        .51276E-01    .90892E-04
   3  Normalizat    1.2898        .20661        .55617E-01   -.27736E-06
   4  Prefactor     .73911        .17048        .42919E-01    .17327E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 42.575
  Index      = 2.24095
  Normalizat = 1.2898
  Prefactor  = 0.739108
 **********
 **   18 **HESSE 
 **********

 FCN=   5309.289     FROM HESSE     STATUS=OK            29 CALLS      233 TOTAL
                     EDM=   .86E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     42.575        9.1506        .61438E-04   -1.4402    
   2  Index         2.2410        .17117        .22377E-03   -.58453    
   3  Normalizat    1.2898        .23863        .24593E-03   -.83871    
   4  Prefactor     .73911        .19752        .26621E-03   -1.0201    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 8.6357e-11
Minuit parameter uncertainties:
  1  9.15093
  2  0.171219
  3  0.238831
  4  0.197711
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/68085': 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) = 5309.28942763
delta logL = 0.265895928393

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  4.258e+01  9.151e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.241e+00  1.712e-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:  7.391e-01  1.977e-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.290e+00  2.388e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 107.88
Ra Dec: 160.150 6.285
Photon Index (Free Index): 2.24 +/- 0.17
Photon Flux (Free Index): 4.31e-07 +/- 8.88e-08
Energy Flux (Free Index): 1.80e-04 +/- 4.64e-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/68085/cmap_HighResolution_534816001_535075201_4FGL_J1040.5+0617_daily_bin1140.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='4.64e-07', energy_flux2='1.80e-04', photon_flux_error='8.16e-08', dlogl='2.66e-01', energy_flux='1.59e-04', photon_flux2='4.31e-07', job_status='DONE', time_completed='2021-09-02 08:45:28.079042', photon_index_error2='0.17', photon_index2='2.24', ts='107.43', fit_tolerance='1e-08', GAL='0.76', photon_index_error='0.00', energy_flux_error2='4.64e-05', EG='1.25', time_epoch_completed='1630597528.08', return_code='0', job_id='68085', GAL2='0.74', EG2='1.29', return_code2='0', energy_flux_error='2.79e-05', photon_flux_error2='8.88e-08', ts2='107.88', photon_index='2.37' WHERE bin_id='1140' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:45:28 PDT 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0185>
Subject: Job 68085: <4FGL_J1040.5+0617_daily_bin1140> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin1140 160.15 6.2848 534816001 535075201 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 :                                   519.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             292.78 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   722 sec.
    Turnaround time :                            833 sec.

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

