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


Performing analysis on: 4FGL_J1059.5+2057_daily_bin609
RA = 164.878, Dec = 20.9524
tmin = 397180801, tmax = 397440001
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='413756', job_status='RUN', time_executed='2021-09-03 02:43:12.591571', time_epoch_executed='1630662192.59' WHERE source_name='4FGL J1059.5+2057' and cadence='daily' and bin_id='609'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/413756

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

Retrieving the FT1 file...

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

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

Retrieving 41 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/413756/ft1_4FGL_J1059.5+2057_daily_bin609.fits


Retrieving the FT1 file...

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

Retrieving 41 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/413756/ft2_4FGL_J1059.5+2057_daily_bin609.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/413756/ft1_4FGL_J1059.5+2057_daily_bin609.fits outfile=/scratch/kocevski/413756/ft1_filteredMKT_4FGL_J1059.5+2057_daily_bin609.fits ra=164.878 dec=20.9524 rad=12.0 tmin=397180801.0 tmax=397440001.0 emin=100.0 emax=100000.0 zmin=0.0 zmax=90.0 evclass=128 evtype="INDEF" convtype=-1 phasemin=0.0 phasemax=1.0 evtable="EVENTS" chatter=2 clobber=yes debug=no gui=no mode="ql"

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

Done.
real 4.08
user 3.76
sys 0.24

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/413756/ft2_4FGL_J1059.5+2057_daily_bin609.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/413756/ft1_filteredMKT_4FGL_J1059.5+2057_daily_bin609.fits evtable="EVENTS" outfile="/scratch/kocevski/413756/ft1_filtered_4FGL_J1059.5+2057_daily_bin609.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.53
user 0.33
sys 0.16

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/413756/ft1_filtered_4FGL_J1059.5+2057_daily_bin609.fits" evtable="EVENTS" scfile=/scratch/kocevski/413756/ft2_4FGL_J1059.5+2057_daily_bin609.fits sctable="SC_DATA" outfile=/scratch/kocevski/413756/ltcube_397180801_397440001_4FGL_J1059.5+2057_daily_bin609.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/413756/ft2_4FGL_J1059.5+2057_daily_bin609.fits
.....................!
real 14.53
user 14.11
sys 0.36

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/413756/ft1_filtered_4FGL_J1059.5+2057_daily_bin609.fits evtable="EVENTS" scfile=/scratch/kocevski/413756/ft2_4FGL_J1059.5+2057_daily_bin609.fits sctable="SC_DATA" expcube=/scratch/kocevski/413756/ltcube_397180801_397440001_4FGL_J1059.5+2057_daily_bin609.fits outfile=/scratch/kocevski/413756/expmap_397180801_397440001_4FGL_J1059.5+2057_daily_bin609.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/413756/ltcube_397180801_397440001_4FGL_J1059.5+2057_daily_bin609.fits
.....................!
real 192.68
user 186.71
sys 5.22

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/413756/ft1_filtered_4FGL_J1059.5+2057_daily_bin609.fits scfile=/scratch/kocevski/413756/ft2_4FGL_J1059.5+2057_daily_bin609.fits outfile=/scratch/kocevski/413756/cmap_397180801_397440001_4FGL_J1059.5+2057_daily_bin609.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 1.48
user 0.41
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/413756/ft1_filtered_4FGL_J1059.5+2057_daily_bin609.fits scfile=/scratch/kocevski/413756/ft2_4FGL_J1059.5+2057_daily_bin609.fits outfile=/scratch/kocevski/413756/cmap_HighResolution_397180801_397440001_4FGL_J1059.5+2057_daily_bin609.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 1.64
user 0.43
sys 0.16

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

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/413756/ft1_filtered_4FGL_J1059.5+2057_daily_bin609.fits', '/scratch/kocevski/413756/ft2_4FGL_J1059.5+2057_daily_bin609.fits', expMap='/scratch/kocevski/413756/expmap_397180801_397440001_4FGL_J1059.5+2057_daily_bin609.fits', expCube='/scratch/kocevski/413756/ltcube_397180801_397440001_4FGL_J1059.5+2057_daily_bin609.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/413756/Model_4FGL_J1059.5+2057_daily_bin609.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/413756/ft1_filtered_4FGL_J1059.5+2057_daily_bin609.fits
Spacecraft file(s): /scratch/kocevski/413756/ft2_4FGL_J1059.5+2057_daily_bin609.fits
Exposure map: /scratch/kocevski/413756/expmap_397180801_397440001_4FGL_J1059.5+2057_daily_bin609.fits
Exposure cube: /scratch/kocevski/413756/ltcube_397180801_397440001_4FGL_J1059.5+2057_daily_bin609.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/413756/Model_4FGL_J1059.5+2057_daily_bin609.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) = 4452.35768055

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .10003E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10049E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    6.8330       1.0000         .10000E-03   10000.    
     4 'Prefactor '    2.5864       1.0000         .10000E-03   10000.    
     5 'Prefactor '    2.7663       1.0000         .10000E-03   10000.    
     6 'Prefactor '    3.4725       1.0000         .10000E-03   10000.    
     7 'Prefactor '    8.5388       1.0000         .10000E-03   10000.    
     8 'Prefactor '    .36633E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    21.071       1.0000         .10000E-03   10000.    
    10 'norm      '    .32787       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .31381       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .10009E-03   1.0000         .10000E-03   10000.    
    14 'norm      '    2.5001       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    29.460       1.0000         .10000E-03   10000.    
    17 'Prefactor '    .99859       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    19 'Normalizat'    1.0306       1.0000         .10000E-01   10.000    
    20 'Prefactor '    1.0440       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.
 MACHINE ACCURACY LIMITS FURTHER IMPROVEMENT.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   4452.333     FROM MIGRAD    STATUS=CONVERGED    434 CALLS     1811 TOTAL
                     EDM=   .48E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .10000E-03    4.3592         .0000    ** at limit **
   2  Prefactor     .10000E-03    40.278         .0000    ** at limit **
   3  Prefactor     6.8325        8.6601         .0000       -.73687E-03
   4  Prefactor     2.5860        2.4859         .0000        .36706E-03
   5  Prefactor     2.7656        5.8409         .0000        .47616E-03
   6  Prefactor     3.4702        8.9415         .0000        .61548E-02
   7  Prefactor     8.5363        16.787         .0000       -.34203E-03
   8  Prefactor     .10000E-03    6.7082         .0000    ** at limit **
   9  Prefactor     21.068        22.029         .0000        .20202E-03
  10  norm          .32736        1.2426         .0000        .92902E-03
  11  Prefactor     .31329        1.8771         .0000        .90990E-03
  12  Prefactor     .10000E-03    2.5137         .0000    ** at limit **
  13  norm          .10000E-03    7.8312         .0000    ** at limit **
  14  norm          2.4985        12.045         .0000        .22091E-03
  15  Prefactor     .10000E-03    3.2336         .0000    ** at limit **
  16  Prefactor     29.459        21.411         .0000        .61199E-03
  17  Prefactor     .88834        27.614         .0000        .20110E-03
  18  Prefactor     .10000E-03    5.8674         .0000    ** at limit **
  19  Normalizat    1.0307        .20629         .0000       -.33606E-04
  20  Prefactor     1.0441        .21156         .0000       -.70085E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 6.83247
  Prefactor  = 2.58601
  Prefactor  = 2.76555
  Prefactor  = 3.47021
  Prefactor  = 8.53632
  Prefactor  = 0.000100001
  Prefactor  = 21.0675
  norm       = 0.327363
  Prefactor  = 0.313292
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 2.49847
  Prefactor  = 0.0001
  Prefactor  = 29.4595
  Prefactor  = 0.888343
  Prefactor  = 0.0001
  Normalizat = 1.03066
  Prefactor  = 1.04407
 **********
 **   18 **HESSE 
 **********

 FCN=   4452.333     FROM HESSE     STATUS=OK           303 CALLS     2114 TOTAL
                     EDM=   .33E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .10000E-03    4.4067        .13605E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    40.459        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     6.8325        8.6437        .15349E-03   -1.5185    
   4  Prefactor     2.5860        2.4701        .97104E-04   -1.5386    
   5  Prefactor     2.7656        5.8056        .22364E-03   -1.5375    
   6  Prefactor     3.4702        8.8296        .10850E-02   -1.5335    
   7  Prefactor     8.5363        16.606        .13718E-03   -1.5124    
   8  Prefactor     .10000E-03    16.571        .33266E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     21.068        21.976        .87257E-04   -1.4790    
  10  norm          .32736        1.7821        .13407E-02   -1.5594    
  11  Prefactor     .31329        3.0606        .17269E-02   -1.5596    
  12  Prefactor     .10000E-03    2.5173        .10331E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .10000E-03    7.8740        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          2.4985        12.072        .25846E-03   -1.5392    
  15  Prefactor     .10000E-03    3.2371        .11718E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     29.459        21.412        .73815E-04   -1.4622    
  17  Prefactor     .88834        198.60        .67269E-02   -1.5519    
  18  Prefactor     .10000E-03    5.8787        .15785E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Normalizat    1.0307        .23489        .23185E-03   -.92010    
  20  Prefactor     1.0441        .24402        .25375E-03   -.91275    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.30634e-08
