/nfs/farm/g/glast/g/LCRepository/bin/miniconda2/envs/fermitools_v1.0.5/lib/python2.7/site-packages/matplotlib/font_manager.py:281: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment.
  'Matplotlib is building the font cache using fc-list. '
/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 23 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 = 7414
number of fields = 30
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J2040.5-1705_daily_bin1287
RA = 310.136, Dec = -17.0901
tmin = 572918401, tmax = 573177601
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='113104', job_status='RUN', time_executed='2021-09-25 16:01:17.616439', time_epoch_executed='1632610877.62' WHERE source_name='4FGL J2040.5-1705' and cadence='daily' and bin_id='1287'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/113104

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/113104/ft1_4FGL_J2040.5-1705_daily_bin1287.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/113104/ft2_4FGL_J2040.5-1705_daily_bin1287.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/113104/ft1_4FGL_J2040.5-1705_daily_bin1287.fits outfile=/scratch/kocevski/113104/ft1_filteredMKT_4FGL_J2040.5-1705_daily_bin1287.fits ra=310.136 dec=-17.0901 rad=12.0 tmin=572918401.0 tmax=573177601.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.89
user 4.62
sys 0.24

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/113104/ft2_4FGL_J2040.5-1705_daily_bin1287.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/113104/ft1_filteredMKT_4FGL_J2040.5-1705_daily_bin1287.fits evtable="EVENTS" outfile="/scratch/kocevski/113104/ft1_filtered_4FGL_J2040.5-1705_daily_bin1287.fits" apply_filter=yes overwrite=yes header_obstimes=yes tstart=0.0 tstop=0.0 gtifile="default" chatter=3 clobber=yes debug=no gui=no mode="ql"

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

