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


Performing analysis on: 4FGL_J1238.3-1959_daily_bin1382
RA = 189.594, Dec = -19.9945
tmin = 597542401, tmax = 597801601
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='854525', job_status='RUN', time_executed='2021-09-06 02:26:55.693221', time_epoch_executed='1630920415.69' WHERE source_name='4FGL J1238.3-1959' and cadence='daily' and bin_id='1382'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/854525

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/854525/ft1_4FGL_J1238.3-1959_daily_bin1382.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/854525/ft2_4FGL_J1238.3-1959_daily_bin1382.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/854525/ft1_4FGL_J1238.3-1959_daily_bin1382.fits outfile=/scratch/kocevski/854525/ft1_filteredMKT_4FGL_J1238.3-1959_daily_bin1382.fits ra=189.594 dec=-19.9945 rad=12.0 tmin=597542401.0 tmax=597801601.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 4.70
user 3.34
sys 0.19

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/854525/ft2_4FGL_J1238.3-1959_daily_bin1382.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/854525/ft1_filteredMKT_4FGL_J1238.3-1959_daily_bin1382.fits evtable="EVENTS" outfile="/scratch/kocevski/854525/ft1_filtered_4FGL_J1238.3-1959_daily_bin1382.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.88
user 0.35
sys 0.18

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/854525/ft1_filtered_4FGL_J1238.3-1959_daily_bin1382.fits" evtable="EVENTS" scfile=/scratch/kocevski/854525/ft2_4FGL_J1238.3-1959_daily_bin1382.fits sctable="SC_DATA" outfile=/scratch/kocevski/854525/ltcube_597542401_597801601_4FGL_J1238.3-1959_daily_bin1382.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/854525/ft2_4FGL_J1238.3-1959_daily_bin1382.fits
.....................!
real 15.32
user 14.85
sys 0.35

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/854525/ft1_filtered_4FGL_J1238.3-1959_daily_bin1382.fits evtable="EVENTS" scfile=/scratch/kocevski/854525/ft2_4FGL_J1238.3-1959_daily_bin1382.fits sctable="SC_DATA" expcube=/scratch/kocevski/854525/ltcube_597542401_597801601_4FGL_J1238.3-1959_daily_bin1382.fits outfile=/scratch/kocevski/854525/expmap_597542401_597801601_4FGL_J1238.3-1959_daily_bin1382.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/854525/ltcube_597542401_597801601_4FGL_J1238.3-1959_daily_bin1382.fits
.....................!
real 192.34
user 186.88
sys 4.74

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/854525/ft1_filtered_4FGL_J1238.3-1959_daily_bin1382.fits scfile=/scratch/kocevski/854525/ft2_4FGL_J1238.3-1959_daily_bin1382.fits outfile=/scratch/kocevski/854525/cmap_597542401_597801601_4FGL_J1238.3-1959_daily_bin1382.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.55
user 0.39
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/854525/ft1_filtered_4FGL_J1238.3-1959_daily_bin1382.fits scfile=/scratch/kocevski/854525/ft2_4FGL_J1238.3-1959_daily_bin1382.fits outfile=/scratch/kocevski/854525/cmap_HighResolution_597542401_597801601_4FGL_J1238.3-1959_daily_bin1382.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.57
user 0.39
sys 0.16

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/854525/ft1_filtered_4FGL_J1238.3-1959_daily_bin1382.fits evtable="EVENTS" scfile=/scratch/kocevski/854525/ft2_4FGL_J1238.3-1959_daily_bin1382.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/854525/Model_4FGL_J1238.3-1959_daily_bin1382.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/854525/ft1_filtered_4FGL_J1238.3-1959_daily_bin1382.fits.....................!
real 63.45
user 62.02
sys 1.19

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/854525/ft1_filtered_4FGL_J1238.3-1959_daily_bin1382.fits', '/scratch/kocevski/854525/ft2_4FGL_J1238.3-1959_daily_bin1382.fits', expMap='/scratch/kocevski/854525/expmap_597542401_597801601_4FGL_J1238.3-1959_daily_bin1382.fits', expCube='/scratch/kocevski/854525/ltcube_597542401_597801601_4FGL_J1238.3-1959_daily_bin1382.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/854525/Model_4FGL_J1238.3-1959_daily_bin1382.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/854525/ft1_filtered_4FGL_J1238.3-1959_daily_bin1382.fits
Spacecraft file(s): /scratch/kocevski/854525/ft2_4FGL_J1238.3-1959_daily_bin1382.fits
Exposure map: /scratch/kocevski/854525/expmap_597542401_597801601_4FGL_J1238.3-1959_daily_bin1382.fits
Exposure cube: /scratch/kocevski/854525/ltcube_597542401_597801601_4FGL_J1238.3-1959_daily_bin1382.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/854525/Model_4FGL_J1238.3-1959_daily_bin1382.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) = 7457.37586681

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    13.811       1.0000         .10000E-03   10000.    
     2 'Prefactor '    43.075       1.0000         .10000E-03   10000.    
     3 'norm      '    .10743E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10182E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10010E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    28.763       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10084E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    1.1156       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .63652E-02   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10012E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    3.4875       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .38729       1.0000         .10000E-03   10000.    
    13 'Prefactor '    .72794       1.0000         .10000E-03   10000.    
    14 'norm      '    3.0613       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .11024E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    .10003E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    .10072E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    3.0872       1.0000         .10000E-03   10000.    
    19 'norm      '    .10016E-03   1.0000         .10000E-03   10000.    
    20 'Normalizat'    1.6407       1.0000         .10000E-01   10.000    
    21 'Prefactor '    .84313       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.

 FCN=   7457.333     FROM MIGRAD    STATUS=CONVERGED    827 CALLS     2938 TOTAL
                     EDM=   .33E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     13.818        25.386        .10778E-03   -.51158E-04
   2  Prefactor     43.055        19.366        .61083E-04   -.10058E-03
   3  norm          .10000E-03    6.6029        .36285E-03** at limit **
   4  Prefactor     .10000E-03    2.1536        .12329E-02** at limit **
   5  Prefactor     .10000E-03    23.984        .18142E-02** at limit **
   6  Prefactor     28.724        26.420        .74702E-04    .23038E-03
   7  Prefactor     .10000E-03    27.450        .18142E-02** at limit **
   8  Prefactor     1.1909        50.332        .16007        .17068E-03
   9  Prefactor     .10048E-03    29.132        .11488    ** at limit **
  10  Prefactor     .10000E-03    1.6904        .10946E-02** at limit **
  11  Prefactor     3.4876        1.8653        .83793E-04    .16865E-03
  12  Prefactor     .34844        74.800        .42445E-02   -.23744E-03
  13  Prefactor     .68214        41.598        .46332E-02    .80681E-04
  14  norm          3.0612        1.2386        .58578E-04    .35167E-03
  15  Prefactor     .10000E-03    34.000        .18142E-02** at limit **
  16  norm          .10000E-03    2.2133        .12538E-02** at limit **
  17  norm          .10000E-03    3.9379        .32727E-03** at limit **
  18  Prefactor     3.0858        3.4132        .16285E-03    .22297E-03
  19  norm          .10000E-03    1.4005        .98667E-03** at limit **
  20  Normalizat    1.6412        .29610        .32066E-03    .23758E-03
  21  Prefactor     .84321        .13832        .20528E-03   -.24394E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 13.8184
  Prefactor  = 43.0549
  norm       = 0.000100001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 28.7244
  Prefactor  = 0.0001
  Prefactor  = 1.1909
  Prefactor  = 0.000100475
  Prefactor  = 0.0001
  Prefactor  = 3.48759
  Prefactor  = 0.348442
  Prefactor  = 0.682137
  norm       = 3.06116
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 0.0001
  Prefactor  = 3.08585
  norm       = 0.0001
  Normalizat = 1.64116
  Prefactor  = 0.843206
 **********
 **   18 **HESSE 
 **********

 FCN=   7457.333     FROM HESSE     STATUS=OK           319 CALLS     3257 TOTAL
                     EDM=   .40E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     13.818        25.391        .43112E-05   -1.4964    
   2  Prefactor     43.055        19.357        .12217E-04   -1.4395    
   3  norm          .10000E-03    6.6032        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    2.1539        .24658E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    23.984        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     28.724        26.417        .14940E-04   -1.4636    
   7  Prefactor     .10000E-03    27.453        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     1.1909        50.611        .15938       -1.5490    
   9  Prefactor     .10048E-03    28.237        .11710       -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    1.6905        .21893E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     3.4876        1.8646        .33517E-05   -1.5334    
  12  Prefactor     .34844        76.031        .16978E-03   -1.5590    
  13  Prefactor     .68214        41.285        .18533E-03   -1.5543    
  14  norm          3.0612        1.2383        .23431E-05   -1.5358    
  15  Prefactor     .10000E-03    34.001        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          .10000E-03    2.2134        .25076E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .10000E-03    3.9381        .65454E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     3.0858        3.4130        .65142E-05   -1.5357    
  19  norm          .10000E-03    1.4009        .19733E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Normalizat    1.6412        .29432        .64131E-04   -.73885    
  21  Prefactor     .84321        .13809        .41055E-04   -.98155    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.95927e-09
