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


Performing analysis on: 4FGL_J2040.5-1705_daily_bin1130
RA = 310.136, Dec = -17.0901
tmin = 532224001, tmax = 532483201
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='111701', job_status='RUN', time_executed='2021-09-25 15:59:37.700232', time_epoch_executed='1632610777.7' WHERE source_name='4FGL J2040.5-1705' and cadence='daily' and bin_id='1130'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/111701

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/111701/ft1_4FGL_J2040.5-1705_daily_bin1130.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/111701/ft2_4FGL_J2040.5-1705_daily_bin1130.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/111701/ft1_4FGL_J2040.5-1705_daily_bin1130.fits outfile=/scratch/kocevski/111701/ft1_filteredMKT_4FGL_J2040.5-1705_daily_bin1130.fits ra=310.136 dec=-17.0901 rad=12.0 tmin=532224001.0 tmax=532483201.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.55
user 3.32
sys 0.20

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/111701/ft1_filtered_4FGL_J2040.5-1705_daily_bin1130.fits" evtable="EVENTS" scfile=/scratch/kocevski/111701/ft2_4FGL_J2040.5-1705_daily_bin1130.fits sctable="SC_DATA" outfile=/scratch/kocevski/111701/ltcube_532224001_532483201_4FGL_J2040.5-1705_daily_bin1130.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/111701/ft2_4FGL_J2040.5-1705_daily_bin1130.fits
.....................!
real 15.09
user 14.73
sys 0.31

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/111701/ft1_filtered_4FGL_J2040.5-1705_daily_bin1130.fits evtable="EVENTS" scfile=/scratch/kocevski/111701/ft2_4FGL_J2040.5-1705_daily_bin1130.fits sctable="SC_DATA" expcube=/scratch/kocevski/111701/ltcube_532224001_532483201_4FGL_J2040.5-1705_daily_bin1130.fits outfile=/scratch/kocevski/111701/expmap_532224001_532483201_4FGL_J2040.5-1705_daily_bin1130.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/111701/ltcube_532224001_532483201_4FGL_J2040.5-1705_daily_bin1130.fits
.....................!
real 190.51
user 186.09
sys 3.96

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/111701/ft1_filtered_4FGL_J2040.5-1705_daily_bin1130.fits scfile=/scratch/kocevski/111701/ft2_4FGL_J2040.5-1705_daily_bin1130.fits outfile=/scratch/kocevski/111701/cmap_532224001_532483201_4FGL_J2040.5-1705_daily_bin1130.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.65
user 0.39
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/111701/ft1_filtered_4FGL_J2040.5-1705_daily_bin1130.fits scfile=/scratch/kocevski/111701/ft2_4FGL_J2040.5-1705_daily_bin1130.fits outfile=/scratch/kocevski/111701/cmap_HighResolution_532224001_532483201_4FGL_J2040.5-1705_daily_bin1130.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.40
sys 0.14

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .11770E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10015E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    2.6501       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     5 'norm      '    16.379       1.0000         .10000E-03   10000.    
     6 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    16.624       1.0000         .10000E-03   10000.    
     8 'norm      '    16.174       1.0000         .10000E-03   10000.    
     9 'norm      '    .10009E-03   1.0000         .10000E-03   10000.    
    10 'norm      '    1.7527       1.0000         .10000E-03   10000.    
    11 'Prefactor '    29.212       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .78488       1.0000         .10000E-03   10000.    
    13 'norm      '    2.3320       1.0000         .10000E-03   10000.    
    14 'Prefactor '    3.3042       1.0000         .10000E-03   10000.    
    15 'Prefactor '    192.89       1.0000         .10000E-03   10000.    
    16 'norm      '    .14498E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    12.720       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .61948       1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10019E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    21 'Normalizat'    .65276       1.0000         .10000E-01   10.000    
    22 'Prefactor '    1.1481       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=   6199.815     FROM MIGRAD    STATUS=CONVERGED    503 CALLS     2500 TOTAL
                     EDM=   .66E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.4%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    281.46       -.48670E-05** at limit **
   2  Prefactor     .10000E-03    15.297        .87320E-07** at limit **
   3  Prefactor     2.6507        2.1817        .45717E-07   -.21236E-03
   4  Prefactor     .10000E-03    4.9539        .96776E-07** at limit **
   5  norm          16.385        14.447        .26879E-06    .45088E-04
   6  norm          .10000E-03    2.5979        .20637E-06** at limit **
   7  Prefactor     16.749        104.83        .13293E-05    .13803E-04
   8  norm          16.179        15.078        .22032E-06    .44835E-04
   9  norm          .10000E-03    10.670        .11622E-06** at limit **
  10  norm          1.7530        1.9677        .22773E-06    .26846E-03
  11  Prefactor     29.190        24.503       -.23376E-06   -.21035E-04
  12  Prefactor     .75180        8.8464       -.20783E-05    .21856E-03
  13  norm          2.3327        4.2286        .73606E-06    .28194E-03
  14  Prefactor     3.3042        5.3711        .59216E-06    .32154E-03
  15  Prefactor     192.94        126.96        .43210E-06    .68879E-04
  16  norm          .10003E-03    147.99        .79587E-05** at limit **
  17  Prefactor     12.719        22.962       -.20668E-06   -.15263E-05
  18  Prefactor     .64352        14.206       -.37856E-05    .44307E-03
  19  Prefactor     .10000E-03    10.058       -.22382E-06** at limit **
  20  Prefactor     .10000E-03    7.4137       -.24250E-06** at limit **
  21  Normalizat    .65279        .34592        .75233E-05    .92050E-04
  22  Prefactor     1.1480        .13579       -.29960E-05   -.13991E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100004
  Prefactor  = 0.0001
  Prefactor  = 2.65066
  Prefactor  = 0.0001
  norm       = 16.3846
  norm       = 0.0001
  Prefactor  = 16.7485
  norm       = 16.179
  norm       = 0.0001
  norm       = 1.75298
  Prefactor  = 29.1903
  Prefactor  = 0.751797
  norm       = 2.33266
  Prefactor  = 3.30421
  Prefactor  = 192.938
  norm       = 0.000100025
  Prefactor  = 12.7195
  Prefactor  = 0.643518
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Normalizat = 0.652792
  Prefactor  = 1.14798
 **********
 **   18 **HESSE 
 **********

 FCN=   6199.815     FROM HESSE     STATUS=OK           346 CALLS     2846 TOTAL
                     EDM=   .50E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    288.89        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    15.311        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     2.6507        2.1785        .10058E-03   -1.5382    
   4  Prefactor     .10000E-03    4.9602        .17115E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          16.385        14.464        .98964E-04   -1.4898    
   6  norm          .10000E-03    2.6038        .12401E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     16.749        105.19        .98233E-04   -1.4889    
   8  norm          16.179        15.086        .99589E-04   -1.4903    
   9  norm          .10000E-03    10.674        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          1.7530        1.9379        .99666E-04   -1.5443    
  11  Prefactor     29.190        24.305        .74128E-04   -1.4627    
  12  Prefactor     .75180        21.655        .40782E-02   -1.5535    
  13  norm          2.3327        4.2349        .21093E-03   -1.5402    
  14  Prefactor     3.3042        5.3886        .21715E-03   -1.5344    
  15  Prefactor     192.94        125.80        .14541E-03   -1.2921    
  16  norm          .10003E-03    155.29        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     12.719        22.879        .11231E-03   -1.4995    
  18  Prefactor     .64352        35.885        .42881E-02   -1.5548    
  19  Prefactor     .10000E-03    10.075        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10000E-03    7.4357        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Normalizat    .65279        .35038        .48668E-03   -1.0579    
  22  Prefactor     1.1480        .14371        .16108E-03   -.87947    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 5.026e-09
