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


Performing analysis on: 4FGL_J1051.6+2109_daily_bin243
RA = 162.913, Dec = 21.1651
tmin = 302313601, tmax = 302572801
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='251674', job_status='RUN', time_executed='2021-09-02 18:31:07.521629', time_epoch_executed='1630632667.52' WHERE source_name='4FGL J1051.6+2109' and cadence='daily' and bin_id='243'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/251674

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/251674/ft1_4FGL_J1051.6+2109_daily_bin243.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/251674/ft2_4FGL_J1051.6+2109_daily_bin243.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/251674/ft1_4FGL_J1051.6+2109_daily_bin243.fits outfile=/scratch/kocevski/251674/ft1_filteredMKT_4FGL_J1051.6+2109_daily_bin243.fits ra=162.913 dec=21.1651 rad=12.0 tmin=302313601.0 tmax=302572801.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.57
user 3.34
sys 0.19

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/251674/ft2_4FGL_J1051.6+2109_daily_bin243.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/251674/ft2_4FGL_J1051.6+2109_daily_bin243.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/251674/ft1_filteredMKT_4FGL_J1051.6+2109_daily_bin243.fits evtable="EVENTS" outfile="/scratch/kocevski/251674/ft1_filtered_4FGL_J1051.6+2109_daily_bin243.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.36
sys 0.15

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/251674/ft1_filtered_4FGL_J1051.6+2109_daily_bin243.fits" evtable="EVENTS" scfile=/scratch/kocevski/251674/ft2_4FGL_J1051.6+2109_daily_bin243.fits sctable="SC_DATA" outfile=/scratch/kocevski/251674/ltcube_302313601_302572801_4FGL_J1051.6+2109_daily_bin243.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/251674/ft2_4FGL_J1051.6+2109_daily_bin243.fits
.....................!
real 15.08
user 14.73
sys 0.30

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/251674/ft1_filtered_4FGL_J1051.6+2109_daily_bin243.fits evtable="EVENTS" scfile=/scratch/kocevski/251674/ft2_4FGL_J1051.6+2109_daily_bin243.fits sctable="SC_DATA" expcube=/scratch/kocevski/251674/ltcube_302313601_302572801_4FGL_J1051.6+2109_daily_bin243.fits outfile=/scratch/kocevski/251674/expmap_302313601_302572801_4FGL_J1051.6+2109_daily_bin243.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/251674/ltcube_302313601_302572801_4FGL_J1051.6+2109_daily_bin243.fits
.....................!
real 192.14
user 186.67
sys 5.04

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 J1051.6+2109 @ 162.913 21.1651

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/251674/ft1_filtered_4FGL_J1051.6+2109_daily_bin243.fits scfile=/scratch/kocevski/251674/ft2_4FGL_J1051.6+2109_daily_bin243.fits outfile=/scratch/kocevski/251674/cmap_302313601_302572801_4FGL_J1051.6+2109_daily_bin243.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=162.913 yref=21.1651 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.61
user 0.40
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/251674/ft1_filtered_4FGL_J1051.6+2109_daily_bin243.fits scfile=/scratch/kocevski/251674/ft2_4FGL_J1051.6+2109_daily_bin243.fits outfile=/scratch/kocevski/251674/cmap_HighResolution_302313601_302572801_4FGL_J1051.6+2109_daily_bin243.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=162.913 yref=21.1651 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.58
user 0.39
sys 0.17

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/251674/ft1_filtered_4FGL_J1051.6+2109_daily_bin243.fits evtable="EVENTS" scfile=/scratch/kocevski/251674/ft2_4FGL_J1051.6+2109_daily_bin243.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/251674/Model_4FGL_J1051.6+2109_daily_bin243.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/251674/ft1_filtered_4FGL_J1051.6+2109_daily_bin243.fits.....................!
real 57.35
user 55.68
sys 1.33

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/251674/ft1_filtered_4FGL_J1051.6+2109_daily_bin243.fits', '/scratch/kocevski/251674/ft2_4FGL_J1051.6+2109_daily_bin243.fits', expMap='/scratch/kocevski/251674/expmap_302313601_302572801_4FGL_J1051.6+2109_daily_bin243.fits', expCube='/scratch/kocevski/251674/ltcube_302313601_302572801_4FGL_J1051.6+2109_daily_bin243.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/251674/Model_4FGL_J1051.6+2109_daily_bin243.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1051.6+2109'

