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


Performing analysis on: 4FGL_J0152.6+0147_daily_bin572
RA = 28.1614, Dec = 1.7894
tmin = 387590401, tmax = 387849601
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='898420', job_status='RUN', time_executed='2021-08-14 19:40:00.153741', time_epoch_executed='1628995200.15' WHERE source_name='4FGL J0152.6+0147' and cadence='daily' and bin_id='572'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/898420

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/898420/ft1_4FGL_J0152.6+0147_daily_bin572.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/898420/ft2_4FGL_J0152.6+0147_daily_bin572.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/898420/ft1_4FGL_J0152.6+0147_daily_bin572.fits outfile=/scratch/kocevski/898420/ft1_filteredMKT_4FGL_J0152.6+0147_daily_bin572.fits ra=28.1614 dec=1.7894 rad=12.0 tmin=387590401.0 tmax=387849601.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.20
user 2.42
sys 0.70

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/898420/ft2_4FGL_J0152.6+0147_daily_bin572.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/898420/ft2_4FGL_J0152.6+0147_daily_bin572.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/898420/ft1_filteredMKT_4FGL_J0152.6+0147_daily_bin572.fits evtable="EVENTS" outfile="/scratch/kocevski/898420/ft1_filtered_4FGL_J0152.6+0147_daily_bin572.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 1.00
user 0.27
sys 0.64

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/898420/ft1_filtered_4FGL_J0152.6+0147_daily_bin572.fits" evtable="EVENTS" scfile=/scratch/kocevski/898420/ft2_4FGL_J0152.6+0147_daily_bin572.fits sctable="SC_DATA" outfile=/scratch/kocevski/898420/ltcube_387590401_387849601_4FGL_J0152.6+0147_daily_bin572.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/898420/ft2_4FGL_J0152.6+0147_daily_bin572.fits
.....................!
real 10.69
user 9.68
sys 0.88

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/898420/ft1_filtered_4FGL_J0152.6+0147_daily_bin572.fits evtable="EVENTS" scfile=/scratch/kocevski/898420/ft2_4FGL_J0152.6+0147_daily_bin572.fits sctable="SC_DATA" expcube=/scratch/kocevski/898420/ltcube_387590401_387849601_4FGL_J0152.6+0147_daily_bin572.fits outfile=/scratch/kocevski/898420/expmap_387590401_387849601_4FGL_J0152.6+0147_daily_bin572.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/898420/ltcube_387590401_387849601_4FGL_J0152.6+0147_daily_bin572.fits
.....................!
real 152.54
user 146.87
sys 4.95

Generating the xml model:
radLim = 0.001
maxRad = 12
normsOnly = True
freeVariableSources = True
Fixing all sources to their catalog values, except variable sources
Creating file and adding sources from 4FGL
Added 173 point sources and 0 extended sources

Setting source of interest to:
4FGL J0152.6+0147 @ 28.1614 1.7894

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/898420/ft1_filtered_4FGL_J0152.6+0147_daily_bin572.fits scfile=/scratch/kocevski/898420/ft2_4FGL_J0152.6+0147_daily_bin572.fits outfile=/scratch/kocevski/898420/cmap_387590401_387849601_4FGL_J0152.6+0147_daily_bin572.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=28.1614 yref=1.7894 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 1.01
user 0.32
sys 0.67

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/898420/ft1_filtered_4FGL_J0152.6+0147_daily_bin572.fits scfile=/scratch/kocevski/898420/ft2_4FGL_J0152.6+0147_daily_bin572.fits outfile=/scratch/kocevski/898420/cmap_HighResolution_387590401_387849601_4FGL_J0152.6+0147_daily_bin572.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=28.1614 yref=1.7894 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 1.02
user 0.32
sys 0.67

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/898420/ft1_filtered_4FGL_J0152.6+0147_daily_bin572.fits evtable="EVENTS" scfile=/scratch/kocevski/898420/ft2_4FGL_J0152.6+0147_daily_bin572.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/898420/Model_4FGL_J0152.6+0147_daily_bin572.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/898420/ft1_filtered_4FGL_J0152.6+0147_daily_bin572.fits.....................!
real 48.59
user 46.63
sys 1.74

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/898420/ft1_filtered_4FGL_J0152.6+0147_daily_bin572.fits', '/scratch/kocevski/898420/ft2_4FGL_J0152.6+0147_daily_bin572.fits', expMap='/scratch/kocevski/898420/expmap_387590401_387849601_4FGL_J0152.6+0147_daily_bin572.fits', expCube='/scratch/kocevski/898420/ltcube_387590401_387849601_4FGL_J0152.6+0147_daily_bin572.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/898420/Model_4FGL_J0152.6+0147_daily_bin572.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J0152.6+0147'

4FGL J0152.6+0147
   Spectrum: PowerLaw
