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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin559
RA = 160.15, Dec = 6.2848
tmin = 384220801, tmax = 384480001
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='65444', job_status='RUN', time_executed='2021-09-02 08:24:03.887605', time_epoch_executed='1630596243.89' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='559'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/65444

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/65444/ft1_4FGL_J1040.5+0617_daily_bin559.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/65444/ft2_4FGL_J1040.5+0617_daily_bin559.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/65444/ft1_4FGL_J1040.5+0617_daily_bin559.fits outfile=/scratch/kocevski/65444/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin559.fits ra=160.15 dec=6.2848 rad=12.0 tmin=384220801.0 tmax=384480001.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 11.53
user 11.12
sys 0.34

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/65444/ft1_filtered_4FGL_J1040.5+0617_daily_bin559.fits" evtable="EVENTS" scfile=/scratch/kocevski/65444/ft2_4FGL_J1040.5+0617_daily_bin559.fits sctable="SC_DATA" outfile=/scratch/kocevski/65444/ltcube_384220801_384480001_4FGL_J1040.5+0617_daily_bin559.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/65444/ft2_4FGL_J1040.5+0617_daily_bin559.fits
.....................!
real 13.35
user 12.95
sys 0.31

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/65444/ft1_filtered_4FGL_J1040.5+0617_daily_bin559.fits evtable="EVENTS" scfile=/scratch/kocevski/65444/ft2_4FGL_J1040.5+0617_daily_bin559.fits sctable="SC_DATA" expcube=/scratch/kocevski/65444/ltcube_384220801_384480001_4FGL_J1040.5+0617_daily_bin559.fits outfile=/scratch/kocevski/65444/expmap_384220801_384480001_4FGL_J1040.5+0617_daily_bin559.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/65444/ltcube_384220801_384480001_4FGL_J1040.5+0617_daily_bin559.fits
.....................!
real 158.63
user 152.82
sys 4.86

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/65444/ft1_filtered_4FGL_J1040.5+0617_daily_bin559.fits scfile=/scratch/kocevski/65444/ft2_4FGL_J1040.5+0617_daily_bin559.fits outfile=/scratch/kocevski/65444/cmap_384220801_384480001_4FGL_J1040.5+0617_daily_bin559.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.68
user 0.32
sys 0.16

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

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    17.227       1.0000         .10000E-03   10000.    
     2 'Prefactor '    10.174       1.0000         .10000E-03   10000.    
     3 'norm      '    .10519E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10294E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    28.152       1.0000         .10000E-03   10000.    
     6 'Prefactor '    73.833       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10022E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    .10030E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    8.8809       1.0000         .10000E-03   10000.    
    10 'Prefactor '    7.1266       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .17886E-02   1.0000         .10000E-03   10000.    
    12 'Prefactor '    4.6796       1.0000         .10000E-03   10000.    
    13 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    .59692E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    21.343       1.0000         .10000E-03   10000.    
    17 'norm      '    .10003E-03   1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.4667       1.0000         .10000E-01   10.000    
    19 'Prefactor '    .86585       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=   4447.750     FROM MIGRAD    STATUS=CONVERGED    389 CALLS     1985 TOTAL
                     EDM=   .11E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  3.4%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     17.230        14.971       -.14377E-06    .27972E-04
   2  Prefactor     10.187        127.41        .75167E-05    .57428E-04
   3  norm          .10000E-03    26.805        .18789E-05** at limit **
   4  Prefactor     .10000E-03    13.487        .93141E-06** at limit **
   5  Prefactor     28.167        75.370        .56498E-05    .16536E-03
   6  Prefactor     73.853        59.320        .39627E-05    .43657E-03
   7  Prefactor     .10000E-03    7.8663        .21756E-06** at limit **
   8  norm          .10000E-03    1.1724        .99576E-07** at limit **
   9  Prefactor     8.8839        13.192        .26916E-07   -.30474E-04
  10  Prefactor     7.1270        4.4366       -.19548E-06   -.43354E-04
  11  Prefactor     .10002E-03    7.1777       -.58746E-06** at limit **
  12  Prefactor     4.6807        9.8288        .51128E-05   -.65075E-03
  13  norm          .10000E-03    .29765       -.74116E-07** at limit **
  14  Prefactor     .10000E-03    4.6634       -.86058E-07** at limit **
  15  norm          .10007E-03    1.0216       -.57096E-07** at limit **
  16  Prefactor     21.343        24.488       -.14612E-06   -.34485E-04
  17  norm          .10000E-03    29.840       -.79596E-06** at limit **
  18  Normalizat    1.4667        .25410       -.19663E-05    .93026E-04
  19  Prefactor     .86573        .20467        .78898E-07   -.47175E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 17.2302
  Prefactor  = 10.1865
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 28.1674
  Prefactor  = 73.853
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 8.88391
  Prefactor  = 7.12699
  Prefactor  = 0.000100025
  Prefactor  = 4.68071
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 0.000100074
  Prefactor  = 21.3425
  norm       = 0.0001
  Normalizat = 1.46671
  Prefactor  = 0.865732
 **********
 **   18 **HESSE 
 **********

 FCN=   4447.750     FROM HESSE     STATUS=OK           266 CALLS     2251 TOTAL
                     EDM=   .67E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     17.230        14.955        .96497E-04   -1.4878    
   2  Prefactor     10.187        129.09        .12562E-03   -1.5070    
   3  norm          .10000E-03    26.848        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    13.529        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     28.167        76.328        .75507E-04   -1.4646    
   6  Prefactor     73.853        61.577        .23363E-03   -1.3987    
   7  Prefactor     .10000E-03    7.8681        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .10000E-03    2.0113        .13850E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     8.8839        13.108        .13450E-03   -1.5112    
  10  Prefactor     7.1270        4.4386        .10601E-03   -1.5174    
  11  Prefactor     .10002E-03    25.869        .34062E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     4.6807        10.426        .93015E-03   -1.5275    
  13  norm          .10000E-03    .30446        .35510E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10000E-03    4.6688        .14066E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          .10007E-03    21.185        .12748E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     21.343        24.492        .86699E-04   -1.4784    
  17  norm          .10000E-03    30.144        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    1.4667        .29103        .25551E-03   -.78718    
  19  Prefactor     .86573        .23891        .27027E-03   -.97349    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.65762e-09