4FGL J1051.6+2109
   Spectrum: PowerLaw
244    Prefactor:  1.594e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-12)
245        Index:  2.771e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
246        Scale:  5.065e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/251674/ft1_filtered_4FGL_J1051.6+2109_daily_bin243.fits
Spacecraft file(s): /scratch/kocevski/251674/ft2_4FGL_J1051.6+2109_daily_bin243.fits
Exposure map: /scratch/kocevski/251674/expmap_302313601_302572801_4FGL_J1051.6+2109_daily_bin243.fits
Exposure cube: /scratch/kocevski/251674/ltcube_302313601_302572801_4FGL_J1051.6+2109_daily_bin243.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/251674/Model_4FGL_J1051.6+2109_daily_bin243.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) = 6116.01991717

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    49.603       1.0000         .10000E-03   10000.    
     2 'Prefactor '    34.107       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    6.5575       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .40928E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    14.864       1.0000         .10000E-03   10000.    
     7 'Prefactor '    3.8417       1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    21.570       1.0000         .10000E-03   10000.    
    10 'Prefactor '    9.0279       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10033E-03   1.0000         .10000E-03   10000.    
    12 'norm      '    .28680E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    .31892E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    3.5716       1.0000         .10000E-03   10000.    
    15 'norm      '    .58289       1.0000         .10000E-03   10000.    
    16 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    19 'Normalizat'    1.0484       1.0000         .10000E-01   10.000    
    20 'Prefactor '    1.0630       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5760E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   6115.976     FROM MIGRAD    STATUS=CONVERGED    443 CALLS     2085 TOTAL
                     EDM=   .12E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  6.1%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          49.600        13.221        .59855E-07   -.52687E-04
   2  Prefactor     34.091        39.057        .19780E-05   -.14285E-03
   3  Prefactor     .10000E-03    59.561        .98441E-06** at limit **
   4  Prefactor     6.5524        8.5548        .11554E-05    .42628E-03
   5  Prefactor     .10001E-03    1.2747        .36877E-06** at limit **
   6  Prefactor     14.865        10.094        .81968E-07   -.18423E-03
   7  Prefactor     3.8422        10.952        .62087E-05    .59313E-03
   8  Prefactor     .10000E-03    24.629        .13147E-07** at limit **
   9  Prefactor     21.569        12.496       -.10652E-05   -.18479E-03
  10  Prefactor     9.0345        14.125        .43479E-06    .28835E-05
  11  Prefactor     .10000E-03    19.067        .50715E-06** at limit **
  12  norm          .10000E-03    .67829        .77028E-07** at limit **
  13  Prefactor     .10000E-03    1.8321       -.51342E-06** at limit **
  14  Prefactor     3.5712        4.3448        .11215E-06    .86017E-04
  15  norm          .49463        15.779        .66357E-05   -.63450E-03
  16  norm          .10000E-03    3.8650        .34102E-07** at limit **
  17  Prefactor     .10000E-03    11.639       -.29365E-06** at limit **
  18  Prefactor     .10000E-03    11.049        .65618E-06** at limit **
  19  Normalizat    1.0482        .19669       -.20509E-05   -.24382E-03
  20  Prefactor     1.0633        .18924        .15043E-06   -.30604E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 49.5997
  Prefactor  = 34.0907
  Prefactor  = 0.0001
  Prefactor  = 6.55237
  Prefactor  = 0.000100008
  Prefactor  = 14.8651
  Prefactor  = 3.84222
  Prefactor  = 0.0001
  Prefactor  = 21.5691
  Prefactor  = 9.03451
  Prefactor  = 0.0001
  norm       = 0.000100002
  Prefactor  = 0.0001
  Prefactor  = 3.57125
  norm       = 0.494629
  norm       = 0.0001
  Prefactor  = 0.000100001
  Prefactor  = 0.0001
  Normalizat = 1.04825
  Prefactor  = 1.06333
 **********
 **   18 **HESSE 
 **********

 FCN=   6115.976     FROM HESSE     STATUS=OK           291 CALLS     2376 TOTAL
                     EDM=   .14E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          49.600        13.221        .56939E-04   -1.4298    
   2  Prefactor     34.091        39.396        .68617E-04   -1.4540    
   3  Prefactor     .10000E-03    59.876        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     6.5524        8.4551        .78357E-03   -1.5196    
   5  Prefactor     .10001E-03    10.399        .16310E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     14.865        10.093        .10389E-03   -1.4937    
   7  Prefactor     3.8422        11.226        .10295E-02   -1.5316    
   8  Prefactor     .10000E-03    24.720        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     21.569        12.515        .86242E-04   -1.4779    
  10  Prefactor     9.0345        13.526        .13339E-03   -1.5107    
  11  Prefactor     .10000E-03    19.328        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm          .10000E-03    6.6581        .12213E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .10000E-03    7.2657        .19033E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     3.5712        4.3413        .17482E-03   -1.5330    
  15  norm          .49463        80.722        .39454E-02   -1.5567    
  16  norm          .10000E-03    3.8731        .15015E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     .10000E-03    11.856        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10000E-03    11.077        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Normalizat    1.0482        .23347        .25793E-03   -.91431    
  20  Prefactor     1.0633        .22985        .26613E-03   -.90647    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.37089e-08
