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


Performing analysis on: 4FGL_J1640.4+3945_daily_bin1777
RA = 250.119, Dec = 39.7626
tmin = 699926401, tmax = 700185601
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='918320', job_status='RUN', time_executed='2023-03-11 00:55:49.078990', time_epoch_executed='1678524949.08' WHERE source_name='4FGL J1640.4+3945' and cadence='daily' and bin_id='1777'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/918320

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/918320/ft1_4FGL_J1640.4+3945_daily_bin1777.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/918320/ft2_4FGL_J1640.4+3945_daily_bin1777.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/918320/ft1_4FGL_J1640.4+3945_daily_bin1777.fits outfile=/scratch/kocevski/918320/ft1_filteredMKT_4FGL_J1640.4+3945_daily_bin1777.fits ra=250.119 dec=39.7626 rad=12.0 tmin=699926401.0 tmax=700185601.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 3.68
user 3.42
sys 0.22

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

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

Number of photons that the gtmktime cut: 723

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/918320/ft1_filtered_4FGL_J1640.4+3945_daily_bin1777.fits evtable="EVENTS" scfile=/scratch/kocevski/918320/ft2_4FGL_J1640.4+3945_daily_bin1777.fits sctable="SC_DATA" expcube=/scratch/kocevski/918320/ltcube_699926401_700185601_4FGL_J1640.4+3945_daily_bin1777.fits outfile=/scratch/kocevski/918320/expmap_699926401_700185601_4FGL_J1640.4+3945_daily_bin1777.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/918320/ltcube_699926401_700185601_4FGL_J1640.4+3945_daily_bin1777.fits
.....................!
real 190.51
user 185.62
sys 4.34

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/918320/ft1_filtered_4FGL_J1640.4+3945_daily_bin1777.fits scfile=/scratch/kocevski/918320/ft2_4FGL_J1640.4+3945_daily_bin1777.fits outfile=/scratch/kocevski/918320/cmap_699926401_700185601_4FGL_J1640.4+3945_daily_bin1777.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.57
user 0.41
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/918320/ft1_filtered_4FGL_J1640.4+3945_daily_bin1777.fits scfile=/scratch/kocevski/918320/ft2_4FGL_J1640.4+3945_daily_bin1777.fits outfile=/scratch/kocevski/918320/cmap_HighResolution_699926401_700185601_4FGL_J1640.4+3945_daily_bin1777.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.40
sys 0.15

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

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/918320/ft1_filtered_4FGL_J1640.4+3945_daily_bin1777.fits', '/scratch/kocevski/918320/ft2_4FGL_J1640.4+3945_daily_bin1777.fits', expMap='/scratch/kocevski/918320/expmap_699926401_700185601_4FGL_J1640.4+3945_daily_bin1777.fits', expCube='/scratch/kocevski/918320/ltcube_699926401_700185601_4FGL_J1640.4+3945_daily_bin1777.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/918320/Model_4FGL_J1640.4+3945_daily_bin1777.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  0.000e+00  1.000e+06 ( 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/918320/ft1_filtered_4FGL_J1640.4+3945_daily_bin1777.fits
Spacecraft file(s): /scratch/kocevski/918320/ft2_4FGL_J1640.4+3945_daily_bin1777.fits
Exposure map: /scratch/kocevski/918320/expmap_699926401_700185601_4FGL_J1640.4+3945_daily_bin1777.fits
Exposure cube: /scratch/kocevski/918320/ltcube_699926401_700185601_4FGL_J1640.4+3945_daily_bin1777.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/918320/Model_4FGL_J1640.4+3945_daily_bin1777.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) = 7906.04193548

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    32.669       1.0000          .0000       .10000E+07
     2 'Prefactor '    79.980       1.0000          .0000       .10000E+07
     3 'Prefactor '    1.7751       1.0000          .0000       .10000E+07
     4 'Prefactor '    .80810E-04   1.0000          .0000       .10000E+07
     5 'Prefactor '    .25374E-03   1.0000          .0000       .10000E+07
     6 'Prefactor '    3.9017       1.0000          .0000       .10000E+07
     7 'norm      '    .15199       1.0000          .0000       .10000E+07
     8 'norm      '    .29253E-03   1.0000          .0000       .10000E+07
     9 'Prefactor '    .15758E-03   1.0000          .0000       .10000E+07
    10 'Prefactor '    2.6210       1.0000          .0000       .10000E+07
    11 'norm      '    .13724E-03   1.0000          .0000       .10000E+07
    12 'Prefactor '    3.1073       1.0000          .0000       .10000E+07
    13 'Prefactor '    .13787E-03   1.0000          .0000       .10000E+07
    14 'Prefactor '    .26854E-03   1.0000          .0000       .10000E+07
    15 'Prefactor '    .87797E-04   1.0000          .0000       .10000E+07
    16 'norm      '    1.0218       1.0000          .0000       .10000E+07
    17 'norm      '    .12601E-07   1.0000          .0000       .10000E+07
    18 'Prefactor '    .88328E-05   1.0000          .0000       .10000E+07
    19 'norm      '    .19179E-06   1.0000          .0000       .10000E+07
    20 'norm      '    10.278       1.0000          .0000       .10000E+07
    21 'norm      '    4.8926       1.0000          .0000       .10000E+07
    22 'norm      '    19.606       1.0000          .0000       .10000E+07
    23 'Prefactor '    .52979       1.0000          .0000       .10000E+07
    24 'Normalizat'    1.0124       1.0000         .10000E-01   10.000    
    25 'Prefactor '    .95674       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6620E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   7906.039     FROM MIGRAD    STATUS=CONVERGED    183 CALLS     2277 TOTAL
                     EDM=   .83E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .4%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     32.516        2.2578        .29260E-06   -.14672    
   2  Prefactor     82.223        69.223       -.28166E-05   -.16275E-02
   3  Prefactor     1.7899        2.6849        .29177E-06    .12019E-02
   4  Prefactor      .0000        1.9721       -.33874E-06** at limit **
   5  Prefactor     .44409E-09    6.4690       -.89273E-06** at limit **
   6  Prefactor     3.8883        2.7865        .39656E-06   -.17634E-02
   7  norm          .15208        .10137        .35576E-08** at limit **
   8  norm          .11102E-09    5.8800       -.39359E-05** at limit **
   9  Prefactor      .0000        4.3299       -.10389E-05** at limit **
  10  Prefactor     2.6570        3.8673       -.23691E-06   -.10160E-02
  11  norm          .50571E-07    40.939        .58721E-05** at limit **
  12  Prefactor     3.1095        1.2346       -.27767E-06   -.26806E-01
  13  Prefactor     .11102E-09    7.3098       -.19232E-05** at limit **
  14  Prefactor      .0000        1.4639        .21592E-06** at limit **
  15  Prefactor      .0000        1.3413        .16157E-06** at limit **
  16  norm          1.0216        .88312       -.29130E-06    .39088E-02
  17  norm           .0000        .19395       -.16258E-06** at limit **
  18  Prefactor     .55511E-10    7.9272        .44361E-05** at limit **
  19  norm           .0000        .43854       -.96797E-07** at limit **
  20  norm          10.285        3.2041        .58476E-07    .44574E-01
  21  norm          4.8954        2.0005        .14550E-06   -.19757E-02
  22  norm          19.624        6.3111       -.93628E-07   -.31621E-01
  23  Prefactor     .11879E-07    65.916       -.19304E-05** at limit **
  24  Normalizat    1.0116        .21487        .28562E-06   -.55257E-04
  25  Prefactor     .95696        .17080       -.68277E-05   -.11466E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 32.516
  Prefactor  = 82.2229
  Prefactor  = 1.78995
  Prefactor  = 0
  Prefactor  = 4.44089e-10
  Prefactor  = 3.88828
  norm       = 0.152079
  norm       = 1.11022e-10
  Prefactor  = 0
  Prefactor  = 2.65695
  norm       = 5.05707e-08
  Prefactor  = 3.10951
  Prefactor  = 1.11022e-10
  Prefactor  = 0
  Prefactor  = 0
  norm       = 1.02161
  norm       = 0
  Prefactor  = 5.55112e-11
  norm       = 0
  norm       = 10.2845
  norm       = 4.89537
  norm       = 19.624
  Prefactor  = 1.18794e-08
  Normalizat = 1.01161
  Prefactor  = 0.956961
 **********
 **   18 **HESSE 
 **********

 FCN=   7906.039     FROM HESSE     STATUS=OK           483 CALLS     2760 TOTAL
                     EDM=   .69E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     32.516        31.883        .17498E-03   -1.5594    
   2  Prefactor     82.223        69.046        .11182E-03   -1.5527    
   3  Prefactor     1.7899        2.7042        .78547E-03   -1.5681    
   4  Prefactor      .0000        1.9700        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .44409E-09    6.4582        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     3.8883        2.7863        .51054E-03   -1.5669    
   7  norm          .15208        .10206        .48090E-03   -1.5700    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .11102E-09    5.8959        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor      .0000        4.3319        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     2.6570        3.8678        .62971E-03   -1.5675    
  11  norm          .50571E-07    40.936        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     3.1095        1.5666        .57500E-03   -1.5673    
  13  Prefactor     .11102E-09    .84629        .36098E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor      .0000        1.4616        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor      .0000        1.3424        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          1.0216        .89303        .12744E-02   -1.5688    
  17  norm           .0000        .19384        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .55511E-10    7.8375        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  norm           .0000        .42733        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  norm          10.285        8.9356        .31229E-03   -1.5644    
  21  norm          4.8954        2.0112        .45450E-03   -1.5664    
  22  norm          19.624        7.4810        .22592E-03   -1.5619    
  23  Prefactor     .11879E-07    65.961        .75768E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Normalizat    1.0116        .18437        .44861E-01   -.92643    
  25  Prefactor     .95696        .14454        .45724E-01   -.94178    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.92197e-07
