/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 170 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 = 7258
number of fields = 27
No RA_SUN column yet. Adding RA_SUN/DEC_SUN columns.
Done.


Performing analysis on: 4FGL_J2040.5-1705_daily_bin170
RA = 310.136, Dec = -17.0901
tmin = 283392001, tmax = 283651201
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='106953', job_status='RUN', time_executed='2021-09-25 15:43:30.040624', time_epoch_executed='1632609810.04' WHERE source_name='4FGL J2040.5-1705' and cadence='daily' and bin_id='170'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/106953

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

Retrieving the FT1 file...

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

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

Retrieving 45 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/106953/ft1_4FGL_J2040.5-1705_daily_bin170.fits


Retrieving the FT1 file...

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

Retrieving 45 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/106953/ft2_4FGL_J2040.5-1705_daily_bin170.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/106953/ft1_4FGL_J2040.5-1705_daily_bin170.fits outfile=/scratch/kocevski/106953/ft1_filteredMKT_4FGL_J2040.5-1705_daily_bin170.fits ra=310.136 dec=-17.0901 rad=12.0 tmin=283392001.0 tmax=283651201.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.61
user 3.37
sys 0.21

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/106953/ft1_filtered_4FGL_J2040.5-1705_daily_bin170.fits" evtable="EVENTS" scfile=/scratch/kocevski/106953/ft2_4FGL_J2040.5-1705_daily_bin170.fits sctable="SC_DATA" outfile=/scratch/kocevski/106953/ltcube_283392001_283651201_4FGL_J2040.5-1705_daily_bin170.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/106953/ft2_4FGL_J2040.5-1705_daily_bin170.fits
.....................!
real 15.66
user 15.30
sys 0.33

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/106953/ft1_filtered_4FGL_J2040.5-1705_daily_bin170.fits evtable="EVENTS" scfile=/scratch/kocevski/106953/ft2_4FGL_J2040.5-1705_daily_bin170.fits sctable="SC_DATA" expcube=/scratch/kocevski/106953/ltcube_283392001_283651201_4FGL_J2040.5-1705_daily_bin170.fits outfile=/scratch/kocevski/106953/expmap_283392001_283651201_4FGL_J2040.5-1705_daily_bin170.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/106953/ltcube_283392001_283651201_4FGL_J2040.5-1705_daily_bin170.fits
.....................!
real 190.53
user 185.31
sys 4.89

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/106953/ft1_filtered_4FGL_J2040.5-1705_daily_bin170.fits scfile=/scratch/kocevski/106953/ft2_4FGL_J2040.5-1705_daily_bin170.fits outfile=/scratch/kocevski/106953/cmap_283392001_283651201_4FGL_J2040.5-1705_daily_bin170.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.39
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/106953/ft1_filtered_4FGL_J2040.5-1705_daily_bin170.fits scfile=/scratch/kocevski/106953/ft2_4FGL_J2040.5-1705_daily_bin170.fits outfile=/scratch/kocevski/106953/cmap_HighResolution_283392001_283651201_4FGL_J2040.5-1705_daily_bin170.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.57
user 0.37
sys 0.17

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

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 '    .10001E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    2.4815       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .35061E-01   1.0000         .10000E-03   10000.    
     5 'norm      '    14.291       1.0000         .10000E-03   10000.    
     6 'norm      '    .10011E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    14.057       1.0000         .10000E-03   10000.    
    10 'norm      '    1.4540       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10008E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    69.727       1.0000         .10000E-03   10000.    
    16 'norm      '    5.2755       1.0000         .10000E-03   10000.    
    17 'Prefactor '    58.829       1.0000         .10000E-03   10000.    
    18 'Prefactor '    4.8936       1.0000         .10000E-03   10000.    
    19 'Prefactor '    54.622       1.0000         .10000E-03   10000.    
    20 'Prefactor '    .27479E-01   1.0000         .10000E-03   10000.    
    21 'Normalizat'    .55193       1.0000         .10000E-01   10.000    
    22 'Prefactor '    1.1099       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=   7699.112     FROM MIGRAD    STATUS=CONVERGED    494 CALLS     2416 TOTAL
                     EDM=   .17E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .6%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    31.840        .46398E-04** at limit **
   2  Prefactor     .10000E-03    36.537       -.31792E-04** at limit **
   3  Prefactor     2.4818        2.0120        .25060E-06    .12281E-02
   4  Prefactor     .10721E-03    11.635       -.27472E-05** at limit **
   5  norm          14.292        11.583        .37973E-06    .77978E-04
   6  norm          .10000E-03    4.6970        .54175E-07** at limit **
   7  Prefactor     .10000E-03    28.546       -.19526E-04** at limit **
   8  norm          .10000E-03    5.9121        .92384E-07** at limit **
   9  norm          14.058        14.584        .33065E-06    .27815E-04
  10  norm          1.4546        1.1747        .87037E-08   -.18372E-03
  11  Prefactor     .10000E-03    12.845        .11371E-06** at limit **
  12  Prefactor     .10000E-03    3.7359        .58743E-07** at limit **
  13  norm          .10000E-03    1.6496       -.60693E-07** at limit **
  14  Prefactor     .10000E-03    2.0156        .12375E-07** at limit **
  15  Prefactor     69.740        67.287        .81607E-05    .12823E-05
  16  norm          5.2760        19.126        .10765E-05   -.37110E-04
  17  Prefactor     58.833        23.328        .99447E-07   -.99313E-05
  18  Prefactor     4.8953        7.7474        .28275E-05   -.23632E-03
  19  Prefactor     54.524        30.106        .22213E-05   -.28054E-03
  20  Prefactor     .10442E-03    8.8655        .16496E-05** at limit **
  21  Normalizat    .55165        .27138       -.51847E-05   -.16555E-04
  22  Prefactor     1.1100        .11298        .71183E-06    .19764E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 2.48182
  Prefactor  = 0.00010721
  norm       = 14.2917
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 14.0577
  norm       = 1.45459
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 69.7403
  norm       = 5.276
  Prefactor  = 58.8333
  Prefactor  = 4.89534
  Prefactor  = 54.524
  Prefactor  = 0.000104422
  Normalizat = 0.551648
  Prefactor  = 1.10999
 **********
 **   18 **HESSE 
 **********

 FCN=   7699.112     FROM HESSE     STATUS=OK           350 CALLS     2766 TOTAL
                     EDM=   .32E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    31.933        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    36.751        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     2.4818        2.0208        .95192E-04   -1.5393    
   4  Prefactor     .10721E-03    15.995        .74541E-01   -1.5707    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          14.292        11.604        .10595E-03   -1.4952    
   6  norm          .10000E-03    4.7552        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    28.563        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .10000E-03    5.9244        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          14.058        14.584        .10683E-03   -1.4958    
  10  norm          1.4546        1.1672        .82241E-04   -1.5467    
  11  Prefactor     .10000E-03    12.913        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    3.7786        .16558E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .10000E-03    1.6644        .11002E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10000E-03    2.0365        .12153E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     69.740        67.198        .48072E-04   -1.4036    
  16  norm          5.2760        19.104        .17499E-03   -1.5249    
  17  Prefactor     58.833        23.264        .52307E-04   -1.4172    
  18  Prefactor     4.8953        7.7022        .18183E-03   -1.5265    
  19  Prefactor     54.524        28.375        .54273E-04   -1.4230    
  20  Prefactor     .10442E-03    136.99        .46987E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Normalizat    .55165        .29041        .49262E-03   -1.1008    
  22  Prefactor     1.1100        .12414        .15390E-03   -.89148    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.23614e-08
