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


Performing analysis on: 4FGL_J2040.5-1705_daily_bin1015
RA = 310.136, Dec = -17.0901
tmin = 502416001, tmax = 502675201
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='111534', job_status='RUN', time_executed='2021-09-25 15:57:09.938285', time_epoch_executed='1632610629.94' WHERE source_name='4FGL J2040.5-1705' and cadence='daily' and bin_id='1015'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/111534

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/111534/ft1_4FGL_J2040.5-1705_daily_bin1015.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/111534/ft2_4FGL_J2040.5-1705_daily_bin1015.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/111534/ft1_4FGL_J2040.5-1705_daily_bin1015.fits outfile=/scratch/kocevski/111534/ft1_filteredMKT_4FGL_J2040.5-1705_daily_bin1015.fits ra=310.136 dec=-17.0901 rad=12.0 tmin=502416001.0 tmax=502675201.0 emin=100.0 emax=100000.0 zmin=0.0 zmax=90.0 evclass=128 evtype="INDEF" convtype=-1 phasemin=0.0 phasemax=1.0 evtable="EVENTS" chatter=2 clobber=yes debug=no gui=no mode="ql"

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

Done.
real 3.53
user 3.32
sys 0.20

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/111534/ft1_filtered_4FGL_J2040.5-1705_daily_bin1015.fits" evtable="EVENTS" scfile=/scratch/kocevski/111534/ft2_4FGL_J2040.5-1705_daily_bin1015.fits sctable="SC_DATA" outfile=/scratch/kocevski/111534/ltcube_502416001_502675201_4FGL_J2040.5-1705_daily_bin1015.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/111534/ft2_4FGL_J2040.5-1705_daily_bin1015.fits
.....................!
real 13.41
user 13.01
sys 0.35

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/111534/ft1_filtered_4FGL_J2040.5-1705_daily_bin1015.fits evtable="EVENTS" scfile=/scratch/kocevski/111534/ft2_4FGL_J2040.5-1705_daily_bin1015.fits sctable="SC_DATA" expcube=/scratch/kocevski/111534/ltcube_502416001_502675201_4FGL_J2040.5-1705_daily_bin1015.fits outfile=/scratch/kocevski/111534/expmap_502416001_502675201_4FGL_J2040.5-1705_daily_bin1015.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/111534/ltcube_502416001_502675201_4FGL_J2040.5-1705_daily_bin1015.fits
.....................!
real 191.11
user 185.98
sys 4.58

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/111534/ft1_filtered_4FGL_J2040.5-1705_daily_bin1015.fits scfile=/scratch/kocevski/111534/ft2_4FGL_J2040.5-1705_daily_bin1015.fits outfile=/scratch/kocevski/111534/cmap_502416001_502675201_4FGL_J2040.5-1705_daily_bin1015.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.39
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/111534/ft1_filtered_4FGL_J2040.5-1705_daily_bin1015.fits scfile=/scratch/kocevski/111534/ft2_4FGL_J2040.5-1705_daily_bin1015.fits outfile=/scratch/kocevski/111534/cmap_HighResolution_502416001_502675201_4FGL_J2040.5-1705_daily_bin1015.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.39
sys 0.15

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/111534/ft1_filtered_4FGL_J2040.5-1705_daily_bin1015.fits evtable="EVENTS" scfile=/scratch/kocevski/111534/ft2_4FGL_J2040.5-1705_daily_bin1015.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/111534/Model_4FGL_J2040.5-1705_daily_bin1015.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/111534/ft1_filtered_4FGL_J2040.5-1705_daily_bin1015.fits.....................!
real 98.26
user 95.24
sys 1.35

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    2.5052       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    4.8797       1.0000         .10000E-03   10000.    
     4 'Prefactor '    3.0884       1.0000         .10000E-03   10000.    
     5 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
     6 'norm      '    21.967       1.0000         .10000E-03   10000.    
     7 'Prefactor '    32.125       1.0000         .10000E-03   10000.    
     8 'norm      '    7.8694       1.0000         .10000E-03   10000.    
     9 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    10 'norm      '    1.4905       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .10005E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    16.887       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    .10013E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    2.5672       1.0000         .10000E-03   10000.    
    19 'Prefactor '    10.068       1.0000         .10000E-03   10000.    
    20 'Prefactor '    37.385       1.0000         .10000E-03   10000.    
    21 'Normalizat'    1.0011       1.0000         .10000E-01   10.000    
    22 'Prefactor '    1.0246       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=   11544.19     FROM MIGRAD    STATUS=CONVERGED    465 CALLS     2399 TOTAL
                     EDM=   .72E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .8%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     2.5002        28.073       -.16969E-07   -.16192E-04
   2  Prefactor     .10000E-03    14.630       -.75682E-07** at limit **
   3  Prefactor     4.8834        2.3854        .66615E-06   -.30522E-03
   4  Prefactor     3.0554        28.450       -.12097E-05   -.11315E-03
   5  norm          .10000E-03    3.6722       -.82436E-07** at limit **
   6  norm          21.975        11.207       -.55095E-06    .76533E-04
   7  Prefactor     32.115        97.936        .25484E-06   -.62618E-05
   8  norm          7.8698        8.5399        .49176E-07   -.36373E-05
   9  norm          .10000E-03    11.009        .10875E-06** at limit **
  10  norm          1.4906        .92439        .52532E-07   -.20870E-04
  11  Prefactor     .10000E-03    4.0058        .40093E-07** at limit **
  12  Prefactor     .10000E-03    1.4790        .36828E-07** at limit **
  13  norm          .10000E-03    2.4514        .11758E-06** at limit **
  14  Prefactor     16.886        4.9200        .53395E-07   -.10320E-04
  15  Prefactor     .10000E-03    22.533        .24215E-06** at limit **
  16  norm          .10000E-03    4.5751        .15403E-07** at limit **
  17  Prefactor     .10000E-03    13.923        .41543E-07** at limit **
  18  Prefactor     2.5671        2.6207        .37828E-07   -.86402E-06
  19  Prefactor     10.064        18.552        .15248E-06   -.18140E-04
  20  Prefactor     37.382        16.043        .29926E-07   -.16657E-04
  21  Normalizat    1.0014        .20429       -.20033E-06   -.18576E-04
  22  Prefactor     1.0245        .89230E-01   -.30775E-06    .35229E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 2.50019
  Prefactor  = 0.0001
  Prefactor  = 4.88338
  Prefactor  = 3.05542
  norm       = 0.0001
  norm       = 21.9754
  Prefactor  = 32.1147
  norm       = 7.86976
  norm       = 0.0001
  norm       = 1.49059
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 16.8862
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 2.56709
  Prefactor  = 10.0639
  Prefactor  = 37.3818
  Normalizat = 1.00135
  Prefactor  = 1.02445
 **********
 **   18 **HESSE 
 **********

 FCN=   11544.19     FROM HESSE     STATUS=OK           342 CALLS     2741 TOTAL
                     EDM=   .14E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     2.5002        28.207        .25818E-03   -1.5392    
   2  Prefactor     .10000E-03    14.649        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     4.8834        2.3605        .44815E-03   -1.5266    
   4  Prefactor     3.0554        26.881        .23078E-03   -1.5358    
   5  norm          .10000E-03    3.6895        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  norm          21.975        11.051        .85461E-04   -1.4770    
   7  Prefactor     32.115        98.055        .70695E-04   -1.4574    
   8  norm          7.8698        8.5412        .14294E-03   -1.5147    
   9  norm          .10000E-03    11.028        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          1.4906        .91500        .78749E-04   -1.5464    
  11  Prefactor     .10000E-03    4.0154        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    1.4863        .12760E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .10000E-03    2.5476        .32850E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     16.886        4.9351        .97464E-04   -1.4886    
  15  Prefactor     .10000E-03    22.566        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          .10000E-03    4.5777        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     .10000E-03    14.117        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     2.5671        2.6223        .17078E-03   -1.5388    
  19  Prefactor     10.064        18.523        .12628E-03   -1.5073    
  20  Prefactor     37.382        16.055        .65549E-04   -1.4484    
  21  Normalizat    1.0014        .24145        .38863E-03   -.92985    
  22  Prefactor     1.0245        .10587        .17038E-03   -.91919    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.41742e-10
