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 49 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 oDone.


Performing analysis on: 4FGL_J1640.4+3945_daily_bin1702
RA = 250.119, Dec = 39.7626
tmiDone.


Performing analysis on: 4FGL_J1640.4+3945_daily_bin1702
RA = 250.119, Dec = 39.7626
tmin = 680486401, tmax = 680745601
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='235680', job_status='RUN', time_executed='2022-07-29 01:22:39.239710', time_epoch_executed='1659082959.24' WHERE source_name='4FGL J1640.4+3945' and cadence='daily' and bin_id='1702'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/235680

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

Retrieving the FT1 file...

Issuing command:
/afs/slac.stanford.edu/g/glast/ground/bin/datacat find --group FT1 --filter 'nMetStop>=680486401.0 && nMetStart<680745601.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<680745601.0' /Data/Flight/Level1/LPA

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/235680/ft1_4FGL_J1640.4+3945_daily_bin1702.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/235680/ft2_4FGL_J1640.4+3945_daily_bin1702.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/235680/ft1_4FGL_J1640.4+3945_daily_bin1702.fits outfile=/scratch/kocevski/235680/ft1_filteredMKT_4FGL_J1640.4+3945_daily_bin1702.fits ra=250.119 dec=39.7626 rad=12.0 tmin=680486401.0 tmax=680745601.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 2.93
user 2.71
sys 0.20

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/235680/ft2_4FGL_J1640.4+3945_daily_bin1702.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/235680/ft1_filteredMKT_4FGL_J1640.4+3945_daily_bin1702.fits evtable="EVENTS" outfile="/scratch/kocevski/235680/ft1_filtered_4FGL_J1640.4+3945_daily_bin1702.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.34
sys 0.15

