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


Performing analysis on: 4FGL_J1640.4+3945_daily_bin35
RA = 250.119, Dec = 39.7626
tmin = 248400001, tmax = 248659201
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='827574', job_status='RUN', time_executed='2021-09-15 06:08:30.858806', time_epoch_executed='1631711310.86' WHERE source_name='4FGL J1640.4+3945' and cadence='daily' and bin_id='35'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/827574

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/827574/ft1_4FGL_J1640.4+3945_daily_bin35.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/827574/ft2_4FGL_J1640.4+3945_daily_bin35.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/827574/ft1_4FGL_J1640.4+3945_daily_bin35.fits outfile=/scratch/kocevski/827574/ft1_filteredMKT_4FGL_J1640.4+3945_daily_bin35.fits ra=250.119 dec=39.7626 rad=12.0 tmin=248400001.0 tmax=248659201.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 1.43
user 1.24
sys 0.17

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/827574/ft1_filtered_4FGL_J1640.4+3945_daily_bin35.fits evtable="EVENTS" scfile=/scratch/kocevski/827574/ft2_4FGL_J1640.4+3945_daily_bin35.fits sctable="SC_DATA" expcube=/scratch/kocevski/827574/ltcube_248400001_248659201_4FGL_J1640.4+3945_daily_bin35.fits outfile=/scratch/kocevski/827574/expmap_248400001_248659201_4FGL_J1640.4+3945_daily_bin35.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/827574/ltcube_248400001_248659201_4FGL_J1640.4+3945_daily_bin35.fits
.....................!
real 192.04
user 186.74
sys 4.81

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/827574/ft1_filtered_4FGL_J1640.4+3945_daily_bin35.fits scfile=/scratch/kocevski/827574/ft2_4FGL_J1640.4+3945_daily_bin35.fits outfile=/scratch/kocevski/827574/cmap_248400001_248659201_4FGL_J1640.4+3945_daily_bin35.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.56
user 0.38
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/827574/ft1_filtered_4FGL_J1640.4+3945_daily_bin35.fits scfile=/scratch/kocevski/827574/ft2_4FGL_J1640.4+3945_daily_bin35.fits outfile=/scratch/kocevski/827574/cmap_HighResolution_248400001_248659201_4FGL_J1640.4+3945_daily_bin35.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.54
user 0.37
sys 0.17

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    10.300       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10150E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    1.9858       1.0000         .10000E-03   10000.    
     4 'Prefactor '    5.0886       1.0000         .10000E-03   10000.    
     5 'Prefactor '    16.375       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     7 'norm      '    .64343       1.0000         .10000E-03   10000.    
     8 'norm      '    .10050E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    1.5025       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .87232E-02   1.0000         .10000E-03   10000.    
    11 'norm      '    .49387E-02   1.0000         .10000E-03   10000.    
    12 'Prefactor '    2.3567       1.0000         .10000E-03   10000.    
    13 'Prefactor '    .33390E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    5.0283       1.0000         .10000E-03   10000.    
    15 'Prefactor '    3.0466       1.0000         .10000E-03   10000.    
    16 'norm      '    1.8788       1.0000         .10000E-03   10000.    
    17 'norm      '    .10031E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    3.0621       1.0000         .10000E-03   10000.    
    19 'norm      '    .10057E-03   1.0000         .10000E-03   10000.    
    20 'norm      '    .10694E-03   1.0000         .10000E-03   10000.    
    21 'norm      '    .13453       1.0000         .10000E-03   10000.    
    22 'Prefactor '    .13434E-03   1.0000         .10000E-03   10000.    
    23 'norm      '    .18854       1.0000         .10000E-03   10000.    
    24 'Prefactor '    78.957       1.0000         .10000E-03   10000.    
    25 'Normalizat'    1.0655       1.0000         .10000E-01   10.000    
    26 'Prefactor '    1.0582       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.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   5473.361     FROM MIGRAD    STATUS=CONVERGED   1216 CALLS     4233 TOTAL
                     EDM=   .25E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     10.297        26.695        .12485E-03    .51905E-05
   2  Prefactor     .10000E-03    375.60        .18142E-02** at limit **
   3  Prefactor     1.9852        3.5134        .17596E-03   -.13116E-04
   4  Prefactor     5.0807        7.3953        .17824E-03    .38972E-04
   5  Prefactor     16.389        18.738        .98976E-04    .49736E-04
   6  Prefactor     .10000E-03    2.3995        .11061E-02** at limit **
   7  norm          .64335        .23643        .17947E-04   -.49663E-03
   8  norm          .10000E-03    8.4276        .18142E-02** at limit **
   9  Prefactor     1.5031        113.71        .17463E-02   -.19035E-04
  10  Prefactor     .10000E-03    7.9793        .41045E-01** at limit **
  11  norm          .27311        46.173        .15239        .80244E-04
  12  Prefactor     2.3527        1.5945        .66274E-04   -.25937E-03
  13  Prefactor     .10000E-03    5.5908        .11743E-02** at limit **
  14  Prefactor     5.0285        4.1608        .12985E-03    .21940E-03
  15  Prefactor     3.0396        4.6617        .17444E-03    .61263E-04
  16  norm          1.8785        1.4271        .74405E-04   -.85565E-05
  17  norm          .10000E-03    .60633        .96052E-03** at limit **
  18  Prefactor     3.0732        9.9897        .23183E-03    .10406E-03
  19  norm          .10000E-03    .67798        .96078E-03** at limit **
  20  norm          .10000E-03    8.2838        .18142E-02** at limit **
  21  norm          .13337        6.6833        .14778E-02   -.66918E-03
  22  Prefactor     .10000E-03    40.960        .18142E-02** at limit **
  23  norm          .19857        83.115        .27696E-02    .86312E-04
  24  Prefactor     78.982        113.44        .45196E-04    .11390E-03
  25  Normalizat    1.0657        .28278        .28172E-03    .74090E-04
  26  Prefactor     1.0581        .21286        .23114E-03    .36709E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 10.2966
  Prefactor  = 0.000100001
  Prefactor  = 1.98523
  Prefactor  = 5.08074
  Prefactor  = 16.3894
  Prefactor  = 0.0001
  norm       = 0.643349
  norm       = 0.0001
  Prefactor  = 1.50311
  Prefactor  = 0.000100004
  norm       = 0.273112
  Prefactor  = 2.35268
  Prefactor  = 0.000100001
  Prefactor  = 5.02847
  Prefactor  = 3.03958
  norm       = 1.87852
  norm       = 0.0001
  Prefactor  = 3.0732
  norm       = 0.0001
  norm       = 0.0001
  norm       = 0.133368
  Prefactor  = 0.0001
  norm       = 0.198571
  Prefactor  = 78.9824
  Normalizat = 1.06565
  Prefactor  = 1.05812
 **********
 **   18 **HESSE 
 **********

 FCN=   5473.361     FROM HESSE     STATUS=OK           456 CALLS     4689 TOTAL
                     EDM=   .28E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     10.297        26.690        .49938E-05   -1.5066    
   2  Prefactor     .10000E-03    375.84        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     1.9852        3.5123        .70385E-05   -1.5426    
   4  Prefactor     5.0807        7.3946        .71296E-05   -1.5257    
   5  Prefactor     16.389        18.737        .19795E-04   -1.4898    
   6  Prefactor     .10000E-03    2.4003        .22122E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  norm          .64335        .23485        .71788E-06   -1.5548    
   8  norm          .10000E-03    8.4281        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     1.5031        111.32        .69853E-04   -1.5463    
  10  Prefactor     .10000E-03    5.8796        .49858E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  norm          .27311        46.258        .15213       -1.5603    
  12  Prefactor     2.3527        1.5916        .26509E-05   -1.5401    
  13  Prefactor     .10000E-03    5.6060        .23485E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     5.0285        4.1594        .51941E-05   -1.5259    
  15  Prefactor     3.0396        4.6593        .69775E-05   -1.5359    
  16  norm          1.8785        1.4271        .29762E-05   -1.5434    
  17  norm          .10000E-03    .60668        .19210E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     3.0732        9.9550        .92730E-05   -1.5357    
  19  norm          .10000E-03    .67837        .19216E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  norm          .10000E-03    8.2860        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  norm          .13337        6.6300        .59111E-04   -1.5635    
  22  Prefactor     .10000E-03    40.962        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  norm          .19857        69.281        .11078E-03   -1.5619    
  24  Prefactor     78.982        103.09        .90391E-05   -1.3928    
  25  Normalizat    1.0657        .28243        .11269E-04   -.90862    
  26  Prefactor     1.0581        .21258        .46228E-04   -.90817    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.83882e-09
