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


Performing analysis on: 4FGL_J1245.1+5709_daily_bin662
RA = 191.288, Dec = 57.158
tmin = 410918401, tmax = 411177601
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='891323', job_status='RUN', time_executed='2021-09-06 04:14:41.541906', time_epoch_executed='1630926881.54' WHERE source_name='4FGL J1245.1+5709' and cadence='daily' and bin_id='662'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/891323

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/891323/ft1_4FGL_J1245.1+5709_daily_bin662.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/891323/ft2_4FGL_J1245.1+5709_daily_bin662.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/891323/ft1_4FGL_J1245.1+5709_daily_bin662.fits outfile=/scratch/kocevski/891323/ft1_filteredMKT_4FGL_J1245.1+5709_daily_bin662.fits ra=191.288 dec=57.158 rad=12.0 tmin=410918401.0 tmax=411177601.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 7.10
user 6.71
sys 0.37

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/891323/ft2_4FGL_J1245.1+5709_daily_bin662.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/891323/ft1_filteredMKT_4FGL_J1245.1+5709_daily_bin662.fits evtable="EVENTS" outfile="/scratch/kocevski/891323/ft1_filtered_4FGL_J1245.1+5709_daily_bin662.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.50
user 0.35
sys 0.14

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/891323/ft1_filtered_4FGL_J1245.1+5709_daily_bin662.fits" evtable="EVENTS" scfile=/scratch/kocevski/891323/ft2_4FGL_J1245.1+5709_daily_bin662.fits sctable="SC_DATA" outfile=/scratch/kocevski/891323/ltcube_410918401_411177601_4FGL_J1245.1+5709_daily_bin662.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/891323/ft2_4FGL_J1245.1+5709_daily_bin662.fits
.....................!
real 13.90
user 13.51
sys 0.34

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/891323/ft1_filtered_4FGL_J1245.1+5709_daily_bin662.fits evtable="EVENTS" scfile=/scratch/kocevski/891323/ft2_4FGL_J1245.1+5709_daily_bin662.fits sctable="SC_DATA" expcube=/scratch/kocevski/891323/ltcube_410918401_411177601_4FGL_J1245.1+5709_daily_bin662.fits outfile=/scratch/kocevski/891323/expmap_410918401_411177601_4FGL_J1245.1+5709_daily_bin662.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/891323/ltcube_410918401_411177601_4FGL_J1245.1+5709_daily_bin662.fits
.....................!
real 190.75
user 185.88
sys 4.49

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/891323/ft1_filtered_4FGL_J1245.1+5709_daily_bin662.fits scfile=/scratch/kocevski/891323/ft2_4FGL_J1245.1+5709_daily_bin662.fits outfile=/scratch/kocevski/891323/cmap_410918401_411177601_4FGL_J1245.1+5709_daily_bin662.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.54
user 0.37
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/891323/ft1_filtered_4FGL_J1245.1+5709_daily_bin662.fits scfile=/scratch/kocevski/891323/ft2_4FGL_J1245.1+5709_daily_bin662.fits outfile=/scratch/kocevski/891323/cmap_HighResolution_410918401_411177601_4FGL_J1245.1+5709_daily_bin662.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.55
user 0.42
sys 0.13

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

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/891323/ft1_filtered_4FGL_J1245.1+5709_daily_bin662.fits', '/scratch/kocevski/891323/ft2_4FGL_J1245.1+5709_daily_bin662.fits', expMap='/scratch/kocevski/891323/expmap_410918401_411177601_4FGL_J1245.1+5709_daily_bin662.fits', expCube='/scratch/kocevski/891323/ltcube_410918401_411177601_4FGL_J1245.1+5709_daily_bin662.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/891323/Model_4FGL_J1245.1+5709_daily_bin662.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/891323/ft1_filtered_4FGL_J1245.1+5709_daily_bin662.fits
Spacecraft file(s): /scratch/kocevski/891323/ft2_4FGL_J1245.1+5709_daily_bin662.fits
Exposure map: /scratch/kocevski/891323/expmap_410918401_411177601_4FGL_J1245.1+5709_daily_bin662.fits
Exposure cube: /scratch/kocevski/891323/ltcube_410918401_411177601_4FGL_J1245.1+5709_daily_bin662.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/891323/Model_4FGL_J1245.1+5709_daily_bin662.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) = 3021.94839721

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10215E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    62.364       1.0000         .10000E-03   10000.    
     3 'norm      '    2.6478       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10012E-03   1.0000         .10000E-03   10000.    
     5 'norm      '    .36534E-02   1.0000         .10000E-03   10000.    
     6 'Prefactor '    62.739       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10016E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .12005E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    .60424       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .28153E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10019E-03   1.0000         .10000E-03   10000.    
    12 'norm      '    .10004E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10027E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10007E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    3.5806       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    3.7825       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    4.9441       1.0000         .10000E-03   10000.    
    20 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10251E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    6.8533       1.0000         .10000E-03   10000.    
    24 'norm      '    10.770       1.0000         .10000E-03   10000.    
    25 'Prefactor '    110.81       1.0000         .10000E-03   10000.    
    26 'Prefactor '    .10007E-03   1.0000         .10000E-03   10000.    
    27 'Prefactor '    66.825       1.0000         .10000E-03   10000.    
    28 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    29 'norm      '    .47234E-03   1.0000         .10000E-03   10000.    
    30 'norm      '    2.0248       1.0000         .10000E-03   10000.    
    31 'Prefactor '    .10647E-03   1.0000         .10000E-03   10000.    
    32 'Normalizat'    .89565       1.0000         .10000E-01   10.000    
    33 'Prefactor '    .86064       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=   3021.886     FROM MIGRAD    STATUS=CONVERGED    890 CALLS     4621 TOTAL
                     EDM=   .20E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .7%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    3.9740        .69104E-06** at limit **
   2  Prefactor     62.584        79.393       -.11129E-04   -.30238E-03
   3  norm          2.7148        130.88       -.10438E-04   -.13070E-03
   4  Prefactor     .10000E-03    2.7188        .32933E-07** at limit **
   5  norm          .10445E-03    19.387        .85023E-05** at limit **
   6  Prefactor     62.721        42.621       -.19364E-07   -.61528E-04
   7  Prefactor     .10000E-03    25.980        .47010E-06** at limit **
   8  Prefactor     .10000E-03    245.08        .88630E-06** at limit **
   9  norm          .60307        2.1689        .12214E-05    .89437E-04
  10  Prefactor     .10000E-03    244.39        .35982E-05** at limit **
  11  Prefactor     .10000E-03    192.70        .10197E-05** at limit **
  12  norm          .10000E-03    10.567        .50574E-06** at limit **
  13  Prefactor     .10000E-03    34.767        .79793E-06** at limit **
  14  Prefactor     .10000E-03    3.6242        .17142E-07** at limit **
  15  norm          3.5806        4.9282        .24141E-06   -.20203E-03
  16  Prefactor     .10000E-03    8.5704        .17369E-06** at limit **
  17  norm          3.7813        2.9477        .16556E-06   -.77343E-04
  18  Prefactor     .10000E-03    51.942        .19344E-06** at limit **
  19  Prefactor     4.9420        25.790       -.59224E-06   -.47957E-04
  20  norm          .10000E-03    2.1652        .30141E-06** at limit **
  21  Prefactor     .10000E-03    34.611       -.15774E-07** at limit **
  22  Prefactor     .10000E-03    91.143        .10516E-05** at limit **
  23  Prefactor     6.8419        92.429       -.44120E-05   -.19755E-04
  24  norm          10.765        10.015        .85891E-06   -.40657E-05
  25  Prefactor     110.72        118.41        .25289E-05   -.37168E-04
  26  Prefactor     .10000E-03    2.3405       -.61051E-07** at limit **
  27  Prefactor     66.684        79.717        .91844E-06   -.64037E-04
  28  Prefactor     .10000E-03    5.7448       -.30850E-07** at limit **
  29  norm          .10000E-03    179.08        .53584E-06** at limit **
  30  norm          2.0289        4.8609       -.22828E-06   -.43332E-04
  31  Prefactor     .10000E-03    283.39       -.25832E-06** at limit **
  32  Normalizat    .89617        .25364        .76456E-07   -.63360E-03
  33  Prefactor     .86058        .28087       -.44912E-05   -.35114E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 62.5837
  norm       = 2.71478
  Prefactor  = 0.0001
  norm       = 0.000104449
  Prefactor  = 62.7213
  Prefactor  = 0.0001
  Prefactor  = 0.000100002
  norm       = 0.60307
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 3.58062
  Prefactor  = 0.0001
  norm       = 3.78129
  Prefactor  = 0.0001
  Prefactor  = 4.94202
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 6.84194
  norm       = 10.7646
  Prefactor  = 110.72
  Prefactor  = 0.0001
  Prefactor  = 66.6842
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 2.0289
  Prefactor  = 0.0001
  Normalizat = 0.896172
  Prefactor  = 0.860576
 **********
 **   18 **HESSE 
 **********

 FCN=   3021.886     FROM HESSE     STATUS=OK           685 CALLS     5306 TOTAL
                     EDM=   .32E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    3.9740        .10703E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     62.584        79.196        .25406E-03   -1.4124    
   3  norm          2.7148        128.88        .25054E-03   -1.5378    
   4  Prefactor     .10000E-03    2.7299        .88437E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          .10445E-03    138.22        .39153E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     62.721        42.605        .50661E-04   -1.4122    
   7  Prefactor     .10000E-03    26.149        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    246.27        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          .60307        2.0403        .14862E-02   -1.5553    
  10  Prefactor     .10000E-03    247.02        .21416E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    192.51        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm          .10000E-03    10.665        .17450E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .10000E-03    34.940        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10000E-03    3.6254        .10218E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          3.5806        4.8780        .11820E-03   -1.5329    
  16  Prefactor     .10000E-03    8.5764        .15719E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          3.7813        2.9509        .79986E-04   -1.5319    
  18  Prefactor     .10000E-03    51.954        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     4.9420        25.323        .18088E-03   -1.5263    
  20  norm          .10000E-03    2.1898        .79001E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .10000E-03    34.612        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     .10000E-03    91.869        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     6.8419        84.914        .15326E-03   -1.5185    
  24  norm          10.765        9.7060        .10789E-03   -1.5052    
  25  Prefactor     110.72        117.34        .19106E-03   -1.3600    
  26  Prefactor     .10000E-03    2.3430        .82127E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  27  Prefactor     66.684        79.738        .24549E-03   -1.4073    
  28  Prefactor     .10000E-03    5.7479        .12869E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  29  norm          .10000E-03    180.66        .21185E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  30  norm          2.0289        4.8017        .17233E-03   -1.5423    
  31  Prefactor     .10000E-03    283.40        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  32  Normalizat    .89617        .30510        .24022E-03   -.96595    
  33  Prefactor     .86058        .33188        .28487E-03   -.97533    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.23273e-08
