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


Performing analysis on: 4FGL_J1238.3-1959_daily_bin481
RA = 189.594, Dec = -19.9945
tmin = 364003201, tmax = 364262401
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='848125', job_status='RUN', time_executed='2021-09-06 02:06:39.223090', time_epoch_executed='1630919199.22' WHERE source_name='4FGL J1238.3-1959' and cadence='daily' and bin_id='481'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/848125

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/848125/ft1_4FGL_J1238.3-1959_daily_bin481.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/848125/ft2_4FGL_J1238.3-1959_daily_bin481.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/848125/ft1_4FGL_J1238.3-1959_daily_bin481.fits outfile=/scratch/kocevski/848125/ft1_filteredMKT_4FGL_J1238.3-1959_daily_bin481.fits ra=189.594 dec=-19.9945 rad=12.0 tmin=364003201.0 tmax=364262401.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 3.22
user 2.99
sys 0.21

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/848125/ft2_4FGL_J1238.3-1959_daily_bin481.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/848125/ft1_filteredMKT_4FGL_J1238.3-1959_daily_bin481.fits evtable="EVENTS" outfile="/scratch/kocevski/848125/ft1_filtered_4FGL_J1238.3-1959_daily_bin481.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.50
user 0.33
sys 0.15

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/848125/ft1_filtered_4FGL_J1238.3-1959_daily_bin481.fits" evtable="EVENTS" scfile=/scratch/kocevski/848125/ft2_4FGL_J1238.3-1959_daily_bin481.fits sctable="SC_DATA" outfile=/scratch/kocevski/848125/ltcube_364003201_364262401_4FGL_J1238.3-1959_daily_bin481.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/848125/ft2_4FGL_J1238.3-1959_daily_bin481.fits
.....................!
real 13.23
user 12.87
sys 0.31

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/848125/ft1_filtered_4FGL_J1238.3-1959_daily_bin481.fits evtable="EVENTS" scfile=/scratch/kocevski/848125/ft2_4FGL_J1238.3-1959_daily_bin481.fits sctable="SC_DATA" expcube=/scratch/kocevski/848125/ltcube_364003201_364262401_4FGL_J1238.3-1959_daily_bin481.fits outfile=/scratch/kocevski/848125/expmap_364003201_364262401_4FGL_J1238.3-1959_daily_bin481.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/848125/ltcube_364003201_364262401_4FGL_J1238.3-1959_daily_bin481.fits
.....................!
real 191.19
user 186.82
sys 3.95

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/848125/ft1_filtered_4FGL_J1238.3-1959_daily_bin481.fits scfile=/scratch/kocevski/848125/ft2_4FGL_J1238.3-1959_daily_bin481.fits outfile=/scratch/kocevski/848125/cmap_364003201_364262401_4FGL_J1238.3-1959_daily_bin481.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.53
user 0.37
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/848125/ft1_filtered_4FGL_J1238.3-1959_daily_bin481.fits scfile=/scratch/kocevski/848125/ft2_4FGL_J1238.3-1959_daily_bin481.fits outfile=/scratch/kocevski/848125/cmap_HighResolution_364003201_364262401_4FGL_J1238.3-1959_daily_bin481.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.37
sys 0.16

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/848125/ft1_filtered_4FGL_J1238.3-1959_daily_bin481.fits evtable="EVENTS" scfile=/scratch/kocevski/848125/ft2_4FGL_J1238.3-1959_daily_bin481.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/848125/Model_4FGL_J1238.3-1959_daily_bin481.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/848125/ft1_filtered_4FGL_J1238.3-1959_daily_bin481.fits.....................!
real 55.96
user 54.64
sys 1.14

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    34.165       1.0000         .10000E-03   10000.    
     2 'Prefactor '    18.215       1.0000         .10000E-03   10000.    
     3 'norm      '    .11199E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    12.688       1.0000         .10000E-03   10000.    
     5 'Prefactor '    7.5064       1.0000         .10000E-03   10000.    
     6 'Prefactor '    17.345       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .12820E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .14132E-02   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .53496E-02   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10013E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    4.2731       1.0000         .10000E-03   10000.    
    12 'Prefactor '    19.623       1.0000         .10000E-03   10000.    
    13 'Prefactor '    21.304       1.0000         .10000E-03   10000.    
    14 'norm      '    2.5425       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10920E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    .10003E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    6.2805       1.0000         .10000E-03   10000.    
    19 'norm      '    2.0910       1.0000         .10000E-03   10000.    
    20 'Normalizat'    1.1645       1.0000         .10000E-01   10.000    
    21 'Prefactor '    1.0784       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=   6431.538     FROM MIGRAD    STATUS=CONVERGED    469 CALLS     1972 TOTAL
                     EDM=   .54E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.6%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     34.123        36.824       -.35220E-07   -.96800E-05
   2  Prefactor     18.212        23.900       -.72964E-06   -.23571E-05
   3  norm          .10000E-03    10.869        .28265E-06** at limit **
   4  Prefactor     12.705        9.0038       -.80463E-07    .42257E-04
   5  Prefactor     7.4009        154.35       -.15396E-05    .21770E-05
   6  Prefactor     17.277        41.332        .87545E-07   -.89308E-05
   7  Prefactor     .10000E-03    30.051       -.39022E-05** at limit **
   8  Prefactor     .10000E-03    318.24       -.20198E-04** at limit **
   9  Prefactor     .10004E-03    11.827        .38155E-06** at limit **
  10  Prefactor     .10000E-03    3.7252        .20796E-06** at limit **
  11  Prefactor     4.2725        2.4977       -.43414E-07   -.98888E-04
  12  Prefactor     19.651        17.100        .10992E-06    .40108E-04
  13  Prefactor     21.314        12.594        .46849E-07   -.10313E-04
  14  norm          2.5427        1.3384        .40356E-07    .66553E-04
  15  Prefactor     .10000E-03    140.17        .10905E-05** at limit **
  16  norm          .10000E-03    2.5286        .61046E-07** at limit **
  17  norm          .10000E-03    2.9955        .14880E-06** at limit **
  18  Prefactor     6.2796        5.2248       -.22381E-06   -.43867E-04
  19  norm          2.0911        2.3249        .48761E-07    .35497E-04
  20  Normalizat    1.1642        .30228       -.29334E-05    .43945E-04
  21  Prefactor     1.0785        .14298        .14428E-05   -.80635E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 34.123
  Prefactor  = 18.2123
  norm       = 0.0001
  Prefactor  = 12.705
  Prefactor  = 7.40094
  Prefactor  = 17.2765
  Prefactor  = 0.0001
  Prefactor  = 0.000100003
  Prefactor  = 0.000100042
  Prefactor  = 0.0001
  Prefactor  = 4.27247
  Prefactor  = 19.6514
  Prefactor  = 21.3136
  norm       = 2.54267
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 0.0001
  Prefactor  = 6.27956
  norm       = 2.09112
  Normalizat = 1.16418
  Prefactor  = 1.07846
 **********
 **   18 **HESSE 
 **********

 FCN=   6431.538     FROM HESSE     STATUS=OK           325 CALLS     2297 TOTAL
                     EDM=   .33E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     34.123        36.825        .68558E-04   -1.4539    
   2  Prefactor     18.212        23.770        .93843E-04   -1.4854    
   3  norm          .10000E-03    11.117        .36285E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     12.705        8.9862        .11245E-03   -1.4995    
   5  Prefactor     7.4009        154.23        .14638E-03   -1.5164    
   6  Prefactor     17.277        41.242        .96167E-04   -1.4876    
   7  Prefactor     .10000E-03    30.276        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    322.63        .20517E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .10004E-03    173.38        .53058E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    9.5504        .29360E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     4.2725        2.4502        .92008E-04   -1.5295    
  12  Prefactor     19.651        17.116        .90416E-04   -1.4821    
  13  Prefactor     21.314        12.586        .86779E-04   -1.4784    
  14  norm          2.5427        1.3345        .64313E-04   -1.5389    
  15  Prefactor     .10000E-03    140.62        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          .10000E-03    2.5304        .12455E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .10000E-03    3.0068        .13552E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     6.2796        5.2300        .80087E-03   -1.5207    
  19  norm          2.0911        2.3152        .12524E-03   -1.5419    
  20  Normalizat    1.1642        .33629        .38879E-03   -.87717    
  21  Prefactor     1.0785        .15993        .19453E-03   -.90158    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.34507e-10
