/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 115 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 = 7446
number of fields = 30
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J1738.2+4000_daily_bin693
RA = 264.56, Dec = 40.0099
tmin = 418953601, tmax = 419212801
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='943974', job_status='RUN', time_executed='2021-09-18 00:57:43.225169', time_epoch_executed='1631951863.23' WHERE source_name='4FGL J1738.2+4000' and cadence='daily' and bin_id='693'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/943974

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/943974/ft1_4FGL_J1738.2+4000_daily_bin693.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/943974/ft2_4FGL_J1738.2+4000_daily_bin693.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/943974/ft1_4FGL_J1738.2+4000_daily_bin693.fits outfile=/scratch/kocevski/943974/ft1_filteredMKT_4FGL_J1738.2+4000_daily_bin693.fits ra=264.56 dec=40.0099 rad=12.0 tmin=418953601.0 tmax=419212801.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 5.57
user 5.30
sys 0.23

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/943974/ft1_filtered_4FGL_J1738.2+4000_daily_bin693.fits" evtable="EVENTS" scfile=/scratch/kocevski/943974/ft2_4FGL_J1738.2+4000_daily_bin693.fits sctable="SC_DATA" outfile=/scratch/kocevski/943974/ltcube_418953601_419212801_4FGL_J1738.2+4000_daily_bin693.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/943974/ft2_4FGL_J1738.2+4000_daily_bin693.fits
.....................!
real 12.48
user 12.13
sys 0.31

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/943974/ft1_filtered_4FGL_J1738.2+4000_daily_bin693.fits evtable="EVENTS" scfile=/scratch/kocevski/943974/ft2_4FGL_J1738.2+4000_daily_bin693.fits sctable="SC_DATA" expcube=/scratch/kocevski/943974/ltcube_418953601_419212801_4FGL_J1738.2+4000_daily_bin693.fits outfile=/scratch/kocevski/943974/expmap_418953601_419212801_4FGL_J1738.2+4000_daily_bin693.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/943974/ltcube_418953601_419212801_4FGL_J1738.2+4000_daily_bin693.fits
.....................!
real 192.76
user 187.95
sys 3.88

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/943974/ft1_filtered_4FGL_J1738.2+4000_daily_bin693.fits scfile=/scratch/kocevski/943974/ft2_4FGL_J1738.2+4000_daily_bin693.fits outfile=/scratch/kocevski/943974/cmap_418953601_419212801_4FGL_J1738.2+4000_daily_bin693.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/943974/ft1_filtered_4FGL_J1738.2+4000_daily_bin693.fits scfile=/scratch/kocevski/943974/ft2_4FGL_J1738.2+4000_daily_bin693.fits outfile=/scratch/kocevski/943974/cmap_HighResolution_418953601_419212801_4FGL_J1738.2+4000_daily_bin693.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.38
sys 0.15

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/943974/ft1_filtered_4FGL_J1738.2+4000_daily_bin693.fits evtable="EVENTS" scfile=/scratch/kocevski/943974/ft2_4FGL_J1738.2+4000_daily_bin693.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/943974/Model_4FGL_J1738.2+4000_daily_bin693.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/943974/ft1_filtered_4FGL_J1738.2+4000_daily_bin693.fits.....................!
real 53.80
user 52.45
sys 1.10

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/943974/ft1_filtered_4FGL_J1738.2+4000_daily_bin693.fits', '/scratch/kocevski/943974/ft2_4FGL_J1738.2+4000_daily_bin693.fits', expMap='/scratch/kocevski/943974/expmap_418953601_419212801_4FGL_J1738.2+4000_daily_bin693.fits', expCube='/scratch/kocevski/943974/ltcube_418953601_419212801_4FGL_J1738.2+4000_daily_bin693.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/943974/Model_4FGL_J1738.2+4000_daily_bin693.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/943974/ft1_filtered_4FGL_J1738.2+4000_daily_bin693.fits
Spacecraft file(s): /scratch/kocevski/943974/ft2_4FGL_J1738.2+4000_daily_bin693.fits
Exposure map: /scratch/kocevski/943974/expmap_418953601_419212801_4FGL_J1738.2+4000_daily_bin693.fits
Exposure cube: /scratch/kocevski/943974/ltcube_418953601_419212801_4FGL_J1738.2+4000_daily_bin693.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/943974/Model_4FGL_J1738.2+4000_daily_bin693.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) = 5862.63264193

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .35208E-02   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    .32654       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     5 'norm      '    6.2536       1.0000         .10000E-03   10000.    
     6 'norm      '    1.4030       1.0000         .10000E-03   10000.    
     7 'Prefactor '    3.7759       1.0000         .10000E-03   10000.    
     8 'norm      '    .14769E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    7.6049       1.0000         .10000E-03   10000.    
    10 'norm      '    6.0333       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .20704E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .10043E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .14135E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    .22806E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    .10009E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    .73877E-02   1.0000         .10000E-03   10000.    
    18 'Prefactor '    97.431       1.0000         .10000E-03   10000.    
    19 'Prefactor '    15.661       1.0000         .10000E-03   10000.    
    20 'Prefactor '    .23129E-02   1.0000         .10000E-03   10000.    
    21 'Prefactor '    17.926       1.0000         .10000E-03   10000.    
    22 'Prefactor '    .17180E-03   1.0000         .10000E-03   10000.    
    23 'norm      '    1.3186       1.0000         .10000E-03   10000.    
    24 'norm      '    .64005E-02   1.0000         .10000E-03   10000.    
    25 'norm      '    26.842       1.0000         .10000E-03   10000.    
    26 'Prefactor '    .10036E-03   1.0000         .10000E-03   10000.    
    27 'Prefactor '    .10017E-03   1.0000         .10000E-03   10000.    
    28 'Normalizat'    1.0376       1.0000         .10000E-01   10.000    
    29 'Prefactor '    .93495       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=   5862.136     FROM MIGRAD    STATUS=CONVERGED    757 CALLS     3397 TOTAL
                     EDM=   .20E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.0%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .10000E-03    41.336       -.19994E-07** at limit **
   2  Prefactor     .10000E-03    .82535       -.21605E-06** at limit **
   3  Prefactor     .32889        1.3153        .11473E-05    .96056E-04
   4  Prefactor     .10000E-03    3.5489       -.83502E-07** at limit **
   5  norm          6.2564        2.4556       -.12192E-06   -.10019E-03
   6  norm          1.4024        1.8325       -.22452E-07    .26416E-04
   7  Prefactor     3.8833        15.267       -.13762E-06    .20882E-04
   8  norm          .10002E-03    .56660       -.73572E-07** at limit **
   9  norm          7.4548        10.943       -.17577E-07    .11111E-04
  10  norm          6.0317        3.8933       -.99582E-07    .20499E-03
  11  Prefactor     .10000E-03    5.1778       -.54499E-06** at limit **
  12  Prefactor     .10000E-03    18.823        .95525E-07** at limit **
  13  norm          .10000E-03    4.1387       -.80121E-07** at limit **
  14  Prefactor     .10000E-03    64.827       -.10477E-06** at limit **
  15  Prefactor     .10000E-03    32.593        .38718E-06** at limit **
  16  norm          .10000E-03    10.483       -.34631E-05** at limit **
  17  Prefactor     .10000E-03    75.274       -.87239E-05** at limit **
  18  Prefactor     97.170        111.30       -.28186E-06   -.84743E-05
  19  Prefactor     15.913        17.036       -.57477E-08   -.80657E-05
  20  Prefactor     .10000E-03    85.401       -.88705E-05** at limit **
  21  Prefactor     18.518        25.982        .23980E-06   -.72922E-05
  22  Prefactor     .10000E-03    85.513        .12860E-05** at limit **
  23  norm          1.3168        1.5163        .15436E-06   -.73228E-05
  24  norm          .10000E-03    83.183        .11418E-05** at limit **
  25  norm          27.481        22.430        .18948E-06    .12572E-03
  26  Prefactor     .10000E-03    6.7402        .74850E-06** at limit **
  27  Prefactor     .10000E-03    3.5579        .46042E-06** at limit **
  28  Normalizat    1.0362        .26711        .26380E-05   -.50587E-04
  29  Prefactor     .93454        .14591       -.20466E-05    .19959E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.328894
  Prefactor  = 0.000100001
  norm       = 6.25644
  norm       = 1.40243
  Prefactor  = 3.88326
  norm       = 0.000100017
  norm       = 7.45484
  norm       = 6.0317
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.000100001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 97.1704
  Prefactor  = 15.9129
  Prefactor  = 0.0001
  Prefactor  = 18.5177
  Prefactor  = 0.0001
  norm       = 1.31683
  norm       = 0.0001
  norm       = 27.4815
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Normalizat = 1.03623
  Prefactor  = 0.934541
 **********
 **   18 **HESSE 
 **********

 FCN=   5862.136     FROM HESSE     STATUS=OK           561 CALLS     3958 TOTAL
                     EDM=   .63E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .10000E-03    41.351        .19648E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    .84792        .13533E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .32889        1.3035        .16667E-03   -1.5593    
   4  Prefactor     .10000E-03    7.2656        .27363E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          6.2564        2.4489        .72564E-04   -1.5208    
   6  norm          1.4024        1.8018        .11216E-03   -1.5471    
   7  Prefactor     3.8833        15.127        .20775E-03   -1.5314    
   8  norm          .10002E-03    .99488        .20580E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          7.4548        10.840        .14542E-03   -1.5162    
  10  norm          6.0317        3.8792        .11146E-03   -1.5217    
  11  Prefactor     .10000E-03    5.2088        .17010E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    18.828        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .10000E-03    13.581        .29790E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10000E-03    64.874        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .10000E-03    32.607        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          .10000E-03    10.549        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     .10000E-03    75.354        .18611E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     97.170        111.37        .20362E-03   -1.3733    
  19  Prefactor     15.913        17.015        .10121E-03   -1.4910    
  20  Prefactor     .10000E-03    86.782        .40188E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     18.518        25.970        .94598E-04   -1.4847    
  22  Prefactor     .10000E-03    85.720        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  norm          1.3168        1.4947        .97431E-04   -1.5478    
  24  norm          .10000E-03    83.307        .18841E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  norm          27.481        22.387        .77324E-04   -1.4659    
  26  Prefactor     .10000E-03    6.8782        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  27  Prefactor     .10000E-03    3.6220        .14102E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  Normalizat    1.0362        .31091        .33366E-03   -.91826    
  29  Prefactor     .93454        .17026        .19898E-03   -.94944    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.31122e-10
