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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin738
RA = 160.15, Dec = 6.2848
tmin = 430617601, tmax = 430876801
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='65692', job_status='RUN', time_executed='2021-09-02 08:27:18.562304', time_epoch_executed='1630596438.56' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='738'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/65692

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/65692/ft1_4FGL_J1040.5+0617_daily_bin738.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/65692/ft2_4FGL_J1040.5+0617_daily_bin738.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/65692/ft1_4FGL_J1040.5+0617_daily_bin738.fits outfile=/scratch/kocevski/65692/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin738.fits ra=160.15 dec=6.2848 rad=12.0 tmin=430617601.0 tmax=430876801.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.49
user 5.17
sys 0.22

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/65692/ft1_filtered_4FGL_J1040.5+0617_daily_bin738.fits evtable="EVENTS" scfile=/scratch/kocevski/65692/ft2_4FGL_J1040.5+0617_daily_bin738.fits sctable="SC_DATA" expcube=/scratch/kocevski/65692/ltcube_430617601_430876801_4FGL_J1040.5+0617_daily_bin738.fits outfile=/scratch/kocevski/65692/expmap_430617601_430876801_4FGL_J1040.5+0617_daily_bin738.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/65692/ltcube_430617601_430876801_4FGL_J1040.5+0617_daily_bin738.fits
.....................!
real 192.59
user 185.42
sys 6.23

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/65692/ft1_filtered_4FGL_J1040.5+0617_daily_bin738.fits scfile=/scratch/kocevski/65692/ft2_4FGL_J1040.5+0617_daily_bin738.fits outfile=/scratch/kocevski/65692/cmap_430617601_430876801_4FGL_J1040.5+0617_daily_bin738.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.60
user 0.36
sys 0.19

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/65692/ft1_filtered_4FGL_J1040.5+0617_daily_bin738.fits scfile=/scratch/kocevski/65692/ft2_4FGL_J1040.5+0617_daily_bin738.fits outfile=/scratch/kocevski/65692/cmap_HighResolution_430617601_430876801_4FGL_J1040.5+0617_daily_bin738.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.37
sys 0.17

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    8.9961       1.0000         .10000E-03   10000.    
     2 'Prefactor '    6.9732       1.0000         .10000E-03   10000.    
     3 'norm      '    11.255       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10106E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    162.69       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10257E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10113E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    2.9246       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10012E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    15.653       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .22370E-01   1.0000         .10000E-03   10000.    
    13 'norm      '    1.7033       1.0000         .10000E-03   10000.    
    14 'Prefactor '    10.958       1.0000         .10000E-03   10000.    
    15 'norm      '    3.4399       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.1532       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.6610       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=   7290.477     FROM MIGRAD    STATUS=CONVERGED    393 CALLS     1950 TOTAL
                     EDM=   .62E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .5%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     8.9960        9.2523        .23888E-06    .13161E-04
   2  Prefactor     6.9672        25.715       -.62334E-05   -.15905E-04
   3  norm          11.256        11.421        .22799E-06    .15301E-04
   4  Prefactor     .10000E-03    5.5113        .81033E-06** at limit **
   5  Prefactor     162.69        96.272       -.15929E-05   -.14229E-04
   6  Prefactor     .10000E-03    27.518       -.59720E-07** at limit **
   7  Prefactor     .10000E-03    10.443        .31022E-05** at limit **
   8  norm          2.9248        1.6597        .60043E-08   -.20912E-03
   9  Prefactor     .10000E-03    4.7974        .38579E-07** at limit **
  10  Prefactor     15.638        6.5265       -.13502E-05   -.15550E-03
  11  Prefactor     .10000E-03    2.7438       -.34973E-07** at limit **
  12  Prefactor     .10000E-03    9.6394        .13868E-06** at limit **
  13  norm          1.7025        .99793       -.48802E-06    .40582E-03
  14  Prefactor     10.946        18.254        .52127E-05   -.13397E-03
  15  norm          3.4397        1.8139       -.38527E-07   -.17508E-03
  16  Prefactor     .10000E-03    10.954       -.28317E-05** at limit **
  17  norm          .10000E-03    5.4066       -.80818E-06** at limit **
  18  Normalizat    1.1533        .24903        .67782E-06   -.31664E-04
  19  Prefactor     1.6608        .20256        .12161E-06   -.17863E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 8.99596
  Prefactor  = 6.96721
  norm       = 11.2556
  Prefactor  = 0.0001
  Prefactor  = 162.692
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 2.92481
  Prefactor  = 0.0001
  Prefactor  = 15.6384
  Prefactor  = 0.0001
  Prefactor  = 0.000100004
  norm       = 1.7025
  Prefactor  = 10.9458
  norm       = 3.4397
  Prefactor  = 0.0001
  norm       = 0.0001
  Normalizat = 1.15332
  Prefactor  = 1.66083
 **********
 **   18 **HESSE 
 **********

 FCN=   7290.477     FROM HESSE     STATUS=OK           272 CALLS     2222 TOTAL
                     EDM=   .16E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     8.9960        9.2519        .13363E-03   -1.5108    
   2  Prefactor     6.9672        25.845        .15192E-03   -1.5180    
   3  norm          11.256        11.421        .11941E-03   -1.5037    
   4  Prefactor     .10000E-03    5.5301        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     162.69        96.770        .31618E-04   -1.3150    
   6  Prefactor     .10000E-03    27.527        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    10.498        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          2.9248        1.6565        .79762E-04   -1.5366    
   9  Prefactor     .10000E-03    4.8835        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     15.638        6.3449        .10123E-03   -1.4917    
  11  Prefactor     .10000E-03    2.7506        .13811E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    78.982        .46377E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          1.7025        1.0133        .48087E-04   -1.5447    
  14  Prefactor     10.946        18.029        .12103E-03   -1.5046    
  15  norm          3.4397        1.8157        .79837E-04   -1.5337    
  16  Prefactor     .10000E-03    10.988        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .10000E-03    5.4146        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    1.1533        .29301        .35855E-03   -.88058    
  19  Prefactor     1.6608        .23960        .26654E-03   -.73130    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.62574e-10