Minuit parameter uncertainties:
  1  0.00226229
  2  1.70308e-05
  3  2.17852
  4  8.81375e-06
  5  14.4669
  6  1.23625e-05
  7  84.1641
  8  15.0891
  9  1.65634e-05
  10  1.93796
  11  24.3132
  12  8.07242
  13  4.2354
  14  5.38938
  15  125.976
  16  0.00397489
  17  22.8947
  18  9.61622
  19  3.12466e-05
  20  2.69611e-05
  21  0.35158
  22  0.143761
Done.

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

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  3.304e+00  5.389e+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.148e+00  1.438e-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.528e-01  3.516e-01  1.000e-02  1.000e+01 ( 1.000e+00)


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

Saving results to:
/scratch/kocevski/111701/likelihoodResults_532224001_532483201_4FGL_J2040.5-1705_daily_bin1130.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) = 6199.31455237
delta logL = 0.499968449734

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 6199.18569496
delta logL = 0.628825861433

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .14673E-01   1.0000         .10000E-03   10000.    
     2 'Index     '    6.2616       1.0000          .0000       10.000    
     3 'Normalizat'    .55839       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1795       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=   6199.186     FROM MIGRAD    STATUS=CONVERGED     58 CALLS      305 TOTAL
                     EDM=   .40E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .15292E-01    .21146        .19422E-02    .54574E-02
   2  Index         6.2393        2.7935        .16938        .11408E-03
   3  Normalizat    .55801        .59515E-01    .11823        .41696E-04
   4  Prefactor     1.1796        .25584E-01    .35136E-01   -.55668E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0152925
  Index      = 6.23928
  Normalizat = 0.558011
  Prefactor  = 1.17959
 **********
 **   18 **HESSE 
 **********

 FCN=   6199.186     FROM HESSE     STATUS=NOT POSDEF    35 CALLS      340 TOTAL
                     EDM=   .83E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .15292E-01    .62663        .89178E-04   -1.5683    
   2  Index         6.2393        7.8978        .59596E-02    .25047    
   3  Normalizat    .55801        .24448        .52427E-03   -1.0980    
   4  Prefactor     1.1796        .10335        .15913E-03   -.86962    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 8.33648e-08
