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


Performing analysis on: 4FGL_J2040.5-1705_daily_bin1037
RA = 310.136, Dec = -17.0901
tmin = 508118401, tmax = 508377601
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='111566', job_status='RUN', time_executed='2021-09-25 15:58:41.568847', time_epoch_executed='1632610721.57' WHERE source_name='4FGL J2040.5-1705' and cadence='daily' and bin_id='1037'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/111566

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/111566/ft1_4FGL_J2040.5-1705_daily_bin1037.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/111566/ft2_4FGL_J2040.5-1705_daily_bin1037.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/111566/ft1_4FGL_J2040.5-1705_daily_bin1037.fits outfile=/scratch/kocevski/111566/ft1_filteredMKT_4FGL_J2040.5-1705_daily_bin1037.fits ra=310.136 dec=-17.0901 rad=12.0 tmin=508118401.0 tmax=508377601.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.85
user 3.45
sys 0.23

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/111566/ft1_filtered_4FGL_J2040.5-1705_daily_bin1037.fits" evtable="EVENTS" scfile=/scratch/kocevski/111566/ft2_4FGL_J2040.5-1705_daily_bin1037.fits sctable="SC_DATA" outfile=/scratch/kocevski/111566/ltcube_508118401_508377601_4FGL_J2040.5-1705_daily_bin1037.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/111566/ft2_4FGL_J2040.5-1705_daily_bin1037.fits
.....................!
real 16.05
user 15.58
sys 0.36

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/111566/ft1_filtered_4FGL_J2040.5-1705_daily_bin1037.fits evtable="EVENTS" scfile=/scratch/kocevski/111566/ft2_4FGL_J2040.5-1705_daily_bin1037.fits sctable="SC_DATA" expcube=/scratch/kocevski/111566/ltcube_508118401_508377601_4FGL_J2040.5-1705_daily_bin1037.fits outfile=/scratch/kocevski/111566/expmap_508118401_508377601_4FGL_J2040.5-1705_daily_bin1037.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/111566/ltcube_508118401_508377601_4FGL_J2040.5-1705_daily_bin1037.fits
.....................!
real 193.92
user 188.04
sys 5.09

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/111566/ft1_filtered_4FGL_J2040.5-1705_daily_bin1037.fits scfile=/scratch/kocevski/111566/ft2_4FGL_J2040.5-1705_daily_bin1037.fits outfile=/scratch/kocevski/111566/cmap_508118401_508377601_4FGL_J2040.5-1705_daily_bin1037.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.58
user 0.37
sys 0.16

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

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/111566/ft1_filtered_4FGL_J2040.5-1705_daily_bin1037.fits evtable="EVENTS" scfile=/scratch/kocevski/111566/ft2_4FGL_J2040.5-1705_daily_bin1037.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/111566/Model_4FGL_J2040.5-1705_daily_bin1037.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/111566/ft1_filtered_4FGL_J2040.5-1705_daily_bin1037.fits.....................!
real 90.23
user 88.32
sys 1.23

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10036E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    .39941       1.0000         .10000E-03   10000.    
     4 'Prefactor '    12.635       1.0000         .10000E-03   10000.    
     5 'norm      '    1.6424       1.0000         .10000E-03   10000.    
     6 'norm      '    .10052E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    4.1030       1.0000         .10000E-03   10000.    
     9 'norm      '    23.047       1.0000         .10000E-03   10000.    
    10 'norm      '    .13182       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10010E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .18129E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    1.6955       1.0000         .10000E-03   10000.    
    14 'Prefactor '    11.631       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10041E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    .10012E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10020E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    .11650E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    73.496       1.0000         .10000E-03   10000.    
    21 'Normalizat'    1.0636       1.0000         .10000E-01   10.000    
    22 'Prefactor '    1.1354       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=   10250.90     FROM MIGRAD    STATUS=CONVERGED    491 CALLS     2396 TOTAL
                     EDM=   .56E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  5.1%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    10.057        .80685E-06** at limit **
   2  Prefactor     .10000E-03    28.811        .22746E-05** at limit **
   3  Prefactor     .39571        1.5051        .14964E-05   -.10181E-02
   4  Prefactor     12.664        15.026       -.21681E-05   -.40169E-03
   5  norm          1.6431        9.0568        .89333E-06   -.21568E-03
   6  norm          .10000E-03    4.5539       -.70824E-08** at limit **
   7  Prefactor     .10000E-03    20.648       -.27682E-05** at limit **
   8  norm          4.1011        11.931        .13869E-06   -.38312E-04
   9  norm          23.047        23.852        .82469E-07    .12981E-04
  10  norm          .13166        .52033        .86606E-08   -.16642E-03
  11  Prefactor     .10000E-03    11.445       -.87139E-06** at limit **
  12  Prefactor     .10001E-03    3.0272       -.48308E-06** at limit **
  13  norm          1.6956        1.9983        .12158E-07   -.26847E-04
  14  Prefactor     11.631        4.5899        .11234E-06    .13806E-03
  15  Prefactor     .10000E-03    62.300       -.11217E-05** at limit **
  16  norm          .10000E-03    6.7046       -.15355E-08** at limit **
  17  Prefactor     .10000E-03    14.230        .14477E-05** at limit **
  18  Prefactor     .10000E-03    3.4223        .14943E-07** at limit **
  19  Prefactor     .10000E-03    16.892        .50322E-06** at limit **
  20  Prefactor     73.495        22.713        .49395E-07   -.27104E-04
  21  Normalizat    1.0637        .23700       -.18158E-06   -.29735E-04
  22  Prefactor     1.1354        .10108       -.11968E-06   -.10425E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.000100003
  Prefactor  = 0.395708
  Prefactor  = 12.664
  norm       = 1.64309
  norm       = 0.0001
  Prefactor  = 0.000100005
  norm       = 4.10113
  norm       = 23.0472
  norm       = 0.131664
  Prefactor  = 0.0001
  Prefactor  = 0.000100007
  norm       = 1.69557
  Prefactor  = 11.6308
  Prefactor  = 0.000100001
  norm       = 0.0001
  Prefactor  = 0.000100001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 73.4948
  Normalizat = 1.06372
  Prefactor  = 1.13536
 **********
 **   18 **HESSE 
 **********

 FCN=   10250.90     FROM HESSE     STATUS=OK           344 CALLS     2740 TOTAL
                     EDM=   .25E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    10.178        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    29.756        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .39571        1.6346        .20992E-03   -1.5582    
   4  Prefactor     12.664        15.021        .11269E-03   -1.4996    
   5  norm          1.6431        9.3090        .32966E-03   -1.5452    
   6  norm          .10000E-03    4.6707        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    21.900        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          4.1011        11.914        .19902E-03   -1.5303    
   9  norm          23.047        23.865        .83437E-04   -1.4747    
  10  norm          .13166        2.7903        .13737E-02   -1.5635    
  11  Prefactor     .10000E-03    11.617        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10001E-03    10.857        .33479E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          1.6956        1.9910        .15124E-03   -1.5448    
  14  Prefactor     11.631        4.5990        .11746E-03   -1.5026    
  15  Prefactor     .10000E-03    62.681        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          .10000E-03    6.7082        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     .10000E-03    14.726        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10000E-03    3.4561        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10000E-03    16.998        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     73.495        22.745        .46832E-04   -1.3991    
  21  Normalizat    1.0637        .27704        .40829E-03   -.90925    
  22  Prefactor     1.1354        .11959        .17092E-03   -.88344    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.46911e-08