Minuit parameter uncertainties:
  1  31.8834
  2  69.0464
  3  2.70417
  4  1.28909e-05
  5  0.000103772
  6  2.78627
  7  0.102064
  8  5.40559e-05
  9  3.57145e-06
  10  3.86779
  11  0.00287783
  12  1.56657
  13  1.96767e-05
  14  8.89904e-06
  15  9.01558e-06
  16  0.893026
  17  1.02169e-06
  18  4.97741e-05
  19  1.25922e-06
  20  8.9356
  21  2.01121
  22  7.48103
  23  0.00177191
  24  0.18449
  25  0.144602
Done.

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

Extracting fit parameters...

4FGL J1640.4+3945
   Spectrum: PowerLaw
308    Prefactor:  3.110e+00  1.567e+00  0.000e+00  1.000e+06 ( 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:  9.570e-01  1.446e-01  0.000e+00  1.000e+01 ( 1.000e+00)
660        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
661        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
658   Normalization:  1.012e+00  1.845e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 11.82
Ra Dec: 250.119 39.763
Photon Index (Fixed Index): 2.42 +/- 0.00
Photon Flux (Fixed Index): 1.23e-07 +/- 6.18e-08
Energy Flux (Fixed Index): 3.91e-05 +/- 1.97e-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) = 7905.92767066
delta logL = 0.111425389448

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 7905.9176064
delta logL = 0.121489647104

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    3.7946       1.0000          .0000       .10000E+07
     2 'Index     '    2.2658       1.0000          .0000       10.000    
     3 'Normalizat'    1.0252       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .94863       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6620E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   7905.918     FROM MIGRAD    STATUS=CONVERGED     54 CALLS      234 TOTAL
                     EDM=   .54E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     3.7941        21.024        .51795E-03    .30638E-02
   2  Index         2.2661        2.3463        .10292        .17080E-03
   3  Normalizat    1.0252        .84346E-01    .61579E-01    .16676E-04
   4  Prefactor     .94867        .61595E-01    .45622E-01    .11033E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 3.79407
  Index      = 2.2661
  Normalizat = 1.02523
  Prefactor  = 0.948674
 **********
 **   18 **HESSE 
 **********

 FCN=   7905.918     FROM HESSE     STATUS=OK            33 CALLS      267 TOTAL
                     EDM=   .44E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     3.7941        2.0216        .62874E-05   -1.5669    
   2  Index         2.2661        .31919        .40647E-02   -.57851    
   3  Normalizat    1.0252        .20934        .27234E-03   -.92190    
   4  Prefactor     .94867        .17004        .23065E-03   -.94460    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.39414e-12
