aklog: Couldn't determine realm of user:aklog: No credentials cache found  while getting realm
/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 65 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).
nnumber of points = 17469
number of fields = 31
RA_SUN column already exists. File will not be modified.DDone.


Performing analysis on: 4FGL_J1640.3+6850_weekly_bin730
RA = 250.082, Dec = 68.8483
tmin = 680486401, tmax = 681091201
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='659542', job_status='RUN', time_executed='2022-08-02 02:15:53.095123', time_epoch_executed='1659431753.1' WHERE source_name='4FGL J1640.3+6850' and cadence='weekly' and bin_id='730'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/659542

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

Retrieving the FT1 file...

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

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

Retrieving 107 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/659542/ft1_4FGL_J1640.3+6850_weekly_bin730.fits


Retrieving the FT1 file...

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

Retrieving 107 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/659542/ft2_4FGL_J1640.3+6850_weekly_bin730.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/659542/ft1_4FGL_J1640.3+6850_weekly_bin730.fits outfile=/scratch/kocevski/659542/ft1_filteredMKT_4FGL_J1640.3+6850_weekly_bin730.fits ra=250.082 dec=68.8483 rad=12.0 tmin=680486401.0 tmax=681091201.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 6.30
user 5.97
sys 0.29

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/659542/ft2_4FGL_J1640.3+6850_weekly_bin730.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/659542/ft2_4FGL_J1640.3+6850_weekly_bin730.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/659542/ft1_filteredMKT_4FGL_J1640.3+6850_weekly_bin730.fits evtable="EVENTS" outfile="/scratch/kocevski/659542/ft1_filtered_4FGL_J1640.3+6850_weekly_bin730.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.56
user 0.38
sys 0.17

Number of photons that the gtmktime cut: 3579

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/659542/ft1_filtered_4FGL_J1640.3+6850_weekly_bin730.fits" evtable="EVENTS" scfile=/scratch/kocevski/659542/ft2_4FGL_J1640.3+6850_weekly_bin730.fits sctable="SC_DATA" outfile=/scratch/kocevski/659542/ltcube_680486401_681091201_4FGL_J1640.3+6850_weekly_bin730.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/659542/ft2_4FGL_J1640.3+6850_weekly_bin730.fits
.....................!
real 35.04
user 34.43
sys 0.37

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/659542/ft1_filtered_4FGL_J1640.3+6850_weekly_bin730.fits evtable="EVENTS" scfile=/scratch/kocevski/659542/ft2_4FGL_J1640.3+6850_weekly_bin730.fits sctable="SC_DATA" expcube=/scratch/kocevski/659542/ltcube_680486401_681091201_4FGL_J1640.3+6850_weekly_bin730.fits outfile=/scratch/kocevski/659542/expmap_680486401_681091201_4FGL_J1640.3+6850_weekly_bin730.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/659542/ltcube_680486401_681091201_4FGL_J1640.3+6850_weekly_bin730.fits
.....................!
real 193.02
user 186.63
sys 5.67

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

Setting source of interest to:
4FGL J1640.3+6850 @ 250.082 68.8483

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/659542/ft1_filtered_4FGL_J1640.3+6850_weekly_bin730.fits scfile=/scratch/kocevski/659542/ft2_4FGL_J1640.3+6850_weekly_bin730.fits outfile=/scratch/kocevski/659542/cmap_680486401_681091201_4FGL_J1640.3+6850_weekly_bin730.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.082 yref=68.8483 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.60
user 0.44
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/659542/ft1_filtered_4FGL_J1640.3+6850_weekly_bin730.fits scfile=/scratch/kocevski/659542/ft2_4FGL_J1640.3+6850_weekly_bin730.fits outfile=/scratch/kocevski/659542/cmap_HighResolution_680486401_681091201_4FGL_J1640.3+6850_weekly_bin730.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.082 yref=68.8483 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.67
user 0.43
sys 0.16

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/659542/ft1_filtered_4FGL_J1640.3+6850_weekly_bin730.fits evtable="EVENTS" scfile=/scratch/kocevski/659542/ft2_4FGL_J1640.3+6850_weekly_bin730.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/659542/Model_4FGL_J1640.3+6850_weekly_bin730.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/659542/ft1_filtered_4FGL_J1640.3+6850_weekly_bin730.fits.....................!
real 321.47
user 319.21
sys 1.31

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/659542/ft1_filtered_4FGL_J1640.3+6850_weekly_bin730.fits', '/scratch/kocevski/659542/ft2_4FGL_J1640.3+6850_weekly_bin730.fits', expMap='/scratch/kocevski/659542/expmap_680486401_681091201_4FGL_J1640.3+6850_weekly_bin730.fits', expCube='/scratch/kocevski/659542/ltcube_680486401_681091201_4FGL_J1640.3+6850_weekly_bin730.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/659542/Model_4FGL_J1640.3+6850_weekly_bin730.xml', optimizer='MINUIT')

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