Minuit parameter uncertainties:
  1  0.000131149
  2  0.000612123
  3  1.60837
  4  15.0255
  5  7.82351
  6  8.07156e-06
  7  0.000647476
  8  11.9206
  9  23.8747
  10  1.21184
  11  0.000133838
  12  0.00056759
  13  1.99108
  14  4.59916
  15  0.000437095
  16  1.32207e-07
  17  0.000250919
  18  1.07281e-06
  19  0.000101074
  20  22.7478
  21  0.277421
  22  0.11962
Done.

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

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  1.163e+01  4.599e+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.135e+00  1.196e-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.064e+00  2.774e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 12.02
Ra Dec: 310.136 -17.090
Photon Index (Fixed Index): 2.54 +/- 0.00
Photon Flux (Fixed Index): 1.36e-07 +/- 5.38e-08
Energy Flux (Fixed Index): 3.78e-05 +/- 1.50e-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) = 10250.8600079
delta logL = 0.0398916915274

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 10250.8584705
delta logL = 0.0414291220713

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    10.375       1.0000         .10000E-03   10000.    
     2 'Index     '    2.6625       1.0000          .0000       10.000    
     3 'Normalizat'    1.0504       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1396       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=   10250.86     FROM MIGRAD    STATUS=CONVERGED     56 CALLS      262 TOTAL
                     EDM=   .61E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     10.376        57.002        .31098E-02    .23435E-03
   2  Index         2.6627        2.7550        .13871        .16934E-03
   3  Normalizat    1.0504        .11230        .92685E-01    .93312E-05
   4  Prefactor     1.1396        .41782E-01    .36246E-01   -.71925E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 10.3765
  Index      = 2.66274
  Normalizat = 1.0504
  Prefactor  = 1.13956
 **********
 **   18 **HESSE 
 **********

 FCN=   10250.86     FROM HESSE     STATUS=OK            33 CALLS      295 TOTAL
                     EDM=   .52E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     10.376        6.5321        .12021E-03   -1.5064    
   2  Index         2.6627        .46398        .53244E-02   -.48641    
   3  Normalizat    1.0504        .27614        .41054E-03   -.91361    
   4  Prefactor     1.1396        .11772        .17065E-03   -.88212    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 5.23354e-09
