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


Performing analysis on: 4FGL_J1238.3-1959_daily_bin1020
RA = 189.594, Dec = -19.9945
tmin = 503712001, tmax = 503971201
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='851438', job_status='RUN', time_executed='2021-09-06 02:17:36.201595', time_epoch_executed='1630919856.2' WHERE source_name='4FGL J1238.3-1959' and cadence='daily' and bin_id='1020'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/851438

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/851438/ft1_4FGL_J1238.3-1959_daily_bin1020.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/851438/ft2_4FGL_J1238.3-1959_daily_bin1020.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/851438/ft1_4FGL_J1238.3-1959_daily_bin1020.fits outfile=/scratch/kocevski/851438/ft1_filteredMKT_4FGL_J1238.3-1959_daily_bin1020.fits ra=189.594 dec=-19.9945 rad=12.0 tmin=503712001.0 tmax=503971201.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.63
user 5.31
sys 0.26

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/851438/ft2_4FGL_J1238.3-1959_daily_bin1020.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/851438/ft2_4FGL_J1238.3-1959_daily_bin1020.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/851438/ft1_filteredMKT_4FGL_J1238.3-1959_daily_bin1020.fits evtable="EVENTS" outfile="/scratch/kocevski/851438/ft1_filtered_4FGL_J1238.3-1959_daily_bin1020.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.66
user 0.36
sys 0.16

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/851438/ft1_filtered_4FGL_J1238.3-1959_daily_bin1020.fits" evtable="EVENTS" scfile=/scratch/kocevski/851438/ft2_4FGL_J1238.3-1959_daily_bin1020.fits sctable="SC_DATA" outfile=/scratch/kocevski/851438/ltcube_503712001_503971201_4FGL_J1238.3-1959_daily_bin1020.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/851438/ft2_4FGL_J1238.3-1959_daily_bin1020.fits
.....................!
real 16.39
user 16.01
sys 0.33

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/851438/ft1_filtered_4FGL_J1238.3-1959_daily_bin1020.fits evtable="EVENTS" scfile=/scratch/kocevski/851438/ft2_4FGL_J1238.3-1959_daily_bin1020.fits sctable="SC_DATA" expcube=/scratch/kocevski/851438/ltcube_503712001_503971201_4FGL_J1238.3-1959_daily_bin1020.fits outfile=/scratch/kocevski/851438/expmap_503712001_503971201_4FGL_J1238.3-1959_daily_bin1020.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/851438/ltcube_503712001_503971201_4FGL_J1238.3-1959_daily_bin1020.fits
.....................!
real 192.85
user 186.77
sys 5.62

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

Setting source of interest to:
4FGL J1238.3-1959 @ 189.594 -19.9945

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/851438/ft1_filtered_4FGL_J1238.3-1959_daily_bin1020.fits scfile=/scratch/kocevski/851438/ft2_4FGL_J1238.3-1959_daily_bin1020.fits outfile=/scratch/kocevski/851438/cmap_503712001_503971201_4FGL_J1238.3-1959_daily_bin1020.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=189.594 yref=-19.9945 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.58
user 0.40
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/851438/ft1_filtered_4FGL_J1238.3-1959_daily_bin1020.fits scfile=/scratch/kocevski/851438/ft2_4FGL_J1238.3-1959_daily_bin1020.fits outfile=/scratch/kocevski/851438/cmap_HighResolution_503712001_503971201_4FGL_J1238.3-1959_daily_bin1020.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=189.594 yref=-19.9945 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.58
user 0.40
sys 0.17

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/851438/ft1_filtered_4FGL_J1238.3-1959_daily_bin1020.fits evtable="EVENTS" scfile=/scratch/kocevski/851438/ft2_4FGL_J1238.3-1959_daily_bin1020.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/851438/Model_4FGL_J1238.3-1959_daily_bin1020.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/851438/ft1_filtered_4FGL_J1238.3-1959_daily_bin1020.fits.....................!
real 68.40
user 66.96
sys 1.18

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/851438/ft1_filtered_4FGL_J1238.3-1959_daily_bin1020.fits', '/scratch/kocevski/851438/ft2_4FGL_J1238.3-1959_daily_bin1020.fits', expMap='/scratch/kocevski/851438/expmap_503712001_503971201_4FGL_J1238.3-1959_daily_bin1020.fits', expCube='/scratch/kocevski/851438/ltcube_503712001_503971201_4FGL_J1238.3-1959_daily_bin1020.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/851438/Model_4FGL_J1238.3-1959_daily_bin1020.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1238.3-1959'

