/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 219 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 = 7472
number of fields = 27
No RA_SUN column yet. Adding RA_SUN/DEC_SUN columns.
Done.


Performing analysis on: 4FGL_J2040.5-1705_daily_bin208
RA = 310.136, Dec = -17.0901
tmin = 293241601, tmax = 293500801
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='107006', job_status='RUN', time_executed='2021-09-25 15:44:35.009137', time_epoch_executed='1632609875.01' WHERE source_name='4FGL J2040.5-1705' and cadence='daily' and bin_id='208'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/107006

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/107006/ft1_4FGL_J2040.5-1705_daily_bin208.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/107006/ft2_4FGL_J2040.5-1705_daily_bin208.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/107006/ft1_4FGL_J2040.5-1705_daily_bin208.fits outfile=/scratch/kocevski/107006/ft1_filteredMKT_4FGL_J2040.5-1705_daily_bin208.fits ra=310.136 dec=-17.0901 rad=12.0 tmin=293241601.0 tmax=293500801.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.63
user 3.38
sys 0.21

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/107006/ft1_filtered_4FGL_J2040.5-1705_daily_bin208.fits" evtable="EVENTS" scfile=/scratch/kocevski/107006/ft2_4FGL_J2040.5-1705_daily_bin208.fits sctable="SC_DATA" outfile=/scratch/kocevski/107006/ltcube_293241601_293500801_4FGL_J2040.5-1705_daily_bin208.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/107006/ft2_4FGL_J2040.5-1705_daily_bin208.fits
.....................!
real 15.39
user 15.00
sys 0.32

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/107006/ft1_filtered_4FGL_J2040.5-1705_daily_bin208.fits evtable="EVENTS" scfile=/scratch/kocevski/107006/ft2_4FGL_J2040.5-1705_daily_bin208.fits sctable="SC_DATA" expcube=/scratch/kocevski/107006/ltcube_293241601_293500801_4FGL_J2040.5-1705_daily_bin208.fits outfile=/scratch/kocevski/107006/expmap_293241601_293500801_4FGL_J2040.5-1705_daily_bin208.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/107006/ltcube_293241601_293500801_4FGL_J2040.5-1705_daily_bin208.fits
.....................!
real 193.38
user 188.12
sys 4.54

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/107006/ft1_filtered_4FGL_J2040.5-1705_daily_bin208.fits scfile=/scratch/kocevski/107006/ft2_4FGL_J2040.5-1705_daily_bin208.fits outfile=/scratch/kocevski/107006/cmap_293241601_293500801_4FGL_J2040.5-1705_daily_bin208.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.39
sys 0.15

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

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/107006/ft1_filtered_4FGL_J2040.5-1705_daily_bin208.fits evtable="EVENTS" scfile=/scratch/kocevski/107006/ft2_4FGL_J2040.5-1705_daily_bin208.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/107006/Model_4FGL_J2040.5-1705_daily_bin208.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/107006/ft1_filtered_4FGL_J2040.5-1705_daily_bin208.fits.....................!
real 60.87
user 59.48
sys 1.20

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10011E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    4.1485       1.0000         .10000E-03   10000.    
     4 'Prefactor '    23.434       1.0000         .10000E-03   10000.    
     5 'norm      '    .10018E-03   1.0000         .10000E-03   10000.    
     6 'norm      '    7.9830       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .16676E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    19.542       1.0000         .10000E-03   10000.    
     9 'norm      '    21.916       1.0000         .10000E-03   10000.    
    10 'norm      '    3.0678       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10129E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    8.3270       1.0000         .10000E-03   10000.    
    13 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    4.6807       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    .10044E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .14073E-02   1.0000         .10000E-03   10000.    
    19 'Prefactor '    22.183       1.0000         .10000E-03   10000.    
    20 'Prefactor '    .24647E-03   1.0000         .10000E-03   10000.    
    21 'Normalizat'    1.2832       1.0000         .10000E-01   10.000    
    22 'Prefactor '    .77971       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=   6079.391     FROM MIGRAD    STATUS=CONVERGED    480 CALLS     2384 TOTAL
                     EDM=   .23E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.8%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    39.960       -.13641E-06** at limit **
   2  Prefactor     .10000E-03    34.597        .10528E-05** at limit **
   3  Prefactor     4.1511        3.9176       -.22469E-06    .13138E-04
   4  Prefactor     23.402        30.065        .65995E-06    .16773E-04
   5  norm          .10000E-03    4.9948       -.37731E-07** at limit **
   6  norm          7.9748        12.015       -.35846E-07    .77785E-05
   7  Prefactor     .10000E-03    173.01        .80217E-06** at limit **
   8  norm          19.541        17.675       -.93239E-08   -.21818E-05
   9  norm          21.896        34.707        .33660E-06    .20196E-04
  10  norm          3.0680        1.7358        .69629E-07   -.16908E-04
  11  Prefactor     .10000E-03    37.611        .66936E-06** at limit **
  12  Prefactor     8.3267        8.9421       -.22960E-06   -.57815E-05
  13  norm          .10000E-03    1.3217        .19584E-08** at limit **
  14  Prefactor     4.6782        6.2791       -.57117E-06   -.24055E-04
  15  Prefactor     .10000E-03    27.131       -.29988E-06** at limit **
  16  norm          .10000E-03    8.5535       -.26953E-07** at limit **
  17  Prefactor     .10000E-03    21.315       -.56381E-06** at limit **
  18  Prefactor     .10000E-03    25.540       -.42491E-05** at limit **
  19  Prefactor     22.175        30.205       -.36101E-05    .69069E-05
  20  Prefactor     .10000E-03    42.430        .55549E-06** at limit **
  21  Normalizat    1.2836        .27483       -.84758E-06    .11605E-04
  22  Prefactor     .77956        .10936        .52865E-06   -.73169E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 4.15113
  Prefactor  = 23.4022
  norm       = 0.0001
  norm       = 7.9748
  Prefactor  = 0.0001
  norm       = 19.5413
  norm       = 21.8959
  norm       = 3.06796
  Prefactor  = 0.0001
  Prefactor  = 8.32667
  norm       = 0.0001
  Prefactor  = 4.67823
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 22.1745
  Prefactor  = 0.000100001
  Normalizat = 1.28357
  Prefactor  = 0.77956
 **********
 **   18 **HESSE 
 **********

 FCN=   6079.391     FROM HESSE     STATUS=OK           344 CALLS     2728 TOTAL
                     EDM=   .51E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    40.078        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    34.756        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     4.1511        3.8927        .10431E-03   -1.5300    
   4  Prefactor     23.402        29.882        .82746E-04   -1.4740    
   5  norm          .10000E-03    5.0036        .17018E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  norm          7.9748        11.980        .14191E-03   -1.5143    
   7  Prefactor     .10000E-03    173.22        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          19.541        17.684        .90603E-04   -1.4824    
   9  norm          21.896        34.726        .85560E-04   -1.4772    
  10  norm          3.0680        1.7272        .73492E-04   -1.5358    
  11  Prefactor     .10000E-03    38.570        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     8.3267        8.9393        .13893E-03   -1.5131    
  13  norm          .10000E-03    1.3248        .87530E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     4.6782        6.2925        .18601E-03   -1.5275    
  15  Prefactor     .10000E-03    27.143        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          .10000E-03    8.5561        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     .10000E-03    21.573        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10000E-03    25.268        .39078E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     22.175        30.465        .85044E-04   -1.4766    
  20  Prefactor     .10000E-03    43.347        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Normalizat    1.2836        .32156        .34291E-03   -.84058    
  22  Prefactor     .77956        .13088        .17524E-03   -1.0049    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 5.07842e-11
