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


Performing analysis on: 4FGL_J1238.3-1959_daily_bin1177
RA = 189.594, Dec = -19.9945
tmin = 544406401, tmax = 544665601
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='853012', job_status='RUN', time_executed='2021-09-06 02:23:06.475159', time_epoch_executed='1630920186.48' WHERE source_name='4FGL J1238.3-1959' and cadence='daily' and bin_id='1177'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/853012

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

Retrieving the FT1 file...

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

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

Retrieving 36 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/853012/ft1_4FGL_J1238.3-1959_daily_bin1177.fits


Retrieving the FT1 file...

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

Retrieving 36 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/853012/ft2_4FGL_J1238.3-1959_daily_bin1177.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/853012/ft1_4FGL_J1238.3-1959_daily_bin1177.fits outfile=/scratch/kocevski/853012/ft1_filteredMKT_4FGL_J1238.3-1959_daily_bin1177.fits ra=189.594 dec=-19.9945 rad=12.0 tmin=544406401.0 tmax=544665601.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 7.83
user 7.38
sys 0.28

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/853012/ft1_filtered_4FGL_J1238.3-1959_daily_bin1177.fits" evtable="EVENTS" scfile=/scratch/kocevski/853012/ft2_4FGL_J1238.3-1959_daily_bin1177.fits sctable="SC_DATA" outfile=/scratch/kocevski/853012/ltcube_544406401_544665601_4FGL_J1238.3-1959_daily_bin1177.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/853012/ft2_4FGL_J1238.3-1959_daily_bin1177.fits
.....................!
real 8.11
user 7.76
sys 0.30

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/853012/ft1_filtered_4FGL_J1238.3-1959_daily_bin1177.fits evtable="EVENTS" scfile=/scratch/kocevski/853012/ft2_4FGL_J1238.3-1959_daily_bin1177.fits sctable="SC_DATA" expcube=/scratch/kocevski/853012/ltcube_544406401_544665601_4FGL_J1238.3-1959_daily_bin1177.fits outfile=/scratch/kocevski/853012/expmap_544406401_544665601_4FGL_J1238.3-1959_daily_bin1177.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/853012/ltcube_544406401_544665601_4FGL_J1238.3-1959_daily_bin1177.fits
.....................!
real 189.93
user 184.70
sys 4.32

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/853012/ft1_filtered_4FGL_J1238.3-1959_daily_bin1177.fits scfile=/scratch/kocevski/853012/ft2_4FGL_J1238.3-1959_daily_bin1177.fits outfile=/scratch/kocevski/853012/cmap_544406401_544665601_4FGL_J1238.3-1959_daily_bin1177.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.57
user 0.37
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/853012/ft1_filtered_4FGL_J1238.3-1959_daily_bin1177.fits scfile=/scratch/kocevski/853012/ft2_4FGL_J1238.3-1959_daily_bin1177.fits outfile=/scratch/kocevski/853012/cmap_HighResolution_544406401_544665601_4FGL_J1238.3-1959_daily_bin1177.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.60
user 0.38
sys 0.15

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/853012/ft1_filtered_4FGL_J1238.3-1959_daily_bin1177.fits evtable="EVENTS" scfile=/scratch/kocevski/853012/ft2_4FGL_J1238.3-1959_daily_bin1177.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/853012/Model_4FGL_J1238.3-1959_daily_bin1177.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/853012/ft1_filtered_4FGL_J1238.3-1959_daily_bin1177.fits.....................!
real 64.73
user 62.86
sys 1.27

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10031E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    2.1324       1.0000         .10000E-03   10000.    
     4 'Prefactor '    3.2706       1.0000         .10000E-03   10000.    
     5 'Prefactor '    16.737       1.0000         .10000E-03   10000.    
     6 'Prefactor '    11.310       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10038E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .13742E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .77291E-02   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    6.1004       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10006E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10025E-03   1.0000         .10000E-03   10000.    
    14 'norm      '    1.0209       1.0000         .10000E-03   10000.    
    15 'Prefactor '    78.804       1.0000         .10000E-03   10000.    
    16 'norm      '    .10040E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    3.5103       1.0000         .10000E-03   10000.    
    18 'Prefactor '    9.9396       1.0000         .10000E-03   10000.    
    19 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    20 'Normalizat'    1.2735       1.0000         .10000E-01   10.000    
    21 'Prefactor '    1.0163       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=   8036.910     FROM MIGRAD    STATUS=CONVERGED    478 CALLS     2527 TOTAL
                     EDM=   .11E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  5.4%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    17.951       -.81852E-07** at limit **
   2  Prefactor     .10000E-03    17.097       -.50111E-06** at limit **
   3  norm          2.1337        3.9293       -.10928E-06   -.70744E-04
   4  Prefactor     3.2713        4.6162       -.67829E-06    .18257E-04
   5  Prefactor     16.692        54.347       -.16523E-07   -.29964E-04
   6  Prefactor     11.346        35.074        .63227E-05    .23156E-03
   7  Prefactor     .10000E-03    12.326       -.44254E-06** at limit **
   8  Prefactor     .10000E-03    53.592       -.10011E-05** at limit **
   9  Prefactor     .11162E-03    27.803       -.81774E-05** at limit **
  10  Prefactor     .10000E-03    2.0969        .34554E-07** at limit **
  11  Prefactor     6.1002        2.2733       -.15189E-07   -.32663E-05
  12  Prefactor     .10000E-03    3.1705        .36855E-07** at limit **
  13  Prefactor     .10000E-03    5.1407        .78491E-07** at limit **
  14  norm          1.0207        .78832        .56063E-07    .95383E-03
  15  Prefactor     78.825        85.051       -.61000E-05    .94713E-04
  16  norm          .10000E-03    6.7993        .21768E-06** at limit **
  17  norm          3.5113        7.7446        .53620E-05    .14314E-03
  18  Prefactor     9.9385        6.7488       -.13132E-05    .34164E-04
  19  norm          .10000E-03    .52767        .18425E-07** at limit **
  20  Normalizat    1.2737        .22943        .20380E-05    .84488E-03
  21  Prefactor     1.0162        .11176       -.65770E-06    .12588E-02
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 2.13367
  Prefactor  = 3.27128
  Prefactor  = 16.6922
  Prefactor  = 11.3463
  Prefactor  = 0.0001
  Prefactor  = 0.000100001
  Prefactor  = 0.000111624
  Prefactor  = 0.0001
  Prefactor  = 6.10019
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 1.02072
  Prefactor  = 78.8245
  norm       = 0.0001
  norm       = 3.51128
  Prefactor  = 9.93855
  norm       = 0.0001
  Normalizat = 1.2737
  Prefactor  = 1.01618
 **********
 **   18 **HESSE 
 **********

 FCN=   8036.910     FROM HESSE     STATUS=OK           319 CALLS     2846 TOTAL
                     EDM=   .20E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    17.964        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    17.279        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          2.1337        3.8849        .22653E-03   -1.5416    
   4  Prefactor     3.2713        4.6114        .20807E-03   -1.5346    
   5  Prefactor     16.692        54.031        .97898E-04   -1.4891    
   6  Prefactor     11.346        36.223        .11912E-03   -1.5034    
   7  Prefactor     .10000E-03    12.349        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    53.792        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .11162E-03    24.086        .10458       -1.5707    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    2.1035        .12676E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     6.1002        2.2742        .80438E-04   -1.5214    
  12  Prefactor     .10000E-03    3.1771        .15589E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .10000E-03    5.1549        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          1.0207        .77307        .66851E-04   -1.5506    
  15  Prefactor     78.825        85.465        .45239E-04   -1.3930    
  16  norm          .10000E-03    6.9224        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          3.5113        7.8936        .10789E-02   -1.5333    
  18  Prefactor     9.9385        6.7851        .12710E-03   -1.5077    
  19  norm          .10000E-03    .52966        .63590E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Normalizat    1.2737        .26945        .34865E-03   -.84355    
  21  Prefactor     1.0162        .13050        .18778E-03   -.92192    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.02526e-09
