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


Performing analysis on: 4FGL_J1238.5-1201_daily_bin1318
RA = 189.625, Dec = -12.028
tmin = 580953601, tmax = 581212801
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='862680', job_status='RUN', time_executed='2021-09-06 02:53:25.088486', time_epoch_executed='1630922005.09' WHERE source_name='4FGL J1238.5-1201' and cadence='daily' and bin_id='1318'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/862680

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/862680/ft1_4FGL_J1238.5-1201_daily_bin1318.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/862680/ft2_4FGL_J1238.5-1201_daily_bin1318.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/862680/ft1_4FGL_J1238.5-1201_daily_bin1318.fits outfile=/scratch/kocevski/862680/ft1_filteredMKT_4FGL_J1238.5-1201_daily_bin1318.fits ra=189.625 dec=-12.028 rad=12.0 tmin=580953601.0 tmax=581212801.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.17
user 2.76
sys 0.21

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/862680/ft2_4FGL_J1238.5-1201_daily_bin1318.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/862680/ft2_4FGL_J1238.5-1201_daily_bin1318.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/862680/ft1_filteredMKT_4FGL_J1238.5-1201_daily_bin1318.fits evtable="EVENTS" outfile="/scratch/kocevski/862680/ft1_filtered_4FGL_J1238.5-1201_daily_bin1318.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.68
user 0.33
sys 0.16

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/862680/ft1_filtered_4FGL_J1238.5-1201_daily_bin1318.fits" evtable="EVENTS" scfile=/scratch/kocevski/862680/ft2_4FGL_J1238.5-1201_daily_bin1318.fits sctable="SC_DATA" outfile=/scratch/kocevski/862680/ltcube_580953601_581212801_4FGL_J1238.5-1201_daily_bin1318.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/862680/ft2_4FGL_J1238.5-1201_daily_bin1318.fits
.....................!
real 15.47
user 14.81
sys 0.32

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/862680/ft1_filtered_4FGL_J1238.5-1201_daily_bin1318.fits evtable="EVENTS" scfile=/scratch/kocevski/862680/ft2_4FGL_J1238.5-1201_daily_bin1318.fits sctable="SC_DATA" expcube=/scratch/kocevski/862680/ltcube_580953601_581212801_4FGL_J1238.5-1201_daily_bin1318.fits outfile=/scratch/kocevski/862680/expmap_580953601_581212801_4FGL_J1238.5-1201_daily_bin1318.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/862680/ltcube_580953601_581212801_4FGL_J1238.5-1201_daily_bin1318.fits
.....................!
real 191.57
user 186.08
sys 4.76

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

Setting source of interest to:
4FGL J1238.5-1201 @ 189.625 -12.028

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/862680/ft1_filtered_4FGL_J1238.5-1201_daily_bin1318.fits scfile=/scratch/kocevski/862680/ft2_4FGL_J1238.5-1201_daily_bin1318.fits outfile=/scratch/kocevski/862680/cmap_580953601_581212801_4FGL_J1238.5-1201_daily_bin1318.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.625 yref=-12.028 axisrot=0.0 rafield="RA" decfield="DEC" proj="AIT" hpx_ordering_scheme="RING" hpx_order=3 hpx_ebin=yes hpx_region="" evtable="EVENTS" sctable="SC_DATA" efield="ENERGY" tfield="TIME" chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

