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


Performing analysis on: 4FGL_J2040.5-1705_daily_bin1642
RA = 310.136, Dec = -17.0901
tmin = 664934401, tmax = 665193601
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='444862', job_status='RUN', time_executed='2022-01-30 00:37:58.748917', time_epoch_executed='1643531878.75' WHERE source_name='4FGL J2040.5-1705' and cadence='daily' and bin_id='1642'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/444862

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/444862/ft1_4FGL_J2040.5-1705_daily_bin1642.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/444862/ft2_4FGL_J2040.5-1705_daily_bin1642.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/444862/ft1_4FGL_J2040.5-1705_daily_bin1642.fits outfile=/scratch/kocevski/444862/ft1_filteredMKT_4FGL_J2040.5-1705_daily_bin1642.fits ra=310.136 dec=-17.0901 rad=12.0 tmin=664934401.0 tmax=665193601.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.62
user 3.36
sys 0.24

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/444862/ft1_filtered_4FGL_J2040.5-1705_daily_bin1642.fits" evtable="EVENTS" scfile=/scratch/kocevski/444862/ft2_4FGL_J2040.5-1705_daily_bin1642.fits sctable="SC_DATA" outfile=/scratch/kocevski/444862/ltcube_664934401_665193601_4FGL_J2040.5-1705_daily_bin1642.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/444862/ft2_4FGL_J2040.5-1705_daily_bin1642.fits
.....................!
real 11.99
user 11.63
sys 0.32

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/444862/ft1_filtered_4FGL_J2040.5-1705_daily_bin1642.fits evtable="EVENTS" scfile=/scratch/kocevski/444862/ft2_4FGL_J2040.5-1705_daily_bin1642.fits sctable="SC_DATA" expcube=/scratch/kocevski/444862/ltcube_664934401_665193601_4FGL_J2040.5-1705_daily_bin1642.fits outfile=/scratch/kocevski/444862/expmap_664934401_665193601_4FGL_J2040.5-1705_daily_bin1642.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/444862/ltcube_664934401_665193601_4FGL_J2040.5-1705_daily_bin1642.fits
.....................!
real 191.42
user 185.55
sys 5.49

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/444862/ft1_filtered_4FGL_J2040.5-1705_daily_bin1642.fits scfile=/scratch/kocevski/444862/ft2_4FGL_J2040.5-1705_daily_bin1642.fits outfile=/scratch/kocevski/444862/cmap_664934401_665193601_4FGL_J2040.5-1705_daily_bin1642.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.37
sys 0.15

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

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/444862/ft1_filtered_4FGL_J2040.5-1705_daily_bin1642.fits evtable="EVENTS" scfile=/scratch/kocevski/444862/ft2_4FGL_J2040.5-1705_daily_bin1642.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/444862/Model_4FGL_J2040.5-1705_daily_bin1642.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/444862/ft1_filtered_4FGL_J2040.5-1705_daily_bin1642.fits.....................!
real 65.55
user 64.19
sys 1.16

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    43.833       1.0000         .10000E-03   10000.    
     2 'Prefactor '    57.015       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     5 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
     6 'norm      '    9.1567       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    .10015E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    6.7566       1.0000         .10000E-03   10000.    
    10 'norm      '    .42371E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10197E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .10121E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    39.417       1.0000         .10000E-03   10000.    
    15 'Prefactor '    162.47       1.0000         .10000E-03   10000.    
    16 'norm      '    .17437E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    .10023E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10216E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10152E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10029E-03   1.0000         .10000E-03   10000.    
    21 'Normalizat'    .85306       1.0000         .10000E-01   10.000    
    22 'Prefactor '    1.1716       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=   6966.789     FROM MIGRAD    STATUS=CONVERGED    479 CALLS     2339 TOTAL
                     EDM=   .14E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .3%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     43.834        42.887       -.19219E-06    .10462E-04
   2  Prefactor     57.003        48.950       -.11265E-04    .14727E-04
   3  Prefactor     .10000E-03    .70125       -.54532E-07** at limit **
   4  Prefactor     .10000E-03    8.5779       -.14998E-05** at limit **
   5  norm          .10000E-03    4.4534       -.58458E-07** at limit **
   6  norm          9.1534        11.201       -.79455E-06   -.33097E-04
   7  Prefactor     .10000E-03    92.888        .10140E-04** at limit **
   8  norm          .10000E-03    8.3402        .18168E-05** at limit **
   9  norm          6.7162        41.984       -.53998E-04   -.53152E-05
  10  norm          .10000E-03    .60891       -.10008E-06** at limit **
  11  Prefactor     .10000E-03    7.2676       -.79208E-06** at limit **
  12  Prefactor     .10000E-03    4.9459        .21484E-06** at limit **
  13  norm          .10000E-03    3.1820       -.92360E-08** at limit **
  14  Prefactor     39.418        9.8654       -.44689E-06    .71351E-04
  15  Prefactor     162.42        150.05       -.43283E-04    .11583E-04
  16  norm          .10000E-03    44.713       -.13473E-05** at limit **
  17  Prefactor     .10000E-03    6.6935        .43798E-06** at limit **
  18  Prefactor     .10000E-03    13.819        .21612E-06** at limit **
  19  Prefactor     .10000E-03    22.107        .33859E-06** at limit **
  20  Prefactor     .10000E-03    6.7625       -.47727E-06** at limit **
  21  Normalizat    .85308        .30848        .74128E-05    .97853E-04
  22  Prefactor     1.1716        .13005        .22360E-05   -.21756E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 43.8337
  Prefactor  = 57.0025
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 9.15343
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 6.71621
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 39.4175
  Prefactor  = 162.415
  norm       = 0.000100004
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Normalizat = 0.853076
  Prefactor  = 1.17157
 **********
 **   18 **HESSE 
 **********

 FCN=   6966.789     FROM HESSE     STATUS=OK           336 CALLS     2675 TOTAL
                     EDM=   .32E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     43.834        43.033        .60554E-04   -1.4383    
   2  Prefactor     57.003        49.064        .53128E-04   -1.4197    
   3  Prefactor     .10000E-03    .70886        .68206E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    8.6108        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          .10000E-03    4.4579        .17203E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  norm          9.1534        11.206        .13245E-03   -1.5103    
   7  Prefactor     .10000E-03    92.945        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .10000E-03    8.3724        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          6.7162        42.235        .15436E-03   -1.5190    
  10  norm          .10000E-03    5.5643        .12561E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    7.2979        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    4.9724        .18126E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .10000E-03    3.2508        .14533E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     39.418        9.8561        .63842E-04   -1.4451    
  15  Prefactor     162.42        150.18        .15820E-03   -1.3152    
  16  norm          .10000E-03    44.947        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     .10000E-03    6.7199        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10000E-03    14.053        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10000E-03    22.257        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10000E-03    6.7743        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Normalizat    .85308        .34834        .46926E-03   -.98129    
  22  Prefactor     1.1716        .14871        .17263E-03   -.87211    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.15055e-10