Minuit parameter uncertainties:
  1  1.28542e-05
  2  0.000143088
  3  3.88534
  4  4.61194
  5  54.1895
  6  36.2933
  7  8.43039e-05
  8  0.000465923
  9  0.0334783
  10  2.4196e-06
  11  2.27421
  12  2.43285e-06
  13  6.20447e-06
  14  0.773073
  15  85.5988
  16  2.24599e-05
  17  7.89591
  18  6.78564
  19  2.80026e-07
  20  0.269745
  21  0.130542
Done.

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

Extracting fit parameters...

4FGL J1238.3-1959
   Spectrum: PowerLaw
307    Prefactor:  1.000e-04  2.433e-06  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.016e+00  1.305e-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.274e+00  2.697e-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: 4.70e-08 ph cm-2 s-1
Energy Flux Upper Limit: 3.57e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/853012/likelihoodResults_544406401_544665601_4FGL_J1238.3-1959_daily_bin1177.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) = 8036.91142789
delta logL = -0.00149431716

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 8036.90993324
delta logL = 3.37700839736e-07

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.1280       1.0000          .0000       10.000    
     3 'Normalizat'    1.2737       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0162       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=   8036.910     FROM MIGRAD    STATUS=CONVERGED     90 CALLS      246 TOTAL
                     EDM=   .17E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10167E-03    34.519        .15921E-02** at limit **
   2  Index         2.0640        7.7402        .50000        .48888E-04
   3  Normalizat    1.2737        .18912E-01    .34864E-03   -.21098E-04
   4  Prefactor     1.0162        .92812E-02    .18778E-03   -.13804E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000101674
  Index      = 2.06401
  Normalizat = 1.2737
  Prefactor  = 1.01618
 **********
 **   18 **HESSE 
 **********

 FCN=   8036.910     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      275 TOTAL
                     EDM=   .75E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10167E-03    144.04        .31842E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.0640        5.2274        .50000       -.62759    
   3  Normalizat    1.2737        .40154E-01    .13946E-04   -.84355    
   4  Prefactor     1.0162        .19706E-01    .75113E-05   -.92192    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 7.54241e-08
