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


Performing analysis on: 4FGL_J1640.4+3945_daily_bin68
RA = 250.119, Dec = 39.7626
tmin = 256953601, tmax = 257212801
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='829032', job_status='RUN', time_executed='2021-09-15 06:12:53.326681', time_epoch_executed='1631711573.33' WHERE source_name='4FGL J1640.4+3945' and cadence='daily' and bin_id='68'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/829032

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/829032/ft1_4FGL_J1640.4+3945_daily_bin68.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/829032/ft2_4FGL_J1640.4+3945_daily_bin68.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/829032/ft1_4FGL_J1640.4+3945_daily_bin68.fits outfile=/scratch/kocevski/829032/ft1_filteredMKT_4FGL_J1640.4+3945_daily_bin68.fits ra=250.119 dec=39.7626 rad=12.0 tmin=256953601.0 tmax=257212801.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.23
user 1.06
sys 0.16

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/829032/ft2_4FGL_J1640.4+3945_daily_bin68.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/829032/ft1_filteredMKT_4FGL_J1640.4+3945_daily_bin68.fits evtable="EVENTS" outfile="/scratch/kocevski/829032/ft1_filtered_4FGL_J1640.4+3945_daily_bin68.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.45
user 0.29
sys 0.14

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/829032/ft1_filtered_4FGL_J1640.4+3945_daily_bin68.fits" evtable="EVENTS" scfile=/scratch/kocevski/829032/ft2_4FGL_J1640.4+3945_daily_bin68.fits sctable="SC_DATA" outfile=/scratch/kocevski/829032/ltcube_256953601_257212801_4FGL_J1640.4+3945_daily_bin68.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/829032/ft2_4FGL_J1640.4+3945_daily_bin68.fits
.....................!
real 12.79
user 12.47
sys 0.29

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/829032/ft1_filtered_4FGL_J1640.4+3945_daily_bin68.fits evtable="EVENTS" scfile=/scratch/kocevski/829032/ft2_4FGL_J1640.4+3945_daily_bin68.fits sctable="SC_DATA" expcube=/scratch/kocevski/829032/ltcube_256953601_257212801_4FGL_J1640.4+3945_daily_bin68.fits outfile=/scratch/kocevski/829032/expmap_256953601_257212801_4FGL_J1640.4+3945_daily_bin68.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/829032/ltcube_256953601_257212801_4FGL_J1640.4+3945_daily_bin68.fits
.....................!
real 156.99
user 152.58
sys 3.99

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/829032/ft1_filtered_4FGL_J1640.4+3945_daily_bin68.fits scfile=/scratch/kocevski/829032/ft2_4FGL_J1640.4+3945_daily_bin68.fits outfile=/scratch/kocevski/829032/cmap_256953601_257212801_4FGL_J1640.4+3945_daily_bin68.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.48
user 0.32
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/829032/ft1_filtered_4FGL_J1640.4+3945_daily_bin68.fits scfile=/scratch/kocevski/829032/ft2_4FGL_J1640.4+3945_daily_bin68.fits outfile=/scratch/kocevski/829032/cmap_HighResolution_256953601_257212801_4FGL_J1640.4+3945_daily_bin68.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.48
user 0.31
sys 0.16

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

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 '    .10001E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    4.1053       1.0000         .10000E-03   10000.    
     4 'Prefactor '    4.8159       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10016E-03   1.0000         .10000E-03   10000.    
     7 'norm      '    .26679       1.0000         .10000E-03   10000.    
     8 'norm      '    3.2851       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10011E-03   1.0000         .10000E-03   10000.    
    11 'norm      '    26.894       1.0000         .10000E-03   10000.    
    12 'Prefactor '    4.4900       1.0000         .10000E-03   10000.    
    13 'Prefactor '    2.6790       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    6.4522       1.0000         .10000E-03   10000.    
    16 'norm      '    1.2641       1.0000         .10000E-03   10000.    
    17 'norm      '    .12769       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .57737       1.0000         .10000E-03   10000.    
    19 'norm      '    3.8394       1.0000         .10000E-03   10000.    
    20 'norm      '    12.159       1.0000         .10000E-03   10000.    
    21 'norm      '    4.7638       1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    23 'norm      '    27.499       1.0000         .10000E-03   10000.    
    24 'Prefactor '    42.439       1.0000         .10000E-03   10000.    
    25 'Normalizat'    1.3288       1.0000         .10000E-01   10.000    
    26 'Prefactor '    .58285       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=   7198.156     FROM MIGRAD    STATUS=CONVERGED    619 CALLS     3194 TOTAL
                     EDM=   .13E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .8%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    10.848        .13422E-05** at limit **
   2  Prefactor     .10000E-03    35.180        .97246E-05** at limit **
   3  Prefactor     4.1054        3.3174       -.29198E-06   -.28055E-03
   4  Prefactor     4.8161        5.3187       -.26666E-05   -.29324E-03
   5  Prefactor     .10000E-03    17.501        .11183E-05** at limit **
   6  Prefactor     .10000E-03    1.7383        .11294E-10** at limit **
   7  norm          .26679        .13913       -.31652E-07    .41497E-03
   8  norm          3.2846        9.9583       -.30197E-06   -.12797E-03
   9  Prefactor     .10000E-03    12.176       -.25101E-05** at limit **
  10  Prefactor     .10000E-03    1.2287        .58813E-07** at limit **
  11  norm          26.890        36.288       -.53653E-05    .98336E-05
  12  Prefactor     4.4904        2.4641        .41221E-06   -.41235E-04
  13  Prefactor     2.6786        2.4216       -.26228E-06   -.13479E-03
  14  Prefactor     .10000E-03    1.1725       -.28419E-07** at limit **
  15  Prefactor     6.4522        3.7298       -.11177E-05   -.12369E-03
  16  norm          1.2642        1.8851       -.14471E-06   -.81244E-03
  17  norm          .12770        .38093       -.31625E-06   -.26341E-02
  18  Prefactor     .57822        3.7008       -.37314E-06   -.41172E-04
  19  norm          3.8394        1.1844        .51363E-07    .53300E-03
  20  norm          12.159        9.3046       -.63992E-06   -.12978E-02
  21  norm          4.7638        2.1285        .17278E-07    .11023E-03
  22  Prefactor     .10000E-03    37.483       -.10752E-04** at limit **
  23  norm          27.498        9.7108        .23754E-05    .82942E-04
  24  Prefactor     42.412        86.709       -.38185E-04    .97834E-05
  25  Normalizat    1.3288        .19047        .16625E-05    .10587E-03
  26  Prefactor     .58291        .14928        .65743E-06    .15375E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 4.10542
  Prefactor  = 4.81606
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.26679
  norm       = 3.28455
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 26.8905
  Prefactor  = 4.49045
  Prefactor  = 2.67859
  Prefactor  = 0.0001
  Prefactor  = 6.4522
  norm       = 1.2642
  norm       = 0.1277
  Prefactor  = 0.57822
  norm       = 3.83942
  norm       = 12.1585
  norm       = 4.76376
  Prefactor  = 0.0001
  norm       = 27.498
  Prefactor  = 42.4121
  Normalizat = 1.32878
  Prefactor  = 0.582911
 **********
 **   18 **HESSE 
 **********

 FCN=   7198.156     FROM HESSE     STATUS=OK           466 CALLS     3660 TOTAL
                     EDM=   .22E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    10.867        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    35.143        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     4.1054        3.3212        .13261E-03   -1.5303    
   4  Prefactor     4.8161        5.3509        .18332E-03   -1.5269    
   5  Prefactor     .10000E-03    17.563        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    1.7674        .10909E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  norm          .26679        .13814        .20799E-04   -1.5605    
   8  norm          3.2846        9.9461        .22340E-03   -1.5345    
   9  Prefactor     .10000E-03    12.243        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    2.0112        .18290E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  norm          26.890        36.236        .77248E-04   -1.4670    
  12  Prefactor     4.4904        2.5202        .59741E-04   -1.5284    
  13  Prefactor     2.6786        2.4443        .75584E-04   -1.5381    
  14  Prefactor     .10000E-03    1.2215        .17930E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     6.4522        3.7185        .11522E-03   -1.5200    
  16  norm          1.2642        1.8434        .13175E-03   -1.5483    
  17  norm          .12770        .38116        .87276E-04   -1.5637    
  18  Prefactor     .57822        17.371        .29328E-02   -1.5556    
  19  norm          3.8394        1.1750        .47296E-04   -1.5316    
  20  norm          12.159        9.4083        .57440E-03   -1.5010    
  21  norm          4.7638        2.1189        .78486E-04   -1.5271    
  22  Prefactor     .10000E-03    37.448        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  norm          27.498        9.7329        .76397E-04   -1.4659    
  24  Prefactor     42.412        85.361        .61537E-04   -1.4405    
  25  Normalizat    1.3288        .22890        .24851E-03   -.82711    
  26  Prefactor     .58291        .17874        .28996E-03   -1.0831    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.22091e-08