Minuit parameter uncertainties:
  1  1.14472e-05
  2  79.3292
  3  37.495
  4  2.94286e-06
  5  0.049711
  6  42.6256
  7  0.000197584
  8  0.0015292
  9  2.04057
  10  0.000303595
  11  0.000566455
  12  3.27845e-05
  13  8.90842e-05
  14  1.34177e-06
  15  4.87858
  16  1.04817e-05
  17  2.95102
  18  0.000108632
  19  22.3887
  20  9.57698e-06
  21  1.09438e-05
  22  1.97724e-06
  23  48.2917
  24  9.70746
  25  117.585
  26  2.75923e-06
  27  79.8665
  28  4.85383e-06
  29  0.000387227
  30  4.80256
  31  8.70713e-05
  32  0.305694
  33  0.332655
Done.

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

Extracting fit parameters...

4FGL J1245.1+5709
   Spectrum: PowerLaw
355    Prefactor:  1.000e-04  1.342e-06  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.606e-01  3.327e-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:  8.962e-01  3.057e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 191.288 57.158
Photon Flux Upper Limit: 8.43e-08 ph cm-2 s-1
Energy Flux Upper Limit: 6.39e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/891323/likelihoodResults_410918401_411177601_4FGL_J1245.1+5709_daily_bin662.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): 0
logL (Free Index) = 3021.88750457
delta logL = -0.00126870672057

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 3021.88623832
delta logL = -2.45933279075e-06

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .11754E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.1114       1.0000          .0000       10.000    
     3 'Normalizat'    .89600       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .86079       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.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   3021.886     FROM MIGRAD    STATUS=CONVERGED    114 CALLS      265 TOTAL
                     EDM=   .29E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    22.875        .10348E-01** at limit **
   2  Index         1.6068        5.7477        .50000        .40757E-07
   3  Normalizat    .89618        .12868E-01    .24021E-03   -.52661E-03
   4  Prefactor     .86057        .15056E-01    .28488E-03   -.45049E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 1.60684
  Normalizat = 0.896178
  Prefactor  = 0.860569
 **********
 **   18 **HESSE 
 **********

 FCN=   3021.886     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      294 TOTAL
                     EDM=   .67E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    517.00        .11386E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         1.6068        5.6495        .50000       -.74590    
   3  Normalizat    .89618        .72835E-01    .48042E-04   -.96595    
   4  Prefactor     .86057        .85169E-01    .56975E-04   -.97533    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 6.7325e-09
