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


Performing analysis on: 4FGL_J2040.5-1705_daily_bin1021
RA = 310.136, Dec = -17.0901
tmin = 503971201, tmax = 504230401
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='111543', job_status='RUN', time_executed='2021-09-25 15:56:59.203272', time_epoch_executed='1632610619.2' WHERE source_name='4FGL J2040.5-1705' and cadence='daily' and bin_id='1021'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/111543

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/111543/ft1_4FGL_J2040.5-1705_daily_bin1021.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/111543/ft2_4FGL_J2040.5-1705_daily_bin1021.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/111543/ft1_4FGL_J2040.5-1705_daily_bin1021.fits outfile=/scratch/kocevski/111543/ft1_filteredMKT_4FGL_J2040.5-1705_daily_bin1021.fits ra=310.136 dec=-17.0901 rad=12.0 tmin=503971201.0 tmax=504230401.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 4.13
user 3.81
sys 0.23

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/111543/ft2_4FGL_J2040.5-1705_daily_bin1021.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/111543/ft2_4FGL_J2040.5-1705_daily_bin1021.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/111543/ft1_filteredMKT_4FGL_J2040.5-1705_daily_bin1021.fits evtable="EVENTS" outfile="/scratch/kocevski/111543/ft1_filtered_4FGL_J2040.5-1705_daily_bin1021.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.52
user 0.33
sys 0.17

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/111543/ft1_filtered_4FGL_J2040.5-1705_daily_bin1021.fits" evtable="EVENTS" scfile=/scratch/kocevski/111543/ft2_4FGL_J2040.5-1705_daily_bin1021.fits sctable="SC_DATA" outfile=/scratch/kocevski/111543/ltcube_503971201_504230401_4FGL_J2040.5-1705_daily_bin1021.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/111543/ft2_4FGL_J2040.5-1705_daily_bin1021.fits
.....................!
real 13.51
user 13.17
sys 0.30

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/111543/ft1_filtered_4FGL_J2040.5-1705_daily_bin1021.fits evtable="EVENTS" scfile=/scratch/kocevski/111543/ft2_4FGL_J2040.5-1705_daily_bin1021.fits sctable="SC_DATA" expcube=/scratch/kocevski/111543/ltcube_503971201_504230401_4FGL_J2040.5-1705_daily_bin1021.fits outfile=/scratch/kocevski/111543/expmap_503971201_504230401_4FGL_J2040.5-1705_daily_bin1021.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/111543/ltcube_503971201_504230401_4FGL_J2040.5-1705_daily_bin1021.fits
.....................!
real 189.98
user 185.34
sys 4.24

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 181 point sources and 0 extended sources

Setting source of interest to:
4FGL J2040.5-1705 @ 310.136 -17.0901

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/111543/ft1_filtered_4FGL_J2040.5-1705_daily_bin1021.fits scfile=/scratch/kocevski/111543/ft2_4FGL_J2040.5-1705_daily_bin1021.fits outfile=/scratch/kocevski/111543/cmap_503971201_504230401_4FGL_J2040.5-1705_daily_bin1021.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=310.136 yref=-17.0901 axisrot=0.0 rafield="RA" decfield="DEC" proj="AIT" hpx_ordering_scheme="RING" hpx_order=3 hpx_ebin=yes hpx_region="" evtable="EVENTS" sctable="SC_DATA" efield="ENERGY" tfield="TIME" chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

