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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin655
RA = 160.15, Dec = 6.2848
tmin = 409104001, tmax = 409363201
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='65581', job_status='RUN', time_executed='2021-09-02 08:25:22.677395', time_epoch_executed='1630596322.68' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='655'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/65581

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/65581/ft1_4FGL_J1040.5+0617_daily_bin655.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/65581/ft2_4FGL_J1040.5+0617_daily_bin655.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/65581/ft1_4FGL_J1040.5+0617_daily_bin655.fits outfile=/scratch/kocevski/65581/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin655.fits ra=160.15 dec=6.2848 rad=12.0 tmin=409104001.0 tmax=409363201.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 5.50
user 5.26
sys 0.22

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/65581/ft2_4FGL_J1040.5+0617_daily_bin655.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/65581/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin655.fits evtable="EVENTS" outfile="/scratch/kocevski/65581/ft1_filtered_4FGL_J1040.5+0617_daily_bin655.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/65581/ft1_filtered_4FGL_J1040.5+0617_daily_bin655.fits" evtable="EVENTS" scfile=/scratch/kocevski/65581/ft2_4FGL_J1040.5+0617_daily_bin655.fits sctable="SC_DATA" outfile=/scratch/kocevski/65581/ltcube_409104001_409363201_4FGL_J1040.5+0617_daily_bin655.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/65581/ft2_4FGL_J1040.5+0617_daily_bin655.fits
.....................!
real 14.93
user 14.54
sys 0.35

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/65581/ft1_filtered_4FGL_J1040.5+0617_daily_bin655.fits evtable="EVENTS" scfile=/scratch/kocevski/65581/ft2_4FGL_J1040.5+0617_daily_bin655.fits sctable="SC_DATA" expcube=/scratch/kocevski/65581/ltcube_409104001_409363201_4FGL_J1040.5+0617_daily_bin655.fits outfile=/scratch/kocevski/65581/expmap_409104001_409363201_4FGL_J1040.5+0617_daily_bin655.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/65581/ltcube_409104001_409363201_4FGL_J1040.5+0617_daily_bin655.fits
.....................!
real 192.70
user 186.71
sys 5.49

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/65581/ft1_filtered_4FGL_J1040.5+0617_daily_bin655.fits scfile=/scratch/kocevski/65581/ft2_4FGL_J1040.5+0617_daily_bin655.fits outfile=/scratch/kocevski/65581/cmap_409104001_409363201_4FGL_J1040.5+0617_daily_bin655.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.55
user 0.39
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/65581/ft1_filtered_4FGL_J1040.5+0617_daily_bin655.fits scfile=/scratch/kocevski/65581/ft2_4FGL_J1040.5+0617_daily_bin655.fits outfile=/scratch/kocevski/65581/cmap_HighResolution_409104001_409363201_4FGL_J1040.5+0617_daily_bin655.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.57
user 0.40
sys 0.16

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    1.0408       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10446E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    .10108E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    1.5033       1.0000         .10000E-03   10000.    
     5 'Prefactor '    36.137       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    1.5004       1.0000         .10000E-03   10000.    
     9 'Prefactor '    8.8207       1.0000         .10000E-03   10000.    
    10 'Prefactor '    2.8724       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .78431       1.0000         .10000E-03   10000.    
    12 'Prefactor '    1.9024       1.0000         .10000E-03   10000.    
    13 'norm      '    .41293       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    .10003E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    27.368       1.0000         .10000E-03   10000.    
    17 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    18 'Normalizat'    .96416       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.2175       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=   5407.825     FROM MIGRAD    STATUS=CONVERGED    409 CALLS     1917 TOTAL
                     EDM=   .11E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  3.8%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     1.0377        17.174       -.25415E-05   -.34423E-04
   2  Prefactor     .10000E-03    81.499       -.27773E-06** at limit **
   3  norm          .10000E-03    10.071        .52987E-06** at limit **
   4  Prefactor     1.4757        18.503        .30086E-06   -.18505E-03
   5  Prefactor     36.176        78.382       -.14954E-05   -.68519E-04
   6  Prefactor     .10000E-03    38.421        .16198E-05** at limit **
   7  Prefactor     .10000E-03    9.4053        .73158E-06** at limit **
   8  norm          1.5003        1.2731        .55194E-08   -.40077E-03
   9  Prefactor     8.8184        7.0465        .25237E-06   -.10064E-03
  10  Prefactor     2.8706        4.7600       -.37360E-06   -.32952E-04
  11  Prefactor     .79234        5.2000        .92701E-07   -.11808E-03
  12  Prefactor     1.9082        10.749        .90448E-05   -.41662E-03
  13  norm          .41299        .49683       -.77033E-07   -.61389E-03
  14  Prefactor     .10000E-03    3.2492       -.11137E-06** at limit **
  15  norm          .10000E-03    .71715       -.29284E-06** at limit **
  16  Prefactor     27.366        31.857        .68222E-06    .19425E-04
  17  norm          .10000E-03    5.4275       -.77915E-07** at limit **
  18  Normalizat    .96431        .22768       -.56524E-05   -.83172E-03
  19  Prefactor     1.2173        .18093        .20664E-05   -.68512E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 1.0377
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 1.47569
  Prefactor  = 36.1757
  Prefactor  = 0.000100003
  Prefactor  = 0.000100001
  norm       = 1.50034
  Prefactor  = 8.81838
  Prefactor  = 2.8706
  Prefactor  = 0.792336
  Prefactor  = 1.90816
  norm       = 0.41299
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 27.366
  norm       = 0.0001
  Normalizat = 0.964311
  Prefactor  = 1.21727
 **********
 **   18 **HESSE 
 **********

 FCN=   5407.825     FROM HESSE     STATUS=OK           274 CALLS     2191 TOTAL
                     EDM=   .38E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     1.0377        64.304        .48752E-02   -1.5504    
   2  Prefactor     .10000E-03    82.236        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .10000E-03    10.103        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     1.4757        17.523        .34914E-03   -1.5465    
   5  Prefactor     36.176        80.075        .66667E-04   -1.4504    
   6  Prefactor     .10000E-03    38.631        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    9.4534        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          1.5003        1.2673        .73306E-04   -1.5463    
   9  Prefactor     8.8184        7.0528        .13496E-03   -1.5114    
  10  Prefactor     2.8706        4.7630        .18674E-03   -1.5369    
  11  Prefactor     .79234        26.355        .30430E-02   -1.5530    
  12  Prefactor     1.9082        11.703        .15076E-02   -1.5432    
  13  norm          .41299        .46727        .53912E-03   -1.5579    
  14  Prefactor     .10000E-03    3.2536        .12940E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          .10000E-03    1.1017        .11819E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     27.366        32.013        .76579E-04   -1.4661    
  17  norm          .10000E-03    5.4384        .16732E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    .96431        .26604        .28570E-03   -.94236    
  19  Prefactor     1.2173        .20956        .22574E-03   -.85802    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.81059e-08
