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


Performing analysis on: 4FGL_J0402.0-2616_daily_bin698
RA = 60.5103, Dec = -26.273
tmin = 420249601, tmax = 420508801
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='170593', job_status='RUN', time_executed='2021-08-19 23:59:59.158057', time_epoch_executed='1629442799.16' WHERE source_name='4FGL J0402.0-2616' and cadence='daily' and bin_id='698'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/170593

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/170593/ft1_4FGL_J0402.0-2616_daily_bin698.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/170593/ft2_4FGL_J0402.0-2616_daily_bin698.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/170593/ft1_4FGL_J0402.0-2616_daily_bin698.fits outfile=/scratch/kocevski/170593/ft1_filteredMKT_4FGL_J0402.0-2616_daily_bin698.fits ra=60.5103 dec=-26.273 rad=12.0 tmin=420249601.0 tmax=420508801.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.94
user 3.12
sys 0.78

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/170593/ft2_4FGL_J0402.0-2616_daily_bin698.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/170593/ft2_4FGL_J0402.0-2616_daily_bin698.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/170593/ft1_filteredMKT_4FGL_J0402.0-2616_daily_bin698.fits evtable="EVENTS" outfile="/scratch/kocevski/170593/ft1_filtered_4FGL_J0402.0-2616_daily_bin698.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.06
user 0.32
sys 0.71

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/170593/ft1_filtered_4FGL_J0402.0-2616_daily_bin698.fits" evtable="EVENTS" scfile=/scratch/kocevski/170593/ft2_4FGL_J0402.0-2616_daily_bin698.fits sctable="SC_DATA" outfile=/scratch/kocevski/170593/ltcube_420249601_420508801_4FGL_J0402.0-2616_daily_bin698.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/170593/ft2_4FGL_J0402.0-2616_daily_bin698.fits
.....................!
real 12.32
user 11.41
sys 0.88

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/170593/ft1_filtered_4FGL_J0402.0-2616_daily_bin698.fits evtable="EVENTS" scfile=/scratch/kocevski/170593/ft2_4FGL_J0402.0-2616_daily_bin698.fits sctable="SC_DATA" expcube=/scratch/kocevski/170593/ltcube_420249601_420508801_4FGL_J0402.0-2616_daily_bin698.fits outfile=/scratch/kocevski/170593/expmap_420249601_420508801_4FGL_J0402.0-2616_daily_bin698.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/170593/ltcube_420249601_420508801_4FGL_J0402.0-2616_daily_bin698.fits
.....................!
real 193.29
user 186.02
sys 6.50

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
Extended source Fornax A in ROI, make sure /nfs/farm/g/glast/g/LCRepository/Likelihood/ExtendedSources/Extended_archive_v18/Templates/FornaxA.fits is the correct path to the extended template.
Added 156 point sources and 1 extended sources
If using unbinned likelihood you will need to rerun gtdiffrsp for the extended sources or rerun the makeModel function with optional argument psForce=True

Setting source of interest to:
4FGL J0402.0-2616 @ 60.5103 -26.273

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/170593/ft1_filtered_4FGL_J0402.0-2616_daily_bin698.fits scfile=/scratch/kocevski/170593/ft2_4FGL_J0402.0-2616_daily_bin698.fits outfile=/scratch/kocevski/170593/cmap_420249601_420508801_4FGL_J0402.0-2616_daily_bin698.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=60.5103 yref=-26.273 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.36
sys 0.73

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/170593/ft1_filtered_4FGL_J0402.0-2616_daily_bin698.fits scfile=/scratch/kocevski/170593/ft2_4FGL_J0402.0-2616_daily_bin698.fits outfile=/scratch/kocevski/170593/cmap_HighResolution_420249601_420508801_4FGL_J0402.0-2616_daily_bin698.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=60.5103 yref=-26.273 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.12
user 0.39
sys 0.72

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/170593/ft1_filtered_4FGL_J0402.0-2616_daily_bin698.fits evtable="EVENTS" scfile=/scratch/kocevski/170593/ft2_4FGL_J0402.0-2616_daily_bin698.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/170593/Model_4FGL_J0402.0-2616_daily_bin698.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 Fornax A
adding source GAL_V02
Working on...
/scratch/kocevski/170593/ft1_filtered_4FGL_J0402.0-2616_daily_bin698.fits.....................!
real 110.54
user 108.29
sys 1.96

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/170593/ft1_filtered_4FGL_J0402.0-2616_daily_bin698.fits', '/scratch/kocevski/170593/ft2_4FGL_J0402.0-2616_daily_bin698.fits', expMap='/scratch/kocevski/170593/expmap_420249601_420508801_4FGL_J0402.0-2616_daily_bin698.fits', expCube='/scratch/kocevski/170593/ltcube_420249601_420508801_4FGL_J0402.0-2616_daily_bin698.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/170593/Model_4FGL_J0402.0-2616_daily_bin698.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J0402.0-2616'

