/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 6 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 = 7480
number of fields = 27
No RA_SUN column yet. Adding RA_SUN/DEC_SUN columns.
Done.


Performing analysis on: 4FGL_J1059.5+2057_daily_bin411
RA = 164.878, Dec = 20.9524
tmin = 345859201, tmax = 346118401
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='412026', job_status='RUN', time_executed='2021-09-03 02:37:20.597417', time_epoch_executed='1630661840.6' WHERE source_name='4FGL J1059.5+2057' and cadence='daily' and bin_id='411'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/412026

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/412026/ft1_4FGL_J1059.5+2057_daily_bin411.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/412026/ft2_4FGL_J1059.5+2057_daily_bin411.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/412026/ft1_4FGL_J1059.5+2057_daily_bin411.fits outfile=/scratch/kocevski/412026/ft1_filteredMKT_4FGL_J1059.5+2057_daily_bin411.fits ra=164.878 dec=20.9524 rad=12.0 tmin=345859201.0 tmax=346118401.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.46
user 3.19
sys 0.23

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/412026/ft2_4FGL_J1059.5+2057_daily_bin411.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/412026/ft2_4FGL_J1059.5+2057_daily_bin411.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/412026/ft1_filteredMKT_4FGL_J1059.5+2057_daily_bin411.fits evtable="EVENTS" outfile="/scratch/kocevski/412026/ft1_filtered_4FGL_J1059.5+2057_daily_bin411.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.34
sys 0.15

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/412026/ft1_filtered_4FGL_J1059.5+2057_daily_bin411.fits" evtable="EVENTS" scfile=/scratch/kocevski/412026/ft2_4FGL_J1059.5+2057_daily_bin411.fits sctable="SC_DATA" outfile=/scratch/kocevski/412026/ltcube_345859201_346118401_4FGL_J1059.5+2057_daily_bin411.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/412026/ft2_4FGL_J1059.5+2057_daily_bin411.fits
.....................!
real 15.86
user 15.38
sys 0.37

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/412026/ft1_filtered_4FGL_J1059.5+2057_daily_bin411.fits evtable="EVENTS" scfile=/scratch/kocevski/412026/ft2_4FGL_J1059.5+2057_daily_bin411.fits sctable="SC_DATA" expcube=/scratch/kocevski/412026/ltcube_345859201_346118401_4FGL_J1059.5+2057_daily_bin411.fits outfile=/scratch/kocevski/412026/expmap_345859201_346118401_4FGL_J1059.5+2057_daily_bin411.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/412026/ltcube_345859201_346118401_4FGL_J1059.5+2057_daily_bin411.fits
.....................!
real 191.88
user 186.26
sys 4.39

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

Setting source of interest to:
4FGL J1059.5+2057 @ 164.878 20.9524

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/412026/ft1_filtered_4FGL_J1059.5+2057_daily_bin411.fits scfile=/scratch/kocevski/412026/ft2_4FGL_J1059.5+2057_daily_bin411.fits outfile=/scratch/kocevski/412026/cmap_345859201_346118401_4FGL_J1059.5+2057_daily_bin411.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=164.878 yref=20.9524 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.69
user 0.39
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/412026/ft1_filtered_4FGL_J1059.5+2057_daily_bin411.fits scfile=/scratch/kocevski/412026/ft2_4FGL_J1059.5+2057_daily_bin411.fits outfile=/scratch/kocevski/412026/cmap_HighResolution_345859201_346118401_4FGL_J1059.5+2057_daily_bin411.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=164.878 yref=20.9524 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.79
user 0.39
sys 0.16

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/412026/ft1_filtered_4FGL_J1059.5+2057_daily_bin411.fits evtable="EVENTS" scfile=/scratch/kocevski/412026/ft2_4FGL_J1059.5+2057_daily_bin411.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/412026/Model_4FGL_J1059.5+2057_daily_bin411.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/412026/ft1_filtered_4FGL_J1059.5+2057_daily_bin411.fits.....................!
real 54.38
user 51.92
sys 1.21

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/412026/ft1_filtered_4FGL_J1059.5+2057_daily_bin411.fits', '/scratch/kocevski/412026/ft2_4FGL_J1059.5+2057_daily_bin411.fits', expMap='/scratch/kocevski/412026/expmap_345859201_346118401_4FGL_J1059.5+2057_daily_bin411.fits', expCube='/scratch/kocevski/412026/ltcube_345859201_346118401_4FGL_J1059.5+2057_daily_bin411.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/412026/Model_4FGL_J1059.5+2057_daily_bin411.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1059.5+2057'

4FGL J1059.5+2057
   Spectrum: PowerLaw
