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


Performing analysis on: 4FGL_J2040.5-1705_daily_bin1360
RA = 310.136, Dec = -17.0901
tmin = 591840001, tmax = 592099201
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='113222', job_status='RUN', time_executed='2021-09-25 16:01:07.760146', time_epoch_executed='1632610867.76' WHERE source_name='4FGL J2040.5-1705' and cadence='daily' and bin_id='1360'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/113222

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/113222/ft1_4FGL_J2040.5-1705_daily_bin1360.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/113222/ft2_4FGL_J2040.5-1705_daily_bin1360.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/113222/ft1_4FGL_J2040.5-1705_daily_bin1360.fits outfile=/scratch/kocevski/113222/ft1_filteredMKT_4FGL_J2040.5-1705_daily_bin1360.fits ra=310.136 dec=-17.0901 rad=12.0 tmin=591840001.0 tmax=592099201.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 5.39
user 5.11
sys 0.24

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/113222/ft1_filtered_4FGL_J2040.5-1705_daily_bin1360.fits" evtable="EVENTS" scfile=/scratch/kocevski/113222/ft2_4FGL_J2040.5-1705_daily_bin1360.fits sctable="SC_DATA" outfile=/scratch/kocevski/113222/ltcube_591840001_592099201_4FGL_J2040.5-1705_daily_bin1360.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/113222/ft2_4FGL_J2040.5-1705_daily_bin1360.fits
.....................!
real 17.91
user 17.51
sys 0.33

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/113222/ft1_filtered_4FGL_J2040.5-1705_daily_bin1360.fits evtable="EVENTS" scfile=/scratch/kocevski/113222/ft2_4FGL_J2040.5-1705_daily_bin1360.fits sctable="SC_DATA" expcube=/scratch/kocevski/113222/ltcube_591840001_592099201_4FGL_J2040.5-1705_daily_bin1360.fits outfile=/scratch/kocevski/113222/expmap_591840001_592099201_4FGL_J2040.5-1705_daily_bin1360.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/113222/ltcube_591840001_592099201_4FGL_J2040.5-1705_daily_bin1360.fits
.....................!
real 196.79
user 191.07
sys 5.14

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/113222/ft1_filtered_4FGL_J2040.5-1705_daily_bin1360.fits scfile=/scratch/kocevski/113222/ft2_4FGL_J2040.5-1705_daily_bin1360.fits outfile=/scratch/kocevski/113222/cmap_591840001_592099201_4FGL_J2040.5-1705_daily_bin1360.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.38
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/113222/ft1_filtered_4FGL_J2040.5-1705_daily_bin1360.fits scfile=/scratch/kocevski/113222/ft2_4FGL_J2040.5-1705_daily_bin1360.fits outfile=/scratch/kocevski/113222/cmap_HighResolution_591840001_592099201_4FGL_J2040.5-1705_daily_bin1360.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.57
user 0.41
sys 0.15

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/113222/ft1_filtered_4FGL_J2040.5-1705_daily_bin1360.fits evtable="EVENTS" scfile=/scratch/kocevski/113222/ft2_4FGL_J2040.5-1705_daily_bin1360.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/113222/Model_4FGL_J2040.5-1705_daily_bin1360.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/113222/ft1_filtered_4FGL_J2040.5-1705_daily_bin1360.fits.....................!
real 55.47
user 54.04
sys 1.31

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10013E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    83.547       1.0000         .10000E-03   10000.    
     3 'Prefactor '    9.7910       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10139E-03   1.0000         .10000E-03   10000.    
     5 'norm      '    2.6778       1.0000         .10000E-03   10000.    
     6 'norm      '    4.0351       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .26932E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    .31102E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    .10051E-03   1.0000         .10000E-03   10000.    
    10 'norm      '    4.2641       1.0000         .10000E-03   10000.    
    11 'Prefactor '    2.5042       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10755E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .10066E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    2.0044       1.0000         .10000E-03   10000.    
    15 'Prefactor '    22.660       1.0000         .10000E-03   10000.    
    16 'norm      '    .12209E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    .10704E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    2.1485       1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10175E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    2.8211       1.0000         .10000E-03   10000.    
    21 'Normalizat'    1.5600       1.0000         .10000E-01   10.000    
    22 'Prefactor '    .82074       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=   5286.435     FROM MIGRAD    STATUS=CONVERGED    462 CALLS     2341 TOTAL
                     EDM=   .22E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  4.2%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    21.845        .15165E-05** at limit **
   2  Prefactor     83.409        66.167        .11441E-04    .57731E-04
   3  Prefactor     9.7886        3.6246       -.34124E-07    .37593E-04
   4  Prefactor     .10000E-03    11.970       -.94375E-06** at limit **
   5  norm          2.6984        44.460       -.14933E-06   -.45362E-06
   6  norm          4.0377        9.0042        .11116E-05   -.11334E-05
   7  Prefactor     .10000E-03    106.61        .26434E-05** at limit **
   8  norm          .10007E-03    11.370       -.99987E-06** at limit **
   9  norm          .10000E-03    8.6601       -.11477E-06** at limit **
  10  norm          4.2624        2.3079        .19879E-06    .11706E-03
  11  Prefactor     2.5090        41.173        .84828E-06    .20267E-05
  12  Prefactor     .10000E-03    3.6306       -.24229E-06** at limit **
  13  norm          .10000E-03    1.8698        .41006E-07** at limit **
  14  Prefactor     2.0045        7.5225        .79871E-05    .50531E-04
  15  Prefactor     22.410        206.23        .43614E-04    .42827E-05
  16  norm          .10000E-03    30.146       -.41981E-05** at limit **
  17  Prefactor     .10000E-03    14.426       -.11520E-06** at limit **
  18  Prefactor     2.1494        9.1120        .43110E-05   -.29905E-04
  19  Prefactor     .10000E-03    10.724        .10041E-05** at limit **
  20  Prefactor     2.8166        41.834        .77961E-05   -.91093E-06
  21  Normalizat    1.5602        .33407       -.81697E-05    .14405E-03
  22  Prefactor     .82070        .12974        .83994E-06   -.28308E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 83.409
  Prefactor  = 9.78864
  Prefactor  = 0.0001
  norm       = 2.69844
  norm       = 4.03774
  Prefactor  = 0.0001
  norm       = 0.000100071
  norm       = 0.0001
  norm       = 4.26244
  Prefactor  = 2.509
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 2.00452
  Prefactor  = 22.4101
  norm       = 0.000100001
  Prefactor  = 0.0001
  Prefactor  = 2.14942
  Prefactor  = 0.0001
  Prefactor  = 2.81655
  Normalizat = 1.56024
  Prefactor  = 0.820702
 **********
 **   18 **HESSE 
 **********

 FCN=   5286.435     FROM HESSE     STATUS=OK           344 CALLS     2685 TOTAL
                     EDM=   .13E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    21.860        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     83.409        66.525        .21973E-03   -1.3879    
   3  Prefactor     9.7886        3.6257        .79514E-04   -1.5082    
   4  Prefactor     .10000E-03    11.991        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          2.6984        44.648        .24902E-03   -1.5379    
   6  norm          4.0377        8.9893        .10037E-02   -1.5306    
   7  Prefactor     .10000E-03    106.64        .21435E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .10007E-03    75.370        .47370E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          .10000E-03    8.6610        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          4.2624        2.2590        .66884E-04   -1.5295    
  11  Prefactor     2.5090        39.750        .25823E-03   -1.5391    
  12  Prefactor     .10000E-03    3.6370        .13531E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .10000E-03    1.8814        .97084E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     2.0045        7.5542        .14624E-02   -1.5425    
  15  Prefactor     22.410        207.28        .42073E-03   -1.4761    
  16  norm          .10000E-03    30.372        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     .10000E-03    14.536        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     2.1494        9.1214        .14056E-02   -1.5415    
  19  Prefactor     .10000E-03    10.731        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     2.8166        42.310        .12108E-02   -1.5372    
  21  Normalizat    1.5602        .39656        .34599E-03   -.76099    
  22  Prefactor     .82070        .15723        .18837E-03   -.98970    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.29106e-09
