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


Performing analysis on: 4FGL_J0416.9+0105_daily_bin1559
RA = 64.2269, Dec = 1.088
tmin = 643420801, tmax = 643680001
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='352458', job_status='RUN', time_executed='2021-08-20 10:28:08.158233', time_epoch_executed='1629480488.16' WHERE source_name='4FGL J0416.9+0105' and cadence='daily' and bin_id='1559'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/352458

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/352458/ft1_4FGL_J0416.9+0105_daily_bin1559.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/352458/ft2_4FGL_J0416.9+0105_daily_bin1559.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/352458/ft1_4FGL_J0416.9+0105_daily_bin1559.fits outfile=/scratch/kocevski/352458/ft1_filteredMKT_4FGL_J0416.9+0105_daily_bin1559.fits ra=64.2269 dec=1.088 rad=12.0 tmin=643420801.0 tmax=643680001.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.90
user 3.22
sys 0.60

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/352458/ft2_4FGL_J0416.9+0105_daily_bin1559.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/352458/ft2_4FGL_J0416.9+0105_daily_bin1559.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/352458/ft1_filteredMKT_4FGL_J0416.9+0105_daily_bin1559.fits evtable="EVENTS" outfile="/scratch/kocevski/352458/ft1_filtered_4FGL_J0416.9+0105_daily_bin1559.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.85
user 0.35
sys 0.48

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/352458/ft1_filtered_4FGL_J0416.9+0105_daily_bin1559.fits" evtable="EVENTS" scfile=/scratch/kocevski/352458/ft2_4FGL_J0416.9+0105_daily_bin1559.fits sctable="SC_DATA" outfile=/scratch/kocevski/352458/ltcube_643420801_643680001_4FGL_J0416.9+0105_daily_bin1559.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/352458/ft2_4FGL_J0416.9+0105_daily_bin1559.fits
.....................!
real 12.20
user 11.38
sys 0.79

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/352458/ft1_filtered_4FGL_J0416.9+0105_daily_bin1559.fits evtable="EVENTS" scfile=/scratch/kocevski/352458/ft2_4FGL_J0416.9+0105_daily_bin1559.fits sctable="SC_DATA" expcube=/scratch/kocevski/352458/ltcube_643420801_643680001_4FGL_J0416.9+0105_daily_bin1559.fits outfile=/scratch/kocevski/352458/expmap_643420801_643680001_4FGL_J0416.9+0105_daily_bin1559.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/352458/ltcube_643420801_643680001_4FGL_J0416.9+0105_daily_bin1559.fits
.....................!
real 192.52
user 187.30
sys 4.91

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

Setting source of interest to:
4FGL J0416.9+0105 @ 64.2269 1.088

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/352458/ft1_filtered_4FGL_J0416.9+0105_daily_bin1559.fits scfile=/scratch/kocevski/352458/ft2_4FGL_J0416.9+0105_daily_bin1559.fits outfile=/scratch/kocevski/352458/cmap_643420801_643680001_4FGL_J0416.9+0105_daily_bin1559.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=64.2269 yref=1.088 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.92
user 0.37
sys 0.54

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/352458/ft1_filtered_4FGL_J0416.9+0105_daily_bin1559.fits scfile=/scratch/kocevski/352458/ft2_4FGL_J0416.9+0105_daily_bin1559.fits outfile=/scratch/kocevski/352458/cmap_HighResolution_643420801_643680001_4FGL_J0416.9+0105_daily_bin1559.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=64.2269 yref=1.088 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.92
user 0.39
sys 0.53

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/352458/ft1_filtered_4FGL_J0416.9+0105_daily_bin1559.fits evtable="EVENTS" scfile=/scratch/kocevski/352458/ft2_4FGL_J0416.9+0105_daily_bin1559.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/352458/Model_4FGL_J0416.9+0105_daily_bin1559.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/352458/ft1_filtered_4FGL_J0416.9+0105_daily_bin1559.fits.....................!
real 146.45
user 144.53
sys 1.68

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/352458/ft1_filtered_4FGL_J0416.9+0105_daily_bin1559.fits', '/scratch/kocevski/352458/ft2_4FGL_J0416.9+0105_daily_bin1559.fits', expMap='/scratch/kocevski/352458/expmap_643420801_643680001_4FGL_J0416.9+0105_daily_bin1559.fits', expCube='/scratch/kocevski/352458/ltcube_643420801_643680001_4FGL_J0416.9+0105_daily_bin1559.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/352458/Model_4FGL_J0416.9+0105_daily_bin1559.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J0416.9+0105'