Minuit parameter uncertainties:
  1  2.21014e-05
  2  0.000230136
  3  3.89297
  4  29.9008
  5  2.45185e-06
  6  11.9832
  7  0.000328276
  8  17.689
  9  34.7584
  10  1.72727
  11  4.55921e-06
  12  8.9407
  13  6.00485e-08
  14  6.29338
  15  5.09036e-05
  16  6.15822e-07
  17  2.77049e-05
  18  1.08132e-05
  19  30.4865
  20  0.000296998
  21  0.322063
  22  0.130934
Done.

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

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  4.678e+00  6.293e+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:  7.796e-01  1.309e-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.284e+00  3.221e-01  1.000e-02  1.000e+01 ( 1.000e+00)


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

Saving results to:
/scratch/kocevski/107006/likelihoodResults_293241601_293500801_4FGL_J2040.5-1705_daily_bin208.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) = 6078.53664992
delta logL = 0.854120281807

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 6078.53259484
delta logL = 0.858175365554

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .32602       1.0000         .10000E-03   10000.    
     2 'Index     '    4.7866       1.0000          .0000       10.000    
     3 'Normalizat'    1.1555       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .81753       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=   6078.533     FROM MIGRAD    STATUS=CONVERGED     52 CALLS      264 TOTAL
                     EDM=   .81E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .32514        3.1550        .67487E-02    .98041E-03
   2  Index         4.7881        2.6727        .13318        .11195E-03
   3  Normalizat    1.1556        .66013E-01    .80991E-01    .28194E-05
   4  Prefactor     .81750        .27094E-01    .43945E-01   -.19870E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.325143
  Index      = 4.78813
  Normalizat = 1.15559
  Prefactor  = 0.817502
 **********
 **   18 **HESSE 
 **********

 FCN=   6078.533     FROM HESSE     STATUS=NOT POSDEF    33 CALLS      297 TOTAL
                     EDM=   .36E-06    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .32514        7.7127        .30550E-04   -1.5594    
   2  Index         4.7881        7.1700        .48538E-02   -.42386E-01
   3  Normalizat    1.1556        .28287        .35855E-03   -.87986    
   4  Prefactor     .81750        .11366        .17144E-03   -.99086    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 3.59092e-07