Minuit parameter uncertainties:
  1  26.7212
  2  0.00131526
  3  3.51271
  4  7.39588
  5  18.7436
  6  5.8862e-06
  7  0.234848
  8  3.05704e-06
  9  25.9206
  10  0.000301424
  11  7.11301
  12  1.59167
  13  0.00011923
  14  4.15964
  15  4.65981
  16  1.42711
  17  8.71843e-06
  18  9.96036
  19  2.279e-05
  20  1.71345e-05
  21  1.88018
  22  2.57413e-05
  23  7.42495
  24  103.32
  25  0.282826
  26  0.212751
Done.

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

Extracting fit parameters...

4FGL J1640.4+3945
   Spectrum: PowerLaw
308    Prefactor:  2.353e+00  1.592e+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:  1.058e+00  2.128e-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.066e+00  2.828e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 7.10
Ra Dec: 250.119 39.763
Photon Index (Fixed Index): 2.42 +/- 0.00
Photon Flux (Fixed Index): 9.29e-08 +/- 6.28e-08
Energy Flux (Fixed Index): 2.96e-05 +/- 2.00e-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) = 5473.1841283
delta logL = 0.177287560324

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 5471.82897008
delta logL = 1.53244578568

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .41467E-02   1.0000         .10000E-03   10000.    
     2 'Index     '    5.6314       1.0000          .0000       10.000    
     3 'Normalizat'    .92483       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1437       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=   5471.829     FROM MIGRAD    STATUS=CONVERGED     53 CALLS      326 TOTAL
                     EDM=   .26E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .41324E-02    .22713E-01    .43406E-03   -.23153E-01
   2  Index         5.6330        1.7768        .52073E-01   -.50462E-04
   3  Normalizat    .92471        .81891E-01    .67500E-01   -.27429E-04
   4  Prefactor     1.1439        .67041E-01    .36120E-01   -.34354E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.00413237
  Index      = 5.63297
  Normalizat = 0.924712
  Prefactor  = 1.14389
 **********
 **   18 **HESSE 
 **********

 FCN=   5471.829     FROM HESSE     STATUS=NOT POSDEF    33 CALLS      359 TOTAL
                     EDM=   .24E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .41324E-02    .33613E-01    .18329E-05   -1.5695    
   2  Index         5.6330        2.2326        .22263E-02    .12693    
   3  Normalizat    .92471        .23962        .29860E-03   -.95597    
   4  Prefactor     1.1439        .19397        .22343E-03   -.88076    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 2.37552e-10