4FGL J1640.3+6850
   Spectrum: PowerLaw
350    Prefactor:  3.992e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-14)
351        Index:  2.132e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
352        Scale:  2.329e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/659542/ft1_filtered_4FGL_J1640.3+6850_weekly_bin730.fits
Spacecraft file(s): /scratch/kocevski/659542/ft2_4FGL_J1640.3+6850_weekly_bin730.fits
Exposure map: /scratch/kocevski/659542/expmap_680486401_681091201_4FGL_J1640.3+6850_weekly_bin730.fits
Exposure cube: /scratch/kocevski/659542/ltcube_680486401_681091201_4FGL_J1640.3+6850_weekly_bin730.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/659542/Model_4FGL_J1640.3+6850_weekly_bin730.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) = 37967.7046611

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    7.0159       1.0000         .10000E-03   10000.    
     2 'Prefactor '    4.3884       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .70865E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    14.178       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    5.5187       1.0000         .10000E-03   10000.    
     7 'norm      '    1.6411       1.0000         .10000E-03   10000.    
     8 'Prefactor '    29.238       1.0000         .10000E-03   10000.    
     9 'Prefactor '    2.7383       1.0000         .10000E-03   10000.    
    10 'norm      '    8.9136       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    1.1731       1.0000         .10000E-03   10000.    
    13 'Prefactor '    17.850       1.0000         .10000E-03   10000.    
    14 'norm      '    19.194       1.0000         .10000E-03   10000.    
    15 'Prefactor '    3.3326       1.0000         .10000E-03   10000.    
    16 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    6.8667       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .23015       1.0000         .10000E-03   10000.    
    19 'Prefactor '    .60503       1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10081E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    7.0211       1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    16.368       1.0000         .10000E-03   10000.    
    24 'norm      '    4.6859       1.0000         .10000E-03   10000.    
    25 'norm      '    3.2303       1.0000         .10000E-03   10000.    
    26 'Prefactor '    3.0861       1.0000         .10000E-03   10000.    
    27 'norm      '    2.8923       1.0000         .10000E-03   10000.    
    28 'Prefactor '    .94301E-03   1.0000         .10000E-03   10000.    
    29 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    30 'Prefactor '    4.7947       1.0000         .10000E-03   10000.    
    31 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    32 'Prefactor '    .10024E-03   1.0000         .10000E-03   10000.    
    33 'Normalizat'    .76668       1.0000         .10000E-01   10.000    
    34 'Prefactor '    1.1298       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6760E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
 MACHINE ACCURACY LIMITS FURTHER IMPROVEMENT.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   37967.70     FROM MIGRAD    STATUS=CONVERGED    937 CALLS     4906 TOTAL
                     EDM=   .14E-04    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     7.0158        10.918         .0000        .70674E-03
   2  Prefactor     4.3884        4.7756         .0000        .31651E-03
   3  Prefactor     .10175E-03    2.2976         .0000    ** at limit **
   4  Prefactor     14.177        16.321         .0000        .38068E-03
   5  Prefactor     .10000E-03    2.5610         .0000    ** at limit **
   6  Prefactor     5.5182        6.1262         .0000        .13475E-03
   7  norm          1.6411        .79079         .0000       -.47430E-04
   8  Prefactor     29.238        29.978         .0000       -.50311E-03
   9  Prefactor     2.7385        7.8106         .0000        .32077E-03
  10  norm          8.9144        5.1239         .0000       -.10482E-02
  11  Prefactor     .10001E-03    12.018         .0000    ** at limit **
  12  Prefactor     1.1735        2.6784         .0000        .13999    
  13  Prefactor     17.848        13.677         .0000        .25850E-03
  14  norm          19.194        4.0950         .0000       -.19024E-02
  15  Prefactor     3.3324        4.5079         .0000       -.80266E-03
  16  norm          .10000E-03    .65605E-01     .0000    ** at limit **
  17  Prefactor     6.8653        3.2890         .0000        .36960E-02
  18  Prefactor     .22625        .50153         .0000        .38983E-02
  19  Prefactor     .61534        3.6447         .0000        .99216E-01
  20  Prefactor     .10000E-03    1.1385         .0000    ** at limit **
  21  Prefactor     7.0294        8.3796         .0000        .69519E-03
  22  Prefactor     .10000E-03    1.2674         .0000    ** at limit **
  23  Prefactor     16.365        16.769         .0000        .44274E-03
  24  norm          4.6857        1.1101         .0000        .12464E-03
  25  norm          3.2303        .41627         .0000        .13073E-03
  26  Prefactor     3.0882        5.0061         .0000       -.17501E-02
  27  norm          2.8921        1.6209         .0000        .51965E-01
  28  Prefactor     .10003E-03    2.6070         .0000    ** at limit **
  29  Prefactor     .10000E-03    12.308         .0000    ** at limit **
  30  Prefactor     4.7957        2.5608         .0000        .87751E-02
  31  Prefactor     .10000E-03    2.4060         .0000    ** at limit **
  32  Prefactor     .10007E-03    36.302         .0000    ** at limit **
  33  Normalizat    .76665        .77509E-01     .0000        .30305E-03
  34  Prefactor     1.1298        .61552E-01     .0000        .22312E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 7.01582
  Prefactor  = 4.38836
  Prefactor  = 0.00010175
  Prefactor  = 14.1768
  Prefactor  = 0.0001
  Prefactor  = 5.51819
  norm       = 1.64108
  Prefactor  = 29.2381
  Prefactor  = 2.73852
  norm       = 8.91441
  Prefactor  = 0.000100006
  Prefactor  = 1.1735
  Prefactor  = 17.8476
  norm       = 19.1936
  Prefactor  = 3.33242
  norm       = 0.0001
  Prefactor  = 6.86532
  Prefactor  = 0.226248
  Prefactor  = 0.615337
  Prefactor  = 0.0001
  Prefactor  = 7.02936
  Prefactor  = 0.0001
  Prefactor  = 16.365
  norm       = 4.68569
  norm       = 3.23035
  Prefactor  = 3.08822
  norm       = 2.89207
  Prefactor  = 0.000100031
  Prefactor  = 0.0001
  Prefactor  = 4.7957
  Prefactor  = 0.0001
  Prefactor  = 0.00010007
  Normalizat = 0.766648
  Prefactor  = 1.12983
 **********
 **   18 **HESSE 
 **********

 FCN=   37967.70     FROM HESSE     STATUS=OK           750 CALLS     5656 TOTAL
                     EDM=   .91E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     7.0158        10.912        .75728E-03   -1.5178    
   2  Prefactor     4.3884        4.7730        .19226E-03   -1.5289    
   3  Prefactor     .10175E-03    31.774        .56709E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     14.177        16.320        .10637E-03   -1.4955    
   5  Prefactor     .10000E-03    2.5919        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     5.5182        6.1232        .17103E-03   -1.5238    
   7  norm          1.6411        .78980        .11559E-03   -1.5452    
   8  Prefactor     29.238        29.993        .74095E-04   -1.4626    
   9  Prefactor     2.7385        7.7951        .24605E-03   -1.5377    
  10  norm          8.9144        5.1239        .13425E-03   -1.5111    
  11  Prefactor     .10001E-03    12.025        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     1.1735        2.6661        .21165E-02   -1.5491    
  13  Prefactor     17.848        13.549        .94797E-04   -1.4863    
  14  norm          19.194        4.0926        .91421E-04   -1.4831    
  15  Prefactor     3.3324        4.4886        .22172E-03   -1.5343    
  16  norm          .10000E-03    .11286        .93274E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     6.8653        3.2486        .15311E-03   -1.5184    
  18  Prefactor     .22625        1.3833        .17993E-02   -1.5613    
  19  Prefactor     .61534        3.5133        .23385E-02   -1.5551    
  20  Prefactor     .10000E-03    1.1679        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     7.0294        8.6444        .15140E-03   -1.5178    
  22  Prefactor     .10000E-03    1.2879        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     16.365        16.703        .98998E-04   -1.4899    
  24  norm          4.6857        1.1077        .94920E-04   -1.5275    
  25  norm          3.2303        .41512        .42884E-04   -1.5348    
  26  Prefactor     3.0882        4.9664        .23087E-03   -1.5356    
  27  norm          2.8921        1.6071        .85151E-03   -1.5368    
  28  Prefactor     .10003E-03    11.667        .60632E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  29  Prefactor     .10000E-03    12.315        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  30  Prefactor     4.7957        2.5415        .18373E-03   -1.5270    
  31  Prefactor     .10000E-03    2.4273        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  32  Prefactor     .10007E-03    36.585        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  33  Normalizat    .76665        .87678E-01    .29084E-03   -1.0132    
  34  Prefactor     1.1298        .70877E-01    .20503E-03   -.88519    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 9.1364e-08