Minuit parameter uncertainties:
  1  2.02164
  2  0.319496
  3  0.209503
  4  0.170134
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/918320': 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) = 7905.91760565
delta logL = 0.121490398031

Extracting fit parameters...

4FGL J1640.4+3945
   Spectrum: PowerLaw
308    Prefactor:  3.794e+00  2.022e+00  0.000e+00  1.000e+06 ( 1.000e-12)
309        Index:  2.266e+00  3.195e-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:  9.487e-01  1.701e-01  0.000e+00  1.000e+01 ( 1.000e+00)
660        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
661        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
658   Normalization:  1.025e+00  2.095e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 12.13
Ra Dec: 250.119 39.763
Photon Index (Free Index): 2.27 +/- 0.32
Photon Flux (Free Index): 1.12e-07 +/- 4.87e-08
Energy Flux (Free Index): 4.48e-05 +/- 2.23e-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/918320/cmap_HighResolution_699926401_700185601_4FGL_J1640.4+3945_daily_bin1777.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='1.23e-07', energy_flux2='4.48e-05', photon_flux_error='6.18e-08', dlogl='1.21e-01', energy_flux='3.91e-05', photon_flux2='1.12e-07', job_status='DONE', time_completed='2023-03-11 01:07:56.475567', photon_index_error2='0.32', photon_index2='2.27', ts='11.82', fit_tolerance='1e-08', GAL='0.96', photon_index_error='0.00', energy_flux_error2='2.23e-05', EG='1.01', time_epoch_completed='1678525676.48', return_code='0', job_id='918320', GAL2='0.95', EG2='1.03', return_code2='0', energy_flux_error='1.97e-05', photon_flux_error2='4.87e-08', ts2='12.13', photon_index='2.42' WHERE bin_id='1777' AND source_name='4FGL J1640.4+3945' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Mar 11 01:07:56 PST 2023


------------------------------------------------------------
Sender: LSF System <lsf@bullet0049>
Subject: Job 918320: <4FGL_J1640.4+3945_daily_bin1777> in cluster <slac> Done

Job <4FGL_J1640.4+3945_daily_bin1777> was submitted from host <rhel6-64q> by user <kocevski> in cluster <slac> at Sat Mar 11 00:55:33 2023
Job was executed on host(s) <bullet0049>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Mar 11 00:55:38 2023
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Sat Mar 11 00:55:38 2023
Terminated at Sat Mar 11 01:07:56 2023
Results reported at Sat Mar 11 01:07:56 2023

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1640.4+3945_daily_bin1777 250.119 39.7626 699926401 700185601 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 :                                   729.00 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             340.46 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   738 sec.
    Turnaround time :                            743 sec.

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

