/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 4 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 = 7415
number of fields = 27
No RA_SUN column yet. Adding RA_SUN/DEC_SUN columns.
Done.


Performing analysis on: 4FGL_J1238.3-1959_daily_bin214
RA = 189.594, Dec = -19.9945
tmin = 294796801, tmax = 295056001
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='845171', job_status='RUN', time_executed='2021-09-06 01:56:16.204350', time_epoch_executed='1630918576.2' WHERE source_name='4FGL J1238.3-1959' and cadence='daily' and bin_id='214'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/845171

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/845171/ft1_4FGL_J1238.3-1959_daily_bin214.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/845171/ft2_4FGL_J1238.3-1959_daily_bin214.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/845171/ft1_4FGL_J1238.3-1959_daily_bin214.fits outfile=/scratch/kocevski/845171/ft1_filteredMKT_4FGL_J1238.3-1959_daily_bin214.fits ra=189.594 dec=-19.9945 rad=12.0 tmin=294796801.0 tmax=295056001.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.84
user 2.17
sys 0.19

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/845171/ft1_filtered_4FGL_J1238.3-1959_daily_bin214.fits" evtable="EVENTS" scfile=/scratch/kocevski/845171/ft2_4FGL_J1238.3-1959_daily_bin214.fits sctable="SC_DATA" outfile=/scratch/kocevski/845171/ltcube_294796801_295056001_4FGL_J1238.3-1959_daily_bin214.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/845171/ft2_4FGL_J1238.3-1959_daily_bin214.fits
.....................!
real 15.56
user 14.48
sys 0.35

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/845171/ft1_filtered_4FGL_J1238.3-1959_daily_bin214.fits evtable="EVENTS" scfile=/scratch/kocevski/845171/ft2_4FGL_J1238.3-1959_daily_bin214.fits sctable="SC_DATA" expcube=/scratch/kocevski/845171/ltcube_294796801_295056001_4FGL_J1238.3-1959_daily_bin214.fits outfile=/scratch/kocevski/845171/expmap_294796801_295056001_4FGL_J1238.3-1959_daily_bin214.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/845171/ltcube_294796801_295056001_4FGL_J1238.3-1959_daily_bin214.fits
.....................!
real 190.92
user 186.00
sys 3.89

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/845171/ft1_filtered_4FGL_J1238.3-1959_daily_bin214.fits scfile=/scratch/kocevski/845171/ft2_4FGL_J1238.3-1959_daily_bin214.fits outfile=/scratch/kocevski/845171/cmap_294796801_295056001_4FGL_J1238.3-1959_daily_bin214.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.37
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/845171/ft1_filtered_4FGL_J1238.3-1959_daily_bin214.fits scfile=/scratch/kocevski/845171/ft2_4FGL_J1238.3-1959_daily_bin214.fits outfile=/scratch/kocevski/845171/cmap_HighResolution_294796801_295056001_4FGL_J1238.3-1959_daily_bin214.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.55
user 0.41
sys 0.14

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/845171/ft1_filtered_4FGL_J1238.3-1959_daily_bin214.fits evtable="EVENTS" scfile=/scratch/kocevski/845171/ft2_4FGL_J1238.3-1959_daily_bin214.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/845171/Model_4FGL_J1238.3-1959_daily_bin214.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/845171/ft1_filtered_4FGL_J1238.3-1959_daily_bin214.fits.....................!
real 65.45
user 63.98
sys 1.22

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    17.320       1.0000         .10000E-03   10000.    
     2 'Prefactor '    24.125       1.0000         .10000E-03   10000.    
     3 'norm      '    .20560E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .84957       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .12033E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .11005E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10287E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .11588E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    14.059       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    6.9399       1.0000         .10000E-03   10000.    
    12 'Prefactor '    26.687       1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10137E-03   1.0000         .10000E-03   10000.    
    14 'norm      '    2.3704       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .16950E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    10.954       1.0000         .10000E-03   10000.    
    18 'Prefactor '    5.0175       1.0000         .10000E-03   10000.    
    19 'norm      '    3.6528       1.0000         .10000E-03   10000.    
    20 'Normalizat'    1.3750       1.0000         .10000E-01   10.000    
    21 'Prefactor '    1.0359       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.

 FCN=   8344.818     FROM MIGRAD    STATUS=CONVERGED    462 CALLS     2250 TOTAL
                     EDM=   .30E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.9%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     17.341        32.666        .26132E-06    .19102E-04
   2  Prefactor     24.161        15.188        .26473E-06   -.99325E-04
   3  norm          .10000E-03    3.8734       -.57696E-06** at limit **
   4  Prefactor     .84815        5.6086        .28716E-05   -.34240E-03
   5  Prefactor     .10000E-03    22.910        .21720E-05** at limit **
   6  Prefactor     .10000E-03    19.655       -.85001E-06** at limit **
   7  Prefactor     .10000E-03    6.3669       -.13014E-07** at limit **
   8  Prefactor     .10000E-03    26.470       -.23341E-05** at limit **
   9  Prefactor     14.067        27.575       -.75008E-06   -.59811E-04
  10  Prefactor     .10000E-03    2.0334        .98419E-08** at limit **
  11  Prefactor     6.9396        2.4589        .12661E-07   -.31097E-05
  12  Prefactor     26.672        16.084        .11734E-05    .39114E-03
  13  Prefactor     .10000E-03    7.0760       -.63961E-08** at limit **
  14  norm          2.3703        1.2686        .13592E-07   -.14888E-03
  15  Prefactor     .10000E-03    198.65       -.59588E-06** at limit **
  16  norm          .10000E-03    2.3250        .12002E-07** at limit **
  17  norm          10.948        9.3646        .14476E-06    .22597E-03
  18  Prefactor     5.0209        8.7533        .64220E-06    .15817E-03
  19  norm          3.6524        2.8311        .33712E-07   -.74270E-04
  20  Normalizat    1.3751        .25082       -.54851E-06   -.87840E-05
  21  Prefactor     1.0359        .12367       -.16870E-06   -.40252E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 17.3405
  Prefactor  = 24.1612
  norm       = 0.000100004
  Prefactor  = 0.848147
  Prefactor  = 0.000100002
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.000100002
  Prefactor  = 14.0667
  Prefactor  = 0.0001
  Prefactor  = 6.93965
  Prefactor  = 26.6717
  Prefactor  = 0.0001
  norm       = 2.37028
  Prefactor  = 0.000100001
  norm       = 0.0001
  norm       = 10.948
  Prefactor  = 5.02086
  norm       = 3.65239
  Normalizat = 1.37506
  Prefactor  = 1.03588
 **********
 **   18 **HESSE 
 **********

 FCN=   8344.818     FROM HESSE     STATUS=OK           319 CALLS     2569 TOTAL
                     EDM=   .96E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     17.341        32.725        .96238E-04   -1.4875    
   2  Prefactor     24.161        13.620        .81554E-04   -1.4724    
   3  norm          .10000E-03    11.986        .30347E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .84815        6.1613        .42532E-03   -1.5524    
   5  Prefactor     .10000E-03    23.615        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    19.803        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    6.3707        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    27.261        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     14.067        27.650        .10682E-03   -1.4958    
  10  Prefactor     .10000E-03    2.0490        .12715E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     6.9396        2.4583        .82731E-04   -1.5181    
  12  Prefactor     26.672        16.624        .77548E-04   -1.4675    
  13  Prefactor     .10000E-03    7.1414        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          2.3703        1.2636        .71444E-04   -1.5400    
  15  Prefactor     .10000E-03    200.14        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          .10000E-03    2.3325        .13603E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          10.948        9.2556        .12105E-03   -1.5046    
  18  Prefactor     5.0209        8.6458        .17952E-03   -1.5260    
  19  norm          3.6524        2.8306        .13056E-03   -1.5326    
  20  Normalizat    1.3751        .29570        .36613E-03   -.81353    
  21  Prefactor     1.0359        .14648        .20264E-03   -.91543    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 9.57163e-10