Minuit parameter uncertainties:
  1  16.3551
  2  6.58788e-05
  3  0.000127146
  4  10.1735
  5  80.314
  6  0.000712597
  7  0.000163551
  8  1.26728
  9  7.05344
  10  4.76362
  11  9.1432
  12  9.45357
  13  0.46727
  14  1.4546e-05
  15  6.46152e-06
  16  32.0335
  17  1.0652e-05
  18  0.266403
  19  0.209704
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  2.871e+00  4.764e+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.097e-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.643e-01  2.664e-01  1.000e-02  1.000e+01 ( 1.000e+00)


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

Saving results to:
/scratch/kocevski/65581/likelihoodResults_409104001_409363201_4FGL_J1040.5+0617_daily_bin655.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) = 5407.7652301
delta logL = 0.0597508421588

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5407.76141751
delta logL = 0.0635634313921

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    3.7257       1.0000         .10000E-03   10000.    
     2 'Index     '    2.0619       1.0000          .0000       10.000    
     3 'Normalizat'    .97532       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.2084       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=   5407.761     FROM MIGRAD    STATUS=CONVERGED     53 CALLS      243 TOTAL
                     EDM=   .19E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     3.7247        228.37        .52300E-02    .44306E-03
   2  Index         2.0622        5.6560        .25444       -.22911E-05
   3  Normalizat    .97530        .76202E-01    .45857E-01    .43196E-05
   4  Prefactor     1.2085        .72983E-01    .51208E-01   -.81049E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 3.72469
  Index      = 2.06219
  Normalizat = 0.975299
  Prefactor  = 1.20848
 **********
 **   18 **HESSE 
 **********

 FCN=   5407.761     FROM HESSE     STATUS=OK            33 CALLS      276 TOTAL
                     EDM=   .51E-12    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     3.7247        5.4489        .19409E-03   -1.5322    
   2  Index         2.0622        .76205        .95828E-02   -.62804    
   3  Normalizat    .97530        .23623        .28425E-03   -.93863    
   4  Prefactor     1.2085        .20739        .22639E-03   -.86071    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 5.14127e-13
Minuit parameter uncertainties:
  1  5.44966
  2  0.766633
  3  0.236483
  4  0.207534
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/65581': 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) = 5407.76141741
delta logL = 0.0635635356557

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  3.725e+00  5.450e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.062e+00  7.666e-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.208e+00  2.075e-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.753e-01  2.365e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.44
Ra Dec: 160.150 6.285

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/65581/cmap_HighResolution_409104001_409363201_4FGL_J1040.5+0617_daily_bin655.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.16e-02', job_status='DONE', photon_flux_upper_limit='1.51e-07', time_completed='2021-09-02 08:34:43.351920', job_id='65581', GAL2='1.21', fit_tolerance='1e-08', EG2='0.98', EG='0.96', time_epoch_completed='1630596883.35', return_code2='0', ts='0.44', comment='SUCCESS', return_code='0', GAL='1.22', dlogl='6.36e-02', ts2='0.57', photon_index_error='0.00', photon_index='2.37' WHERE bin_id='655' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:34:43 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0124>
Subject: Job 65581: <4FGL_J1040.5+0617_daily_bin655> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin655> was submitted from host <rhel6-64k> by user <kocevski> in cluster <slac> at Thu Sep  2 08:21:10 2021
Job was executed on host(s) <bullet0124>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:23:36 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:23:36 2021
Terminated at Thu Sep  2 08:34:44 2021
Results reported at Thu Sep  2 08:34:44 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin655 160.15 6.2848 409104001 409363201 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 :                                   558.00 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             291.33 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   667 sec.
    Turnaround time :                            814 sec.

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

