/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 8 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 = 31
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J1245.1+5709_daily_bin1557
RA = 191.288, Dec = 57.158
tmin = 642902401, tmax = 643161601
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='897360', job_status='RUN', time_executed='2021-09-06 04:30:56.818355', time_epoch_executed='1630927856.82' WHERE source_name='4FGL J1245.1+5709' and cadence='daily' and bin_id='1557'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/897360

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/897360/ft1_4FGL_J1245.1+5709_daily_bin1557.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/897360/ft2_4FGL_J1245.1+5709_daily_bin1557.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/897360/ft1_4FGL_J1245.1+5709_daily_bin1557.fits outfile=/scratch/kocevski/897360/ft1_filteredMKT_4FGL_J1245.1+5709_daily_bin1557.fits ra=191.288 dec=57.158 rad=12.0 tmin=642902401.0 tmax=643161601.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.53
user 3.29
sys 0.21

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/897360/ft2_4FGL_J1245.1+5709_daily_bin1557.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/897360/ft2_4FGL_J1245.1+5709_daily_bin1557.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/897360/ft1_filteredMKT_4FGL_J1245.1+5709_daily_bin1557.fits evtable="EVENTS" outfile="/scratch/kocevski/897360/ft1_filtered_4FGL_J1245.1+5709_daily_bin1557.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.51
user 0.32
sys 0.16

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/897360/ft1_filtered_4FGL_J1245.1+5709_daily_bin1557.fits" evtable="EVENTS" scfile=/scratch/kocevski/897360/ft2_4FGL_J1245.1+5709_daily_bin1557.fits sctable="SC_DATA" outfile=/scratch/kocevski/897360/ltcube_642902401_643161601_4FGL_J1245.1+5709_daily_bin1557.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/897360/ft2_4FGL_J1245.1+5709_daily_bin1557.fits
.....................!
real 12.77
user 11.90
sys 0.40

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/897360/ft1_filtered_4FGL_J1245.1+5709_daily_bin1557.fits evtable="EVENTS" scfile=/scratch/kocevski/897360/ft2_4FGL_J1245.1+5709_daily_bin1557.fits sctable="SC_DATA" expcube=/scratch/kocevski/897360/ltcube_642902401_643161601_4FGL_J1245.1+5709_daily_bin1557.fits outfile=/scratch/kocevski/897360/expmap_642902401_643161601_4FGL_J1245.1+5709_daily_bin1557.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/897360/ltcube_642902401_643161601_4FGL_J1245.1+5709_daily_bin1557.fits
.....................!
real 190.84
user 185.11
sys 4.96

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

Setting source of interest to:
4FGL J1245.1+5709 @ 191.288 57.158

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/897360/ft1_filtered_4FGL_J1245.1+5709_daily_bin1557.fits scfile=/scratch/kocevski/897360/ft2_4FGL_J1245.1+5709_daily_bin1557.fits outfile=/scratch/kocevski/897360/cmap_642902401_643161601_4FGL_J1245.1+5709_daily_bin1557.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=191.288 yref=57.158 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.91
user 0.38
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/897360/ft1_filtered_4FGL_J1245.1+5709_daily_bin1557.fits scfile=/scratch/kocevski/897360/ft2_4FGL_J1245.1+5709_daily_bin1557.fits outfile=/scratch/kocevski/897360/cmap_HighResolution_642902401_643161601_4FGL_J1245.1+5709_daily_bin1557.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=191.288 yref=57.158 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.86
user 0.40
sys 0.15

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/897360/ft1_filtered_4FGL_J1245.1+5709_daily_bin1557.fits evtable="EVENTS" scfile=/scratch/kocevski/897360/ft2_4FGL_J1245.1+5709_daily_bin1557.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/897360/Model_4FGL_J1245.1+5709_daily_bin1557.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/897360/ft1_filtered_4FGL_J1245.1+5709_daily_bin1557.fits.....................!
real 60.61
user 57.55
sys 1.35

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/897360/ft1_filtered_4FGL_J1245.1+5709_daily_bin1557.fits', '/scratch/kocevski/897360/ft2_4FGL_J1245.1+5709_daily_bin1557.fits', expMap='/scratch/kocevski/897360/expmap_642902401_643161601_4FGL_J1245.1+5709_daily_bin1557.fits', expCube='/scratch/kocevski/897360/ltcube_642902401_643161601_4FGL_J1245.1+5709_daily_bin1557.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/897360/Model_4FGL_J1245.1+5709_daily_bin1557.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1245.1+5709'