Number of photons that the gtmktime cut: 1316

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/235680/ft1_filtered_4FGL_J1640.4+3945_daily_bin1702.fits" evtable="EVENTS" scfile=/scratch/kocevski/235680/ft2_4FGL_J1640.4+3945_daily_bin1702.fits sctable="SC_DATA" outfile=/scratch/kocevski/235680/ltcube_680486401_680745601_4FGL_J1640.4+3945_daily_bin1702.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/235680/ft2_4FGL_J1640.4+3945_daily_bin1702.fits
.....................!
real 14.25
user 13.87
sys 0.31

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/235680/ft1_filtered_4FGL_J1640.4+3945_daily_bin1702.fits evtable="EVENTS" scfile=/scratch/kocevski/235680/ft2_4FGL_J1640.4+3945_daily_bin1702.fits sctable="SC_DATA" expcube=/scratch/kocevski/235680/ltcube_680486401_680745601_4FGL_J1640.4+3945_daily_bin1702.fits outfile=/scratch/kocevski/235680/expmap_680486401_680745601_4FGL_J1640.4+3945_daily_bin1702.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/235680/ltcube_680486401_680745601_4FGL_J1640.4+3945_daily_bin1702.fits
.....................!
real 191.77
user 186.04
sys 4.59

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/235680/ft1_filtered_4FGL_J1640.4+3945_daily_bin1702.fits scfile=/scratch/kocevski/235680/ft2_4FGL_J1640.4+3945_daily_bin1702.fits outfile=/scratch/kocevski/235680/cmap_680486401_680745601_4FGL_J1640.4+3945_daily_bin1702.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/235680/ft1_filtered_4FGL_J1640.4+3945_daily_bin1702.fits scfile=/scratch/kocevski/235680/ft2_4FGL_J1640.4+3945_daily_bin1702.fits outfile=/scratch/kocevski/235680/cmap_HighResolution_680486401_680745601_4FGL_J1640.4+3945_daily_bin1702.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.55
user 0.39
sys 0.16

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    12.229       1.0000         .10000E-03   10000.    
     2 'Prefactor '    44.584       1.0000         .10000E-03   10000.    
     3 'Prefactor '    1.5444       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10023E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10012E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .15280E-02   1.0000         .10000E-03   10000.    
     7 'norm      '    .14766       1.0000         .10000E-03   10000.    
     8 'norm      '    .10011E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    8.3470       1.0000         .10000E-03   10000.    
    10 'Prefactor '    2.1170       1.0000         .10000E-03   10000.    
    11 'norm      '    .10276E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    4.3053       1.0000         .10000E-03   10000.    
    13 'Prefactor '    5.7170       1.0000         .10000E-03   10000.    
    14 'Prefactor '    3.7117       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10277E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    2.8120       1.0000         .10000E-03   10000.    
    17 'norm      '    .19105       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .28090E-03   1.0000         .10000E-03   10000.    
    19 'norm      '    1.1409       1.0000         .10000E-03   10000.    
    20 'norm      '    2.2544       1.0000         .10000E-03   10000.    
    21 'norm      '    1.5980       1.0000         .10000E-03   10000.    
    22 'Prefactor '    .68936       1.0000         .10000E-03   10000.    
    23 'norm      '    1.7792       1.0000         .10000E-03   10000.    
    24 'Prefactor '    .13612E-03   1.0000         .10000E-03   10000.    
    25 'Normalizat'    .81775       1.0000         .10000E-01   10.000    
    26 'Prefactor '    1.1009       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=   13969.75     FROM MIGRAD    STATUS=CONVERGED    646 CALLS     3220 TOTAL
                     EDM=   .12E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.0%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     12.225        10.020       -.56120E-07   -.27343E-04
   2  Prefactor     44.548        43.777       -.29208E-05   -.15829E-03
   3  Prefactor     1.5442        2.5109        .84724E-06   -.21255E-03
   4  Prefactor     .10000E-03    1.5712       -.14105E-06** at limit **
   5  Prefactor     .10000E-03    7.9868       -.13770E-06** at limit **
   6  Prefactor     .10012E-03    .64326       -.49700E-07** at limit **
   7  norm          .14777        .11155        .33359E-07    .60803E-04
   8  norm          .10000E-03    4.6058        .24525E-07** at limit **
   9  Prefactor     8.3342        13.119       -.19165E-06   -.38495E-04
  10  Prefactor     2.1176        1.7628       -.60877E-07   -.13202E-03
  11  norm          .10000E-03    13.920        .44555E-07** at limit **
  12  Prefactor     4.3052        1.5722       -.94870E-08   -.22418E-03
  13  Prefactor     5.7172        1.6433       -.65745E-08   -.27740E-03
  14  Prefactor     3.7117        1.8373       -.12902E-06   -.39841E-03
  15  Prefactor     .10000E-03    .79408        .10425E-06** at limit **
  16  norm          2.8121        1.1161        .40839E-08   -.46149E-04
  17  norm          .19169        .48906        .72336E-06   -.44645E-03
  18  Prefactor     .10000E-03    1.5697       -.30408E-06** at limit **
  19  norm          1.1416        .56270        .31616E-07    .20628E-04
  20  norm          2.2540        2.6678        .53807E-07    .22029E-04
  21  norm          1.5986        1.1310        .10565E-06   -.85585E-04
  22  Prefactor     .90379        9.5438       -.28454E-06    .61200E-04
  23  norm          1.7762        2.6447        .38146E-06   -.73494E-04
  24  Prefactor     .10000E-03    39.620        .58249E-07** at limit **
  25  Normalizat    .81787        .13849       -.17928E-07   -.15226E-03
  26  Prefactor     1.1008        .11270       -.70117E-06   -.32886E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 12.2247
  Prefactor  = 44.5479
  Prefactor  = 1.5442
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.000100124
  norm       = 0.147772
  norm       = 0.0001
  Prefactor  = 8.33418
  Prefactor  = 2.11757
  norm       = 0.0001
  Prefactor  = 4.3052
  Prefactor  = 5.71717
  Prefactor  = 3.71173
  Prefactor  = 0.0001
  norm       = 2.81214
  norm       = 0.191695
  Prefactor  = 0.0001
  norm       = 1.14159
  norm       = 2.25399
  norm       = 1.59864
  Prefactor  = 0.903788
  norm       = 1.77616
  Prefactor  = 0.0001
  Normalizat = 0.817874
  Prefactor  = 1.10076
 **********
 **   18 **HESSE 
 **********

 FCN=   13969.75     FROM HESSE     STATUS=OK           482 CALLS     3702 TOTAL
                     EDM=   .78E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     12.225        10.024        .11455E-03   -1.5009    
   2  Prefactor     44.548        45.587        .60044E-04   -1.4372    
   3  Prefactor     1.5442        2.5194        .22517E-03   -1.5459    
   4  Prefactor     .10000E-03    1.5848        .14447E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    8.0276        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10012E-03    1.1035        .34340E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  norm          .14777        .10300        .27791E-03   -1.5631    
   8  norm          .10000E-03    4.6162        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     8.3342        12.803        .13876E-03   -1.5131    
  10  Prefactor     2.1176        1.7662        .13767E-03   -1.5417    
  11  norm          .10000E-03    13.934        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     4.3052        1.6204        .59077E-04   -1.5293    
  13  Prefactor     5.7172        1.6973        .54143E-04   -1.5230    
  14  Prefactor     3.7117        1.8276        .10694E-03   -1.5323    
  15  Prefactor     .10000E-03    1.4169        .20098E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          2.8121        1.1164        .75658E-04   -1.5373    
  17  norm          .19169        .49509        .12340E-03   -1.5620    
  18  Prefactor     .10000E-03    5.0311        .27235E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  norm          1.1416        .53897        .58316E-04   -1.5494    
  20  norm          2.2540        2.6594        .20372E-03   -1.5408    
  21  norm          1.5986        1.1157        .10013E-03   -1.5455    
  22  Prefactor     .90379        72.470        .69710E-02   -1.5518    
  23  norm          1.7762        2.6123        .22363E-03   -1.5441    
  24  Prefactor     .10000E-03    39.919        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Normalizat    .81787        .16237        .29598E-03   -.99409    
  26  Prefactor     1.1008        .13345        .22082E-03   -.89442    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 7.7695e-10