250    Prefactor:  2.435e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-13)
251        Index:  2.415e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
252        Scale:  1.122e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/412026/ft1_filtered_4FGL_J1059.5+2057_daily_bin411.fits
Spacecraft file(s): /scratch/kocevski/412026/ft2_4FGL_J1059.5+2057_daily_bin411.fits
Exposure map: /scratch/kocevski/412026/expmap_345859201_346118401_4FGL_J1059.5+2057_daily_bin411.fits
Exposure cube: /scratch/kocevski/412026/ltcube_345859201_346118401_4FGL_J1059.5+2057_daily_bin411.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/412026/Model_4FGL_J1059.5+2057_daily_bin411.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) = 5551.44304841

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    5.8933       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    2.8749       1.0000         .10000E-03   10000.    
     4 'Prefactor '    1.1901       1.0000         .10000E-03   10000.    
     5 'Prefactor '    14.949       1.0000         .10000E-03   10000.    
     6 'Prefactor '    1.6702       1.0000         .10000E-03   10000.    
     7 'Prefactor '    5.4135       1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10030E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    10 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .53974       1.0000         .10000E-03   10000.    
    12 'Prefactor '    2.5105       1.0000         .10000E-03   10000.    
    13 'norm      '    10.202       1.0000         .10000E-03   10000.    
    14 'norm      '    .10004E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    6.5524       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .19937E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10016E-03   1.0000         .10000E-03   10000.    
    19 'Normalizat'    1.3527       1.0000         .10000E-01   10.000    
    20 'Prefactor '    .60112       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5780E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   5550.782     FROM MIGRAD    STATUS=CONVERGED    406 CALLS     1752 TOTAL
                     EDM=   .11E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .7%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          5.8941        5.6895       -.43555E-07   -.33025E-05
   2  Prefactor     .10000E-03    11.865       -.57325E-05** at limit **
   3  Prefactor     2.8755        2.0878        .27015E-06   -.12840E-02
   4  Prefactor     1.1906        2.5994       -.28190E-06   -.75131E-04
   5  Prefactor     14.954        8.9029       -.34135E-06    .10633E-04
   6  Prefactor     1.6790        11.600       -.11324E-05   -.34576E-04
   7  Prefactor     5.4139        5.8611        .57065E-06    .72266E-04
   8  Prefactor     .10000E-03    8.1182       -.16154E-05** at limit **
   9  Prefactor     .10000E-03    10.113       -.15562E-05** at limit **
  10  norm          .10000E-03    .46103       -.14834E-07** at limit **
  11  Prefactor     .53961        2.7300       -.11884E-06   -.12137E-03
  12  Prefactor     2.5139        7.6978        .11553E-07   -.35841E-04
  13  norm          10.205        10.518       -.11720E-05   -.29686E-04
  14  norm          .10000E-03    6.0911       -.10220E-06** at limit **
  15  Prefactor     6.5545        10.164       -.61151E-06   -.22589E-04
  16  Prefactor     .10000E-03    45.786       -.10716E-05** at limit **
  17  Prefactor     .10000E-03    9.2199        .45095E-05** at limit **
  18  Prefactor     .10000E-03    13.022        .46605E-05** at limit **
  19  Normalizat    1.3525        .18308        .43624E-06    .49139E-04
  20  Prefactor     .60118        .17880        .23000E-06    .38533E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 5.89409
  Prefactor  = 0.0001
  Prefactor  = 2.87554
  Prefactor  = 1.19056
  Prefactor  = 14.9539
  Prefactor  = 1.67899
  Prefactor  = 5.41389
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.53961
  Prefactor  = 2.5139
  norm       = 10.2054
  norm       = 0.0001
  Prefactor  = 6.55455
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Normalizat = 1.35246
  Prefactor  = 0.601183
 **********
 **   18 **HESSE 
 **********

 FCN=   5550.782     FROM HESSE     STATUS=OK           293 CALLS     2045 TOTAL
                     EDM=   .21E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          5.8941        5.6860        .16542E-03   -1.5222    
   2  Prefactor     .10000E-03    11.888        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     2.8755        6.0378        .11986E-02   -1.5369    
   4  Prefactor     1.1906        2.5857        .15934E-03   -1.5490    
   5  Prefactor     14.954        8.9297        .10359E-03   -1.4934    
   6  Prefactor     1.6790        11.207        .32620E-03   -1.5449    
   7  Prefactor     5.4139        5.8308        .17271E-03   -1.5243    
   8  Prefactor     .10000E-03    8.1603        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .10000E-03    10.170        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          .10000E-03    .47433        .98686E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .53961        2.8417        .23103E-03   -1.5561    
  12  Prefactor     2.5139        7.6633        .25788E-03   -1.5391    
  13  norm          10.205        10.528        .12545E-03   -1.5069    
  14  norm          .10000E-03    6.1460        .17954E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     6.5545        10.111        .15678E-03   -1.5196    
  16  Prefactor     .10000E-03    46.950        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     .10000E-03    9.2371        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10000E-03    13.095        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Normalizat    1.3525        .20729        .20086E-03   -.82014    
  20  Prefactor     .60118        .20122        .30320E-03   -1.0754    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.05784e-09
