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


Performing analysis on: 4FGL_J2040.5-1705_daily_bin1636
RA = 310.136, Dec = -17.0901
tmin = 663379201, tmax = 663638401
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='952823', job_status='RUN', time_executed='2022-01-12 01:23:33.639401', time_epoch_executed='1641979413.64' WHERE source_name='4FGL J2040.5-1705' and cadence='daily' and bin_id='1636'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/952823

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

Retrieving the FT1 file...

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

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

Retrieving 45 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/952823/ft1_4FGL_J2040.5-1705_daily_bin1636.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/952823/ft2_4FGL_J2040.5-1705_daily_bin1636.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/952823/ft1_4FGL_J2040.5-1705_daily_bin1636.fits outfile=/scratch/kocevski/952823/ft1_filteredMKT_4FGL_J2040.5-1705_daily_bin1636.fits ra=310.136 dec=-17.0901 rad=12.0 tmin=663379201.0 tmax=663638401.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 2.55
user 2.31
sys 0.22

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/952823/ft1_filtered_4FGL_J2040.5-1705_daily_bin1636.fits" evtable="EVENTS" scfile=/scratch/kocevski/952823/ft2_4FGL_J2040.5-1705_daily_bin1636.fits sctable="SC_DATA" outfile=/scratch/kocevski/952823/ltcube_663379201_663638401_4FGL_J2040.5-1705_daily_bin1636.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/952823/ft2_4FGL_J2040.5-1705_daily_bin1636.fits
.....................!
real 13.93
user 13.37
sys 0.32

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/952823/ft1_filtered_4FGL_J2040.5-1705_daily_bin1636.fits evtable="EVENTS" scfile=/scratch/kocevski/952823/ft2_4FGL_J2040.5-1705_daily_bin1636.fits sctable="SC_DATA" expcube=/scratch/kocevski/952823/ltcube_663379201_663638401_4FGL_J2040.5-1705_daily_bin1636.fits outfile=/scratch/kocevski/952823/expmap_663379201_663638401_4FGL_J2040.5-1705_daily_bin1636.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/952823/ltcube_663379201_663638401_4FGL_J2040.5-1705_daily_bin1636.fits
.....................!
real 193.05
user 185.48
sys 5.13

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/952823/ft1_filtered_4FGL_J2040.5-1705_daily_bin1636.fits scfile=/scratch/kocevski/952823/ft2_4FGL_J2040.5-1705_daily_bin1636.fits outfile=/scratch/kocevski/952823/cmap_663379201_663638401_4FGL_J2040.5-1705_daily_bin1636.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.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/952823/ft1_filtered_4FGL_J2040.5-1705_daily_bin1636.fits scfile=/scratch/kocevski/952823/ft2_4FGL_J2040.5-1705_daily_bin1636.fits outfile=/scratch/kocevski/952823/cmap_HighResolution_663379201_663638401_4FGL_J2040.5-1705_daily_bin1636.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.61
user 0.40
sys 0.14

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10317E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10276E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    24.169       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10469E-03   1.0000         .10000E-03   10000.    
     5 'norm      '    .67601E-02   1.0000         .10000E-03   10000.    
     6 'norm      '    54.809       1.0000         .10000E-03   10000.    
     7 'Prefactor '    94.330       1.0000         .10000E-03   10000.    
     8 'norm      '    .10611E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    .10852E-03   1.0000         .10000E-03   10000.    
    10 'norm      '    2.2818       1.0000         .10000E-03   10000.    
    11 'Prefactor '    2.3558       1.0000         .10000E-03   10000.    
    12 'Prefactor '    14.528       1.0000         .10000E-03   10000.    
    13 'norm      '    .12322E-01   1.0000         .10000E-03   10000.    
    14 'Prefactor '    17.220       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .11069E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    .11272E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    14.638       1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10096E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10201E-03   1.0000         .10000E-03   10000.    
    21 'Normalizat'    .45735       1.0000         .10000E-01   10.000    
    22 'Prefactor '    1.2602       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=   2563.664     FROM MIGRAD    STATUS=CONVERGED    472 CALLS     2761 TOTAL
                     EDM=   .61E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.6%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10001E-03    266.39        .16883E-05** at limit **
   2  Prefactor     .10001E-03    165.78        .26467E-05** at limit **
   3  Prefactor     24.115        32.941       -.86231E-06    .32731E-04
   4  Prefactor     .10001E-03    114.32       -.27132E-06** at limit **
   5  norm          .10017E-03    730.77       -.77999E-05** at limit **
   6  norm          54.940        93.101        .14424E-05    .14456E-03
   7  Prefactor     94.302        558.04        .39617E-05    .10431E-04
   8  norm          .10000E-03    32.421        .22618E-06** at limit **
   9  norm          .10000E-03    52.569        .71355E-06** at limit **
  10  norm          2.2820        3.7378       -.35572E-05   -.10851E-02
  11  Prefactor     2.3555        176.32        .53718E-04   -.79522E-04
  12  Prefactor     14.573        32.442       -.44408E-06   -.75526E-05
  13  norm          .12154E-01    5.5101        .28943E-06   -.19958E-04
  14  Prefactor     17.231        14.085        .12966E-06   -.15479E-04
  15  Prefactor     .10000E-03    353.30       -.14952E-05** at limit **
  16  norm          .10000E-03    42.286       -.25484E-06** at limit **
  17  Prefactor     .10000E-03    5.4120       -.27823E-07** at limit **
  18  Prefactor     14.636        20.208        .27481E-06   -.21601E-04
  19  Prefactor     .10000E-03    11.838       -.35599E-07** at limit **
  20  Prefactor     .10000E-03    11.300       -.47447E-07** at limit **
  21  Normalizat    .45733        .56486        .48724E-05   -.46438E-04
  22  Prefactor     1.2602        .25130       -.30848E-05   -.34098E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100007
  Prefactor  = 0.000100009
  Prefactor  = 24.1152
  Prefactor  = 0.000100006
  norm       = 0.00010017
  norm       = 54.9398
  Prefactor  = 94.3019
  norm       = 0.0001
  norm       = 0.0001
  norm       = 2.28204
  Prefactor  = 2.35546
  Prefactor  = 14.5728
  norm       = 0.012154
  Prefactor  = 17.2311
  Prefactor  = 0.000100002
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 14.636
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Normalizat = 0.457331
  Prefactor  = 1.26018
 **********
 **   18 **HESSE 
 **********

 FCN=   2563.664     FROM HESSE     STATUS=OK           348 CALLS     3109 TOTAL
                     EDM=   .12E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10001E-03    266.54        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10001E-03    165.91        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     24.115        32.935        .81480E-04   -1.4725    
   4  Prefactor     .10001E-03    114.44        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          .10017E-03    736.19        .18756E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  norm          54.940        93.188        .27091E-03   -1.4224    
   7  Prefactor     94.302        558.17        .20690E-03   -1.3763    
   8  norm          .10000E-03    32.463        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          .10000E-03    52.583        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          2.2820        3.8114        .94406E-04   -1.5406    
  11  Prefactor     2.3555        180.99        .13352E-02   -1.5401    
  12  Prefactor     14.573        32.202        .10508E-03   -1.4944    
  13  norm          .12154E-01    13.375        .38475E-01   -1.5686    
  14  Prefactor     17.231        14.026        .96517E-04   -1.4878    
  15  Prefactor     .10000E-03    353.72        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          .10000E-03    42.309        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     .10000E-03    5.4138        .11505E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     14.636        19.852        .10469E-03   -1.4943    
  19  Prefactor     .10000E-03    11.848        .17015E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10000E-03    11.318        .16622E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Normalizat    .45733        .54171        .57606E-03   -1.1444    
  22  Prefactor     1.2602        .25153        .16640E-03   -.84499    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.22485e-09
