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


Performing analysis on: 4FGL_J0152.6+0147_daily_bin545
RA = 28.1614, Dec = 1.7894
tmin = 380592001, tmax = 380851201
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='898382', job_status='RUN', time_executed='2021-08-14 19:40:56.301799', time_epoch_executed='1628995256.3' WHERE source_name='4FGL J0152.6+0147' and cadence='daily' and bin_id='545'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/898382

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/898382/ft1_4FGL_J0152.6+0147_daily_bin545.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/898382/ft2_4FGL_J0152.6+0147_daily_bin545.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/898382/ft1_4FGL_J0152.6+0147_daily_bin545.fits outfile=/scratch/kocevski/898382/ft1_filteredMKT_4FGL_J0152.6+0147_daily_bin545.fits ra=28.1614 dec=1.7894 rad=12.0 tmin=380592001.0 tmax=380851201.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.38
user 3.56
sys 0.75

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/898382/ft2_4FGL_J0152.6+0147_daily_bin545.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/898382/ft1_filteredMKT_4FGL_J0152.6+0147_daily_bin545.fits evtable="EVENTS" outfile="/scratch/kocevski/898382/ft1_filtered_4FGL_J0152.6+0147_daily_bin545.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.97
user 0.28
sys 0.65

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/898382/ft1_filtered_4FGL_J0152.6+0147_daily_bin545.fits" evtable="EVENTS" scfile=/scratch/kocevski/898382/ft2_4FGL_J0152.6+0147_daily_bin545.fits sctable="SC_DATA" outfile=/scratch/kocevski/898382/ltcube_380592001_380851201_4FGL_J0152.6+0147_daily_bin545.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/898382/ft2_4FGL_J0152.6+0147_daily_bin545.fits
.....................!
real 10.47
user 9.53
sys 0.85

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/898382/ft1_filtered_4FGL_J0152.6+0147_daily_bin545.fits evtable="EVENTS" scfile=/scratch/kocevski/898382/ft2_4FGL_J0152.6+0147_daily_bin545.fits sctable="SC_DATA" expcube=/scratch/kocevski/898382/ltcube_380592001_380851201_4FGL_J0152.6+0147_daily_bin545.fits outfile=/scratch/kocevski/898382/expmap_380592001_380851201_4FGL_J0152.6+0147_daily_bin545.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/898382/ltcube_380592001_380851201_4FGL_J0152.6+0147_daily_bin545.fits
.....................!
real 156.98
user 151.53
sys 5.03

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/898382/ft1_filtered_4FGL_J0152.6+0147_daily_bin545.fits scfile=/scratch/kocevski/898382/ft2_4FGL_J0152.6+0147_daily_bin545.fits outfile=/scratch/kocevski/898382/cmap_380592001_380851201_4FGL_J0152.6+0147_daily_bin545.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 0.99
user 0.32
sys 0.66

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/898382/ft1_filtered_4FGL_J0152.6+0147_daily_bin545.fits scfile=/scratch/kocevski/898382/ft2_4FGL_J0152.6+0147_daily_bin545.fits outfile=/scratch/kocevski/898382/cmap_HighResolution_380592001_380851201_4FGL_J0152.6+0147_daily_bin545.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.01
user 0.33
sys 0.66

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10347E-03   1.0000         .10000E-03   10000.    
     2 'norm      '    6.9574       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10023E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    2.0793       1.0000         .10000E-03   10000.    
     5 'Prefactor '    2.1419       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10317E-03   1.0000         .10000E-03   10000.    
     7 'norm      '    .10401E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    57.608       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    10 'norm      '    .10004E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    3.0663       1.0000         .10000E-03   10000.    
    12 'norm      '    6.3368       1.0000         .10000E-03   10000.    
    13 'Prefactor '    1.4071       1.0000         .10000E-03   10000.    
    14 'norm      '    .10073E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10159E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    23.983       1.0000         .10000E-03   10000.    
    18 'Prefactor '    14.773       1.0000         .10000E-03   10000.    
    19 'Normalizat'    .91969       1.0000         .10000E-01   10.000    
    20 'Prefactor '    .90371       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=   4214.873     FROM MIGRAD    STATUS=CONVERGED    433 CALLS     2081 TOTAL
                     EDM=   .16E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  5.9%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    155.13       -.92020E-05** at limit **
   2  norm          6.9573        2.2521       -.22700E-06    .14571E-03
   3  Prefactor     .10000E-03    47.947        .70243E-05** at limit **
   4  Prefactor     2.0794        5.0006       -.11994E-05   -.87308E-04
   5  Prefactor     2.1413        7.8445       -.37433E-05   -.55466E-04
   6  Prefactor     .10000E-03    225.96        .29476E-04** at limit **
   7  norm          .10001E-03    57.281        .26222E-04** at limit **
   8  Prefactor     57.719        127.23       -.17866E-05    .13384E-04
   9  Prefactor     .10000E-03    1.9175       -.27448E-07** at limit **
  10  norm          .10000E-03    11.916        .19695E-06** at limit **
  11  Prefactor     3.0661        4.4733       -.70031E-06   -.71150E-04
  12  norm          6.3363        4.2707       -.11543E-06    .44725E-04
  13  Prefactor     1.4068        2.0854       -.88958E-06   -.30334E-03
  14  norm          .10000E-03    .43815       -.48499E-06** at limit **
  15  Prefactor     .10000E-03    8.8690        .13974E-06** at limit **
  16  Prefactor     .10000E-03    32.764       -.56016E-06** at limit **
  17  Prefactor     23.986        21.529       -.14391E-05    .47515E-04
  18  Prefactor     14.774        22.850       -.14682E-05    .67685E-05
  19  Normalizat    .91945        .20763        .63177E-05   -.55875E-05
  20  Prefactor     .90388        .16449       -.52730E-07    .57706E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100004
  norm       = 6.95732
  Prefactor  = 0.000100001
  Prefactor  = 2.07936
  Prefactor  = 2.14131
  Prefactor  = 0.0001
  norm       = 0.00010001
  Prefactor  = 57.7192
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 3.06607
  norm       = 6.3363
  Prefactor  = 1.40676
  norm       = 0.000100001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 23.9858
  Prefactor  = 14.7742
  Normalizat = 0.919453
  Prefactor  = 0.903882
 **********
 **   18 **HESSE 
 **********

 FCN=   4214.873     FROM HESSE     STATUS=OK           297 CALLS     2378 TOTAL
                     EDM=   .41E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    156.36        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  norm          6.9573        2.2498        .53301E-04   -1.5180    
   3  Prefactor     .10000E-03    48.253        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     2.0794        4.9790        .21750E-03   -1.5420    
   5  Prefactor     2.1413        7.8634        .28161E-03   -1.5415    
   6  Prefactor     .10000E-03    225.16        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  norm          .10001E-03    56.289        .34265E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     57.719        126.75        .26428E-03   -1.4187    
   9  Prefactor     .10000E-03    1.9244        .87787E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          .10000E-03    11.984        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     3.0661        4.4663        .16070E-03   -1.5358    
  12  norm          6.3363        4.2734        .10639E-03   -1.5204    
  13  Prefactor     1.4068        2.0760        .10964E-03   -1.5471    
  14  norm          .10000E-03    .66324        .83197E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .10000E-03    8.8792        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     .10000E-03    32.789        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     23.986        21.562        .81794E-04   -1.4728    
  18  Prefactor     14.774        22.915        .10421E-03   -1.4939    
  19  Normalizat    .91945        .22918        .25293E-03   -.95780    
  20  Prefactor     .90388        .18796        .20954E-03   -.96006    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.07461e-09
