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


Performing analysis on: 4FGL_J2040.5-1705_daily_bin1200
RA = 310.136, Dec = -17.0901
tmin = 550368001, tmax = 550627201
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='111826', job_status='RUN', time_executed='2021-09-25 15:58:46.167206', time_epoch_executed='1632610726.17' WHERE source_name='4FGL J2040.5-1705' and cadence='daily' and bin_id='1200'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/111826

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/111826/ft1_4FGL_J2040.5-1705_daily_bin1200.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/111826/ft2_4FGL_J2040.5-1705_daily_bin1200.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/111826/ft1_4FGL_J2040.5-1705_daily_bin1200.fits outfile=/scratch/kocevski/111826/ft1_filteredMKT_4FGL_J2040.5-1705_daily_bin1200.fits ra=310.136 dec=-17.0901 rad=12.0 tmin=550368001.0 tmax=550627201.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.09
user 3.83
sys 0.20

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/111826/ft1_filtered_4FGL_J2040.5-1705_daily_bin1200.fits" evtable="EVENTS" scfile=/scratch/kocevski/111826/ft2_4FGL_J2040.5-1705_daily_bin1200.fits sctable="SC_DATA" outfile=/scratch/kocevski/111826/ltcube_550368001_550627201_4FGL_J2040.5-1705_daily_bin1200.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/111826/ft2_4FGL_J2040.5-1705_daily_bin1200.fits
.....................!
real 15.44
user 15.04
sys 0.32

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/111826/ft1_filtered_4FGL_J2040.5-1705_daily_bin1200.fits evtable="EVENTS" scfile=/scratch/kocevski/111826/ft2_4FGL_J2040.5-1705_daily_bin1200.fits sctable="SC_DATA" expcube=/scratch/kocevski/111826/ltcube_550368001_550627201_4FGL_J2040.5-1705_daily_bin1200.fits outfile=/scratch/kocevski/111826/expmap_550368001_550627201_4FGL_J2040.5-1705_daily_bin1200.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/111826/ltcube_550368001_550627201_4FGL_J2040.5-1705_daily_bin1200.fits
.....................!
real 192.36
user 186.40
sys 4.72

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/111826/ft1_filtered_4FGL_J2040.5-1705_daily_bin1200.fits scfile=/scratch/kocevski/111826/ft2_4FGL_J2040.5-1705_daily_bin1200.fits outfile=/scratch/kocevski/111826/cmap_550368001_550627201_4FGL_J2040.5-1705_daily_bin1200.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/111826/ft1_filtered_4FGL_J2040.5-1705_daily_bin1200.fits scfile=/scratch/kocevski/111826/ft2_4FGL_J2040.5-1705_daily_bin1200.fits outfile=/scratch/kocevski/111826/cmap_HighResolution_550368001_550627201_4FGL_J2040.5-1705_daily_bin1200.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.74
user 0.40
sys 0.15

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .13442E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    110.57       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    13.308       1.0000         .10000E-03   10000.    
     5 'norm      '    12.844       1.0000         .10000E-03   10000.    
     6 'norm      '    1.9153       1.0000         .10000E-03   10000.    
     7 'Prefactor '    14.201       1.0000         .10000E-03   10000.    
     8 'norm      '    .10155E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    13.378       1.0000         .10000E-03   10000.    
    10 'norm      '    .10004E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    4.8381       1.0000         .10000E-03   10000.    
    13 'norm      '    5.4822       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10009E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10019E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    9.2693       1.0000         .10000E-03   10000.    
    17 'Prefactor '    .44320E-02   1.0000         .10000E-03   10000.    
    18 'Prefactor '    12.040       1.0000         .10000E-03   10000.    
    19 'Prefactor '    150.05       1.0000         .10000E-03   10000.    
    20 'Prefactor '    54.242       1.0000         .10000E-03   10000.    
    21 'Normalizat'    .62042       1.0000         .10000E-01   10.000    
    22 'Prefactor '    1.0504       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=   4684.404     FROM MIGRAD    STATUS=CONVERGED    503 CALLS     2795 TOTAL
                     EDM=   .11E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  4.2%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    97.521       -.13192E-05** at limit **
   2  Prefactor     110.53        83.963        .14785E-05   -.34683E-04
   3  Prefactor     .10000E-03    1.0965       -.57396E-06** at limit **
   4  Prefactor     13.308        20.005        .35925E-06    .32178E-03
   5  norm          12.846        18.055        .60867E-06    .46375E-04
   6  norm          1.9141        7.4755        .97965E-05    .36378E-03
   7  Prefactor     14.293        510.52       -.16607E-04    .31261E-04
   8  norm          .10000E-03    31.814       -.14310E-06** at limit **
   9  norm          13.474        53.961        .23174E-05   -.89904E-05
  10  norm          .10000E-03    1.9641        .12648E-06** at limit **
  11  Prefactor     .10000E-03    26.836        .59889E-07** at limit **
  12  Prefactor     4.8401        7.6437        .23162E-05    .16332E-03
  13  norm          5.4808        10.241        .22074E-06    .11707E-03
  14  Prefactor     .10000E-03    5.2840        .26861E-06** at limit **
  15  Prefactor     .10000E-03    21.071        .19396E-07** at limit **
  16  norm          9.2686        13.396        .53928E-07   -.12002E-04
  17  Prefactor     .11721E-03    58.795       -.13213E-04** at limit **
  18  Prefactor     12.042        10.715        .34038E-06   -.24741E-04
  19  Prefactor     150.07        87.148        .13563E-06   -.26857E-04
  20  Prefactor     54.271        48.877        .10565E-05   -.13916E-03
  21  Normalizat    .61997        .38049       -.19964E-05    .93067E-04
  22  Prefactor     1.0505        .14756       -.54816E-06    .38101E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100002
  Prefactor  = 110.53
  Prefactor  = 0.0001
  Prefactor  = 13.3082
  norm       = 12.8461
  norm       = 1.91407
  Prefactor  = 14.2932
  norm       = 0.0001
  norm       = 13.4741
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 4.84008
  norm       = 5.48078
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 9.26857
  Prefactor  = 0.000117212
  Prefactor  = 12.0421
  Prefactor  = 150.067
  Prefactor  = 54.2705
  Normalizat = 0.619973
  Prefactor  = 1.05052
 **********
 **   18 **HESSE 
 **********

 FCN=   4684.404     FROM HESSE     STATUS=OK           352 CALLS     3147 TOTAL
                     EDM=   .22E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    98.247        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     110.53        84.408        .38252E-04   -1.3601    
   3  Prefactor     .10000E-03    1.6796        .13004E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     13.308        18.816        .10980E-03   -1.4978    
   5  norm          12.846        18.061        .11177E-03   -1.4991    
   6  norm          1.9141        7.5035        .15016E-02   -1.5431    
   7  Prefactor     14.293        513.17        .10629E-03   -1.4952    
   8  norm          .10000E-03    32.051        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          13.474        54.115        .10951E-03   -1.4974    
  10  norm          .10000E-03    4.2339        .18552E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    26.877        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     4.8401        7.6246        .91444E-03   -1.5268    
  13  norm          5.4808        10.174        .17161E-03   -1.5240    
  14  Prefactor     .10000E-03    5.3656        .15349E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .10000E-03    21.073        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          9.2686        13.396        .13164E-03   -1.5099    
  17  Prefactor     .11721E-03    45.315        .14295       -1.5707    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     12.042        10.699        .11545E-03   -1.5014    
  19  Prefactor     150.07        87.148        .16451E-03   -1.3252    
  20  Prefactor     54.271        48.877        .54462E-04   -1.4233    
  21  Normalizat    .61997        .41679        .49787E-03   -1.0714    
  22  Prefactor     1.0505        .16848        .15899E-03   -.91064    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.19341e-09