4FGL J0402.0-2616
   Spectrum: LogParabola
255         norm:  2.550e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-13)
256        alpha:  1.995e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
257         beta:  1.705e-01  0.000e+00  0.000e+00  1.000e+01 ( 1.000e+00) fixed
258           Eb:  1.630e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/170593/ft1_filtered_4FGL_J0402.0-2616_daily_bin698.fits
Spacecraft file(s): /scratch/kocevski/170593/ft2_4FGL_J0402.0-2616_daily_bin698.fits
Exposure map: /scratch/kocevski/170593/expmap_420249601_420508801_4FGL_J0402.0-2616_daily_bin698.fits
Exposure cube: /scratch/kocevski/170593/ltcube_420249601_420508801_4FGL_J0402.0-2616_daily_bin698.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/170593/Model_4FGL_J0402.0-2616_daily_bin698.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) = 4941.20615615

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    7.0020       1.0000         .10000E-03   10000.    
     6 'Prefactor '    3.5276       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .20619       1.0000         .10000E-03   10000.    
     8 'Prefactor '    1.3090       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    10 'norm      '    .44196       1.0000         .10000E-03   10000.    
    11 'Prefactor '    39.025       1.0000         .10000E-03   10000.    
    12 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10026E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    7.1117       1.0000         .10000E-03   10000.    
    15 'Prefactor '    8.5489       1.0000         .10000E-03   10000.    
    16 'norm      '    3.6470       1.0000         .10000E-03   10000.    
    17 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
    18 'norm      '    1.1454       1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    40.981       1.0000         .10000E-03   10000.    
    21 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    30.082       1.0000         .10000E-03   10000.    
    23 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    24 'Normalizat'    .85173       1.0000         .10000E-01   10.000    
    25 'Prefactor '    .93967       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5030E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   4941.204     FROM MIGRAD    STATUS=CONVERGED    591 CALLS     2947 TOTAL
                     EDM=   .15E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.6%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10004E-03    129.17        .33687E-04** at limit **
   2  Prefactor     .10000E-03    28.123        .48981E-06** at limit **
   3  Prefactor     .10000E-03    11.914       -.32425E-07** at limit **
   4  Prefactor     .10000E-03    21.499       -.20459E-06** at limit **
   5  Prefactor     6.9984        46.087       -.36252E-05    .11146E-04
   6  Prefactor     3.5268        2.7042       -.37860E-07   -.86647E-04
   7  Prefactor     .20610        2.3251       -.82381E-06   -.37241E-03
   8  Prefactor     1.3097        2.3649       -.16013E-06   -.36154E-03
   9  Prefactor     .10000E-03    3.8754        .34355E-08** at limit **
  10  norm          .44186        .63136       -.44851E-07   -.46270E-03
  11  Prefactor     39.028        25.977        .53631E-06   -.74499E-06
  12  norm          .10000E-03    .56539        .91133E-08** at limit **
  13  Prefactor     .10004E-03    150.42       -.35459E-04** at limit **
  14  Prefactor     7.1070        17.501       -.32725E-05   -.66403E-03
  15  Prefactor     8.5490        3.7200       -.11919E-07    .18605E-04
  16  norm          3.6466        10.655       -.51084E-06   -.11172E-03
  17  Prefactor     .10000E-03    12.743        .34606E-07** at limit **
  18  norm          1.1453        .39347       -.12670E-07    .14841E-03
  19  Prefactor     .10000E-03    2.9063       -.12032E-07** at limit **
  20  Prefactor     40.985        26.455        .49651E-06    .78959E-05
  21  norm          .10000E-03    61.108       -.28668E-05** at limit **
  22  Prefactor     30.077        85.312       -.84621E-05    .37627E-04
  23  norm          .10000E-03    1.9425       -.46003E-08** at limit **
  24  Normalizat    .85172        .19040        .38203E-06    .12162E-03
  25  Prefactor     .93957        .18882        .67824E-06    .69462E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100037
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 6.99844
  Prefactor  = 3.52676
  Prefactor  = 0.206099
  Prefactor  = 1.30971
  Prefactor  = 0.0001
  norm       = 0.441859
  Prefactor  = 39.0283
  norm       = 0.0001
  Prefactor  = 0.000100041
  Prefactor  = 7.107
  Prefactor  = 8.54897
  norm       = 3.64659
  Prefactor  = 0.0001
  norm       = 1.14532
  Prefactor  = 0.0001
  Prefactor  = 40.9853
  norm       = 0.0001
  Prefactor  = 30.0771
  norm       = 0.0001
  Normalizat = 0.851717
  Prefactor  = 0.93957
 **********
 **   18 **HESSE 
 **********

 FCN=   4941.204     FROM HESSE     STATUS=OK           431 CALLS     3378 TOTAL
                     EDM=   .30E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10004E-03    123.84        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    28.428        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .10000E-03    11.917        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    21.514        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     6.9984        46.526        .15161E-03   -1.5179    
   6  Prefactor     3.5268        2.6730        .95145E-04   -1.5332    
   7  Prefactor     .20610        5.3427        .20412E-02   -1.5617    
   8  Prefactor     1.3097        2.3178        .13912E-03   -1.5479    
   9  Prefactor     .10000E-03    3.8781        .13515E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          .44186        .58435        .63774E-03   -1.5575    
  11  Prefactor     39.028        26.017        .64161E-04   -1.4458    
  12  norm          .10000E-03    .76859        .10139E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .10004E-03    144.86        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     7.1070        18.671        .75211E-03   -1.5175    
  15  Prefactor     8.5490        3.7136        .85035E-04   -1.5123    
  16  norm          3.6466        10.662        .21153E-03   -1.5326    
  17  Prefactor     .10000E-03    12.764        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  norm          1.1453        .39344        .24669E-04   -1.5494    
  19  Prefactor     .10000E-03    2.9689        .11693E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     40.985        26.426        .62617E-04   -1.4427    
  21  norm          .10000E-03    61.070        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     30.077        85.202        .73050E-04   -1.4611    
  23  norm          .10000E-03    1.9715        .95663E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Normalizat    .85172        .21961        .25571E-03   -.98178    
  25  Prefactor     .93957        .21916        .24420E-03   -.94772    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.0415e-09