Minuit parameter uncertainties:
  1  0.0016229
  2  2.24986
  3  0.000366632
  4  4.98002
  5  7.86715
  6  0.000242157
  7  0.00149664
  8  127.345
  9  1.61777e-05
  10  6.54243e-05
  11  4.46681
  12  4.27356
  13  2.07615
  14  6.25154e-05
  15  1.82208e-05
  16  6.70961e-05
  17  21.5689
  18  22.9282
  19  0.229421
  20  0.188096
Done.

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

Extracting fit parameters...

4FGL J0152.6+0147
   Spectrum: PowerLaw
237    Prefactor:  1.000e-04  1.618e-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:  9.039e-01  1.881e-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:  9.195e-01  2.294e-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.30e-08 ph cm-2 s-1
Energy Flux Upper Limit: 3.97e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/898382/likelihoodResults_380592001_380851201_4FGL_J0152.6+0147_daily_bin545.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) = 4214.87569731
delta logL = -0.00244896025288

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 4214.8732481
delta logL = 2.48568539973e-07

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10141E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    1.9590       1.0000          .0000       10.000    
     3 'Normalizat'    .91942       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .90392       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=   4214.873     FROM MIGRAD    STATUS=FAILED        86 CALLS      229 TOTAL
                     EDM=   .39E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10104E-03    26.434        .89964E-03** at limit **
   2  Index         1.9102        5.0901        .50000        .85809E-04
   3  Normalizat    .91946        .18565E-01    .25293E-03    .10788E-05
   4  Prefactor     .90388        .15348E-01    .20954E-03    .92235E-06
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   4214.873     FROM SIMPLEX   STATUS=UNCHANGED    126 CALLS      355 TOTAL
                     EDM=   .11E-04    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10104E-03    26.434        .24991E-03** at limit **
   2  Index         1.9102        5.0901        .40641E-03    .85809E-04
   3  Normalizat    .91946        .18565E-01    .37428E-05    .10788E-05
   4  Prefactor     .90388        .15348E-01    .27551E-05    .92235E-06
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   4214.873     FROM MIGRAD    STATUS=CONVERGED     50 CALLS      405 TOTAL
                     EDM=   .17E-10    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    32.330        .17993E-02** at limit **
   2  Index         1.5089        9.0059        .50000        .76830E-07
   3  Normalizat    .91946        .18744E-01    .10117E-04    .92593E-04
   4  Prefactor     .90388        .15495E-01    .83815E-05    .11122E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 1.50892
  Normalizat = 0.919461
  Prefactor  = 0.903876
 **********
 **   18 **HESSE 
 **********

 FCN=   4214.873     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      434 TOTAL
                     EDM=   .79E-10    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    147.72        .35985E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         1.5089        8.3246        .50000       -.77290    
   3  Normalizat    .91946        .42494E-01    .20234E-05   -.95780    
   4  Prefactor     .90388        .35122E-01    .16763E-05   -.96006    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 7.91083e-11
