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


Performing analysis on: 4FGL_J2040.5-1705_daily_bin707
RA = 310.136, Dec = -17.0901
tmin = 422582401, tmax = 422841601
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='108758', job_status='RUN', time_executed='2021-09-25 15:49:43.170320', time_epoch_executed='1632610183.17' WHERE source_name='4FGL J2040.5-1705' and cadence='daily' and bin_id='707'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/108758

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/108758/ft1_4FGL_J2040.5-1705_daily_bin707.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/108758/ft2_4FGL_J2040.5-1705_daily_bin707.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/108758/ft1_4FGL_J2040.5-1705_daily_bin707.fits outfile=/scratch/kocevski/108758/ft1_filteredMKT_4FGL_J2040.5-1705_daily_bin707.fits ra=310.136 dec=-17.0901 rad=12.0 tmin=422582401.0 tmax=422841601.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.65
user 3.39
sys 0.24

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/108758/ft1_filtered_4FGL_J2040.5-1705_daily_bin707.fits" evtable="EVENTS" scfile=/scratch/kocevski/108758/ft2_4FGL_J2040.5-1705_daily_bin707.fits sctable="SC_DATA" outfile=/scratch/kocevski/108758/ltcube_422582401_422841601_4FGL_J2040.5-1705_daily_bin707.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/108758/ft2_4FGL_J2040.5-1705_daily_bin707.fits
.....................!
real 13.54
user 13.15
sys 0.35

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/108758/ft1_filtered_4FGL_J2040.5-1705_daily_bin707.fits evtable="EVENTS" scfile=/scratch/kocevski/108758/ft2_4FGL_J2040.5-1705_daily_bin707.fits sctable="SC_DATA" expcube=/scratch/kocevski/108758/ltcube_422582401_422841601_4FGL_J2040.5-1705_daily_bin707.fits outfile=/scratch/kocevski/108758/expmap_422582401_422841601_4FGL_J2040.5-1705_daily_bin707.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/108758/ltcube_422582401_422841601_4FGL_J2040.5-1705_daily_bin707.fits
.....................!
real 192.23
user 186.49
sys 5.36

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/108758/ft1_filtered_4FGL_J2040.5-1705_daily_bin707.fits scfile=/scratch/kocevski/108758/ft2_4FGL_J2040.5-1705_daily_bin707.fits outfile=/scratch/kocevski/108758/cmap_422582401_422841601_4FGL_J2040.5-1705_daily_bin707.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.37
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/108758/ft1_filtered_4FGL_J2040.5-1705_daily_bin707.fits scfile=/scratch/kocevski/108758/ft2_4FGL_J2040.5-1705_daily_bin707.fits outfile=/scratch/kocevski/108758/cmap_HighResolution_422582401_422841601_4FGL_J2040.5-1705_daily_bin707.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.55
user 0.38
sys 0.16

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10067E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10241E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    3.0586       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10663E-03   1.0000         .10000E-03   10000.    
     5 'norm      '    63.084       1.0000         .10000E-03   10000.    
     6 'norm      '    .37465E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    47.493       1.0000         .10000E-03   10000.    
     8 'norm      '    2.8185       1.0000         .10000E-03   10000.    
     9 'norm      '    30.726       1.0000         .10000E-03   10000.    
    10 'norm      '    .10004E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    15.224       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    2.3159       1.0000         .10000E-03   10000.    
    14 'Prefactor '    4.3274       1.0000         .10000E-03   10000.    
    15 'Prefactor '    21.193       1.0000         .10000E-03   10000.    
    16 'norm      '    8.9064       1.0000         .10000E-03   10000.    
    17 'Prefactor '    4.2849       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    10.508       1.0000         .10000E-03   10000.    
    20 'Prefactor '    18.471       1.0000         .10000E-03   10000.    
    21 'Normalizat'    .82399       1.0000         .10000E-01   10.000    
    22 'Prefactor '    1.1103       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=   7392.432     FROM MIGRAD    STATUS=CONVERGED    478 CALLS     2466 TOTAL
                     EDM=   .65E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  8.0%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    90.677        .21196E-06** at limit **
   2  Prefactor     .10000E-03    86.407        .94904E-05** at limit **
   3  Prefactor     3.0569        1.9553       -.12863E-06   -.31770E-03
   4  Prefactor     .10000E-03    101.78       -.41527E-04** at limit **
   5  norm          63.081        23.077        .10035E-06    .49473E-05
   6  norm          .10006E-03    6.3336       -.89474E-06** at limit **
   7  Prefactor     47.465        99.837       -.69931E-05   -.21762E-04
   8  norm          2.8184        10.600       -.85129E-05    .55577E-04
   9  norm          30.723        27.044       -.79129E-07   -.19261E-04
  10  norm          .10000E-03    .61282        .42296E-06** at limit **
  11  Prefactor     15.230        16.726       -.51341E-06   -.57119E-04
  12  Prefactor     .10000E-03    2.9345       -.79378E-07** at limit **
  13  norm          2.3161        3.0855       -.14042E-07    .14647E-04
  14  Prefactor     4.3276        3.4376       -.14970E-07   -.14083E-04
  15  Prefactor     21.201        84.941        .31641E-05   -.10203E-06
  16  norm          8.9085        21.379       -.46996E-06   -.10632E-04
  17  Prefactor     4.2854        7.4101        .70586E-06   -.57060E-05
  18  Prefactor     .10000E-03    5.2041       -.25470E-06** at limit **
  19  Prefactor     10.507        25.065       -.42795E-06    .58228E-05
  20  Prefactor     18.474        19.351        .83490E-07    .21121E-04
  21  Normalizat    .82364        .27739        .92429E-06   -.20832E-03
  22  Prefactor     1.1104        .11842       -.79202E-06   -.82486E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100001
  Prefactor  = 0.000100004
  Prefactor  = 3.05694
  Prefactor  = 0.0001
  norm       = 63.0805
  norm       = 0.000100063
  Prefactor  = 47.4647
  norm       = 2.81845
  norm       = 30.7226
  norm       = 0.0001
  Prefactor  = 15.2296
  Prefactor  = 0.0001
  norm       = 2.31611
  Prefactor  = 4.32759
  Prefactor  = 21.2008
  norm       = 8.90852
  Prefactor  = 4.28537
  Prefactor  = 0.0001
  Prefactor  = 10.5067
  Prefactor  = 18.4735
  Normalizat = 0.823638
  Prefactor  = 1.11036
 **********
 **   18 **HESSE 
 **********

 FCN=   7392.432     FROM HESSE     STATUS=OK           350 CALLS     2816 TOTAL
                     EDM=   .24E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    91.378        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    86.608        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     3.0569        1.9044        .89797E-04   -1.5358    
   4  Prefactor     .10000E-03    97.538        .53883E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          63.081        23.069        .50523E-04   -1.4118    
   6  norm          .10006E-03    35.393        .40845E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     47.465        99.959        .58184E-04   -1.4329    
   8  norm          2.8184        10.621        .12114E-02   -1.5372    
   9  norm          30.723        27.058        .72282E-04   -1.4599    
  10  norm          .10000E-03    .63634        .13122E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     15.230        16.657        .10265E-03   -1.4927    
  12  Prefactor     .10000E-03    2.9440        .14383E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          2.3161        3.0714        .16888E-03   -1.5404    
  14  Prefactor     4.3276        3.4374        .13712E-03   -1.5292    
  15  Prefactor     21.201        84.753        .87005E-04   -1.4787    
  16  norm          8.9085        21.353        .13430E-03   -1.5111    
  17  Prefactor     4.2854        7.4007        .19463E-03   -1.5294    
  18  Prefactor     .10000E-03    5.2380        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     10.507        24.959        .12360E-03   -1.5060    
  20  Prefactor     18.474        19.283        .93192E-04   -1.4848    
  21  Normalizat    .82364        .31691        .44368E-03   -.99198    
  22  Prefactor     1.1104        .13708        .16708E-03   -.89136    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.4135e-09
