/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 = 7237
number of fields = 27
No RA_SUN column yet. Adding RA_SUN/DEC_SUN columns.
Done.


Performing analysis on: 4FGL_J2040.5-1705_daily_bin137
RA = 310.136, Dec = -17.0901
tmin = 274838401, tmax = 275097601
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='105849', job_status='RUN', time_executed='2021-09-25 15:40:06.254689', time_epoch_executed='1632609606.25' WHERE source_name='4FGL J2040.5-1705' and cadence='daily' and bin_id='137'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/105849

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/105849/ft1_4FGL_J2040.5-1705_daily_bin137.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/105849/ft2_4FGL_J2040.5-1705_daily_bin137.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/105849/ft1_4FGL_J2040.5-1705_daily_bin137.fits outfile=/scratch/kocevski/105849/ft1_filteredMKT_4FGL_J2040.5-1705_daily_bin137.fits ra=310.136 dec=-17.0901 rad=12.0 tmin=274838401.0 tmax=275097601.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.23
user 3.93
sys 0.27

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/105849/ft1_filtered_4FGL_J2040.5-1705_daily_bin137.fits" evtable="EVENTS" scfile=/scratch/kocevski/105849/ft2_4FGL_J2040.5-1705_daily_bin137.fits sctable="SC_DATA" outfile=/scratch/kocevski/105849/ltcube_274838401_275097601_4FGL_J2040.5-1705_daily_bin137.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/105849/ft2_4FGL_J2040.5-1705_daily_bin137.fits
.....................!
real 13.99
user 13.60
sys 0.33

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/105849/ft1_filtered_4FGL_J2040.5-1705_daily_bin137.fits evtable="EVENTS" scfile=/scratch/kocevski/105849/ft2_4FGL_J2040.5-1705_daily_bin137.fits sctable="SC_DATA" expcube=/scratch/kocevski/105849/ltcube_274838401_275097601_4FGL_J2040.5-1705_daily_bin137.fits outfile=/scratch/kocevski/105849/expmap_274838401_275097601_4FGL_J2040.5-1705_daily_bin137.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/105849/ltcube_274838401_275097601_4FGL_J2040.5-1705_daily_bin137.fits
.....................!
real 191.95
user 186.04
sys 5.18

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/105849/ft1_filtered_4FGL_J2040.5-1705_daily_bin137.fits scfile=/scratch/kocevski/105849/ft2_4FGL_J2040.5-1705_daily_bin137.fits outfile=/scratch/kocevski/105849/cmap_274838401_275097601_4FGL_J2040.5-1705_daily_bin137.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.55
user 0.38
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/105849/ft1_filtered_4FGL_J2040.5-1705_daily_bin137.fits scfile=/scratch/kocevski/105849/ft2_4FGL_J2040.5-1705_daily_bin137.fits outfile=/scratch/kocevski/105849/cmap_HighResolution_274838401_275097601_4FGL_J2040.5-1705_daily_bin137.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.56
user 0.37
sys 0.17

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/105849/ft1_filtered_4FGL_J2040.5-1705_daily_bin137.fits evtable="EVENTS" scfile=/scratch/kocevski/105849/ft2_4FGL_J2040.5-1705_daily_bin137.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/105849/Model_4FGL_J2040.5-1705_daily_bin137.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/105849/ft1_filtered_4FGL_J2040.5-1705_daily_bin137.fits.....................!
real 68.27
user 66.75
sys 1.17

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    45.349       1.0000         .10000E-03   10000.    
     2 'Prefactor '    72.677       1.0000         .10000E-03   10000.    
     3 'Prefactor '    1.7332       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10202E-03   1.0000         .10000E-03   10000.    
     5 'norm      '    11.215       1.0000         .10000E-03   10000.    
     6 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    53.033       1.0000         .10000E-03   10000.    
     8 'norm      '    11.028       1.0000         .10000E-03   10000.    
     9 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    10 'norm      '    6.5111       1.0000         .10000E-03   10000.    
    11 'Prefactor '    34.058       1.0000         .10000E-03   10000.    
    12 'Prefactor '    11.032       1.0000         .10000E-03   10000.    
    13 'norm      '    .10005E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    12.104       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10252E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    6.2009       1.0000         .10000E-03   10000.    
    17 'Prefactor '    .11412E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    10.305       1.0000         .10000E-03   10000.    
    20 'Prefactor '    18.116       1.0000         .10000E-03   10000.    
    21 'Normalizat'    1.0882       1.0000         .10000E-01   10.000    
    22 'Prefactor '    .98203       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=   7256.670     FROM MIGRAD    STATUS=CONVERGED    465 CALLS     2366 TOTAL
                     EDM=   .27E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .2%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     45.307        46.934       -.46122E-04    .31281E-04
   2  Prefactor     72.690        49.161        .12043E-04    .38677E-04
   3  Prefactor     1.7374        2.3362        .22812E-05    .97616E-03
   4  Prefactor     .10000E-03    36.693       -.21521E-04** at limit **
   5  norm          11.218        11.624        .53686E-06    .15956E-04
   6  norm          .10000E-03    16.847        .21521E-06** at limit **
   7  Prefactor     53.059        98.987        .33183E-04    .96871E-05
   8  norm          11.030        12.586        .42039E-07    .14867E-05
   9  norm          .10000E-03    5.9610        .33995E-07** at limit **
  10  norm          6.5113        2.2090       -.78057E-07   -.25071E-03
  11  Prefactor     34.056        20.385       -.43048E-06   -.54067E-04
  12  Prefactor     11.032        9.6660        .22972E-06    .10459E-04
  13  norm          .10000E-03    1.9342       -.31631E-07** at limit **
  14  Prefactor     12.103        6.2529       -.17483E-05   -.89931E-04
  15  Prefactor     .10000E-03    67.197       -.12243E-04** at limit **
  16  norm          6.1843        32.077       -.23795E-04   -.56412E-05
  17  Prefactor     .10000E-03    42.927        .33640E-04** at limit **
  18  Prefactor     .10000E-03    2.4673        .20357E-07** at limit **
  19  Prefactor     10.302        24.263       -.18680E-05   -.42404E-04
  20  Prefactor     18.115        19.477        .62287E-06   -.31487E-04
  21  Normalizat    1.0889        .27914       -.85159E-06   -.21099E-04
  22  Prefactor     .98170        .11643        .18225E-05   -.24077E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 45.3066
  Prefactor  = 72.69
  Prefactor  = 1.7374
  Prefactor  = 0.0001
  norm       = 11.2178
  norm       = 0.0001
  Prefactor  = 53.059
  norm       = 11.0302
  norm       = 0.0001
  norm       = 6.51126
  Prefactor  = 34.0564
  Prefactor  = 11.0317
  norm       = 0.0001
  Prefactor  = 12.1027
  Prefactor  = 0.0001
  norm       = 6.18432
  Prefactor  = 0.000100004
  Prefactor  = 0.0001
  Prefactor  = 10.3022
  Prefactor  = 18.115
  Normalizat = 1.08885
  Prefactor  = 0.9817
 **********
 **   18 **HESSE 
 **********

 FCN=   7256.670     FROM HESSE     STATUS=OK           342 CALLS     2708 TOTAL
                     EDM=   .57E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     45.307        46.941        .59537E-04   -1.4361    
   2  Prefactor     72.690        49.243        .47093E-04   -1.4001    
   3  Prefactor     1.7374        2.3067        .13796E-03   -1.5444    
   4  Prefactor     .10000E-03    37.196        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          11.218        11.648        .11963E-03   -1.5038    
   6  norm          .10000E-03    17.256        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     53.059        99.187        .55076E-04   -1.4250    
   8  norm          11.030        12.594        .12064E-03   -1.5044    
   9  norm          .10000E-03    5.9614        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          6.5113        2.2108        .67294E-04   -1.5198    
  11  Prefactor     34.056        20.409        .68666E-04   -1.4540    
  12  Prefactor     11.032        9.6674        .12062E-03   -1.5044    
  13  norm          .10000E-03    1.9527        .11567E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     12.103        6.2745        .11514E-03   -1.5012    
  15  Prefactor     .10000E-03    67.219        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          6.1843        32.118        .16121E-03   -1.5211    
  17  Prefactor     .10000E-03    43.888        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10000E-03    2.4773        .13066E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     10.302        24.194        .12482E-03   -1.5066    
  20  Prefactor     18.115        19.435        .94100E-04   -1.4856    
  21  Normalizat    1.0889        .33576        .40892E-03   -.90111    
  22  Prefactor     .98170        .14188        .17796E-03   -.93342    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 5.7108e-10