Minuit parameter uncertainties:
  1  0.195143
  2  6.766
  3  0.244948
  4  0.103367
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/111701': 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) = 6199.18568308
delta logL = 0.628837735513

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  1.529e-02  1.951e-01  1.000e-04  1.000e+04 ( 1.000e-12)
324        Index:  6.239e+00  6.766e+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:  1.180e+00  1.034e-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:  5.580e-01  2.449e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.88
Ra Dec: 310.136 -17.090
Photon Index (Free Index): 6.24 +/- 6.77
Photon Flux (Free Index): 1.02e-07 +/- 9.06e-08
Energy Flux (Free Index): 1.26e-05 +/- 1.26e-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/111701/cmap_HighResolution_532224001_532483201_4FGL_J2040.5-1705_daily_bin1130.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.39e-02', comment='SUCCESS', energy_flux2='1.26e-05', dlogl='6.29e-01', photon_flux2='1.02e-07', job_status='DONE', time_completed='2021-09-25 16:10:48.359507', photon_index_error2='6.77', photon_index2='6.24', ts='0.47', fit_tolerance='1e-08', GAL='1.15', photon_index_error='0.00', photon_flux_upper_limit='1.78e-07', energy_flux_error2='1.26e-05', EG='0.65', time_epoch_completed='1632611448.36', return_code='0', job_id='111701', GAL2='1.18', EG2='0.56', return_code2='102', photon_flux_error2='9.06e-08', ts2='1.88', photon_index='2.54' WHERE bin_id='1130' AND source_name='4FGL J2040.5-1705' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep 25 16:10:48 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0230>
Subject: Job 111701: <4FGL_J2040.5-1705_daily_bin1130> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2040.5-1705_daily_bin1130 310.136 -17.0901 532224001 532483201 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 :                                   667.16 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             283.60 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   880 sec.
    Turnaround time :                            911 sec.

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