Minuit parameter uncertainties:
  1  0.000573221
  2  0.00111592
  3  1.90447
  4  1.72915e-05
  5  23.0727
  6  0.00298101
  7  100.315
  8  10.6286
  9  27.0692
  10  1.80008e-05
  11  16.6617
  12  7.3228e-06
  13  3.07158
  14  3.43753
  15  84.9889
  16  21.3709
  17  7.40224
  18  3.17021e-05
  19  24.9838
  20  19.2891
  21  0.317629
  22  0.137121
Done.

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

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  4.328e+00  3.438e+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:  1.110e+00  1.371e-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:  8.236e-01  3.176e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 6.67
Ra Dec: 310.136 -17.090
Photon Index (Fixed Index): 2.54 +/- 0.00
Photon Flux (Fixed Index): 5.07e-08 +/- 4.02e-08
Energy Flux (Fixed Index): 1.41e-05 +/- 1.12e-05

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) = 7388.74885371
delta logL = 3.68305659536

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 7388.67354384
delta logL = 3.75836646728

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    1.9912       1.0000         .10000E-03   10000.    
     2 'Index     '    1.0911       1.0000          .0000       10.000    
     3 'Normalizat'    .85326       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1076       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=   7388.674     FROM MIGRAD    STATUS=CONVERGED     55 CALLS      223 TOTAL
                     EDM=   .11E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     1.9880        2.0870        .73401E-02   -.25723E-03
   2  Index         1.0906        .31646        .18136       -.76010E-04
   3  Normalizat    .85321        .26577        .98497E-01    .33560E-04
   4  Prefactor     1.1076        .11529        .37304E-01    .10549E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 1.98803
  Index      = 1.09056
  Normalizat = 0.853212
  Prefactor  = 1.10764
 **********
 **   18 **HESSE 
 **********

 FCN=   7388.674     FROM HESSE     STATUS=OK            33 CALLS      256 TOTAL
                     EDM=   .10E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     1.9880        4.5907        .10987E-03   -1.5426    
   2  Index         1.0906        .73004        .75534E-02   -.89769    
   3  Normalizat    .85321        .30653        .43645E-03   -.98124    
   4  Prefactor     1.1076        .13365        .16726E-03   -.89223    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.01215e-11