This is gtbin version HEAD
real 0.54
user 0.37
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/111543/ft1_filtered_4FGL_J2040.5-1705_daily_bin1021.fits scfile=/scratch/kocevski/111543/ft2_4FGL_J2040.5-1705_daily_bin1021.fits outfile=/scratch/kocevski/111543/cmap_HighResolution_503971201_504230401_4FGL_J2040.5-1705_daily_bin1021.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=310.136 yref=-17.0901 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.16

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/111543/ft1_filtered_4FGL_J2040.5-1705_daily_bin1021.fits evtable="EVENTS" scfile=/scratch/kocevski/111543/ft2_4FGL_J2040.5-1705_daily_bin1021.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/111543/Model_4FGL_J2040.5-1705_daily_bin1021.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/111543/ft1_filtered_4FGL_J2040.5-1705_daily_bin1021.fits.....................!
real 93.71
user 92.27
sys 1.22

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/111543/ft1_filtered_4FGL_J2040.5-1705_daily_bin1021.fits', '/scratch/kocevski/111543/ft2_4FGL_J2040.5-1705_daily_bin1021.fits', expMap='/scratch/kocevski/111543/expmap_503971201_504230401_4FGL_J2040.5-1705_daily_bin1021.fits', expCube='/scratch/kocevski/111543/ltcube_503971201_504230401_4FGL_J2040.5-1705_daily_bin1021.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/111543/Model_4FGL_J2040.5-1705_daily_bin1021.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J2040.5-1705'

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  1.223e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-12)
324        Index:  2.541e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
325        Scale:  7.724e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/111543/ft1_filtered_4FGL_J2040.5-1705_daily_bin1021.fits
Spacecraft file(s): /scratch/kocevski/111543/ft2_4FGL_J2040.5-1705_daily_bin1021.fits
Exposure map: /scratch/kocevski/111543/expmap_503971201_504230401_4FGL_J2040.5-1705_daily_bin1021.fits
Exposure cube: /scratch/kocevski/111543/ltcube_503971201_504230401_4FGL_J2040.5-1705_daily_bin1021.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/111543/Model_4FGL_J2040.5-1705_daily_bin1021.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) = 10626.8550502

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    21.609       1.0000         .10000E-03   10000.    
     2 'Prefactor '    21.122       1.0000         .10000E-03   10000.    
     3 'Prefactor '    2.4930       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .29864E-02   1.0000         .10000E-03   10000.    
     5 'norm      '    12.705       1.0000         .10000E-03   10000.    
     6 'norm      '    18.446       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10013E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    10.711       1.0000         .10000E-03   10000.    
     9 'norm      '    4.9092       1.0000         .10000E-03   10000.    
    10 'norm      '    2.1716       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10189E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    20.333       1.0000         .10000E-03   10000.    
    13 'norm      '    .26834E-01   1.0000         .10000E-03   10000.    
    14 'Prefactor '    2.9742       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10229E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    .10151E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    5.7173       1.0000         .10000E-03   10000.    
    18 'Prefactor '    4.6738       1.0000         .10000E-03   10000.    
    19 'Prefactor '    .60203E-01   1.0000         .10000E-03   10000.    
    20 'Prefactor '    7.0743       1.0000         .10000E-03   10000.    
    21 'Normalizat'    1.1319       1.0000         .10000E-01   10.000    
    22 'Prefactor '    .96217       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5990E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   10626.75     FROM MIGRAD    STATUS=CONVERGED    503 CALLS     2144 TOTAL
                     EDM=   .12E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY= 11.7%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     21.543        36.018       -.94726E-06   -.47901E-04
   2  Prefactor     21.057        36.249       -.36502E-06   -.13469E-04
   3  Prefactor     2.4955        1.9515        .74260E-07   -.44719E-03
   4  Prefactor     .10035E-03    55.825        .27563E-04** at limit **
   5  norm          12.709        12.586        .86472E-09   -.95424E-04
   6  norm          18.457        10.546        .18110E-06   -.10546E-03
   7  Prefactor     .10000E-03    56.337       -.24459E-05** at limit **
   8  norm          10.711        10.248       -.26921E-07   -.15403E-04
   9  norm          4.8982        15.197       -.23675E-06   -.96043E-05
  10  norm          2.1731        1.1523        .22334E-07    .12063E-03
  11  Prefactor     .10000E-03    23.215        .55410E-07** at limit **
  12  Prefactor     20.335        8.7677       -.10463E-06   -.32098E-03
  13  norm          .33797E-01    14.047        .13279E-04   -.86998E-03
  14  Prefactor     2.9765        3.8326        .43253E-07   -.90522E-04
  15  Prefactor     .10000E-03    68.718        .31386E-05** at limit **
  16  norm          .10000E-03    29.520        .11144E-06** at limit **
  17  Prefactor     5.7191        12.107        .14403E-06   -.10296E-05
  18  Prefactor     4.6766        6.1127       -.10384E-05   -.34360E-03
  19  Prefactor     .21633        12.990        .78926E-05    .28644E-04
  20  Prefactor     7.0532        8.3539        .36038E-06    .21381E-03
  21  Normalizat    1.1312        .21851       -.18683E-05   -.53819E-03
  22  Prefactor     .96238        .92139E-01    .51504E-06   -.30685E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 21.5434
  Prefactor  = 21.0566
  Prefactor  = 2.49552
  Prefactor  = 0.000100347
  norm       = 12.709
  norm       = 18.4573
  Prefactor  = 0.0001
  norm       = 10.7107
  norm       = 4.89824
  norm       = 2.17308
  Prefactor  = 0.0001
  Prefactor  = 20.3351
  norm       = 0.0337974
  Prefactor  = 2.97649
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 5.71907
  Prefactor  = 4.67665
  Prefactor  = 0.216332
  Prefactor  = 7.05317
  Normalizat = 1.13124
  Prefactor  = 0.962375
 **********
 **   18 **HESSE 
 **********

 FCN=   10626.75     FROM HESSE     STATUS=OK           372 CALLS     2516 TOTAL
                     EDM=   .64E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     21.543        36.159        .86165E-04   -1.4779    
   2  Prefactor     21.057        36.338        .87152E-04   -1.4790    
   3  Prefactor     2.4955        1.8086        .10972E-03   -1.5392    
   4  Prefactor     .10035E-03    76.408        .56359E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          12.709        12.606        .11238E-03   -1.4995    
   6  norm          18.457        10.392        .93256E-04   -1.4848    
   7  Prefactor     .10000E-03    56.283        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          10.711        10.255        .12242E-03   -1.5053    
   9  norm          4.8982        15.196        .18153E-03   -1.5265    
  10  norm          2.1731        1.1444        .76946E-04   -1.5413    
  11  Prefactor     .10000E-03    23.674        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     20.335        8.7732        .88824E-04   -1.4806    
  13  norm          .33797E-01    2.2315        .41711E-01   -1.5671    
  14  Prefactor     2.9765        3.8287        .21368E-03   -1.5363    
  15  Prefactor     .10000E-03    68.757        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          .10000E-03    29.785        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     5.7191        12.114        .16799E-03   -1.5230    
  18  Prefactor     4.6766        6.1263        .93074E-03   -1.5275    
  19  Prefactor     .21633        8.4374        .97286E-01   -1.5615    
  20  Prefactor     7.0532        8.3674        .15082E-03   -1.5177    
  21  Normalizat    1.1312        .25895        .37477E-03   -.88755    
  22  Prefactor     .96238        .11159        .17361E-03   -.93994    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.41581e-09
