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


Performing analysis on: 4FGL_J1351.0+0029_daily_bin541
RA = 207.757, Dec = 0.4873
tmin = 379555201, tmax = 379814401
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='13814', job_status='RUN', time_executed='2021-09-08 15:18:28.198842', time_epoch_executed='1631139508.2' WHERE source_name='4FGL J1351.0+0029' and cadence='daily' and bin_id='541'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/13814

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/13814/ft1_4FGL_J1351.0+0029_daily_bin541.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/13814/ft2_4FGL_J1351.0+0029_daily_bin541.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/13814/ft1_4FGL_J1351.0+0029_daily_bin541.fits outfile=/scratch/kocevski/13814/ft1_filteredMKT_4FGL_J1351.0+0029_daily_bin541.fits ra=207.757 dec=0.4873 rad=12.0 tmin=379555201.0 tmax=379814401.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.50
user 3.28
sys 0.20

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/13814/ft2_4FGL_J1351.0+0029_daily_bin541.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/13814/ft2_4FGL_J1351.0+0029_daily_bin541.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/13814/ft1_filteredMKT_4FGL_J1351.0+0029_daily_bin541.fits evtable="EVENTS" outfile="/scratch/kocevski/13814/ft1_filtered_4FGL_J1351.0+0029_daily_bin541.fits" apply_filter=yes overwrite=yes header_obstimes=yes tstart=0.0 tstop=0.0 gtifile="default" chatter=3 clobber=yes debug=no gui=no mode="ql"

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

This is gtmktime version HEAD
Applying GTI filter:
IN_SAA!=T && LIVETIME>0 && gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nogrb.gti',(START+STOP)/2) && (angsep(RA_SUN,DEC_SUN,RA_ZENITH,DEC_ZENITH)>115 || gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nosolarflares.gti',(START+STOP)/2))
real 0.52
user 0.35
sys 0.15

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/13814/ft1_filtered_4FGL_J1351.0+0029_daily_bin541.fits" evtable="EVENTS" scfile=/scratch/kocevski/13814/ft2_4FGL_J1351.0+0029_daily_bin541.fits sctable="SC_DATA" outfile=/scratch/kocevski/13814/ltcube_379555201_379814401_4FGL_J1351.0+0029_daily_bin541.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/13814/ft2_4FGL_J1351.0+0029_daily_bin541.fits
.....................!
real 16.65
user 16.05
sys 0.36

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/13814/ft1_filtered_4FGL_J1351.0+0029_daily_bin541.fits evtable="EVENTS" scfile=/scratch/kocevski/13814/ft2_4FGL_J1351.0+0029_daily_bin541.fits sctable="SC_DATA" expcube=/scratch/kocevski/13814/ltcube_379555201_379814401_4FGL_J1351.0+0029_daily_bin541.fits outfile=/scratch/kocevski/13814/expmap_379555201_379814401_4FGL_J1351.0+0029_daily_bin541.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/13814/ltcube_379555201_379814401_4FGL_J1351.0+0029_daily_bin541.fits
.....................!
real 192.99
user 187.32
sys 4.98

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

Setting source of interest to:
4FGL J1351.0+0029 @ 207.757 0.4873

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/13814/ft1_filtered_4FGL_J1351.0+0029_daily_bin541.fits scfile=/scratch/kocevski/13814/ft2_4FGL_J1351.0+0029_daily_bin541.fits outfile=/scratch/kocevski/13814/cmap_379555201_379814401_4FGL_J1351.0+0029_daily_bin541.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=207.757 yref=0.4873 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.38
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/13814/ft1_filtered_4FGL_J1351.0+0029_daily_bin541.fits scfile=/scratch/kocevski/13814/ft2_4FGL_J1351.0+0029_daily_bin541.fits outfile=/scratch/kocevski/13814/cmap_HighResolution_379555201_379814401_4FGL_J1351.0+0029_daily_bin541.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=207.757 yref=0.4873 axisrot=0.0 rafield="RA" decfield="DEC" proj="AIT" hpx_ordering_scheme="RING" hpx_order=3 hpx_ebin=yes hpx_region="" evtable="EVENTS" sctable="SC_DATA" efield="ENERGY" tfield="TIME" chatter=2 clobber=yes debug=no gui=no mode="ql"

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

