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


Performing analysis on: 4FGL_J1640.4+3945_daily_bin407
RA = 250.119, Dec = 39.7626
tmin = 344822401, tmax = 345081601
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='832927', job_status='RUN', time_executed='2021-09-15 06:26:53.003739', time_epoch_executed='1631712413.0' WHERE source_name='4FGL J1640.4+3945' and cadence='daily' and bin_id='407'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/832927

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/832927/ft1_4FGL_J1640.4+3945_daily_bin407.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/832927/ft2_4FGL_J1640.4+3945_daily_bin407.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/832927/ft1_4FGL_J1640.4+3945_daily_bin407.fits outfile=/scratch/kocevski/832927/ft1_filteredMKT_4FGL_J1640.4+3945_daily_bin407.fits ra=250.119 dec=39.7626 rad=12.0 tmin=344822401.0 tmax=345081601.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.43
user 3.21
sys 0.20

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/832927/ft2_4FGL_J1640.4+3945_daily_bin407.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/832927/ft2_4FGL_J1640.4+3945_daily_bin407.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/832927/ft1_filteredMKT_4FGL_J1640.4+3945_daily_bin407.fits evtable="EVENTS" outfile="/scratch/kocevski/832927/ft1_filtered_4FGL_J1640.4+3945_daily_bin407.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.53
user 0.33
sys 0.17

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/832927/ft1_filtered_4FGL_J1640.4+3945_daily_bin407.fits" evtable="EVENTS" scfile=/scratch/kocevski/832927/ft2_4FGL_J1640.4+3945_daily_bin407.fits sctable="SC_DATA" outfile=/scratch/kocevski/832927/ltcube_344822401_345081601_4FGL_J1640.4+3945_daily_bin407.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/832927/ft2_4FGL_J1640.4+3945_daily_bin407.fits
.....................!
real 14.01
user 13.61
sys 0.35

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/832927/ft1_filtered_4FGL_J1640.4+3945_daily_bin407.fits evtable="EVENTS" scfile=/scratch/kocevski/832927/ft2_4FGL_J1640.4+3945_daily_bin407.fits sctable="SC_DATA" expcube=/scratch/kocevski/832927/ltcube_344822401_345081601_4FGL_J1640.4+3945_daily_bin407.fits outfile=/scratch/kocevski/832927/expmap_344822401_345081601_4FGL_J1640.4+3945_daily_bin407.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/832927/ltcube_344822401_345081601_4FGL_J1640.4+3945_daily_bin407.fits
.....................!
real 192.14
user 186.84
sys 4.74

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 205 point sources and 0 extended sources

Setting source of interest to:
4FGL J1640.4+3945 @ 250.119 39.7626

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/832927/ft1_filtered_4FGL_J1640.4+3945_daily_bin407.fits scfile=/scratch/kocevski/832927/ft2_4FGL_J1640.4+3945_daily_bin407.fits outfile=/scratch/kocevski/832927/cmap_344822401_345081601_4FGL_J1640.4+3945_daily_bin407.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=250.119 yref=39.7626 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.39
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/832927/ft1_filtered_4FGL_J1640.4+3945_daily_bin407.fits scfile=/scratch/kocevski/832927/ft2_4FGL_J1640.4+3945_daily_bin407.fits outfile=/scratch/kocevski/832927/cmap_HighResolution_344822401_345081601_4FGL_J1640.4+3945_daily_bin407.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=250.119 yref=39.7626 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.40
sys 0.16

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/832927/ft1_filtered_4FGL_J1640.4+3945_daily_bin407.fits evtable="EVENTS" scfile=/scratch/kocevski/832927/ft2_4FGL_J1640.4+3945_daily_bin407.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/832927/Model_4FGL_J1640.4+3945_daily_bin407.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/832927/ft1_filtered_4FGL_J1640.4+3945_daily_bin407.fits.....................!
real 53.64
user 51.74
sys 1.27

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/832927/ft1_filtered_4FGL_J1640.4+3945_daily_bin407.fits', '/scratch/kocevski/832927/ft2_4FGL_J1640.4+3945_daily_bin407.fits', expMap='/scratch/kocevski/832927/expmap_344822401_345081601_4FGL_J1640.4+3945_daily_bin407.fits', expCube='/scratch/kocevski/832927/ltcube_344822401_345081601_4FGL_J1640.4+3945_daily_bin407.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/832927/Model_4FGL_J1640.4+3945_daily_bin407.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1640.4+3945'

