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


Performing analysis on: 4FGL_J2040.5-1705_daily_bin1446
RA = 310.136, Dec = -17.0901
tmin = 614131201, tmax = 614390401
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='113370', job_status='RUN', time_executed='2021-09-25 16:02:38.938375', time_epoch_executed='1632610958.94' WHERE source_name='4FGL J2040.5-1705' and cadence='daily' and bin_id='1446'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/113370

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

Retrieving the FT1 file...

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

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

Retrieving 43 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/113370/ft1_4FGL_J2040.5-1705_daily_bin1446.fits


Retrieving the FT1 file...

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

Retrieving 43 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/113370/ft2_4FGL_J2040.5-1705_daily_bin1446.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/113370/ft1_4FGL_J2040.5-1705_daily_bin1446.fits outfile=/scratch/kocevski/113370/ft1_filteredMKT_4FGL_J2040.5-1705_daily_bin1446.fits ra=310.136 dec=-17.0901 rad=12.0 tmin=614131201.0 tmax=614390401.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 4.85
user 4.45
sys 0.20

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/113370/ft2_4FGL_J2040.5-1705_daily_bin1446.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/113370/ft1_filteredMKT_4FGL_J2040.5-1705_daily_bin1446.fits evtable="EVENTS" outfile="/scratch/kocevski/113370/ft1_filtered_4FGL_J2040.5-1705_daily_bin1446.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.62
user 0.33
sys 0.17

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/113370/ft1_filtered_4FGL_J2040.5-1705_daily_bin1446.fits" evtable="EVENTS" scfile=/scratch/kocevski/113370/ft2_4FGL_J2040.5-1705_daily_bin1446.fits sctable="SC_DATA" outfile=/scratch/kocevski/113370/ltcube_614131201_614390401_4FGL_J2040.5-1705_daily_bin1446.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/113370/ft2_4FGL_J2040.5-1705_daily_bin1446.fits
.....................!
real 13.65
user 13.03
sys 0.35

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/113370/ft1_filtered_4FGL_J2040.5-1705_daily_bin1446.fits evtable="EVENTS" scfile=/scratch/kocevski/113370/ft2_4FGL_J2040.5-1705_daily_bin1446.fits sctable="SC_DATA" expcube=/scratch/kocevski/113370/ltcube_614131201_614390401_4FGL_J2040.5-1705_daily_bin1446.fits outfile=/scratch/kocevski/113370/expmap_614131201_614390401_4FGL_J2040.5-1705_daily_bin1446.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/113370/ltcube_614131201_614390401_4FGL_J2040.5-1705_daily_bin1446.fits
.....................!
real 193.65
user 186.01
sys 5.43

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/113370/ft1_filtered_4FGL_J2040.5-1705_daily_bin1446.fits scfile=/scratch/kocevski/113370/ft2_4FGL_J2040.5-1705_daily_bin1446.fits outfile=/scratch/kocevski/113370/cmap_614131201_614390401_4FGL_J2040.5-1705_daily_bin1446.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.38
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/113370/ft1_filtered_4FGL_J2040.5-1705_daily_bin1446.fits scfile=/scratch/kocevski/113370/ft2_4FGL_J2040.5-1705_daily_bin1446.fits outfile=/scratch/kocevski/113370/cmap_HighResolution_614131201_614390401_4FGL_J2040.5-1705_daily_bin1446.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.37
sys 0.17

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/113370/ft1_filtered_4FGL_J2040.5-1705_daily_bin1446.fits evtable="EVENTS" scfile=/scratch/kocevski/113370/ft2_4FGL_J2040.5-1705_daily_bin1446.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/113370/Model_4FGL_J2040.5-1705_daily_bin1446.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/113370/ft1_filtered_4FGL_J2040.5-1705_daily_bin1446.fits.....................!
real 58.02
user 55.94
sys 1.25

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    73.752       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .11433E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    5.6499       1.0000         .10000E-03   10000.    
     5 'norm      '    19.409       1.0000         .10000E-03   10000.    
     6 'norm      '    10.283       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .89036E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    13.502       1.0000         .10000E-03   10000.    
     9 'norm      '    60.732       1.0000         .10000E-03   10000.    
    10 'norm      '    9.3614       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .66638E-01   1.0000         .10000E-03   10000.    
    13 'norm      '    2.8199       1.0000         .10000E-03   10000.    
    14 'Prefactor '    7.3203       1.0000         .10000E-03   10000.    
    15 'Prefactor '    239.73       1.0000         .10000E-03   10000.    
    16 'norm      '    .90158E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    5.8492       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    6.3341       1.0000         .10000E-03   10000.    
    21 'Normalizat'    1.5271       1.0000         .10000E-01   10.000    
    22 'Prefactor '    .70109       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=   5959.984     FROM MIGRAD    STATUS=CONVERGED    497 CALLS     2421 TOTAL
                     EDM=   .99E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.2%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    15.959        .35490E-07** at limit **
   2  Prefactor     73.751        60.988        .50335E-06    .11898E-03
   3  Prefactor     .10000E-03    1.6327       -.18769E-05** at limit **
   4  Prefactor     5.6907        17.831        .42288E-05    .39261E-03
   5  norm          19.417        17.687        .70811E-07    .11379E-03
   6  norm          10.271        12.438       -.91243E-06    .14692E-03
   7  Prefactor     .10001E-03    290.41       -.78234E-05** at limit **
   8  norm          13.503        13.340       -.16115E-06   -.88614E-05
   9  norm          60.728        36.938        .18765E-06    .53102E-04
  10  norm          9.3626        2.4861       -.40769E-07    .48512E-04
  11  Prefactor     .10000E-03    9.7302        .77308E-07** at limit **
  12  Prefactor     .22784        5.8190        .21925E-06   -.23178E-03
  13  norm          2.8212        3.7058        .58192E-07   -.22485E-05
  14  Prefactor     7.3245        5.7942       -.77774E-07    .94346E-05
  15  Prefactor     239.67        133.85       -.12925E-06   -.17999E-03
  16  norm          .10092E-03    28.669        .29049E-05** at limit **
  17  Prefactor     5.8676        20.127        .93859E-06    .44111E-04
  18  Prefactor     .10000E-03    3.5866       -.17020E-06** at limit **
  19  Prefactor     .10000E-03    11.177        .15914E-06** at limit **
  20  Prefactor     6.3534        18.684        .49137E-06    .32068E-04
  21  Normalizat    1.5263        .29710        .30649E-06    .16231E-03
  22  Prefactor     .70113        .11779        .63433E-06    .34352E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 73.7507
  Prefactor  = 0.0001
  Prefactor  = 5.69069
  norm       = 19.4168
  norm       = 10.2715
  Prefactor  = 0.000100006
  norm       = 13.5028
  norm       = 60.7283
  norm       = 9.36259
  Prefactor  = 0.0001
  Prefactor  = 0.227844
  norm       = 2.82122
  Prefactor  = 7.32454
  Prefactor  = 239.669
  norm       = 0.00010092
  Prefactor  = 5.86765
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 6.35335
  Normalizat = 1.52625
  Prefactor  = 0.701134
 **********
 **   18 **HESSE 
 **********

 FCN=   5959.984     FROM HESSE     STATUS=OK           348 CALLS     2769 TOTAL
                     EDM=   .78E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    15.966        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     73.751        61.217        .46751E-04   -1.3988    
   3  Prefactor     .10000E-03    2.2182        .17186E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     5.6907        19.176        .16900E-03   -1.5231    
   5  norm          19.417        17.715        .90913E-04   -1.4826    
   6  norm          10.271        12.376        .12495E-03   -1.5067    
   7  Prefactor     .10001E-03    290.57        .20837E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          13.503        13.344        .10901E-03   -1.4973    
   9  norm          60.728        36.959        .25743E-03   -1.4148    
  10  norm          9.3626        2.4873        .60065E-04   -1.5096    
  11  Prefactor     .10000E-03    9.7491        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .22784        82.349        .35326E-02   -1.5613    
  13  norm          2.8212        3.6926        .16475E-03   -1.5372    
  14  Prefactor     7.3245        5.8245        .14824E-03   -1.5167    
  15  Prefactor     239.67        133.38        .13075E-03   -1.2599    
  16  norm          .10092E-03    162.19        .74507E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     5.8676        20.144        .16605E-03   -1.5223    
  18  Prefactor     .10000E-03    3.6031        .14276E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10000E-03    11.187        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     6.3534        18.765        .15949E-03   -1.5204    
  21  Normalizat    1.5263        .35957        .34353E-03   -.77043    
  22  Prefactor     .70113        .14102        .19471E-03   -1.0348    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 7.82773e-09
