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


Performing analysis on: 4FGL_J0839.8+0105_daily_bin249
RA = 129.963, Dec = 1.0877
tmin = 303868801, tmax = 304128001
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='603023', job_status='RUN', time_executed='2021-08-30 02:59:04.838846', time_epoch_executed='1630317544.84' WHERE source_name='4FGL J0839.8+0105' and cadence='daily' and bin_id='249'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/603023

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/603023/ft1_4FGL_J0839.8+0105_daily_bin249.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/603023/ft2_4FGL_J0839.8+0105_daily_bin249.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/603023/ft1_4FGL_J0839.8+0105_daily_bin249.fits outfile=/scratch/kocevski/603023/ft1_filteredMKT_4FGL_J0839.8+0105_daily_bin249.fits ra=129.963 dec=1.0877 rad=12.0 tmin=303868801.0 tmax=304128001.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.07
user 3.17
sys 0.44

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/603023/ft2_4FGL_J0839.8+0105_daily_bin249.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/603023/ft2_4FGL_J0839.8+0105_daily_bin249.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/603023/ft1_filteredMKT_4FGL_J0839.8+0105_daily_bin249.fits evtable="EVENTS" outfile="/scratch/kocevski/603023/ft1_filtered_4FGL_J0839.8+0105_daily_bin249.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 1.23
user 0.34
sys 0.39

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/603023/ft1_filtered_4FGL_J0839.8+0105_daily_bin249.fits" evtable="EVENTS" scfile=/scratch/kocevski/603023/ft2_4FGL_J0839.8+0105_daily_bin249.fits sctable="SC_DATA" outfile=/scratch/kocevski/603023/ltcube_303868801_304128001_4FGL_J0839.8+0105_daily_bin249.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/603023/ft2_4FGL_J0839.8+0105_daily_bin249.fits
.....................!
real 12.98
user 12.07
sys 0.65

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/603023/ft1_filtered_4FGL_J0839.8+0105_daily_bin249.fits evtable="EVENTS" scfile=/scratch/kocevski/603023/ft2_4FGL_J0839.8+0105_daily_bin249.fits sctable="SC_DATA" expcube=/scratch/kocevski/603023/ltcube_303868801_304128001_4FGL_J0839.8+0105_daily_bin249.fits outfile=/scratch/kocevski/603023/expmap_303868801_304128001_4FGL_J0839.8+0105_daily_bin249.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/603023/ltcube_303868801_304128001_4FGL_J0839.8+0105_daily_bin249.fits
.....................!
real 190.58
user 185.02
sys 4.72

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

Setting source of interest to:
4FGL J0839.8+0105 @ 129.963 1.0877

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/603023/ft1_filtered_4FGL_J0839.8+0105_daily_bin249.fits scfile=/scratch/kocevski/603023/ft2_4FGL_J0839.8+0105_daily_bin249.fits outfile=/scratch/kocevski/603023/cmap_303868801_304128001_4FGL_J0839.8+0105_daily_bin249.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=129.963 yref=1.0877 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.15
user 0.37
sys 0.46

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/603023/ft1_filtered_4FGL_J0839.8+0105_daily_bin249.fits scfile=/scratch/kocevski/603023/ft2_4FGL_J0839.8+0105_daily_bin249.fits outfile=/scratch/kocevski/603023/cmap_HighResolution_303868801_304128001_4FGL_J0839.8+0105_daily_bin249.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=129.963 yref=1.0877 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.17
user 0.38
sys 0.39

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/603023/ft1_filtered_4FGL_J0839.8+0105_daily_bin249.fits evtable="EVENTS" scfile=/scratch/kocevski/603023/ft2_4FGL_J0839.8+0105_daily_bin249.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/603023/Model_4FGL_J0839.8+0105_daily_bin249.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/603023/ft1_filtered_4FGL_J0839.8+0105_daily_bin249.fits.....................!
real 82.81
user 77.99
sys 1.54

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/603023/ft1_filtered_4FGL_J0839.8+0105_daily_bin249.fits', '/scratch/kocevski/603023/ft2_4FGL_J0839.8+0105_daily_bin249.fits', expMap='/scratch/kocevski/603023/expmap_303868801_304128001_4FGL_J0839.8+0105_daily_bin249.fits', expCube='/scratch/kocevski/603023/ltcube_303868801_304128001_4FGL_J0839.8+0105_daily_bin249.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/603023/Model_4FGL_J0839.8+0105_daily_bin249.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J0839.8+0105'

