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


Performing analysis on: 4FGL_J2040.5-1705_daily_bin1137
RA = 310.136, Dec = -17.0901
tmin = 534038401, tmax = 534297601
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='111713', job_status='RUN', time_executed='2021-09-25 15:56:21.317720', time_epoch_executed='1632610581.32' WHERE source_name='4FGL J2040.5-1705' and cadence='daily' and bin_id='1137'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/111713

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/111713/ft1_4FGL_J2040.5-1705_daily_bin1137.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/111713/ft2_4FGL_J2040.5-1705_daily_bin1137.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/111713/ft1_4FGL_J2040.5-1705_daily_bin1137.fits outfile=/scratch/kocevski/111713/ft1_filteredMKT_4FGL_J2040.5-1705_daily_bin1137.fits ra=310.136 dec=-17.0901 rad=12.0 tmin=534038401.0 tmax=534297601.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.86
user 3.53
sys 0.20

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/111713/ft1_filtered_4FGL_J2040.5-1705_daily_bin1137.fits" evtable="EVENTS" scfile=/scratch/kocevski/111713/ft2_4FGL_J2040.5-1705_daily_bin1137.fits sctable="SC_DATA" outfile=/scratch/kocevski/111713/ltcube_534038401_534297601_4FGL_J2040.5-1705_daily_bin1137.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/111713/ft2_4FGL_J2040.5-1705_daily_bin1137.fits
.....................!
real 14.26
user 13.89
sys 0.32

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/111713/ft1_filtered_4FGL_J2040.5-1705_daily_bin1137.fits evtable="EVENTS" scfile=/scratch/kocevski/111713/ft2_4FGL_J2040.5-1705_daily_bin1137.fits sctable="SC_DATA" expcube=/scratch/kocevski/111713/ltcube_534038401_534297601_4FGL_J2040.5-1705_daily_bin1137.fits outfile=/scratch/kocevski/111713/expmap_534038401_534297601_4FGL_J2040.5-1705_daily_bin1137.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/111713/ltcube_534038401_534297601_4FGL_J2040.5-1705_daily_bin1137.fits
.....................!
real 191.01
user 185.89
sys 4.62

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/111713/ft1_filtered_4FGL_J2040.5-1705_daily_bin1137.fits scfile=/scratch/kocevski/111713/ft2_4FGL_J2040.5-1705_daily_bin1137.fits outfile=/scratch/kocevski/111713/cmap_534038401_534297601_4FGL_J2040.5-1705_daily_bin1137.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.40
sys 0.14

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

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .26326E-01   1.0000         .10000E-03   10000.    
     2 'Prefactor '    43.712       1.0000         .10000E-03   10000.    
     3 'Prefactor '    1.9212       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .18238E-03   1.0000         .10000E-03   10000.    
     5 'norm      '    14.398       1.0000         .10000E-03   10000.    
     6 'norm      '    .20070E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    56.434       1.0000         .10000E-03   10000.    
     8 'norm      '    .10011E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    .10004E-03   1.0000         .10000E-03   10000.    
    10 'norm      '    1.9917       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10009E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    1.5368       1.0000         .10000E-03   10000.    
    13 'norm      '    3.0145       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10146E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    17.493       1.0000         .10000E-03   10000.    
    16 'norm      '    .10020E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    .10144E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    6.1255       1.0000         .10000E-03   10000.    
    19 'Prefactor '    11.746       1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    21 'Normalizat'    1.4573       1.0000         .10000E-01   10.000    
    22 'Prefactor '    .74936       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=   9264.934     FROM MIGRAD    STATUS=CONVERGED    538 CALLS     2532 TOTAL
                     EDM=   .86E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .2%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .64650        16.148        .37538E-05   -.14551E-03
   2  Prefactor     43.665        35.854       -.45190E-04   -.47866E-04
   3  Prefactor     1.9171        1.5432       -.13963E-07   -.81843E-03
   4  Prefactor     .10000E-03    24.358        .26104E-05** at limit **
   5  norm          14.407        11.051       -.11763E-05   -.71463E-05
   6  norm          .10002E-03    3.8341       -.31492E-06** at limit **
   7  Prefactor     56.435        72.221        .17708E-04    .14311E-04
   8  norm          .10000E-03    11.505        .12315E-05** at limit **
   9  norm          .10000E-03    7.0048       -.36412E-06** at limit **
  10  norm          1.9921        1.0663       -.11661E-06    .14976E-03
  11  Prefactor     .10000E-03    8.9842       -.13857E-05** at limit **
  12  Prefactor     1.5382        3.6849       -.10607E-05   -.10575E-02
  13  norm          3.0155        2.9506       -.49416E-06   -.35559E-03
  14  Prefactor     .10000E-03    3.0921       -.35465E-06** at limit **
  15  Prefactor     17.516        31.457       -.55115E-04    .55075E-05
  16  norm          .10000E-03    8.3396        .14945E-05** at limit **
  17  Prefactor     .10000E-03    13.307       -.19059E-05** at limit **
  18  Prefactor     6.1267        4.9233       -.39396E-06   -.23798E-03
  19  Prefactor     11.747        12.122       -.64398E-06   -.18742E-05
  20  Prefactor     .10000E-03    3.8200       -.77377E-07** at limit **
  21  Normalizat    1.4581        .19774        .22104E-05    .14180E-03
  22  Prefactor     .74885        .86903E-01    .30815E-05   -.30720E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.646499
  Prefactor  = 43.665
  Prefactor  = 1.9171
  Prefactor  = 0.0001
  norm       = 14.4072
  norm       = 0.000100025
  Prefactor  = 56.435
  norm       = 0.0001
  norm       = 0.0001
  norm       = 1.99207
  Prefactor  = 0.0001
  Prefactor  = 1.53822
  norm       = 3.01554
  Prefactor  = 0.0001
  Prefactor  = 17.5162
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 6.12672
  Prefactor  = 11.7473
  Prefactor  = 0.0001
  Normalizat = 1.45811
  Prefactor  = 0.748847
 **********
 **   18 **HESSE 
 **********

 FCN=   9264.934     FROM HESSE     STATUS=OK           348 CALLS     2880 TOTAL
                     EDM=   .27E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .64650        131.58        .73659E-02   -1.5547    
   2  Prefactor     43.665        35.833        .60637E-04   -1.4385    
   3  Prefactor     1.9171        1.5148        .10063E-03   -1.5431    
   4  Prefactor     .10000E-03    25.130        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          14.407        11.068        .10556E-03   -1.4949    
   6  norm          .10002E-03    31.605        .35739E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     56.435        71.889        .53399E-04   -1.4204    
   8  norm          .10000E-03    11.640        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          .10000E-03    7.0086        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          1.9921        1.0657        .29356E-04   -1.5426    
  11  Prefactor     .10000E-03    9.0520        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     1.5382        3.6563        .27746E-03   -1.5460    
  13  norm          3.0155        2.9441        .15834E-03   -1.5361    
  14  Prefactor     .10000E-03    3.2166        .33003E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     17.516        31.431        .95760E-04   -1.4871    
  16  norm          .10000E-03    8.3564        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     .10000E-03    13.866        .36285E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     6.1267        4.9237        .16221E-03   -1.5213    
  19  Prefactor     11.747        12.125        .11689E-03   -1.5022    
  20  Prefactor     .10000E-03    3.8323        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Normalizat    1.4581        .23846        .30536E-03   -.78962    
  22  Prefactor     .74885        .10528        .17619E-03   -1.0164    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.73346e-09