This is gtmktime version HEAD
Applying GTI filter:
IN_SAA!=T && LIVETIME>0 && gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nogrb.gti',(START+STOP)/2) && (angsep(RA_SUN,DEC_SUN,RA_ZENITH,DEC_ZENITH)>115 || gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nosolarflares.gti',(START+STOP)/2))
real 0.51
user 0.32
sys 0.17

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/113104/ft1_filtered_4FGL_J2040.5-1705_daily_bin1287.fits" evtable="EVENTS" scfile=/scratch/kocevski/113104/ft2_4FGL_J2040.5-1705_daily_bin1287.fits sctable="SC_DATA" outfile=/scratch/kocevski/113104/ltcube_572918401_573177601_4FGL_J2040.5-1705_daily_bin1287.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/113104/ft2_4FGL_J2040.5-1705_daily_bin1287.fits
.....................!
real 13.53
user 13.16
sys 0.33

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/113104/ft1_filtered_4FGL_J2040.5-1705_daily_bin1287.fits evtable="EVENTS" scfile=/scratch/kocevski/113104/ft2_4FGL_J2040.5-1705_daily_bin1287.fits sctable="SC_DATA" expcube=/scratch/kocevski/113104/ltcube_572918401_573177601_4FGL_J2040.5-1705_daily_bin1287.fits outfile=/scratch/kocevski/113104/expmap_572918401_573177601_4FGL_J2040.5-1705_daily_bin1287.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/113104/ltcube_572918401_573177601_4FGL_J2040.5-1705_daily_bin1287.fits
.....................!
real 191.74
user 185.87
sys 5.13

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/113104/ft1_filtered_4FGL_J2040.5-1705_daily_bin1287.fits scfile=/scratch/kocevski/113104/ft2_4FGL_J2040.5-1705_daily_bin1287.fits outfile=/scratch/kocevski/113104/cmap_572918401_573177601_4FGL_J2040.5-1705_daily_bin1287.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.40
sys 0.14

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

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/113104/ft1_filtered_4FGL_J2040.5-1705_daily_bin1287.fits evtable="EVENTS" scfile=/scratch/kocevski/113104/ft2_4FGL_J2040.5-1705_daily_bin1287.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/113104/Model_4FGL_J2040.5-1705_daily_bin1287.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/113104/ft1_filtered_4FGL_J2040.5-1705_daily_bin1287.fits.....................!
real 64.31
user 62.87
sys 1.24

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10016E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    66.911       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .68322       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10100E-03   1.0000         .10000E-03   10000.    
     5 'norm      '    9.8426       1.0000         .10000E-03   10000.    
     6 'norm      '    .10004E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    36.124       1.0000         .10000E-03   10000.    
     8 'norm      '    .10026E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    28.609       1.0000         .10000E-03   10000.    
    10 'norm      '    8.8490       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    17.438       1.0000         .10000E-03   10000.    
    13 'norm      '    2.7353       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10068E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    .10007E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    5.7941       1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10014E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10014E-03   1.0000         .10000E-03   10000.    
    21 'Normalizat'    .90220       1.0000         .10000E-01   10.000    
    22 'Prefactor '    .96347       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=   6746.717     FROM MIGRAD    STATUS=CONVERGED    465 CALLS     2374 TOTAL
                     EDM=   .86E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.8%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    14.290       -.10952E-05** at limit **
   2  Prefactor     66.894        50.453       -.48196E-05   -.41406E-03
   3  Prefactor     .68440        1.4873        .35791E-06    .17893E-03
   4  Prefactor     .10000E-03    18.886        .17106E-05** at limit **
   5  norm          9.8424        10.722        .79266E-08   -.19487E-04
   6  norm          .10000E-03    3.1573        .42176E-08** at limit **
   7  Prefactor     36.127        87.901        .15538E-05    .13485E-04
   8  norm          .10000E-03    24.059        .11632E-05** at limit **
   9  norm          28.608        26.898       -.12385E-06   -.29330E-04
  10  norm          8.8495        2.2794        .27242E-07   -.57303E-04
  11  Prefactor     .10000E-03    5.5261        .24762E-06** at limit **
  12  Prefactor     17.437        10.970       -.36923E-07   -.78446E-05
  13  norm          2.7356        2.9766        .25628E-07   -.94135E-05
  14  Prefactor     .10000E-03    4.9888        .24779E-07** at limit **
  15  Prefactor     .10000E-03    26.567       -.19683E-05** at limit **
  16  norm          .10000E-03    12.824       -.48670E-06** at limit **
  17  Prefactor     .10000E-03    8.3408        .15204E-05** at limit **
  18  Prefactor     5.7904        8.8671        .32734E-05   -.80234E-03
  19  Prefactor     .10000E-03    12.202        .14619E-06** at limit **
  20  Prefactor     .10000E-03    7.5417       -.11233E-05** at limit **
  21  Normalizat    .90272        .27239       -.16341E-05   -.11400E-04
  22  Prefactor     .96326        .11263        .54039E-06   -.21757E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 66.8941
  Prefactor  = 0.6844
  Prefactor  = 0.000100001
  norm       = 9.8424
  norm       = 0.0001
  Prefactor  = 36.127
  norm       = 0.0001
  norm       = 28.608
  norm       = 8.8495
  Prefactor  = 0.0001
  Prefactor  = 17.4371
  norm       = 2.73556
  Prefactor  = 0.0001
  Prefactor  = 0.000100001
  norm       = 0.0001
  Prefactor  = 0.000100001
  Prefactor  = 5.7904
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Normalizat = 0.902717
  Prefactor  = 0.963262
 **********
 **   18 **HESSE 
 **********

 FCN=   6746.717     FROM HESSE     STATUS=OK           336 CALLS     2710 TOTAL
                     EDM=   .23E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    14.338        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     66.894        54.101        .49066E-04   -1.4070    
   3  Prefactor     .68440        1.3439        .14090E-02   -1.5543    
   4  Prefactor     .10000E-03    19.366        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          9.8424        10.726        .12773E-03   -1.5080    
   6  norm          .10000E-03    3.1634        .14251E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     36.127        88.044        .66679E-04   -1.4505    
   8  norm          .10000E-03    24.393        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          28.608        26.908        .74903E-04   -1.4638    
  10  norm          8.8495        2.2789        .60036E-04   -1.5113    
  11  Prefactor     .10000E-03    5.5341        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     17.437        10.972        .95912E-04   -1.4873    
  13  norm          2.7356        2.9741        .14349E-03   -1.5377    
  14  Prefactor     .10000E-03    5.1537        .35785E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .10000E-03    26.765        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          .10000E-03    12.849        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     .10000E-03    8.4573        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     5.7904        9.8941        .83426E-03   -1.5227    
  19  Prefactor     .10000E-03    12.234        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10000E-03    7.6258        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Normalizat    .90272        .32756        .41599E-03   -.96365    
  22  Prefactor     .96326        .13619        .16620E-03   -.93964    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.27874e-09