This is gtbin version HEAD
real 0.55
user 0.38
sys 0.17

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/13814/ft1_filtered_4FGL_J1351.0+0029_daily_bin541.fits evtable="EVENTS" scfile=/scratch/kocevski/13814/ft2_4FGL_J1351.0+0029_daily_bin541.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/13814/Model_4FGL_J1351.0+0029_daily_bin541.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/13814/ft1_filtered_4FGL_J1351.0+0029_daily_bin541.fits.....................!
real 57.57
user 56.17
sys 1.18

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/13814/ft1_filtered_4FGL_J1351.0+0029_daily_bin541.fits', '/scratch/kocevski/13814/ft2_4FGL_J1351.0+0029_daily_bin541.fits', expMap='/scratch/kocevski/13814/expmap_379555201_379814401_4FGL_J1351.0+0029_daily_bin541.fits', expCube='/scratch/kocevski/13814/ltcube_379555201_379814401_4FGL_J1351.0+0029_daily_bin541.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/13814/Model_4FGL_J1351.0+0029_daily_bin541.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1351.0+0029'

4FGL J1351.0+0029
   Spectrum: PowerLaw
252    Prefactor:  3.616e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-13)
253        Index:  2.437e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
254        Scale:  9.999e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/13814/ft1_filtered_4FGL_J1351.0+0029_daily_bin541.fits
Spacecraft file(s): /scratch/kocevski/13814/ft2_4FGL_J1351.0+0029_daily_bin541.fits
Exposure map: /scratch/kocevski/13814/expmap_379555201_379814401_4FGL_J1351.0+0029_daily_bin541.fits
Exposure cube: /scratch/kocevski/13814/ltcube_379555201_379814401_4FGL_J1351.0+0029_daily_bin541.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/13814/Model_4FGL_J1351.0+0029_daily_bin541.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) = 7764.85089755

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    41.994       1.0000         .10000E-03   10000.    
     2 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10012E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     5 'norm      '    2.5544       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     7 'norm      '    14.635       1.0000         .10000E-03   10000.    
     8 'Prefactor '    2.2785       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    2.7606       1.0000         .10000E-03   10000.    
    11 'norm      '    .29948E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10017E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .10116E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    21.277       1.0000         .10000E-03   10000.    
    15 'norm      '    17.263       1.0000         .10000E-03   10000.    
    16 'norm      '    1.8180       1.0000         .10000E-03   10000.    
    17 'Prefactor '    18.922       1.0000         .10000E-03   10000.    
    18 'norm      '    .10350E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    20 'Normalizat'    1.3691       1.0000         .10000E-01   10.000    
    21 'Prefactor '    .74248       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5140E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   7764.841     FROM MIGRAD    STATUS=CONVERGED    449 CALLS     2180 TOTAL
                     EDM=   .43E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .9%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          41.994        13.190       -.36809E-07   -.91712E-05
   2  norm          .10000E-03    5.2636        .42548E-07** at limit **
   3  Prefactor     .10000E-03    11.050        .18152E-05** at limit **
   4  Prefactor     .10000E-03    5.6634       -.12316E-06** at limit **
   5  norm          2.5543        1.2059       -.21804E-07    .27359E-05
   6  Prefactor     .10000E-03    28.788        .20814E-04** at limit **
   7  norm          14.634        19.298       -.26241E-06   -.89692E-06
   8  Prefactor     2.2769        4.7032       -.29163E-06   -.12132E-03
   9  Prefactor     .10000E-03    7.3049        .60973E-06** at limit **
  10  Prefactor     2.7603        3.1309       -.16421E-07   -.26402E-04
  11  norm          .10000E-03    3.1151       -.51869E-06** at limit **
  12  Prefactor     .10000E-03    8.7876       -.16078E-05** at limit **
  13  norm          .10000E-03    .92495       -.20110E-06** at limit **
  14  Prefactor     21.275        13.765        .18905E-06    .39017E-04
  15  norm          17.263        8.6391       -.31291E-07    .96719E-04
  16  norm          1.8164        2.0744        .47430E-06   -.17601E-02
  17  Prefactor     18.914        22.950       -.32757E-05    .98629E-04
  18  norm          .10000E-03    25.490       -.16425E-04** at limit **
  19  Prefactor     .10000E-03    58.305       -.66413E-05** at limit **
  20  Normalizat    1.3693        .18521        .38338E-06    .14567E-03
  21  Prefactor     .74233        .12520        .18002E-06    .20849E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 41.9939
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 2.55434
  Prefactor  = 0.0001
  norm       = 14.634
  Prefactor  = 2.27685
  Prefactor  = 0.0001
  Prefactor  = 2.76029
  norm       = 0.000100001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 21.2752
  norm       = 17.2627
  norm       = 1.81641
  Prefactor  = 18.9139
  norm       = 0.0001
  Prefactor  = 0.0001
  Normalizat = 1.36935
  Prefactor  = 0.742331
 **********
 **   18 **HESSE 
 **********

 FCN=   7764.841     FROM HESSE     STATUS=OK           317 CALLS     2497 TOTAL
                     EDM=   .70E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          41.994        13.191        .61860E-04   -1.4411    
   2  norm          .10000E-03    5.2740        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .10000E-03    11.132        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    5.6926        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          2.5543        1.2056        .63905E-04   -1.5388    
   6  Prefactor     .10000E-03    28.970        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  norm          14.634        19.311        .10470E-03   -1.4943    
   8  Prefactor     2.2769        4.7252        .25431E-03   -1.5406    
   9  Prefactor     .10000E-03    7.3168        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     2.7603        3.1258        .16142E-03   -1.5376    
  11  norm          .10000E-03    7.5977        .30144E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    8.8983        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .10000E-03    1.5455        .16379E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     21.275        13.771        .86834E-04   -1.4785    
  15  norm          17.263        8.6414        .48198E-03   -1.4877    
  16  norm          1.8164        6.3316        .15487E-02   -1.5438    
  17  Prefactor     18.914        22.881        .92075E-04   -1.4838    
  18  norm          .10000E-03    25.437        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10000E-03    58.399        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Normalizat    1.3693        .22286        .25384E-03   -.81519    
  21  Prefactor     .74233        .15009        .23030E-03   -1.0189    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 7.00708e-09
