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


Performing analysis on: 4FGL_J0152.6+0147_daily_bin878
RA = 28.1614, Dec = 1.7894
tmin = 466905601, tmax = 467164801
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='899956', job_status='RUN', time_executed='2021-08-14 19:44:00.986381', time_epoch_executed='1628995440.99' WHERE source_name='4FGL J0152.6+0147' and cadence='daily' and bin_id='878'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/899956

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/899956/ft1_4FGL_J0152.6+0147_daily_bin878.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/899956/ft2_4FGL_J0152.6+0147_daily_bin878.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/899956/ft1_4FGL_J0152.6+0147_daily_bin878.fits outfile=/scratch/kocevski/899956/ft1_filteredMKT_4FGL_J0152.6+0147_daily_bin878.fits ra=28.1614 dec=1.7894 rad=12.0 tmin=466905601.0 tmax=467164801.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 4.23
user 3.35
sys 0.81

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/899956/ft2_4FGL_J0152.6+0147_daily_bin878.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/899956/ft1_filteredMKT_4FGL_J0152.6+0147_daily_bin878.fits evtable="EVENTS" outfile="/scratch/kocevski/899956/ft1_filtered_4FGL_J0152.6+0147_daily_bin878.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.11
user 0.32
sys 0.75

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/899956/ft1_filtered_4FGL_J0152.6+0147_daily_bin878.fits" evtable="EVENTS" scfile=/scratch/kocevski/899956/ft2_4FGL_J0152.6+0147_daily_bin878.fits sctable="SC_DATA" outfile=/scratch/kocevski/899956/ltcube_466905601_467164801_4FGL_J0152.6+0147_daily_bin878.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/899956/ft2_4FGL_J0152.6+0147_daily_bin878.fits
.....................!
real 14.82
user 13.78
sys 1.00

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/899956/ft1_filtered_4FGL_J0152.6+0147_daily_bin878.fits evtable="EVENTS" scfile=/scratch/kocevski/899956/ft2_4FGL_J0152.6+0147_daily_bin878.fits sctable="SC_DATA" expcube=/scratch/kocevski/899956/ltcube_466905601_467164801_4FGL_J0152.6+0147_daily_bin878.fits outfile=/scratch/kocevski/899956/expmap_466905601_467164801_4FGL_J0152.6+0147_daily_bin878.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/899956/ltcube_466905601_467164801_4FGL_J0152.6+0147_daily_bin878.fits
.....................!
real 193.09
user 186.67
sys 6.02

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/899956/ft1_filtered_4FGL_J0152.6+0147_daily_bin878.fits scfile=/scratch/kocevski/899956/ft2_4FGL_J0152.6+0147_daily_bin878.fits outfile=/scratch/kocevski/899956/cmap_466905601_467164801_4FGL_J0152.6+0147_daily_bin878.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.14
user 0.38
sys 0.72

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/899956/ft1_filtered_4FGL_J0152.6+0147_daily_bin878.fits scfile=/scratch/kocevski/899956/ft2_4FGL_J0152.6+0147_daily_bin878.fits outfile=/scratch/kocevski/899956/cmap_HighResolution_466905601_467164801_4FGL_J0152.6+0147_daily_bin878.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.12
user 0.38
sys 0.73

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

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/899956/ft1_filtered_4FGL_J0152.6+0147_daily_bin878.fits', '/scratch/kocevski/899956/ft2_4FGL_J0152.6+0147_daily_bin878.fits', expMap='/scratch/kocevski/899956/expmap_466905601_467164801_4FGL_J0152.6+0147_daily_bin878.fits', expCube='/scratch/kocevski/899956/ltcube_466905601_467164801_4FGL_J0152.6+0147_daily_bin878.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/899956/Model_4FGL_J0152.6+0147_daily_bin878.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/899956/ft1_filtered_4FGL_J0152.6+0147_daily_bin878.fits
Spacecraft file(s): /scratch/kocevski/899956/ft2_4FGL_J0152.6+0147_daily_bin878.fits
Exposure map: /scratch/kocevski/899956/expmap_466905601_467164801_4FGL_J0152.6+0147_daily_bin878.fits
Exposure cube: /scratch/kocevski/899956/ltcube_466905601_467164801_4FGL_J0152.6+0147_daily_bin878.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/899956/Model_4FGL_J0152.6+0147_daily_bin878.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) = 5182.47439571

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10299E-03   1.0000         .10000E-03   10000.    
     2 'norm      '    17.173       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     7 'norm      '    5.9953       1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    10 'norm      '    4.0607       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .33772E-03   1.0000         .10000E-03   10000.    
    12 'norm      '    10.566       1.0000         .10000E-03   10000.    
    13 'Prefactor '    .29080       1.0000         .10000E-03   10000.    
    14 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10011E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    4.4450       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    19 'Normalizat'    .83177       1.0000         .10000E-01   10.000    
    20 'Prefactor '    1.1789       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.

 FCN=   5182.405     FROM MIGRAD    STATUS=CONVERGED    428 CALLS     1746 TOTAL
                     EDM=   .16E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .5%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    182.34       -.11304E-03** at limit **
   2  norm          17.171        3.2242        .11443E-06    .12352E-02
   3  Prefactor     .10000E-03    30.783       -.20547E-04** at limit **
   4  Prefactor     .10000E-03    8.9213       -.37521E-06** at limit **
   5  Prefactor     .10000E-03    3.2802       -.82076E-07** at limit **
   6  Prefactor     .10000E-03    19.564       -.32299E-05** at limit **
   7  norm          5.9953        5.6708       -.11551E-06   -.31377E-04
   8  Prefactor     .10000E-03    144.54        .87068E-04** at limit **
   9  Prefactor     .10000E-03    2.1344       -.75232E-07** at limit **
  10  norm          4.0607        10.132       -.26692E-06   -.97205E-04
  11  Prefactor     .10000E-03    3.4026       -.11737E-06** at limit **
  12  norm          10.566        5.2869        .11003E-05    .27666E-04
  13  Prefactor     .29028        1.9764       -.17075E-05   -.19537E-02
  14  norm          .10000E-03    .29707       -.21727E-07** at limit **
  15  Prefactor     .10000E-03    24.907        .15145E-04** at limit **
  16  Prefactor     .10000E-03    38.894        .10244E-04** at limit **
  17  Prefactor     4.4465        14.301       -.39320E-06   -.68901E-04
  18  Prefactor     .10000E-03    10.109        .30322E-07** at limit **
  19  Normalizat    .83172        .20483        .10868E-06    .30954E-05
  20  Prefactor     1.1789        .17206       -.30235E-07    .26348E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  norm       = 17.1709
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 5.99533
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 4.06067
  Prefactor  = 0.0001
  norm       = 10.5664
  Prefactor  = 0.290278
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 4.44645
  Prefactor  = 0.0001
  Normalizat = 0.831721
  Prefactor  = 1.17892
 **********
 **   18 **HESSE 
 **********

 FCN=   5182.405     FROM HESSE     STATUS=OK           287 CALLS     2033 TOTAL
                     EDM=   .32E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    181.33        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  norm          17.171        3.2252        .53845E-04   -1.4879    
   3  Prefactor     .10000E-03    30.765        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    9.0899        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    3.2834        .12734E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    19.567        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  norm          5.9953        5.6726        .16247E-03   -1.5218    
   8  Prefactor     .10000E-03    143.95        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .10000E-03    2.1420        .10270E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          4.0607        10.123        .20009E-03   -1.5305    
  11  Prefactor     .10000E-03    36.529        .25643E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm          10.566        5.2834        .11285E-03   -1.5058    
  13  Prefactor     .29028        2.0289        .19631E-03   -1.5600    
  14  norm          .10000E-03    .30638        .76544E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .10000E-03    25.162        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     .10000E-03    38.909        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     4.4465        14.290        .19100E-03   -1.5286    
  18  Prefactor     .10000E-03    10.144        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Normalizat    .83172        .23596        .29754E-03   -.98903    
  20  Prefactor     1.1789        .19815        .21183E-03   -.86982    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.24978e-09
