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


Performing analysis on: 4FGL_J2040.5-1705_daily_bin1482
RA = 310.136, Dec = -17.0901
tmin = 623462401, tmax = 623721601
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='113424', job_status='RUN', time_executed='2021-09-25 16:02:13.611170', time_epoch_executed='1632610933.61' WHERE source_name='4FGL J2040.5-1705' and cadence='daily' and bin_id='1482'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/113424

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/113424/ft1_4FGL_J2040.5-1705_daily_bin1482.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/113424/ft2_4FGL_J2040.5-1705_daily_bin1482.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/113424/ft1_4FGL_J2040.5-1705_daily_bin1482.fits outfile=/scratch/kocevski/113424/ft1_filteredMKT_4FGL_J2040.5-1705_daily_bin1482.fits ra=310.136 dec=-17.0901 rad=12.0 tmin=623462401.0 tmax=623721601.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.82
user 2.53
sys 0.19

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/113424/ft1_filtered_4FGL_J2040.5-1705_daily_bin1482.fits" evtable="EVENTS" scfile=/scratch/kocevski/113424/ft2_4FGL_J2040.5-1705_daily_bin1482.fits sctable="SC_DATA" outfile=/scratch/kocevski/113424/ltcube_623462401_623721601_4FGL_J2040.5-1705_daily_bin1482.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/113424/ft2_4FGL_J2040.5-1705_daily_bin1482.fits
.....................!
real 14.44
user 13.87
sys 0.34

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/113424/ft1_filtered_4FGL_J2040.5-1705_daily_bin1482.fits evtable="EVENTS" scfile=/scratch/kocevski/113424/ft2_4FGL_J2040.5-1705_daily_bin1482.fits sctable="SC_DATA" expcube=/scratch/kocevski/113424/ltcube_623462401_623721601_4FGL_J2040.5-1705_daily_bin1482.fits outfile=/scratch/kocevski/113424/expmap_623462401_623721601_4FGL_J2040.5-1705_daily_bin1482.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/113424/ltcube_623462401_623721601_4FGL_J2040.5-1705_daily_bin1482.fits
.....................!
real 192.33
user 186.30
sys 5.21

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/113424/ft1_filtered_4FGL_J2040.5-1705_daily_bin1482.fits scfile=/scratch/kocevski/113424/ft2_4FGL_J2040.5-1705_daily_bin1482.fits outfile=/scratch/kocevski/113424/cmap_623462401_623721601_4FGL_J2040.5-1705_daily_bin1482.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.60
user 0.37
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/113424/ft1_filtered_4FGL_J2040.5-1705_daily_bin1482.fits scfile=/scratch/kocevski/113424/ft2_4FGL_J2040.5-1705_daily_bin1482.fits outfile=/scratch/kocevski/113424/cmap_HighResolution_623462401_623721601_4FGL_J2040.5-1705_daily_bin1482.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.38
sys 0.16

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/113424/ft1_filtered_4FGL_J2040.5-1705_daily_bin1482.fits evtable="EVENTS" scfile=/scratch/kocevski/113424/ft2_4FGL_J2040.5-1705_daily_bin1482.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/113424/Model_4FGL_J2040.5-1705_daily_bin1482.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/113424/ft1_filtered_4FGL_J2040.5-1705_daily_bin1482.fits.....................!
real 72.03
user 70.65
sys 1.18

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10024E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    5.9400       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10023E-03   1.0000         .10000E-03   10000.    
     5 'norm      '    18.008       1.0000         .10000E-03   10000.    
     6 'norm      '    .10258E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    72.957       1.0000         .10000E-03   10000.    
     8 'norm      '    .10023E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    40.166       1.0000         .10000E-03   10000.    
    10 'norm      '    4.6215       1.0000         .10000E-03   10000.    
    11 'Prefactor '    17.689       1.0000         .10000E-03   10000.    
    12 'Prefactor '    1.8097       1.0000         .10000E-03   10000.    
    13 'norm      '    .10016E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    3.3812       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10152E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    3.8589       1.0000         .10000E-03   10000.    
    17 'Prefactor '    .10088E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .49717E-01   1.0000         .10000E-03   10000.    
    19 'Prefactor '    11.443       1.0000         .10000E-03   10000.    
    20 'Prefactor '    .12114E-03   1.0000         .10000E-03   10000.    
    21 'Normalizat'    1.1299       1.0000         .10000E-01   10.000    
    22 'Prefactor '    .95804       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=   8008.353     FROM MIGRAD    STATUS=CONVERGED    518 CALLS     2399 TOTAL
                     EDM=   .36E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.9%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    62.041        .15535E-05** at limit **
   2  Prefactor     .10000E-03    29.711       -.38462E-06** at limit **
   3  Prefactor     5.9377        2.1570       -.52837E-07   -.39051E-04
   4  Prefactor     .10000E-03    6.9211       -.13608E-06** at limit **
   5  norm          18.002        13.044        .92101E-07    .23749E-05
   6  norm          .10000E-03    3.3870       -.39897E-06** at limit **
   7  Prefactor     72.561        98.992        .21784E-04    .14137E-04
   8  norm          .10000E-03    9.2546       -.44207E-07** at limit **
   9  norm          40.158        29.409       -.10760E-05   -.53025E-05
  10  norm          4.6211        1.9816        .39365E-07   -.45304E-05
  11  Prefactor     17.686        20.270       -.74619E-07   -.38884E-06
  12  Prefactor     1.8093        5.8799        .62701E-05    .58460E-04
  13  norm          .10000E-03    1.5652       -.23055E-07** at limit **
  14  Prefactor     3.3802        4.0945        .17937E-06   -.18259E-04
  15  Prefactor     .10000E-03    50.287       -.10122E-05** at limit **
  16  norm          3.8551        20.729        .19342E-06   -.72262E-05
  17  Prefactor     .10000E-03    18.579       -.12669E-06** at limit **
  18  Prefactor     .88165E-03    3.5537        .12534E-05** at limit **
  19  Prefactor     11.415        26.234       -.29421E-05   -.10893E-04
  20  Prefactor     .10000E-03    17.284        .68499E-06** at limit **
  21  Normalizat    1.1298        .25166       -.24557E-05   -.77852E-04
  22  Prefactor     .95817        .10389        .45443E-06   -.19323E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 5.93774
  Prefactor  = 0.0001
  norm       = 18.002
  norm       = 0.0001
  Prefactor  = 72.5614
  norm       = 0.0001
  norm       = 40.1584
  norm       = 4.62112
  Prefactor  = 17.6864
  Prefactor  = 1.80931
  norm       = 0.0001
  Prefactor  = 3.38024
  Prefactor  = 0.0001
  norm       = 3.85511
  Prefactor  = 0.0001
  Prefactor  = 0.000881652
  Prefactor  = 11.4149
  Prefactor  = 0.0001
  Normalizat = 1.12983
  Prefactor  = 0.958173
 **********
 **   18 **HESSE 
 **********

 FCN=   8008.353     FROM HESSE     STATUS=OK           352 CALLS     2751 TOTAL
                     EDM=   .16E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    62.612        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    29.832        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     5.9377        2.1616        .75405E-04   -1.5221    
   4  Prefactor     .10000E-03    6.9415        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          18.002        13.083        .94381E-04   -1.4859    
   6  norm          .10000E-03    3.4253        .16085E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     72.561        99.019        .23502E-03   -1.4002    
   8  norm          .10000E-03    9.2821        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          40.158        29.424        .63247E-04   -1.4440    
  10  norm          4.6211        1.9821        .73054E-04   -1.5278    
  11  Prefactor     17.686        20.285        .95230E-04   -1.4867    
  12  Prefactor     1.8093        5.8866        .15529E-02   -1.5439    
  13  norm          .10000E-03    1.5759        .10932E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     3.3802        4.0982        .18841E-03   -1.5340    
  15  Prefactor     .10000E-03    50.355        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          3.8551        20.748        .20543E-03   -1.5315    
  17  Prefactor     .10000E-03    18.739        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .88165E-03    7.3792        .53632E-01   -1.5714    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     11.415        26.231        .11843E-03   -1.5032    
  20  Prefactor     .10000E-03    17.355        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Normalizat    1.1298        .30157        .38527E-03   -.88800    
  22  Prefactor     .95817        .12632        .17285E-03   -.94137    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.59333e-09