Minuit parameter uncertainties:
  1  0.00282397
  2  0.00246132
  3  32.9596
  4  0.00169558
  5  0.0226324
  6  93.4371
  7  465.538
  8  4.6554e-05
  9  0.000158892
  10  3.81185
  11  41.4249
  12  32.24
  13  0.803236
  14  14.0285
  15  0.00151917
  16  4.0244e-05
  17  6.9666e-07
  18  19.8612
  19  1.07759e-05
  20  1.63106e-05
  21  0.548113
  22  0.251769
Done.

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

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  1.723e+01  1.403e+01  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.260e+00  2.518e-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:  4.573e-01  5.481e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 3.10
Ra Dec: 310.136 -17.090
Photon Index (Fixed Index): 2.54 +/- 0.00
Photon Flux (Fixed Index): 2.02e-07 +/- 1.64e-07
Energy Flux (Fixed Index): 5.61e-05 +/- 4.56e-05

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

Saving results to:
/scratch/kocevski/952823/likelihoodResults_663379201_663638401_4FGL_J2040.5-1705_daily_bin1636.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): 0
logL (Free Index) = 2563.4991175
delta logL = 0.165016078085

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 2563.4825731
delta logL = 0.181560482111

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    19.908       1.0000         .10000E-03   10000.    
     2 'Index     '    2.1652       1.0000          .0000       10.000    
     3 'Normalizat'    .48992       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.2520       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5990E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   2563.483     FROM MIGRAD    STATUS=CONVERGED     80 CALLS      233 TOTAL
                     EDM=   .14E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     19.905        16.729        .89767E-04    .11474E-03
   2  Index         2.1656        .61475        .64970E-02    .15649E-04
   3  Normalizat    .49000        .51525        .55779E-03    .55672E-04
   4  Prefactor     1.2521        .24088        .16689E-03    .29595E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 19.9053
  Index      = 2.16556
  Normalizat = 0.49
  Prefactor  = 1.25207
 **********
 **   18 **HESSE 
 **********

 FCN=   2563.483     FROM HESSE     STATUS=OK            25 CALLS      258 TOTAL
                     EDM=   .14E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     19.905        16.741        .17953E-04   -1.4815    
   2  Index         2.1656        .61507        .25988E-03   -.60272    
   3  Normalizat    .49000        .51514        .22312E-04   -1.1288    
   4  Prefactor     1.2521        .24084        .33378E-04   -.84744    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.4004e-10
