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


Performing analysis on: 4FGL_J1640.4+3945_daily_bin226
RA = 250.119, Dec = 39.7626
tmin = 297907201, tmax = 298166401
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='831576', job_status='RUN', time_executed='2021-09-15 06:20:53.219394', time_epoch_executed='1631712053.22' WHERE source_name='4FGL J1640.4+3945' and cadence='daily' and bin_id='226'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/831576

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/831576/ft1_4FGL_J1640.4+3945_daily_bin226.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/831576/ft2_4FGL_J1640.4+3945_daily_bin226.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/831576/ft1_4FGL_J1640.4+3945_daily_bin226.fits outfile=/scratch/kocevski/831576/ft1_filteredMKT_4FGL_J1640.4+3945_daily_bin226.fits ra=250.119 dec=39.7626 rad=12.0 tmin=297907201.0 tmax=298166401.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.62
user 3.38
sys 0.21

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/831576/ft1_filtered_4FGL_J1640.4+3945_daily_bin226.fits" evtable="EVENTS" scfile=/scratch/kocevski/831576/ft2_4FGL_J1640.4+3945_daily_bin226.fits sctable="SC_DATA" outfile=/scratch/kocevski/831576/ltcube_297907201_298166401_4FGL_J1640.4+3945_daily_bin226.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/831576/ft2_4FGL_J1640.4+3945_daily_bin226.fits
.....................!
real 14.99
user 14.55
sys 0.36

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/831576/ft1_filtered_4FGL_J1640.4+3945_daily_bin226.fits evtable="EVENTS" scfile=/scratch/kocevski/831576/ft2_4FGL_J1640.4+3945_daily_bin226.fits sctable="SC_DATA" expcube=/scratch/kocevski/831576/ltcube_297907201_298166401_4FGL_J1640.4+3945_daily_bin226.fits outfile=/scratch/kocevski/831576/expmap_297907201_298166401_4FGL_J1640.4+3945_daily_bin226.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/831576/ltcube_297907201_298166401_4FGL_J1640.4+3945_daily_bin226.fits
.....................!
real 193.75
user 187.86
sys 5.23

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/831576/ft1_filtered_4FGL_J1640.4+3945_daily_bin226.fits scfile=/scratch/kocevski/831576/ft2_4FGL_J1640.4+3945_daily_bin226.fits outfile=/scratch/kocevski/831576/cmap_297907201_298166401_4FGL_J1640.4+3945_daily_bin226.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.38
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/831576/ft1_filtered_4FGL_J1640.4+3945_daily_bin226.fits scfile=/scratch/kocevski/831576/ft2_4FGL_J1640.4+3945_daily_bin226.fits outfile=/scratch/kocevski/831576/cmap_HighResolution_297907201_298166401_4FGL_J1640.4+3945_daily_bin226.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.57
user 0.39
sys 0.17

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    23.786       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .15277E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    2.6520       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .11040E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .11599E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    8.4491       1.0000         .10000E-03   10000.    
     7 'norm      '    .42506       1.0000         .10000E-03   10000.    
     8 'norm      '    9.1698       1.0000         .10000E-03   10000.    
     9 'Prefactor '    11.052       1.0000         .10000E-03   10000.    
    10 'Prefactor '    25.341       1.0000         .10000E-03   10000.    
    11 'norm      '    42.992       1.0000         .10000E-03   10000.    
    12 'Prefactor '    3.9311       1.0000         .10000E-03   10000.    
    13 'Prefactor '    3.3130       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10008E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10056E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    3.3015       1.0000         .10000E-03   10000.    
    17 'norm      '    2.1050       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10398E-03   1.0000         .10000E-03   10000.    
    19 'norm      '    .37967       1.0000         .10000E-03   10000.    
    20 'norm      '    11.281       1.0000         .10000E-03   10000.    
    21 'norm      '    .97485       1.0000         .10000E-03   10000.    
    22 'Prefactor '    .15521E-03   1.0000         .10000E-03   10000.    
    23 'norm      '    .38282E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    .15383E-01   1.0000         .10000E-03   10000.    
    25 'Normalizat'    1.1323       1.0000         .10000E-01   10.000    
    26 'Prefactor '    .85233       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=   8240.779     FROM MIGRAD    STATUS=CONVERGED    638 CALLS     3129 TOTAL
                     EDM=   .46E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .3%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     23.768        25.601        .22644E-04   -.14450E-04
   2  Prefactor     .10000E-03    57.712       -.37902E-05** at limit **
   3  Prefactor     2.6539        3.2735        .65151E-07   -.64390E-03
   4  Prefactor     .10000E-03    5.6485        .55428E-07** at limit **
   5  Prefactor     .10000E-03    44.291        .17576E-05** at limit **
   6  Prefactor     8.4524        3.7272       -.37875E-06   -.18723E-03
   7  norm          .42508        .15395        .44075E-09   -.70336E-03
   8  norm          9.1696        9.3004       -.34128E-08    .30782E-04
   9  Prefactor     11.043        14.260        .22467E-05   -.24986E-04
  10  Prefactor     25.339        5.8216        .12816E-06   -.53518E-04
  11  norm          42.889        42.136        .31592E-04    .11555E-04
  12  Prefactor     3.9315        1.8935       -.35989E-06   -.58482E-03
  13  Prefactor     3.3135        1.8178       -.34490E-06   -.77974E-03
  14  Prefactor     .10000E-03    .82933        .69036E-07** at limit **
  15  Prefactor     .10000E-03    1.2034       -.30735E-06** at limit **
  16  norm          3.3010        1.4751       -.50594E-08    .10774E-03
  17  norm          2.1058        .97503        .70639E-07   -.44230E-03
  18  Prefactor     .10000E-03    3.4951       -.84705E-07** at limit **
  19  norm          .37975        .43188        .39835E-07   -.24819E-03
  20  norm          11.272        8.2570        .66364E-06    .18453E-03
  21  norm          .97333        1.3784        .12744E-06   -.53464E-03
  22  Prefactor     .10000E-03    16.977        .76237E-08** at limit **
  23  norm          .10000E-03    2.5248        .99496E-06** at limit **
  24  Prefactor     .10005E-03    521.13       -.16001E-03** at limit **
  25  Normalizat    1.1323        .18803       -.28764E-05    .25263E-03
  26  Prefactor     .85226        .14642       -.53490E-06    .13735E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 23.7676
  Prefactor  = 0.0001
  Prefactor  = 2.65394
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 8.45242
  norm       = 0.42508
  norm       = 9.16959
  Prefactor  = 11.0426
  Prefactor  = 25.3385
  norm       = 42.8886
  Prefactor  = 3.9315
  Prefactor  = 3.31348
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 3.30095
  norm       = 2.10578
  Prefactor  = 0.0001
  norm       = 0.379749
  norm       = 11.2715
  norm       = 0.97333
  Prefactor  = 0.0001
  norm       = 0.000100003
  Prefactor  = 0.00010005
  Normalizat = 1.13225
  Prefactor  = 0.852265
 **********
 **   18 **HESSE 
 **********

 FCN=   8240.779     FROM HESSE     STATUS=OK           466 CALLS     3595 TOTAL
                     EDM=   .11E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     23.768        25.585        .82133E-04   -1.4733    
   2  Prefactor     .10000E-03    57.827        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     2.6539        3.2636        .17355E-03   -1.5382    
   4  Prefactor     .10000E-03    5.7641        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    44.857        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     8.4524        3.7330        .11048E-03   -1.5126    
   7  norm          .42508        .15333        .19501E-04   -1.5578    
   8  norm          9.1696        9.3024        .13235E-03   -1.5102    
   9  Prefactor     11.043        14.251        .12051E-03   -1.5043    
  10  Prefactor     25.339        5.8345        .79577E-04   -1.4701    
  11  norm          42.889        42.175        .61141E-04   -1.4397    
  12  Prefactor     3.9315        1.9617        .61114E-04   -1.5311    
  13  Prefactor     3.3135        1.8785        .64783E-04   -1.5344    
  14  Prefactor     .10000E-03    .83410        .80695E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .10000E-03    1.2292        .97143E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          3.3010        1.4761        .71481E-04   -1.5345    
  17  norm          2.1058        .97111        .58076E-04   -1.5418    
  18  Prefactor     .10000E-03    3.5379        .16555E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  norm          .37975        .40074        .61525E-03   -1.5585    
  20  norm          11.272        8.1066        .11928E-03   -1.5036    
  21  norm          .97333        1.2148        .12084E-02   -1.5511    
  22  Prefactor     .10000E-03    16.991        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  norm          .10000E-03    9.5781        .27230E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     .10005E-03    527.12        .36399E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Normalizat    1.1323        .22410        .28058E-03   -.88723    
  26  Prefactor     .85226        .17434        .25793E-03   -.97830    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.14405e-09
