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


Performing analysis on: 4FGL_J2040.5-1705_daily_bin1485
RA = 310.136, Dec = -17.0901
tmin = 624240001, tmax = 624499201
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='113427', job_status='RUN', time_executed='2021-09-25 16:01:43.983924', time_epoch_executed='1632610903.98' WHERE source_name='4FGL J2040.5-1705' and cadence='daily' and bin_id='1485'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/113427

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/113427/ft1_4FGL_J2040.5-1705_daily_bin1485.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/113427/ft2_4FGL_J2040.5-1705_daily_bin1485.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/113427/ft1_4FGL_J2040.5-1705_daily_bin1485.fits outfile=/scratch/kocevski/113427/ft1_filteredMKT_4FGL_J2040.5-1705_daily_bin1485.fits ra=310.136 dec=-17.0901 rad=12.0 tmin=624240001.0 tmax=624499201.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.54
user 3.29
sys 0.21

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/113427/ft2_4FGL_J2040.5-1705_daily_bin1485.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/113427/ft1_filteredMKT_4FGL_J2040.5-1705_daily_bin1485.fits evtable="EVENTS" outfile="/scratch/kocevski/113427/ft1_filtered_4FGL_J2040.5-1705_daily_bin1485.fits" apply_filter=yes overwrite=yes header_obstimes=yes tstart=0.0 tstop=0.0 gtifile="default" chatter=3 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

