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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin535
RA = 160.15, Dec = 6.2848
tmin = 378000001, tmax = 378259201
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='64466', job_status='RUN', time_executed='2021-09-02 08:19:51.855335', time_epoch_executed='1630595991.86' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='535'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/64466

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

Retrieving the FT1 file...

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

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

Retrieving 48 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/64466/ft1_4FGL_J1040.5+0617_daily_bin535.fits


Retrieving the FT1 file...

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

Retrieving 48 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/64466/ft2_4FGL_J1040.5+0617_daily_bin535.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/64466/ft1_4FGL_J1040.5+0617_daily_bin535.fits outfile=/scratch/kocevski/64466/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin535.fits ra=160.15 dec=6.2848 rad=12.0 tmin=378000001.0 tmax=378259201.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.52
user 3.28
sys 0.22

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/64466/ft1_filtered_4FGL_J1040.5+0617_daily_bin535.fits" evtable="EVENTS" scfile=/scratch/kocevski/64466/ft2_4FGL_J1040.5+0617_daily_bin535.fits sctable="SC_DATA" outfile=/scratch/kocevski/64466/ltcube_378000001_378259201_4FGL_J1040.5+0617_daily_bin535.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/64466/ft2_4FGL_J1040.5+0617_daily_bin535.fits
.....................!
real 16.88
user 16.44
sys 0.36

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/64466/ft1_filtered_4FGL_J1040.5+0617_daily_bin535.fits evtable="EVENTS" scfile=/scratch/kocevski/64466/ft2_4FGL_J1040.5+0617_daily_bin535.fits sctable="SC_DATA" expcube=/scratch/kocevski/64466/ltcube_378000001_378259201_4FGL_J1040.5+0617_daily_bin535.fits outfile=/scratch/kocevski/64466/expmap_378000001_378259201_4FGL_J1040.5+0617_daily_bin535.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/64466/ltcube_378000001_378259201_4FGL_J1040.5+0617_daily_bin535.fits
.....................!
real 193.32
user 187.20
sys 5.48

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/64466/ft1_filtered_4FGL_J1040.5+0617_daily_bin535.fits scfile=/scratch/kocevski/64466/ft2_4FGL_J1040.5+0617_daily_bin535.fits outfile=/scratch/kocevski/64466/cmap_378000001_378259201_4FGL_J1040.5+0617_daily_bin535.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/64466/ft1_filtered_4FGL_J1040.5+0617_daily_bin535.fits scfile=/scratch/kocevski/64466/ft2_4FGL_J1040.5+0617_daily_bin535.fits outfile=/scratch/kocevski/64466/cmap_HighResolution_378000001_378259201_4FGL_J1040.5+0617_daily_bin535.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.56
user 0.39
sys 0.16

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10054E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    6.3859       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10006E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10008E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10012E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10873E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    3.1882       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    3.8192       1.0000         .10000E-03   10000.    
    11 'Prefactor '    6.8639       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .97984       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10016E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    .30259       1.0000         .10000E-03   10000.    
    16 'Prefactor '    27.276       1.0000         .10000E-03   10000.    
    17 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    18 'Normalizat'    .97656       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.2171       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=   5999.294     FROM MIGRAD    STATUS=CONVERGED    387 CALLS     1627 TOTAL
                     EDM=   .61E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    22.411        .90712E-02** at limit **
   2  Prefactor     .10000E-03    15.116        .90712E-02** at limit **
   3  norm          6.3934        12.849        .39708E-02    .11688E-03
   4  Prefactor     .10000E-03    6.2499        .90712E-02** at limit **
   5  Prefactor     .10006E-03    30.061        .90712E-02** at limit **
   6  Prefactor     .10001E-03    50.597        .90712E-02** at limit **
   7  Prefactor     .10006E-03    34.123        .90712E-02** at limit **
   8  norm          3.1883        1.8142        .56735E-02    .38981E-03
   9  Prefactor     .10000E-03    1.5302        .90712E-02** at limit **
  10  Prefactor     3.8191        2.7871        .51633E-02    .13903E-03
  11  Prefactor     6.8634        7.0717        .38285E-02    .82818E-03
  12  Prefactor     .10000E-03    2.7211        .90712E-02** at limit **
  13  norm          .97950        .48250        .82432E-02    .15162E-03
  14  Prefactor     .10000E-03    3.8457        .90712E-02** at limit **
  15  norm          .30221        1.1586        .10436E-01    .19936E-02
  16  Prefactor     27.274        20.100        .19177E-02    .32456E-03
  17  norm          .10000E-03    6.2788        .90712E-02** at limit **
  18  Normalizat    .97670        .20279        .45873E-01    .94429E-04
  19  Prefactor     1.2171        .17393        .51548E-01    .86388E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100002
  Prefactor  = 0.0001
  norm       = 6.39342
  Prefactor  = 0.0001
  Prefactor  = 0.000100057
  Prefactor  = 0.000100006
  Prefactor  = 0.000100064
  norm       = 3.18826
  Prefactor  = 0.0001
  Prefactor  = 3.81914
  Prefactor  = 6.86342
  Prefactor  = 0.0001
  norm       = 0.979502
  Prefactor  = 0.0001
  norm       = 0.302207
  Prefactor  = 27.2739
  norm       = 0.0001
  Normalizat = 0.976695
  Prefactor  = 1.21706
 **********
 **   18 **HESSE 
 **********

 FCN=   5999.294     FROM HESSE     STATUS=OK           262 CALLS     1889 TOTAL
                     EDM=   .44E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    22.853        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    15.123        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          6.3934        12.823        .15883E-03   -1.5202    
   4  Prefactor     .10000E-03    6.2729        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10006E-03    30.089        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10001E-03    50.688        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10006E-03    34.744        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          3.1883        1.8104        .74820E-04   -1.5351    
   9  Prefactor     .10000E-03    1.5315        .93563E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     3.8191        2.7859        .10641E-03   -1.5317    
  11  Prefactor     6.8634        7.0690        .15314E-03   -1.5184    
  12  Prefactor     .10000E-03    2.7357        .12475E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .97950        .48134        .36464E-04   -1.5510    
  14  Prefactor     .10000E-03    3.8794        .14822E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          .30221        1.1451        .15222E-03   -1.5598    
  16  Prefactor     27.274        20.098        .76708E-04   -1.4663    
  17  norm          .10000E-03    6.3016        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    .97670        .23642        .28207E-03   -.93815    
  19  Prefactor     1.2171        .20460        .22790E-03   -.85808    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.36041e-09