Minuit parameter uncertainties:
  1  0.000517345
  2  2009.2
  3  0.0728434
  4  0.0851819
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/891323': 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) = 3021.88623318
delta logL = 2.67592668024e-06

Extracting fit parameters...

4FGL J1245.1+5709
   Spectrum: PowerLaw
355    Prefactor:  1.000e-04  5.173e-04  1.000e-04  1.000e+04 ( 1.000e-13)
356        Index:  1.607e+00  2.009e+03  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.606e-01  8.518e-02  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:  8.962e-01  7.284e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 191.288 57.158

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/891323/cmap_HighResolution_410918401_411177601_4FGL_J1245.1+5709_daily_bin662.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='6.39e-03', job_status='DONE', photon_flux_upper_limit='8.43e-08', time_completed='2021-09-06 04:26:12.030950', job_id='891323', GAL2='0.86', fit_tolerance='1e-08', EG2='0.90', EG='0.90', time_epoch_completed='1630927572.03', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.86', dlogl='2.68e-06', ts2='-0.00', photon_index_error='0.00', photon_index='2.13' WHERE bin_id='662' AND source_name='4FGL J1245.1+5709' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 04:26:12 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0067>
Subject: Job 891323: <4FGL_J1245.1+5709_daily_bin662> in cluster <slac> Done

Job <4FGL_J1245.1+5709_daily_bin662> was submitted from host <rhel6-64a> by user <kocevski> in cluster <slac> at Mon Sep  6 04:10:43 2021
Job was executed on host(s) <bullet0067>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep  6 04:10:45 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:10:45 2021
Terminated at Mon Sep  6 04:26:12 2021
Results reported at Mon Sep  6 04:26:12 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1245.1+5709_daily_bin662 191.288 57.158 410918401 411177601 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 :                                   688.47 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             221.38 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   927 sec.
    Turnaround time :                            929 sec.

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