237    Prefactor:  1.406e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-13)
238        Index:  1.984e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
239        Scale:  2.408e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/898420/ft1_filtered_4FGL_J0152.6+0147_daily_bin572.fits
Spacecraft file(s): /scratch/kocevski/898420/ft2_4FGL_J0152.6+0147_daily_bin572.fits
Exposure map: /scratch/kocevski/898420/expmap_387590401_387849601_4FGL_J0152.6+0147_daily_bin572.fits
Exposure cube: /scratch/kocevski/898420/ltcube_387590401_387849601_4FGL_J0152.6+0147_daily_bin572.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/898420/Model_4FGL_J0152.6+0147_daily_bin572.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) = 4948.97849071

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    10.537       1.0000         .10000E-03   10000.    
     2 'norm      '    7.9759       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10037E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10144E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10041E-03   1.0000         .10000E-03   10000.    
     7 'norm      '    7.9740       1.0000         .10000E-03   10000.    
     8 'Prefactor '    .23839E-02   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10015E-03   1.0000         .10000E-03   10000.    
    10 'norm      '    .10096E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10012E-03   1.0000         .10000E-03   10000.    
    12 'norm      '    .77760E-01   1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10474E-03   1.0000         .10000E-03   10000.    
    14 'norm      '    1.2387       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .79238       1.0000         .10000E-03   10000.    
    16 'Prefactor '    117.15       1.0000         .10000E-03   10000.    
    17 'Prefactor '    .10071E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    17.673       1.0000         .10000E-03   10000.    
    19 'Normalizat'    .69118       1.0000         .10000E-01   10.000    
    20 'Prefactor '    1.5586       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5470E+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=   4948.971     FROM MIGRAD    STATUS=CONVERGED    753 CALLS     2384 TOTAL
                     EDM=   .32E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     10.546        105.39        .12343E-03   -.15474E-04
   2  norm          7.9760        2.4859        .58777E-04    .11876E-03
   3  Prefactor     .10000E-03    23.840        .18142E-02** at limit **
   4  Prefactor     .10000E-03    5.3660        .15779E-02** at limit **
   5  Prefactor     .10000E-03    6.2362        .17110E-02** at limit **
   6  Prefactor     .10000E-03    29.463        .18142E-02** at limit **
   7  norm          7.9738        8.1869        .14199E-03    .52124E-04
   8  Prefactor     .10000E-03    79.228        .19780    ** at limit **
   9  Prefactor     .10000E-03    2.1588        .10081E-02** at limit **
  10  norm          .10000E-03    16.488        .18142E-02** at limit **
  11  Prefactor     .10000E-03    3.7067        .13199E-02** at limit **
  12  norm          .49871E-01    10.108        .41639E-01    .35151E-04
  13  Prefactor     .10000E-03    5.0510        .20146E-02** at limit **
  14  norm          1.2388        .94165        .57279E-04    .25267E-03
  15  Prefactor     .79533        236.49        .67824E-02   -.40453E-04
  16  Prefactor     117.17        102.02        .18587E-03    .34435E-04
  17  Prefactor     .10000E-03    22.496        .18142E-02** at limit **
  18  Prefactor     17.656        23.123        .95272E-04    .13603E-04
  19  Normalizat    .69096        .25683        .35225E-03    .56332E-03
  20  Prefactor     1.5588        .22379        .20849E-03    .27284E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 10.5456
  norm       = 7.97605
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 7.97377
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0498709
  Prefactor  = 0.000100004
  norm       = 1.23877
  Prefactor  = 0.795335
  Prefactor  = 117.174
  Prefactor  = 0.000100001
  Prefactor  = 17.6561
  Normalizat = 0.690963
  Prefactor  = 1.55876
 **********
 **   18 **HESSE 
 **********

 FCN=   4948.971     FROM HESSE     STATUS=OK           293 CALLS     2677 TOTAL
                     EDM=   .34E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     10.546        105.22        .49372E-05   -1.5058    
   2  norm          7.9760        2.4856        .23511E-05   -1.5143    
   3  Prefactor     .10000E-03    23.841        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    5.3687        .31557E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    6.2374        .34219E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    29.464        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  norm          7.9738        8.1863        .56796E-05   -1.5143    
   8  Prefactor     .10000E-03    80.412        .19539       -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .10000E-03    2.1589        .20162E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          .10000E-03    16.491        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    3.7070        .26398E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm          .49871E-01    7.0364        .51726E-01   -1.5663    
  13  Prefactor     .10000E-03    5.0784        .40292E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          1.2388        .94155        .22911E-05   -1.5485    
  15  Prefactor     .79533        235.61        .27130E-03   -1.5530    
  16  Prefactor     117.17        101.57        .74349E-05   -1.3539    
  17  Prefactor     .10000E-03    22.503        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     17.656        22.987        .38109E-05   -1.4867    
  19  Normalizat    .69096        .25650        .70450E-04   -1.0425    
  20  Prefactor     1.5588        .22279        .41699E-04   -.75907    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.39141e-09
Minuit parameter uncertainties:
  1  66.7743
  2  2.48562
  3  0.000119178
  4  2.70265e-05
  5  2.40693e-05
  6  5.16488e-05
  7  8.18744
  8  0.000159546
  9  1.01966e-05
  10  0.000114895
  11  2.7846e-05
  12  1.18371
  13  0.000291586
  14  0.941564
  15  27.4862
  16  101.723
  17  0.000220515
  18  22.9981
  19  0.256941
  20  0.222935