Minuit parameter uncertainties:
  1  36.8499
  2  23.7818
  3  8.05099e-05
  4  8.98718
  5  67.7712
  6  41.3102
  7  0.000105671
  8  0.00204985
  9  0.00541939
  10  6.3209e-05
  11  2.45027
  12  17.1206
  13  12.5874
  14  1.33448
  15  0.000334564
  16  1.2818e-06
  17  3.73005e-06
  18  5.23042
  19  2.31525
  20  0.33691
  21  0.159998
Done.

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

Extracting fit parameters...

4FGL J1238.3-1959
   Spectrum: PowerLaw
307    Prefactor:  1.965e+01  1.712e+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.078e+00  1.600e-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.164e+00  3.369e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 2.31
Ra Dec: 189.594 -19.994
Photon Index (Fixed Index): 2.15 +/- 0.00
Photon Flux (Fixed Index): 5.81e-08 +/- 5.06e-08
Energy Flux (Fixed Index): 2.87e-05 +/- 2.50e-05

TS (Fixed Index): 2.31
Ra Dec: 189.594 -19.994
Photon Flux Upper Limit: 1.75e-07 ph cm-2 s-1
Energy Flux Upper Limit: 1.33e-02 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/848125/likelihoodResults_364003201_364262401_4FGL_J1238.3-1959_daily_bin481.txt