Minuit parameter uncertainties:
  1  2.69825e-05
  2  66.5843
  3  3.62581
  4  1.46348e-05
  5  21.9717
  6  8.99229
  7  6.92997e-05
  8  0.00462767
  9  1.93923e-06
  10  2.25906
  11  19.9886
  12  1.31061e-05
  13  3.5441e-06
  14  7.55775
  15  136.941
  16  0.000379644
  17  4.727e-05
  18  8.85777
  19  6.7825e-06
  20  21.8509
  21  0.397357
  22  0.157314
Done.

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

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  2.005e+00  7.558e+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:  8.207e-01  1.573e-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.560e+00  3.974e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.08
Ra Dec: 310.136 -17.090
Photon Flux Upper Limit: 2.13e-07 ph cm-2 s-1
Energy Flux Upper Limit: 1.66e-02 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/113222/likelihoodResults_591840001_592099201_4FGL_J2040.5-1705_daily_bin1360.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): 0
logL (Free Index) = 5285.44626021
delta logL = 0.988811943655

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 5285.34375527
delta logL = 1.09131688661

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .63734       1.0000         .10000E-03   10000.    
     2 'Index     '    4.5104       1.0000          .0000       10.000    
     3 'Normalizat'    1.3699       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .86875       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=   5285.344     FROM MIGRAD    STATUS=CONVERGED     48 CALLS      243 TOTAL
                     EDM=   .35E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .63197        6.5634        .87876E-02   -.14039E-02
   2  Index         4.5155        2.8386        .12647       -.21136E-04
   3  Normalizat    1.3701        .81218E-01    .82378E-01   -.11578E-03
   4  Prefactor     .86872        .33439E-01    .44605E-01   -.24412E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.63197
  Index      = 4.51548
  Normalizat = 1.37011
  Prefactor  = 0.868721
 **********
 **   18 **HESSE 
 **********

 FCN=   5285.344     FROM HESSE     STATUS=NOT POSDEF    31 CALLS      274 TOTAL
                     EDM=   .20E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .63197        15.053        .39700E-04   -1.5549    
   2  Index         4.5155        7.1042        .47009E-02   -.97057E-01
   3  Normalizat    1.3701        .36258        .36468E-03   -.81497    
   4  Prefactor     .86872        .14543        .18347E-03   -.97243    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 1.95461e-09