Minuit parameter uncertainties:
  1  0.000825606
  2  84.5002
  3  3.96629e-05
  4  18.8245
  5  18.0686
  6  7.50723
  7  172.914
  8  4.64035e-05
  9  54.0906
  10  1.99261e-05
  11  2.58913e-05
  12  7.62614
  13  10.177
  14  4.18189e-05
  15  6.89702e-06
  16  13.3999
  17  0.0558976
  18  10.7004
  19  87.2232
  20  48.9127
  21  0.418932
  22  0.16857
Done.

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

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  1.000e-04  4.182e-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:  1.051e+00  1.686e-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:  6.200e-01  4.189e-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.63e-07 ph cm-2 s-1
Energy Flux Upper Limit: 1.27e-02 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/111826/likelihoodResults_550368001_550627201_4FGL_J2040.5-1705_daily_bin1200.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) = 4684.40479643
delta logL = -0.000888392241905

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 4684.40390796
delta logL = 7.59737304179e-08

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.5266       1.0000          .0000       10.000    
     3 'Normalizat'    .61999       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0505       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=   4684.404     FROM MIGRAD    STATUS=CONVERGED     90 CALLS      248 TOTAL
                     EDM=   .31E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10065E-03    70.010        .15477E-02** at limit **
   2  Index         2.4838        5.8038        .50000        .17680E-04
   3  Normalizat    .61997        .28626E-01    .49787E-03   -.30370E-05
   4  Prefactor     1.0505        .11760E-01    .15899E-03   -.10083E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100655
  Index      = 2.48383
  Normalizat = 0.619974
  Prefactor  = 1.05051
 **********
 **   18 **HESSE 
 **********

 FCN=   4684.404     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      277 TOTAL
                     EDM=   .14E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10065E-03    295.79        .30953E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.4838        7.4571        .50000       -.52734    
   3  Normalizat    .61997        .62056E-01    .19915E-04   -1.0714    
   4  Prefactor     1.0505        .25496E-01    .63595E-05   -.91064    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 1.44407e-08
Minuit parameter uncertainties:
  1  0.0279704
  2  619.966
  3  0.062063
  4  0.0254961
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/111826': 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) = 4684.40390782
delta logL = 2.15858563024e-07

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  1.007e-04  2.797e-02  1.000e-04  1.000e+04 ( 1.000e-12)
324        Index:  2.484e+00  6.200e+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:  1.051e+00  2.550e-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:  6.200e-01  6.206e-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  0.000e+00 [aplpy.core]
INFO: Auto-setting vmax to  0.000e+00 [aplpy.core]
Saving /scratch/kocevski/111826/cmap_HighResolution_550368001_550627201_4FGL_J2040.5-1705_daily_bin1200.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.27e-02', job_status='DONE', photon_flux_upper_limit='1.63e-07', time_completed='2021-09-25 16:08:43.050047', job_id='111826', GAL2='1.05', fit_tolerance='1e-08', EG2='0.62', EG='0.62', time_epoch_completed='1632611323.05', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.05', dlogl='2.16e-07', ts2='-0.00', photon_index_error='0.00', photon_index='2.54' WHERE bin_id='1200' AND source_name='4FGL J2040.5-1705' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep 25 16:08:43 PDT 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0044>
Subject: Job 111826: <4FGL_J2040.5-1705_daily_bin1200> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2040.5-1705_daily_bin1200 310.136 -17.0901 550368001 550627201 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 :                                   593.29 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             286.74 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   740 sec.
    Turnaround time :                            774 sec.

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