Minuit parameter uncertainties:
  1  25.4107
  2  19.36
  3  0.000121616
  4  3.14095e-05
  5  0.000143024
  6  26.4274
  7  6.93575e-06
  8  15.5405
  9  0.0073292
  10  8.13193e-06
  11  1.86463
  12  10.306
  13  10.6205
  14  1.23831
  15  3.49178e-05
  16  6.90291e-06
  17  1.2947e-05
  18  3.41322
  19  8.62717e-06
  20  0.294636
  21  0.138148
Done.

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

Extracting fit parameters...

4FGL J1238.3-1959
   Spectrum: PowerLaw
307    Prefactor:  3.484e-01  1.031e+01  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:  8.432e-01  1.381e-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.641e+00  2.946e-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: 8.60e-08 ph cm-2 s-1
Energy Flux Upper Limit: 6.52e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/854525/likelihoodResults_597542401_597801601_4FGL_J1238.3-1959_daily_bin1382.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) = 7457.3304215
delta logL = 0.00281785611514

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 7457.32411423
delta logL = 0.00912512309515

Fit tolerance = 1e-08

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

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

 FCN=   7457.324     FROM MIGRAD    STATUS=CONVERGED    101 CALLS      292 TOTAL
                     EDM=   .14E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     1.7830        25.868        .15702E-02   -.43159E-04
   2  Index         1.8691        1.5549        .10953E-01   -.35059E-04
   3  Normalizat    1.6424        .28161        .32056E-03   -.10377E-03
   4  Prefactor     .84156        .13655        .20546E-03    .56245E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 1.78296
  Index      = 1.86912
  Normalizat = 1.64245
  Prefactor  = 0.841557
 **********
 **   18 **HESSE 
 **********

 FCN=   7457.324     FROM HESSE     STATUS=OK            25 CALLS      317 TOTAL
                     EDM=   .14E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     1.7830        24.538        .62809E-04   -1.5441    
   2  Index         1.8691        1.5178        .43810E-03   -.67664    
   3  Normalizat    1.6424        .28183        .12822E-04   -.73851    
   4  Prefactor     .84156        .13661        .41093E-04   -.98214    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.44026e-09