Minuit parameter uncertainties:
  1  6.37436e-06
  2  467.082
  3  0.0424951
  4  0.0351226
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/898382': 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) = 4214.87324253
delta logL = 5.81802396482e-06

Extracting fit parameters...

4FGL J0152.6+0147
   Spectrum: PowerLaw
237    Prefactor:  1.000e-04  6.374e-06  1.000e-04  1.000e+04 ( 1.000e-13)
238        Index:  1.509e+00  4.671e+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:  9.039e-01  3.512e-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:  9.195e-01  4.250e-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/898382/cmap_HighResolution_380592001_380851201_4FGL_J0152.6+0147_daily_bin545.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='3.97e-03', job_status='DONE', photon_flux_upper_limit='5.30e-08', time_completed='2021-08-14 19:48:15.628477', job_id='898382', GAL2='0.90', fit_tolerance='1e-08', EG2='0.92', EG='0.92', time_epoch_completed='1628995695.63', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.90', dlogl='5.82e-06', ts2='-0.00', photon_index_error='0.00', photon_index='1.98' WHERE bin_id='545' AND source_name='4FGL J0152.6+0147' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Aug 14 19:48:15 PDT 2021


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

Job <4FGL_J0152.6+0147_daily_bin545> was submitted from host <rhel6-64o> by user <kocevski> in cluster <slac> at Sat Aug 14 19:35:39 2021
Job was executed on host(s) <bullet0086>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Aug 14 19:36:51 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:36:51 2021
Terminated at Sat Aug 14 19:48:16 2021
Results reported at Sat Aug 14 19:48:16 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J0152.6+0147_daily_bin545 28.1614 1.7894 380592001 380851201 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 :                                   446.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             208.29 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   684 sec.
    Turnaround time :                            757 sec.

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

