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 55 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 make4FGLDR3xml version 01r09.
The default diffuse model files and names are for P8R3, 4FGL DRs, and the default fermitools directory locations.

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


Performing analysis on: 4FGL_J1640.3+6850_monthly_bin171
RA = 250.082, Dec = 68.8483
tmin = 680227201, tmax = 682819201
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='289896', job_status='RUN', time_executed='2022-09-17 03:03:02.544024', time_epoch_executed='1663408982.54' WHERE source_name='4FGL J1640.3+6850' and cadence='monthly' and bin_id='171'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/289896

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

Retrieving the FT1 file...

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

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

Retrieving 455 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/289896/ft1_4FGL_J1640.3+6850_monthly_bin171.fits


Retrieving the FT1 file...

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

Retrieving 455 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/289896/ft2_4FGL_J1640.3+6850_monthly_bin171.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/289896/ft1_4FGL_J1640.3+6850_monthly_bin171.fits outfile=/scratch/kocevski/289896/ft1_filteredMKT_4FGL_J1640.3+6850_monthly_bin171.fits ra=250.082 dec=68.8483 rad=12.0 tmin=680227201.0 tmax=682819201.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 29.27
user 28.27
sys 0.92

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/289896/ft2_4FGL_J1640.3+6850_monthly_bin171.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/289896/ft1_filteredMKT_4FGL_J1640.3+6850_monthly_bin171.fits evtable="EVENTS" outfile="/scratch/kocevski/289896/ft1_filtered_4FGL_J1640.3+6850_monthly_bin171.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.92
user 0.65
sys 0.20

