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


Performing analysis on: 4FGL_J0340.5-2118_daily_bin1477
RA = 55.1477, Dec = -21.3158
tmin = 622166401, tmax = 622425601
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='753505', job_status='RUN', time_executed='2021-08-18 23:08:21.768489', time_epoch_executed='1629353301.77' WHERE source_name='4FGL J0340.5-2118' and cadence='daily' and bin_id='1477'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/753505

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/753505/ft1_4FGL_J0340.5-2118_daily_bin1477.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/753505/ft2_4FGL_J0340.5-2118_daily_bin1477.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/753505/ft1_4FGL_J0340.5-2118_daily_bin1477.fits outfile=/scratch/kocevski/753505/ft1_filteredMKT_4FGL_J0340.5-2118_daily_bin1477.fits ra=55.1477 dec=-21.3158 rad=12.0 tmin=622166401.0 tmax=622425601.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 8.60
user 3.44
sys 5.11

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/753505/ft2_4FGL_J0340.5-2118_daily_bin1477.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/753505/ft2_4FGL_J0340.5-2118_daily_bin1477.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/753505/ft1_filteredMKT_4FGL_J0340.5-2118_daily_bin1477.fits evtable="EVENTS" outfile="/scratch/kocevski/753505/ft1_filtered_4FGL_J0340.5-2118_daily_bin1477.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 5.44
user 0.34
sys 5.04

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/753505/ft1_filtered_4FGL_J0340.5-2118_daily_bin1477.fits" evtable="EVENTS" scfile=/scratch/kocevski/753505/ft2_4FGL_J0340.5-2118_daily_bin1477.fits sctable="SC_DATA" outfile=/scratch/kocevski/753505/ltcube_622166401_622425601_4FGL_J0340.5-2118_daily_bin1477.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/753505/ft2_4FGL_J0340.5-2118_daily_bin1477.fits
.....................!
real 17.71
user 11.83
sys 5.82

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/753505/ft1_filtered_4FGL_J0340.5-2118_daily_bin1477.fits evtable="EVENTS" scfile=/scratch/kocevski/753505/ft2_4FGL_J0340.5-2118_daily_bin1477.fits sctable="SC_DATA" expcube=/scratch/kocevski/753505/ltcube_622166401_622425601_4FGL_J0340.5-2118_daily_bin1477.fits outfile=/scratch/kocevski/753505/expmap_622166401_622425601_4FGL_J0340.5-2118_daily_bin1477.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/753505/ltcube_622166401_622425601_4FGL_J0340.5-2118_daily_bin1477.fits
.....................!
real 195.90
user 185.07
sys 10.42

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 157 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 J0340.5-2118 @ 55.1477 -21.3158

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/753505/ft1_filtered_4FGL_J0340.5-2118_daily_bin1477.fits scfile=/scratch/kocevski/753505/ft2_4FGL_J0340.5-2118_daily_bin1477.fits outfile=/scratch/kocevski/753505/cmap_622166401_622425601_4FGL_J0340.5-2118_daily_bin1477.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=55.1477 yref=-21.3158 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 5.38
user 0.39
sys 4.94

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/753505/ft1_filtered_4FGL_J0340.5-2118_daily_bin1477.fits scfile=/scratch/kocevski/753505/ft2_4FGL_J0340.5-2118_daily_bin1477.fits outfile=/scratch/kocevski/753505/cmap_HighResolution_622166401_622425601_4FGL_J0340.5-2118_daily_bin1477.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=55.1477 yref=-21.3158 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 5.34
user 0.38
sys 4.93

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/753505/ft1_filtered_4FGL_J0340.5-2118_daily_bin1477.fits evtable="EVENTS" scfile=/scratch/kocevski/753505/ft2_4FGL_J0340.5-2118_daily_bin1477.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/753505/Model_4FGL_J0340.5-2118_daily_bin1477.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/753505/ft1_filtered_4FGL_J0340.5-2118_daily_bin1477.fits.....................!
real 120.29
user 112.36
sys 7.60

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/753505/ft1_filtered_4FGL_J0340.5-2118_daily_bin1477.fits', '/scratch/kocevski/753505/ft2_4FGL_J0340.5-2118_daily_bin1477.fits', expMap='/scratch/kocevski/753505/expmap_622166401_622425601_4FGL_J0340.5-2118_daily_bin1477.fits', expCube='/scratch/kocevski/753505/ltcube_622166401_622425601_4FGL_J0340.5-2118_daily_bin1477.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/753505/Model_4FGL_J0340.5-2118_daily_bin1477.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J0340.5-2118'