Minuit parameter uncertainties:
  1  3.16714
  2  5.50422
  3  0.283239
  4  0.113692
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/107006': 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) = 6078.53259458
delta logL = 0.858175618322

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  3.251e-01  3.167e+00  1.000e-04  1.000e+04 ( 1.000e-12)
324        Index:  4.788e+00  5.504e+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.175e-01  1.137e-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.156e+00  2.832e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 2.66
Ra Dec: 310.136 -17.090
Photon Index (Free Index): 4.79 +/- 5.50
Photon Flux (Free Index): 1.54e-07 +/- 1.11e-07
Energy Flux (Free Index): 2.09e-05 +/- 1.75e-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/107006/cmap_HighResolution_293241601_293500801_4FGL_J2040.5-1705_daily_bin208.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.61e-02', comment='SUCCESS', energy_flux2='2.09e-05', dlogl='8.58e-01', photon_flux2='1.54e-07', job_status='DONE', time_completed='2021-09-25 15:55:29.801017', photon_index_error2='5.50', photon_index2='4.79', ts='0.68', fit_tolerance='1e-08', GAL='0.78', photon_index_error='0.00', photon_flux_upper_limit='2.06e-07', energy_flux_error2='1.75e-05', EG='1.28', time_epoch_completed='1632610529.8', return_code='0', job_id='107006', GAL2='0.82', EG2='1.16', return_code2='102', photon_flux_error2='1.11e-07', ts2='2.66', photon_index='2.54' WHERE bin_id='208' AND source_name='4FGL J2040.5-1705' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep 25 15:55:29 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0121>
Subject: Job 107006: <4FGL_J2040.5-1705_daily_bin208> in cluster <slac> Done

Job <4FGL_J2040.5-1705_daily_bin208> was submitted from host <rhel6-64j> by user <kocevski> in cluster <slac> at Sat Sep 25 15:40:20 2021
Job was executed on host(s) <bullet0121>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Sep 25 15:40: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:40:46 2021
Terminated at Sat Sep 25 15:55:30 2021
Results reported at Sat Sep 25 15:55:30 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2040.5-1705_daily_bin208 310.136 -17.0901 293241601 293500801 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 :                                   654.00 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             255.16 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   884 sec.
    Turnaround time :                            910 sec.

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