Number of photons that the gtmktime cut: 11673

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/289896/ft1_filtered_4FGL_J1640.3+6850_monthly_bin171.fits" evtable="EVENTS" scfile=/scratch/kocevski/289896/ft2_4FGL_J1640.3+6850_monthly_bin171.fits sctable="SC_DATA" outfile=/scratch/kocevski/289896/ltcube_680227201_682819201_4FGL_J1640.3+6850_monthly_bin171.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/289896/ft2_4FGL_J1640.3+6850_monthly_bin171.fits
.....................!
real 135.98
user 135.13
sys 0.39

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/289896/ft1_filtered_4FGL_J1640.3+6850_monthly_bin171.fits evtable="EVENTS" scfile=/scratch/kocevski/289896/ft2_4FGL_J1640.3+6850_monthly_bin171.fits sctable="SC_DATA" expcube=/scratch/kocevski/289896/ltcube_680227201_682819201_4FGL_J1640.3+6850_monthly_bin171.fits outfile=/scratch/kocevski/289896/expmap_680227201_682819201_4FGL_J1640.3+6850_monthly_bin171.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/289896/ltcube_680227201_682819201_4FGL_J1640.3+6850_monthly_bin171.fits
.....................!
real 192.04
user 186.47
sys 5.21

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/289896/ft1_filtered_4FGL_J1640.3+6850_monthly_bin171.fits scfile=/scratch/kocevski/289896/ft2_4FGL_J1640.3+6850_monthly_bin171.fits outfile=/scratch/kocevski/289896/cmap_680227201_682819201_4FGL_J1640.3+6850_monthly_bin171.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.80
user 0.61
sys 0.17

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/289896/ft1_filtered_4FGL_J1640.3+6850_monthly_bin171.fits scfile=/scratch/kocevski/289896/ft2_4FGL_J1640.3+6850_monthly_bin171.fits outfile=/scratch/kocevski/289896/cmap_HighResolution_680227201_682819201_4FGL_J1640.3+6850_monthly_bin171.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.82
user 0.64
sys 0.17

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

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/289896/ft1_filtered_4FGL_J1640.3+6850_monthly_bin171.fits', '/scratch/kocevski/289896/ft2_4FGL_J1640.3+6850_monthly_bin171.fits', expMap='/scratch/kocevski/289896/expmap_680227201_682819201_4FGL_J1640.3+6850_monthly_bin171.fits', expCube='/scratch/kocevski/289896/ltcube_680227201_682819201_4FGL_J1640.3+6850_monthly_bin171.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/289896/Model_4FGL_J1640.3+6850_monthly_bin171.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  0.000e+00  1.000e+06 ( 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/289896/ft1_filtered_4FGL_J1640.3+6850_monthly_bin171.fits
Spacecraft file(s): /scratch/kocevski/289896/ft2_4FGL_J1640.3+6850_monthly_bin171.fits
Exposure map: /scratch/kocevski/289896/expmap_680227201_682819201_4FGL_J1640.3+6850_monthly_bin171.fits
Exposure cube: /scratch/kocevski/289896/ltcube_680227201_682819201_4FGL_J1640.3+6850_monthly_bin171.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/289896/Model_4FGL_J1640.3+6850_monthly_bin171.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) = 123984.956381

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    2.0511       1.0000          .0000       .10000E+07
     2 'Prefactor '    3.6848       1.0000          .0000       .10000E+07
     3 'Prefactor '    .18528E-04   1.0000          .0000       .10000E+07
     4 'Prefactor '    .69466E-03   1.0000          .0000       .10000E+07
     5 'Prefactor '    10.046       1.0000          .0000       .10000E+07
     6 'norm      '    1.3234       1.0000          .0000       .10000E+07
     7 'Prefactor '    .29929E-01   1.0000          .0000       .10000E+07
     8 'Prefactor '    .55215E-04   1.0000          .0000       .10000E+07
     9 'norm      '    8.5219       1.0000          .0000       .10000E+07
    10 'Prefactor '    .34089E-06   1.0000          .0000       .10000E+07
    11 'Prefactor '    6.1778       1.0000          .0000       .10000E+07
    12 'Prefactor '    13.131       1.0000          .0000       .10000E+07
    13 'norm      '    17.693       1.0000          .0000       .10000E+07
    14 'Prefactor '    4.6487       1.0000          .0000       .10000E+07
    15 'norm      '    .39413E-08   1.0000          .0000       .10000E+07
    16 'Prefactor '    2.9028       1.0000          .0000       .10000E+07
    17 'Prefactor '    .66759       1.0000          .0000       .10000E+07
    18 'Prefactor '    2.2491       1.0000          .0000       .10000E+07
    19 'Prefactor '    .42633E-07   1.0000          .0000       .10000E+07
    20 'Prefactor '    9.0665       1.0000          .0000       .10000E+07
    21 'Prefactor '    .76971       1.0000          .0000       .10000E+07
    22 'Prefactor '    9.9869       1.0000          .0000       .10000E+07
    23 'norm      '    4.1742       1.0000          .0000       .10000E+07
    24 'norm      '    2.7448       1.0000          .0000       .10000E+07
    25 'norm      '    2.8416       1.0000          .0000       .10000E+07
    26 'Prefactor '    .14575E-04   1.0000          .0000       .10000E+07
    27 'Prefactor '    .98993E-06   1.0000          .0000       .10000E+07
    28 'Prefactor '    5.7252       1.0000          .0000       .10000E+07
    29 'Prefactor '    .26133E-04   1.0000          .0000       .10000E+07
    30 'Normalizat'    .97277       1.0000         .10000E-01   10.000    
    31 'Prefactor '    .99256       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6760E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   123984.9     FROM MIGRAD    STATUS=CONVERGED    149 CALLS     2385 TOTAL
                     EDM=   .14E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.5%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     2.0507        1.1221        .10733E-06   -.74007E-02
   2  Prefactor     3.6758        2.7634       -.75438E-07    .10186E-02
   3  Prefactor     .32568E-05    5.0801       -.18634E-05** at limit **
   4  Prefactor     .13822E-07    7.9421       -.32780E-06** at limit **
   5  Prefactor     10.035        4.0247       -.42920E-07    .23101E-02
   6  norm          1.3239        .43539       -.10142E-06   -.31907E-02
   7  Prefactor     .47456E-06    1.0998       -.45457E-06** at limit **
   8  Prefactor     .22204E-09    2.5758        .58228E-06** at limit **
   9  norm          8.5123        2.9257       -.41469E-06   -.86215E-02
  10  Prefactor     .55511E-10    5.0494       -.10012E-05** at limit **
  11  Prefactor     6.1790        1.7839       -.65291E-07   -.31903E-02
  12  Prefactor     13.131        1.5704       -.80944E-07    .10896    
  13  norm          17.681        2.2988        .95972E-07    .11593E-02
  14  Prefactor     4.6592        3.3429       -.15379E-06   -.22990E-02
  15  norm           .0000        .77766E-01    .90793E-07** at limit **
  16  Prefactor     2.9048        1.7301       -.98214E-08    .31803E-02
  17  Prefactor     .66772        .59873        .28986E-06    .16259E-02
  18  Prefactor     2.2536        2.1749       -.30238E-06   -.13567E-02
  19  Prefactor     .44409E-09    2.5601        .87598E-07** at limit **
  20  Prefactor     9.0642        5.0564       -.42680E-06   -.13443E-01
  21  Prefactor     .77083        1.3381       -.79627E-07   -.58727E-03
  22  Prefactor     9.8289        1.8913        .86955E-07    .82578E-01
  23  norm          4.1739        .59576        .54064E-08   -.33204E-03
  24  norm          2.7447        .21448       -.13890E-07   -.19514E-02
  25  norm          2.8412        .85437        .60069E-07   -.92955E-02
  26  Prefactor     .38858E-09    1.1919       -.38977E-06** at limit **
  27  Prefactor     .97294E-06    10.242       -.23784E-05** at limit **
  28  Prefactor     5.7231        1.4505       -.23801E-06   -.21599E-02
  29  Prefactor     .11102E-09    1.4168        .13966E-08** at limit **
  30  Normalizat    .97284        .48226E-01   -.13829E-06    .12050E-02
  31  Prefactor     .99257        .38821E-01    .12756E-05    .11903E-02
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 2.05069
  Prefactor  = 3.67582
  Prefactor  = 3.25678e-06
  Prefactor  = 1.38223e-08
  Prefactor  = 10.0352
  norm       = 1.32394
  Prefactor  = 4.74565e-07
  Prefactor  = 2.22045e-10
  norm       = 8.51229
  Prefactor  = 5.55112e-11
  Prefactor  = 6.17896
  Prefactor  = 13.1306
  norm       = 17.6811
  Prefactor  = 4.65925
  norm       = 0
  Prefactor  = 2.9048
  Prefactor  = 0.667722
  Prefactor  = 2.2536
  Prefactor  = 4.44089e-10
  Prefactor  = 9.06419
  Prefactor  = 0.770833
  Prefactor  = 9.8289
  norm       = 4.1739
  norm       = 2.74475
  norm       = 2.84117
  Prefactor  = 3.88578e-10
  Prefactor  = 9.72944e-07
  Prefactor  = 5.72309
  Prefactor  = 1.11022e-10
  Normalizat = 0.972841
  Prefactor  = 0.99257
 **********
 **   18 **HESSE 
 **********

 FCN=   123984.9     FROM HESSE     STATUS=OK           716 CALLS     3101 TOTAL
                     EDM=   .65E-05    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     2.0507        5.7433        .72152E-03   -1.5679    
   2  Prefactor     3.6758        2.7664        .52590E-03   -1.5670    
   3  Prefactor     .32568E-05    16.988        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .13822E-07    7.9161        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     10.035        4.0271        .31589E-03   -1.5645    
   6  norm          1.3239        .43995        .95558E-03   -1.5685    
   7  Prefactor     .47456E-06    3.4430        .21205E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .22204E-09    2.5811        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          8.5123        2.9309        .34315E-03   -1.5650    
  10  Prefactor     .55511E-10    5.1849        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     6.1790        1.7838        .40367E-03   -1.5658    
  12  Prefactor     13.131        6.5359        .27616E-03   -1.5635    
  13  norm          17.681        2.3009        .23784E-03   -1.5624    
  14  Prefactor     4.6592        3.3657        .46654E-03   -1.5665    
  15  norm           .0000        .18905E-01    .24455E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     2.9048        1.7710        .59613E-03   -1.5674    
  17  Prefactor     .66772        .61899        .63379E-03   -1.5692    
  18  Prefactor     2.2536        2.2327        .68490E-03   -1.5678    
  19  Prefactor     .44409E-09    .29632        .57216E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     9.0642        5.2004        .33262E-03   -1.5648    
  21  Prefactor     .77083        1.3553        .55221E-03   -1.5690    
  22  Prefactor     9.8289        10.556        .31684E-03   -1.5645    
  23  norm          4.1739        .59743        .49306E-03   -1.5667    
  24  norm          2.7447        .21526        .61424E-03   -1.5675    
  25  norm          2.8412        .85735        .60294E-03   -1.5674    
  26  Prefactor     .38858E-09    1.1991        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  27  Prefactor     .97294E-06    14.280        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  Prefactor     5.7231        1.4571        .41955E-03   -1.5660    
  29  Prefactor     .11102E-09    1.4169        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  30  Normalizat    .97284        .42386E-01    .45825E-01   -.93946    
  31  Prefactor     .99257        .33476E-01    .46174E-01   -.92978    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.51386e-06
