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 232 seconds before starting...
Proceeding.

Importing modules...
This is make3FGLxml version 01r0.
The default diffuse model files and names are for pass 8 and assume you have v10r00p05 of the Fermi Science Tools or higher.
This is make4FGLxml version 01r04.
The default diffuse model files and names are for pass 8 and 4FGL and assume you have v11r5p3 of the Fermi Science Tools or higher.

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

/nfs/farm/g/glast/g/LCRepository/bin/miniconda2/envs/fermitools_v1.0.5/lib/python2.7/site-packages/matplotlib/cbook/deprecation.py:106: MatplotlibDeprecationWarning: The mpl_toolkits.axes_grid module was deprecated in version 2.1. Use mpl_toolkits.axes_grid1 and mpl_toolkits.axisartist provies the same functionality instead.
  warnings.warn(message, mplDeprecation, stacklevel=1)

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

number of points = 7530
number of fields = 31
RA_SUN column already exists. File will not be modified.DDone.


Performing analysis on: 4FGL_J1738.2+4000_daily_bin1674
RA = 264.56, Dec = 40.0099
tmin = 673228801, tmax = 673488001
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='671086', job_status='RUN', time_executed='2022-05-06 03:01:56.540318', time_epoch_executed='1651831316.54' WHERE source_name='4FGL J1738.2+4000' and cadence='daily' and bin_id='1674'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/671086

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/671086/ft1_4FGL_J1738.2+4000_daily_bin1674.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/671086/ft2_4FGL_J1738.2+4000_daily_bin1674.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/671086/ft1_4FGL_J1738.2+4000_daily_bin1674.fits outfile=/scratch/kocevski/671086/ft1_filteredMKT_4FGL_J1738.2+4000_daily_bin1674.fits ra=264.56 dec=40.0099 rad=12.0 tmin=673228801.0 tmax=673488001.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.80
user 2.55
sys 0.22

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/671086/ft2_4FGL_J1738.2+4000_daily_bin1674.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/671086/ft2_4FGL_J1738.2+4000_daily_bin1674.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/671086/ft1_filteredMKT_4FGL_J1738.2+4000_daily_bin1674.fits evtable="EVENTS" outfile="/scratch/kocevski/671086/ft1_filtered_4FGL_J1738.2+4000_daily_bin1674.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.53
user 0.33
sys 0.14

Number of photons that the gtmktime cut: 1489

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/671086/ft1_filtered_4FGL_J1738.2+4000_daily_bin1674.fits" evtable="EVENTS" scfile=/scratch/kocevski/671086/ft2_4FGL_J1738.2+4000_daily_bin1674.fits sctable="SC_DATA" outfile=/scratch/kocevski/671086/ltcube_673228801_673488001_4FGL_J1738.2+4000_daily_bin1674.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/671086/ft2_4FGL_J1738.2+4000_daily_bin1674.fits
.....................!
real 14.00
user 13.57
sys 0.29

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/671086/ft1_filtered_4FGL_J1738.2+4000_daily_bin1674.fits evtable="EVENTS" scfile=/scratch/kocevski/671086/ft2_4FGL_J1738.2+4000_daily_bin1674.fits sctable="SC_DATA" expcube=/scratch/kocevski/671086/ltcube_673228801_673488001_4FGL_J1738.2+4000_daily_bin1674.fits outfile=/scratch/kocevski/671086/expmap_673228801_673488001_4FGL_J1738.2+4000_daily_bin1674.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/671086/ltcube_673228801_673488001_4FGL_J1738.2+4000_daily_bin1674.fits
.....................!
real 193.61
user 185.07
sys 4.78

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