Minuit parameter uncertainties:
  1  0.000127251
  2  54.1408
  3  1.344
  4  0.000220222
  5  10.7278
  6  3.48602e-06
  7  88.3634
  8  0.000188458
  9  26.9193
  10  2.27895
  11  1.96173e-05
  12  10.9734
  13  2.97427
  14  7.78168e-06
  15  0.000363542
  16  6.50489e-05
  17  0.000148691
  18  9.89692
  19  1.15387e-05
  20  0.000113141
  21  0.328284
  22  0.136238
Done.

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

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  1.000e-04  7.782e-06  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.633e-01  1.362e-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.027e-01  3.283e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 310.136 -17.090
Photon Flux Upper Limit: 1.23e-07 ph cm-2 s-1
Energy Flux Upper Limit: 9.58e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/113104/likelihoodResults_572918401_573177601_4FGL_J2040.5-1705_daily_bin1287.txt

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): 102
logL (Free Index) = 6746.71813598
delta logL = -0.000926301907384

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 6746.71720988
delta logL = -1.98439011001e-07

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10017E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.5514       1.0000          .0000       10.000    
     3 'Normalizat'    .90255       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .96335       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.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   6746.717     FROM MIGRAD    STATUS=CONVERGED     95 CALLS      252 TOTAL
                     EDM=   .25E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10053E-03    32.958        .35893E-02** at limit **
   2  Index         2.5954        7.7830        .50000       -.12715E-04
   3  Normalizat    .90271        .16654E-01    .41599E-03    .10303E-04
   4  Prefactor     .96326        .69063E-02    .16620E-03    .13544E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100531
  Index      = 2.59543
  Normalizat = 0.902715
  Prefactor  = 0.963264
 **********
 **   18 **HESSE 
 **********

 FCN=   6746.717     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      281 TOTAL
                     EDM=   .18E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10053E-03    220.16        .71787E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.5954        8.6197        .50000       -.50170    
   3  Normalizat    .90271        .44844E-01    .16640E-04   -.96365    
   4  Prefactor     .96326        .18596E-01    .66480E-05   -.93964    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 1.83207e-08
Minuit parameter uncertainties:
  1  0.0217132
  2  678.397
  3  0.0448461
  4  0.018596
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/113104': 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): 102
logL (Free Index) = 6746.71720954
delta logL = 1.39596522786e-07

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  1.005e-04  2.171e-02  1.000e-04  1.000e+04 ( 1.000e-12)
324        Index:  2.595e+00  6.784e+02  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:  9.633e-01  1.860e-02  0.000e+00  1.000e+01 ( 1.000e+00)
597        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
598        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
595   Normalization:  9.027e-01  4.485e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 310.136 -17.090

Creating a high resolution counts map...
INFO: Auto-setting vmin to -2.355e-04 [aplpy.core]
INFO: Auto-setting vmax to  2.614e-03 [aplpy.core]
Saving /scratch/kocevski/113104/cmap_HighResolution_572918401_573177601_4FGL_J2040.5-1705_daily_bin1287.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='9.58e-03', job_status='DONE', photon_flux_upper_limit='1.23e-07', time_completed='2021-09-25 16:12:52.929125', job_id='113104', GAL2='0.96', fit_tolerance='1e-08', EG2='0.90', EG='0.90', time_epoch_completed='1632611572.93', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.96', dlogl='1.40e-07', ts2='-0.00', photon_index_error='0.00', photon_index='2.54' WHERE bin_id='1287' AND source_name='4FGL J2040.5-1705' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep 25 16:12:52 PDT 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0015>
Subject: Job 113104: <4FGL_J2040.5-1705_daily_bin1287> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2040.5-1705_daily_bin1287 310.136 -17.0901 572918401 573177601 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 :                                   686.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             325.58 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   733 sec.
    Turnaround time :                            741 sec.

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

