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


Performing analysis on: 4FGL_J2040.5-1705_daily_bin1492
RA = 310.136, Dec = -17.0901
tmin = 626054401, tmax = 626313601
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='113434', job_status='RUN', time_executed='2021-09-25 16:01:54.202241', time_epoch_executed='1632610914.2' WHERE source_name='4FGL J2040.5-1705' and cadence='daily' and bin_id='1492'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/113434

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/113434/ft1_4FGL_J2040.5-1705_daily_bin1492.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/113434/ft2_4FGL_J2040.5-1705_daily_bin1492.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/113434/ft1_4FGL_J2040.5-1705_daily_bin1492.fits outfile=/scratch/kocevski/113434/ft1_filteredMKT_4FGL_J2040.5-1705_daily_bin1492.fits ra=310.136 dec=-17.0901 rad=12.0 tmin=626054401.0 tmax=626313601.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.18
user 3.90
sys 0.22

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/113434/ft2_4FGL_J2040.5-1705_daily_bin1492.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/113434/ft1_filteredMKT_4FGL_J2040.5-1705_daily_bin1492.fits evtable="EVENTS" outfile="/scratch/kocevski/113434/ft1_filtered_4FGL_J2040.5-1705_daily_bin1492.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.34
sys 0.15

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/113434/ft1_filtered_4FGL_J2040.5-1705_daily_bin1492.fits" evtable="EVENTS" scfile=/scratch/kocevski/113434/ft2_4FGL_J2040.5-1705_daily_bin1492.fits sctable="SC_DATA" outfile=/scratch/kocevski/113434/ltcube_626054401_626313601_4FGL_J2040.5-1705_daily_bin1492.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/113434/ft2_4FGL_J2040.5-1705_daily_bin1492.fits
.....................!
real 14.73
user 14.30
sys 0.34

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/113434/ft1_filtered_4FGL_J2040.5-1705_daily_bin1492.fits evtable="EVENTS" scfile=/scratch/kocevski/113434/ft2_4FGL_J2040.5-1705_daily_bin1492.fits sctable="SC_DATA" expcube=/scratch/kocevski/113434/ltcube_626054401_626313601_4FGL_J2040.5-1705_daily_bin1492.fits outfile=/scratch/kocevski/113434/expmap_626054401_626313601_4FGL_J2040.5-1705_daily_bin1492.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/113434/ltcube_626054401_626313601_4FGL_J2040.5-1705_daily_bin1492.fits
.....................!
real 192.16
user 186.56
sys 4.95

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/113434/ft1_filtered_4FGL_J2040.5-1705_daily_bin1492.fits scfile=/scratch/kocevski/113434/ft2_4FGL_J2040.5-1705_daily_bin1492.fits outfile=/scratch/kocevski/113434/cmap_626054401_626313601_4FGL_J2040.5-1705_daily_bin1492.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.38
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/113434/ft1_filtered_4FGL_J2040.5-1705_daily_bin1492.fits scfile=/scratch/kocevski/113434/ft2_4FGL_J2040.5-1705_daily_bin1492.fits outfile=/scratch/kocevski/113434/cmap_HighResolution_626054401_626313601_4FGL_J2040.5-1705_daily_bin1492.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/113434/ft1_filtered_4FGL_J2040.5-1705_daily_bin1492.fits evtable="EVENTS" scfile=/scratch/kocevski/113434/ft2_4FGL_J2040.5-1705_daily_bin1492.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/113434/Model_4FGL_J2040.5-1705_daily_bin1492.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/113434/ft1_filtered_4FGL_J2040.5-1705_daily_bin1492.fits.....................!
real 98.68
user 97.12
sys 1.16

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/113434/ft1_filtered_4FGL_J2040.5-1705_daily_bin1492.fits', '/scratch/kocevski/113434/ft2_4FGL_J2040.5-1705_daily_bin1492.fits', expMap='/scratch/kocevski/113434/expmap_626054401_626313601_4FGL_J2040.5-1705_daily_bin1492.fits', expCube='/scratch/kocevski/113434/ltcube_626054401_626313601_4FGL_J2040.5-1705_daily_bin1492.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/113434/Model_4FGL_J2040.5-1705_daily_bin1492.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/113434/ft1_filtered_4FGL_J2040.5-1705_daily_bin1492.fits
Spacecraft file(s): /scratch/kocevski/113434/ft2_4FGL_J2040.5-1705_daily_bin1492.fits
Exposure map: /scratch/kocevski/113434/expmap_626054401_626313601_4FGL_J2040.5-1705_daily_bin1492.fits
Exposure cube: /scratch/kocevski/113434/ltcube_626054401_626313601_4FGL_J2040.5-1705_daily_bin1492.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/113434/Model_4FGL_J2040.5-1705_daily_bin1492.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) = 11758.9718192

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    8.7027       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    5.2069       1.0000         .10000E-03   10000.    
     4 'Prefactor '    15.829       1.0000         .10000E-03   10000.    
     5 'norm      '    12.729       1.0000         .10000E-03   10000.    
     6 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    10 'norm      '    6.7302       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10012E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    2.1038       1.0000         .10000E-03   10000.    
    13 'norm      '    .68036       1.0000         .10000E-03   10000.    
    14 'Prefactor '    5.3804       1.0000         .10000E-03   10000.    
    15 'Prefactor '    53.023       1.0000         .10000E-03   10000.    
    16 'norm      '    1.9336       1.0000         .10000E-03   10000.    
    17 'Prefactor '    21.234       1.0000         .10000E-03   10000.    
    18 'Prefactor '    7.0370       1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    8.3603       1.0000         .10000E-03   10000.    
    21 'Normalizat'    .97587       1.0000         .10000E-01   10.000    
    22 'Prefactor '    .89804       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=   11758.97     FROM MIGRAD    STATUS=CONVERGED    470 CALLS     2370 TOTAL
                     EDM=   .14E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.2%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     8.7029        18.156       -.18381E-08   -.61402E-04
   2  Prefactor     .10000E-03    9.0757       -.15152E-07** at limit **
   3  Prefactor     5.2069        1.7179       -.66644E-08    .52710E-04
   4  Prefactor     15.829        10.471       -.16116E-07   -.87467E-06
   5  norm          12.730        8.1959       -.12516E-06   -.24114E-03
   6  norm          .10000E-03    2.1419       -.38487E-08** at limit **
   7  Prefactor     .10000E-03    30.252       -.22730E-07** at limit **
   8  norm          .10000E-03    5.9685        .48042E-08** at limit **
   9  norm          .10000E-03    4.5285       -.47321E-08** at limit **
  10  norm          6.7292        1.4742       -.50084E-08   -.99816E-05
  11  Prefactor     .10000E-03    17.431        .85062E-08** at limit **
  12  Prefactor     2.1042        3.5065       -.25848E-06    .17612E-02
  13  norm          .68067        1.7038       -.12700E-06   -.15029E-03
  14  Prefactor     5.3804        2.9065       -.25184E-07    .10348E-03
  15  Prefactor     53.024        54.550        .30381E-06   -.23274E-03
  16  norm          1.9347        16.352       -.23616E-06   -.19051E-06
  17  Prefactor     21.234        12.365       -.23899E-07   -.34261E-04
  18  Prefactor     7.0369        3.1539       -.37887E-06   -.10219E-02
  19  Prefactor     .10000E-03    3.9442        .78759E-08** at limit **
  20  Prefactor     8.3612        8.1092       -.27583E-06   -.34845E-03
  21  Normalizat    .97593        .17834        .30790E-06   -.22759E-05
  22  Prefactor     .89800        .78231E-01   -.37881E-09    .24741E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 8.70287
  Prefactor  = 0.0001
  Prefactor  = 5.20693
  Prefactor  = 15.8291
  norm       = 12.7297
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 0.0001
  norm       = 6.72916
  Prefactor  = 0.0001
  Prefactor  = 2.10423
  norm       = 0.680666
  Prefactor  = 5.38038
  Prefactor  = 53.0236
  norm       = 1.93468
  Prefactor  = 21.2344
  Prefactor  = 7.03692
  Prefactor  = 0.0001
  Prefactor  = 8.3612
  Normalizat = 0.975935
  Prefactor  = 0.897998
 **********
 **   18 **HESSE 
 **********

 FCN=   11758.97     FROM HESSE     STATUS=OK           350 CALLS     2720 TOTAL
                     EDM=   .27E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     8.7029        18.203        .13588E-03   -1.5118    
   2  Prefactor     .10000E-03    9.0882        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     5.2069        1.7201        .73816E-04   -1.5252    
   4  Prefactor     15.829        10.478        .10067E-03   -1.4912    
   5  norm          12.730        8.4268        .56136E-03   -1.4994    
   6  norm          .10000E-03    2.1615        .15496E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    30.262        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .10000E-03    5.9949        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          .10000E-03    4.5299        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          6.7292        1.4725        .59285E-04   -1.5189    
  11  Prefactor     .10000E-03    17.769        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     2.1042        3.5138        .25541E-03   -1.5418    
  13  norm          .68067        1.9201        .22143E-02   -1.5543    
  14  Prefactor     5.3804        2.9173        .12996E-03   -1.5244    
  15  Prefactor     53.024        54.486        .55081E-04   -1.4250    
  16  norm          1.9347        16.487        .29865E-03   -1.5430    
  17  Prefactor     21.234        12.384        .86920E-04   -1.4786    
  18  Prefactor     7.0369        5.2798        .75613E-03   -1.5177    
  19  Prefactor     .10000E-03    3.9495        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     8.3612        8.8208        .69324E-03   -1.5130    
  21  Normalizat    .97593        .21427        .36234E-03   -.93841    
  22  Prefactor     .89800        .93025E-01    .16644E-03   -.96211    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.73914e-08