Minuit parameter uncertainties:
  1  7.74071e-05
  2  0.000189575
  3  2.02087
  4  0.0214832
  5  11.606
  6  1.2634e-05
  7  8.92376e-06
  8  3.00075e-06
  9  14.5878
  10  1.16719
  11  2.40297e-05
  12  2.36115e-06
  13  4.10406e-06
  14  8.06664e-06
  15  67.2708
  16  19.1259
  17  23.2677
  18  7.70373
  19  28.3823
  20  0.0493373
  21  0.291211
  22  0.124177
Done.

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

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  1.000e-04  8.067e-06  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.110e+00  1.242e-01  0.000e+00  1.000e+01 ( 1.000e+00)
597        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
598        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
595   Normalization:  5.516e-01  2.912e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 310.136 -17.090
Photon Flux Upper Limit: 8.96e-08 ph cm-2 s-1
Energy Flux Upper Limit: 6.98e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/106953/likelihoodResults_283392001_283651201_4FGL_J2040.5-1705_daily_bin170.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) = 7699.11481945
delta logL = -0.00234185728095

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 7699.11247755
delta logL = 5.10081008542e-08

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.5484       1.0000          .0000       10.000    
     3 'Normalizat'    .55165       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1100       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.
 MIGRAD TERMINATED WITHOUT CONVERGENCE.

 FCN=   7699.112     FROM MIGRAD    STATUS=FAILED        88 CALLS      243 TOTAL
                     EDM=   .96E-06    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    441.60        .12176E-02** at limit **
   2  Index         2.5558        5.2766        .50000       -.33052E-04
   3  Normalizat    .55165        .15720        .49262E-03   -.82388E-04
   4  Prefactor     1.1100        .68461E-01    .15390E-03   -.12780E-03
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   7699.112     FROM SIMPLEX   STATUS=UNCHANGED    171 CALLS      414 TOTAL
                     EDM=   .84E-05    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    441.60        .21193E-03** at limit **
   2  Index         2.5558        5.2766        .18535E-05   -.33052E-04
   3  Normalizat    .55165        .15720        .26574E-06   -.82388E-04
   4  Prefactor     1.1100        .68461E-01    .45992E-07   -.12780E-03
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   7699.112     FROM MIGRAD    STATUS=CONVERGED     34 CALLS      448 TOTAL
                     EDM=   .17E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    2.2004        .24351E-03** at limit **
   2  Index         2.5560        6.2774        .50000       -.33071E-04
   3  Normalizat    .55165        .27362        .19705E-04   -.87812E-04
   4  Prefactor     1.1100        .11956        .61560E-05   -.14294E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100002
  Index      = 2.55605
  Normalizat = 0.551649
  Prefactor  = 1.10999
 **********
 **   18 **HESSE 
 **********

 FCN=   7699.112     FROM HESSE     STATUS=OK            29 CALLS      477 TOTAL
                     EDM=   .21E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    2.0505        .48702E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.5560        6.2737        .50000       -.51070    
   3  Normalizat    .55165        .27318        .39410E-05   -1.1008    
   4  Prefactor     1.1100        .11936        .12312E-05   -.89148    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.0895e-09