Setting source of interest to:
4FGL J1738.2+4000 @ 264.56 40.0099

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/671086/ft1_filtered_4FGL_J1738.2+4000_daily_bin1674.fits scfile=/scratch/kocevski/671086/ft2_4FGL_J1738.2+4000_daily_bin1674.fits outfile=/scratch/kocevski/671086/cmap_673228801_673488001_4FGL_J1738.2+4000_daily_bin1674.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=264.56 yref=40.0099 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.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/671086/ft1_filtered_4FGL_J1738.2+4000_daily_bin1674.fits scfile=/scratch/kocevski/671086/ft2_4FGL_J1738.2+4000_daily_bin1674.fits outfile=/scratch/kocevski/671086/cmap_HighResolution_673228801_673488001_4FGL_J1738.2+4000_daily_bin1674.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=264.56 yref=40.0099 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/671086/ft1_filtered_4FGL_J1738.2+4000_daily_bin1674.fits evtable="EVENTS" scfile=/scratch/kocevski/671086/ft2_4FGL_J1738.2+4000_daily_bin1674.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/671086/Model_4FGL_J1738.2+4000_daily_bin1674.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/671086/ft1_filtered_4FGL_J1738.2+4000_daily_bin1674.fits.....................!
real 116.96
user 114.26
sys 1.26

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/671086/ft1_filtered_4FGL_J1738.2+4000_daily_bin1674.fits', '/scratch/kocevski/671086/ft2_4FGL_J1738.2+4000_daily_bin1674.fits', expMap='/scratch/kocevski/671086/expmap_673228801_673488001_4FGL_J1738.2+4000_daily_bin1674.fits', expCube='/scratch/kocevski/671086/ltcube_673228801_673488001_4FGL_J1738.2+4000_daily_bin1674.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/671086/Model_4FGL_J1738.2+4000_daily_bin1674.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1738.2+4000'

4FGL J1738.2+4000
   Spectrum: PowerLaw