Minuit parameter uncertainties:
  1  0.00427613
  2  3.81555e-05
  3  4.6642e-08
  4  1.18284e-05
  5  36.1299
  6  2.67305
  7  2.09838
  8  2.31797
  9  5.12975e-07
  10  0.584353
  11  26.0245
  12  1.14431e-06
  13  0.00488765
  14  18.6867
  15  3.71372
  16  10.6673
  17  2.28996e-07
  18  0.393445
  19  2.19049e-06
  20  26.4332
  21  0.00025308
  22  85.5496
  23  8.29076e-07
  24  0.21984
  25  0.219368
Done.

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

Extracting fit parameters...

4FGL J0402.0-2616
   Spectrum: LogParabola
255         norm:  3.647e+00  1.067e+01  1.000e-04  1.000e+04 ( 1.000e-13)
256        alpha:  1.995e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
257         beta:  1.705e-01  0.000e+00  0.000e+00  1.000e+01 ( 1.000e+00) fixed
258           Eb:  1.630e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
500    Prefactor:  9.396e-01  2.194e-01  0.000e+00  1.000e+01 ( 1.000e+00)
501        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
502        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
496   Normalization:  8.517e-01  2.198e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.14
Ra Dec: 60.510 -26.273
Photon Flux Upper Limit: 4.91e-08 ph cm-2 s-1
Energy Flux Upper Limit: 3.75e-05 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/170593/likelihoodResults_420249601_420508801_4FGL_J0402.0-2616_daily_bin698.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) = 4941.0858331
delta logL = 0.118635015802

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 4941.07612688
delta logL = 0.128341230737

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    2.5505       1.0000         .10000E-03   10000.    
     2 'alpha     '    2.7662       1.0000          .0000       5.0000    
     3 'Normalizat'    .84436       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .94111       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5030E+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=   4941.076     FROM MIGRAD    STATUS=CONVERGED     79 CALLS      239 TOTAL
                     EDM=   .97E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          2.5518        9.0083        .19861E-03    .47379E-03
   2  alpha         2.7676        1.7567        .18704E-01    .61625E-04
   3  Normalizat    .84433        .21289        .25670E-03    .32055E-03
   4  Prefactor     .94111        .21270        .24394E-03    .39657E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 2.5518
  alpha      = 2.76758
  Normalizat = 0.844333
  Prefactor  = 0.941112
 **********
 **   18 **HESSE 
 **********

 FCN=   4941.076     FROM HESSE     STATUS=OK            25 CALLS      264 TOTAL
                     EDM=   .69E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          2.5518        7.2510        .79443E-05   -1.5388    
   2  alpha         2.7676        1.4672        .74814E-03    .10724    
   3  Normalizat    .84433        .21250        .51339E-04   -.98445    
   4  Prefactor     .94111        .21246        .48787E-04   -.94719    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.9279e-10