Minuit parameter uncertainties:
  1  14.9581
  2  72.719
  3  4.52391e-05
  4  0.00013972
  5  76.5945
  6  61.6297
  7  3.19586e-05
  8  3.20909e-05
  9  13.1121
  10  4.43885
  11  0.00160598
  12  10.4296
  13  3.48945e-07
  14  2.53113e-06
  15  0.0025117
  16  24.5038
  17  9.94758e-05
  18  0.291357
  19  0.2392
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  7.127e+00  4.439e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.368e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
218        Scale:  8.643e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
533    Prefactor:  8.657e-01  2.392e-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.467e+00  2.914e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 7.98
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 8.61e-08 +/- 5.36e-08
Energy Flux (Fixed Index): 2.95e-05 +/- 1.84e-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) = 4444.83295183
delta logL = 2.91692878966

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 4444.81744904
delta logL = 2.9324315824

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    7.5231       1.0000         .10000E-03   10000.    
     2 'Index     '    1.4127       1.0000          .0000       10.000    
     3 'Normalizat'    1.5167       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .83864       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=   4444.817     FROM MIGRAD    STATUS=CONVERGED     45 CALLS      204 TOTAL
                     EDM=   .18E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     7.5231        4.6957        .36554E-02   -.22509E-02
   2  Index         1.4127        .28616        .12215       -.13916E-03
   3  Normalizat    1.5167        .24024        .56987E-01    .40491E-04
   4  Prefactor     .83864        .20256        .44218E-01   -.64164E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 7.52312
  Index      = 1.41271
  Normalizat = 1.51671
  Prefactor  = 0.838636
 **********
 **   18 **HESSE 
 **********

 FCN=   4444.817     FROM HESSE     STATUS=OK            29 CALLS      233 TOTAL
                     EDM=   .27E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     7.5231        5.5400        .10760E-03   -1.5159    
   2  Index         1.4127        .35224        .51840E-02   -.80014    
   3  Normalizat    1.5167        .28113        .25199E-03   -.77310    
   4  Prefactor     .83864        .23705        .27385E-03   -.98319    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.66578e-09
Minuit parameter uncertainties:
  1  5.54034
  2  0.352844
  3  0.281416
  4  0.237335
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/65444': 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) = 4444.81744903
delta logL = 2.93243159834

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  7.523e+00  5.540e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  1.413e+00  3.528e-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:  8.386e-01  2.373e-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.517e+00  2.814e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 13.87
Ra Dec: 160.150 6.285
Photon Index (Free Index): 1.41 +/- 0.35
Photon Flux (Free Index): 3.62e-08 +/- 2.78e-08
Energy Flux (Free Index): 1.53e-04 +/- 1.41e-04

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/65444/cmap_HighResolution_384220801_384480001_4FGL_J1040.5+0617_daily_bin559.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='8.61e-08', energy_flux2='1.53e-04', photon_flux_error='5.36e-08', dlogl='2.93e+00', energy_flux='2.95e-05', photon_flux2='3.62e-08', job_status='DONE', time_completed='2021-09-02 08:31:28.480457', photon_index_error2='0.35', photon_index2='1.41', ts='7.98', fit_tolerance='1e-08', GAL='0.87', photon_index_error='0.00', energy_flux_error2='1.41e-04', EG='1.47', time_epoch_completed='1630596688.48', return_code='0', job_id='65444', GAL2='0.84', EG2='1.52', return_code2='0', energy_flux_error='1.84e-05', photon_flux_error2='2.78e-08', ts2='13.87', photon_index='2.37' WHERE bin_id='559' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:31:28 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0189>
Subject: Job 65444: <4FGL_J1040.5+0617_daily_bin559> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin559 160.15 6.2848 384220801 384480001 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 :                                   437.29 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             222.53 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   596 sec.
    Turnaround time :                            628 sec.

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