Minuit parameter uncertainties:
  1  6.53258
  2  0.464836
  3  0.276519
  4  0.11775
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/111566': 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) = 10250.8584698
delta logL = 0.0414298176674

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  1.038e+01  6.533e+00  1.000e-04  1.000e+04 ( 1.000e-12)
324        Index:  2.663e+00  4.648e-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.140e+00  1.177e-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.050e+00  2.765e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 12.12
Ra Dec: 310.136 -17.090
Photon Index (Free Index): 2.66 +/- 0.46
Photon Flux (Free Index): 1.44e-07 +/- 6.16e-08
Energy Flux (Free Index): 3.58e-05 +/- 1.59e-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/111566/cmap_HighResolution_508118401_508377601_4FGL_J2040.5-1705_daily_bin1037.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='1.36e-07', energy_flux2='3.58e-05', photon_flux_error='5.38e-08', dlogl='4.14e-02', energy_flux='3.78e-05', photon_flux2='1.44e-07', job_status='DONE', time_completed='2021-09-25 16:12:07.884153', photon_index_error2='0.46', photon_index2='2.66', ts='12.02', fit_tolerance='1e-08', GAL='1.14', photon_index_error='0.00', energy_flux_error2='1.59e-05', EG='1.06', time_epoch_completed='1632611527.88', return_code='0', job_id='111566', GAL2='1.14', EG2='1.05', return_code2='0', energy_flux_error='1.50e-05', photon_flux_error2='6.16e-08', ts2='12.12', photon_index='2.54' WHERE bin_id='1037' AND source_name='4FGL J2040.5-1705' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep 25 16:12:07 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0111>
Subject: Job 111566: <4FGL_J2040.5-1705_daily_bin1037> in cluster <slac> Done

Job <4FGL_J2040.5-1705_daily_bin1037> was submitted from host <rhel6-64p> by user <kocevski> in cluster <slac> at Sat Sep 25 15:55:29 2021
Job was executed on host(s) <bullet0111>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Sep 25 15:55:46 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:46 2021
Terminated at Sat Sep 25 16:12:08 2021
Results reported at Sat Sep 25 16:12:08 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2040.5-1705_daily_bin1037 310.136 -17.0901 508118401 508377601 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 :                                   801.27 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             257.14 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   982 sec.
    Turnaround time :                            999 sec.

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