Minuit parameter uncertainties:
  1  13.2213
  2  39.4264
  3  0.000224834
  4  8.45662
  5  0.000584433
  6  10.0942
  7  11.2318
  8  2.89508e-05
  9  12.5161
  10  13.5309
  11  5.101e-05
  12  0.000220193
  13  9.82423e-05
  14  4.34166
  15  12.6537
  16  6.186e-06
  17  0.000169727
  18  7.09549e-05
  19  0.233701
  20  0.230064
Done.

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

Extracting fit parameters...

4FGL J1051.6+2109
   Spectrum: PowerLaw
244    Prefactor:  3.842e+00  1.123e+01  1.000e-04  1.000e+04 ( 1.000e-12)
245        Index:  2.771e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
246        Scale:  5.065e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
573    Prefactor:  1.063e+00  2.301e-01  0.000e+00  1.000e+01 ( 1.000e+00)
574        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
575        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
572   Normalization:  1.048e+00  2.337e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.15
Ra Dec: 162.913 21.165
Photon Flux Upper Limit: 1.38e-07 ph cm-2 s-1
Energy Flux Upper Limit: 1.09e-02 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/251674/likelihoodResults_302313601_302572801_4FGL_J1051.6+2109_daily_bin243.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) = 6115.34462999
delta logL = 0.631357082285

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 6115.22853145
delta logL = 0.747455619441

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
 MIGRAD TERMINATED WITHOUT CONVERGENCE.

 FCN=   6115.229     FROM MIGRAD    STATUS=FAILED        82 CALLS      303 TOTAL
                     EDM=   .58E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .38595        12.945        .39515E-03   -.10038E-01
   2  Index         5.7579        7.8638        .67756E-02   -.59129E-03
   3  Normalizat    .95919        .16908        .26773E-03   -.52658E-03
   4  Prefactor     1.1310        .17090        .25912E-03   -.25167E-03
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   6115.229     FROM SIMPLEX   STATUS=UNCHANGED     87 CALLS      390 TOTAL
                     EDM=   .17E-04    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .38595        12.945        .10298E-03   -.10038E-01
   2  Index         5.7579        7.8638        .25003E-02   -.59129E-03
   3  Normalizat    .95919        .16908        .18494E-03   -.52658E-03
   4  Prefactor     1.1310        .17090        .94729E-04   -.25167E-03
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   6115.229     FROM MIGRAD    STATUS=CONVERGED     27 CALLS      417 TOTAL
                     EDM=   .27E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .38578        2.8119        .15806E-04   -.10340E-01
   2  Index         5.7582        3.3680        .27102E-03   -.45151E-03
   3  Normalizat    .95919        .23391        .53546E-04   -.51011E-03
   4  Prefactor     1.1310        .23625        .51824E-04   -.23082E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.385779
  Index      = 5.7582
  Normalizat = 0.959194
  Prefactor  = 1.131
 **********
 **   18 **HESSE 
 **********

 FCN=   6115.229     FROM HESSE     STATUS=OK            23 CALLS      440 TOTAL
                     EDM=   .27E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .38578        2.1227        .31612E-05   -1.5584    
   2  Index         5.7582        2.9965        .54204E-04    .15223    
   3  Normalizat    .95919        .23379        .10709E-04   -.94410    
   4  Prefactor     1.1310        .23631        .10365E-04   -.88482    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.7409e-09