Minuit parameter uncertainties:
  1  0.0232844
  2  2.31582
  3  0.239897
  4  0.194091
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/827574': 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) = 5471.82896918
delta logL = 1.53244668538

Extracting fit parameters...

4FGL J1640.4+3945
   Spectrum: PowerLaw
308    Prefactor:  4.132e-03  2.328e-02  1.000e-04  1.000e+04 ( 1.000e-12)
309        Index:  5.633e+00  2.316e+00  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.144e+00  1.941e-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.247e-01  2.399e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 10.95
Ra Dec: 250.119 39.763
Photon Index (Free Index): 5.63 +/- 2.32
Photon Flux (Free Index): 2.23e-07 +/- 8.94e-08
Energy Flux (Free Index): 2.84e-05 +/- 1.26e-05

Creating a high resolution counts map...
INFO: Auto-setting vmin to  0.000e+00 [aplpy.core]
INFO: Auto-setting vmax to  0.000e+00 [aplpy.core]
Saving /scratch/kocevski/827574/cmap_HighResolution_248400001_248659201_4FGL_J1640.4+3945_daily_bin35.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='9.29e-08', energy_flux2='2.84e-05', photon_flux_error='6.28e-08', dlogl='1.53e+00', energy_flux='2.96e-05', photon_flux2='2.23e-07', job_status='DONE', time_completed='2021-09-15 06:21:15.832957', photon_index_error2='2.32', photon_index2='5.63', ts='7.10', fit_tolerance='1e-08', GAL='1.06', photon_index_error='0.00', energy_flux_error2='1.26e-05', EG='1.07', time_epoch_completed='1631712075.83', return_code='0', job_id='827574', GAL2='1.14', EG2='0.92', return_code2='102', energy_flux_error='2.00e-05', photon_flux_error2='8.94e-08', ts2='10.95', photon_index='2.42' WHERE bin_id='35' AND source_name='4FGL J1640.4+3945' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Wed Sep 15 06:21:15 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0214>
Subject: Job 827574: <4FGL_J1640.4+3945_daily_bin35> in cluster <slac> Done

Job <4FGL_J1640.4+3945_daily_bin35> was submitted from host <rhel6-64n> by user <kocevski> in cluster <slac> at Wed Sep 15 06:05:26 2021
Job was executed on host(s) <bullet0214>, in queue <medium>, as user <kocevski> in cluster <slac> at Wed Sep 15 06:08:14 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:08:14 2021
Terminated at Wed Sep 15 06:21:16 2021
Results reported at Wed Sep 15 06:21:16 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1640.4+3945_daily_bin35 250.119 39.7626 248400001 248659201 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 :                                   762.00 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             336.33 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   782 sec.
    Turnaround time :                            950 sec.

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