Minuit parameter uncertainties:
  1  1.16855e-05
  2  61.2695
  3  6.08023e-05
  4  19.1968
  5  17.7198
  6  12.3791
  7  0.00267514
  8  13.3465
  9  36.9731
  10  2.48734
  11  1.81063e-06
  12  8.67331
  13  3.6929
  14  5.82492
  15  133.547
  16  0.0245004
  17  20.1672
  18  2.79051e-06
  19  1.50886e-05
  20  18.7819
  21  0.360175
  22  0.141088
Done.

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

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  7.325e+00  5.825e+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:  7.011e-01  1.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:  1.526e+00  3.602e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 2.65
Ra Dec: 310.136 -17.090
Photon Index (Fixed Index): 2.54 +/- 0.00
Photon Flux (Fixed Index): 8.58e-08 +/- 6.82e-08
Energy Flux (Fixed Index): 2.38e-05 +/- 1.89e-05

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

Saving results to:
/scratch/kocevski/113370/likelihoodResults_614131201_614390401_4FGL_J2040.5-1705_daily_bin1446.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) = 5959.8764194
delta logL = 0.107200247042

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5959.86739282
delta logL = 0.116226836444

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    5.5888       1.0000         .10000E-03   10000.    
     2 'Index     '    2.9950       1.0000          .0000       10.000    
     3 'Normalizat'    1.4742       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .71470       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=   5959.867     FROM MIGRAD    STATUS=CONVERGED     85 CALLS      301 TOTAL
                     EDM=   .12E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     5.5891        7.3776        .12227E-03    .89450E-04
   2  Index         2.9950        1.1437        .76524E-02    .44018E-03
   3  Normalizat    1.4743        .36477        .34841E-03    .10425E-03
   4  Prefactor     .71466        .14049        .19303E-03    .26009E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 5.58911
  Index      = 2.99496
  Normalizat = 1.47426
  Prefactor  = 0.714664
 **********
 **   18 **HESSE 
 **********

 FCN=   5959.867     FROM HESSE     STATUS=OK            25 CALLS      326 TOTAL
                     EDM=   .56E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     5.5891        6.4681        .48906E-05   -1.5235    
   2  Index         2.9950        1.0020        .15305E-02   -.41262    
   3  Normalizat    1.4743        .36149        .13936E-04   -.78504    
   4  Prefactor     .71466        .13973        .38606E-04   -1.0295    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 5.60442e-11