Minuit parameter uncertainties:
  1  18.4861
  2  35.8507
  3  1.51483
  4  2.47933e-05
  5  11.0695
  6  0.00176608
  7  72
  8  3.03244e-05
  9  7.29498e-06
  10  1.0657
  11  3.29857e-05
  12  3.65683
  13  2.94419
  14  4.12732e-05
  15  31.4611
  16  6.92261e-05
  17  9.07675e-05
  18  4.92401
  19  12.1277
  20  1.22453e-05
  21  0.238647
  22  0.10531
Done.

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

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  1.000e-04  4.127e-05  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:  7.488e-01  1.053e-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.458e+00  2.386e-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: 8.34e-08 ph cm-2 s-1
Energy Flux Upper Limit: 6.50e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/111713/likelihoodResults_534038401_534297601_4FGL_J2040.5-1705_daily_bin1137.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) = 9264.93547
delta logL = -0.00148450664528

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 9264.93398862
delta logL = -3.12571137329e-06

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .12526E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.5958       1.0000          .0000       10.000    
     3 'Normalizat'    1.4586       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .74869       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=   9263.765     FROM MIGRAD    STATUS=CONVERGED    138 CALLS      301 TOTAL
                     EDM=   .14E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .28577E-01    .66056        .24375E-02   -.97074E-02
   2  Index         5.8705        3.5217        .15589        .20005E-03
   3  Normalizat    1.3210        .19132        .71908E-01   -.56789E-04
   4  Prefactor     .78607        .56127E-01    .43046E-01   -.26058E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0285769
  Index      = 5.87055
  Normalizat = 1.321
  Prefactor  = 0.786075
 **********
 **   18 **HESSE 
 **********

 FCN=   9263.765     FROM HESSE     STATUS=OK            33 CALLS      334 TOTAL
                     EDM=   .49E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .28577E-01    .10181        .11042E-03   -1.5742    
   2  Index         5.8705        1.8743        .53190E-02    .17500    
   3  Normalizat    1.3210        .25066        .31820E-03   -.82942    
   4  Prefactor     .78607        .10477        .17232E-03   -1.0024    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.91217e-11