Minuit parameter uncertainties:
  1  43.0633
  2  49.0986
  3  3.22677e-06
  4  2.5096e-05
  5  1.22272e-05
  6  11.209
  7  7.74066e-05
  8  6.78472e-06
  9  33.7192
  10  1.68194e-05
  11  1.82935e-05
  12  3.60525e-05
  13  1.48701e-08
  14  9.85654
  15  150.539
  16  0.00083302
  17  3.21351e-05
  18  0.000153293
  19  0.000159058
  20  3.09666e-05
  21  0.349259
  22  0.148764
Done.

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

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  3.942e+01  9.857e+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.172e+00  1.488e-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.531e-01  3.493e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 31.33
Ra Dec: 310.136 -17.090
Photon Index (Fixed Index): 2.54 +/- 0.00
Photon Flux (Fixed Index): 4.62e-07 +/- 1.15e-07
Energy Flux (Fixed Index): 1.28e-04 +/- 3.21e-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) = 6966.71318729
delta logL = 0.0759770131299

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6966.6257078
delta logL = 0.163456502844

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    44.900       1.0000         .10000E-03   10000.    
     2 'Index     '    2.4034       1.0000          .0000       10.000    
     3 'Normalizat'    .88779       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1592       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=   6966.626     FROM MIGRAD    STATUS=CONVERGED     57 CALLS      243 TOTAL
                     EDM=   .70E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     44.895        148.46        .14958E-02    .24052E-03
   2  Index         2.4036        2.2487        .75094E-01    .25056E-03
   3  Normalizat    .88755        .30147        .10403       -.99105E-05
   4  Prefactor     1.1593        .13916        .35674E-01   -.71749E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 44.8947
  Index      = 2.40359
  Normalizat = 0.887553
  Prefactor  = 1.15934
 **********
 **   18 **HESSE 
 **********

 FCN=   6966.626     FROM HESSE     STATUS=OK            33 CALLS      276 TOTAL
                     EDM=   .63E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     44.895        14.542        .59833E-04   -1.4367    
   2  Index         2.4036        .23748        .32205E-02   -.54601    
   3  Normalizat    .88755        .34321        .46106E-03   -.96899    
   4  Prefactor     1.1593        .14383        .17339E-03   -.87592    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.25411e-11
