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


Performing analysis on: 4FGL_J1640.4+3945_daily_bin980
RA = 250.119, Dec = 39.7626
tmin = 493344001, tmax = 493603201
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='836984', job_status='RUN', time_executed='2021-09-15 06:43:01.546077', time_epoch_executed='1631713381.55' WHERE source_name='4FGL J1640.4+3945' and cadence='daily' and bin_id='980'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/836984

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/836984/ft1_4FGL_J1640.4+3945_daily_bin980.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/836984/ft2_4FGL_J1640.4+3945_daily_bin980.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/836984/ft1_4FGL_J1640.4+3945_daily_bin980.fits outfile=/scratch/kocevski/836984/ft1_filteredMKT_4FGL_J1640.4+3945_daily_bin980.fits ra=250.119 dec=39.7626 rad=12.0 tmin=493344001.0 tmax=493603201.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.54
user 4.28
sys 0.24

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/836984/ft2_4FGL_J1640.4+3945_daily_bin980.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/836984/ft1_filteredMKT_4FGL_J1640.4+3945_daily_bin980.fits evtable="EVENTS" outfile="/scratch/kocevski/836984/ft1_filtered_4FGL_J1640.4+3945_daily_bin980.fits" apply_filter=yes overwrite=yes header_obstimes=yes tstart=0.0 tstop=0.0 gtifile="default" chatter=3 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

