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


Performing analysis on: 4FGL_J1254.9+1138_daily_bin1010
RA = 193.733, Dec = 11.6495
tmin = 501120001, tmax = 501379201
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='998960', job_status='RUN', time_executed='2021-09-06 09:43:10.288382', time_epoch_executed='1630946590.29' WHERE source_name='4FGL J1254.9+1138' and cadence='daily' and bin_id='1010'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/998960

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/998960/ft1_4FGL_J1254.9+1138_daily_bin1010.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/998960/ft2_4FGL_J1254.9+1138_daily_bin1010.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/998960/ft1_4FGL_J1254.9+1138_daily_bin1010.fits outfile=/scratch/kocevski/998960/ft1_filteredMKT_4FGL_J1254.9+1138_daily_bin1010.fits ra=193.733 dec=11.6495 rad=12.0 tmin=501120001.0 tmax=501379201.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.76
user 3.28
sys 0.21

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/998960/ft2_4FGL_J1254.9+1138_daily_bin1010.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/998960/ft2_4FGL_J1254.9+1138_daily_bin1010.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/998960/ft1_filteredMKT_4FGL_J1254.9+1138_daily_bin1010.fits evtable="EVENTS" outfile="/scratch/kocevski/998960/ft1_filtered_4FGL_J1254.9+1138_daily_bin1010.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/998960/ft1_filtered_4FGL_J1254.9+1138_daily_bin1010.fits" evtable="EVENTS" scfile=/scratch/kocevski/998960/ft2_4FGL_J1254.9+1138_daily_bin1010.fits sctable="SC_DATA" outfile=/scratch/kocevski/998960/ltcube_501120001_501379201_4FGL_J1254.9+1138_daily_bin1010.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/998960/ft2_4FGL_J1254.9+1138_daily_bin1010.fits
.....................!
real 12.26
user 11.51
sys 0.35

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/998960/ft1_filtered_4FGL_J1254.9+1138_daily_bin1010.fits evtable="EVENTS" scfile=/scratch/kocevski/998960/ft2_4FGL_J1254.9+1138_daily_bin1010.fits sctable="SC_DATA" expcube=/scratch/kocevski/998960/ltcube_501120001_501379201_4FGL_J1254.9+1138_daily_bin1010.fits outfile=/scratch/kocevski/998960/expmap_501120001_501379201_4FGL_J1254.9+1138_daily_bin1010.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/998960/ltcube_501120001_501379201_4FGL_J1254.9+1138_daily_bin1010.fits
.....................!
real 194.31
user 187.99
sys 5.12

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

Setting source of interest to:
4FGL J1254.9+1138 @ 193.733 11.6495

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/998960/ft1_filtered_4FGL_J1254.9+1138_daily_bin1010.fits scfile=/scratch/kocevski/998960/ft2_4FGL_J1254.9+1138_daily_bin1010.fits outfile=/scratch/kocevski/998960/cmap_501120001_501379201_4FGL_J1254.9+1138_daily_bin1010.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=193.733 yref=11.6495 axisrot=0.0 rafield="RA" decfield="DEC" proj="AIT" hpx_ordering_scheme="RING" hpx_order=3 hpx_ebin=yes hpx_region="" evtable="EVENTS" sctable="SC_DATA" efield="ENERGY" tfield="TIME" chatter=2 clobber=yes debug=no gui=no mode="ql"

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