4FGL J0416.9+0105
   Spectrum: PowerLaw
210    Prefactor:  4.655e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-14)
211        Index:  1.876e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
212        Scale:  3.731e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/352458/ft1_filtered_4FGL_J0416.9+0105_daily_bin1559.fits
Spacecraft file(s): /scratch/kocevski/352458/ft2_4FGL_J0416.9+0105_daily_bin1559.fits
Exposure map: /scratch/kocevski/352458/expmap_643420801_643680001_4FGL_J0416.9+0105_daily_bin1559.fits
Exposure cube: /scratch/kocevski/352458/ltcube_643420801_643680001_4FGL_J0416.9+0105_daily_bin1559.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/352458/Model_4FGL_J0416.9+0105_daily_bin1559.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) = 10523.7896368

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    21.073       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     4 'norm      '    9.8910       1.0000         .10000E-03   10000.    
     5 'Prefactor '    3.3496       1.0000         .10000E-03   10000.    
     6 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    2.1680       1.0000         .10000E-03   10000.    
     9 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    10 'norm      '    2.4487       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10015E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    30.006       1.0000         .10000E-03   10000.    
    13 'Prefactor '    25.352       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10021E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    4.5007       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    .16938       1.0000         .10000E-03   10000.    
    18 'Prefactor '    23.267       1.0000         .10000E-03   10000.    
    19 'Prefactor '    21.339       1.0000         .10000E-03   10000.    
    20 'norm      '    8.0825       1.0000         .10000E-03   10000.    
    21 'Normalizat'    .73553       1.0000         .10000E-01   10.000    
    22 'Prefactor '    1.1130       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .4550E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   10523.75     FROM MIGRAD    STATUS=CONVERGED    458 CALLS     2401 TOTAL
                     EDM=   .12E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .9%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .10000E-03    .37637       -.51253E-07** at limit **
   2  Prefactor     21.070        31.160       -.46446E-05    .51688E-05
   3  Prefactor     .10000E-03    4.7610        .40209E-06** at limit **
   4  norm          9.8916        10.366       -.10446E-06    .14326E-04
   5  Prefactor     3.3521        16.952        .26260E-05   -.74263E-04
   6  norm          .10000E-03    1.4585       -.18023E-06** at limit **
   7  Prefactor     .10000E-03    10.813       -.10468E-04** at limit **
   8  norm          2.1684        7.8508       -.22554E-05   -.39486E-03
   9  norm          .10000E-03    11.347        .15359E-04** at limit **
  10  norm          2.4491        1.1424       -.60976E-06    .90932E-03
  11  Prefactor     .10000E-03    .89167       -.71833E-06** at limit **
  12  Prefactor     29.998        24.611       -.87403E-05    .47267E-04
  13  Prefactor     25.364        45.283        .22413E-04    .18220E-03
  14  Prefactor     .10000E-03    10.603       -.24785E-05** at limit **
  15  norm          4.5013        3.1722        .69217E-06   -.17127E-03
  16  Prefactor     .10000E-03    26.243       -.18853E-05** at limit **
  17  norm          .17167        .88006       -.10198E-05   -.60561E-03
  18  Prefactor     23.267        9.3464        .39228E-06    .81790E-04
  19  Prefactor     21.338        33.149       -.12310E-05    .12680E-04
  20  norm          8.0824        2.8171        .22741E-07    .54178E-03
  21  Normalizat    .73548        .20651        .45261E-06    .30075E-03
  22  Prefactor     1.1130        .78343E-01    .40330E-06    .48329E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 0.0001
  Prefactor  = 21.0701
  Prefactor  = 0.0001
  norm       = 9.89157
  Prefactor  = 3.35208
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 2.16843
  norm       = 0.0001
  norm       = 2.44909
  Prefactor  = 0.000100001
  Prefactor  = 29.9983
  Prefactor  = 25.364
  Prefactor  = 0.0001
  norm       = 4.50129
  Prefactor  = 0.0001
  norm       = 0.171668
  Prefactor  = 23.2667
  Prefactor  = 21.3379
  norm       = 8.08236
  Normalizat = 0.735479
  Prefactor  = 1.11303
 **********
 **   18 **HESSE 
 **********

 FCN=   10523.75     FROM HESSE     STATUS=OK           344 CALLS     2745 TOTAL
                     EDM=   .26E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .10000E-03    .39076        .12281E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     21.070        31.178        .87253E-04   -1.4790    
   3  Prefactor     .10000E-03    4.7692        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  norm          9.8916        10.366        .12741E-03   -1.5079    
   5  Prefactor     3.3521        16.851        .22113E-03   -1.5342    
   6  norm          .10000E-03    1.4657        .12091E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    10.738        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          2.1684        7.8970        .27970E-03   -1.5413    
   9  norm          .10000E-03    11.228        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          2.4491        1.1396        .26142E-04   -1.5395    
  11  Prefactor     .10000E-03    .93043        .18872E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     29.998        24.395        .73143E-04   -1.4612    
  13  Prefactor     25.364        45.351        .79560E-04   -1.4700    
  14  Prefactor     .10000E-03    10.897        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          4.5013        3.1455        .12867E-03   -1.5284    
  16  Prefactor     .10000E-03    26.290        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .17167        4.3360        .17599E-02   -1.5625    
  18  Prefactor     23.267        9.3283        .83042E-04   -1.4743    
  19  Prefactor     21.338        33.136        .86708E-04   -1.4784    
  20  norm          8.0824        2.8098        .96848E-04   -1.5139    
  21  Normalizat    .73548        .21872        .45696E-03   -1.0251    
  22  Prefactor     1.1130        .84204E-01    .15764E-03   -.89051    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.57127e-09