Done.

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

Extracting fit parameters...

4FGL J0152.6+0147
   Spectrum: PowerLaw
237    Prefactor:  1.000e-04  1.020e-05  1.000e-04  1.000e+04 ( 1.000e-13)
238        Index:  1.984e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
239        Scale:  2.408e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
544    Prefactor:  1.559e+00  2.229e-01  0.000e+00  1.000e+01 ( 1.000e+00)
545        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
546        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
543   Normalization:  6.910e-01  2.569e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 28.161 1.789
Photon Flux Upper Limit: 6.07e-08 ph cm-2 s-1
Energy Flux Upper Limit: 4.55e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/898420/likelihoodResults_387590401_387849601_4FGL_J0152.6+0147_daily_bin572.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) = 4948.97311163
delta logL = -0.00213043222357

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 4948.97098092
delta logL = 2.82746441371e-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     '    1.9662       1.0000          .0000       10.000    
     3 'Normalizat'    .69099       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.5587       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5470E+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=   4948.971     FROM MIGRAD    STATUS=FAILED        88 CALLS      241 TOTAL
                     EDM=   .23E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10073E-03    28.582        .10213E-02** at limit **
   2  Index         1.9256        7.3480        .50000        .58583E-04
   3  Normalizat    .69095        .20789E-01    .35225E-03    .12587E-05
   4  Prefactor     1.5588        .17770E-01    .20849E-03    .20612E-04
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   4948.971     FROM SIMPLEX   STATUS=UNCHANGED    131 CALLS      372 TOTAL
                     EDM=   .90E-05    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10073E-03    28.582        .23452E-03** at limit **
   2  Index         1.9256        7.3480        .59238E-03    .58583E-04
   3  Normalizat    .69095        .20789E-01    .57727E-05    .12587E-05
   4  Prefactor     1.5588        .17770E-01    .32458E-05    .20612E-04
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   4948.971     FROM MIGRAD    STATUS=CONVERGED     47 CALLS      419 TOTAL
                     EDM=   .19E-11    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    34.771        .20427E-02** at limit **
   2  Index         1.5378        9.2284        .50000        .14361E-06
   3  Normalizat    .69095        .21471E-01    .14090E-04   -.99244E-04
   4  Prefactor     1.5588        .18354E-01    .83397E-05   -.19466E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 1.53783
  Normalizat = 0.690953
  Prefactor  = 1.55877
 **********
 **   18 **HESSE 
 **********

 FCN=   4948.971     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      448 TOTAL
                     EDM=   .91E-11    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    159.87        .40853E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         1.5378        5.3649        .50000       -.76486    
   3  Normalizat    .69095        .49004E-01    .28180E-05   -1.0425    
   4  Prefactor     1.5588        .41896E-01    .16679E-05   -.75907    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 9.0543e-12
Minuit parameter uncertainties:
  1  0.000118071
  2  565.976
  3  0.049007
  4  0.0418966
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/898420': 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) = 4948.9709775
delta logL = 3.70658744941e-06

Extracting fit parameters...

4FGL J0152.6+0147
   Spectrum: PowerLaw
237    Prefactor:  1.000e-04  1.181e-04  1.000e-04  1.000e+04 ( 1.000e-13)
238        Index:  1.538e+00  5.660e+02  0.000e+00  1.000e+01 (-1.000e+00)
239        Scale:  2.408e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
544    Prefactor:  1.559e+00  4.190e-02  0.000e+00  1.000e+01 ( 1.000e+00)
545        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
546        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
543   Normalization:  6.910e-01  4.901e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 28.161 1.789

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/898420/cmap_HighResolution_387590401_387849601_4FGL_J0152.6+0147_daily_bin572.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='4.55e-03', job_status='DONE', photon_flux_upper_limit='6.07e-08', time_completed='2021-08-14 19:48:01.047345', job_id='898420', GAL2='1.56', fit_tolerance='1e-08', EG2='0.69', EG='0.69', time_epoch_completed='1628995681.05', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.56', dlogl='3.71e-06', ts2='-0.00', photon_index_error='0.00', photon_index='1.98' WHERE bin_id='572' AND source_name='4FGL J0152.6+0147' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Aug 14 19:48:01 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0086>
Subject: Job 898420: <4FGL_J0152.6+0147_daily_bin572> in cluster <slac> Done

Job <4FGL_J0152.6+0147_daily_bin572> was submitted from host <rhel6-64o> by user <kocevski> in cluster <slac> at Sat Aug 14 19:35:41 2021
Job was executed on host(s) <bullet0086>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Aug 14 19:37:11 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Sat Aug 14 19:37:11 2021
Terminated at Sat Aug 14 19:48:01 2021
Results reported at Sat Aug 14 19:48:01 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J0152.6+0147_daily_bin572 28.1614 1.7894 387590401 387849601 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J0152.6+0147 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   487.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             228.40 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   650 sec.
    Turnaround time :                            740 sec.

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