Minuit parameter uncertainties:
  1  32.7593
  2  13.6215
  3  0.000431248
  4  4.57235
  5  0.000391863
  6  0.000130054
  7  8.74877e-07
  8  0.000424902
  9  27.675
  10  7.53583e-07
  11  2.45834
  12  16.6267
  13  2.19646e-06
  14  1.26365
  15  0.00108509
  16  5.16941e-07
  17  9.25676
  18  8.64794
  19  2.83066
  20  0.296063
  21  0.14654
Done.

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

Extracting fit parameters...

4FGL J1238.3-1959
   Spectrum: PowerLaw
307    Prefactor:  2.667e+01  1.663e+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:  1.036e+00  1.465e-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.375e+00  2.961e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 4.08
Ra Dec: 189.594 -19.994
Photon Index (Fixed Index): 2.15 +/- 0.00
Photon Flux (Fixed Index): 7.89e-08 +/- 4.91e-08
Energy Flux (Fixed Index): 3.89e-05 +/- 2.43e-05

Performing a free index iterative likelihood fit...

Freezing all point sources, except source of interest...

Done.

Freeing candidate source...
Done.

Fit tolerance = 1

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 8344.81558335
delta logL = 0.00207650951234

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 8344.81326821
delta logL = 0.00439165631724

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    25.292       1.0000         .10000E-03   10000.    
     2 'Index     '    2.2295       1.0000          .0000       10.000    
     3 'Normalizat'    1.3643       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0391       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=   8344.813     FROM MIGRAD    STATUS=FAILED        89 CALLS      282 TOTAL
                     EDM=   .22E-07    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     25.291        26.816        .79653E-04   -.62800E-04
   2  Index         2.2301        1.0143        .81942E-02    .58663E-03
   3  Normalizat    1.3643        .32711        .36734E-03   -.14088E-03
   4  Prefactor     1.0391        .15025        .20237E-03   -.44470E-03
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   8344.813     FROM SIMPLEX   STATUS=UNCHANGED     72 CALLS      354 TOTAL
                     EDM=   .97E-05    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     25.291        26.816        .12961E-03   -1.4702    
   2  Index         2.2301        1.0143        .76702E-03   -.58715    
   3  Normalizat    1.3643        .32711        .19920E-03   -.81668    
   4  Prefactor     1.0391        .15025        .15011E-03   -.91439    
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   8344.813     FROM MIGRAD    STATUS=CONVERGED     29 CALLS      383 TOTAL
                     EDM=   .70E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     25.291        23.421        .31861E-05   -.42818E-04
   2  Index         2.2301        .88378        .16388E-02    .11377E-05
   3  Normalizat    1.3643        .31928        .14694E-04   -.23211E-04
   4  Prefactor     1.0391        .14856        .40474E-04   -.63593E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 25.2908
  Index      = 2.23006
  Normalizat = 1.36426
  Prefactor  = 1.03906
 **********
 **   18 **HESSE 
 **********

 FCN=   8344.813     FROM HESSE     STATUS=OK            23 CALLS      406 TOTAL
                     EDM=   .59E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     25.291        22.938        .63722E-06   -1.4702    
   2  Index         2.2301        .86284        .65554E-04   -.58715    
   3  Normalizat    1.3643        .31834        .29387E-05   -.81668    
   4  Prefactor     1.0391        .14841        .80948E-05   -.91439    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 5.91543e-12