Minuit parameter uncertainties:
  1  6.4689
  2  1.01016
  3  0.36212
  4  0.139797
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/113370': 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) = 5959.86739275
delta logL = 0.116226900459

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  5.589e+00  6.469e+00  1.000e-04  1.000e+04 ( 1.000e-12)
324        Index:  2.995e+00  1.010e+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:  7.147e-01  1.398e-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:  1.474e+00  3.621e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 2.93
Ra Dec: 310.136 -17.090
Photon Index (Free Index): 2.99 +/- 1.01
Photon Flux (Free Index): 1.28e-07 +/- 1.25e-07
Energy Flux (Free Index): 2.56e-05 +/- 1.89e-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/113370/cmap_HighResolution_614131201_614390401_4FGL_J2040.5-1705_daily_bin1446.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.82e-02', comment='SUCCESS', photon_flux='8.58e-08', energy_flux2='2.56e-05', photon_flux_error='6.82e-08', dlogl='1.16e-01', energy_flux='2.38e-05', photon_flux2='1.28e-07', job_status='DONE', time_completed='2021-09-25 16:13:42.526218', photon_index_error2='1.01', photon_index2='2.99', ts='2.65', fit_tolerance='1e-08', GAL='0.70', photon_index_error='0.00', photon_flux_upper_limit='2.33e-07', energy_flux_error2='1.89e-05', EG='1.53', time_epoch_completed='1632611622.53', return_code='0', job_id='113370', GAL2='0.71', EG2='1.47', return_code2='0', energy_flux_error='1.89e-05', photon_flux_error2='1.25e-07', ts2='2.93', photon_index='2.54' WHERE bin_id='1446' AND source_name='4FGL J2040.5-1705' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep 25 16:13:42 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0268>
Subject: Job 113370: <4FGL_J2040.5-1705_daily_bin1446> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2040.5-1705_daily_bin1446 310.136 -17.0901 614131201 614390401 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 :                                   653.06 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             306.88 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   744 sec.
    Turnaround time :                            769 sec.

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