4FGL J0839.8+0105
   Spectrum: LogParabola
295         norm:  3.335e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-12)
296        alpha:  2.241e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
297         beta:  1.924e-01  0.000e+00  0.000e+00  1.000e+01 ( 1.000e+00) fixed
298           Eb:  6.486e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/603023/ft1_filtered_4FGL_J0839.8+0105_daily_bin249.fits
Spacecraft file(s): /scratch/kocevski/603023/ft2_4FGL_J0839.8+0105_daily_bin249.fits
Exposure map: /scratch/kocevski/603023/expmap_303868801_304128001_4FGL_J0839.8+0105_daily_bin249.fits
Exposure cube: /scratch/kocevski/603023/ltcube_303868801_304128001_4FGL_J0839.8+0105_daily_bin249.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/603023/Model_4FGL_J0839.8+0105_daily_bin249.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) = 6836.71300981

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    18.830       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10540E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    .10148E-03   1.0000         .10000E-03   10000.    
     4 'norm      '    .10027E-03   1.0000         .10000E-03   10000.    
     5 'norm      '    9.1482       1.0000         .10000E-03   10000.    
     6 'norm      '    12.464       1.0000         .10000E-03   10000.    
     7 'norm      '    .10007E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10116E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    .10019E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .12498E-03   1.0000         .10000E-03   10000.    
    11 'norm      '    2.9387       1.0000         .10000E-03   10000.    
    12 'norm      '    .10020E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    6.8613       1.0000         .10000E-03   10000.    
    14 'norm      '    19.930       1.0000         .10000E-03   10000.    
    15 'norm      '    17.367       1.0000         .10000E-03   10000.    
    16 'Prefactor '    2.8452       1.0000         .10000E-03   10000.    
    17 'Prefactor '    4.3211       1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.4769       1.0000         .10000E-01   10.000    
    19 'Prefactor '    .62902       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5010E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   6836.633     FROM MIGRAD    STATUS=CONVERGED    384 CALLS     1907 TOTAL
                     EDM=   .29E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .5%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     18.831        9.2695       -.18456E-06    .47293E-05
   2  Prefactor     .10000E-03    22.287        .43519E-05** at limit **
   3  norm          .10000E-03    6.4341       -.12469E-06** at limit **
   4  norm          .10000E-03    .97683       -.10477E-07** at limit **
   5  norm          9.1485        2.2492       -.38917E-07   -.93696E-05
   6  norm          12.476        20.740        .50598E-05   -.11508E-04
   7  norm          .10000E-03    .92851       -.18473E-07** at limit **
   8  Prefactor     .10000E-03    19.340       -.99269E-05** at limit **
   9  norm          .10000E-03    17.083        .45901E-05** at limit **
  10  Prefactor     .10005E-03    10.104        .19061E-06** at limit **
  11  norm          2.9382        1.4852       -.18565E-06   -.33062E-03
  12  norm          .10000E-03    3.4019       -.13879E-07** at limit **
  13  Prefactor     6.8648        15.641       -.87964E-06   -.30427E-04
  14  norm          19.926        6.5868       -.27442E-07    .20003E-03
  15  norm          17.367        9.8869        .32092E-05    .51170E-03
  16  Prefactor     2.8121        67.062       -.82071E-04   -.29630E-04
  17  Prefactor     4.3201        5.3710        .20634E-05   -.35559E-03
  18  Normalizat    1.4772        .20840        .18030E-05    .14923E-03
  19  Prefactor     .62877        .14263       -.12247E-06    .21468E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 18.8308
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 0.0001
  norm       = 9.14849
  norm       = 12.4759
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.000100046
  norm       = 2.93821
  norm       = 0.0001
  Prefactor  = 6.8648
  norm       = 19.9264
  norm       = 17.3666
  Prefactor  = 2.81208
  Prefactor  = 4.32012
  Normalizat = 1.4772
  Prefactor  = 0.628769
 **********
 **   18 **HESSE 
 **********

 FCN=   6836.633     FROM HESSE     STATUS=OK           270 CALLS     2177 TOTAL
                     EDM=   .12E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     18.831        9.2658        .92299E-04   -1.4840    
   2  Prefactor     .10000E-03    22.290        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .10000E-03    6.4801        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  norm          .10000E-03    .98660        .79728E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          9.1485        2.2486        .59019E-04   -1.5103    
   6  norm          12.476        20.722        .11346E-03   -1.5001    
   7  norm          .10000E-03    .92999        .77801E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    19.380        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          .10000E-03    17.094        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10005E-03    54.036        .50599E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  norm          2.9382        1.4898        .66814E-04   -1.5365    
  12  norm          .10000E-03    3.4155        .14891E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     6.8648        15.645        .15317E-03   -1.5184    
  14  norm          19.926        6.5988        .89717E-04   -1.4815    
  15  norm          17.367        9.8978        .96106E-04   -1.4874    
  16  Prefactor     2.8121        68.332        .24105E-03   -1.5373    
  17  Prefactor     4.3201        5.3547        .19379E-03   -1.5292    
  18  Normalizat    1.4772        .24649        .26135E-03   -.78421    
  19  Prefactor     .62877        .16778        .27336E-03   -1.0639    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.22032e-09