Minuit parameter uncertainties:
  1  22.946
  2  0.869137
  3  0.318806
  4  0.148465
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/845171': 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) = 8344.81326774
delta logL = 0.0043921244087

Extracting fit parameters...

4FGL J1238.3-1959
   Spectrum: PowerLaw
307    Prefactor:  2.529e+01  2.295e+01  1.000e-04  1.000e+04 ( 1.000e-13)
308        Index:  2.230e+00  8.691e-01  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:  1.039e+00  1.485e-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.364e+00  3.188e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 4.08
Ra Dec: 189.594 -19.994
Photon Index (Free Index): 2.23 +/- 0.87
Photon Flux (Free Index): 8.67e-08 +/- 1.01e-07
Energy Flux (Free Index): 3.69e-05 +/- 3.04e-05

Creating a high resolution counts map...
INFO: Auto-setting vmin to -1.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  1.110e+00 [aplpy.core]
Saving /scratch/kocevski/845171/cmap_HighResolution_294796801_295056001_4FGL_J1238.3-1959_daily_bin214.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='7.89e-08', energy_flux2='3.69e-05', photon_flux_error='4.91e-08', dlogl='4.39e-03', energy_flux='3.89e-05', photon_flux2='8.67e-08', job_status='DONE', time_completed='2021-09-06 02:07:45.036583', photon_index_error2='0.87', photon_index2='2.23', ts='4.08', fit_tolerance='1e-08', GAL='1.04', photon_index_error='0.00', energy_flux_error2='3.04e-05', EG='1.38', time_epoch_completed='1630919265.04', return_code='0', job_id='845171', GAL2='1.04', EG2='1.36', return_code2='0', energy_flux_error='2.43e-05', photon_flux_error2='1.01e-07', ts2='4.08', photon_index='2.15' WHERE bin_id='214' AND source_name='4FGL J1238.3-1959' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 02:07:45 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0222>
Subject: Job 845171: <4FGL_J1238.3-1959_daily_bin214> in cluster <slac> Done

Job <4FGL_J1238.3-1959_daily_bin214> was submitted from host <rhel6-64p> by user <kocevski> in cluster <slac> at Mon Sep  6 01:55:33 2021
Job was executed on host(s) <bullet0222>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep  6 01:56:00 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Mon Sep  6 01:56:00 2021
Terminated at Mon Sep  6 02:07:45 2021
Results reported at Mon Sep  6 02:07:45 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1238.3-1959_daily_bin214 189.594 -19.9945 294796801 295056001 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 :                                   680.36 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             335.04 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   705 sec.
    Turnaround time :                            732 sec.

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