4FGL J1245.1+5709
   Spectrum: PowerLaw
355    Prefactor:  1.104e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-13)
356        Index:  2.128e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
357        Scale:  1.843e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/897360/ft1_filtered_4FGL_J1245.1+5709_daily_bin1557.fits
Spacecraft file(s): /scratch/kocevski/897360/ft2_4FGL_J1245.1+5709_daily_bin1557.fits
Exposure map: /scratch/kocevski/897360/expmap_642902401_643161601_4FGL_J1245.1+5709_daily_bin1557.fits
Exposure cube: /scratch/kocevski/897360/ltcube_642902401_643161601_4FGL_J1245.1+5709_daily_bin1557.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/897360/Model_4FGL_J1245.1+5709_daily_bin1557.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) = 6634.41255559

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .17063E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .11431E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    4.2735       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10449E-03   1.0000         .10000E-03   10000.    
     5 'norm      '    .37484E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10023E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10046E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    9.1608       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    12 'norm      '    9.4737       1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10145E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    4.1562       1.0000         .10000E-03   10000.    
    15 'norm      '    3.9618       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    .40021E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    20 'norm      '    4.2927       1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10462E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10006E-03   1.0000         .10000E-03   10000.    
    24 'norm      '    22.975       1.0000         .10000E-03   10000.    
    25 'Prefactor '    .10010E-03   1.0000         .10000E-03   10000.    
    26 'Prefactor '    2.2049       1.0000         .10000E-03   10000.    
    27 'Prefactor '    .10070E-03   1.0000         .10000E-03   10000.    
    28 'Prefactor '    .10009E-03   1.0000         .10000E-03   10000.    
    29 'norm      '    .10007E-03   1.0000         .10000E-03   10000.    
    30 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    31 'Prefactor '    .10174E-03   1.0000         .10000E-03   10000.    
    32 'Normalizat'    1.0589       1.0000         .10000E-01   10.000    
    33 'Prefactor '    .89390       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6920E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   6634.359     FROM MIGRAD    STATUS=CONVERGED    907 CALLS     3909 TOTAL
                     EDM=   .71E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.7%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10002E-03    4.0718       -.79276E-06** at limit **
   2  Prefactor     .10000E-03    31.811       -.39252E-06** at limit **
   3  norm          4.2721        7.3297        .35500E-05    .23088E-03
   4  Prefactor     .10000E-03    1.6371       -.27633E-07** at limit **
   5  norm          .10003E-03    2.3245       -.11160E-05** at limit **
   6  Prefactor     .10000E-03    6.6612       -.36725E-07** at limit **
   7  Prefactor     .10000E-03    2.8812       -.37609E-08** at limit **
   8  Prefactor     .10000E-03    11.287       -.72653E-07** at limit **
   9  norm          .10000E-03    .55239        .52652E-08** at limit **
  10  Prefactor     9.1601        14.396        .84795E-07    .52407E-04
  11  Prefactor     .10000E-03    16.412       -.27786E-06** at limit **
  12  norm          9.4714        6.5313        .12751E-07   -.14416E-04
  13  Prefactor     .10000E-03    11.176       -.13995E-06** at limit **
  14  Prefactor     4.1566        3.7168        .18179E-07    .92874E-04
  15  norm          3.9618        1.9883       -.24256E-08    .16115E-05
  16  Prefactor     .10000E-03    7.1695        .70205E-07** at limit **
  17  norm          .10000E-03    .88616        .32864E-06** at limit **
  18  Prefactor     .10000E-03    12.391        .26038E-06** at limit **
  19  Prefactor     .10000E-03    3.3483        .55611E-08** at limit **
  20  norm          4.2913        3.0473        .95878E-07   -.16501E-04
  21  Prefactor     .10000E-03    40.764       -.68050E-06** at limit **
  22  Prefactor     .10002E-03    89.573        .39248E-05** at limit **
  23  Prefactor     .10000E-03    13.328        .17341E-06** at limit **
  24  norm          22.972        6.0517        .94997E-07   -.11214E-04
  25  Prefactor     .10000E-03    14.407       -.33349E-07** at limit **
  26  Prefactor     2.2042        3.1420        .25219E-06    .38765E-04
  27  Prefactor     .10000E-03    26.970        .38316E-06** at limit **
  28  Prefactor     .10000E-03    4.2043       -.59080E-07** at limit **
  29  norm          .10000E-03    21.606        .38610E-06** at limit **
  30  norm          .10000E-03    1.1551       -.51133E-08** at limit **
  31  Prefactor     .10003E-03    130.86       -.32189E-05** at limit **
  32  Normalizat    1.0589        .14815       -.68907E-08    .31993E-03
  33  Prefactor     .89387        .18152       -.79680E-07    .21341E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100019
  Prefactor  = 0.0001
  norm       = 4.27209
  Prefactor  = 0.0001
  norm       = 0.000100033
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 9.16015
  Prefactor  = 0.0001
  norm       = 9.4714
  Prefactor  = 0.0001
  Prefactor  = 4.15662
  norm       = 3.96177
  Prefactor  = 0.0001
  norm       = 0.000100004
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 4.29132
  Prefactor  = 0.000100001
  Prefactor  = 0.00010002
  Prefactor  = 0.0001
  norm       = 22.9719
  Prefactor  = 0.0001
  Prefactor  = 2.2042
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 0.0001
  Prefactor  = 0.000100026
  Normalizat = 1.05892
  Prefactor  = 0.893871
 **********
 **   18 **HESSE 
 **********

 FCN=   6634.359     FROM HESSE     STATUS=OK           687 CALLS     4596 TOTAL
                     EDM=   .54E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10002E-03    17.235        .30830E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    32.136        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          4.2721        7.4460        .97447E-03   -1.5295    
   4  Prefactor     .10000E-03    3.6901        .20202E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          .10003E-03    11.393        .21861E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    6.6713        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    2.8893        .13492E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    11.315        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          .10000E-03    .55982        .59081E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     9.1601        14.386        .13242E-03   -1.5103    
  11  Prefactor     .10000E-03    16.424        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm          9.4714        6.5244        .13020E-03   -1.5092    
  13  Prefactor     .10000E-03    11.205        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     4.1566        3.7211        .14272E-03   -1.5300    
  15  norm          3.9618        1.9877        .78234E-04   -1.5310    
  16  Prefactor     .10000E-03    7.1884        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .10000E-03    4.7767        .14527E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10000E-03    12.404        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10000E-03    3.3586        .14553E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  norm          4.2913        3.0435        .11634E-03   -1.5294    
  21  Prefactor     .10000E-03    40.884        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     .10002E-03    91.847        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10000E-03    13.389        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  norm          22.972        6.0425        .83568E-04   -1.4749    
  25  Prefactor     .10000E-03    14.413        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  Prefactor     2.2042        3.1182        .16560E-03   -1.5411    
  27  Prefactor     .10000E-03    27.057        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  Prefactor     .10000E-03    4.2095        .16288E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  29  norm          .10000E-03    21.620        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  30  norm          .10000E-03    1.1615        .85481E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  31  Prefactor     .10003E-03    131.78        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  32  Normalizat    1.0589        .17012        .20785E-03   -.91082    
  33  Prefactor     .89387        .21008        .28002E-03   -.96356    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 5.39825e-09