Minuit parameter uncertainties:
  1  0.000425795
  2  3.22522
  3  5.61161e-06
  4  2.4082e-06
  5  3.53079e-07
  6  4.51652e-07
  7  5.67314
  8  0.000338075
  9  1.4833e-07
  10  10.1277
  11  2.66834e-05
  12  5.28363
  13  1.53468
  14  6.72956e-10
  15  4.59989e-05
  16  4.21854e-06
  17  14.3013
  18  2.39337e-06
  19  0.236252
  20  0.19827
Done.

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

Extracting fit parameters...

4FGL J0152.6+0147
   Spectrum: PowerLaw
237    Prefactor:  1.000e-04  1.483e-07  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.179e+00  1.983e-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:  8.317e-01  2.363e-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: 5.74e-08 ph cm-2 s-1
Energy Flux Upper Limit: 4.30e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/899956/likelihoodResults_466905601_467164801_4FGL_J0152.6+0147_daily_bin878.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) = 5182.40715046
delta logL = -0.00219848020697

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 5182.40495207
delta logL = -8.92860043678e-08

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10185E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    1.9628       1.0000          .0000       10.000    
     3 'Normalizat'    .83165       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1790       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=   5182.405     FROM MIGRAD    STATUS=FAILED        87 CALLS      236 TOTAL
                     EDM=   .40E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10099E-03    28.668        .10454E-02** at limit **
   2  Index         1.9146        5.3653        .50000        .66582E-04
   3  Normalizat    .83172        .18678E-01    .29754E-03   -.11065E-03
   4  Prefactor     1.1789        .15648E-01    .21183E-03   -.13093E-03
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   5182.405     FROM SIMPLEX   STATUS=UNCHANGED    130 CALLS      366 TOTAL
                     EDM=   .89E-05    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10099E-03    28.668        .23678E-03** at limit **
   2  Index         1.9146        5.3653        .62835E-02    .66582E-04
   3  Normalizat    .83172        .18678E-01    .28016E-04   -.11065E-03
   4  Prefactor     1.1789        .15648E-01    .12961E-04   -.13093E-03
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   5182.405     FROM MIGRAD    STATUS=CONVERGED     53 CALLS      419 TOTAL
                     EDM=   .63E-10    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    33.331        .20908E-02** at limit **
   2  Index         1.5363        7.6336        .50000        .16189E-07
   3  Normalizat    .83172        .18695E-01    .11902E-04    .18722E-04
   4  Prefactor     1.1789        .15663E-01    .42365E-04    .60110E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 1.53632
  Normalizat = 0.831722
  Prefactor  = 1.17892
 **********
 **   18 **HESSE 
 **********

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

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    155.42        .41817E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         1.5363        7.2392        .50000       -.76528    
   3  Normalizat    .83172        .42825E-01    .23803E-05   -.98903    
   4  Prefactor     1.1789        .35875E-01    .84731E-05   -.86982    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 2.94703e-10