Minuit parameter uncertainties:
  1  13.1918
  2  7.22593e-07
  3  4.92938e-06
  4  3.44398e-06
  5  1.20562
  6  0.000117515
  7  19.3193
  8  4.72599
  9  1.17206e-07
  10  3.12601
  11  0.00017266
  12  3.64893e-06
  13  5.95085e-06
  14  13.7729
  15  8.64204
  16  6.3339
  17  22.892
  18  5.99052e-05
  19  4.29425e-05
  20  0.22302
  21  0.150171
Done.

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

Extracting fit parameters...

4FGL J1351.0+0029
   Spectrum: PowerLaw
252    Prefactor:  1.000e-04  1.172e-07  1.000e-04  1.000e+04 ( 1.000e-13)
253        Index:  2.437e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
254        Scale:  9.999e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
511    Prefactor:  7.423e-01  1.502e-01  0.000e+00  1.000e+01 ( 1.000e+00)
512        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
513        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
510   Normalization:  1.369e+00  2.230e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 207.757 0.487
Photon Flux Upper Limit: 6.06e-08 ph cm-2 s-1
Energy Flux Upper Limit: 4.70e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/13814/likelihoodResults_379555201_379814401_4FGL_J1351.0+0029_daily_bin541.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) = 7764.84204285
delta logL = -0.000650907281852

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 7764.84139203
delta logL = -8.75515979715e-08

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10148E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.4254       1.0000          .0000       10.000    
     3 'Normalizat'    1.3693       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .74236       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5140E+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=   7764.841     FROM MIGRAD    STATUS=FAILED        89 CALLS      241 TOTAL
                     EDM=   .84E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10186E-03    261.48        .18142E-02** at limit **
   2  Index         2.2979        5.9214        .50000        .84882E-05
   3  Normalizat    1.3693        .27375E-01    .25384E-03    .92708E-05
   4  Prefactor     .74233        .19008E-01    .23030E-03    .87376E-05
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   7764.841     FROM SIMPLEX   STATUS=UNCHANGED    136 CALLS      377 TOTAL
                     EDM=   .11E-04    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10186E-03    261.48        .46969E-03** at limit **
   2  Index         2.2979        5.9214        .42281E-03    .84882E-05
   3  Normalizat    1.3693        .27375E-01    .40860E-05    .92708E-05
   4  Prefactor     .74233        .19008E-01    .29849E-05    .87376E-05
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   7764.841     FROM MIGRAD    STATUS=CONVERGED     41 CALLS      418 TOTAL
                     EDM=   .29E-10    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    1326.3        .36285E-03** at limit **
   2  Index         2.0672        5.9066        .50000        .10170E-06
   3  Normalizat    1.3693        .83156E-01    .10154E-04   -.15451E-04
   4  Prefactor     .74233        .57721E-01    .92119E-05   -.15797E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 2.06716
  Normalizat = 1.36935
  Prefactor  = 0.742331
 **********
 **   18 **HESSE 
 **********

 FCN=   7764.841     FROM HESSE     STATUS=OK            29 CALLS      447 TOTAL
                     EDM=   .35E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    9.3484        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.0672        8.4732        .50000       -.62681    
   3  Normalizat    1.3693        .21454        .20307E-05   -.81519    
   4  Prefactor     .74233        .14901        .18424E-05   -1.0189    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.51444e-11
