/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 194 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 = 30
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J1040.5+0617_daily_bin1138
RA = 160.15, Dec = 6.2848
tmin = 534297601, tmax = 534556801
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='68083', job_status='RUN', time_executed='2021-09-02 08:36:49.658549', time_epoch_executed='1630597009.66' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='1138'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/68083

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/68083/ft1_4FGL_J1040.5+0617_daily_bin1138.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/68083/ft2_4FGL_J1040.5+0617_daily_bin1138.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/68083/ft1_4FGL_J1040.5+0617_daily_bin1138.fits outfile=/scratch/kocevski/68083/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin1138.fits ra=160.15 dec=6.2848 rad=12.0 tmin=534297601.0 tmax=534556801.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.30
sys 0.20

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/68083/ft1_filtered_4FGL_J1040.5+0617_daily_bin1138.fits" evtable="EVENTS" scfile=/scratch/kocevski/68083/ft2_4FGL_J1040.5+0617_daily_bin1138.fits sctable="SC_DATA" outfile=/scratch/kocevski/68083/ltcube_534297601_534556801_4FGL_J1040.5+0617_daily_bin1138.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/68083/ft2_4FGL_J1040.5+0617_daily_bin1138.fits
.....................!
real 15.29
user 14.90
sys 0.34

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/68083/ft1_filtered_4FGL_J1040.5+0617_daily_bin1138.fits evtable="EVENTS" scfile=/scratch/kocevski/68083/ft2_4FGL_J1040.5+0617_daily_bin1138.fits sctable="SC_DATA" expcube=/scratch/kocevski/68083/ltcube_534297601_534556801_4FGL_J1040.5+0617_daily_bin1138.fits outfile=/scratch/kocevski/68083/expmap_534297601_534556801_4FGL_J1040.5+0617_daily_bin1138.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/68083/ltcube_534297601_534556801_4FGL_J1040.5+0617_daily_bin1138.fits
.....................!
real 192.21
user 186.57
sys 5.12

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/68083/ft1_filtered_4FGL_J1040.5+0617_daily_bin1138.fits scfile=/scratch/kocevski/68083/ft2_4FGL_J1040.5+0617_daily_bin1138.fits outfile=/scratch/kocevski/68083/cmap_534297601_534556801_4FGL_J1040.5+0617_daily_bin1138.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.38
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/68083/ft1_filtered_4FGL_J1040.5+0617_daily_bin1138.fits scfile=/scratch/kocevski/68083/ft2_4FGL_J1040.5+0617_daily_bin1138.fits outfile=/scratch/kocevski/68083/cmap_HighResolution_534297601_534556801_4FGL_J1040.5+0617_daily_bin1138.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.58
user 0.40
sys 0.15

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    .59987       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10099E-02   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .20170E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    34.639       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10077E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    1.7994       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10457E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    19.030       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .52582E-01   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10200E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .32504       1.0000         .10000E-03   10000.    
    14 'Prefactor '    3.4496       1.0000         .10000E-03   10000.    
    15 'norm      '    .11388E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    28.798       1.0000         .10000E-03   10000.    
    17 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.4365       1.0000         .10000E-01   10.000    
    19 'Prefactor '    .92865       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5360E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   6434.101     FROM MIGRAD    STATUS=CONVERGED    738 CALLS     2586 TOTAL
                     EDM=   .29E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    6.9609        .18142E-02** at limit **
   2  Prefactor     .10000E-03    14.672        .18142E-02** at limit **
   3  norm          .59248        82.451        .50683E-02    .97693E-04
   4  Prefactor     .10002E-03    48.904        .36235E-02** at limit **
   5  Prefactor     .10000E-03    183.26        .18142E-02** at limit **
   6  Prefactor     34.669        38.143        .68089E-04   -.97109E-04
   7  Prefactor     .10000E-03    8.4653        .18142E-02** at limit **
   8  norm          1.7990        1.3020        .75364E-04    .26640E-03
   9  Prefactor     .10000E-03    23.983        .30781E-02** at limit **
  10  Prefactor     19.030        5.1506        .89361E-04    .67809E-04
  11  Prefactor     .50911E-02    6.2342        .51666E-01    .61335E-04
  12  Prefactor     .10000E-03    23.242        .33233E-02** at limit **
  13  norm          .32495        .41338        .54364E-03   -.20230E-02
  14  Prefactor     3.4485        6.7427        .21776E-03    .46324E-03
  15  norm          .10001E-03    5.9205        .13050E-02** at limit **
  16  Prefactor     28.791        29.041        .74657E-04    .16446E-04
  17  norm          .10000E-03    5.6991        .18142E-02** at limit **
  18  Normalizat    1.4368        .24226        .25381E-03   -.24874E-03
  19  Prefactor     .92872        .19950        .26437E-03   -.22345E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.592477
  Prefactor  = 0.000100016
  Prefactor  = 0.0001
  Prefactor  = 34.6694
  Prefactor  = 0.0001
  norm       = 1.79904
  Prefactor  = 0.0001
  Prefactor  = 19.03
  Prefactor  = 0.00509112
  Prefactor  = 0.000100001
  norm       = 0.324948
  Prefactor  = 3.44852
  norm       = 0.000100007
  Prefactor  = 28.7914
  norm       = 0.0001
  Normalizat = 1.43684
  Prefactor  = 0.928724
 **********
 **   18 **HESSE 
 **********

 FCN=   6434.101     FROM HESSE     STATUS=OK           262 CALLS     2848 TOTAL
                     EDM=   .27E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    6.9619        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    14.673        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .59248        82.562        .20273E-03   -1.5554    
   4  Prefactor     .10002E-03    49.443        .72470E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    183.40        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     34.669        37.950        .13618E-04   -1.4530    
   7  Prefactor     .10000E-03    8.4656        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          1.7990        1.3019        .30146E-05   -1.5440    
   9  Prefactor     .10000E-03    24.642        .12313E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     19.030        5.1495        .35745E-05   -1.4835    
  11  Prefactor     .50911E-02    5.8909        .53670E-01   -1.5694    
  12  Prefactor     .10000E-03    23.647        .66467E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .32495        .41283        .21746E-04   -1.5594    
  14  Prefactor     3.4485        6.7352        .87102E-05   -1.5337    
  15  norm          .10001E-03    5.9702        .26100E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     28.791        29.030        .29863E-05   -1.4634    
  17  norm          .10000E-03    5.6995        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    1.4368        .24238        .50762E-04   -.79569    
  19  Prefactor     .92872        .19956        .10575E-04   -.95145    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.68927e-09