4FGL J1238.3-1959
   Spectrum: PowerLaw
307    Prefactor:  3.073e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-13)
308        Index:  2.151e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
309        Scale:  1.503e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/851438/ft1_filtered_4FGL_J1238.3-1959_daily_bin1020.fits
Spacecraft file(s): /scratch/kocevski/851438/ft2_4FGL_J1238.3-1959_daily_bin1020.fits
Exposure map: /scratch/kocevski/851438/expmap_503712001_503971201_4FGL_J1238.3-1959_daily_bin1020.fits
Exposure cube: /scratch/kocevski/851438/ltcube_503712001_503971201_4FGL_J1238.3-1959_daily_bin1020.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/851438/Model_4FGL_J1238.3-1959_daily_bin1020.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) = 8534.67581636

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10029E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    4.3567       1.0000         .10000E-03   10000.    
     4 'Prefactor '    5.1673       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10033E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    3.7424       1.0000         .10000E-03   10000.    
     7 'Prefactor '    13.563       1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10017E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    1.8403       1.0000         .10000E-03   10000.    
    11 'Prefactor '    7.3267       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10285E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10041E-03   1.0000         .10000E-03   10000.    
    14 'norm      '    1.2358       1.0000         .10000E-03   10000.    
    15 'Prefactor '    62.414       1.0000         .10000E-03   10000.    
    16 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    2.8747       1.0000         .10000E-03   10000.    
    18 'Prefactor '    6.6968       1.0000         .10000E-03   10000.    
    19 'norm      '    1.8951       1.0000         .10000E-03   10000.    
    20 'Normalizat'    1.1548       1.0000         .10000E-01   10.000    
    21 'Prefactor '    .93608       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6030E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
 MACHINE ACCURACY LIMITS FURTHER IMPROVEMENT.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   8534.672     FROM MIGRAD    STATUS=CONVERGED    434 CALLS     2147 TOTAL
                     EDM=   .31E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10002E-03    8.6259         .0000    ** at limit **
   2  Prefactor     .10000E-03    3.5203         .0000    ** at limit **
   3  norm          4.3573        2.9683         .0000        .13978E-03
   4  Prefactor     5.1678        4.1817         .0000        .46500E-03
   5  Prefactor     .10000E-03    9.6269         .0000    ** at limit **
   6  Prefactor     3.7445        16.059         .0000       -.71673E-03
   7  Prefactor     13.565        11.470         .0000       -.96400E-03
   8  Prefactor     .10003E-03    10.778         .0000    ** at limit **
   9  Prefactor     .10000E-03    4.7511         .0000    ** at limit **
  10  Prefactor     1.8406        4.5391         .0000        .10962E-02
  11  Prefactor     7.3266        2.3715         .0000       -.11976E-03
  12  Prefactor     .10001E-03    7.2800         .0000    ** at limit **
  13  Prefactor     .10000E-03    15.403         .0000    ** at limit **
  14  norm          1.2361        .83321         .0000        .47619E-03
  15  Prefactor     62.414        78.772         .0000        .16465E-02
  16  norm          .10000E-03    2.8736         .0000    ** at limit **
  17  norm          2.8872        8.4536         .0000        .17069E-01
  18  Prefactor     6.6843        7.3269         .0000        .48709E-03
  19  norm          1.8948        1.6791         .0000       -.14723E-03
  20  Normalizat    1.1547        .20017         .0000        .20810E-04
  21  Prefactor     .93607        .10032         .0000       -.16364E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100022
  Prefactor  = 0.0001
  norm       = 4.35728
  Prefactor  = 5.16781
  Prefactor  = 0.000100005
  Prefactor  = 3.74451
  Prefactor  = 13.5653
  Prefactor  = 0.000100028
  Prefactor  = 0.0001
  Prefactor  = 1.84063
  Prefactor  = 7.32657
  Prefactor  = 0.000100008
  Prefactor  = 0.000100001
  norm       = 1.23607
  Prefactor  = 62.4142
  norm       = 0.0001
  norm       = 2.88724
  Prefactor  = 6.68428
  norm       = 1.89476
  Normalizat = 1.15473
  Prefactor  = 0.936074
 **********
 **   18 **HESSE 
 **********

 FCN=   8534.672     FROM HESSE     STATUS=OK           317 CALLS     2464 TOTAL
                     EDM=   .39E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10002E-03    8.6268        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    3.5273        .16921E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          4.3573        2.9658        .12735E-03   -1.5290    
   4  Prefactor     5.1678        4.1660        .16018E-03   -1.5253    
   5  Prefactor     .10000E-03    9.6286        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     3.7445        15.936        .20872E-03   -1.5321    
   7  Prefactor     13.565        11.469        .10876E-03   -1.4971    
   8  Prefactor     .10003E-03    10.786        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .10000E-03    4.7559        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     1.8406        4.5107        .28997E-03   -1.5437    
  11  Prefactor     7.3266        2.3669        .76567E-04   -1.5167    
  12  Prefactor     .10001E-03    7.3404        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .10000E-03    15.781        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          1.2361        .82250        .65928E-04   -1.5486    
  15  Prefactor     62.414        77.316        .50792E-04   -1.4126    
  16  norm          .10000E-03    2.8849        .15292E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          2.8872        8.0804        .11987E-02   -1.5368    
  18  Prefactor     6.6843        7.1093        .15506E-03   -1.5191    
  19  norm          1.8948        1.6892        .10944E-03   -1.5433    
  20  Normalizat    1.1547        .23473        .32919E-03   -.88014    
  21  Prefactor     .93607        .11828        .18230E-03   -.94892    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.91247e-08