Minuit parameter uncertainties:
  1  1.11999e-05
  2  1.63902e-05
  3  3.32136
  4  5.35148
  5  0.000163435
  6  1.11063e-06
  7  0.138137
  8  9.95111
  9  1.3909e-05
  10  6.70842e-06
  11  36.2658
  12  2.5203
  13  2.4444
  14  2.29812e-07
  15  3.71859
  16  1.84351
  17  0.381169
  18  6.33995
  19  1.175
  20  9.40941
  21  2.11896
  22  3.20371e-05
  23  9.73344
  24  85.6088
  25  0.229076
  26  0.178918
Done.

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

Extracting fit parameters...

4FGL J1640.4+3945
   Spectrum: PowerLaw
308    Prefactor:  4.490e+00  2.520e+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:  5.829e-01  1.789e-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.329e+00  2.291e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 13.25
Ra Dec: 250.119 39.763
Photon Index (Fixed Index): 2.42 +/- 0.00
Photon Flux (Fixed Index): 1.77e-07 +/- 9.95e-08
Energy Flux (Fixed Index): 5.65e-05 +/- 3.17e-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) = 7197.87118061
delta logL = 0.285248498946

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 7197.86493147
delta logL = 0.291497637314

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    3.1347       1.0000         .10000E-03   10000.    
     2 'Index     '    2.6943       1.0000          .0000       10.000    
     3 'Normalizat'    1.2901       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .60432       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=   7197.865     FROM MIGRAD    STATUS=CONVERGED     88 CALLS      276 TOTAL
                     EDM=   .69E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     3.1348        2.3479        .22897E-04   -.31876E-03
   2  Index         2.6945        .42382        .30122E-02    .82634E-03
   3  Normalizat    1.2899        .22851        .25122E-03    .37334E-04
   4  Prefactor     .60443        .17940        .28511E-03    .50203E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 3.13483
  Index      = 2.69455
  Normalizat = 1.28991
  Prefactor  = 0.604425
 **********
 **   18 **HESSE 
 **********

 FCN=   7197.865     FROM HESSE     STATUS=OK            25 CALLS      301 TOTAL
                     EDM=   .80E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     3.1348        2.1083        .91589E-06   -1.5354    
   2  Index         2.6945        .38034        .60245E-03   -.47922    
   3  Normalizat    1.2899        .22794        .10049E-04   -.83868    
   4  Prefactor     .60443        .17917        .11404E-04   -1.0740    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 7.98525e-12