This is gtmktime version HEAD
Applying GTI filter:
IN_SAA!=T && LIVETIME>0 && gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nogrb.gti',(START+STOP)/2) && (angsep(RA_SUN,DEC_SUN,RA_ZENITH,DEC_ZENITH)>115 || gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nosolarflares.gti',(START+STOP)/2))
real 0.51
user 0.36
sys 0.15

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/113427/ft1_filtered_4FGL_J2040.5-1705_daily_bin1485.fits" evtable="EVENTS" scfile=/scratch/kocevski/113427/ft2_4FGL_J2040.5-1705_daily_bin1485.fits sctable="SC_DATA" outfile=/scratch/kocevski/113427/ltcube_624240001_624499201_4FGL_J2040.5-1705_daily_bin1485.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/113427/ft2_4FGL_J2040.5-1705_daily_bin1485.fits
.....................!
real 15.65
user 15.26
sys 0.34

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/113427/ft1_filtered_4FGL_J2040.5-1705_daily_bin1485.fits evtable="EVENTS" scfile=/scratch/kocevski/113427/ft2_4FGL_J2040.5-1705_daily_bin1485.fits sctable="SC_DATA" expcube=/scratch/kocevski/113427/ltcube_624240001_624499201_4FGL_J2040.5-1705_daily_bin1485.fits outfile=/scratch/kocevski/113427/expmap_624240001_624499201_4FGL_J2040.5-1705_daily_bin1485.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/113427/ltcube_624240001_624499201_4FGL_J2040.5-1705_daily_bin1485.fits
.....................!
real 192.49
user 186.00
sys 4.91

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/113427/ft1_filtered_4FGL_J2040.5-1705_daily_bin1485.fits scfile=/scratch/kocevski/113427/ft2_4FGL_J2040.5-1705_daily_bin1485.fits outfile=/scratch/kocevski/113427/cmap_624240001_624499201_4FGL_J2040.5-1705_daily_bin1485.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.54
user 0.39
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/113427/ft1_filtered_4FGL_J2040.5-1705_daily_bin1485.fits scfile=/scratch/kocevski/113427/ft2_4FGL_J2040.5-1705_daily_bin1485.fits outfile=/scratch/kocevski/113427/cmap_HighResolution_624240001_624499201_4FGL_J2040.5-1705_daily_bin1485.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.17

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/113427/ft1_filtered_4FGL_J2040.5-1705_daily_bin1485.fits evtable="EVENTS" scfile=/scratch/kocevski/113427/ft2_4FGL_J2040.5-1705_daily_bin1485.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/113427/Model_4FGL_J2040.5-1705_daily_bin1485.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/113427/ft1_filtered_4FGL_J2040.5-1705_daily_bin1485.fits.....................!
real 64.10
user 62.73
sys 1.22

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    15.612       1.0000         .10000E-03   10000.    
     3 'Prefactor '    4.4098       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .54575       1.0000         .10000E-03   10000.    
     5 'norm      '    31.770       1.0000         .10000E-03   10000.    
     6 'norm      '    7.9602       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    3.6363       1.0000         .10000E-03   10000.    
     9 'norm      '    70.125       1.0000         .10000E-03   10000.    
    10 'norm      '    3.6154       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10024E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10010E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    1.5374       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10073E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    .36749E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    .10011E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    11.582       1.0000         .10000E-03   10000.    
    18 'Prefactor '    2.1352       1.0000         .10000E-03   10000.    
    19 'Prefactor '    8.8273       1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10008E-03   1.0000         .10000E-03   10000.    
    21 'Normalizat'    .72564       1.0000         .10000E-01   10.000    
    22 'Prefactor '    1.1915       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=   6798.226     FROM MIGRAD    STATUS=CONVERGED    494 CALLS     2384 TOTAL
                     EDM=   .14E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.2%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    9.5341       -.25592E-08** at limit **
   2  Prefactor     15.604        40.642       -.78712E-06   -.11311E-04
   3  Prefactor     4.4274        3.0143       -.11595E-06   -.49964E-03
   4  Prefactor     .25080        24.308        .10624E-05    .90051E-04
   5  norm          31.776        18.155       -.74952E-06   -.61451E-04
   6  norm          7.9873        11.048       -.21008E-05   -.17905E-03
   7  Prefactor     .10000E-03    59.736       -.36299E-06** at limit **
   8  norm          3.6342        15.210        .12797E-05   -.88161E-06
   9  norm          70.112        48.637       -.81268E-05   -.13307E-03
  10  norm          3.6150        1.5566        .10186E-06    .73194E-04
  11  Prefactor     .10000E-03    10.248        .22284E-06** at limit **
  12  Prefactor     .10000E-03    5.2867        .44745E-07** at limit **
  13  norm          1.5374        2.2082        .45872E-07    .12899E-04
  14  Prefactor     .10000E-03    4.6851       -.22398E-07** at limit **
  15  Prefactor     .10002E-03    251.97        .52008E-04** at limit **
  16  norm          .10000E-03    16.861       -.46197E-06** at limit **
  17  Prefactor     11.581        16.612        .10300E-05    .20979E-04
  18  Prefactor     2.0961        5.1937        .21219E-05   -.13719E-02
  19  Prefactor     8.8240        19.652        .14381E-06   -.12933E-03
  20  Prefactor     .10000E-03    5.1334       -.14378E-06** at limit **
  21  Normalizat    .72546        .31139       -.21021E-05   -.85350E-04
  22  Prefactor     1.1916        .13494        .94914E-06   -.39237E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 15.6036
  Prefactor  = 4.42742
  Prefactor  = 0.250797
  norm       = 31.7759
  norm       = 7.98733
  Prefactor  = 0.0001
  norm       = 3.63416
  norm       = 70.1117
  norm       = 3.61504
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 1.53736
  Prefactor  = 0.0001
  Prefactor  = 0.000100016
  norm       = 0.0001
  Prefactor  = 11.5808
  Prefactor  = 2.09607
  Prefactor  = 8.82404
  Prefactor  = 0.0001
  Normalizat = 0.725463
  Prefactor  = 1.1916
 **********
 **   18 **HESSE 
 **********

 FCN=   6798.226     FROM HESSE     STATUS=OK           352 CALLS     2736 TOTAL
                     EDM=   .13E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    9.5349        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     15.604        40.736        .10137E-03   -1.4918    
   3  Prefactor     4.4274        3.1728        .95328E-04   -1.5287    
   4  Prefactor     .25080        43.111        .86981E-01   -1.5608    
   5  norm          31.776        18.209        .71088E-04   -1.4580    
   6  norm          7.9873        11.197        .14211E-03   -1.5143    
   7  Prefactor     .10000E-03    59.745        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          3.6342        15.277        .21186E-03   -1.5327    
   9  norm          70.112        48.731        .47936E-04   -1.4031    
  10  norm          3.6150        1.5565        .65152E-04   -1.5328    
  11  Prefactor     .10000E-03    10.359        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    5.3068        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          1.5374        2.1844        .14304E-03   -1.5460    
  14  Prefactor     .10000E-03    4.7887        .17406E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .10002E-03    252.34        .21302E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          .10000E-03    16.881        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     11.581        16.648        .11771E-03   -1.5027    
  18  Prefactor     2.0961        14.847        .14106E-02   -1.5418    
  19  Prefactor     8.8240        19.804        .67454E-03   -1.5114    
  20  Prefactor     .10000E-03    5.1392        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Normalizat    .72546        .35684        .48721E-03   -1.0290    
  22  Prefactor     1.1916        .15366        .16745E-03   -.86590    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.28988e-08