Minuit parameter uncertainties:
  1  8.22125e-05
  2  217.507
  3  0.214681
  4  0.149095
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/13814': 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) = 7764.84139135
delta logL = 5.88810507907e-07

Extracting fit parameters...

4FGL J1351.0+0029
   Spectrum: PowerLaw
252    Prefactor:  1.000e-04  8.221e-05  1.000e-04  1.000e+04 ( 1.000e-13)
253        Index:  2.067e+00  2.175e+02  0.000e+00  1.000e+01 (-1.000e+00)
254        Scale:  9.999e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
511    Prefactor:  7.423e-01  1.491e-01  0.000e+00  1.000e+01 ( 1.000e+00)
512        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
513        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
510   Normalization:  1.369e+00  2.147e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 207.757 0.487

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/13814/cmap_HighResolution_379555201_379814401_4FGL_J1351.0+0029_daily_bin541.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='4.70e-03', job_status='DONE', photon_flux_upper_limit='6.06e-08', time_completed='2021-09-08 15:29:28.870160', job_id='13814', GAL2='0.74', fit_tolerance='1e-08', EG2='1.37', EG='1.37', time_epoch_completed='1631140168.87', return_code2='0', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.74', dlogl='5.89e-07', ts2='-0.00', photon_index_error='0.00', photon_index='2.44' WHERE bin_id='541' AND source_name='4FGL J1351.0+0029' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Wed Sep  8 15:29:28 PDT 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0181>
Subject: Job 13814: <4FGL_J1351.0+0029_daily_bin541> in cluster <slac> Done

Job <4FGL_J1351.0+0029_daily_bin541> was submitted from host <rhel6-64f> by user <kocevski> in cluster <slac> at Wed Sep  8 15:15:37 2021
Job was executed on host(s) <bullet0181>, in queue <medium>, as user <kocevski> in cluster <slac> at Wed Sep  8 15:15:44 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Wed Sep  8 15:15:44 2021
Terminated at Wed Sep  8 15:29:29 2021
Results reported at Wed Sep  8 15:29:29 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1351.0+0029_daily_bin541 207.757 0.4873 379555201 379814401 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1351.0+0029 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   657.00 sec.
    Max Memory :                                 1093 MB
    Average Memory :                             291.26 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   825 sec.
    Turnaround time :                            832 sec.

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