Minuit parameter uncertainties:
  1  9.25336
  2  25.8863
  3  11.4236
  4  5.20394e-06
  5  96.8649
  6  1.7013e-05
  7  6.77927e-06
  8  1.65649
  9  1.73193e-07
  10  6.34515
  11  1.57649e-07
  12  0.00110323
  13  1.0133
  14  18.0377
  15  1.81575
  16  5.89395e-06
  17  8.2787e-07
  18  0.293423
  19  0.239767
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.564e+01  6.345e+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.661e+00  2.398e-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.153e+00  2.934e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 9.89
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 1.89e-07 +/- 7.66e-08
Energy Flux (Fixed Index): 6.47e-05 +/- 2.62e-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) = 7289.5132874
delta logL = 0.963797718025

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 7289.5099926
delta logL = 0.967092511308

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    8.1837       1.0000         .10000E-03   10000.    
     2 'Index     '    3.0400       1.0000          .0000       10.000    
     3 'Normalizat'    1.0340       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.7336       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=   7289.510     FROM MIGRAD    STATUS=CONVERGED     58 CALLS      248 TOTAL
                     EDM=   .45E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     8.1698        34.621        .35036E-02    .15614E-03
   2  Index         3.0414        2.3443        .86533E-01    .16034E-03
   3  Normalizat    1.0338        .11848        .84745E-01    .36026E-04
   4  Prefactor     1.7338        .96575E-01    .59268E-01    .18664E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 8.16983
  Index      = 3.0414
  Normalizat = 1.03384
  Prefactor  = 1.73376
 **********
 **   18 **HESSE 
 **********

 FCN=   7289.510     FROM HESSE     STATUS=OK            33 CALLS      281 TOTAL
                     EDM=   .24E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     8.1698        12.036        .78746E-04   -1.5136    
   2  Index         3.0414        .95216        .35614E-02   -.40250    
   3  Normalizat    1.0338        .29716        .37522E-03   -.91905    
   4  Prefactor     1.7338        .25320        .26205E-03   -.71187    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.43669e-08
Minuit parameter uncertainties:
  1  12.04
  2  0.959088
  3  0.297642
  4  0.25339
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/65692': 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) = 7289.50998955
delta logL = 0.967095564097

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  8.170e+00  1.204e+01  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  3.041e+00  9.591e-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.734e+00  2.534e-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.034e+00  2.976e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 12.37
Ra Dec: 160.150 6.285
Photon Index (Free Index): 3.04 +/- 0.96
Photon Flux (Free Index): 2.83e-07 +/- 1.10e-07
Energy Flux (Free Index): 5.54e-05 +/- 2.49e-05

Creating a high resolution counts map...
INFO: Auto-setting vmin to -1.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  1.110e+00 [aplpy.core]
Saving /scratch/kocevski/65692/cmap_HighResolution_430617601_430876801_4FGL_J1040.5+0617_daily_bin738.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='1.89e-07', energy_flux2='5.54e-05', photon_flux_error='7.66e-08', dlogl='9.67e-01', energy_flux='6.47e-05', photon_flux2='2.83e-07', job_status='DONE', time_completed='2021-09-02 08:37:13.197047', photon_index_error2='0.96', photon_index2='3.04', ts='9.89', fit_tolerance='1e-08', GAL='1.66', photon_index_error='0.00', energy_flux_error2='2.49e-05', EG='1.15', time_epoch_completed='1630597033.2', return_code='0', job_id='65692', GAL2='1.73', EG2='1.03', return_code2='0', energy_flux_error='2.62e-05', photon_flux_error2='1.10e-07', ts2='12.37', photon_index='2.37' WHERE bin_id='738' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:37:13 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0058>
Subject: Job 65692: <4FGL_J1040.5+0617_daily_bin738> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin738> was submitted from host <rhel6-64k> by user <kocevski> in cluster <slac> at Thu Sep  2 08:21:20 2021
Job was executed on host(s) <bullet0058>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:24:02 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:24:02 2021
Terminated at Thu Sep  2 08:37:13 2021
Results reported at Thu Sep  2 08:37:13 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin738 160.15 6.2848 430617601 430876801 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 :                                   587.44 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             314.52 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   791 sec.
    Turnaround time :                            953 sec.

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