Minuit parameter uncertainties:
  1  16.8054
  2  2.05048e-05
  3  2.3605
  4  18.1361
  5  1.23878e-06
  6  11.0525
  7  98.5523
  8  8.54257
  9  2.26168e-05
  10  0.915011
  11  2.8292e-06
  12  6.88673e-07
  13  2.44762e-06
  14  4.93518
  15  8.02928e-05
  16  9.78936e-07
  17  1.86387e-05
  18  2.62237
  19  18.5335
  20  16.0564
  21  0.241718
  22  0.10589
Done.

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

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  1.689e+01  4.935e+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.024e+00  1.059e-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.001e+00  2.417e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 26.52
Ra Dec: 310.136 -17.090
Photon Index (Fixed Index): 2.54 +/- 0.00
Photon Flux (Fixed Index): 1.98e-07 +/- 5.78e-08
Energy Flux (Fixed Index): 5.49e-05 +/- 1.61e-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) = 11544.1583511
delta logL = 0.0335020083894

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 11544.1414884
delta logL = 0.05036472957

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    18.233       1.0000         .10000E-03   10000.    
     2 'Index     '    2.4454       1.0000          .0000       10.000    
     3 'Normalizat'    1.0172       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0197       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=   11544.14     FROM MIGRAD    STATUS=CONVERGED     58 CALLS      239 TOTAL
                     EDM=   .10E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     18.231        67.165        .23450E-02    .10320E-03
   2  Index         2.4457        2.4439        .12428        .19521E-03
   3  Normalizat    1.0173        .12842        .87178E-01    .26556E-04
   4  Prefactor     1.0197        .44050E-01    .42170E-01   -.21243E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 18.2309
  Index      = 2.44569
  Normalizat = 1.01729
  Prefactor  = 1.01969
 **********
 **   18 **HESSE 
 **********

 FCN=   11544.14     FROM HESSE     STATUS=OK            31 CALLS      270 TOTAL
                     EDM=   .33E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     18.231        6.8931        .93798E-04   -1.4854    
   2  Index         2.4457        .30665        .48487E-02   -.53619    
   3  Normalizat    1.0173        .23900        .38601E-03   -.92453    
   4  Prefactor     1.0197        .10357        .17074E-03   -.92076    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.29126e-09