Minuit parameter uncertainties:
  1  10.0251
  2  45.623
  3  2.51954
  4  7.213e-06
  5  2.10117e-05
  6  0.000739362
  7  0.102999
  8  1.36554e-06
  9  12.8071
  10  1.76623
  11  4.42184e-06
  12  1.62043
  13  1.69729
  14  1.82764
  15  4.30015e-06
  16  1.11643
  17  0.495104
  18  4.87364e-05
  19  0.538971
  20  2.65956
  21  1.11569
  22  16.2055
  23  2.61245
  24  1.83671e-06
  25  0.162471
  26  0.133486
Done.

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

Extracting fit parameters...

4FGL J1640.4+3945
   Spectrum: PowerLaw
308    Prefactor:  4.305e+00  1.620e+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.101e+00  1.335e-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:  8.179e-01  1.625e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 31.07
Ra Dec: 250.119 39.763
Photon Index (Fixed Index): 2.42 +/- 0.00
Photon Flux (Fixed Index): 1.70e-07 +/- 6.39e-08
Energy Flux (Fixed Index): 5.42e-05 +/- 2.04e-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) = 13967.9377808
delta logL = 1.81455540099

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 13967.9376691
delta logL = 1.8146670672

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    6.4845       1.0000         .10000E-03   10000.    
     2 'Index     '    2.0414       1.0000          .0000       10.000    
     3 'Normalizat'    .85782       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0789       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.
 MACHINE ACCURACY LIMITS FURTHER IMPROVEMENT.

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   13967.94     FROM MIGRAD    STATUS=CONVERGED     86 CALLS      255 TOTAL
                     EDM=   .26E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     6.4845        1.9350        .39198E-03   -.29311E-03
   2  Index         2.0414        .19618        .43093E-02    .28342E-03
   3  Normalizat    .85782        .15573        .29022E-03   -.16460E-03
   4  Prefactor     1.0789        .13176        .22290E-03   -.20575E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 6.4845
  Index      = 2.04136
  Normalizat = 0.857823
  Prefactor  = 1.07888
 **********
 **   18 **HESSE 
 **********

 FCN=   13967.94     FROM HESSE     STATUS=OK            25 CALLS      280 TOTAL
                     EDM=   .20E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     6.4845        1.9021        .15679E-04   -1.5199    
   2  Index         2.0414        .19273        .17237E-03   -.63320    
   3  Normalizat    .85782        .15584        .11609E-04   -.97958    
   4  Prefactor     1.0789        .13187        .44580E-04   -.90144    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.96526e-10