Minuit parameter uncertainties:
  1  18.2142
  2  2.43242e-05
  3  1.72008
  4  10.4792
  5  8.42756
  6  1.16217e-06
  7  7.25635e-05
  8  1.33948e-05
  9  5.69789e-06
  10  1.47251
  11  4.80879e-05
  12  3.51414
  13  1.92023
  14  2.91741
  15  54.5372
  16  11.2995
  17  12.3853
  18  5.28012
  19  5.10791e-06
  20  8.82217
  21  0.214458
  22  0.0930411
Done.

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

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  5.380e+00  2.917e+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:  8.980e-01  9.304e-02  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:  9.759e-01  2.145e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 6.73
Ra Dec: 310.136 -17.090
Photon Index (Fixed Index): 2.54 +/- 0.00
Photon Flux (Fixed Index): 6.30e-08 +/- 3.41e-08
Energy Flux (Fixed Index): 1.75e-05 +/- 9.49e-06

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) = 11757.2028272
delta logL = 1.7684936648

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 11757.1910704
delta logL = 1.78025050409

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    6.0282       1.0000         .10000E-03   10000.    
     2 'Index     '    1.6486       1.0000          .0000       10.000    
     3 'Normalizat'    1.0239       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .88640       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=   11757.19     FROM MIGRAD    STATUS=CONVERGED     48 CALLS      214 TOTAL
                     EDM=   .88E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     6.0282        3.4422        .40884E-02   -.65468E-02
   2  Index         1.6486        .29490        .22090       -.90922E-04
   3  Normalizat    1.0239        .17220        .80088E-01    .44274E-03
   4  Prefactor     .88641        .76374E-01    .44831E-01    .98919E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 6.02821
  Index      = 1.64861
  Normalizat = 1.02385
  Prefactor  = 0.886407
 **********
 **   18 **HESSE 
 **********

 FCN=   11757.19     FROM HESSE     STATUS=OK            29 CALLS      243 TOTAL
                     EDM=   .20E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     6.0282        4.0738        .14674E-03   -1.5217    
   2  Index         1.6486        .40930        .83087E-02   -.73458    
   3  Normalizat    1.0239        .20275        .35451E-03   -.92236    
   4  Prefactor     .88641        .90023E-01    .16738E-03   -.96618    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.04775e-08