Minuit parameter uncertainties:
  1  25.597
  2  6.33684e-05
  3  3.26383
  4  2.05066e-05
  5  0.000111341
  6  3.73308
  7  0.153329
  8  9.30391
  9  14.2558
  10  5.8346
  11  42.2046
  12  1.96169
  13  1.87857
  14  1.76528e-06
  15  4.09063e-05
  16  1.47609
  17  0.971122
  18  1.21894e-05
  19  0.400744
  20  8.10739
  21  1.21484
  22  1.53724e-05
  23  0.000312625
  24  0.0103147
  25  0.224284
  26  0.17445
Done.

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

Extracting fit parameters...

4FGL J1640.4+3945
   Spectrum: PowerLaw
308    Prefactor:  3.932e+00  1.962e+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:  8.523e-01  1.745e-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:  1.132e+00  2.243e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 15.85
Ra Dec: 250.119 39.763
Photon Index (Fixed Index): 2.42 +/- 0.00
Photon Flux (Fixed Index): 1.55e-07 +/- 7.74e-08
Energy Flux (Fixed Index): 4.95e-05 +/- 2.47e-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) = 8239.67355254
delta logL = 1.10544031448

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 8239.67080982
delta logL = 1.10818303088

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    6.0518       1.0000         .10000E-03   10000.    
     2 'Index     '    1.9859       1.0000          .0000       10.000    
     3 'Normalizat'    1.1737       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .83105       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=   8239.671     FROM MIGRAD    STATUS=CONVERGED     45 CALLS      240 TOTAL
                     EDM=   .13E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     6.0518        38.190        .40803E-02    .18011E-02
   2  Index         1.9859        2.7306        .12883        .14591E-03
   3  Normalizat    1.1737        .13731        .62581E-01    .36540E-04
   4  Prefactor     .83104        .75995E-01    .44120E-01    .30424E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 6.05185
  Index      = 1.98592
  Normalizat = 1.17367
  Prefactor  = 0.831037
 **********
 **   18 **HESSE 
 **********

 FCN=   8239.671     FROM HESSE     STATUS=OK            33 CALLS      273 TOTAL
                     EDM=   .23E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     6.0518        2.4337        .81013E-04   -1.5216    
   2  Index         1.9859        .28205        .48906E-02   -.64703    
   3  Normalizat    1.1737        .21354        .27681E-03   -.87420    
   4  Prefactor     .83104        .17174        .26097E-03   -.98594    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.34342e-10