Minuit parameter uncertainties:
  1  13.235
  2  1.55905
  3  0.282105
  4  0.136662
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/854525': 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) = 7457.32411373
delta logL = 0.00912562258873

Extracting fit parameters...

4FGL J1238.3-1959
   Spectrum: PowerLaw
307    Prefactor:  1.783e+00  1.323e+01  1.000e-04  1.000e+04 ( 1.000e-13)
308        Index:  1.869e+00  1.559e+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:  8.416e-01  1.367e-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.642e+00  2.821e-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/854525/cmap_HighResolution_597542401_597801601_4FGL_J1238.3-1959_daily_bin1382.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='6.52e-03', job_status='DONE', photon_flux_upper_limit='8.60e-08', time_completed='2021-09-06 02:40:08.453403', job_id='854525', GAL2='0.84', fit_tolerance='1e-08', EG2='1.64', EG='1.64', time_epoch_completed='1630921208.45', return_code2='0', ts='0.00', comment='SUCCESS', return_code='0', GAL='0.84', dlogl='9.13e-03', ts2='0.02', photon_index_error='0.00', photon_index='2.15' WHERE bin_id='1382' AND source_name='4FGL J1238.3-1959' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 02:40:08 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0279>
Subject: Job 854525: <4FGL_J1238.3-1959_daily_bin1382> in cluster <slac> Done

Job <4FGL_J1238.3-1959_daily_bin1382> was submitted from host <rhel6-64f> by user <kocevski> in cluster <slac> at Mon Sep  6 02:25:24 2021
Job was executed on host(s) <bullet0279>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep  6 02:25:36 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:25:36 2021
Terminated at Mon Sep  6 02:40:09 2021
Results reported at Mon Sep  6 02:40:09 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1238.3-1959_daily_bin1382 189.594 -19.9945 597542401 597801601 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 :                                   778.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             334.40 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   872 sec.
    Turnaround time :                            885 sec.

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