Minuit parameter uncertainties:
  1  36.1956
  2  36.3758
  3  1.8086
  4  0.010305
  5  12.6086
  6  10.3925
  7  7.42531e-05
  8  10.257
  9  15.2077
  10  1.14437
  11  2.90435e-05
  12  8.77372
  13  0.548454
  14  3.82902
  15  6.39184e-05
  16  7.63592e-05
  17  12.1192
  18  6.12711
  19  2.70184
  20  8.36882
  21  0.259243
  22  0.111617
Done.

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

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  2.976e+00  3.829e+00  1.000e-04  1.000e+04 ( 1.000e-12)
324        Index:  2.541e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
325        Scale:  7.724e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
596    Prefactor:  9.624e-01  1.116e-01  0.000e+00  1.000e+01 ( 1.000e+00)
597        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
598        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
595   Normalization:  1.131e+00  2.592e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.78
Ra Dec: 310.136 -17.090
Photon Flux Upper Limit: 1.30e-07 ph cm-2 s-1
Energy Flux Upper Limit: 1.01e-02 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/111543/likelihoodResults_503971201_504230401_4FGL_J2040.5-1705_daily_bin1021.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) = 10626.0535251
delta logL = 0.698427610065

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 10626.0507302
delta logL = 0.701222565154

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    1.3691       1.0000         .10000E-03   10000.    
     2 'Index     '    3.6409       1.0000          .0000       10.000    
     3 'Normalizat'    1.0593       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .98098       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5990E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   10626.05     FROM MIGRAD    STATUS=CONVERGED     52 CALLS      243 TOTAL
                     EDM=   .93E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     1.3692        16.189        .93176E-02    .28439E-02
   2  Index         3.6413        3.1106        .13536        .18917E-03
   3  Normalizat    1.0594        .58089E-01    .87107E-01    .15658E-04
   4  Prefactor     .98094        .24650E-01    .46029E-01   -.38168E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 1.36924
  Index      = 3.64131
  Normalizat = 1.05938
  Prefactor  = 0.980943
 **********
 **   18 **HESSE 
 **********

 FCN=   10626.05     FROM HESSE     STATUS=OK            31 CALLS      274 TOTAL
                     EDM=   .12E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     1.3692        5.2321        .85078E-04   -1.5474    
   2  Index         3.6413        2.2499        .74220E-02   -.27520    
   3  Normalizat    1.0594        .25594        .38573E-03   -.91067    
   4  Prefactor     .98094        .10760        .17209E-03   -.93367    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.21931e-07