Minuit parameter uncertainties:
  1  0.000133931
  2  4.3686
  3  0.273852
  4  0.119389
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/106953': 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) = 7699.11247749
delta logL = 1.08947460831e-07

Extracting fit parameters...

4FGL J2040.5-1705
   Spectrum: PowerLaw
323    Prefactor:  1.000e-04  1.339e-04  1.000e-04  1.000e+04 ( 1.000e-12)
324        Index:  2.556e+00  4.369e+00  0.000e+00  1.000e+01 (-1.000e+00)
325        Scale:  7.724e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
596    Prefactor:  1.110e+00  1.194e-01  0.000e+00  1.000e+01 ( 1.000e+00)
597        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
598        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
595   Normalization:  5.516e-01  2.739e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 310.136 -17.090

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/106953/cmap_HighResolution_283392001_283651201_4FGL_J2040.5-1705_daily_bin170.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='6.98e-03', job_status='DONE', photon_flux_upper_limit='8.96e-08', time_completed='2021-09-25 15:56:02.364303', job_id='106953', GAL2='1.11', fit_tolerance='1e-08', EG2='0.55', EG='0.55', time_epoch_completed='1632610562.36', return_code2='0', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.11', dlogl='1.09e-07', ts2='-0.00', photon_index_error='0.00', photon_index='2.54' WHERE bin_id='170' AND source_name='4FGL J2040.5-1705' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep 25 15:56:02 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0038>
Subject: Job 106953: <4FGL_J2040.5-1705_daily_bin170> in cluster <slac> Done

Job <4FGL_J2040.5-1705_daily_bin170> was submitted from host <rhel6-64j> by user <kocevski> in cluster <slac> at Sat Sep 25 15:40:17 2021
Job was executed on host(s) <bullet0038>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Sep 25 15:40:28 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Sat Sep 25 15:40:28 2021
Terminated at Sat Sep 25 15:56:03 2021
Results reported at Sat Sep 25 15:56:03 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2040.5-1705_daily_bin170 310.136 -17.0901 283392001 283651201 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 :                                   751.31 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             284.39 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   934 sec.
    Turnaround time :                            946 sec.

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