Minuit parameter uncertainties:
  1  46.979
  2  49.2708
  3  2.30685
  4  8.6128e-05
  5  11.6502
  6  0.000185068
  7  99.4978
  8  12.5974
  9  4.75736e-06
  10  2.2108
  11  20.4127
  12  9.66872
  13  4.25497e-06
  14  6.27484
  15  0.000236108
  16  28.2105
  17  0.000808684
  18  2.99581e-06
  19  24.2168
  20  19.442
  21  0.336421
  22  0.141935
Done.

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

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  1.210e+01  6.275e+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.817e-01  1.419e-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.089e+00  3.364e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 6.43
Ra Dec: 310.136 -17.090
Photon Index (Fixed Index): 2.54 +/- 0.00
Photon Flux (Fixed Index): 1.42e-07 +/- 7.34e-08
Energy Flux (Fixed Index): 3.94e-05 +/- 2.04e-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) = 7256.08090334
delta logL = 0.589152431624

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 7256.07148874
delta logL = 0.59856703383

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    4.5843       1.0000         .10000E-03   10000.    
     2 'Index     '    3.4157       1.0000          .0000       10.000    
     3 'Normalizat'    .98579       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0157       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=   7256.071     FROM MIGRAD    STATUS=CONVERGED     56 CALLS      251 TOTAL
                     EDM=   .52E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     4.5684        30.825        .47000E-02   -.90248E-04
   2  Index         3.4177        2.8256        .11340        .98280E-04
   3  Normalizat    .98577        .11311        .96398E-01    .24340E-04
   4  Prefactor     1.0158        .43768E-01    .42594E-01    .23190E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 4.56845
  Index      = 3.4177
  Normalizat = 0.985768
  Prefactor  = 1.01579
 **********
 **   18 **HESSE 
 **********

 FCN=   7256.071     FROM HESSE     STATUS=OK            31 CALLS      282 TOTAL
                     EDM=   .26E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     4.5684        362.76        .78264E-04   -1.5280    
   2  Index         3.4177        5.0064        .44810E-02   -.32200    
   3  Normalizat    .98577        .79501        .42703E-03   -.93509    
   4  Prefactor     1.0158        .33743        .17527E-03   -.92205    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.5609e-09