Minuit parameter uncertainties:
  1  0.00041197
  2  2.44225e-05
  3  12.8284
  4  7.54461e-06
  5  0.00261974
  6  0.00106691
  7  0.00297369
  8  1.81038
  9  1.60363e-06
  10  2.78595
  11  7.06982
  12  5.63624e-06
  13  0.481346
  14  8.50906e-06
  15  1.14514
  16  20.1029
  17  1.69329e-05
  18  0.23667
  19  0.204732
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  3.819e+00  2.786e+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.217e+00  2.047e-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:  9.767e-01  2.367e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 5.21
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 4.61e-08 +/- 3.36e-08
Energy Flux (Fixed Index): 1.58e-05 +/- 1.15e-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) = 5998.40051514
delta logL = 0.893539622498

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5998.36943989
delta logL = 0.924614876661

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    4.5528       1.0000         .10000E-03   10000.    
     2 'Index     '    1.6712       1.0000          .0000       10.000    
     3 'Normalizat'    1.0035       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.2024       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=   5998.369     FROM MIGRAD    STATUS=CONVERGED     52 CALLS      208 TOTAL
                     EDM=   .20E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     4.5535        3.5497        .47166E-02    .18721E-04
   2  Index         1.6712        .40467        .20106       -.38993E-04
   3  Normalizat    1.0035        .19389        .46211E-01    .13337E-04
   4  Prefactor     1.2024        .17305        .51803E-01    .31828E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 4.55352
  Index      = 1.6712
  Normalizat = 1.00354
  Prefactor  = 1.20245
 **********
 **   18 **HESSE 
 **********

 FCN=   5998.369     FROM HESSE     STATUS=OK            33 CALLS      241 TOTAL
                     EDM=   .38E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     4.5535        3.5705        .11878E-03   -1.5281    
   2  Index         1.6712        .46594        .77504E-02   -.72851    
   3  Normalizat    1.0035        .22754        .27868E-03   -.92912    
   4  Prefactor     1.2024        .20326        .22903E-03   -.86256    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.81986e-10
Minuit parameter uncertainties:
  1  3.57062
  2  0.467155
  3  0.227761
  4  0.203394
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/64466': 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) = 5998.36943986
delta logL = 0.924614900853

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  4.554e+00  3.571e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  1.671e+00  4.672e-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.202e+00  2.034e-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.004e+00  2.278e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 7.06
Ra Dec: 160.150 6.285
Photon Index (Free Index): 1.67 +/- 0.47
Photon Flux (Free Index): 2.47e-08 +/- 2.36e-08
Energy Flux (Free Index): 4.42e-05 +/- 5.18e-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/64466/cmap_HighResolution_378000001_378259201_4FGL_J1040.5+0617_daily_bin535.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='4.61e-08', energy_flux2='4.42e-05', photon_flux_error='3.36e-08', dlogl='9.25e-01', energy_flux='1.58e-05', photon_flux2='2.47e-08', job_status='DONE', time_completed='2021-09-02 08:28:30.418043', photon_index_error2='0.47', photon_index2='1.67', ts='5.21', fit_tolerance='1e-08', GAL='1.22', photon_index_error='0.00', energy_flux_error2='5.18e-05', EG='0.98', time_epoch_completed='1630596510.42', return_code='0', job_id='64466', GAL2='1.20', EG2='1.00', return_code2='0', energy_flux_error='1.15e-05', photon_flux_error2='2.36e-08', ts2='7.06', photon_index='2.37' WHERE bin_id='535' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:28:30 PDT 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0133>
Subject: Job 64466: <4FGL_J1040.5+0617_daily_bin535> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin535> was submitted from host <rhel6-64p> by user <kocevski> in cluster <slac> at Thu Sep  2 08:16:36 2021
Job was executed on host(s) <bullet0133>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:19:22 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:19:22 2021
Terminated at Thu Sep  2 08:28:31 2021
Results reported at Thu Sep  2 08:28:31 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin535 160.15 6.2848 378000001 378259201 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 :                                   516.36 sec.
    Max Memory :                                 1241 MB
    Average Memory :                             276.37 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   548 sec.
    Turnaround time :                            715 sec.

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