4FGL J1640.4+3945
   Spectrum: PowerLaw
308    Prefactor:  1.345e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-12)
309        Index:  2.421e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
310        Scale:  1.366e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/832927/ft1_filtered_4FGL_J1640.4+3945_daily_bin407.fits
Spacecraft file(s): /scratch/kocevski/832927/ft2_4FGL_J1640.4+3945_daily_bin407.fits
Exposure map: /scratch/kocevski/832927/expmap_344822401_345081601_4FGL_J1640.4+3945_daily_bin407.fits
Exposure cube: /scratch/kocevski/832927/ltcube_344822401_345081601_4FGL_J1640.4+3945_daily_bin407.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/832927/Model_4FGL_J1640.4+3945_daily_bin407.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) = 6725.83227427

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    8.1975       1.0000         .10000E-03   10000.    
     2 'Prefactor '    86.494       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .47571E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .15243E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    1.8782       1.0000         .10000E-03   10000.    
     7 'norm      '    .59402       1.0000         .10000E-03   10000.    
     8 'norm      '    10.840       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10014E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    4.6401       1.0000         .10000E-03   10000.    
    11 'norm      '    .10024E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10008E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    .19986       1.0000         .10000E-03   10000.    
    14 'Prefactor '    6.4142       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .13478E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    4.2375       1.0000         .10000E-03   10000.    
    17 'norm      '    1.6637       1.0000         .10000E-03   10000.    
    18 'Prefactor '    3.7000       1.0000         .10000E-03   10000.    
    19 'norm      '    .89943       1.0000         .10000E-03   10000.    
    20 'norm      '    9.9575       1.0000         .10000E-03   10000.    
    21 'norm      '    1.4292       1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10006E-03   1.0000         .10000E-03   10000.    
    23 'norm      '    .10078E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    10.477       1.0000         .10000E-03   10000.    
    25 'Normalizat'    .67145       1.0000         .10000E-01   10.000    
    26 'Prefactor '    1.1734       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6620E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   6725.826     FROM MIGRAD    STATUS=CONVERGED    631 CALLS     3153 TOTAL
                     EDM=   .49E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .8%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     8.2019        22.825        .23328E-06    .68377E-05
   2  Prefactor     86.506        84.479        .12361E-06    .68588E-04
   3  Prefactor     .10000E-03    .97901       -.10380E-06** at limit **
   4  Prefactor     .10004E-03    4.7661       -.13950E-05** at limit **
   5  Prefactor     .10000E-03    65.293       -.19708E-05** at limit **
   6  Prefactor     1.8781        3.4550        .63404E-06    .13145E-03
   7  norm          .59401        .16216        .89100E-08    .98674E-03
   8  norm          10.840        11.175        .47679E-07    .14985E-04
   9  Prefactor     .10000E-03    17.843       -.21629E-06** at limit **
  10  Prefactor     4.6404        3.0401       -.16339E-07    .16036E-03
  11  norm          .10000E-03    40.682        .27390E-06** at limit **
  12  Prefactor     .10000E-03    .41106       -.29699E-06** at limit **
  13  Prefactor     .19968        .60056        .50684E-06    .76691E-03
  14  Prefactor     6.4141        3.0350        .75626E-08    .49014E-04
  15  Prefactor     .10000E-03    1.3181       -.21603E-06** at limit **
  16  norm          4.2372        1.7888        .16592E-08    .80174E-04
  17  norm          1.6637        .86129       -.68025E-08    .18146E-04
  18  Prefactor     3.6989        7.9807        .50829E-06    .16105E-04
  19  norm          .89932        .81187        .70351E-07    .32867E-04
  20  norm          9.9582        8.0671        .12055E-06   -.90002E-04
  21  norm          1.4291        1.4267        .52815E-07   -.36679E-04
  22  Prefactor     .10000E-03    27.885        .25297E-06** at limit **
  23  norm          .10000E-03    3.7719        .31650E-05** at limit **
  24  Prefactor     10.556        110.63       -.31052E-05   -.31317E-05
  25  Normalizat    .67145        .19440       -.10457E-06    .11886E-03
  26  Prefactor     1.1734        .15719       -.17270E-06    .12718E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 8.20192
  Prefactor  = 86.506
  Prefactor  = 0.0001
  Prefactor  = 0.000100045
  Prefactor  = 0.0001
  Prefactor  = 1.87805
  norm       = 0.594007
  norm       = 10.8398
  Prefactor  = 0.0001
  Prefactor  = 4.64036
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.199678
  Prefactor  = 6.41411
  Prefactor  = 0.0001
  norm       = 4.23722
  norm       = 1.66366
  Prefactor  = 3.69894
  norm       = 0.899318
  norm       = 9.95822
  norm       = 1.42906
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 10.5562
  Normalizat = 0.671453
  Prefactor  = 1.17343
 **********
 **   18 **HESSE 
 **********

 FCN=   6725.826     FROM HESSE     STATUS=OK           468 CALLS     3621 TOTAL
                     EDM=   .29E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     8.2019        22.815        .14003E-03   -1.5135    
   2  Prefactor     86.506        83.939        .43198E-04   -1.3845    
   3  Prefactor     .10000E-03    .98820        .79201E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10004E-03    16.441        .32438E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    66.879        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     1.8781        3.4086        .18853E-03   -1.5434    
   7  norm          .59401        .15789        .15775E-04   -1.5554    
   8  norm          10.840        11.167        .12169E-03   -1.5049    
   9  Prefactor     .10000E-03    18.101        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     4.6404        3.0372        .11154E-03   -1.5277    
  11  norm          .10000E-03    40.709        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    .62112        .96938E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .19968        .56168        .99176E-04   -1.5619    
  14  Prefactor     6.4141        3.0330        .94472E-04   -1.5201    
  15  Prefactor     .10000E-03    5.6501        .17792E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          4.2372        1.7789        .68504E-04   -1.5296    
  17  norm          1.6637        .85678        .51685E-04   -1.5450    
  18  Prefactor     3.6989        7.8076        .20996E-03   -1.5323    
  19  norm          .89932        .76781        .64089E-03   -1.5518    
  20  norm          9.9582        8.0488        .12699E-03   -1.5077    
  21  norm          1.4291        1.4142        .93368E-04   -1.5469    
  22  Prefactor     .10000E-03    27.907        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  norm          .10000E-03    3.6804        .15258E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     10.556        109.91        .12379E-03   -1.5058    
  25  Normalizat    .67145        .22145        .31033E-03   -1.0503    
  26  Prefactor     1.1734        .18255        .20797E-03   -.87153    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.9147e-09