4FGL J0340.5-2118
   Spectrum: PowerLaw
267    Prefactor:  1.112e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-12)
268        Index:  2.261e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
269        Scale:  1.008e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/753505/ft1_filtered_4FGL_J0340.5-2118_daily_bin1477.fits
Spacecraft file(s): /scratch/kocevski/753505/ft2_4FGL_J0340.5-2118_daily_bin1477.fits
Exposure map: /scratch/kocevski/753505/expmap_622166401_622425601_4FGL_J0340.5-2118_daily_bin1477.fits
Exposure cube: /scratch/kocevski/753505/ltcube_622166401_622425601_4FGL_J0340.5-2118_daily_bin1477.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/753505/Model_4FGL_J0340.5-2118_daily_bin1477.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) = 5118.39987441

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    9.9882       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10036E-03   1.0000         .10000E-03   10000.    
     4 'norm      '    .10969       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10077E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    428.45       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    74.815       1.0000         .10000E-03   10000.    
     9 'Prefactor '    4.2882       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10009E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    28.295       1.0000         .10000E-03   10000.    
    13 'Prefactor '    4.2850       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .63381       1.0000         .10000E-03   10000.    
    15 'Prefactor '    1.0652       1.0000         .10000E-03   10000.    
    16 'norm      '    12.869       1.0000         .10000E-03   10000.    
    17 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    18 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    167.69       1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    5.2201       1.0000         .10000E-03   10000.    
    22 'norm      '    .10241E-01   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    25 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    26 'Normalizat'    1.3322       1.0000         .10000E-01   10.000    
    27 'Prefactor '    .61344       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5020E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   5118.368     FROM MIGRAD    STATUS=CONVERGED    678 CALLS     3365 TOTAL
                     EDM=   .26E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.1%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .10000E-03    1.3652        .18390E-06** at limit **
   2  Prefactor     10.190        224.25       -.54089E-05   -.38153E-06
   3  Prefactor     .10000E-03    15.915       -.55169E-06** at limit **
   4  norm          .10380        2.1341       -.20973E-06    .23058E-03
   5  Prefactor     .10000E-03    10.685        .40897E-05** at limit **
   6  Prefactor     428.66        318.30        .67690E-06    .16801E-04
   7  Prefactor     .10000E-03    1.6441       -.21790E-07** at limit **
   8  Prefactor     74.808        29.436        .39567E-06    .30216E-04
   9  Prefactor     4.2874        12.473        .83897E-07    .16193E-04
  10  Prefactor     .10000E-03    19.576       -.25545E-06** at limit **
  11  Prefactor     .10000E-03    131.20       -.90258E-06** at limit **
  12  Prefactor     28.303        30.245       -.49351E-08    .22534E-04
  13  Prefactor     4.2844        3.0544        .18092E-06    .49866E-03
  14  Prefactor     .63382        4.0095        .19908E-05    .19723E-03
  15  Prefactor     1.0652        3.3375        .64918E-06    .17047E-03
  16  norm          12.869        2.2441        .24964E-07   -.82865E-04
  17  Prefactor     .10000E-03    9.2423       -.16172E-06** at limit **
  18  norm          .10000E-03    .77858       -.64653E-06** at limit **
  19  Prefactor     167.68        185.86        .98002E-06   -.70348E-05
  20  Prefactor     .10000E-03    5.1243       -.10769E-06** at limit **
  21  Prefactor     5.2202        2.9985        .11787E-06    .42316E-03
  22  norm          .10003E-03    10.045       -.73723E-06** at limit **
  23  Prefactor     .10000E-03    8.9818       -.21715E-06** at limit **
  24  Prefactor     .10000E-03    3.6957       -.41779E-06** at limit **
  25  Prefactor     .10000E-03    3.0683       -.66393E-06** at limit **
  26  Normalizat    1.3324        .23548       -.42745E-05    .33911E-03
  27  Prefactor     .61334        .19115        .55757E-05    .86478E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 0.0001
  Prefactor  = 10.1901
  Prefactor  = 0.0001
  norm       = 0.1038
  Prefactor  = 0.000100001
  Prefactor  = 428.658
  Prefactor  = 0.0001
  Prefactor  = 74.8078
  Prefactor  = 4.28737
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 28.3026
  Prefactor  = 4.28436
  Prefactor  = 0.633818
  Prefactor  = 1.06525
  norm       = 12.8693
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 167.678
  Prefactor  = 0.0001
  Prefactor  = 5.22018
  norm       = 0.000100028
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Normalizat = 1.33235
  Prefactor  = 0.613341
 **********
 **   18 **HESSE 
 **********

 FCN=   5118.368     FROM HESSE     STATUS=OK           488 CALLS     3853 TOTAL
                     EDM=   .16E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .10000E-03    1.4081        .16316E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     10.190        222.10        .12679E-03   -1.5069    
   3  Prefactor     .10000E-03    16.096        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  norm          .10380        25.966        .20014E-02   -1.5644    
   5  Prefactor     .10000E-03    10.929        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     428.66        318.06        .98762E-04   -1.1537    
   7  Prefactor     .10000E-03    1.6451        .89564E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     74.808        29.468        .46420E-04   -1.3976    
   9  Prefactor     4.2874        12.469        .19455E-03   -1.5294    
  10  Prefactor     .10000E-03    19.588        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    131.77        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     28.303        30.249        .75316E-04   -1.4643    
  13  Prefactor     4.2844        3.0145        .99140E-04   -1.5294    
  14  Prefactor     .63382        3.8610        .27144E-03   -1.5549    
  15  Prefactor     1.0652        3.2286        .21833E-03   -1.5502    
  16  norm          12.869        2.2396        .41656E-04   -1.4990    
  17  Prefactor     .10000E-03    9.2644        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  norm          .10000E-03    1.2264        .11858E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     167.68        186.14        .15576E-03   -1.3111    
  20  Prefactor     .10000E-03    5.1269        .15818E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     5.2202        2.9886        .90194E-04   -1.5251    
  22  norm          .10003E-03    64.023        .43732E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10000E-03    8.9887        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     .10000E-03    3.7239        .13436E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     .10000E-03    3.1523        .24496E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  Normalizat    1.3324        .25340        .24858E-03   -.82606    
  27  Prefactor     .61334        .20477        .29951E-03   -1.0703    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.63495e-09
