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


Performing analysis on: 4FGL_J1238.3-1959_daily_bin507
RA = 189.594, Dec = -19.9945
tmin = 370742401, tmax = 371001601
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='848162', job_status='RUN', time_executed='2021-09-06 02:06:48.262741', time_epoch_executed='1630919208.26' WHERE source_name='4FGL J1238.3-1959' and cadence='daily' and bin_id='507'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/848162

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

Retrieving the FT1 file...

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

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

Retrieving 50 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/848162/ft1_4FGL_J1238.3-1959_daily_bin507.fits


Retrieving the FT1 file...

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

Retrieving 50 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/848162/ft2_4FGL_J1238.3-1959_daily_bin507.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/848162/ft1_4FGL_J1238.3-1959_daily_bin507.fits outfile=/scratch/kocevski/848162/ft1_filteredMKT_4FGL_J1238.3-1959_daily_bin507.fits ra=189.594 dec=-19.9945 rad=12.0 tmin=370742401.0 tmax=371001601.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 5.43
user 5.17
sys 0.23

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/848162/ft1_filtered_4FGL_J1238.3-1959_daily_bin507.fits" evtable="EVENTS" scfile=/scratch/kocevski/848162/ft2_4FGL_J1238.3-1959_daily_bin507.fits sctable="SC_DATA" outfile=/scratch/kocevski/848162/ltcube_370742401_371001601_4FGL_J1238.3-1959_daily_bin507.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/848162/ft2_4FGL_J1238.3-1959_daily_bin507.fits
.....................!
real 13.12
user 12.74
sys 0.30

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/848162/ft1_filtered_4FGL_J1238.3-1959_daily_bin507.fits evtable="EVENTS" scfile=/scratch/kocevski/848162/ft2_4FGL_J1238.3-1959_daily_bin507.fits sctable="SC_DATA" expcube=/scratch/kocevski/848162/ltcube_370742401_371001601_4FGL_J1238.3-1959_daily_bin507.fits outfile=/scratch/kocevski/848162/expmap_370742401_371001601_4FGL_J1238.3-1959_daily_bin507.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/848162/ltcube_370742401_371001601_4FGL_J1238.3-1959_daily_bin507.fits
.....................!
real 190.60
user 185.77
sys 4.24

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/848162/ft1_filtered_4FGL_J1238.3-1959_daily_bin507.fits scfile=/scratch/kocevski/848162/ft2_4FGL_J1238.3-1959_daily_bin507.fits outfile=/scratch/kocevski/848162/cmap_370742401_371001601_4FGL_J1238.3-1959_daily_bin507.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.54
user 0.39
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/848162/ft1_filtered_4FGL_J1238.3-1959_daily_bin507.fits scfile=/scratch/kocevski/848162/ft2_4FGL_J1238.3-1959_daily_bin507.fits outfile=/scratch/kocevski/848162/cmap_HighResolution_370742401_371001601_4FGL_J1238.3-1959_daily_bin507.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.38
sys 0.17

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/848162/ft1_filtered_4FGL_J1238.3-1959_daily_bin507.fits evtable="EVENTS" scfile=/scratch/kocevski/848162/ft2_4FGL_J1238.3-1959_daily_bin507.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/848162/Model_4FGL_J1238.3-1959_daily_bin507.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/848162/ft1_filtered_4FGL_J1238.3-1959_daily_bin507.fits.....................!
real 79.07
user 77.75
sys 1.15

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    4.1715       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10034E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    .10005E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    31.875       1.0000         .10000E-03   10000.    
     6 'Prefactor '    21.365       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    9.8786       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    .17494       1.0000         .10000E-03   10000.    
    14 'norm      '    14.128       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    21.963       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    19 'norm      '    2.4757       1.0000         .10000E-03   10000.    
    20 'Normalizat'    1.2735       1.0000         .10000E-01   10.000    
    21 'Prefactor '    .96125       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=   10248.86     FROM MIGRAD    STATUS=CONVERGED    453 CALLS     2190 TOTAL
                     EDM=   .40E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .3%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     4.1649        22.577        .29347E-05   -.36498E-04
   2  Prefactor     .10000E-03    6.3202        .93892E-06** at limit **
   3  norm          .10000E-03    1.1441        .66613E-07** at limit **
   4  Prefactor     .10000E-03    1.3674        .63942E-07** at limit **
   5  Prefactor     31.866        38.135       -.10760E-04   -.51204E-05
   6  Prefactor     21.360        22.345       -.39910E-05   -.16261E-04
   7  Prefactor     .10000E-03    5.3878       -.60536E-07** at limit **
   8  Prefactor     .10000E-03    10.638       -.18922E-06** at limit **
   9  Prefactor     .10000E-03    7.5688        .35441E-05** at limit **
  10  Prefactor     .10000E-03    2.0558       -.11837E-08** at limit **
  11  Prefactor     9.8803        2.7112       -.23989E-08    .32347E-03
  12  Prefactor     .10000E-03    7.3324       -.42159E-05** at limit **
  13  Prefactor     .98723E-01    5.5329       -.86980E-06    .17836E-04
  14  norm          14.128        1.7226       -.21269E-07    .93965E-04
  15  Prefactor     .10000E-03    42.776       -.17835E-06** at limit **
  16  norm          .10000E-03    3.1235       -.10597E-09** at limit **
  17  norm          21.962        6.4475       -.13771E-06    .13696E-04
  18  Prefactor     .10000E-03    2.0132        .99907E-08** at limit **
  19  norm          2.4756        1.8897       -.77776E-07   -.21239E-03
  20  Normalizat    1.2739        .20810        .10470E-05    .10919E-03
  21  Prefactor     .96113        .10283        .38612E-06    .16820E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 4.16487
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 31.8659
  Prefactor  = 21.3599
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 9.88035
  Prefactor  = 0.0001
  Prefactor  = 0.0987231
  norm       = 14.1276
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 21.9616
  Prefactor  = 0.0001
  norm       = 2.47564
  Normalizat = 1.27389
  Prefactor  = 0.961129
 **********
 **   18 **HESSE 
 **********

 FCN=   10248.86     FROM HESSE     STATUS=OK           319 CALLS     2509 TOTAL
                     EDM=   .46E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     4.1649        22.437        .19733E-03   -1.5300    
   2  Prefactor     .10000E-03    6.3866        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .10000E-03    1.1511        .10574E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    1.3756        .11555E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     31.866        38.198        .70972E-04   -1.4578    
   6  Prefactor     21.360        22.389        .86656E-04   -1.4783    
   7  Prefactor     .10000E-03    5.3909        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    10.641        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .10000E-03    7.5912        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    2.0662        .14167E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     9.8803        2.7123        .84258E-04   -1.5079    
  12  Prefactor     .10000E-03    7.3771        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .98723E-01    8.5856        .72127E-01   -1.5645    
  14  norm          14.128        1.7233        .44212E-04   -1.4956    
  15  Prefactor     .10000E-03    42.808        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          .10000E-03    3.1499        .17471E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          21.962        6.4363        .85469E-04   -1.4770    
  18  Prefactor     .10000E-03    2.0206        .14001E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  norm          2.4756        1.8876        .11799E-03   -1.5393    
  20  Normalizat    1.2739        .24444        .35775E-03   -.84349    
  21  Prefactor     .96113        .12073        .20309E-03   -.94037    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.56399e-10