Minuit parameter uncertainties:
  1  2.10138e-05
  2  1.2557e-05
  3  1.30362
  4  0.000172732
  5  2.44898
  6  1.80183
  7  15.1422
  8  0.000256766
  9  10.8428
  10  3.87934
  11  3.30244e-06
  12  1.2319e-05
  13  0.000189857
  14  4.54546e-05
  15  3.03619e-05
  16  2.30216e-05
  17  3.78581e-05
  18  111.608
  19  17.0198
  20  0.000321195
  21  25.9859
  22  4.24765e-05
  23  1.49478
  24  8.16879e-06
  25  22.3937
  26  4.36225e-06
  27  4.31506e-06
  28  0.311461
  29  0.170353
Done.

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

Extracting fit parameters...

4FGL J1738.2+4000
   Spectrum: PowerLaw
326    Prefactor:  1.000e-04  4.545e-05  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:  9.345e-01  1.704e-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.036e+00  3.115e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 264.560 40.010
Photon Flux Upper Limit: 1.16e-07 ph cm-2 s-1
Energy Flux Upper Limit: 9.00e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/943974/likelihoodResults_418953601_419212801_4FGL_J1738.2+4000_daily_bin693.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): 102
logL (Free Index) = 5862.13602599
delta logL = -7.33407268854e-05

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 5862.13595261
delta logL = 4.010325938e-08

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.4638       1.0000          .0000       10.000    
     3 'Normalizat'    1.0362       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .93454       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.

 FCN=   5862.136     FROM MIGRAD    STATUS=CONVERGED     56 CALLS      239 TOTAL
                     EDM=   .22E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    7153.9        .90712E-02** at limit **
   2  Index         2.4382        5.6822        .50000        .32166E-05
   3  Normalizat    1.0362        .57252E-01    .75390E-01   -.11169E-04
   4  Prefactor     .93454        .32784E-01    .45444E-01    .22045E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 2.43818
  Normalizat = 1.03623
  Prefactor  = 0.934539
 **********
 **   18 **HESSE 
 **********

 FCN=   5862.136     FROM HESSE     STATUS=NOT POSDEF    33 CALLS      272 TOTAL
                     EDM=   .58E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    9224.7        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.4382        5.9435        .50000       -.53794    
   3  Normalizat    1.0362        .13375        .33365E-03   -.91826    
   4  Prefactor     .93454        .76716E-01    .19898E-03   -.94944    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 5.78313e-10