Minuit parameter uncertainties:
  1  0.101806
  2  1.92277
  3  0.250896
  4  0.104794
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/111713': 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) = 9263.76497588
delta logL = 1.16900961685

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  2.858e-02  1.018e-01  1.000e-04  1.000e+04 ( 1.000e-12)
324        Index:  5.871e+00  1.923e+00  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:  7.861e-01  1.048e-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.321e+00  2.509e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 2.60
Ra Dec: 310.136 -17.090
Photon Index (Free Index): 5.87 +/- 1.92
Photon Flux (Free Index): 9.65e-08 +/- 6.75e-07
Energy Flux (Free Index): 1.21e-05 +/- 8.37e-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/111713/cmap_HighResolution_534038401_534297601_4FGL_J2040.5-1705_daily_bin1137.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='6.50e-03', comment='SUCCESS', energy_flux2='1.21e-05', dlogl='1.17e+00', photon_flux2='9.65e-08', job_status='DONE', time_completed='2021-09-25 16:10:58.631794', photon_index_error2='1.92', photon_index2='5.87', ts='-0.00', fit_tolerance='1e-08', GAL='0.75', photon_index_error='0.00', photon_flux_upper_limit='8.34e-08', energy_flux_error2='8.37e-05', EG='1.46', time_epoch_completed='1632611458.63', return_code='0', job_id='111713', GAL2='0.79', EG2='1.32', return_code2='0', photon_flux_error2='6.75e-07', ts2='2.60', photon_index='2.54' WHERE bin_id='1137' AND source_name='4FGL J2040.5-1705' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep 25 16:10:58 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0219>
Subject: Job 111713: <4FGL_J2040.5-1705_daily_bin1137> in cluster <slac> Done

Job <4FGL_J2040.5-1705_daily_bin1137> was submitted from host <rhel6-64p> by user <kocevski> in cluster <slac> at Sat Sep 25 15:55:40 2021
Job was executed on host(s) <bullet0219>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Sep 25 15:56:11 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:56:11 2021
Terminated at Sat Sep 25 16:10:59 2021
Results reported at Sat Sep 25 16:10:59 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2040.5-1705_daily_bin1137 310.136 -17.0901 534038401 534297601 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 :                                   874.00 sec.
    Max Memory :                                 1130 MB
    Average Memory :                             339.41 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   887 sec.
    Turnaround time :                            919 sec.

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