Minuit parameter uncertainties:
  1  19.3449
  2  4.21413e-05
  3  7.33203e-06
  4  9.03785e-06
  5  38.2268
  6  22.3982
  7  1.43742e-05
  8  1.85372e-05
  9  1.49625e-06
  10  1.26314e-06
  11  2.71238
  12  2.38044e-07
  13  1.84064
  14  1.72328
  15  2.50248e-06
  16  4.09807e-06
  17  6.43654
  18  3.30887e-07
  19  1.88769
  20  0.244664
  21  0.120767
Done.

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

Extracting fit parameters...

4FGL J1238.3-1959
   Spectrum: PowerLaw
307    Prefactor:  1.000e-04  2.380e-07  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:  9.611e-01  1.208e-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.447e-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: 6.78e-08 ph cm-2 s-1
Energy Flux Upper Limit: 5.15e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/848162/likelihoodResults_370742401_371001601_4FGL_J1238.3-1959_daily_bin507.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) = 10248.8638211
delta logL = -0.000646093143587

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 10248.863175
delta logL = 1.78551999852e-08

Fit tolerance = 1e-08

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

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

 FCN=   10248.86     FROM MIGRAD    STATUS=CONVERGED     53 CALLS      209 TOTAL
                     EDM=   .15E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    190.79        .90712E-02** at limit **
   2  Index         2.1681        7.7591        .50000       -.91740E-05
   3  Normalizat    1.2739        .28225E-01    .80816E-01   -.16202E-04
   4  Prefactor     .96113        .14226E-01    .45779E-01   -.37721E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 2.16808
  Normalizat = 1.27389
  Prefactor  = 0.961129
 **********
 **   18 **HESSE 
 **********

 FCN=   10248.86     FROM HESSE     STATUS=OK            33 CALLS      242 TOTAL
                     EDM=   .11E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    8.4348        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.1681        6.0718        .50000       -.60211    
   3  Normalizat    1.2739        .23545        .35775E-03   -.84349    
   4  Prefactor     .96113        .11891        .20309E-03   -.94037    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.12833e-10
Minuit parameter uncertainties:
  1  2.58658e-05
  2  4.40045
  3  0.235645
  4  0.11894
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/848162': 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) = 10248.863175
delta logL = 3.81005520467e-08

Extracting fit parameters...

4FGL J1238.3-1959
   Spectrum: PowerLaw
307    Prefactor:  1.000e-04  2.587e-05  1.000e-04  1.000e+04 ( 1.000e-13)
308        Index:  2.168e+00  4.400e+00  0.000e+00  1.000e+01 (-1.000e+00)
309        Scale:  1.503e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
600    Prefactor:  9.611e-01  1.189e-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.356e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 189.594 -19.994

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

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='5.15e-03', job_status='DONE', photon_flux_upper_limit='6.78e-08', time_completed='2021-09-06 02:21:29.411401', job_id='848162', GAL2='0.96', fit_tolerance='1e-08', EG2='1.27', EG='1.27', time_epoch_completed='1630920089.41', return_code2='0', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.96', dlogl='3.81e-08', ts2='-0.00', photon_index_error='0.00', photon_index='2.15' WHERE bin_id='507' AND source_name='4FGL J1238.3-1959' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 02:21:29 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0281>
Subject: Job 848162: <4FGL_J1238.3-1959_daily_bin507> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1238.3-1959_daily_bin507 189.594 -19.9945 370742401 371001601 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 :                                   875.00 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             350.48 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   898 sec.
    Turnaround time :                            957 sec.

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