Minuit parameter uncertainties:
  1  10.915
  2  4.77343
  3  0.0149207
  4  16.3252
  5  8.93345e-06
  6  6.12385
  7  0.789808
  8  30.0087
  9  7.79795
  10  5.12411
  11  0.000557298
  12  2.66639
  13  13.5513
  14  4.09263
  15  4.48904
  16  2.08487e-07
  17  3.24865
  18  1.11867
  19  2.94067
  20  1.12069e-06
  21  8.64594
  22  1.89216e-06
  23  16.7074
  24  1.10772
  25  0.41512
  26  4.96708
  27  1.60717
  28  0.00119979
  29  4.31538e-05
  30  2.54158
  31  1.60031e-05
  32  0.00320919
  33  0.087694
  34  0.0708833
Done.

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

Extracting fit parameters...

4FGL J1640.3+6850
   Spectrum: PowerLaw
350    Prefactor:  1.785e+01  1.355e+01  1.000e-04  1.000e+04 ( 1.000e-14)
351        Index:  2.132e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
352        Scale:  2.329e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
673    Prefactor:  1.130e+00  7.088e-02  0.000e+00  1.000e+01 ( 1.000e+00)
674        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
675        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
672   Normalization:  7.666e-01  8.769e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 2.41
Ra Dec: 250.082 68.848
Photon Index (Fixed Index): 2.13 +/- 0.00
Photon Flux (Fixed Index): 1.30e-08 +/- 9.84e-09
Energy Flux (Fixed Index): 6.65e-06 +/- 5.05e-06