Minuit parameter uncertainties:
  1  5.74327
  2  2.76644
  3  0.0148761
  4  0.000660927
  5  4.0271
  6  0.439954
  7  0.00255652
  8  4.63137e-05
  9  2.93089
  10  2.41413e-05
  11  1.78379
  12  6.53591
  13  2.30091
  14  3.36574
  15  3.54128e-07
  16  1.77103
  17  0.61899
  18  2.23269
  19  2.31094e-05
  20  5.2004
  21  1.35534
  22  10.5564
  23  0.597431
  24  0.215261
  25  0.857351
  26  4.37774e-05
  27  0.00745477
  28  1.45706
  29  2.60259e-05
  30  0.0423877
  31  0.0334765
Done.

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

Extracting fit parameters...

4FGL J1640.3+6850
   Spectrum: PowerLaw
350    Prefactor:  1.313e+01  6.536e+00  0.000e+00  1.000e+06 ( 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:  9.926e-01  3.348e-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:  9.728e-01  4.239e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 6.17
Ra Dec: 250.082 68.848
Photon Index (Fixed Index): 2.13 +/- 0.00
Photon Flux (Fixed Index): 9.54e-09 +/- 4.75e-09
Energy Flux (Fixed Index): 4.89e-06 +/- 2.43e-06

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) = 123984.758007
delta logL = 0.0945014060417

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 123984.728024
delta logL = 0.12448439232

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    10.953       1.0000          .0000       .10000E+07
     2 'Index     '    2.2890       1.0000          .0000       10.000    
     3 'Normalizat'    .97072       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .99336       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.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   123984.7     FROM MIGRAD    STATUS=CONVERGED     96 CALLS      289 TOTAL
                     EDM=   .24E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     10.953        8.7719        .12099E-04    .64046E-02
   2  Index         2.2890        .39102        .12158E-01    .27608E-03
   3  Normalizat    .97071        .46696E-01    .26627E-03    .46454E-04
   4  Prefactor     .99337        .38385E-01    .21660E-03    .14277E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 10.9532
  Index      = 2.28896
  Normalizat = 0.970711
  Prefactor  = 0.993368
 **********
 **   18 **HESSE 
 **********

 FCN=   123984.7     FROM HESSE     STATUS=OK            25 CALLS      314 TOTAL
                     EDM=   .19E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     10.953        7.1992        .48396E-06   -1.5642    
   2  Index         2.2890        .32124        .48632E-03   -.57306    
   3  Normalizat    .97071        .46597E-01    .10651E-04   -.94018    
   4  Prefactor     .99337        .38359E-01    .86639E-05   -.92951    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.91336e-10