Minuit parameter uncertainties:
  1  81.9378
  2  11.8589
  3  0.80485
  4  0.338134
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/105849': 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) = 7256.07148608
delta logL = 0.598569689744

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  4.568e+00  8.194e+01  1.000e-04  1.000e+04 ( 1.000e-12)
324        Index:  3.418e+00  1.186e+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:  1.016e+00  3.381e-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:  9.858e-01  8.049e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 7.92
Ra Dec: 310.136 -17.090
Photon Index (Free Index): 3.42 +/- 11.86
Photon Flux (Free Index): 2.05e-07 +/- 3.03e-07
Energy Flux (Free Index): 3.49e-05 +/- 7.32e-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/105849/cmap_HighResolution_274838401_275097601_4FGL_J2040.5-1705_daily_bin137.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='1.42e-07', energy_flux2='3.49e-05', photon_flux_error='7.34e-08', dlogl='5.99e-01', energy_flux='3.94e-05', photon_flux2='2.05e-07', job_status='DONE', time_completed='2021-09-25 15:51:08.983944', photon_index_error2='11.86', photon_index2='3.42', ts='6.43', fit_tolerance='1e-08', GAL='0.98', photon_index_error='0.00', energy_flux_error2='7.32e-05', EG='1.09', time_epoch_completed='1632610268.98', return_code='0', job_id='105849', GAL2='1.02', EG2='0.99', return_code2='0', energy_flux_error='2.04e-05', photon_flux_error2='3.03e-07', ts2='7.92', photon_index='2.54' WHERE bin_id='137' AND source_name='4FGL J2040.5-1705' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep 25 15:51:09 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0211>
Subject: Job 105849: <4FGL_J2040.5-1705_daily_bin137> in cluster <slac> Done

Job <4FGL_J2040.5-1705_daily_bin137> was submitted from host <rhel6-64p> by user <kocevski> in cluster <slac> at Sat Sep 25 15:35:49 2021
Job was executed on host(s) <bullet0211>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Sep 25 15:36:43 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:36:43 2021
Terminated at Sat Sep 25 15:51:09 2021
Results reported at Sat Sep 25 15:51:09 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2040.5-1705_daily_bin137 310.136 -17.0901 274838401 275097601 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 :                                   660.34 sec.
    Max Memory :                                 1255 MB
    Average Memory :                             278.83 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   866 sec.
    Turnaround time :                            920 sec.

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