TS (Fixed Index): 2.41
Ra Dec: 250.082 68.848
Photon Flux Upper Limit: 3.29e-08 ph cm-2 s-1
Energy Flux Upper Limit: 2.49e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/659554/likelihoodResults_680486401_681091201_4FGL_J1640.3+6850_weekly_bin730.txt

Performing a free index iterative likelihood fit...

Freezing all point sources, except source of interest...

Done.

Freeing candidate source...
Done.

Fit tolerance = 1

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 37967.5393507
delta logL = 0.158108459604

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 37967.5374456
delta logL = 0.16001363768

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    12.886       1.0000         .10000E-03   10000.    
     2 'Index     '    2.3857       1.0000          .0000       10.000    
     3 'Normalizat'    .76220       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1315       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6760E+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=   37967.54     FROM MIGRAD    STATUS=CONVERGED    105 CALLS      331 TOTAL
                     EDM=   .40E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     12.881        17.512        .11159E-03    .15405E-03
   2  Index         2.3862        .59476        .96585E-02    .18658E-03
   3  Normalizat    .76218        .83179E-01    .29162E-03    .30876E-04
   4  Prefactor     1.1315        .69980E-01    .20489E-03   -.17756E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 12.8808
  Index      = 2.3862
  Normalizat = 0.762179
  Prefactor  = 1.13154
 **********
 **   18 **HESSE 
 **********

 FCN=   37967.54     FROM HESSE     STATUS=OK            25 CALLS      356 TOTAL
                     EDM=   .28E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     12.881        13.725        .44634E-05   -1.4990    
   2  Index         2.3862        .46660        .38634E-03   -.55009    
   3  Normalizat    .76218        .82967E-01    .11665E-04   -1.0149    
   4  Prefactor     1.1315        .69872E-01    .81956E-05   -.88465    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.7653e-11