Minuit parameter uncertainties:
  1  4.98453e-06
  2  95.5516
  3  1.45245e-05
  4  3.28331
  5  0.000157339
  6  319.387
  7  1.46055e-06
  8  29.4733
  9  12.4767
  10  1.71923e-05
  11  7.00295e-05
  12  30.2651
  13  3.01457
  14  3.12873
  15  3.22917
  16  2.23964
  17  4.8872e-07
  18  6.64455e-06
  19  186.801
  20  3.28615e-06
  21  2.9887
  22  0.00268062
  23  1.51528e-05
  24  9.91006e-06
  25  1.55384e-05
  26  0.253634
  27  0.205016
Done.

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

Extracting fit parameters...

4FGL J0340.5-2118
   Spectrum: PowerLaw
267    Prefactor:  4.284e+00  3.015e+00  1.000e-04  1.000e+04 ( 1.000e-12)
268        Index:  2.261e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
269        Scale:  1.008e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
499    Prefactor:  6.133e-01  2.050e-01  0.000e+00  1.000e+01 ( 1.000e+00)
500        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
501        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
495   Normalization:  1.332e+00  2.536e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 4.42
Ra Dec: 55.148 -21.316
Photon Index (Fixed Index): 2.26 +/- 0.00
Photon Flux (Fixed Index): 6.32e-08 +/- 4.44e-08
Energy Flux (Fixed Index): 2.55e-05 +/- 1.79e-05

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) = 5118.33352447
delta logL = 0.0344506825568

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5118.32932844
delta logL = 0.0386467076969

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    4.5716       1.0000         .10000E-03   10000.    
     2 'Index     '    2.1172       1.0000          .0000       10.000    
     3 'Normalizat'    1.3399       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .60990       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5020E+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=   5118.329     FROM MIGRAD    STATUS=CONVERGED     87 CALLS      246 TOTAL
                     EDM=   .11E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     4.5716        3.3376        .10491E-03   -.42057E-03
   2  Index         2.1171        .51871        .67703E-02   -.73174E-04
   3  Normalizat    1.3399        .23757        .24807E-03    .32355E-04
   4  Prefactor     .60991        .20116        .30031E-03    .33654E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 4.57161
  Index      = 2.11711
  Normalizat = 1.33988
  Prefactor  = 0.609906
 **********
 **   18 **HESSE 
 **********

 FCN=   5118.329     FROM HESSE     STATUS=OK            25 CALLS      271 TOTAL
                     EDM=   .12E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     4.5716        3.3149        .41964E-05   -1.5280    
   2  Index         2.1171        .51505        .27081E-03   -.61453    
   3  Normalizat    1.3399        .23774        .99228E-05   -.82384    
   4  Prefactor     .60991        .20133        .12012E-04   -1.0717    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.23309e-10