This is gtbin version HEAD
real 0.55
user 0.37
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/998960/ft1_filtered_4FGL_J1254.9+1138_daily_bin1010.fits scfile=/scratch/kocevski/998960/ft2_4FGL_J1254.9+1138_daily_bin1010.fits outfile=/scratch/kocevski/998960/cmap_HighResolution_501120001_501379201_4FGL_J1254.9+1138_daily_bin1010.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=193.733 yref=11.6495 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.56
user 0.37
sys 0.17

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/998960/ft1_filtered_4FGL_J1254.9+1138_daily_bin1010.fits evtable="EVENTS" scfile=/scratch/kocevski/998960/ft2_4FGL_J1254.9+1138_daily_bin1010.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/998960/Model_4FGL_J1254.9+1138_daily_bin1010.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/998960/ft1_filtered_4FGL_J1254.9+1138_daily_bin1010.fits.....................!
real 58.93
user 56.76
sys 1.38

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/998960/ft1_filtered_4FGL_J1254.9+1138_daily_bin1010.fits', '/scratch/kocevski/998960/ft2_4FGL_J1254.9+1138_daily_bin1010.fits', expMap='/scratch/kocevski/998960/expmap_501120001_501379201_4FGL_J1254.9+1138_daily_bin1010.fits', expCube='/scratch/kocevski/998960/ltcube_501120001_501379201_4FGL_J1254.9+1138_daily_bin1010.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/998960/Model_4FGL_J1254.9+1138_daily_bin1010.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1254.9+1138'

4FGL J1254.9+1138
   Spectrum: PowerLaw
287    Prefactor:  3.627e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-12)
288        Index:  2.791e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
289        Scale:  4.595e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/998960/ft1_filtered_4FGL_J1254.9+1138_daily_bin1010.fits
Spacecraft file(s): /scratch/kocevski/998960/ft2_4FGL_J1254.9+1138_daily_bin1010.fits
Exposure map: /scratch/kocevski/998960/expmap_501120001_501379201_4FGL_J1254.9+1138_daily_bin1010.fits
Exposure cube: /scratch/kocevski/998960/ltcube_501120001_501379201_4FGL_J1254.9+1138_daily_bin1010.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/998960/Model_4FGL_J1254.9+1138_daily_bin1010.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) = 7043.38063403

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .37165       1.0000         .10000E-03   10000.    
     2 'Prefactor '    3.4668       1.0000         .10000E-03   10000.    
     3 'norm      '    2.5244       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10197E-03   1.0000         .10000E-03   10000.    
     5 'norm      '    19.027       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .14245E-03   1.0000         .10000E-03   10000.    
     7 'norm      '    3.6043       1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10854E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    31.329       1.0000         .10000E-03   10000.    
    10 'norm      '    7.8076       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10007E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10069E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10039E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    6.0777       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    32.062       1.0000         .10000E-03   10000.    
    18 'Prefactor '    53.086       1.0000         .10000E-03   10000.    
    19 'Normalizat'    .92493       1.0000         .10000E-01   10.000    
    20 'Prefactor '    1.1715       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5630E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   7043.375     FROM MIGRAD    STATUS=CONVERGED    424 CALLS     2048 TOTAL
                     EDM=   .50E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  3.7%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .37022        2.1004        .10905E-05    .63064E-03
   2  Prefactor     3.4661        37.439        .34768E-06    .48817E-04
   3  norm          2.5262        5.7625       -.35728E-06    .39205E-03
   4  Prefactor     .10000E-03    34.326       -.27113E-05** at limit **
   5  norm          19.030        46.971        .31923E-06    .11434E-04
   6  Prefactor     .10000E-03    80.424        .10716E-05** at limit **
   7  norm          3.6039        1.0047        .24681E-07    .70240E-03
   8  Prefactor     .10001E-03    26.833       -.13232E-04** at limit **
   9  Prefactor     31.364        26.684        .71748E-06    .34773E-04
  10  norm          7.8073        2.3213       -.49209E-08    .41884E-03
  11  Prefactor     .10000E-03    12.291        .81784E-06** at limit **
  12  Prefactor     .10000E-03    12.783       -.10674E-05** at limit **
  13  Prefactor     .10000E-03    1.8073       -.47281E-07** at limit **
  14  Prefactor     .10000E-03    6.7724       -.21232E-06** at limit **
  15  Prefactor     6.0739        11.997       -.11990E-06    .10129E-03
  16  Prefactor     .10000E-03    3.4171       -.53290E-07** at limit **
  17  Prefactor     32.085        31.406       -.11769E-05   -.12335E-03
  18  Prefactor     53.100        51.731       -.10560E-05   -.61451E-04
  19  Normalizat    .92518        .19769       -.15063E-06    .28454E-03
  20  Prefactor     1.1714        .16418        .10189E-05    .53294E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.370223
  Prefactor  = 3.46606
  norm       = 2.5262
  Prefactor  = 0.000100003
  norm       = 19.0305
  Prefactor  = 0.0001
  norm       = 3.60392
  Prefactor  = 0.000100005
  Prefactor  = 31.3642
  norm       = 7.80735
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 6.07385
  Prefactor  = 0.0001
  Prefactor  = 32.0846
  Prefactor  = 53.1001
  Normalizat = 0.925177
  Prefactor  = 1.17138
 **********
 **   18 **HESSE 
 **********

 FCN=   7043.375     FROM HESSE     STATUS=OK           293 CALLS     2341 TOTAL
                     EDM=   .19E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .37022        4.1663        .22635E-02   -1.5586    
   2  Prefactor     3.4661        36.974        .21719E-03   -1.5336    
   3  norm          2.5262        5.6140        .21296E-03   -1.5390    
   4  Prefactor     .10000E-03    34.550        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          19.030        46.439        .91820E-04   -1.4835    
   6  Prefactor     .10000E-03    80.446        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  norm          3.6039        1.0011        .38717E-04   -1.5328    
   8  Prefactor     .10001E-03    27.774        .38579E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     31.364        26.531        .71585E-04   -1.4587    
  10  norm          7.8073        2.3203        .65062E-04   -1.5149    
  11  Prefactor     .10000E-03    12.288        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    12.805        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .10000E-03    1.8105        .11019E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10000E-03    6.8427        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     6.0739        12.043        .16286E-03   -1.5215    
  16  Prefactor     .10000E-03    3.4264        .15151E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     32.085        31.420        .70765E-04   -1.4574    
  18  Prefactor     53.100        51.743        .55048E-04   -1.4249    
  19  Normalizat    .92518        .23550        .30221E-03   -.95581    
  20  Prefactor     1.1714        .19813        .23862E-03   -.87216    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.87553e-09