Minuit parameter uncertainties:
  1  16.7453
  2  0.617375
  3  0.52027
  4  0.241055
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/952823': 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) = 2563.48257269
delta logL = 0.181560890033

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  1.991e+01  1.675e+01  1.000e-04  1.000e+04 ( 1.000e-12)
324        Index:  2.166e+00  6.174e-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.252e+00  2.411e-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:  4.900e-01  5.203e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 3.46
Ra Dec: 310.136 -17.090
Photon Index (Free Index): 2.17 +/- 0.62
Photon Flux (Free Index): 1.43e-07 +/- 1.63e-07
Energy Flux (Free Index): 6.86e-05 +/- 6.49e-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/952823/cmap_HighResolution_663379201_663638401_4FGL_J2040.5-1705_daily_bin1636.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='4.49e-02', comment='SUCCESS', photon_flux='2.02e-07', energy_flux2='6.86e-05', photon_flux_error='1.64e-07', dlogl='1.82e-01', energy_flux='5.61e-05', photon_flux2='1.43e-07', job_status='DONE', time_completed='2022-01-12 01:31:15.697867', photon_index_error2='0.62', photon_index2='2.17', ts='3.10', fit_tolerance='1e-08', GAL='1.26', photon_index_error='0.00', photon_flux_upper_limit='5.76e-07', energy_flux_error2='6.49e-05', EG='0.46', time_epoch_completed='1641979875.7', return_code='0', job_id='952823', GAL2='1.25', EG2='0.49', return_code2='0', energy_flux_error='4.56e-05', photon_flux_error2='1.63e-07', ts2='3.46', photon_index='2.54' WHERE bin_id='1636' AND source_name='4FGL J2040.5-1705' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Wed Jan 12 01:31:15 PST 2022


------------------------------------------------------------
Sender: LSF System <lsf@bullet0210>
Subject: Job 952823: <4FGL_J2040.5-1705_daily_bin1636> in cluster <slac> Done

Job <4FGL_J2040.5-1705_daily_bin1636> was submitted from host <rhel6-64f> by user <kocevski> in cluster <slac> at Wed Jan 12 01:20:20 2022
Job was executed on host(s) <bullet0210>, in queue <medium>, as user <kocevski> in cluster <slac> at Wed Jan 12 01:22:23 2022
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Wed Jan 12 01:22:23 2022
Terminated at Wed Jan 12 01:31:16 2022
Results reported at Wed Jan 12 01:31:16 2022

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2040.5-1705_daily_bin1636 310.136 -17.0901 663379201 663638401 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 :                                   459.33 sec.
    Max Memory :                                 1255 MB
    Average Memory :                             372.21 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   532 sec.
    Turnaround time :                            656 sec.

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