Minuit parameter uncertainties:
  1  2.11628e-06
  2  40.8091
  3  3.17297
  4  6.57986
  5  18.2121
  6  11.2002
  7  4.20554e-05
  8  14.9084
  9  48.7591
  10  1.55655
  11  5.15712e-07
  12  3.55093e-06
  13  2.18446
  14  3.53147e-06
  15  0.00397315
  16  2.15953e-05
  17  16.6547
  18  11.1608
  19  19.8183
  20  2.72613e-06
  21  0.357994
  22  0.153722
Done.

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

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  1.000e-04  3.531e-06  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.192e+00  1.537e-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:  7.255e-01  3.580e-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.34e-07 ph cm-2 s-1
Energy Flux Upper Limit: 1.04e-02 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/113427/likelihoodResults_624240001_624499201_4FGL_J2040.5-1705_daily_bin1485.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) = 6798.22679525
delta logL = -0.000995396188955

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 6798.225801
delta logL = -1.14084105007e-06

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10455E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.5407       1.0000          .0000       10.000    
     3 'Normalizat'    .72510       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1918       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=   6798.226     FROM MIGRAD    STATUS=CONVERGED     52 CALLS      205 TOTAL
                     EDM=   .95E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    8.0230        .90712E-02** at limit **
   2  Index         2.5402        6.2540        .50000        .82193E-06
   3  Normalizat    .72546        .91432E-02    .10988        .78039E-04
   4  Prefactor     1.1916        .39521E-02    .34828E-01    .86392E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 2.54019
  Normalizat = 0.725462
  Prefactor  = 1.1916
 **********
 **   18 **HESSE 
 **********

 FCN=   6798.226     FROM HESSE     STATUS=NOT POSDEF    33 CALLS      238 TOTAL
                     EDM=   .15E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    130.39        .17407E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.5402        8.6045        .50000       -.51434    
   3  Normalizat    .72546        .37363E-01    .48721E-03   -1.0290    
   4  Prefactor     1.1916        .16210E-01    .16745E-03   -.86590    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 1.51033e-08
Minuit parameter uncertainties:
  1  9.02295e-05
  2  700.671
  3  0.0373643
  4  0.0162104
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/113427': 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) = 6798.22579986
delta logL = 2.37378117163e-10

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  1.000e-04  9.023e-05  1.000e-04  1.000e+04 ( 1.000e-12)
324        Index:  2.540e+00  7.007e+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.192e+00  1.621e-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:  7.255e-01  3.736e-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 -2.500e-04 [aplpy.core]
INFO: Auto-setting vmax to  2.775e-03 [aplpy.core]
Saving /scratch/kocevski/113427/cmap_HighResolution_624240001_624499201_4FGL_J2040.5-1705_daily_bin1485.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.04e-02', job_status='DONE', photon_flux_upper_limit='1.34e-07', time_completed='2021-09-25 16:13:11.692838', job_id='113427', GAL2='1.19', fit_tolerance='1e-08', EG2='0.73', EG='0.73', time_epoch_completed='1632611591.69', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.19', dlogl='2.37e-10', ts2='-0.00', photon_index_error='0.00', photon_index='2.54' WHERE bin_id='1485' AND source_name='4FGL J2040.5-1705' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep 25 16:13:11 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0264>
Subject: Job 113427: <4FGL_J2040.5-1705_daily_bin1485> in cluster <slac> Done

Job <4FGL_J2040.5-1705_daily_bin1485> was submitted from host <rhel6-64m> by user <kocevski> in cluster <slac> at Sat Sep 25 16:01:00 2021
Job was executed on host(s) <bullet0264>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Sep 25 16:01: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 16:01:23 2021
Terminated at Sat Sep 25 16:13:12 2021
Results reported at Sat Sep 25 16:13:12 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2040.5-1705_daily_bin1485 310.136 -17.0901 624240001 624499201 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 :                                   682.00 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             343.60 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   709 sec.
    Turnaround time :                            732 sec.

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

