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


Performing analysis on: 4FGL_J2040.5-1705_daily_bin590
RA = 310.136, Dec = -17.0901
tmin = 392256001, tmax = 392515201
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='108589', job_status='RUN', time_executed='2021-09-25 15:49:49.756696', time_epoch_executed='1632610189.76' WHERE source_name='4FGL J2040.5-1705' and cadence='daily' and bin_id='590'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/108589

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/108589/ft1_4FGL_J2040.5-1705_daily_bin590.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/108589/ft2_4FGL_J2040.5-1705_daily_bin590.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/108589/ft1_4FGL_J2040.5-1705_daily_bin590.fits outfile=/scratch/kocevski/108589/ft1_filteredMKT_4FGL_J2040.5-1705_daily_bin590.fits ra=310.136 dec=-17.0901 rad=12.0 tmin=392256001.0 tmax=392515201.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 2.75
user 2.50
sys 0.23

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/108589/ft1_filtered_4FGL_J2040.5-1705_daily_bin590.fits" evtable="EVENTS" scfile=/scratch/kocevski/108589/ft2_4FGL_J2040.5-1705_daily_bin590.fits sctable="SC_DATA" outfile=/scratch/kocevski/108589/ltcube_392256001_392515201_4FGL_J2040.5-1705_daily_bin590.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/108589/ft2_4FGL_J2040.5-1705_daily_bin590.fits
.....................!
real 12.88
user 12.51
sys 0.31

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/108589/ft1_filtered_4FGL_J2040.5-1705_daily_bin590.fits evtable="EVENTS" scfile=/scratch/kocevski/108589/ft2_4FGL_J2040.5-1705_daily_bin590.fits sctable="SC_DATA" expcube=/scratch/kocevski/108589/ltcube_392256001_392515201_4FGL_J2040.5-1705_daily_bin590.fits outfile=/scratch/kocevski/108589/expmap_392256001_392515201_4FGL_J2040.5-1705_daily_bin590.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/108589/ltcube_392256001_392515201_4FGL_J2040.5-1705_daily_bin590.fits
.....................!
real 156.90
user 152.10
sys 4.41

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/108589/ft1_filtered_4FGL_J2040.5-1705_daily_bin590.fits scfile=/scratch/kocevski/108589/ft2_4FGL_J2040.5-1705_daily_bin590.fits outfile=/scratch/kocevski/108589/cmap_392256001_392515201_4FGL_J2040.5-1705_daily_bin590.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.49
user 0.33
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/108589/ft1_filtered_4FGL_J2040.5-1705_daily_bin590.fits scfile=/scratch/kocevski/108589/ft2_4FGL_J2040.5-1705_daily_bin590.fits outfile=/scratch/kocevski/108589/cmap_HighResolution_392256001_392515201_4FGL_J2040.5-1705_daily_bin590.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.52
user 0.33
sys 0.16

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/108589/ft1_filtered_4FGL_J2040.5-1705_daily_bin590.fits evtable="EVENTS" scfile=/scratch/kocevski/108589/ft2_4FGL_J2040.5-1705_daily_bin590.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/108589/Model_4FGL_J2040.5-1705_daily_bin590.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/108589/ft1_filtered_4FGL_J2040.5-1705_daily_bin590.fits.....................!
real 67.20
user 65.96
sys 1.03

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    13.276       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10018E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    1.9742       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     5 'norm      '    .10005E-03   1.0000         .10000E-03   10000.    
     6 'norm      '    20.206       1.0000         .10000E-03   10000.    
     7 'Prefactor '    86.348       1.0000         .10000E-03   10000.    
     8 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    .10010E-03   1.0000         .10000E-03   10000.    
    10 'norm      '    .10467E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    7.6945       1.0000         .10000E-03   10000.    
    12 'Prefactor '    8.9321       1.0000         .10000E-03   10000.    
    13 'norm      '    5.9139       1.0000         .10000E-03   10000.    
    14 'Prefactor '    8.5329       1.0000         .10000E-03   10000.    
    15 'Prefactor '    68.507       1.0000         .10000E-03   10000.    
    16 'norm      '    7.1434       1.0000         .10000E-03   10000.    
    17 'Prefactor '    9.8151       1.0000         .10000E-03   10000.    
    18 'Prefactor '    3.8316       1.0000         .10000E-03   10000.    
    19 'Prefactor '    2.2992       1.0000         .10000E-03   10000.    
    20 'Prefactor '    7.6423       1.0000         .10000E-03   10000.    
    21 'Normalizat'    .40921       1.0000         .10000E-01   10.000    
    22 'Prefactor '    1.1312       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=   10265.04     FROM MIGRAD    STATUS=CONVERGED    466 CALLS     2373 TOTAL
                     EDM=   .89E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  3.6%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     13.276        14.230       -.82189E-08    .11725E-04
   2  Prefactor     .10000E-03    20.125       -.10576E-06** at limit **
   3  Prefactor     1.9746        1.2838        .69730E-07    .43478E-03
   4  Prefactor     .10000E-03    9.7024        .23432E-07** at limit **
   5  norm          .10000E-03    13.586        .37141E-06** at limit **
   6  norm          20.208        9.0057        .43761E-07    .10174E-03
   7  Prefactor     86.320        113.18        .98293E-06   -.75599E-04
   8  norm          .10000E-03    10.706        .13170E-06** at limit **
   9  norm          .10000E-03    13.222       -.98516E-07** at limit **
  10  norm          .10000E-03    .51474        .84991E-06** at limit **
  11  Prefactor     7.7086        12.073       -.15694E-05   -.54818E-03
  12  Prefactor     8.9319        5.3641        .29532E-06   -.23560E-03
  13  norm          5.9141        2.7767       -.50417E-07   -.56194E-04
  14  Prefactor     8.5329        3.5706        .69583E-07    .48930E-04
  15  Prefactor     68.504        63.123        .44593E-06   -.23975E-04
  16  norm          7.1424        14.850       -.22203E-07   -.14640E-04
  17  Prefactor     9.8149        9.9074        .36670E-06   -.10559E-03
  18  Prefactor     3.8311        4.4694        .24136E-06   -.15330E-03
  19  Prefactor     2.2987        7.2977        .38563E-05   -.52880E-03
  20  Prefactor     7.6423        9.1030       -.12339E-06    .10324E-04
  21  Normalizat    .40927        .23841       -.34292E-05   -.22108E-03
  22  Prefactor     1.1312        .10356        .63333E-06   -.47011E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 13.2756
  Prefactor  = 0.0001
  Prefactor  = 1.97459
  Prefactor  = 0.0001
  norm       = 0.000100001
  norm       = 20.208
  Prefactor  = 86.3196
  norm       = 0.0001
  norm       = 0.0001
  norm       = 0.0001
  Prefactor  = 7.70857
  Prefactor  = 8.9319
  norm       = 5.91409
  Prefactor  = 8.53291
  Prefactor  = 68.5036
  norm       = 7.14245
  Prefactor  = 9.81488
  Prefactor  = 3.83107
  Prefactor  = 2.29866
  Prefactor  = 7.64226
  Normalizat = 0.409266
  Prefactor  = 1.13116
 **********
 **   18 **HESSE 
 **********

 FCN=   10265.04     FROM HESSE     STATUS=OK           348 CALLS     2721 TOTAL
                     EDM=   .19E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     13.276        14.233        .10993E-03   -1.4979    
   2  Prefactor     .10000E-03    20.195        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     1.9746        1.2817        .88783E-04   -1.5427    
   4  Prefactor     .10000E-03    9.7816        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          .10000E-03    14.170        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  norm          20.208        8.9986        .89102E-04   -1.4809    
   7  Prefactor     86.320        112.43        .43234E-04   -1.3847    
   8  norm          .10000E-03    10.744        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          .10000E-03    13.271        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          .10000E-03    .85149        .13666E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     7.7086        12.387        .14456E-03   -1.5153    
  12  Prefactor     8.9319        5.3682        .67055E-03   -1.5110    
  13  norm          5.9141        2.7748        .56185E-03   -1.5222    
  14  Prefactor     8.5329        3.5514        .11718E-03   -1.5124    
  15  Prefactor     68.504        62.746        .48495E-04   -1.4051    
  16  norm          7.1424        14.832        .15009E-03   -1.5173    
  17  Prefactor     9.8149        9.8870        .63953E-03   -1.5081    
  18  Prefactor     3.8311        4.4442        .20618E-03   -1.5316    
  19  Prefactor     2.2987        7.5700        .13533E-02   -1.5405    
  20  Prefactor     7.6423        9.0658        .14506E-03   -1.5155    
  21  Normalizat    .40927        .23550        .52585E-03   -1.1683    
  22  Prefactor     1.1312        .10495        .14960E-03   -.88477    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.86611e-09