Minuit parameter uncertainties:
  1  6.61702e-07
  2  31.2018
  3  1.09267e-05
  4  10.368
  5  15.0379
  6  2.18702e-07
  7  4.88272e-05
  8  7.90083
  9  4.1142e-05
  10  1.13965
  11  5.41711e-05
  12  24.4028
  13  45.4125
  14  6.52076e-05
  15  3.1456
  16  1.05573e-05
  17  1.72514
  18  9.32884
  19  33.165
  20  2.80982
  21  0.218983
  22  0.084214
Done.

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

Extracting fit parameters...

4FGL J0416.9+0105
   Spectrum: PowerLaw
210    Prefactor:  3.352e+00  1.504e+01  1.000e-04  1.000e+04 ( 1.000e-14)
211        Index:  1.876e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
212        Scale:  3.731e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
452    Prefactor:  1.113e+00  8.421e-02  0.000e+00  1.000e+01 ( 1.000e+00)
453        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
454        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
451   Normalization:  7.355e-01  2.190e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.06
Ra Dec: 64.227 1.088
Photon Flux Upper Limit: 5.58e-08 ph cm-2 s-1
Energy Flux Upper Limit: 4.14e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/352458/likelihoodResults_643420801_643680001_4FGL_J0416.9+0105_daily_bin1559.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) = 10522.8157661
delta logL = 0.938791093349

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 10522.5569861
delta logL = 1.19757106674

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .16050E-02   1.0000         .10000E-03   10000.    
     2 'Index     '    5.3288       1.0000          .0000       10.000    
     3 'Normalizat'    .65917       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1278       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .4550E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   10522.56     FROM MIGRAD    STATUS=CONVERGED     60 CALLS      331 TOTAL
                     EDM=   .46E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .15795E-02    .15382E-01    .73492E-03** at limit **
   2  Index         5.3341        1.3692        .70616E-01    .45652E-03
   3  Normalizat    .65883        .44763E-01    .10817        .42314E-04
   4  Prefactor     1.1280        .18760E-01    .36614E-01   -.19064E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.00157954
  Index      = 5.3341
  Normalizat = 0.658828
  Prefactor  = 1.12799
 **********
 **   18 **HESSE 
 **********

 FCN=   10522.56     FROM HESSE     STATUS=NOT POSDEF    35 CALLS      366 TOTAL
                     EDM=   .18E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .15795E-02    .46268E-01    .31550E-04   -1.5700    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         5.3341        2.8733        .35360E-02    .66870E-01
   3  Normalizat    .65883        .15667        .47971E-03   -1.0554    
   4  Prefactor     1.1280        .64883E-01    .15658E-03   -.88577    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 1.77125e-10