This is gtmktime version HEAD
Applying GTI filter:
IN_SAA!=T && LIVETIME>0 && gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nogrb.gti',(START+STOP)/2) && (angsep(RA_SUN,DEC_SUN,RA_ZENITH,DEC_ZENITH)>115 || gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nosolarflares.gti',(START+STOP)/2))
real 0.51
user 0.33
sys 0.16

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/836984/ft1_filtered_4FGL_J1640.4+3945_daily_bin980.fits" evtable="EVENTS" scfile=/scratch/kocevski/836984/ft2_4FGL_J1640.4+3945_daily_bin980.fits sctable="SC_DATA" outfile=/scratch/kocevski/836984/ltcube_493344001_493603201_4FGL_J1640.4+3945_daily_bin980.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/836984/ft2_4FGL_J1640.4+3945_daily_bin980.fits
.....................!
real 12.52
user 12.15
sys 0.34

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/836984/ft1_filtered_4FGL_J1640.4+3945_daily_bin980.fits evtable="EVENTS" scfile=/scratch/kocevski/836984/ft2_4FGL_J1640.4+3945_daily_bin980.fits sctable="SC_DATA" expcube=/scratch/kocevski/836984/ltcube_493344001_493603201_4FGL_J1640.4+3945_daily_bin980.fits outfile=/scratch/kocevski/836984/expmap_493344001_493603201_4FGL_J1640.4+3945_daily_bin980.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/836984/ltcube_493344001_493603201_4FGL_J1640.4+3945_daily_bin980.fits
.....................!
real 192.97
user 187.69
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 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/836984/ft1_filtered_4FGL_J1640.4+3945_daily_bin980.fits scfile=/scratch/kocevski/836984/ft2_4FGL_J1640.4+3945_daily_bin980.fits outfile=/scratch/kocevski/836984/cmap_493344001_493603201_4FGL_J1640.4+3945_daily_bin980.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.54
user 0.39
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/836984/ft1_filtered_4FGL_J1640.4+3945_daily_bin980.fits scfile=/scratch/kocevski/836984/ft2_4FGL_J1640.4+3945_daily_bin980.fits outfile=/scratch/kocevski/836984/cmap_HighResolution_493344001_493603201_4FGL_J1640.4+3945_daily_bin980.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.55
user 0.38
sys 0.16

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

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/836984/ft1_filtered_4FGL_J1640.4+3945_daily_bin980.fits', '/scratch/kocevski/836984/ft2_4FGL_J1640.4+3945_daily_bin980.fits', expMap='/scratch/kocevski/836984/expmap_493344001_493603201_4FGL_J1640.4+3945_daily_bin980.fits', expCube='/scratch/kocevski/836984/ltcube_493344001_493603201_4FGL_J1640.4+3945_daily_bin980.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/836984/Model_4FGL_J1640.4+3945_daily_bin980.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/836984/ft1_filtered_4FGL_J1640.4+3945_daily_bin980.fits
Spacecraft file(s): /scratch/kocevski/836984/ft2_4FGL_J1640.4+3945_daily_bin980.fits
Exposure map: /scratch/kocevski/836984/expmap_493344001_493603201_4FGL_J1640.4+3945_daily_bin980.fits
Exposure cube: /scratch/kocevski/836984/ltcube_493344001_493603201_4FGL_J1640.4+3945_daily_bin980.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/836984/Model_4FGL_J1640.4+3945_daily_bin980.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) = 7725.35791307

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

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 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    4.9533       1.0000         .10000E-03   10000.    
     4 'Prefactor '    1.8245       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    4.7107       1.0000         .10000E-03   10000.    
     7 'norm      '    .45863       1.0000         .10000E-03   10000.    
     8 'norm      '    10.219       1.0000         .10000E-03   10000.    
     9 'Prefactor '    17.614       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    11 'norm      '    .10013E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    1.6153       1.0000         .10000E-03   10000.    
    13 'Prefactor '    1.6617       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .15993       1.0000         .10000E-03   10000.    
    15 'Prefactor '    2.4069       1.0000         .10000E-03   10000.    
    16 'norm      '    4.4137       1.0000         .10000E-03   10000.    
    17 'norm      '    .27825       1.0000         .10000E-03   10000.    
    18 'Prefactor '    2.7232       1.0000         .10000E-03   10000.    
    19 'norm      '    .56743       1.0000         .10000E-03   10000.    
    20 'norm      '    8.9418       1.0000         .10000E-03   10000.    
    21 'norm      '    .10005E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10007E-03   1.0000         .10000E-03   10000.    
    23 'norm      '    6.9330       1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    25 'Normalizat'    .94941       1.0000         .10000E-01   10.000    
    26 'Prefactor '    .97556       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=   7725.312     FROM MIGRAD    STATUS=CONVERGED    625 CALLS     2695 TOTAL
                     EDM=   .40E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.5%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    35.983        .49141E-06** at limit **
   2  Prefactor     .10000E-03    14.736        .45733E-06** at limit **
   3  Prefactor     4.9539        3.3602        .12847E-06   -.43860E-04
   4  Prefactor     1.8242        3.9106        .69482E-06   -.16596E-03
   5  Prefactor     .10000E-03    9.7305       -.10481E-06** at limit **
   6  Prefactor     4.7113        2.8671        .27510E-07   -.94500E-04
   7  norm          .45865        .15905        .24452E-08   -.34994E-03
   8  norm          10.220        11.490        .32601E-06   -.47168E-04
   9  Prefactor     17.617        15.805        .81130E-07   -.19753E-04
  10  Prefactor     .10000E-03    1.4967       -.31503E-07** at limit **
  11  norm          .10000E-03    51.920       -.55517E-07** at limit **
  12  Prefactor     1.6154        1.4790       -.53477E-07   -.14347E-03
  13  Prefactor     1.6616        1.6737        .11570E-06   -.25865E-03
  14  Prefactor     .18017        1.3889        .33080E-06   -.98345E-03
  15  Prefactor     2.4074        2.3059       -.22206E-07   -.17475E-03
  16  norm          4.4141        2.0095       -.95646E-08   -.10336E-03
  17  norm          .27756        .52285        .47150E-06    .45818E-03
  18  Prefactor     2.7273        6.5785        .12949E-07   -.19188E-03
  19  norm          .56683        .80906        .23792E-06   -.16331E-03
  20  norm          8.9435        7.4500       -.72676E-07   -.12135E-03
  21  norm          .10000E-03    .74041        .27128E-07** at limit **
  22  Prefactor     .10000E-03    54.845       -.42079E-06** at limit **
  23  norm          6.9341        4.8795        .49002E-07    .10137E-03
  24  Prefactor     .10000E-03    15.552       -.52267E-06** at limit **
  25  Normalizat    .94925        .18649       -.92052E-06   -.21782E-03
  26  Prefactor     .97561        .14820        .25908E-07   -.24368E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.000100001
  Prefactor  = 4.95393
  Prefactor  = 1.82416
  Prefactor  = 0.0001
  Prefactor  = 4.71131
  norm       = 0.458649
  norm       = 10.2197
  Prefactor  = 17.6168
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 1.61544
  Prefactor  = 1.66159
  Prefactor  = 0.180169
  Prefactor  = 2.40742
  norm       = 4.4141
  norm       = 0.277565
  Prefactor  = 2.72727
  norm       = 0.566834
  norm       = 8.94353
  norm       = 0.0001
  Prefactor  = 0.000100001
  norm       = 6.93405
  Prefactor  = 0.000100001
  Normalizat = 0.949253
  Prefactor  = 0.97561
 **********
 **   18 **HESSE 
 **********

 FCN=   7725.312     FROM HESSE     STATUS=OK           470 CALLS     3165 TOTAL
                     EDM=   .76E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    36.477        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    14.829        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     4.9539        3.3540        .12658E-03   -1.5263    
   4  Prefactor     1.8242        3.8404        .24260E-03   -1.5438    
   5  Prefactor     .10000E-03    9.7557        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     4.7113        2.8675        .11036E-03   -1.5274    
   7  norm          .45865        .15856        .18289E-04   -1.5573    
   8  norm          10.220        11.467        .62671E-03   -1.5068    
   9  Prefactor     17.617        15.834        .95431E-04   -1.4868    
  10  Prefactor     .10000E-03    1.5208        .10491E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  norm          .10000E-03    52.307        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     1.6154        1.4839        .33315E-04   -1.5454    
  13  Prefactor     1.6616        1.6432        .78498E-04   -1.5450    
  14  Prefactor     .18017        10.994        .18749E-02   -1.5623    
  15  Prefactor     2.4074        2.2942        .12327E-03   -1.5398    
  16  norm          4.4141        2.0029        .79540E-04   -1.5288    
  17  norm          .27756        .50679        .93143E-03   -1.5603    
  18  Prefactor     2.7273        6.3531        .24678E-03   -1.5378    
  19  norm          .56683        .73838        .85977E-03   -1.5557    
  20  norm          8.9435        7.4391        .13404E-03   -1.5110    
  21  norm          .10000E-03    .76456        .14740E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     .10000E-03    55.154        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  norm          6.9341        4.8820        .15237E-03   -1.5181    
  24  Prefactor     .10000E-03    15.676        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Normalizat    .94925        .21928        .27752E-03   -.94750    
  26  Prefactor     .97561        .17610        .23053E-03   -.93547    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 7.58504e-09