This is gtbin version HEAD
real 0.55
user 0.38
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/862680/ft1_filtered_4FGL_J1238.5-1201_daily_bin1318.fits scfile=/scratch/kocevski/862680/ft2_4FGL_J1238.5-1201_daily_bin1318.fits outfile=/scratch/kocevski/862680/cmap_HighResolution_580953601_581212801_4FGL_J1238.5-1201_daily_bin1318.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.625 yref=-12.028 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.40
sys 0.16

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/862680/ft1_filtered_4FGL_J1238.5-1201_daily_bin1318.fits evtable="EVENTS" scfile=/scratch/kocevski/862680/ft2_4FGL_J1238.5-1201_daily_bin1318.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/862680/Model_4FGL_J1238.5-1201_daily_bin1318.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/862680/ft1_filtered_4FGL_J1238.5-1201_daily_bin1318.fits.....................!
real 50.84
user 49.39
sys 1.15

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/862680/ft1_filtered_4FGL_J1238.5-1201_daily_bin1318.fits', '/scratch/kocevski/862680/ft2_4FGL_J1238.5-1201_daily_bin1318.fits', expMap='/scratch/kocevski/862680/expmap_580953601_581212801_4FGL_J1238.5-1201_daily_bin1318.fits', expCube='/scratch/kocevski/862680/ltcube_580953601_581212801_4FGL_J1238.5-1201_daily_bin1318.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/862680/Model_4FGL_J1238.5-1201_daily_bin1318.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1238.5-1201'

4FGL J1238.5-1201
   Spectrum: PowerLaw
326    Prefactor:  4.386e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-12)
327        Index:  2.660e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
328        Scale:  5.228e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/862680/ft1_filtered_4FGL_J1238.5-1201_daily_bin1318.fits
Spacecraft file(s): /scratch/kocevski/862680/ft2_4FGL_J1238.5-1201_daily_bin1318.fits
Exposure map: /scratch/kocevski/862680/expmap_580953601_581212801_4FGL_J1238.5-1201_daily_bin1318.fits
Exposure cube: /scratch/kocevski/862680/ltcube_580953601_581212801_4FGL_J1238.5-1201_daily_bin1318.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/862680/Model_4FGL_J1238.5-1201_daily_bin1318.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) = 5677.66843947

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    2.5045       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10054E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10078E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    24.460       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10031E-03   1.0000         .10000E-03   10000.    
     6 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .97665E-01   1.0000         .10000E-03   10000.    
     8 'Prefactor '    12.050       1.0000         .10000E-03   10000.    
     9 'Prefactor '    7.2460       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    3.3408       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    62.487       1.0000         .10000E-03   10000.    
    14 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    144.42       1.0000         .10000E-03   10000.    
    16 'norm      '    1.0929       1.0000         .10000E-03   10000.    
    17 'norm      '    11.845       1.0000         .10000E-03   10000.    
    18 'norm      '    6.3413       1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    20 'norm      '    14.275       1.0000         .10000E-03   10000.    
    21 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
    24 'Normalizat'    .92229       1.0000         .10000E-01   10.000    
    25 'Prefactor '    1.2148       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6130E+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=   5677.645     FROM MIGRAD    STATUS=CONVERGED   1025 CALLS     3337 TOTAL
                     EDM=   .12E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     2.5029        4.1779        .19184E-03   -.22187E-03
   2  Prefactor     .10000E-03    13.534        .18142E-02** at limit **
   3  Prefactor     .10000E-03    89.836        .18142E-02** at limit **
   4  Prefactor     24.451        19.898        .80995E-04    .39302E-05
   5  Prefactor     .10000E-03    42.858        .18142E-02** at limit **
   6  norm          .10000E-03    1.0211        .74184E-03** at limit **
   7  Prefactor     .64802E-01    13.103        .56162E-01    .23576E-03
   8  Prefactor     12.055        4.1106        .79232E-04   -.50507E-04
   9  Prefactor     7.2462        8.5083        .14901E-03   -.27771E-04
  10  Prefactor     .10000E-03    6.2537        .18142E-02** at limit **
  11  Prefactor     3.3535        29.537        .22144E-03   -.30342E-04
  12  Prefactor     .10000E-03    3.5243        .13792E-02** at limit **
  13  Prefactor     62.440        60.050        .50762E-04    .54736E-04
  14  norm          .10000E-03    9.9793        .18142E-02** at limit **
  15  Prefactor     144.33        151.19        .16764E-03    .31738E-04
  16  norm          1.0931        .35681        .23071E-04   -.67608E-03
  17  norm          11.842        16.825        .11640E-03   -.20023E-04
  18  norm          6.3411        11.005        .15940E-03   -.16262E-04
  19  Prefactor     .10000E-03    26.159        .18142E-02** at limit **
  20  norm          14.274        11.632        .53005E-03    .60634E-04
  21  norm          .10000E-03    5.2966        .16931E-02** at limit **
  22  Prefactor     .10000E-03    5.0499        .16533E-02** at limit **
  23  Prefactor     .10000E-03    6.4875        .18142E-02** at limit **
  24  Normalizat    .92205        .35446        .39753E-03   -.13564E-03
  25  Prefactor     1.2150        .20319        .21221E-03    .20925E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 2.50289
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 24.4512
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0648017
  Prefactor  = 12.0553
  Prefactor  = 7.24621
  Prefactor  = 0.0001
  Prefactor  = 3.35354
  Prefactor  = 0.0001
  Prefactor  = 62.4402
  norm       = 0.0001
  Prefactor  = 144.333
  norm       = 1.09313
  norm       = 11.8425
  norm       = 6.34105
  Prefactor  = 0.0001
  norm       = 14.2742
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Normalizat = 0.922051
  Prefactor  = 1.21501
 **********
 **   18 **HESSE 
 **********

 FCN=   5677.645     FROM HESSE     STATUS=OK           411 CALLS     3748 TOTAL
                     EDM=   .11E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     2.5029        4.1777        .76738E-05   -1.5392    
   2  Prefactor     .10000E-03    13.536        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .10000E-03    89.857        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     24.451        19.895        .32398E-05   -1.4719    
   5  Prefactor     .10000E-03    42.863        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  norm          .10000E-03    1.0211        .14837E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .64802E-01    11.306        .61255E-01   -1.5657    
   8  Prefactor     12.055        4.0904        .31693E-05   -1.5013    
   9  Prefactor     7.2462        8.5079        .59604E-05   -1.5170    
  10  Prefactor     .10000E-03    6.2539        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     3.3535        29.486        .88575E-05   -1.5342    
  12  Prefactor     .10000E-03    3.5245        .27584E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     62.440        60.052        .10152E-04   -1.4126    
  14  norm          .10000E-03    9.9796        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     144.33        151.16        .67056E-05   -1.3299    
  16  norm          1.0931        .35681        .92284E-06   -1.5499    
  17  norm          11.842        16.825        .46558E-05   -1.5020    
  18  norm          6.3411        11.004        .63758E-05   -1.5204    
  19  Prefactor     .10000E-03    26.159        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  norm          14.274        11.632        .21202E-04   -1.4952    
  21  norm          .10000E-03    5.2968        .33862E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     .10000E-03    5.0499        .33066E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10000E-03    6.4879        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Normalizat    .92205        .35465        .15901E-04   -.95690    
  25  Prefactor     1.2150        .20335        .42442E-04   -.85871    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.12793e-09