Minuit parameter uncertainties:
  1  22.839
  2  84.0542
  3  1.16916e-08
  4  0.00171235
  5  0.000270438
  6  3.40896
  7  0.157888
  8  11.1693
  9  1.83031e-07
  10  3.03731
  11  0.000202827
  12  1.42545e-05
  13  0.561696
  14  3.03306
  15  1.9203e-05
  16  1.77887
  17  0.856783
  18  7.80975
  19  0.767817
  20  8.04964
  21  1.41424
  22  0.000112644
  23  1.95473e-05
  24  68.2845
  25  0.221742
  26  0.182648
Done.

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

Extracting fit parameters...

4FGL J1640.4+3945
   Spectrum: PowerLaw
308    Prefactor:  1.000e-04  1.425e-05  1.000e-04  1.000e+04 ( 1.000e-12)
309        Index:  2.421e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
310        Scale:  1.366e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
659    Prefactor:  1.173e+00  1.826e-01  0.000e+00  1.000e+01 ( 1.000e+00)
660        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
661        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
658   Normalization:  6.715e-01  2.217e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 250.119 39.763
Photon Flux Upper Limit: 7.31e-08 ph cm-2 s-1
Energy Flux Upper Limit: 5.66e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/832927/likelihoodResults_344822401_345081601_4FGL_J1640.4+3945_daily_bin407.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) = 6725.83371027
delta logL = -0.00763371875109

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 6725.82607352
delta logL = 3.03300748783e-06

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.3908       1.0000          .0000       10.000    
     3 'Normalizat'    .67146       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1734       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6620E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   6725.826     FROM MIGRAD    STATUS=CONVERGED     73 CALLS      236 TOTAL
                     EDM=   .15E-10    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    .72170        .90712E-02** at limit **
   2  Index         1.9520        5.8598        .50000        .47912E-06
   3  Normalizat    .67145        .40430E-02    .70120E-01    .31203E-04
   4  Prefactor     1.1734        .35103E-02    .35292E-01   -.34986E-06
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 1.95201
  Normalizat = 0.671454
  Prefactor  = 1.17343
 **********
 **   18 **HESSE 
 **********

 FCN=   6725.826     FROM HESSE     STATUS=NOT POSDEF    33 CALLS      269 TOTAL
                     EDM=   .20E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    98.642        .14490E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         1.9520        9.0230        .50000       -.65555    
   3  Normalizat    .67145        .54579E-01    .31033E-03   -1.0503    
   4  Prefactor     1.1734        .47370E-01    .20797E-03   -.87153    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 1.97857e-09