Minuit parameter uncertainties:
  1  0.00301433
  2  60.4282
  3  0.133797
  4  0.0767249
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/943974': 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): 102
logL (Free Index) = 5862.13595259
delta logL = 6.08688424109e-08

Extracting fit parameters...

4FGL J1738.2+4000
   Spectrum: PowerLaw
326    Prefactor:  1.000e-04  3.014e-03  1.000e-04  1.000e+04 ( 1.000e-14)
327        Index:  2.438e+00  6.043e+01  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:  9.345e-01  7.672e-02  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.036e+00  1.338e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 264.560 40.010

Creating a high resolution counts map...
INFO: Auto-setting vmin to  0.000e+00 [aplpy.core]
INFO: Auto-setting vmax to  0.000e+00 [aplpy.core]
Saving /scratch/kocevski/943974/cmap_HighResolution_418953601_419212801_4FGL_J1738.2+4000_daily_bin693.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='9.00e-03', job_status='DONE', photon_flux_upper_limit='1.16e-07', time_completed='2021-09-18 01:11:39.237790', job_id='943974', GAL2='0.93', fit_tolerance='1e-08', EG2='1.04', EG='1.04', time_epoch_completed='1631952699.24', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.93', dlogl='6.09e-08', ts2='-0.00', photon_index_error='0.00', photon_index='2.52' WHERE bin_id='693' AND source_name='4FGL J1738.2+4000' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep 18 01:11:39 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0074>
Subject: Job 943974: <4FGL_J1738.2+4000_daily_bin693> in cluster <slac> Done

Job <4FGL_J1738.2+4000_daily_bin693> was submitted from host <rhel6-64p> by user <kocevski> in cluster <slac> at Sat Sep 18 00:55:36 2021
Job was executed on host(s) <bullet0074>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Sep 18 00:55:38 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Sat Sep 18 00:55:38 2021
Terminated at Sat Sep 18 01:11:39 2021
Results reported at Sat Sep 18 01:11:39 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1738.2+4000_daily_bin693 264.56 40.0099 418953601 419212801 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 :                                   832.34 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             303.34 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   961 sec.
    Turnaround time :                            963 sec.

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