Minuit parameter uncertainties:
  1  7.25346
  2  1.56937
  3  0.21271
  4  0.212643
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/170593': 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) = 4941.07612563
delta logL = 0.128342486118

Extracting fit parameters...

4FGL J0402.0-2616
   Spectrum: LogParabola
255         norm:  2.552e+00  7.253e+00  1.000e-04  1.000e+04 ( 1.000e-13)
256        alpha:  2.768e+00  1.569e+00  0.000e+00  5.000e+00 ( 1.000e+00)
257         beta:  1.705e-01  0.000e+00  0.000e+00  1.000e+01 ( 1.000e+00) fixed
258           Eb:  1.630e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
500    Prefactor:  9.411e-01  2.126e-01  0.000e+00  1.000e+01 ( 1.000e+00)
501        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
502        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
496   Normalization:  8.443e-01  2.127e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.14
Ra Dec: 60.510 -26.273

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/170593/cmap_HighResolution_420249601_420508801_4FGL_J0402.0-2616_daily_bin698.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='3.75e-05', job_status='DONE', photon_flux_upper_limit='4.91e-08', time_completed='2021-08-20 00:10:53.071189', job_id='170593', GAL2='0.94', fit_tolerance='1e-08', EG2='0.84', EG='0.85', time_epoch_completed='1629443453.07', return_code2='0', ts='0.14', comment='SUCCESS', return_code='0', GAL='0.94', dlogl='1.28e-01', ts2='0.39', photon_index_error='0.00', photon_index='2.00' WHERE bin_id='698' AND source_name='4FGL J0402.0-2616' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Fri Aug 20 00:10:53 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0031>
Subject: Job 170593: <4FGL_J0402.0-2616_daily_bin698> in cluster <slac> Done

Job <4FGL_J0402.0-2616_daily_bin698> was submitted from host <rhel6-64d> by user <kocevski> in cluster <slac> at Thu Aug 19 23:55:50 2021
Job was executed on host(s) <bullet0031>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Aug 19 23:55:53 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Thu Aug 19 23:55:53 2021
Terminated at Fri Aug 20 00:10:54 2021
Results reported at Fri Aug 20 00:10:54 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J0402.0-2616_daily_bin698 60.5103 -26.273 420249601 420508801 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J0402.0-2616 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   661.27 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             280.64 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   901 sec.
    Turnaround time :                            904 sec.

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