Minuit parameter uncertainties:
  1  1.93301e-06
  2  7.75284e-06
  3  14.0066
  4  0.00179953
  5  5.42202e-06
  6  37.9763
  7  1.69473e-05
  8  1.30188
  9  0.000144615
  10  5.14958
  11  0.342974
  12  0.000239512
  13  0.412832
  14  6.73669
  15  0.000417252
  16  29.0444
  17  6.65176e-06
  18  0.242575
  19  0.199721
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.903e+01  5.150e+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:  9.287e-01  1.997e-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.437e+00  2.426e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 32.97
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 2.30e-07 +/- 6.22e-08
Energy Flux (Fixed Index): 7.87e-05 +/- 2.13e-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) = 6433.75083371
delta logL = 0.349676144044

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6433.74692275
delta logL = 0.353587100645

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    15.246       1.0000         .10000E-03   10000.    
     2 'Index     '    2.6073       1.0000          .0000       10.000    
     3 'Normalizat'    1.3957       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .95351       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=   6433.747     FROM MIGRAD    STATUS=CONVERGED     54 CALLS      261 TOTAL
                     EDM=   .38E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     15.250        52.388        .25644E-02    .13853E-03
   2  Index         2.6076        2.2421        .71209E-01    .15466E-03
   3  Normalizat    1.3957        .15597        .58025E-01    .27184E-03
   4  Prefactor     .95347        .11392        .45683E-01    .28586E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 15.2499
  Index      = 2.60756
  Normalizat = 1.39566
  Prefactor  = 0.953474
 **********
 **   18 **HESSE 
 **********

 FCN=   6433.747     FROM HESSE     STATUS=OK            29 CALLS      290 TOTAL
                     EDM=   .89E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     15.250        6.5592        .76892E-04   -1.4927    
   2  Index         2.6076        .30825        .30353E-02   -.49893    
   3  Normalizat    1.3957        .23716        .25660E-03   -.80754    
   4  Prefactor     .95347        .20034        .26137E-03   -.94297    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 8.88436e-11
Minuit parameter uncertainties:
  1  6.55953
  2  0.308507
  3  0.23735
  4  0.200498
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/68083': 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) = 6433.74692081
delta logL = 0.353589046738

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.525e+01  6.560e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.608e+00  3.085e-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:  9.535e-01  2.005e-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.396e+00  2.374e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 33.77
Ra Dec: 160.150 6.285
Photon Index (Free Index): 2.61 +/- 0.31
Photon Flux (Free Index): 2.63e-07 +/- 7.68e-08
Energy Flux (Free Index): 6.85e-05 +/- 2.07e-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/68083/cmap_HighResolution_534297601_534556801_4FGL_J1040.5+0617_daily_bin1138.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='2.30e-07', energy_flux2='6.85e-05', photon_flux_error='6.22e-08', dlogl='3.54e-01', energy_flux='7.87e-05', photon_flux2='2.63e-07', job_status='DONE', time_completed='2021-09-02 08:47:01.952055', photon_index_error2='0.31', photon_index2='2.61', ts='32.97', fit_tolerance='1e-08', GAL='0.93', photon_index_error='0.00', energy_flux_error2='2.07e-05', EG='1.44', time_epoch_completed='1630597621.95', return_code='0', job_id='68083', GAL2='0.95', EG2='1.40', return_code2='0', energy_flux_error='2.13e-05', photon_flux_error2='7.68e-08', ts2='33.77', photon_index='2.37' WHERE bin_id='1138' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:47:01 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0076>
Subject: Job 68083: <4FGL_J1040.5+0617_daily_bin1138> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin1138> was submitted from host <rhel6-64j> by user <kocevski> in cluster <slac> at Thu Sep  2 08:31:35 2021
Job was executed on host(s) <bullet0076>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:33:26 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Thu Sep  2 08:33:26 2021
Terminated at Thu Sep  2 08:47:02 2021
Results reported at Thu Sep  2 08:47:02 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin1138 160.15 6.2848 534297601 534556801 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 :                                   600.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             285.41 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   816 sec.
    Turnaround time :                            927 sec.

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