Minuit parameter uncertainties:
  1  1.41904e-05
  2  0.000189492
  3  8.64526
  4  2.47021
  5  5.80683
  6  8.83293
  7  16.6154
  8  0.000182106
  9  21.9845
  10  1.52746
  11  1.95824
  12  6.91906e-06
  13  2.84248e-05
  14  10.9873
  15  1.22445e-05
  16  21.4179
  17  26.6533
  18  1.48985e-05
  19  0.235124
  20  0.244283
Done.

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

Extracting fit parameters...

4FGL J1059.5+2057
   Spectrum: PowerLaw
250    Prefactor:  2.107e+01  2.198e+01  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:  1.044e+00  2.443e-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.031e+00  2.351e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 1.55
Ra Dec: 164.878 20.952
Photon Index (Fixed Index): 2.41 +/- 0.00
Photon Flux (Fixed Index): 5.12e-08 +/- 5.33e-08
Energy Flux (Fixed Index): 1.64e-05 +/- 1.72e-05

TS (Fixed Index): 1.55
Ra Dec: 164.878 20.952
Photon Flux Upper Limit: 1.49e-07 ph cm-2 s-1
Energy Flux Upper Limit: 1.16e-02 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/413756/likelihoodResults_397180801_397440001_4FGL_J1059.5+2057_daily_bin609.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) = 4451.91139871
delta logL = 0.421499477152

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 4451.90707847
delta logL = 0.425819718702

