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


Performing analysis on: 4FGL_J0402.0-2616_daily_bin1137
RA = 60.5103, Dec = -26.273
tmin = 534038401, tmax = 534297601
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='174381', job_status='RUN', time_executed='2021-08-20 00:06:29.298363', time_epoch_executed='1629443189.3' WHERE source_name='4FGL J0402.0-2616' and cadence='daily' and bin_id='1137'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/174381

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/174381/ft1_4FGL_J0402.0-2616_daily_bin1137.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/174381/ft2_4FGL_J0402.0-2616_daily_bin1137.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/174381/ft1_4FGL_J0402.0-2616_daily_bin1137.fits outfile=/scratch/kocevski/174381/ft1_filteredMKT_4FGL_J0402.0-2616_daily_bin1137.fits ra=60.5103 dec=-26.273 rad=12.0 tmin=534038401.0 tmax=534297601.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 5.01
user 3.36
sys 0.40

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/174381/ft2_4FGL_J0402.0-2616_daily_bin1137.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/174381/ft1_filteredMKT_4FGL_J0402.0-2616_daily_bin1137.fits evtable="EVENTS" outfile="/scratch/kocevski/174381/ft1_filtered_4FGL_J0402.0-2616_daily_bin1137.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.70
user 0.33
sys 0.35

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/174381/ft1_filtered_4FGL_J0402.0-2616_daily_bin1137.fits" evtable="EVENTS" scfile=/scratch/kocevski/174381/ft2_4FGL_J0402.0-2616_daily_bin1137.fits sctable="SC_DATA" outfile=/scratch/kocevski/174381/ltcube_534038401_534297601_4FGL_J0402.0-2616_daily_bin1137.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/174381/ft2_4FGL_J0402.0-2616_daily_bin1137.fits
.....................!
real 11.86
user 11.26
sys 0.56

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/174381/ft1_filtered_4FGL_J0402.0-2616_daily_bin1137.fits evtable="EVENTS" scfile=/scratch/kocevski/174381/ft2_4FGL_J0402.0-2616_daily_bin1137.fits sctable="SC_DATA" expcube=/scratch/kocevski/174381/ltcube_534038401_534297601_4FGL_J0402.0-2616_daily_bin1137.fits outfile=/scratch/kocevski/174381/expmap_534038401_534297601_4FGL_J0402.0-2616_daily_bin1137.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/174381/ltcube_534038401_534297601_4FGL_J0402.0-2616_daily_bin1137.fits
.....................!
real 190.93
user 185.72
sys 4.87

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/174381/ft1_filtered_4FGL_J0402.0-2616_daily_bin1137.fits scfile=/scratch/kocevski/174381/ft2_4FGL_J0402.0-2616_daily_bin1137.fits outfile=/scratch/kocevski/174381/cmap_534038401_534297601_4FGL_J0402.0-2616_daily_bin1137.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 0.74
user 0.37
sys 0.34

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/174381/ft1_filtered_4FGL_J0402.0-2616_daily_bin1137.fits scfile=/scratch/kocevski/174381/ft2_4FGL_J0402.0-2616_daily_bin1137.fits outfile=/scratch/kocevski/174381/cmap_HighResolution_534038401_534297601_4FGL_J0402.0-2616_daily_bin1137.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 0.72
user 0.38
sys 0.33

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/174381/ft1_filtered_4FGL_J0402.0-2616_daily_bin1137.fits evtable="EVENTS" scfile=/scratch/kocevski/174381/ft2_4FGL_J0402.0-2616_daily_bin1137.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/174381/Model_4FGL_J0402.0-2616_daily_bin1137.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/174381/ft1_filtered_4FGL_J0402.0-2616_daily_bin1137.fits.....................!
real 158.50
user 156.11
sys 1.57

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/174381/ft1_filtered_4FGL_J0402.0-2616_daily_bin1137.fits', '/scratch/kocevski/174381/ft2_4FGL_J0402.0-2616_daily_bin1137.fits', expMap='/scratch/kocevski/174381/expmap_534038401_534297601_4FGL_J0402.0-2616_daily_bin1137.fits', expCube='/scratch/kocevski/174381/ltcube_534038401_534297601_4FGL_J0402.0-2616_daily_bin1137.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/174381/Model_4FGL_J0402.0-2616_daily_bin1137.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/174381/ft1_filtered_4FGL_J0402.0-2616_daily_bin1137.fits
Spacecraft file(s): /scratch/kocevski/174381/ft2_4FGL_J0402.0-2616_daily_bin1137.fits
Exposure map: /scratch/kocevski/174381/expmap_534038401_534297601_4FGL_J0402.0-2616_daily_bin1137.fits
Exposure cube: /scratch/kocevski/174381/ltcube_534038401_534297601_4FGL_J0402.0-2616_daily_bin1137.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/174381/Model_4FGL_J0402.0-2616_daily_bin1137.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) = 6835.75176881

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10008E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10027E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    30.151       1.0000         .10000E-03   10000.    
     5 'Prefactor '    32.030       1.0000         .10000E-03   10000.    
     6 'Prefactor '    2.8917       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .80273       1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10044E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10139E-03   1.0000         .10000E-03   10000.    
    10 'norm      '    7.3218       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10300E-03   1.0000         .10000E-03   10000.    
    12 'norm      '    1.5831       1.0000         .10000E-03   10000.    
    13 'Prefactor '    628.42       1.0000         .10000E-03   10000.    
    14 'Prefactor '    29.136       1.0000         .10000E-03   10000.    
    15 'Prefactor '    2.3569       1.0000         .10000E-03   10000.    
    16 'norm      '    11.442       1.0000         .10000E-03   10000.    
    17 'Prefactor '    .10022E-03   1.0000         .10000E-03   10000.    
    18 'norm      '    .45303       1.0000         .10000E-03   10000.    
    19 'Prefactor '    .36753E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10235E-03   1.0000         .10000E-03   10000.    
    21 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10265E-03   1.0000         .10000E-03   10000.    
    23 'norm      '    1.2393       1.0000         .10000E-03   10000.    
    24 'Normalizat'    .66121       1.0000         .10000E-01   10.000    
    25 'Prefactor '    1.0943       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=   6835.713     FROM MIGRAD    STATUS=CONVERGED    585 CALLS     2580 TOTAL
                     EDM=   .18E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.1%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    52.692        .54495E-08** at limit **
   2  Prefactor     .10000E-03    23.212       -.27413E-05** at limit **
   3  Prefactor     .10000E-03    7.7121        .56461E-07** at limit **
   4  Prefactor     30.157        28.541       -.68067E-07   -.21667E-04
   5  Prefactor     31.957        49.864       -.11965E-05   -.10925E-03
   6  Prefactor     2.8917        2.4605       -.88861E-08   -.15726E-03
   7  Prefactor     .80519        4.0535        .33530E-05    .37079E-04
   8  Prefactor     .10000E-03    2.3192       -.27968E-06** at limit **
   9  Prefactor     .10000E-03    5.8354        .15744E-06** at limit **
  10  norm          7.3221        1.3646       -.10345E-06   -.12453E-02
  11  Prefactor     .10000E-03    10.008       -.56296E-06** at limit **
  12  norm          1.5831        1.2449       -.58799E-07   -.15550E-03
  13  Prefactor     628.44        145.91        .64045E-06    .80500E-05
  14  Prefactor     29.129        22.196        .27665E-06   -.18149E-04
  15  Prefactor     2.3577        1.9151        .38868E-07   -.78160E-04
  16  norm          11.440        10.641        .51109E-07   -.24781E-04
  17  Prefactor     .10000E-03    15.861        .38834E-06** at limit **
  18  norm          .45324        .25173        .52308E-07   -.50636E-04
  19  Prefactor     .10000E-03    1.5018        .14354E-06** at limit **
  20  Prefactor     .10000E-03    13.065        .20125E-06** at limit **
  21  norm          .10000E-03    52.541        .54795E-07** at limit **
  22  Prefactor     .10000E-03    35.481        .20377E-06** at limit **
  23  norm          1.2376        3.6402        .16994E-05    .22513E-05
  24  Normalizat    .66082        .18187       -.46699E-05   -.77842E-04
  25  Prefactor     1.0948        .17558        .24740E-05   -.35632E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 30.1568
  Prefactor  = 31.9569
  Prefactor  = 2.89167
  Prefactor  = 0.805186
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 7.32212
  Prefactor  = 0.0001
  norm       = 1.58313
  Prefactor  = 628.445
  Prefactor  = 29.1288
  Prefactor  = 2.35766
  norm       = 11.4403
  Prefactor  = 0.0001
  norm       = 0.453237
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 1.23763
  Normalizat = 0.660816
  Prefactor  = 1.0948
 **********
 **   18 **HESSE 
 **********

 FCN=   6835.713     FROM HESSE     STATUS=OK           421 CALLS     3001 TOTAL
                     EDM=   .42E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    52.696        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    23.301        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .10000E-03    7.7161        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     30.157        28.544        .72967E-04   -1.4609    
   5  Prefactor     31.957        50.119        .70800E-04   -1.4577    
   6  Prefactor     2.8917        2.4328        .10899E-03   -1.5368    
   7  Prefactor     .80519        4.1952        .30179E-03   -1.5529    
   8  Prefactor     .10000E-03    2.3931        .24568E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .10000E-03    5.8587        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          7.3221        1.3663        .38278E-04   -1.5167    
  11  Prefactor     .10000E-03    10.009        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm          1.5831        1.2233        .75237E-04   -1.5456    
  13  Prefactor     628.44        145.91        .82413E-04   -1.0640    
  14  Prefactor     29.129        22.186        .74224E-04   -1.4628    
  15  Prefactor     2.3577        1.9107        .98476E-04   -1.5401    
  16  norm          11.440        10.643        .11843E-03   -1.5031    
  17  Prefactor     .10000E-03    15.968        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  norm          .45324        .24774        .29527E-04   -1.5573    
  19  Prefactor     .10000E-03    18.023        .19429E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10000E-03    13.156        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  norm          .10000E-03    52.542        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     .10000E-03    35.539        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  norm          1.2376        3.6391        .25632E-03   -1.5485    
  24  Normalizat    .66082        .19656        .28955E-03   -1.0546    
  25  Prefactor     1.0948        .19310        .23477E-03   -.89633    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.23169e-10