Minuit parameter uncertainties:
  1  5.78473e-05
  2  8.92303e-05
  3  2.16164
  4  6.50348e-06
  5  13.0853
  6  2.24325e-05
  7  99.2447
  8  2.406e-06
  9  29.4346
  10  1.98212
  11  20.2931
  12  5.88847
  13  2.10104e-07
  14  4.09851
  15  1.75023e-05
  16  17.8963
  17  1.86453e-05
  18  0.151913
  19  26.2578
  20  0.000105752
  21  0.302035
  22  0.126364
Done.

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

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  3.380e+00  4.099e+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:  9.582e-01  1.264e-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.130e+00  3.020e-01  1.000e-02  1.000e+01 ( 1.000e+00)


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

Saving results to:
/scratch/kocevski/113424/likelihoodResults_623462401_623721601_4FGL_J2040.5-1705_daily_bin1482.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) = 8007.285849
delta logL = 1.06678376819

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 8007.06259935
delta logL = 1.29003342016

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .90490E-02   1.0000         .10000E-03   10000.    
     2 'Index     '    6.5890       1.0000          .0000       10.000    
     3 'Normalizat'    1.0116       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .99597       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=   8007.063     FROM MIGRAD    STATUS=CONVERGED     49 CALLS      293 TOTAL
                     EDM=   .45E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .90554E-02    .88484E-01    .91294E-03    .82462E-02
   2  Index         6.5890        2.6557        .13751        .19480E-03
   3  Normalizat    1.0117        .69213E-01    .91244E-01    .23866E-04
   4  Prefactor     .99595        .28915E-01    .46217E-01   -.74677E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.00905537
  Index      = 6.58904
  Normalizat = 1.01173
  Prefactor  = 0.995953
 **********
 **   18 **HESSE 
 **********

 FCN=   8007.063     FROM HESSE     STATUS=NOT POSDEF    33 CALLS      326 TOTAL
                     EDM=   .30E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .90554E-02    .19078        .53289E-05   -1.5689    
   2  Index         6.5890        7.4021        .53245E-02    .32342    
   3  Normalizat    1.0117        .25548        .40409E-03   -.92638    
   4  Prefactor     .99595        .10558        .16984E-03   -.92865    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 2.95879e-09