Minuit parameter uncertainties:
  1  14.5429
  2  0.237602
  3  0.34406
  4  0.143878
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/444862': 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) = 6966.62570736
delta logL = 0.163456936696

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  4.489e+01  1.454e+01  1.000e-04  1.000e+04 ( 1.000e-12)
324        Index:  2.404e+00  2.376e-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.159e+00  1.439e-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.876e-01  3.441e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 31.33
Ra Dec: 310.136 -17.090
Photon Index (Free Index): 2.40 +/- 0.24
Photon Flux (Free Index): 4.36e-07 +/- 1.19e-07
Energy Flux (Free Index): 1.42e-04 +/- 4.56e-05

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/444862/cmap_HighResolution_664934401_665193601_4FGL_J2040.5-1705_daily_bin1642.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='4.62e-07', energy_flux2='1.42e-04', photon_flux_error='1.15e-07', dlogl='1.63e-01', energy_flux='1.28e-04', photon_flux2='4.36e-07', job_status='DONE', time_completed='2022-01-30 00:48:14.685683', photon_index_error2='0.24', photon_index2='2.40', ts='31.33', fit_tolerance='1e-08', GAL='1.17', photon_index_error='0.00', energy_flux_error2='4.56e-05', EG='0.85', time_epoch_completed='1643532494.69', return_code='0', job_id='444862', GAL2='1.16', EG2='0.89', return_code2='0', energy_flux_error='3.21e-05', photon_flux_error2='1.19e-07', ts2='31.33', photon_index='2.54' WHERE bin_id='1642' AND source_name='4FGL J2040.5-1705' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sun Jan 30 00:48:14 PST 2022


------------------------------------------------------------
Sender: LSF System <lsf@bullet0258>
Subject: Job 444862: <4FGL_J2040.5-1705_daily_bin1642> in cluster <slac> Done

Job <4FGL_J2040.5-1705_daily_bin1642> was submitted from host <rhel6-64k> by user <kocevski> in cluster <slac> at Sun Jan 30 00:35:40 2022
Job was executed on host(s) <bullet0258>, in queue <medium>, as user <kocevski> in cluster <slac> at Sun Jan 30 00:35:42 2022
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Sun Jan 30 00:35:42 2022
Terminated at Sun Jan 30 00:48:15 2022
Results reported at Sun Jan 30 00:48:15 2022

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2040.5-1705_daily_bin1642 310.136 -17.0901 664934401 665193601 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 :                                   618.17 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             333.92 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   752 sec.
    Turnaround time :                            755 sec.

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