Minuit parameter uncertainties:
  1  0.0311277
  2  389.514
  3  0.0401546
  4  0.0197059
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/853012': 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): 102
logL (Free Index) = 8036.90993265
delta logL = 9.22035724216e-07

Extracting fit parameters...

4FGL J1238.3-1959
   Spectrum: PowerLaw
307    Prefactor:  1.017e-04  3.113e-02  1.000e-04  1.000e+04 ( 1.000e-13)
308        Index:  2.064e+00  3.895e+02  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.016e+00  1.971e-02  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.274e+00  4.015e-02  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/853012/cmap_HighResolution_544406401_544665601_4FGL_J1238.3-1959_daily_bin1177.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='3.57e-03', job_status='DONE', photon_flux_upper_limit='4.70e-08', time_completed='2021-09-06 02:36:10.303553', job_id='853012', GAL2='1.02', fit_tolerance='1e-08', EG2='1.27', EG='1.27', time_epoch_completed='1630920970.3', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.02', dlogl='9.22e-07', ts2='-0.00', photon_index_error='0.00', photon_index='2.15' WHERE bin_id='1177' AND source_name='4FGL J1238.3-1959' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 02:36:10 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0098>
Subject: Job 853012: <4FGL_J1238.3-1959_daily_bin1177> in cluster <slac> Done

Job <4FGL_J1238.3-1959_daily_bin1177> was submitted from host <rhel6-64h> by user <kocevski> in cluster <slac> at Mon Sep  6 02:20:43 2021
Job was executed on host(s) <bullet0098>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep  6 02:21:21 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:21:21 2021
Terminated at Mon Sep  6 02:36:11 2021
Results reported at Mon Sep  6 02:36:11 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1238.3-1959_daily_bin1177 189.594 -19.9945 544406401 544665601 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 :                                   780.15 sec.
    Max Memory :                                 1251 MB
    Average Memory :                             318.42 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   889 sec.
    Turnaround time :                            928 sec.

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