Minuit parameter uncertainties:
  1  4.33936e-05
  2  6.79842e-05
  3  1.79217e-06
  4  28.5566
  5  50.1851
  6  2.43293
  7  3.67601
  8  2.45496e-05
  9  4.48578e-06
  10  1.36632
  11  1.63234e-05
  12  1.22328
  13  145.999
  14  22.1926
  15  1.91077
  16  10.6444
  17  5.39278e-05
  18  0.247743
  19  0.000168763
  20  1.58033e-05
  21  3.06164e-05
  22  2.77989e-05
  23  3.63979
  24  0.196768
  25  0.193227
Done.

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

Extracting fit parameters...

4FGL J0402.0-2616
   Spectrum: LogParabola
255         norm:  1.144e+01  1.064e+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:  1.095e+00  1.932e-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:  6.608e-01  1.968e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 2.04
Ra Dec: 60.510 -26.273
Photon Index (Fixed Index): 2.00 +/- 0.00
Photon Flux (Fixed Index): 1.61e-08 +/- 1.50e-08
Energy Flux (Fixed Index): 1.23e-05 +/- 1.14e-05

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

Saving results to:
/scratch/kocevski/174381/likelihoodResults_534038401_534297601_4FGL_J0402.0-2616_daily_bin1137.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) = 6835.70163611
delta logL = 0.0114573780265

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6835.69876696
delta logL = 0.0143265214374

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    12.324       1.0000         .10000E-03   10000.    
     2 'alpha     '    1.8466       1.0000          .0000       5.0000    
     3 'Normalizat'    .66302       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0936       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=   6835.699     FROM MIGRAD    STATUS=CONVERGED     81 CALLS      235 TOTAL
                     EDM=   .81E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          12.325        12.379        .11411E-03   -.46941E-03
   2  alpha         1.8465        .86524        .18866E-01   -.76227E-04
   3  Normalizat    .66301        .18171        .28913E-03    .13086E-03
   4  Prefactor     1.0936        .18698        .23488E-03    .22433E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 12.3249
  alpha      = 1.84651
  Normalizat = 0.663013
  Prefactor  = 1.09365
 **********
 **   18 **HESSE 
 **********

 FCN=   6835.699     FROM HESSE     STATUS=OK            23 CALLS      258 TOTAL
                     EDM=   .89E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          12.325        12.139        .22821E-04   -1.5006    
   2  alpha         1.8465        .84950        .75462E-03   -.26447    
   3  Normalizat    .66301        .18178        .11565E-04   -1.0537    
   4  Prefactor     1.0936        .18710        .46976E-04   -.89670    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 8.89143e-10