Minuit parameter uncertainties:
  1  3.31506
  2  0.516428
  3  0.237939
  4  0.201564
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/753505': 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) = 5118.32932842
delta logL = 0.0386467324988

Extracting fit parameters...

4FGL J0340.5-2118
   Spectrum: PowerLaw
267    Prefactor:  4.572e+00  3.315e+00  1.000e-04  1.000e+04 ( 1.000e-12)
268        Index:  2.117e+00  5.164e-01  0.000e+00  1.000e+01 (-1.000e+00)
269        Scale:  1.008e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
499    Prefactor:  6.099e-01  2.016e-01  0.000e+00  1.000e+01 ( 1.000e+00)
500        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
501        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
495   Normalization:  1.340e+00  2.379e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 4.50
Ra Dec: 55.148 -21.316
Photon Index (Free Index): 2.12 +/- 0.52
Photon Flux (Free Index): 5.45e-08 +/- 5.05e-08
Energy Flux (Free Index): 2.89e-05 +/- 2.50e-05

Creating a high resolution counts map...
INFO: Auto-setting vmin to  0.000e+00 [aplpy.core]
INFO: Auto-setting vmax to  0.000e+00 [aplpy.core]
Saving /scratch/kocevski/753505/cmap_HighResolution_622166401_622425601_4FGL_J0340.5-2118_daily_bin1477.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='6.32e-08', energy_flux2='2.89e-05', photon_flux_error='4.44e-08', dlogl='3.86e-02', energy_flux='2.55e-05', photon_flux2='5.45e-08', job_status='DONE', time_completed='2021-08-18 23:20:13.948857', photon_index_error2='0.52', photon_index2='2.12', ts='4.42', fit_tolerance='1e-08', GAL='0.61', photon_index_error='0.00', energy_flux_error2='2.50e-05', EG='1.33', time_epoch_completed='1629354013.95', return_code='0', job_id='753505', GAL2='0.61', EG2='1.34', return_code2='0', energy_flux_error='1.79e-05', photon_flux_error2='5.05e-08', ts2='4.50', photon_index='2.26' WHERE bin_id='1477' AND source_name='4FGL J0340.5-2118' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Wed Aug 18 23:20:14 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0252>
Subject: Job 753505: <4FGL_J0340.5-2118_daily_bin1477> in cluster <slac> Done

Job <4FGL_J0340.5-2118_daily_bin1477> was submitted from host <rhel6-64p> by user <kocevski> in cluster <slac> at Wed Aug 18 23:05:50 2021
Job was executed on host(s) <bullet0252>, in queue <medium>, as user <kocevski> in cluster <slac> at Wed Aug 18 23:05:54 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Wed Aug 18 23:05:54 2021
Terminated at Wed Aug 18 23:20:15 2021
Results reported at Wed Aug 18 23:20:15 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J0340.5-2118_daily_bin1477 55.1477 -21.3158 622166401 622425601 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J0340.5-2118 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   782.00 sec.
    Max Memory :                                 1093 MB
    Average Memory :                             291.11 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   860 sec.
    Turnaround time :                            865 sec.

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