Minuit parameter uncertainties:
  1  2.4838
  2  22.6586
  3  5.61517
  4  0.000623881
  5  46.5276
  6  0.000399773
  7  1.00111
  8  0.000749795
  9  26.5411
  10  2.32035
  11  0.000105091
  12  0.000160021
  13  6.18076e-06
  14  3.00294e-05
  15  12.0478
  16  8.58304e-06
  17  31.4367
  18  51.7869
  19  0.235767
  20  0.19826
Done.

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

Extracting fit parameters...

4FGL J1254.9+1138
   Spectrum: PowerLaw
287    Prefactor:  1.000e-04  3.003e-05  1.000e-04  1.000e+04 ( 1.000e-12)
288        Index:  2.791e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
289        Scale:  4.595e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
560    Prefactor:  1.171e+00  1.983e-01  0.000e+00  1.000e+01 ( 1.000e+00)
561        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
562        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
559   Normalization:  9.252e-01  2.358e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 193.733 11.649
Photon Flux Upper Limit: 7.84e-08 ph cm-2 s-1
Energy Flux Upper Limit: 6.21e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/998960/likelihoodResults_501120001_501379201_4FGL_J1254.9+1138_daily_bin1010.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) = 7043.37559868
delta logL = -0.000696543163031

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 7043.37490554
delta logL = -3.40167207469e-06

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .13290E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.7482       1.0000          .0000       10.000    
     3 'Normalizat'    .92480       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1717       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5630E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
 MIGRAD TERMINATED WITHOUT CONVERGENCE.

 FCN=   7043.354     FROM MIGRAD    STATUS=FAILED       187 CALLS      343 TOTAL
                     EDM=   .34E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .89487        147.44        .18142E-01    .87760E-03
   2  Index         1.6636        2.9316        .46666        .32974E-04
   3  Normalizat    .92726        .23749E-01    .30221E-03    .60829E-04
   4  Prefactor     1.1681        .20985E-01    .23862E-03    .61652E-04
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   7043.354     FROM SIMPLEX   STATUS=UNCHANGED     80 CALLS      423 TOTAL
                     EDM=   .16E-04    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .89487        147.44        .32273E-03    .87760E-03
   2  Index         1.6636        2.9316        .23017E-02    .32974E-04
   3  Normalizat    .92726        .23749E-01    .57582E-04    .60829E-04
   4  Prefactor     1.1681        .20985E-01    .39726E-04    .61652E-04
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   7043.354     FROM MIGRAD    STATUS=CONVERGED     33 CALLS      456 TOTAL
                     EDM=   .28E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .89501        7.9282        .40950E-03    .33537E-04
   2  Index         1.6636        1.6892        .15243E-01    .11429E-03
   3  Normalizat    .92726        .22139        .12088E-04    .10101E-03
   4  Prefactor     1.1681        .19571        .95446E-05    .13531E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.89501
  Index      = 1.66361
  Normalizat = 0.927262
  Prefactor  = 1.16806
 **********
 **   18 **HESSE 
 **********

 FCN=   7043.354     FROM HESSE     STATUS=OK            25 CALLS      481 TOTAL
                     EDM=   .22E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .89501        7.0521        .16380E-04   -1.5519    
   2  Index         1.6636        1.6019        .30486E-02   -2.4110    
   3  Normalizat    .92726        .22084        .24177E-05   -.95509    
   4  Prefactor     1.1681        .19524        .19089E-05   -.87320    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.22909e-11