Minuit parameter uncertainties:
  1  4.07399
  2  0.410135
  3  0.202904
  4  0.0900381
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/113434': 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) = 11757.1910704
delta logL = 1.78025050991

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  6.028e+00  4.074e+00  1.000e-04  1.000e+04 ( 1.000e-12)
324        Index:  1.649e+00  4.101e-01  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:  8.864e-01  9.004e-02  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.024e+00  2.029e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 10.22
Ra Dec: 310.136 -17.090
Photon Index (Free Index): 1.65 +/- 0.41
Photon Flux (Free Index): 2.67e-08 +/- 2.22e-08
Energy Flux (Free Index): 5.15e-05 +/- 4.77e-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/113434/cmap_HighResolution_626054401_626313601_4FGL_J2040.5-1705_daily_bin1492.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='6.30e-08', energy_flux2='5.15e-05', photon_flux_error='3.41e-08', dlogl='1.78e+00', energy_flux='1.75e-05', photon_flux2='2.67e-08', job_status='DONE', time_completed='2021-09-25 16:16:23.797264', photon_index_error2='0.41', photon_index2='1.65', ts='6.73', fit_tolerance='1e-08', GAL='0.90', photon_index_error='0.00', energy_flux_error2='4.77e-05', EG='0.98', time_epoch_completed='1632611783.8', return_code='0', job_id='113434', GAL2='0.89', EG2='1.02', return_code2='0', energy_flux_error='9.49e-06', photon_flux_error2='2.22e-08', ts2='10.22', photon_index='2.54' WHERE bin_id='1492' AND source_name='4FGL J2040.5-1705' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep 25 16:16:23 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0227>
Subject: Job 113434: <4FGL_J2040.5-1705_daily_bin1492> in cluster <slac> Done

Job <4FGL_J2040.5-1705_daily_bin1492> was submitted from host <rhel6-64m> by user <kocevski> in cluster <slac> at Sat Sep 25 16:01:01 2021
Job was executed on host(s) <bullet0227>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Sep 25 16:01:25 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Sat Sep 25 16:01:25 2021
Terminated at Sat Sep 25 16:16:24 2021
Results reported at Sat Sep 25 16:16:24 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2040.5-1705_daily_bin1492 310.136 -17.0901 626054401 626313601 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 :                                   862.26 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             335.17 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   900 sec.
    Turnaround time :                            923 sec.

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