Minuit parameter uncertainties:
  1  9.26655
  2  0.000184979
  3  1.39974e-05
  4  9.80609e-07
  5  2.24861
  6  20.7335
  7  2.41281e-06
  8  6.95673e-05
  9  7.33759e-06
  10  0.00314656
  11  1.48981
  12  4.17205e-06
  13  15.6542
  14  6.59901
  15  9.89873
  16  27.7591
  17  5.35532
  18  0.246686
  19  0.167912
Done.

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

Extracting fit parameters...

4FGL J0839.8+0105
   Spectrum: LogParabola
295         norm:  1.000e-04  4.172e-06  1.000e-04  1.000e+04 ( 1.000e-12)
296        alpha:  2.241e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
297         beta:  1.924e-01  0.000e+00  0.000e+00  1.000e+01 ( 1.000e+00) fixed
298           Eb:  6.486e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
498    Prefactor:  6.288e-01  1.679e-01  0.000e+00  1.000e+01 ( 1.000e+00)
499        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
500        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
497   Normalization:  1.477e+00  2.467e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 129.963 1.088
Photon Flux Upper Limit: 5.78e-08 ph cm-2 s-1
Energy Flux Upper Limit: 2.13e-05 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/603023/likelihoodResults_303868801_304128001_4FGL_J0839.8+0105_daily_bin249.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) = 6836.63395332
delta logL = -0.00138831991353

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 6836.63256494
delta logL = 5.84768713452e-08

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .10004E-03   1.0000         .10000E-03   10000.    
     2 'alpha     '    2.2530       1.0000          .0000       5.0000    
     3 'Normalizat'    1.4772       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .62878       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5010E+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=   6836.257     FROM MIGRAD    STATUS=FAILED       139 CALLS      279 TOTAL
                     EDM=   .33E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .34400        18.938        .12500E-01    .22837E-02
   2  alpha         5.0000        2.5000        .50000    ** at limit **
   3  Normalizat    1.4035        .12887        .26135E-03    .52896E-04
   4  Prefactor     .66199        .64473E-01    .27336E-03    .13071E-03
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   6836.257     FROM SIMPLEX   STATUS=UNCHANGED    150 CALLS      429 TOTAL
                     EDM=   .36E-05    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .34400        18.938        .22011E-05    .22837E-02
   2  alpha         5.0000        2.5000        .61250E-02** at limit **
   3  Normalizat    1.4035        .12887        .56827E-06    .52896E-04
   4  Prefactor     .66199        .64473E-01    .10809E-06    .13071E-03
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   6836.257     FROM MIGRAD    STATUS=CONVERGED     33 CALLS      462 TOTAL
                     EDM=   .51E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .34400        .43335        .56459E-04   -.94036E-04
   2  alpha         5.0000        3.2738        .82308E-01** at limit **
   3  Normalizat    1.4035        .24689        .10454E-04    .34583E-04
   4  Prefactor     .66199        .17134        .10934E-04    .12123E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 0.344
  alpha      = 5
  Normalizat = 1.40355
  Prefactor  = 0.661987
 **********
 **   18 **HESSE 
 **********

 FCN=   6836.257     FROM HESSE     STATUS=OK            23 CALLS      485 TOTAL
                     EDM=   .50E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .34400        .43056        .22584E-05   -1.5591    
   2  alpha         5.0000        3.2742        .16462E-01    1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Normalizat    1.4035        .24683        .20908E-05   -.80526    
   4  Prefactor     .66199        .17134        .21869E-05   -1.0504    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 5.04377e-11