Minuit parameter uncertainties:
  1  1.90213
  2  0.192808
  3  0.155922
  4  0.131908
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/235680': 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) = 13967.9376691
delta logL = 1.81466706733

Extracting fit parameters...

4FGL J1640.4+3945
   Spectrum: PowerLaw
308    Prefactor:  6.484e+00  1.902e+00  1.000e-04  1.000e+04 ( 1.000e-12)
309        Index:  2.041e+00  1.928e-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:  1.079e+00  1.319e-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:  8.578e-01  1.559e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 37.05
Ra Dec: 250.119 39.763
Photon Index (Free Index): 2.04 +/- 0.19
Photon Flux (Free Index): 1.29e-07 +/- 4.41e-08
Energy Flux (Free Index): 8.09e-05 +/- 2.94e-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/235680/cmap_HighResolution_680486401_680745601_4FGL_J1640.4+3945_daily_bin1702.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='1.70e-07', energy_flux2='8.09e-05', photon_flux_error='6.39e-08', dlogl='1.81e+00', energy_flux='5.42e-05', photon_flux2='1.29e-07', job_status='DONE', time_completed='2022-07-29 01:43:21.529210', photon_index_error2='0.19', photon_index2='2.04', ts='31.07', fit_tolerance='1e-08', GAL='1.10', photon_index_error='0.00', energy_flux_error2='2.94e-05', EG='0.82', time_epoch_completed='1659084201.53', return_code='0', job_id='235680', GAL2='1.08', EG2='0.86', return_code2='0', energy_flux_error='2.04e-05', photon_flux_error2='4.41e-08', ts2='37.05', photon_index='2.42' WHERE bin_id='1702' AND source_name='4FGL J1640.4+3945' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Fri Jul 29 01:43:21 PDT 2022

9>
Subject: Job 235415: <4FGL_J1640.4+3945_daily_bin1702> in cluster <slac> Done

Job <4FGL_J1640.4+3945_daily_bin1702> was submitted from host <rhel6-64k> by user <kocevski> in cluster <slac> at Fri Jul 29 00:07:07 2022
Job was executed on host(s) <bullet0139>, in queue <medium>, as user <kocevski> in cluster <slac> at Fri Jul 29 01:18:28 2022
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Fri Jul 29 01:18:28 2022
Terminated at Fri Jul 29 01:40:26 2022
Results reported at Fri Jul 29 01:40:26 2022

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1640.4+3945_daily_bin1702 250.119 39.7626 680486401 680745601 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 :                                   1246.00 sec.
    Max Memory :                                 1258 MB
    Average Memory :                             362.02 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   1318 sec.
    Turnaround time :                            5599 sec.

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


------------------------------------------------------------
Sender: LSF System <lsf@bullet0157>
Subject: Job 235680: <4FGL_J1640.4+3945_daily_bin1702> in cluster <slac> Done

Job <4FGL_J1640.4+3945_daily_bin1702> was submitted from host <rhel6-64p> by user <kocevski> in cluster <slac> at Fri Jul 29 00:07:18 2022
Job was executed on host(s) <bullet0157>, in queue <medium>, as user <kocevski> in cluster <slac> at Fri Jul 29 01:21:42 2022
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Fri Jul 29 01:21:42 2022
Terminated at Fri Jul 29 01:43:22 2022
Results reported at Fri Jul 29 01:43:22 2022

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1640.4+3945_daily_bin1702 250.119 39.7626 680486401 680745601 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 :                                   1240.56 sec.
    Max Memory :                                 625 MB
    Average Memory :                             323.70 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   2931 MB
    Max Processes :                              6
    Max Threads :                                21
    Run time :                                   1299 sec.
    Turnaround time :                            5764 sec.

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