Minuit parameter uncertainties:
  1  5.23381
  2  2.34114
  3  0.256241
  4  0.107619
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/111543': 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) = 10626.0507295
delta logL = 0.701223245993

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  1.369e+00  5.234e+00  1.000e-04  1.000e+04 ( 1.000e-12)
324        Index:  3.641e+00  2.341e+00  0.000e+00  1.000e+01 (-1.000e+00)
325        Scale:  7.724e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
596    Prefactor:  9.809e-01  1.076e-01  0.000e+00  1.000e+01 ( 1.000e+00)
597        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
598        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
595   Normalization:  1.059e+00  2.562e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 2.32
Ra Dec: 310.136 -17.090
Photon Index (Free Index): 3.64 +/- 2.34
Photon Flux (Free Index): 8.89e-08 +/- 6.95e-08
Energy Flux (Free Index): 1.43e-05 +/- 1.23e-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/111543/cmap_HighResolution_503971201_504230401_4FGL_J2040.5-1705_daily_bin1021.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.01e-02', comment='SUCCESS', energy_flux2='1.43e-05', dlogl='7.01e-01', photon_flux2='8.89e-08', job_status='DONE', time_completed='2021-09-25 16:11:41.892071', photon_index_error2='2.34', photon_index2='3.64', ts='0.78', fit_tolerance='1e-08', GAL='0.96', photon_index_error='0.00', photon_flux_upper_limit='1.30e-07', energy_flux_error2='1.23e-05', EG='1.13', time_epoch_completed='1632611501.89', return_code='0', job_id='111543', GAL2='0.98', EG2='1.06', return_code2='0', photon_flux_error2='6.95e-08', ts2='2.32', photon_index='2.54' WHERE bin_id='1021' AND source_name='4FGL J2040.5-1705' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep 25 16:11:41 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0293>
Subject: Job 111543: <4FGL_J2040.5-1705_daily_bin1021> in cluster <slac> Done

Job <4FGL_J2040.5-1705_daily_bin1021> was submitted from host <rhel6-64p> by user <kocevski> in cluster <slac> at Sat Sep 25 15:55:26 2021
Job was executed on host(s) <bullet0293>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Sep 25 15:55:42 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Sat Sep 25 15:55:42 2021
Terminated at Sat Sep 25 16:11:42 2021
Results reported at Sat Sep 25 16:11:42 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2040.5-1705_daily_bin1021 310.136 -17.0901 503971201 504230401 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J2040.5-1705 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   881.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             352.35 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   960 sec.
    Turnaround time :                            976 sec.

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