Minuit parameter uncertainties:
  1  0.430566
  2  1.15591e-05
  3  0.24704
  4  0.171474
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/603023': 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) = 6836.25741264
delta logL = 0.37515235793

Extracting fit parameters...

4FGL J0839.8+0105
   Spectrum: LogParabola
295         norm:  3.440e-01  4.306e-01  1.000e-04  1.000e+04 ( 1.000e-12)
296        alpha:  5.000e+00  1.156e-05  0.000e+00  5.000e+00 ( 1.000e+00)
297         beta:  1.924e-01  0.000e+00  0.000e+00  1.000e+01 ( 1.000e+00) fixed
298           Eb:  6.486e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
498    Prefactor:  6.620e-01  1.715e-01  0.000e+00  1.000e+01 ( 1.000e+00)
499        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
500        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
497   Normalization:  1.404e+00  2.470e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 129.963 1.088

Creating a high resolution counts map...
INFO: Auto-setting vmin to -2.500e-04 [aplpy.core]
INFO: Auto-setting vmax to  2.775e-03 [aplpy.core]
Saving /scratch/kocevski/603023/cmap_HighResolution_303868801_304128001_4FGL_J0839.8+0105_daily_bin249.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='2.13e-05', job_status='DONE', photon_flux_upper_limit='5.78e-08', time_completed='2021-08-30 03:09:09.890788', job_id='603023', GAL2='0.66', fit_tolerance='1e-08', EG2='1.40', EG='1.48', time_epoch_completed='1630318149.89', return_code2='0', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.63', dlogl='3.75e-01', ts2='0.82', photon_index_error='0.00', photon_index='2.24' WHERE bin_id='249' AND source_name='4FGL J0839.8+0105' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Aug 30 03:09:09 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0215>
Subject: Job 603023: <4FGL_J0839.8+0105_daily_bin249> in cluster <slac> Done

Job <4FGL_J0839.8+0105_daily_bin249> was submitted from host <rhel6-64j> by user <kocevski> in cluster <slac> at Mon Aug 30 02:55:27 2021
Job was executed on host(s) <bullet0215>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Aug 30 02:55:29 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Mon Aug 30 02:55:29 2021
Terminated at Mon Aug 30 03:09:11 2021
Results reported at Mon Aug 30 03:09:11 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J0839.8+0105_daily_bin249 129.963 1.0877 303868801 304128001 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J0839.8+0105 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   599.42 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             315.11 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   822 sec.
    Turnaround time :                            824 sec.

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