326    Prefactor:  6.394e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-14)
327        Index:  2.517e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
328        Scale:  1.525e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/671086/ft1_filtered_4FGL_J1738.2+4000_daily_bin1674.fits
Spacecraft file(s): /scratch/kocevski/671086/ft2_4FGL_J1738.2+4000_daily_bin1674.fits
Exposure map: /scratch/kocevski/671086/expmap_673228801_673488001_4FGL_J1738.2+4000_daily_bin1674.fits
Exposure cube: /scratch/kocevski/671086/ltcube_673228801_673488001_4FGL_J1738.2+4000_daily_bin1674.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/671086/Model_4FGL_J1738.2+4000_daily_bin1674.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) = 15663.0639166

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    1.5705       1.0000         .10000E-03   10000.    
     3 'Prefactor '    2.1825       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .11696E-03   1.0000         .10000E-03   10000.    
     5 'norm      '    3.4528       1.0000         .10000E-03   10000.    
     6 'norm      '    .79189       1.0000         .10000E-03   10000.    
     7 'Prefactor '    1.9051       1.0000         .10000E-03   10000.    
     8 'norm      '    .67023E-01   1.0000         .10000E-03   10000.    
     9 'norm      '    5.4828       1.0000         .10000E-03   10000.    
    10 'norm      '    4.2862       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .24319E-02   1.0000         .10000E-03   10000.    
    12 'Prefactor '    18.167       1.0000         .10000E-03   10000.    
    13 'norm      '    .10018E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    3.5403       1.0000         .10000E-03   10000.    
    15 'Prefactor '    21.585       1.0000         .10000E-03   10000.    
    16 'norm      '    1.4794       1.0000         .10000E-03   10000.    
    17 'Prefactor '    71.669       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .29863E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    1.2653       1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10023E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10031E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    15.164       1.0000         .10000E-03   10000.    
    23 'norm      '    .32684       1.0000         .10000E-03   10000.    
    24 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    25 'norm      '    9.3588       1.0000         .10000E-03   10000.    
    26 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    27 'Prefactor '    .91144       1.0000         .10000E-03   10000.    
    28 'Normalizat'    1.3100       1.0000         .10000E-01   10.000    
    29 'Prefactor '    .89638       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6840E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   15663.05     FROM MIGRAD    STATUS=CONVERGED    766 CALLS     3831 TOTAL
                     EDM=   .12E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .6%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .10000E-03    10.359        .61396E-06** at limit **
   2  Prefactor     1.5707        1.1401        .27231E-08   -.19537E-04
   3  Prefactor     2.1826        1.1582       -.12669E-08    .32239E-05
   4  Prefactor     .10000E-03    .72159       -.40950E-07** at limit **
   5  norm          3.4530        1.1447        .44921E-09    .21189E-04
   6  norm          .79195        .54349       -.60554E-08   -.82766E-04
   7  Prefactor     1.9054        .66748        .48304E-07   -.14562E-02
   8  norm          .66658E-01    .23241       -.16922E-07   -.12712E-03
   9  norm          5.4829        4.6450        .73322E-06    .25685E-04
  10  norm          4.2859        1.3195        .41507E-08   -.40963E-03
  11  Prefactor     .10008E-03    .97509       -.47131E-07** at limit **
  12  Prefactor     18.160        26.833        .28089E-05    .63178E-05
  13  norm          .10000E-03    1.6029        .51419E-06** at limit **
  14  Prefactor     3.5286        123.14       -.18024E-04   -.10993E-04
  15  Prefactor     21.587        47.772       -.43128E-06    .10406E-04
  16  norm          1.4793        3.0600        .46381E-07   -.17450E-03
  17  Prefactor     71.578        33.700       -.18280E-05   -.30141E-03
  18  Prefactor     .10000E-03    117.86        .28685E-04** at limit **
  19  Prefactor     1.2623        20.933       -.46066E-05   -.15232E-04
  20  Prefactor     .10000E-03    4.1853       -.89038E-07** at limit **
  21  Prefactor     .10000E-03    9.9439       -.64815E-06** at limit **
  22  Prefactor     15.162        25.141        .42888E-06    .59570E-06
  23  norm          .33131        1.0917        .25776E-06   -.76158E-04
  24  norm          .10000E-03    15.735        .11296E-06** at limit **
  25  norm          9.3584        6.3072        .21445E-05   -.86274E-04
  26  Prefactor     .10000E-03    1.5957       -.34846E-06** at limit **
  27  Prefactor     .91264        1.9894        .58260E-07   -.27896E-05
  28  Normalizat    1.3100        .15189        .10524E-06   -.15472E-03
  29  Prefactor     .89633        .90932E-01   -.85909E-07   -.14624E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 0.0001
  Prefactor  = 1.57075
  Prefactor  = 2.18261
  Prefactor  = 0.0001
  norm       = 3.45297
  norm       = 0.79195
  Prefactor  = 1.90539
  norm       = 0.0666584
  norm       = 5.48294
  norm       = 4.28589
  Prefactor  = 0.000100076
  Prefactor  = 18.1601
  norm       = 0.0001
  Prefactor  = 3.52865
  Prefactor  = 21.5866
  norm       = 1.47931
  Prefactor  = 71.5785
  Prefactor  = 0.000100002
  Prefactor  = 1.26227
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 15.1622
  norm       = 0.331311
  norm       = 0.0001
  norm       = 9.35835
  Prefactor  = 0.0001
  Prefactor  = 0.912644
  Normalizat = 1.31001
  Prefactor  = 0.896332
 **********
 **   18 **HESSE 
 **********

 FCN=   15663.05     FROM HESSE     STATUS=OK           581 CALLS     4412 TOTAL
                     EDM=   .21E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .10000E-03    10.371        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     1.5707        1.1740        .84564E-04   -1.5457    
   3  Prefactor     2.1826        1.1978        .72511E-04   -1.5412    
   4  Prefactor     .10000E-03    1.6292        .20510E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          3.4530        1.1450        .74699E-04   -1.5336    
   6  norm          .79195        .52258        .73715E-03   -1.5530    
   7  Prefactor     1.9054        3.4446        .14821E-02   -1.5432    
   8  norm          .66658E-01    .41349        .10690E-02   -1.5656    
   9  norm          5.4829        4.6395        .17160E-03   -1.5240    
  10  norm          4.2859        1.3225        .75732E-04   -1.5294    
  11  Prefactor     .10008E-03    .89404        .43866E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     18.160        26.828        .93967E-04   -1.4855    
  13  norm          .10000E-03    1.6228        .15459E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     3.5286        123.45        .21483E-03   -1.5332    
  15  Prefactor     21.587        47.651        .86212E-04   -1.4778    
  16  norm          1.4793        3.0243        .29981E-03   -1.5465    
  17  Prefactor     71.578        33.991        .47421E-04   -1.4014    
  18  Prefactor     .10000E-03    120.19        .42783E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     1.2623        20.703        .39606E-03   -1.5483    
  20  Prefactor     .10000E-03    4.3109        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .10000E-03    9.9699        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     15.162        25.136        .10285E-03   -1.4929    
  23  norm          .33131        1.9200        .22060E-02   -1.5593    
  24  norm          .10000E-03    15.745        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  norm          9.3584        6.2990        .13100E-03   -1.5096    
  26  Prefactor     .10000E-03    1.6220        .15429E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  27  Prefactor     .91264        1.9178        .25139E-02   -1.5517    
  28  Normalizat    1.3100        .18578        .29193E-03   -.83268    
  29  Prefactor     .89633        .11094        .21480E-03   -.96269    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.11668e-07