Minuit parameter uncertainties:
  1  14.237
  2  5.96007e-05
  3  1.28171
  4  7.08657e-05
  5  0.000189052
  6  8.99925
  7  112.706
  8  0.00010425
  9  2.82933e-05
  10  3.24215e-05
  11  12.3913
  12  5.36847
  13  2.7749
  14  3.55152
  15  62.8065
  16  14.8396
  17  9.8886
  18  4.44457
  19  7.57317
  20  9.06745
  21  0.23607
  22  0.104965
Done.

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

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  8.533e+00  3.552e+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:  1.131e+00  1.050e-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:  4.093e-01  2.361e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 10.83
Ra Dec: 310.136 -17.090
Photon Index (Fixed Index): 2.54 +/- 0.00
Photon Flux (Fixed Index): 1.00e-07 +/- 4.16e-08
Energy Flux (Fixed Index): 2.78e-05 +/- 1.16e-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) = 10263.6991933
delta logL = 1.3425920664

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 10263.4510179
delta logL = 1.59076747748

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    12.296       1.0000         .10000E-03   10000.    
     2 'Index     '    1.9130       1.0000          .0000       10.000    
     3 'Normalizat'    .46268       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1145       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=   10263.45     FROM MIGRAD    STATUS=CONVERGED     53 CALLS      215 TOTAL
                     EDM=   .65E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY= 34.5%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     12.296        4.6419        .72305E-06   -.21923E-02
   2  Index         1.9131        .25495       -.29558E-05   -.50705E-03
   3  Normalizat    .46287        .21365        .29322E-06    .12154E-04
   4  Prefactor     1.1144        .97337E-01   -.84946E-07    .32293E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 12.2963
  Index      = 1.91308
  Normalizat = 0.462875
  Prefactor  = 1.1144
 **********
 **   18 **HESSE 
 **********

 FCN=   10263.45     FROM HESSE     STATUS=OK            31 CALLS      246 TOTAL
                     EDM=   .31E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     12.296        5.3347        .11424E-03   -1.5007    
   2  Index         1.9131        .32095        .67548E-02   -.66541    
   3  Normalizat    .46287        .22283        .49585E-03   -1.1417    
   4  Prefactor     1.1144        .10194        .15056E-03   -.89008    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.07818e-09