Performing a free index iterative likelihood fit...

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

Done.

Freeing candidate source...
Done.

Fit tolerance = 1

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6431.37249859
delta logL = 0.165158283929

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6431.36281609
delta logL = 0.174840781988

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    14.720       1.0000         .10000E-03   10000.    
     2 'Index     '    2.5290       1.0000          .0000       10.000    
     3 'Normalizat'    1.1295       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0866       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=   6431.363     FROM MIGRAD    STATUS=CONVERGED     97 CALLS      302 TOTAL
                     EDM=   .24E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     14.710        17.766        .52197E-03   -.34457E-04
   2  Index         2.5282        .71027        .65098E-02    .21564E-04
   3  Normalizat    1.1296        .33398        .39394E-03    .94369E-05
   4  Prefactor     1.0867        .15924        .19384E-03    .26557E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 14.7102
  Index      = 2.52823
  Normalizat = 1.12963
  Prefactor  = 1.08673
 **********
 **   18 **HESSE 
 **********

 FCN=   6431.363     FROM HESSE     STATUS=OK            25 CALLS      327 TOTAL
                     EDM=   .32E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     14.710        16.110        .20879E-04   -1.4941    
   2  Index         2.5282        .64315        .26039E-03   -.51709    
   3  Normalizat    1.1296        .33331        .15758E-04   -.88806    
   4  Prefactor     1.0867        .15911        .38768E-04   -.89892    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.17306e-12
Minuit parameter uncertainties:
  1  16.1142
  2  0.645517
  3  0.33393
  4  0.159176
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/848125': 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) = 6431.36281143
delta logL = 0.174845441914

Extracting fit parameters...

4FGL J1238.3-1959
   Spectrum: PowerLaw
307    Prefactor:  1.471e+01  1.611e+01  1.000e-04  1.000e+04 ( 1.000e-13)
308        Index:  2.528e+00  6.455e-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.087e+00  1.592e-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.130e+00  3.339e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 2.66
Ra Dec: 189.594 -19.994
Photon Index (Free Index): 2.53 +/- 0.65
Photon Flux (Free Index): 9.11e-08 +/- 8.79e-08
Energy Flux (Free Index): 2.57e-05 +/- 2.04e-05

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/848125/cmap_HighResolution_364003201_364262401_4FGL_J1238.3-1959_daily_bin481.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.33e-02', comment='SUCCESS', photon_flux='5.81e-08', energy_flux2='2.57e-05', photon_flux_error='5.06e-08', dlogl='1.75e-01', energy_flux='2.87e-05', photon_flux2='9.11e-08', job_status='DONE', time_completed='2021-09-06 02:17:11.287086', photon_index_error2='0.65', photon_index2='2.53', ts='2.31', fit_tolerance='1e-08', GAL='1.08', photon_index_error='0.00', photon_flux_upper_limit='1.75e-07', energy_flux_error2='2.04e-05', EG='1.16', time_epoch_completed='1630919831.29', return_code='0', job_id='848125', GAL2='1.09', EG2='1.13', return_code2='0', energy_flux_error='2.50e-05', photon_flux_error2='8.79e-08', ts2='2.66', photon_index='2.15' WHERE bin_id='481' AND source_name='4FGL J1238.3-1959' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 02:17:11 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0193>
Subject: Job 848125: <4FGL_J1238.3-1959_daily_bin481> in cluster <slac> Done

Job <4FGL_J1238.3-1959_daily_bin481> was submitted from host <rhel6-64k> by user <kocevski> in cluster <slac> at Mon Sep  6 02:05:30 2021
Job was executed on host(s) <bullet0193>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep  6 02:06:22 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:06:22 2021
Terminated at Mon Sep  6 02:17:11 2021
Results reported at Mon Sep  6 02:17:11 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1238.3-1959_daily_bin481 189.594 -19.9945 364003201 364262401 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 :                                   628.15 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             312.91 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   649 sec.
    Turnaround time :                            701 sec.

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