Minuit parameter uncertainties:
  1  6.1699
  2  5.58084
  3  0.363262
  4  0.145496
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/113222': 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) = 5285.34374863
delta logL = 1.09132352518

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  6.320e-01  6.170e+00  1.000e-04  1.000e+04 ( 1.000e-12)
324        Index:  4.515e+00  5.581e+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:  8.687e-01  1.455e-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.370e+00  3.633e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 2.54
Ra Dec: 310.136 -17.090
Photon Index (Free Index): 4.52 +/- 5.58
Photon Flux (Free Index): 1.84e-07 +/- 1.36e-07
Energy Flux (Free Index): 2.57e-05 +/- 2.35e-05

Creating a high resolution counts map...
INFO: Auto-setting vmin to  0.000e+00 [aplpy.core]
INFO: Auto-setting vmax to  0.000e+00 [aplpy.core]
Saving /scratch/kocevski/113222/cmap_HighResolution_591840001_592099201_4FGL_J2040.5-1705_daily_bin1360.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.66e-02', comment='SUCCESS', energy_flux2='2.57e-05', dlogl='1.09e+00', photon_flux2='1.84e-07', job_status='DONE', time_completed='2021-09-25 16:11:47.091059', photon_index_error2='5.58', photon_index2='4.52', ts='0.08', fit_tolerance='1e-08', GAL='0.82', photon_index_error='0.00', photon_flux_upper_limit='2.13e-07', energy_flux_error2='2.35e-05', EG='1.56', time_epoch_completed='1632611507.09', return_code='0', job_id='113222', GAL2='0.87', EG2='1.37', return_code2='102', photon_flux_error2='1.36e-07', ts2='2.54', photon_index='2.54' WHERE bin_id='1360' AND source_name='4FGL J2040.5-1705' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep 25 16:11:47 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0166>
Subject: Job 113222: <4FGL_J2040.5-1705_daily_bin1360> in cluster <slac> Done

Job <4FGL_J2040.5-1705_daily_bin1360> was submitted from host <rhel6-64m> by user <kocevski> in cluster <slac> at Sat Sep 25 16:00:42 2021
Job was executed on host(s) <bullet0166>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Sep 25 16:00:58 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:58 2021
Terminated at Sat Sep 25 16:11:47 2021
Results reported at Sat Sep 25 16:11:47 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2040.5-1705_daily_bin1360 310.136 -17.0901 591840001 592099201 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 :                                   636.04 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             328.68 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   649 sec.
    Turnaround time :                            665 sec.

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