Minuit parameter uncertainties:
  1  5.82684e-06
  2  339.94
  3  0.0545832
  4  0.047372
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/832927': 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) = 6725.8260543
delta logL = 2.22546887017e-05

Extracting fit parameters...

4FGL J1640.4+3945
   Spectrum: PowerLaw
308    Prefactor:  1.000e-04  5.827e-06  1.000e-04  1.000e+04 ( 1.000e-12)
309        Index:  1.952e+00  3.399e+02  0.000e+00  1.000e+01 (-1.000e+00)
310        Scale:  1.366e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
659    Prefactor:  1.173e+00  4.737e-02  0.000e+00  1.000e+01 ( 1.000e+00)
660        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
661        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
658   Normalization:  6.715e-01  5.458e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 250.119 39.763

Creating a high resolution counts map...
INFO: Auto-setting vmin to -2.500e-04 [aplpy.core]
INFO: Auto-setting vmax to  2.775e-03 [aplpy.core]
Saving /scratch/kocevski/832927/cmap_HighResolution_344822401_345081601_4FGL_J1640.4+3945_daily_bin407.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='5.66e-03', job_status='DONE', photon_flux_upper_limit='7.31e-08', time_completed='2021-09-15 06:41:27.414479', job_id='832927', GAL2='1.17', fit_tolerance='1e-08', EG2='0.67', EG='0.67', time_epoch_completed='1631713287.41', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.17', dlogl='2.23e-05', ts2='-0.00', photon_index_error='0.00', photon_index='2.42' WHERE bin_id='407' AND source_name='4FGL J1640.4+3945' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Wed Sep 15 06:41:27 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0205>
Subject: Job 832927: <4FGL_J1640.4+3945_daily_bin407> in cluster <slac> Done

Job <4FGL_J1640.4+3945_daily_bin407> was submitted from host <rhel6-64n> by user <kocevski> in cluster <slac> at Wed Sep 15 06:25:21 2021
Job was executed on host(s) <bullet0205>, in queue <medium>, as user <kocevski> in cluster <slac> at Wed Sep 15 06:26:35 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Wed Sep 15 06:26:35 2021
Terminated at Wed Sep 15 06:41:28 2021
Results reported at Wed Sep 15 06:41:28 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1640.4+3945_daily_bin407 250.119 39.7626 344822401 345081601 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1640.4+3945 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   871.37 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             357.27 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   892 sec.
    Turnaround time :                            967 sec.

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