Minuit parameter uncertainties:
  1  0.00113945
  2  0.000119729
  3  7.44762
  4  1.03142e-05
  5  0.00122364
  6  8.68949e-06
  7  7.11554e-06
  8  1.01575e-05
  9  6.24447e-07
  10  14.3909
  11  0.000108512
  12  6.5249
  13  4.17726e-05
  14  3.72135
  15  1.98776
  16  1.66141e-05
  17  0.000286637
  18  9.03837e-05
  19  1.03868e-06
  20  3.04359
  21  0.000417638
  22  0.00273174
  23  5.49386e-05
  24  6.04263
  25  1.51448e-05
  26  3.11846
  27  0.000186394
  28  6.55356e-06
  29  0.000179427
  30  8.92878e-07
  31  0.00370431
  32  0.170211
  33  0.210273
Done.

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

Extracting fit parameters...

4FGL J1245.1+5709
   Spectrum: PowerLaw
355    Prefactor:  4.157e+00  3.721e+00  1.000e-04  1.000e+04 ( 1.000e-13)
356        Index:  2.128e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
357        Scale:  1.843e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
689    Prefactor:  8.939e-01  2.103e-01  0.000e+00  1.000e+01 ( 1.000e+00)
690        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
691        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
688   Normalization:  1.059e+00  1.702e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 6.54
Ra Dec: 191.288 57.158
Photon Index (Fixed Index): 2.13 +/- 0.00
Photon Flux (Fixed Index): 1.82e-08 +/- 1.63e-08
Energy Flux (Fixed Index): 9.40e-06 +/- 8.42e-06

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): 0
logL (Free Index) = 6634.23564276
delta logL = 0.123542968989

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6634.23048262
delta logL = 0.12870311405

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   6634.230     FROM MIGRAD    STATUS=CONVERGED     51 CALLS      203 TOTAL
                     EDM=   .20E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     4.5501        157.40        .47188E-02   -.17398E-03
   2  Index         1.6517        5.3108        .28283       -.16129E-04
   3  Normalizat    1.0704        .10289        .39359E-01   -.11517E-05
   4  Prefactor     .88674        .80358E-01    .44836E-01    .12009E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 4.55013
  Index      = 1.65172
  Normalizat = 1.0704
  Prefactor  = 0.886742
 **********
 **   18 **HESSE 
 **********

 FCN=   6634.230     FROM HESSE     STATUS=OK            33 CALLS      236 TOTAL
                     EDM=   .25E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     4.5501        4.5070        .16518E-03   -1.5281    
   2  Index         1.6517        .87666        .11923E-01   -.73375    
   3  Normalizat    1.0704        .16762        .20691E-03   -.90708    
   4  Prefactor     .88674        .20946        .28108E-03   -.96606    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.46407e-10