Minuit parameter uncertainties:
  1  0.000869634
  2  4.72795e-06
  3  2.96593
  4  4.16619
  5  0.000419127
  6  15.4564
  7  11.4713
  8  0.00109691
  9  3.57093e-05
  10  4.51155
  11  2.36697
  12  0.000487844
  13  0.000257516
  14  0.822506
  15  77.4406
  16  7.78929e-07
  17  8.08346
  18  7.11021
  19  1.6892
  20  0.234942
  21  0.118311
Done.

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

Extracting fit parameters...

4FGL J1238.3-1959
   Spectrum: PowerLaw
307    Prefactor:  1.000e-04  4.878e-04  1.000e-04  1.000e+04 ( 1.000e-13)
308        Index:  2.151e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
309        Scale:  1.503e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
600    Prefactor:  9.361e-01  1.183e-01  0.000e+00  1.000e+01 ( 1.000e+00)
601        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
602        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
599   Normalization:  1.155e+00  2.349e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 189.594 -19.994
Photon Flux Upper Limit: 6.43e-08 ph cm-2 s-1
Energy Flux Upper Limit: 4.88e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/851438/likelihoodResults_503712001_503971201_4FGL_J1238.3-1959_daily_bin1020.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) = 8534.67240625
delta logL = -0.000649333087495

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 8534.67175784
delta logL = -9.26129359868e-07

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10329E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.1861       1.0000          .0000       10.000    
     3 'Normalizat'    1.1546       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .93605       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6030E+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=   8534.672     FROM MIGRAD    STATUS=FAILED        93 CALLS      247 TOTAL
                     EDM=   .54E-06    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10002E-03    492.10        .18142E-02** at limit **
   2  Index         2.2259        5.7886        .50000       -.47238E-04
   3  Normalizat    1.1547        .43261E-01    .32919E-03    .18096E-04
   4  Prefactor     .93607        .21966E-01    .18230E-03   -.30558E-04
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   8534.672     FROM SIMPLEX   STATUS=UNCHANGED    169 CALLS      416 TOTAL
                     EDM=   .15E-04    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10002E-03    492.10        .53846E-03** at limit **
   2  Index         2.2259        5.7886        .24364E-05   -.47238E-04
   3  Normalizat    1.1547        .43261E-01    .63122E-07    .18096E-04
   4  Prefactor     .93607        .21966E-01    .10212E-07   -.30558E-04
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   8534.672     FROM MIGRAD    STATUS=CONVERGED     34 CALLS      450 TOTAL
                     EDM=   .14E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10002E-03    1506.0        .36285E-03** at limit **
   2  Index         2.2262        5.9980        .50000       -.47278E-04
   3  Normalizat    1.1547        .10825        .13168E-04    .14505E-04
   4  Prefactor     .93607        .54964E-01    .72919E-05   -.36794E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100018
  Index      = 2.22624
  Normalizat = 1.15473
  Prefactor  = 0.936074
 **********
 **   18 **HESSE 
 **********

 FCN=   8534.672     FROM HESSE     STATUS=OK            29 CALLS      479 TOTAL
                     EDM=   .33E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10002E-03    9.3656        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.2262        6.1049        .50000       -.58806    
   3  Normalizat    1.1547        .23154        .26335E-05   -.88014    
   4  Prefactor     .93607        .11766        .14584E-05   -.94892    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.31772e-09