Minuit parameter uncertainties:
  1  6.89342
  2  0.306906
  3  0.239255
  4  0.103592
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/111534': 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) = 11544.1414877
delta logL = 0.0503654579843

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  1.823e+01  6.893e+00  1.000e-04  1.000e+04 ( 1.000e-12)
324        Index:  2.446e+00  3.069e-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.020e+00  1.036e-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.017e+00  2.393e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 26.38
Ra Dec: 310.136 -17.090
Photon Index (Free Index): 2.45 +/- 0.31
Photon Flux (Free Index): 1.87e-07 +/- 6.51e-08
Energy Flux (Free Index): 5.79e-05 +/- 2.05e-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/111534/cmap_HighResolution_502416001_502675201_4FGL_J2040.5-1705_daily_bin1015.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='1.98e-07', energy_flux2='5.79e-05', photon_flux_error='5.78e-08', dlogl='5.04e-02', energy_flux='5.49e-05', photon_flux2='1.87e-07', job_status='DONE', time_completed='2021-09-25 16:11:34.941980', photon_index_error2='0.31', photon_index2='2.45', ts='26.52', fit_tolerance='1e-08', GAL='1.02', photon_index_error='0.00', energy_flux_error2='2.05e-05', EG='1.00', time_epoch_completed='1632611494.94', return_code='0', job_id='111534', GAL2='1.02', EG2='1.02', return_code2='0', energy_flux_error='1.61e-05', photon_flux_error2='6.51e-08', ts2='26.38', photon_index='2.54' WHERE bin_id='1015' AND source_name='4FGL J2040.5-1705' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep 25 16:11:34 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0204>
Subject: Job 111534: <4FGL_J2040.5-1705_daily_bin1015> in cluster <slac> Done

Job <4FGL_J2040.5-1705_daily_bin1015> 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) <bullet0204>, 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:35 2021
Results reported at Sat Sep 25 16:11:35 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2040.5-1705_daily_bin1015 310.136 -17.0901 502416001 502675201 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 :                                   861.47 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             365.90 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   953 sec.
    Turnaround time :                            969 sec.

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