Minuit parameter uncertainties:
  1  0.0165477
  2  3.06191
  3  0.156775
  4  0.0648878
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/352458': 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) = 10522.5569786
delta logL = 1.19757858663

Extracting fit parameters...

4FGL J0416.9+0105
   Spectrum: PowerLaw
210    Prefactor:  1.580e-03  1.655e-02  1.000e-04  1.000e+04 ( 1.000e-14)
211        Index:  5.334e+00  3.062e+00  0.000e+00  1.000e+01 (-1.000e+00)
212        Scale:  3.731e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
452    Prefactor:  1.128e+00  6.489e-02  0.000e+00  1.000e+01 ( 1.000e+00)
453        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
454        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
451   Normalization:  6.588e-01  1.568e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 2.59
Ra Dec: 64.227 1.088
Photon Index (Free Index): 5.33 +/- 3.06
Photon Flux (Free Index): 8.89e-08 +/- 6.21e-08
Energy Flux (Free Index): 1.15e-05 +/- 8.68e-06

Creating a high resolution counts map...
INFO: Auto-setting vmin to -1.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  1.110e+00 [aplpy.core]
Saving /scratch/kocevski/352458/cmap_HighResolution_643420801_643680001_4FGL_J0416.9+0105_daily_bin1559.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='4.14e-03', comment='SUCCESS', energy_flux2='1.15e-05', dlogl='1.20e+00', photon_flux2='8.89e-08', job_status='DONE', time_completed='2021-08-20 10:41:53.810549', photon_index_error2='3.06', photon_index2='5.33', ts='0.06', fit_tolerance='1e-08', GAL='1.11', photon_index_error='0.00', photon_flux_upper_limit='5.58e-08', energy_flux_error2='8.68e-06', EG='0.74', time_epoch_completed='1629481313.81', return_code='0', job_id='352458', GAL2='1.13', EG2='0.66', return_code2='102', photon_flux_error2='6.21e-08', ts2='2.59', photon_index='1.88' WHERE bin_id='1559' AND source_name='4FGL J0416.9+0105' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Fri Aug 20 10:41:53 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0250>
Subject: Job 352458: <4FGL_J0416.9+0105_daily_bin1559> in cluster <slac> Done

Job <4FGL_J0416.9+0105_daily_bin1559> was submitted from host <rhel6-64h> by user <kocevski> in cluster <slac> at Fri Aug 20 10:25:37 2021
Job was executed on host(s) <bullet0250>, in queue <medium>, as user <kocevski> in cluster <slac> at Fri Aug 20 10:25:39 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Fri Aug 20 10:25:39 2021
Terminated at Fri Aug 20 10:41:54 2021
Results reported at Fri Aug 20 10:41:54 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J0416.9+0105_daily_bin1559 64.2269 1.088 643420801 643680001 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J0416.9+0105 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   830.35 sec.
    Max Memory :                                 1255 MB
    Average Memory :                             322.40 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   975 sec.
    Turnaround time :                            977 sec.

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