Minuit parameter uncertainties:
  1  5.02514
  2  1.65597
  3  0.221058
  4  0.195357
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/998960': 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) = 7043.35395258
delta logL = 0.0209495502959

Extracting fit parameters...

4FGL J1254.9+1138
   Spectrum: PowerLaw
287    Prefactor:  8.950e-01  5.025e+00  1.000e-04  1.000e+04 ( 1.000e-12)
288        Index:  1.664e+00  1.656e+00  0.000e+00  1.000e+01 (-1.000e+00)
289        Scale:  4.595e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
560    Prefactor:  1.168e+00  1.954e-01  0.000e+00  1.000e+01 ( 1.000e+00)
561        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
562        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
559   Normalization:  9.273e-01  2.211e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 193.733 11.649

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/998960/cmap_HighResolution_501120001_501379201_4FGL_J1254.9+1138_daily_bin1010.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='6.21e-03', job_status='DONE', photon_flux_upper_limit='7.84e-08', time_completed='2021-09-06 09:54:02.466042', job_id='998960', GAL2='1.17', fit_tolerance='1e-08', EG2='0.93', EG='0.93', time_epoch_completed='1630947242.47', return_code2='0', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.17', dlogl='2.09e-02', ts2='0.04', photon_index_error='0.00', photon_index='2.79' WHERE bin_id='1010' AND source_name='4FGL J1254.9+1138' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 09:54:02 PDT 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0139>
Subject: Job 998960: <4FGL_J1254.9+1138_daily_bin1010> in cluster <slac> Done

Job <4FGL_J1254.9+1138_daily_bin1010> was submitted from host <rhel6-64m> by user <kocevski> in cluster <slac> at Mon Sep  6 09:40:42 2021
Job was executed on host(s) <bullet0139>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep  6 09:40:43 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Mon Sep  6 09:40:43 2021
Terminated at Mon Sep  6 09:54:03 2021
Results reported at Mon Sep  6 09:54:03 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1254.9+1138_daily_bin1010 193.733 11.6495 501120001 501379201 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1254.9+1138 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   645.00 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             286.20 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   799 sec.
    Turnaround time :                            801 sec.

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