Minuit parameter uncertainties:
  1  4.17818
  2  4.48241e-05
  3  0.00024558
  4  19.9008
  5  0.000284162
  6  1.28407e-06
  7  1.71089
  8  4.09051
  9  8.50933
  10  3.06178e-06
  11  19.9009
  12  2.33591e-06
  13  60.1103
  14  4.85537e-07
  15  151.571
  16  0.35681
  17  16.8314
  18  11.0077
  19  3.29068e-05
  20  11.6335
  21  1.13404e-06
  22  1.77904e-06
  23  1.08147e-06
  24  0.355549
  25  0.203479
Done.

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

Extracting fit parameters...

4FGL J1238.5-1201
   Spectrum: PowerLaw
326    Prefactor:  3.354e+00  1.990e+01  1.000e-04  1.000e+04 ( 1.000e-12)
327        Index:  2.660e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
328        Scale:  5.228e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
610    Prefactor:  1.215e+00  2.035e-01  0.000e+00  1.000e+01 ( 1.000e+00)
611        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
612        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
609   Normalization:  9.221e-01  3.555e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.04
Ra Dec: 189.625 -12.028
Photon Flux Upper Limit: 2.14e-07 ph cm-2 s-1
Energy Flux Upper Limit: 1.68e-02 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/862680/likelihoodResults_580953601_581212801_4FGL_J1238.5-1201_daily_bin1318.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) = 5676.90432747
delta logL = 0.740668528122

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 5676.89128944
delta logL = 0.753706555945

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    2.0947       1.0000         .10000E-03   10000.    
     2 'Index     '    4.7634       1.0000          .0000       10.000    
     3 'Normalizat'    .76897       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.2723       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6130E+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=   5676.891     FROM MIGRAD    STATUS=CONVERGED     82 CALLS      248 TOTAL
                     EDM=   .15E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     2.0948        67.822        .86282E-04   -.24279E-02
   2  Index         4.7645        7.3770        .64314E-02   -.32228E-03
   3  Normalizat    .76896        .30728        .43205E-03   -.30758E-03
   4  Prefactor     1.2721        .18230        .20800E-03   -.43380E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 2.09479
  Index      = 4.76446
  Normalizat = 0.768956
  Prefactor  = 1.2721
 **********
 **   18 **HESSE 
 **********

 FCN=   5676.891     FROM HESSE     STATUS=OK            23 CALLS      271 TOTAL
                     EDM=   .31E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     2.0948        7.4746        .34513E-05   -1.5418    
   2  Index         4.7645        2.3795        .25726E-03   -.47126E-01
   3  Normalizat    .76896        .35227        .17282E-04   -1.0123    
   4  Prefactor     1.2721        .20573        .41601E-04   -.84140    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.05976e-09