Minuit parameter uncertainties:
  1  5.68652
  2  2.28746e-05
  3  6.03903
  4  2.58597
  5  8.93049
  6  8.67776
  7  5.83141
  8  2.13924e-06
  9  6.35513e-06
  10  4.70248e-07
  11  2.47658
  12  7.66628
  13  10.5294
  14  3.62682e-06
  15  10.1133
  16  3.3016e-05
  17  1.72598e-05
  18  1.06588e-05
  19  0.207423
  20  0.20146
Done.

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

Extracting fit parameters...

4FGL J1059.5+2057
   Spectrum: PowerLaw
250    Prefactor:  1.000e-04  6.355e-06  1.000e-04  1.000e+04 ( 1.000e-13)
251        Index:  2.415e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
252        Scale:  1.122e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
575    Prefactor:  6.012e-01  2.015e-01  0.000e+00  1.000e+01 ( 1.000e+00)
576        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
577        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
574   Normalization:  1.352e+00  2.074e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 164.878 20.952
Photon Flux Upper Limit: 6.37e-08 ph cm-2 s-1
Energy Flux Upper Limit: 4.93e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/412026/likelihoodResults_345859201_346118401_4FGL_J1059.5+2057_daily_bin411.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) = 5550.78272184
delta logL = -0.000468528737656

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 5550.78225341
delta logL = -9.4939423434e-08

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   5550.782     FROM MIGRAD    STATUS=CONVERGED     53 CALLS      207 TOTAL
                     EDM=   .19E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    12.338        .90712E-02** at limit **
   2  Index         2.4262        8.7781        .50000       -.46658E-05
   3  Normalizat    1.3525        .46540E-02    .31927E-01    .17772E-05
   4  Prefactor     .60118        .49013E-02    .68509E-01    .27820E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 2.42621
  Normalizat = 1.35246
  Prefactor  = 0.601183
 **********
 **   18 **HESSE 
 **********

 FCN=   5550.782     FROM HESSE     STATUS=NOT POSDEF    33 CALLS      240 TOTAL
                     EDM=   .15E-06    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    97.674        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.4262        5.4425        .50000       -.54073    
   3  Normalizat    1.3525        .13155E-01    .20086E-03   -.82014    
   4  Prefactor     .60118        .13826E-01    .30320E-03   -1.0754    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 1.47692e-07
Minuit parameter uncertainties:
  1  4.40455e-05
  2  351.098
  3  0.013155
  4  0.0138261
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/412026': 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) = 5550.7822533
delta logL = 1.28084138851e-08

Extracting fit parameters...

4FGL J1059.5+2057
   Spectrum: PowerLaw
250    Prefactor:  1.000e-04  4.405e-05  1.000e-04  1.000e+04 ( 1.000e-13)
251        Index:  2.426e+00  3.511e+02  0.000e+00  1.000e+01 (-1.000e+00)
252        Scale:  1.122e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
575    Prefactor:  6.012e-01  1.383e-02  0.000e+00  1.000e+01 ( 1.000e+00)
576        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
577        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
574   Normalization:  1.352e+00  1.316e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 164.878 20.952

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/412026/cmap_HighResolution_345859201_346118401_4FGL_J1059.5+2057_daily_bin411.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='4.93e-03', job_status='DONE', photon_flux_upper_limit='6.37e-08', time_completed='2021-09-03 02:47:01.998872', job_id='412026', GAL2='0.60', fit_tolerance='1e-08', EG2='1.35', EG='1.35', time_epoch_completed='1630662422.0', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.60', dlogl='1.28e-08', ts2='-0.00', photon_index_error='0.00', photon_index='2.41' WHERE bin_id='411' AND source_name='4FGL J1059.5+2057' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Fri Sep  3 02:47:02 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0047>
Subject: Job 412026: <4FGL_J1059.5+2057_daily_bin411> in cluster <slac> Done

Job <4FGL_J1059.5+2057_daily_bin411> was submitted from host <rhel6-64d> by user <kocevski> in cluster <slac> at Fri Sep  3 02:36:54 2021
Job was executed on host(s) <bullet0047>, in queue <medium>, as user <kocevski> in cluster <slac> at Fri Sep  3 02:37:04 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Fri Sep  3 02:37:04 2021
Terminated at Fri Sep  3 02:47:02 2021
Results reported at Fri Sep  3 02:47:02 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1059.5+2057_daily_bin411 164.878 20.9524 345859201 346118401 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1059.5+2057 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   572.28 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             328.19 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   600 sec.
    Turnaround time :                            608 sec.

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