Minuit parameter uncertainties:
  1  13.7282
  2  0.467537
  3  0.0829806
  4  0.0698778
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/659554': 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) = 37967.5374426
delta logL = 0.160016576134

Extracting fit parameters...

4FGL J1640.3+6850
   Spectrum: PowerLaw
350    Prefactor:  1.288e+01  1.373e+01  1.000e-04  1.000e+04 ( 1.000e-14)
351        Index:  2.386e+00  4.675e-01  0.000e+00  1.000e+01 (-1.000e+00)
352        Scale:  2.329e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
673    Prefactor:  1.132e+00  6.988e-02  0.000e+00  1.000e+01 ( 1.000e+00)
674        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
675        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
672   Normalization:  7.622e-01  8.298e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 2.72
Ra Dec: 250.082 68.848
Photon Index (Free Index): 2.39 +/- 0.47
Photon Flux (Free Index): 1.70e-08 +/- 1.32e-08
Energy Flux (Free Index): 5.68e-06 +/- 4.33e-06

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/659554/cmap_HighResolution_680486401_681091201_4FGL_J1640.3+6850_weekly_bin730.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='2.49e-03', comment='SUCCESS', photon_flux='1.30e-08', energy_flux2='5.68e-06', photon_flux_error='9.84e-09', dlogl='1.60e-01', energy_flux='6.65e-06', photon_flux2='1.70e-08', job_status='DONE', time_completed='2022-08-02 03:45:51.868868', photon_index_error2='0.47', photon_index2='2.39', ts='2.41', fit_tolerance='1e-08', GAL='1.13', photon_index_error='0.00', photon_flux_upper_limit='3.29e-08', energy_flux_error2='4.33e-06', EG='0.77', time_epoch_completed='1659437151.87', return_code='0', job_id='659554', GAL2='1.13', EG2='0.76', return_code2='0', energy_flux_error='5.05e-06', photon_flux_error2='1.32e-08', ts2='2.72', photon_index='2.13' WHERE bin_id='730' AND source_name='4FGL J1640.3+6850' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Aug  2 03:45:51 PDT 2022


------------------------------------------------------------
Sender: LSF System <lsf@bullet0249>
Subject: Job 659542: <4FGL_J1640.3+6850_weekly_bin730> in cluster <slac> Done

Job <4FGL_J1640.3+6850_weekly_bin730> was submitted from host <rhel6-64q> by user <kocevski> in cluster <slac> at Tue Aug  2 00:06:47 2022
Job was executed on host(s) <bullet0249>, in queue <medium>, as user <kocevski> in cluster <slac> at Tue Aug  2 02:14:37 2022
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Tue Aug  2 02:14:37 2022
Terminated at Tue Aug  2 03:45:50 2022
Results reported at Tue Aug  2 03:45:50 2022

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1640.3+6850_weekly_bin730 250.082 68.8483 680486401 681091201 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1640.3+6850 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   5388.00 sec.
    Max Memory :                                 1259 MB
    Average Memory :                             373.53 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   5473 sec.
    Turnaround time :                            13143 sec.

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


------------------------------------------------------------
Sender: LSF System <lsf@bullet0145>
Subject: Job 659554: <4FGL_J1640.3+6850_weekly_bin730> in cluster <slac> Done

Job <4FGL_J1640.3+6850_weekly_bin730> was submitted from host <rhel6-64j> by user <kocevski> in cluster <slac> at Tue Aug  2 00:06:47 2022
Job was executed on host(s) <bullet0145>, in queue <medium>, as user <kocevski> in cluster <slac> at Tue Aug  2 02:15:16 2022
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Tue Aug  2 02:15:16 2022
Terminated at Tue Aug  2 03:45:52 2022
Results reported at Tue Aug  2 03:45:52 2022

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1640.3+6850_weekly_bin730 250.082 68.8483 680486401 681091201 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1640.3+6850 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   5348.32 sec.
    Max Memory :                                 636 MB
    Average Memory :                             384.84 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   2936 MB
    Max Processes :                              6
    Max Threads :                                21
    Run time :                                   5436 sec.
    Turnaround time :                            13145 sec.

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