Minuit parameter uncertainties:
  1  7.47789
  2  2.4802
  3  0.353315
  4  0.20586
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/862680': 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) = 5676.89128664
delta logL = 0.753709359731

Extracting fit parameters...

4FGL J1238.5-1201
   Spectrum: PowerLaw
326    Prefactor:  2.095e+00  7.478e+00  1.000e-04  1.000e+04 ( 1.000e-12)
327        Index:  4.764e+00  2.480e+00  0.000e+00  1.000e+01 (-1.000e+00)
328        Scale:  5.228e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
610    Prefactor:  1.272e+00  2.059e-01  0.000e+00  1.000e+01 ( 1.000e+00)
611        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
612        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
609   Normalization:  7.690e-01  3.533e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.77
Ra Dec: 189.625 -12.028
Photon Index (Free Index): 4.76 +/- 2.48
Photon Flux (Free Index): 1.48e-07 +/- 1.31e-07
Energy Flux (Free Index): 2.01e-05 +/- 1.85e-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/862680/cmap_HighResolution_580953601_581212801_4FGL_J1238.5-1201_daily_bin1318.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.68e-02', comment='SUCCESS', energy_flux2='2.01e-05', dlogl='7.54e-01', photon_flux2='1.48e-07', job_status='DONE', time_completed='2021-09-06 03:05:36.363624', photon_index_error2='2.48', photon_index2='4.76', ts='0.04', fit_tolerance='1e-08', GAL='1.22', photon_index_error='0.00', photon_flux_upper_limit='2.14e-07', energy_flux_error2='1.85e-05', EG='0.92', time_epoch_completed='1630922736.36', return_code='0', job_id='862680', GAL2='1.27', EG2='0.77', return_code2='0', photon_flux_error2='1.31e-07', ts2='1.77', photon_index='2.66' WHERE bin_id='1318' AND source_name='4FGL J1238.5-1201' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 03:05:36 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0032>
Subject: Job 862680: <4FGL_J1238.5-1201_daily_bin1318> in cluster <slac> Done

Job <4FGL_J1238.5-1201_daily_bin1318> was submitted from host <rhel6-64c> by user <kocevski> in cluster <slac> at Mon Sep  6 02:50:32 2021
Job was executed on host(s) <bullet0032>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep  6 02:51:19 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:51:19 2021
Terminated at Mon Sep  6 03:05:37 2021
Results reported at Mon Sep  6 03:05:37 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1238.5-1201_daily_bin1318 189.625 -12.028 580953601 581212801 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1238.5-1201 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   715.00 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             286.55 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   857 sec.
    Turnaround time :                            905 sec.

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