Minuit parameter uncertainties:
  1  7.19924
  2  0.321557
  3  0.0465993
  4  0.0383598
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/289896': 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) = 123984.728024
delta logL = 0.124484448243

Extracting fit parameters...

4FGL J1640.3+6850
   Spectrum: PowerLaw
350    Prefactor:  1.095e+01  7.199e+00  0.000e+00  1.000e+06 ( 1.000e-14)
351        Index:  2.289e+00  3.216e-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:  9.934e-01  3.836e-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:  9.707e-01  4.660e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 6.41
Ra Dec: 250.082 68.848
Photon Index (Free Index): 2.29 +/- 0.32
Photon Flux (Free Index): 1.15e-08 +/- 6.47e-09
Energy Flux (Free Index): 4.41e-06 +/- 2.28e-06

Creating a high resolution counts map...
INFO: Auto-setting vmin to -2.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  2.220e+00 [aplpy.core]
Saving /scratch/kocevski/289896/cmap_HighResolution_680227201_682819201_4FGL_J1640.3+6850_monthly_bin171.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='9.54e-09', energy_flux2='4.41e-06', photon_flux_error='4.75e-09', dlogl='1.24e-01', energy_flux='4.89e-06', photon_flux2='1.15e-08', job_status='DONE', time_completed='2022-09-17 05:26:34.756420', photon_index_error2='0.32', photon_index2='2.29', ts='6.17', fit_tolerance='1e-08', GAL='0.99', photon_index_error='0.00', energy_flux_error2='2.28e-06', EG='0.97', time_epoch_completed='1663417594.76', return_code='0', job_id='289896', GAL2='0.99', EG2='0.97', return_code2='0', energy_flux_error='2.43e-06', photon_flux_error2='6.47e-09', ts2='6.41', photon_index='2.13' WHERE bin_id='171' AND source_name='4FGL J1640.3+6850' AND cadence='monthly';

Database successfully updated.


Analysis Complete.


Sat Sep 17 05:26:34 PDT 2022


------------------------------------------------------------
Sender: LSF System <lsf@bullet0041>
Subject: Job 289896: <4FGL_J1640.3+6850_monthly_bin171> in cluster <slac> Done

Job <4FGL_J1640.3+6850_monthly_bin171> was submitted from host <rhel6-64f> by user <kocevski> in cluster <slac> at Sat Sep 17 02:20:40 2022
Job was executed on host(s) <bullet0041>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Sep 17 03:01:58 2022
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Sat Sep 17 03:01:58 2022
Terminated at Sat Sep 17 05:26:35 2022
Results reported at Sat Sep 17 05:26:35 2022

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1640.3+6850_monthly_bin171 250.082 68.8483 680227201 682819201 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 :                                   8575.00 sec.
    Max Memory :                                 1099 MB
    Average Memory :                             493.70 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   8677 sec.
    Turnaround time :                            11155 sec.

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

