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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin907
RA = 160.15, Dec = 6.2848
tmin = 474422401, tmax = 474681601
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='66910', job_status='RUN', time_executed='2021-09-02 08:30:36.609041', time_epoch_executed='1630596636.61' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='907'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/66910

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/66910/ft1_4FGL_J1040.5+0617_daily_bin907.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/66910/ft2_4FGL_J1040.5+0617_daily_bin907.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/66910/ft1_4FGL_J1040.5+0617_daily_bin907.fits outfile=/scratch/kocevski/66910/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin907.fits ra=160.15 dec=6.2848 rad=12.0 tmin=474422401.0 tmax=474681601.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.48
user 3.26
sys 0.20

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/66910/ft1_filtered_4FGL_J1040.5+0617_daily_bin907.fits" evtable="EVENTS" scfile=/scratch/kocevski/66910/ft2_4FGL_J1040.5+0617_daily_bin907.fits sctable="SC_DATA" outfile=/scratch/kocevski/66910/ltcube_474422401_474681601_4FGL_J1040.5+0617_daily_bin907.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/66910/ft2_4FGL_J1040.5+0617_daily_bin907.fits
.....................!
real 17.99
user 17.60
sys 0.32

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/66910/ft1_filtered_4FGL_J1040.5+0617_daily_bin907.fits evtable="EVENTS" scfile=/scratch/kocevski/66910/ft2_4FGL_J1040.5+0617_daily_bin907.fits sctable="SC_DATA" expcube=/scratch/kocevski/66910/ltcube_474422401_474681601_4FGL_J1040.5+0617_daily_bin907.fits outfile=/scratch/kocevski/66910/expmap_474422401_474681601_4FGL_J1040.5+0617_daily_bin907.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/66910/ltcube_474422401_474681601_4FGL_J1040.5+0617_daily_bin907.fits
.....................!
real 195.41
user 189.66
sys 4.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/66910/ft1_filtered_4FGL_J1040.5+0617_daily_bin907.fits scfile=/scratch/kocevski/66910/ft2_4FGL_J1040.5+0617_daily_bin907.fits outfile=/scratch/kocevski/66910/cmap_474422401_474681601_4FGL_J1040.5+0617_daily_bin907.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.57
user 0.40
sys 0.14

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

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    10.646       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    6.6707       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    31.687       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    4.0458       1.0000         .10000E-03   10000.    
     9 'Prefactor '    6.4398       1.0000         .10000E-03   10000.    
    10 'Prefactor '    6.5705       1.0000         .10000E-03   10000.    
    11 'Prefactor '    8.1890       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .26674E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .56275E-01   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .19839E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    .26493E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    18 'Normalizat'    .85659       1.0000         .10000E-01   10.000    
    19 'Prefactor '    .86433       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=   4932.555     FROM MIGRAD    STATUS=CONVERGED    400 CALLS     1675 TOTAL
                     EDM=   .55E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.4%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     10.647        10.576       -.27839E-06   -.17856E-04
   2  Prefactor     .10000E-03    12.176       -.16083E-05** at limit **
   3  norm          6.6702        11.394       -.49909E-06   -.55836E-04
   4  Prefactor     .10000E-03    3.5655       -.13851E-06** at limit **
   5  Prefactor     31.692        33.114        .62159E-05    .21281E-06
   6  Prefactor     .10000E-03    15.555        .30200E-05** at limit **
   7  Prefactor     .10000E-03    5.4921        .74915E-06** at limit **
   8  norm          4.0459        1.6482       -.28305E-07   -.14463E-04
   9  Prefactor     6.4404        6.4203       -.23604E-07   -.12681E-03
  10  Prefactor     6.5689        4.1570        .18923E-05    .22874E-03
  11  Prefactor     8.1906        7.0238       -.28309E-06   -.16912E-03
  12  Prefactor     .10000E-03    4.3214       -.97832E-06** at limit **
  13  norm          .56954E-01    .62319       -.35629E-06   -.10968E-02
  14  Prefactor     .10001E-03    9.7653        .81177E-06** at limit **
  15  norm          .10000E-03    .92497        .13655E-06** at limit **
  16  Prefactor     .10002E-03    8.9590       -.90293E-06** at limit **
  17  norm          .10000E-03    5.0155       -.71378E-06** at limit **
  18  Normalizat    .85638        .18524       -.14365E-05    .22313E-03
  19  Prefactor     .86446        .15294        .45788E-06    .13497E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 10.6472
  Prefactor  = 0.0001
  norm       = 6.67016
  Prefactor  = 0.0001
  Prefactor  = 31.6924
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 4.04586
  Prefactor  = 6.44038
  Prefactor  = 6.56887
  Prefactor  = 8.1906
  Prefactor  = 0.000100001
  norm       = 0.0569538
  Prefactor  = 0.000100007
  norm       = 0.0001
  Prefactor  = 0.000100023
  norm       = 0.0001
  Normalizat = 0.856378
  Prefactor  = 0.864462
 **********
 **   18 **HESSE 
 **********

 FCN=   4932.555     FROM HESSE     STATUS=OK           276 CALLS     1951 TOTAL
                     EDM=   .15E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     10.647        10.573        .12279E-03   -1.5055    
   2  Prefactor     .10000E-03    12.173        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          6.6702        11.390        .15536E-03   -1.5191    
   4  Prefactor     .10000E-03    3.5763        .12949E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     31.692        32.644        .71180E-04   -1.4581    
   6  Prefactor     .10000E-03    15.502        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    5.4912        .16066E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          4.0459        1.6463        .54946E-04   -1.5306    
   9  Prefactor     6.4404        6.4162        .15816E-03   -1.5200    
  10  Prefactor     6.5689        4.0506        .10356E-03   -1.5195    
  11  Prefactor     8.1906        7.0515        .14010E-03   -1.5136    
  12  Prefactor     .10000E-03    17.271        .27198E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .56954E-01    .94105        .82785E-03   -1.5660    
  14  Prefactor     .10001E-03    22.475        .33270E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          .10000E-03    2.5442        .12924E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     .10002E-03    36.121        .40369E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .10000E-03    5.0273        .15355E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    .85638        .21203        .24387E-03   -.98010    
  19  Prefactor     .86446        .17848        .21188E-03   -.97394    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.5481e-09