Minuit parameter uncertainties:
  1  2.10834
  2  0.380805
  3  0.228119
  4  0.179338
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/829032': 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) = 7197.86493047
delta logL = 0.291498636175

Extracting fit parameters...

4FGL J1640.4+3945
   Spectrum: PowerLaw
308    Prefactor:  3.135e+00  2.108e+00  1.000e-04  1.000e+04 ( 1.000e-12)
309        Index:  2.695e+00  3.808e-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:  6.044e-01  1.793e-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.290e+00  2.281e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 14.99
Ra Dec: 250.119 39.763
Photon Index (Free Index): 2.69 +/- 0.38
Photon Flux (Free Index): 2.12e-07 +/- 8.05e-08
Energy Flux (Free Index): 5.13e-05 +/- 1.80e-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/829032/cmap_HighResolution_256953601_257212801_4FGL_J1640.4+3945_daily_bin68.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='1.77e-07', energy_flux2='5.13e-05', photon_flux_error='9.95e-08', dlogl='2.91e-01', energy_flux='5.65e-05', photon_flux2='2.12e-07', job_status='DONE', time_completed='2021-09-15 06:23:56.500659', photon_index_error2='0.38', photon_index2='2.69', ts='13.25', fit_tolerance='1e-08', GAL='0.58', photon_index_error='0.00', energy_flux_error2='1.80e-05', EG='1.33', time_epoch_completed='1631712236.5', return_code='0', job_id='829032', GAL2='0.60', EG2='1.29', return_code2='0', energy_flux_error='3.17e-05', photon_flux_error2='8.05e-08', ts2='14.99', photon_index='2.42' WHERE bin_id='68' AND source_name='4FGL J1640.4+3945' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Wed Sep 15 06:23:56 PDT 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0033>
Subject: Job 829032: <4FGL_J1640.4+3945_daily_bin68> in cluster <slac> Done

Job <4FGL_J1640.4+3945_daily_bin68> was submitted from host <rhel6-64j> by user <kocevski> in cluster <slac> at Wed Sep 15 06:10:20 2021
Job was executed on host(s) <bullet0033>, in queue <medium>, as user <kocevski> in cluster <slac> at Wed Sep 15 06:10:37 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:10:37 2021
Terminated at Wed Sep 15 06:23:57 2021
Results reported at Wed Sep 15 06:23:57 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1640.4+3945_daily_bin68 250.119 39.7626 256953601 257212801 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 :                                   660.46 sec.
    Max Memory :                                 1095 MB
    Average Memory :                             306.59 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   799 sec.
    Turnaround time :                            817 sec.

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