Minuit parameter uncertainties:
  1  7.78395e-05
  2  530.414
  3  0.0428267
  4  0.0358754
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/899956': 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) = 5182.40494765
delta logL = 4.33576951764e-06

Extracting fit parameters...

4FGL J0152.6+0147
   Spectrum: PowerLaw
237    Prefactor:  1.000e-04  7.784e-05  1.000e-04  1.000e+04 ( 1.000e-13)
238        Index:  1.536e+00  5.304e+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.179e+00  3.588e-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:  8.317e-01  4.283e-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/899956/cmap_HighResolution_466905601_467164801_4FGL_J0152.6+0147_daily_bin878.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='4.30e-03', job_status='DONE', photon_flux_upper_limit='5.74e-08', time_completed='2021-08-14 19:53:26.108550', job_id='899956', GAL2='1.18', fit_tolerance='1e-08', EG2='0.83', EG='0.83', time_epoch_completed='1628996006.11', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.18', dlogl='4.34e-06', ts2='-0.00', photon_index_error='0.00', photon_index='1.98' WHERE bin_id='878' AND source_name='4FGL J0152.6+0147' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Aug 14 19:53:26 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0298>
Subject: Job 899956: <4FGL_J0152.6+0147_daily_bin878> in cluster <slac> Done

Job <4FGL_J0152.6+0147_daily_bin878> was submitted from host <rhel6-64h> by user <kocevski> in cluster <slac> at Sat Aug 14 19:40:44 2021
Job was executed on host(s) <bullet0298>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Aug 14 19:42:01 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:42:01 2021
Terminated at Sat Aug 14 19:53:26 2021
Results reported at Sat Aug 14 19:53:26 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J0152.6+0147_daily_bin878 28.1614 1.7894 466905601 467164801 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 :                                   574.00 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             317.75 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   685 sec.
    Turnaround time :                            762 sec.

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