Minuit parameter uncertainties:
  1  7.48987e-08
  2  1.17399
  3  1.19783
  4  6.06569e-06
  5  1.14501
  6  0.522588
  7  3.445
  8  0.331793
  9  4.63981
  10  1.32252
  11  0.000521213
  12  26.846
  13  1.31342e-05
  14  41.8353
  15  47.7347
  16  3.02461
  17  34.0002
  18  0.000867277
  19  10.2279
  20  1.85363e-05
  21  1.3935e-06
  22  25.1539
  23  1.59497
  24  2.20377e-05
  25  6.29943
  26  2.44523e-06
  27  1.91794
  28  0.185871
  29  0.110963DDone.

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

Extracting fit parameters...

4FGL J1738.2+4000
   Spectrum: PowerLaw
326    Prefactor:  3.529e+00  4.184e+01  1.000e-04  1.000e+04 ( 1.000e-14)
327        Index:  2.517e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
328        Scale:  1.525e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
681    Prefactor:  8.963e-01  1.110e-01  0.000e+00  1.000e+01 ( 1.000e+00)
682        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
683        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
680   Normalization:  1.310e+00  1.859e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.01
Ra Dec: 264.560 40.010
Photon Flux Upper Limit: 6.23e-08 ph cm-2 s-1
Energy Flux Upper Limit: 4.85e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/671086/likelihoodResults_673228801_673488001_4FGL_J1738.2+4000_daily_bin1674.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) = 15663.0069851
delta logL = 0.0457424344077

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 15663.0024489
delta logL = 0.0502786618599

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    4.3172       1.0000         .10000E-03   10000.    
     2 'Index     '    3.1634       1.0000          .0000       10.000    
     3 'Normalizat'    1.2996       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .89943       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6840E+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.
 MIGRAD TERMINATED WITHOUT CONVERGENCE.

 FCN=   15663.00     FROM MIGRAD    STATUS=FAILED        83 CALLS      280 TOTAL
                     EDM=   .60E-06    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     4.3141        1869.3        .19388E-03   -.52024E-03
   2  Index         3.1624        7.8558        .13090E-01   -.33549E-03
   3  Normalizat    1.2998        .17567        .29293E-03   -.17934E-02
   4  Prefactor     .89926        .11298        .21449E-03   -.19106E-02
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   15663.00     FROM SIMPLEX   STATUS=UNCHANGED    102 CALLS      382 TOTAL
                     EDM=   .76E-05    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     4.3141        1869.3        .33816E-03   -.52024E-03
   2  Index         3.1624        7.8558        .10171E-02   -.33549E-03
   3  Normalizat    1.2998        .17567        .32665E-04   -.17934E-02
   4  Prefactor     .89926        .11298        .96022E-04   -.19106E-02
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   15663.00     FROM MIGRAD    STATUS=CONVERGED     34 CALLS      416 TOTAL
                     EDM=   .14E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     4.3125        28.174        .77552E-05   -.25801E-04
   2  Index         3.1626        1.9534        .52362E-03   -.64267E-05
   3  Normalizat    1.2998        .17632        .58586E-04    .11402E-03
   4  Prefactor     .89926        .10826        .42897E-04    .13399E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 4.31253
  Index      = 3.16264
  Normalizat = 1.29981
  Prefactor  = 0.899262
 **********
 **   18 **HESSE 
 **********

 FCN=   15663.00     FROM HESSE     STATUS=OK            23 CALLS      439 TOTAL
                     EDM=   .14E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     4.3125        27.446        .15510E-05   -1.5293    
   2  Index         3.1626        1.9277        .20945E-04   -.37629    
   3  Normalizat    1.2998        .17635        .11717E-04   -.83572    
   4  Prefactor     .89926        .10828        .85795E-05   -.96167    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.40448e-11