Minuit parameter uncertainties:
  1  5.33486
  2  0.321306
  3  0.223256
  4  0.101962
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/108589': 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) = 10263.4510174
delta logL = 1.59076795396

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  1.230e+01  5.335e+00  1.000e-04  1.000e+04 ( 1.000e-12)
324        Index:  1.913e+00  3.213e-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.114e+00  1.020e-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:  4.629e-01  2.233e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 13.86
Ra Dec: 310.136 -17.090
Photon Index (Free Index): 1.91 +/- 0.32
Photon Flux (Free Index): 6.72e-08 +/- 3.71e-08
Energy Flux (Free Index): 5.81e-05 +/- 3.97e-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/108589/cmap_HighResolution_392256001_392515201_4FGL_J2040.5-1705_daily_bin590.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='1.00e-07', energy_flux2='5.81e-05', photon_flux_error='4.16e-08', dlogl='1.59e+00', energy_flux='2.78e-05', photon_flux2='6.72e-08', job_status='DONE', time_completed='2021-09-25 16:00:31.535066', photon_index_error2='0.32', photon_index2='1.91', ts='10.83', fit_tolerance='1e-08', GAL='1.13', photon_index_error='0.00', energy_flux_error2='3.97e-05', EG='0.41', time_epoch_completed='1632610831.54', return_code='0', job_id='108589', GAL2='1.11', EG2='0.46', return_code2='0', energy_flux_error='1.16e-05', photon_flux_error2='3.71e-08', ts2='13.86', photon_index='2.54' WHERE bin_id='590' AND source_name='4FGL J2040.5-1705' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep 25 16:00:31 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0189>
Subject: Job 108589: <4FGL_J2040.5-1705_daily_bin590> in cluster <slac> Done

Job <4FGL_J2040.5-1705_daily_bin590> was submitted from host <rhel6-64f> by user <kocevski> in cluster <slac> at Sat Sep 25 15:45:24 2021
Job was executed on host(s) <bullet0189>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Sep 25 15:47:23 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:47:23 2021
Terminated at Sat Sep 25 16:00:32 2021
Results reported at Sat Sep 25 16:00:32 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2040.5-1705_daily_bin590 310.136 -17.0901 392256001 392515201 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 :                                   641.12 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             297.04 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   789 sec.
    Turnaround time :                            908 sec.

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