Minuit parameter uncertainties:
  1  1.80973
  2  3.21946
  3  0.234043
  4  0.236526
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/251674': 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) = 6115.22852424
delta logL = 0.74746282393

Extracting fit parameters...

4FGL J1051.6+2109
   Spectrum: PowerLaw
244    Prefactor:  3.858e-01  1.810e+00  1.000e-04  1.000e+04 ( 1.000e-12)
245        Index:  5.758e+00  3.219e+00  0.000e+00  1.000e+01 (-1.000e+00)
246        Scale:  5.065e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
573    Prefactor:  1.131e+00  2.365e-01  0.000e+00  1.000e+01 ( 1.000e+00)
574        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
575        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
572   Normalization:  9.592e-01  2.340e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.83
Ra Dec: 162.913 21.165
Photon Index (Free Index): 5.76 +/- 3.22
Photon Flux (Free Index): 9.33e-08 +/- 8.08e-08
Energy Flux (Free Index): 1.18e-05 +/- 1.06e-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/251674/cmap_HighResolution_302313601_302572801_4FGL_J1051.6+2109_daily_bin243.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.09e-02', comment='SUCCESS', energy_flux2='1.18e-05', dlogl='7.47e-01', photon_flux2='9.33e-08', job_status='DONE', time_completed='2021-09-02 18:41:38.729065', photon_index_error2='3.22', photon_index2='5.76', ts='0.15', fit_tolerance='1e-08', GAL='1.06', photon_index_error='0.00', photon_flux_upper_limit='1.38e-07', energy_flux_error2='1.06e-05', EG='1.05', time_epoch_completed='1630633298.73', return_code='0', job_id='251674', GAL2='1.13', EG2='0.96', return_code2='0', photon_flux_error2='8.08e-08', ts2='1.83', photon_index='2.77' WHERE bin_id='243' AND source_name='4FGL J1051.6+2109' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 18:41:38 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0303>
Subject: Job 251674: <4FGL_J1051.6+2109_daily_bin243> in cluster <slac> Done

Job <4FGL_J1051.6+2109_daily_bin243> was submitted from host <rhel6-64o> by user <kocevski> in cluster <slac> at Thu Sep  2 18:26:24 2021
Job was executed on host(s) <bullet0303>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 18:27:24 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Thu Sep  2 18:27:24 2021
Terminated at Thu Sep  2 18:41:39 2021
Results reported at Thu Sep  2 18:41:39 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1051.6+2109_daily_bin243 162.913 21.1651 302313601 302572801 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1051.6+2109 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   628.22 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             255.37 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   855 sec.
    Turnaround time :                            915 sec.

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