Minuit parameter uncertainties:
  1  0.0826675
  2  4.84443
  3  0.255788
  4  0.105597
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/113424': 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) = 8007.06259827
delta logL = 1.29003450306

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  9.055e-03  8.267e-02  1.000e-04  1.000e+04 ( 1.000e-12)
324        Index:  6.589e+00  4.844e+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:  9.960e-01  1.056e-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.012e+00  2.558e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 3.76
Ra Dec: 310.136 -17.090
Photon Index (Free Index): 6.59 +/- 4.84
Photon Flux (Free Index): 1.16e-07 +/- 7.25e-08
Energy Flux (Free Index): 1.41e-05 +/- 9.49e-06

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/113424/cmap_HighResolution_623462401_623721601_4FGL_J2040.5-1705_daily_bin1482.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.14e-02', comment='SUCCESS', energy_flux2='1.41e-05', dlogl='1.29e+00', photon_flux2='1.16e-07', job_status='DONE', time_completed='2021-09-25 16:15:01.368756', photon_index_error2='4.84', photon_index2='6.59', ts='0.93', fit_tolerance='1e-08', GAL='0.96', photon_index_error='0.00', photon_flux_upper_limit='1.46e-07', energy_flux_error2='9.49e-06', EG='1.13', time_epoch_completed='1632611701.37', return_code='0', job_id='113424', GAL2='1.00', EG2='1.01', return_code2='102', photon_flux_error2='7.25e-08', ts2='3.76', photon_index='2.54' WHERE bin_id='1482' AND source_name='4FGL J2040.5-1705' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep 25 16:15:01 PDT 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0185>
Subject: Job 113424: <4FGL_J2040.5-1705_daily_bin1482> in cluster <slac> Done

Job <4FGL_J2040.5-1705_daily_bin1482> was submitted from host <rhel6-64m> by user <kocevski> in cluster <slac> at Sat Sep 25 16:00:59 2021
Job was executed on host(s) <bullet0185>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Sep 25 16:01:23 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Sat Sep 25 16:01:23 2021
Terminated at Sat Sep 25 16:15:02 2021
Results reported at Sat Sep 25 16:15:02 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2040.5-1705_daily_bin1482 310.136 -17.0901 623462401 623721601 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 :                                   760.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             346.59 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   39 MB
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   820 sec.
    Turnaround time :                            843 sec.

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