Minuit parameter uncertainties:
  1  2.4337
  2  0.28229
  3  0.213696
  4  0.171853
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/831576': 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) = 8239.67080982
delta logL = 1.10818303473

Extracting fit parameters...

4FGL J1640.4+3945
   Spectrum: PowerLaw
308    Prefactor:  6.052e+00  2.434e+00  1.000e-04  1.000e+04 ( 1.000e-12)
309        Index:  1.986e+00  2.823e-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:  8.310e-01  1.719e-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:  1.174e+00  2.137e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 18.97
Ra Dec: 250.119 39.763
Photon Index (Free Index): 1.99 +/- 0.28
Photon Flux (Free Index): 1.10e-07 +/- 5.35e-08
Energy Flux (Free Index): 7.89e-05 +/- 4.32e-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/831576/cmap_HighResolution_297907201_298166401_4FGL_J1640.4+3945_daily_bin226.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='1.55e-07', energy_flux2='7.89e-05', photon_flux_error='7.74e-08', dlogl='1.11e+00', energy_flux='4.95e-05', photon_flux2='1.10e-07', job_status='DONE', time_completed='2021-09-15 06:35:22.078587', photon_index_error2='0.28', photon_index2='1.99', ts='15.85', fit_tolerance='1e-08', GAL='0.85', photon_index_error='0.00', energy_flux_error2='4.32e-05', EG='1.13', time_epoch_completed='1631712922.08', return_code='0', job_id='831576', GAL2='0.83', EG2='1.17', return_code2='0', energy_flux_error='2.47e-05', photon_flux_error2='5.35e-08', ts2='18.97', photon_index='2.42' WHERE bin_id='226' AND source_name='4FGL J1640.4+3945' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Wed Sep 15 06:35:22 PDT 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0131>
Subject: Job 831576: <4FGL_J1640.4+3945_daily_bin226> in cluster <slac> Done

Job <4FGL_J1640.4+3945_daily_bin226> was submitted from host <rhel6-64f> by user <kocevski> in cluster <slac> at Wed Sep 15 06:20:21 2021
Job was executed on host(s) <bullet0131>, in queue <medium>, as user <kocevski> in cluster <slac> at Wed Sep 15 06:20:41 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:20:41 2021
Terminated at Wed Sep 15 06:35:22 2021
Results reported at Wed Sep 15 06:35:22 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1640.4+3945_daily_bin226 250.119 39.7626 297907201 298166401 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 :                                   865.41 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             361.32 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   883 sec.
    Turnaround time :                            901 sec.

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