Fit tolerance = 1e-08

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

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

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   4451.907     FROM MIGRAD    STATUS=CONVERGED     90 CALLS      287 TOTAL
                     EDM=   .87E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     8.3633        23.864        .13342E-03   -.66070E-03
   2  Index         3.1718        1.4711        .42767E-02   -.90759E-04
   3  Normalizat    .98879        .22876        .23594E-03    .14373E-03
   4  Prefactor     1.0748        .24698        .25068E-03   -.34013E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 8.36329
  Index      = 3.17175
  Normalizat = 0.98879
  Prefactor  = 1.07481
 **********
 **   18 **HESSE 
 **********

 FCN=   4451.907     FROM HESSE     STATUS=OK            25 CALLS      312 TOTAL
                     EDM=   .48E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     8.3633        15.359        .53369E-05   -1.5129    
   2  Index         3.1718        .95453        .17107E-03   -.37433    
   3  Normalizat    .98879        .22762        .94378E-05   -.93407    
   4  Prefactor     1.0748        .24552        .10027E-04   -.90276    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.7653e-10
Minuit parameter uncertainties:
  1  15.3661
  2  0.961355
  3  0.227848
  4  0.245779
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/413756': 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) = 4451.90707833
delta logL = 0.425819858298

Extracting fit parameters...

4FGL J1059.5+2057
   Spectrum: PowerLaw
250    Prefactor:  8.363e+00  1.537e+01  1.000e-04  1.000e+04 ( 1.000e-13)
251        Index:  3.172e+00  9.614e-01  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:  1.075e+00  2.458e-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:  9.888e-01  2.278e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 2.50
Ra Dec: 164.878 20.952
Photon Index (Free Index): 3.17 +/- 0.96
Photon Flux (Free Index): 8.26e-08 +/- 6.36e-08
Energy Flux (Free Index): 1.53e-05 +/- 1.17e-05

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/413756/cmap_HighResolution_397180801_397440001_4FGL_J1059.5+2057_daily_bin609.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.16e-02', comment='SUCCESS', photon_flux='5.12e-08', energy_flux2='1.53e-05', photon_flux_error='5.33e-08', dlogl='4.26e-01', energy_flux='1.64e-05', photon_flux2='8.26e-08', job_status='DONE', time_completed='2021-09-03 02:52:21.795074', photon_index_error2='0.96', photon_index2='3.17', ts='1.55', fit_tolerance='1e-08', GAL='1.04', photon_index_error='0.00', photon_flux_upper_limit='1.49e-07', energy_flux_error2='1.17e-05', EG='1.03', time_epoch_completed='1630662741.8', return_code='0', job_id='413756', GAL2='1.07', EG2='0.99', return_code2='0', energy_flux_error='1.72e-05', photon_flux_error2='6.36e-08', ts2='2.50', photon_index='2.41' WHERE bin_id='609' AND source_name='4FGL J1059.5+2057' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Fri Sep  3 02:52:21 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0080>
Subject: Job 413756: <4FGL_J1059.5+2057_daily_bin609> in cluster <slac> Done

Job <4FGL_J1059.5+2057_daily_bin609> was submitted from host <rhel6-64d> by user <kocevski> in cluster <slac> at Fri Sep  3 02:41:41 2021
Job was executed on host(s) <bullet0080>, in queue <medium>, as user <kocevski> in cluster <slac> at Fri Sep  3 02:42:57 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:42:57 2021
Terminated at Fri Sep  3 02:52:22 2021
Results reported at Fri Sep  3 02:52:22 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1059.5+2057_daily_bin609 164.878 20.9524 397180801 397440001 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 :                                   538.24 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             328.05 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   565 sec.
    Turnaround time :                            641 sec.

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