Minuit parameter uncertainties:
  1  0.000241928
  2  0.000178127
  3  3.35413
  4  3.84094
  5  5.37504e-06
  6  2.86757
  7  0.158558
  8  11.469
  9  15.8379
  10  3.00031e-06
  11  1.53499e-05
  12  1.48394
  13  1.6432
  14  2.81455
  15  2.29433
  16  2.00288
  17  0.506799
  18  6.35469
  19  0.738396
  20  7.43991
  21  1.14987e-06
  22  0.000334186
  23  4.88227
  24  0.000212219
  25  0.219487
  26  0.176206
Done.

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

Extracting fit parameters...

4FGL J1640.4+3945
   Spectrum: PowerLaw
308    Prefactor:  1.615e+00  1.484e+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

GAL_V02
   Spectrum: PowerLaw
659    Prefactor:  9.756e-01  1.762e-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:  9.493e-01  2.195e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 6.15
Ra Dec: 250.119 39.763
Photon Index (Fixed Index): 2.42 +/- 0.00
Photon Flux (Fixed Index): 6.38e-08 +/- 5.86e-08
Energy Flux (Fixed Index): 2.03e-05 +/- 1.87e-05

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) = 7725.3112153
delta logL = 0.00030612520186

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 7725.31100906
delta logL = 0.00051235961655

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    1.5915       1.0000         .10000E-03   10000.    
     2 'Index     '    2.4415       1.0000          .0000       10.000    
     3 'Normalizat'    .94773       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .97641       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=   7725.311     FROM MIGRAD    STATUS=CONVERGED     53 CALLS      208 TOTAL
                     EDM=   .19E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     1.5915        23.336        .84082E-03    .99202E-03
   2  Index         2.4415        3.5433        .13095        .14657E-03
   3  Normalizat    .94769        .96946E-01    .45509E-01    .10799E-03
   4  Prefactor     .97641        .55771E-01    .45972E-01    .95159E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 1.59148
  Index      = 2.44154
  Normalizat = 0.947695
  Prefactor  = 0.976406
 **********
 **   18 **HESSE 
 **********

 FCN=   7725.311     FROM HESSE     STATUS=OK            33 CALLS      241 TOTAL
                     EDM=   .76E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     1.5915        1.4059        .33633E-04   -1.5456    
   2  Index         2.4415        .67333        .70864E-02   -.53715    
   3  Normalizat    .94769        .21387        .27770E-03   -.94804    
   4  Prefactor     .97641        .17595        .23043E-03   -.93520    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 7.62705e-09