Minuit parameter uncertainties:
  1  12.1415
  2  0.868102
  3  0.181949
  4  0.187209
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/174381': 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) = 6835.69876695
delta logL = 0.0143265321612

Extracting fit parameters...

4FGL J0402.0-2616
   Spectrum: LogParabola
255         norm:  1.232e+01  1.214e+01  1.000e-04  1.000e+04 ( 1.000e-13)
256        alpha:  1.847e+00  8.681e-01  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:  1.094e+00  1.872e-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:  6.630e-01  1.819e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 2.07
Ra Dec: 60.510 -26.273
Photon Index (Free Index): 1.85 +/- 0.87
Photon Flux (Free Index): 1.41e-08 +/- 1.77e-08
Energy Flux (Free Index): 1.39e-05 +/- 1.65e-05

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/174381/cmap_HighResolution_534038401_534297601_4FGL_J0402.0-2616_daily_bin1137.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='4.11e-05', comment='SUCCESS', photon_flux='1.61e-08', energy_flux2='1.39e-05', photon_flux_error='1.50e-08', dlogl='1.43e-02', energy_flux='1.23e-05', photon_flux2='1.41e-08', job_status='DONE', time_completed='2021-08-20 00:19:26.286603', photon_index_error2='0.87', photon_index2='1.85', ts='2.04', fit_tolerance='1e-08', GAL='1.09', photon_index_error='0.00', photon_flux_upper_limit='5.39e-08', energy_flux_error2='1.65e-05', EG='0.66', time_epoch_completed='1629443966.29', return_code='0', job_id='174381', GAL2='1.09', EG2='0.66', return_code2='0', energy_flux_error='1.14e-05', photon_flux_error2='1.77e-08', ts2='2.07', photon_index='2.00' WHERE bin_id='1137' AND source_name='4FGL J0402.0-2616' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Fri Aug 20 00:19:26 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0304>
Subject: Job 174381: <4FGL_J0402.0-2616_daily_bin1137> in cluster <slac> Done

Job <4FGL_J0402.0-2616_daily_bin1137> was submitted from host <rhel6-64p> by user <kocevski> in cluster <slac> at Fri Aug 20 00:05:48 2021
Job was executed on host(s) <bullet0304>, in queue <medium>, as user <kocevski> in cluster <slac> at Fri Aug 20 00:05:49 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Fri Aug 20 00:05:49 2021
Terminated at Fri Aug 20 00:19:27 2021
Results reported at Fri Aug 20 00:19:27 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J0402.0-2616_daily_bin1137 60.5103 -26.273 534038401 534297601 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 :                                   773.00 sec.
    Max Memory :                                 1093 MB
    Average Memory :                             371.17 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   817 sec.
    Turnaround time :                            819 sec.

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