Minuit parameter uncertainties:
  1  4.50737
  2  0.885016
  3  0.167699
  4  0.209653
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/897360': 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) = 6634.23048251
delta logL = 0.128703224627

Extracting fit parameters...

4FGL J1245.1+5709
   Spectrum: PowerLaw
355    Prefactor:  4.550e+00  4.507e+00  1.000e-04  1.000e+04 ( 1.000e-13)
356        Index:  1.652e+00  8.850e-01  0.000e+00  1.000e+01 (-1.000e+00)
357        Scale:  1.843e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
689    Prefactor:  8.867e-01  2.097e-01  0.000e+00  1.000e+01 ( 1.000e+00)
690        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
691        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
688   Normalization:  1.070e+00  1.677e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 6.80
Ra Dec: 191.288 57.158
Photon Index (Free Index): 1.65 +/- 0.89
Photon Flux (Free Index): 8.50e-09 +/- 1.49e-08
Energy Flux (Free Index): 1.62e-05 +/- 2.81e-05

Creating a high resolution counts map...
INFO: Auto-setting vmin to -2.500e-04 [aplpy.core]
INFO: Auto-setting vmax to  2.775e-03 [aplpy.core]
Saving /scratch/kocevski/897360/cmap_HighResolution_642902401_643161601_4FGL_J1245.1+5709_daily_bin1557.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='1.82e-08', energy_flux2='1.62e-05', photon_flux_error='1.63e-08', dlogl='1.29e-01', energy_flux='9.40e-06', photon_flux2='8.50e-09', job_status='DONE', time_completed='2021-09-06 04:46:05.855178', photon_index_error2='0.89', photon_index2='1.65', ts='6.54', fit_tolerance='1e-08', GAL='0.89', photon_index_error='0.00', energy_flux_error2='2.81e-05', EG='1.06', time_epoch_completed='1630928765.86', return_code='0', job_id='897360', GAL2='0.89', EG2='1.07', return_code2='0', energy_flux_error='8.42e-06', photon_flux_error2='1.49e-08', ts2='6.80', photon_index='2.13' WHERE bin_id='1557' AND source_name='4FGL J1245.1+5709' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 04:46:05 PDT 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0134>
Subject: Job 897360: <4FGL_J1245.1+5709_daily_bin1557> in cluster <slac> Done

Job <4FGL_J1245.1+5709_daily_bin1557> was submitted from host <rhel6-64k> by user <kocevski> in cluster <slac> at Mon Sep  6 04:30:36 2021
Job was executed on host(s) <bullet0134>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep  6 04:30:38 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Mon Sep  6 04:30:38 2021
Terminated at Mon Sep  6 04:46:06 2021
Results reported at Mon Sep  6 04:46:06 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1245.1+5709_daily_bin1557 191.288 57.158 642902401 643161601 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1245.1+5709 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   901.00 sec.
    Max Memory :                                 1095 MB
    Average Memory :                             330.23 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   928 sec.
    Turnaround time :                            930 sec.

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