Minuit parameter uncertainties:
  1  4.59148
  2  0.73688
  3  0.30716
  4  0.133689
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/108758': 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) = 7388.67354361
delta logL = 3.75836669713

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  1.988e+00  4.591e+00  1.000e-04  1.000e+04 ( 1.000e-12)
324        Index:  1.091e+00  7.369e-01  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.108e+00  1.337e-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:  8.532e-01  3.072e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 14.16
Ra Dec: 310.136 -17.090
Photon Index (Free Index): 1.09 +/- 0.74
Photon Flux (Free Index): 9.49e-09 +/- 1.55e-08
Energy Flux (Free Index): 1.09e-04 +/- 1.25e-04

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/108758/cmap_HighResolution_422582401_422841601_4FGL_J2040.5-1705_daily_bin707.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='5.07e-08', energy_flux2='1.09e-04', photon_flux_error='4.02e-08', dlogl='3.76e+00', energy_flux='1.41e-05', photon_flux2='9.49e-09', job_status='DONE', time_completed='2021-09-25 16:00:41.621950', photon_index_error2='0.74', photon_index2='1.09', ts='6.67', fit_tolerance='1e-08', GAL='1.11', photon_index_error='0.00', energy_flux_error2='1.25e-04', EG='0.82', time_epoch_completed='1632610841.62', return_code='0', job_id='108758', GAL2='1.11', EG2='0.85', return_code2='0', energy_flux_error='1.12e-05', photon_flux_error2='1.55e-08', ts2='14.16', photon_index='2.54' WHERE bin_id='707' AND source_name='4FGL J2040.5-1705' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep 25 16:00:41 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0125>
Subject: Job 108758: <4FGL_J2040.5-1705_daily_bin707> in cluster <slac> Done

Job <4FGL_J2040.5-1705_daily_bin707> was submitted from host <rhel6-64f> by user <kocevski> in cluster <slac> at Sat Sep 25 15:45:37 2021
Job was executed on host(s) <bullet0125>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Sep 25 15:49:34 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:49:34 2021
Terminated at Sat Sep 25 16:00:42 2021
Results reported at Sat Sep 25 16:00:42 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2040.5-1705_daily_bin707 310.136 -17.0901 422582401 422841601 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 :                                   658.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             301.91 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   669 sec.
    Turnaround time :                            905 sec.

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