Minuit parameter uncertainties:
  1  0.000830036
  2  4.42621
  3  0.231743
  4  0.117694
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/851438': 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) = 8534.67175613
delta logL = 7.85499651101e-07

Extracting fit parameters...

4FGL J1238.3-1959
   Spectrum: PowerLaw
307    Prefactor:  1.000e-04  8.300e-04  1.000e-04  1.000e+04 ( 1.000e-13)
308        Index:  2.226e+00  4.426e+00  0.000e+00  1.000e+01 (-1.000e+00)
309        Scale:  1.503e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
600    Prefactor:  9.361e-01  1.177e-01  0.000e+00  1.000e+01 ( 1.000e+00)
601        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
602        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
599   Normalization:  1.155e+00  2.317e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 189.594 -19.994

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/851438/cmap_HighResolution_503712001_503971201_4FGL_J1238.3-1959_daily_bin1020.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='4.88e-03', job_status='DONE', photon_flux_upper_limit='6.43e-08', time_completed='2021-09-06 02:30:58.357136', job_id='851438', GAL2='0.94', fit_tolerance='1e-08', EG2='1.15', EG='1.15', time_epoch_completed='1630920658.36', return_code2='0', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.94', dlogl='7.85e-07', ts2='-0.00', photon_index_error='0.00', photon_index='2.15' WHERE bin_id='1020' AND source_name='4FGL J1238.3-1959' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 02:30:58 PDT 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0134>
Subject: Job 851438: <4FGL_J1238.3-1959_daily_bin1020> in cluster <slac> Done

Job <4FGL_J1238.3-1959_daily_bin1020> was submitted from host <rhel6-64k> by user <kocevski> in cluster <slac> at Mon Sep  6 02:15:37 2021
Job was executed on host(s) <bullet0134>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep  6 02:16:17 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Mon Sep  6 02:16:17 2021
Terminated at Mon Sep  6 02:30:59 2021
Results reported at Mon Sep  6 02:30:59 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1238.3-1959_daily_bin1020 189.594 -19.9945 503712001 503971201 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1238.3-1959 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   798.31 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             345.45 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   881 sec.
    Turnaround time :                            922 sec.

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