Minuit parameter uncertainties:
  1  1.40592
  2  0.676113
  3  0.214062
  4  0.176051
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/836984': 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) = 7725.31100898
delta logL = 0.000512437458383

Extracting fit parameters...

4FGL J1640.4+3945
   Spectrum: PowerLaw
308    Prefactor:  1.591e+00  1.406e+00  1.000e-04  1.000e+04 ( 1.000e-12)
309        Index:  2.442e+00  6.761e-01  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:  9.764e-01  1.761e-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:  9.477e-01  2.141e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 6.35
Ra Dec: 250.119 39.763
Photon Index (Free Index): 2.44 +/- 0.68
Photon Flux (Free Index): 6.53e-08 +/- 6.46e-08
Energy Flux (Free Index): 2.03e-05 +/- 1.38e-05

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/836984/cmap_HighResolution_493344001_493603201_4FGL_J1640.4+3945_daily_bin980.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='6.38e-08', energy_flux2='2.03e-05', photon_flux_error='5.86e-08', dlogl='5.12e-04', energy_flux='2.03e-05', photon_flux2='6.53e-08', job_status='DONE', time_completed='2021-09-15 06:55:55.339393', photon_index_error2='0.68', photon_index2='2.44', ts='6.15', fit_tolerance='1e-08', GAL='0.98', photon_index_error='0.00', energy_flux_error2='1.38e-05', EG='0.95', time_epoch_completed='1631714155.34', return_code='0', job_id='836984', GAL2='0.98', EG2='0.95', return_code2='0', energy_flux_error='1.87e-05', photon_flux_error2='6.46e-08', ts2='6.35', photon_index='2.42' WHERE bin_id='980' AND source_name='4FGL J1640.4+3945' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Wed Sep 15 06:55:55 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0031>
Subject: Job 836984: <4FGL_J1640.4+3945_daily_bin980> in cluster <slac> Done

Job <4FGL_J1640.4+3945_daily_bin980> was submitted from host <rhel6-64p> by user <kocevski> in cluster <slac> at Wed Sep 15 06:40:19 2021
Job was executed on host(s) <bullet0031>, in queue <medium>, as user <kocevski> in cluster <slac> at Wed Sep 15 06:42:46 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:42:46 2021
Terminated at Wed Sep 15 06:55:55 2021
Results reported at Wed Sep 15 06:55:55 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1640.4+3945_daily_bin980 250.119 39.7626 493344001 493603201 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 :                                   768.19 sec.
    Max Memory :                                 1095 MB
    Average Memory :                             326.44 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   789 sec.
    Turnaround time :                            936 sec.

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