Minuit parameter uncertainties:
  1  21.7733
  2  1.98763
  3  0.176435
  4  0.108303
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/671086': 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) = 15663.0024472
delta logL = 0.0502803508607

Extracting fit parameters...

4FGL J1738.2+4000
   Spectrum: PowerLaw
326    Prefactor:  4.313e+00  2.177e+01  1.000e-04  1.000e+04 ( 1.000e-14)
327        Index:  3.163e+00  1.988e+00  0.000e+00  1.000e+01 (-1.000e+00)
328        Scale:  1.525e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
681    Prefactor:  8.993e-01  1.083e-01  0.000e+00  1.000e+01 ( 1.000e+00)
682        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
683        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
680   Normalization:  1.300e+00  1.764e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.01
Ra Dec: 264.560 40.010

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/671086/cmap_HighResolution_673228801_673488001_4FGL_J1738.2+4000_daily_bin1674.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='4.85e-03', job_status='DONE', photon_flux_upper_limit='6.23e-08', time_completed='2022-05-06 03:33:52.651930', job_id='671086', GAL2='0.90', fit_tolerance='1e-08', EG2='1.30', EG='1.31', time_epoch_completed='1651833232.65', return_code2='0', ts='0.01', comment='SUCCESS', return_code='0', GAL='0.90', dlogl='5.03e-02', ts2='0.12', photon_index_error='0.00', photon_index='2.52' WHERE bin_id='1674' AND source_name='4FGL J1738.2+4000' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Fri May  6 03:33:52 PDT 2022

------------------------------------------------------------
Sender: LSF System <scs@bullet0185>
Subject: Job 671062: <4FGL_J1738.2+4000_daily_bin1674> in cluster <slac> Done

Job <4FGL_J1738.2+4000_daily_bin1674> was submitted from host <rhel6-64f> by user <kocevski> in cluster <slac> at Fri May  6 00:08:12 2022
Job was executed on host(s) <bullet0185>, in queue <medium>, as user <kocevski> in cluster <slac> at Fri May  6 02:57:47 2022
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Fri May  6 02:57:47 2022
Terminated at Fri May  6 03:31:51 2022
Results reported at Fri May  6 03:31:51 2022

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1738.2+4000_daily_bin1674 264.56 40.0099 673228801 673488001 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1738.2+4000 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   1914.00 sec.
    Max Memory :                                 618 MB
    Average Memory :                             321.00 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   2043 sec.
    Turnaround time :                            12219 sec.

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


------------------------------------------------------------
Sender: LSF System <lsf@bullet0063>
Subject: Job 671086: <4FGL_J1738.2+4000_daily_bin1674> in cluster <slac> Done

Job <4FGL_J1738.2+4000_daily_bin1674> was submitted from host <rhel6-64q> by user <kocevski> in cluster <slac> at Fri May  6 00:08:13 2022
Job was executed on host(s) <bullet0063>, in queue <medium>, as user <kocevski> in cluster <slac> at Fri May  6 02:57:56 2022
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Fri May  6 02:57:56 2022
Terminated at Fri May  6 03:33:53 2022
Results reported at Fri May  6 03:33:53 2022

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1738.2+4000_daily_bin1674 264.56 40.0099 673228801 673488001 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1738.2+4000 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   1894.36 sec.
    Max Memory :                                 622 MB
    Average Memory :                             310.30 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   2931 MB
    Max Processes :                              6
    Max Threads :                                21
    Run time :                                   2156 sec.
    Turnaround time :                            12340 sec.

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