Minuit parameter uncertainties:
  1  10.5747
  2  1.9254e-06
  3  11.3932
  4  5.8009e-06
  5  32.6621
  6  1.47436e-05
  7  6.61489e-06
  8  1.64628
  9  6.41685
  10  4.05072
  11  7.05225
  12  0.000283785
  13  0.46262
  14  0.000816165
  15  6.00523e-07
  16  0.00183615
  17  4.30433e-06
  18  0.212237
  19  0.178605
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  6.569e+00  4.051e+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.645e-01  1.786e-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:  8.564e-01  2.122e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 4.04
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 7.94e-08 +/- 4.89e-08
Energy Flux (Fixed Index): 2.72e-05 +/- 1.68e-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) = 4931.61433441
delta logL = 0.940710052932

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 4931.60554428
delta logL = 0.949500186176

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    2.8243       1.0000         .10000E-03   10000.    
     2 'Index     '    3.1455       1.0000          .0000       10.000    
     3 'Normalizat'    .80740       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .89516       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=   4931.606     FROM MIGRAD    STATUS=CONVERGED     80 CALLS      272 TOTAL
                     EDM=   .61E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     2.8246        3.9902        .56955E-04   -.45411E-03
   2  Index         3.1454        .80942        .38794E-02   -.44164E-04
   3  Normalizat    .80739        .20846        .25013E-03    .32725E-04
   4  Prefactor     .89517        .17952        .20852E-03    .13090E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 2.82457
  Index      = 3.14542
  Normalizat = 0.807395
  Prefactor  = 0.895173
 **********
 **   18 **HESSE 
 **********

 FCN=   4931.606     FROM HESSE     STATUS=OK            25 CALLS      297 TOTAL
                     EDM=   .52E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     2.8246        3.2859        .22782E-05   -1.5372    
   2  Index         3.1454        .66712        .15517E-03   -.38000    
   3  Normalizat    .80739        .20855        .10005E-04   -.99795    
   4  Prefactor     .89517        .17935        .41704E-04   -.96310    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 5.15188e-11
Minuit parameter uncertainties:
  1  3.28614
  2  0.669437
  3  0.208753
  4  0.179465
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/66910': 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) = 4931.60554427
delta logL = 0.949500191641

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  2.825e+00  3.286e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  3.145e+00  6.694e-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.952e-01  1.795e-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:  8.074e-01  2.088e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 6.09
Ra Dec: 160.150 6.285
Photon Index (Free Index): 3.15 +/- 0.67
Photon Flux (Free Index): 1.17e-07 +/- 6.12e-08
Energy Flux (Free Index): 2.18e-05 +/- 1.20e-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/66910/cmap_HighResolution_474422401_474681601_4FGL_J1040.5+0617_daily_bin907.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='7.94e-08', energy_flux2='2.18e-05', photon_flux_error='4.89e-08', dlogl='9.50e-01', energy_flux='2.72e-05', photon_flux2='1.17e-07', job_status='DONE', time_completed='2021-09-02 08:38:51.094678', photon_index_error2='0.67', photon_index2='3.15', ts='4.04', fit_tolerance='1e-08', GAL='0.86', photon_index_error='0.00', energy_flux_error2='1.20e-05', EG='0.86', time_epoch_completed='1630597131.09', return_code='0', job_id='66910', GAL2='0.90', EG2='0.81', return_code2='0', energy_flux_error='1.68e-05', photon_flux_error2='6.12e-08', ts2='6.09', photon_index='2.37' WHERE bin_id='907' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:38:51 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0163>
Subject: Job 66910: <4FGL_J1040.5+0617_daily_bin907> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin907> was submitted from host <rhel6-64l> by user <kocevski> in cluster <slac> at Thu Sep  2 08:26:34 2021
Job was executed on host(s) <bullet0163>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:26:42 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:26:42 2021
Terminated at Thu Sep  2 08:38:51 2021
Results reported at Thu Sep  2 08:38:51 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin907 160.15 6.2848 474422401 474681601 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 :                                   490.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             290.12 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   729 sec.
    Turnaround time :                            737 sec.

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

