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


Performing analysis on: 4FGL_J0340.5-2118_daily_bin451
RA = 55.1477, Dec = -21.3158
tmin = 356227201, tmax = 356486401
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='746728', job_status='RUN', time_executed='2021-08-18 22:46:38.903753', time_epoch_executed='1629351998.9' WHERE source_name='4FGL J0340.5-2118' and cadence='daily' and bin_id='451'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/746728

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

Retrieving the FT1 file...

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

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

Retrieving 41 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/746728/ft1_4FGL_J0340.5-2118_daily_bin451.fits


Retrieving the FT1 file...

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

Retrieving 45 files...
Done.


Merging files...
fmerge4.1 : Error, missing column list names, file /scratch/kocevski/746728/ft2_filtered_0009.fits
fmerge4.1 : Fatal error!
FCCMPL: not found in table: RA_SUN
FCCMPL: not found in table: DEC_SUN

Merged file saved to:
/scratch/kocevski/746728/ft2_4FGL_J0340.5-2118_daily_bin451.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/746728/ft1_4FGL_J0340.5-2118_daily_bin451.fits outfile=/scratch/kocevski/746728/ft1_filteredMKT_4FGL_J0340.5-2118_daily_bin451.fits ra=55.1477 dec=-21.3158 rad=12.0 tmin=356227201.0 tmax=356486401.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 11.96
user 2.86
sys 9.03

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/746728/ft2_4FGL_J0340.5-2118_daily_bin451.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/746728/ft1_filteredMKT_4FGL_J0340.5-2118_daily_bin451.fits evtable="EVENTS" outfile="/scratch/kocevski/746728/ft1_filtered_4FGL_J0340.5-2118_daily_bin451.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 9.45
user 0.32
sys 8.95

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/746728/ft1_filtered_4FGL_J0340.5-2118_daily_bin451.fits" evtable="EVENTS" scfile=/scratch/kocevski/746728/ft2_4FGL_J0340.5-2118_daily_bin451.fits sctable="SC_DATA" outfile=/scratch/kocevski/746728/ltcube_356227201_356486401_4FGL_J0340.5-2118_daily_bin451.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/746728/ft2_4FGL_J0340.5-2118_daily_bin451.fits
.....................!
real 13.65
user 3.27
sys 10.28

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/746728/ft1_filtered_4FGL_J0340.5-2118_daily_bin451.fits evtable="EVENTS" scfile=/scratch/kocevski/746728/ft2_4FGL_J0340.5-2118_daily_bin451.fits sctable="SC_DATA" expcube=/scratch/kocevski/746728/ltcube_356227201_356486401_4FGL_J0340.5-2118_daily_bin451.fits outfile=/scratch/kocevski/746728/expmap_356227201_356486401_4FGL_J0340.5-2118_daily_bin451.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/746728/ltcube_356227201_356486401_4FGL_J0340.5-2118_daily_bin451.fits
.....................!
real 202.20
user 184.98
sys 16.54

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/746728/ft1_filtered_4FGL_J0340.5-2118_daily_bin451.fits scfile=/scratch/kocevski/746728/ft2_4FGL_J0340.5-2118_daily_bin451.fits outfile=/scratch/kocevski/746728/cmap_356227201_356486401_4FGL_J0340.5-2118_daily_bin451.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
gtbin: WARNING: Spacecraft data ceases before end of last GTI.
gtbin: WARNING: EXPOSURE keyword calculation may not be accurate.
real 9.09
user 0.37
sys 8.70

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/746728/ft1_filtered_4FGL_J0340.5-2118_daily_bin451.fits scfile=/scratch/kocevski/746728/ft2_4FGL_J0340.5-2118_daily_bin451.fits outfile=/scratch/kocevski/746728/cmap_HighResolution_356227201_356486401_4FGL_J0340.5-2118_daily_bin451.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
gtbin: WARNING: Spacecraft data ceases before end of last GTI.
gtbin: WARNING: EXPOSURE keyword calculation may not be accurate.
real 8.97
user 0.39
sys 8.54

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/746728/ft1_filtered_4FGL_J0340.5-2118_daily_bin451.fits evtable="EVENTS" scfile=/scratch/kocevski/746728/ft2_4FGL_J0340.5-2118_daily_bin451.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/746728/Model_4FGL_J0340.5-2118_daily_bin451.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/746728/ft1_filtered_4FGL_J0340.5-2118_daily_bin451.fits.............................!
real 39.03
user 26.11
sys 12.70

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/746728/ft1_filtered_4FGL_J0340.5-2118_daily_bin451.fits', '/scratch/kocevski/746728/ft2_4FGL_J0340.5-2118_daily_bin451.fits', expMap='/scratch/kocevski/746728/expmap_356227201_356486401_4FGL_J0340.5-2118_daily_bin451.fits', expCube='/scratch/kocevski/746728/ltcube_356227201_356486401_4FGL_J0340.5-2118_daily_bin451.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/746728/Model_4FGL_J0340.5-2118_daily_bin451.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/746728/ft1_filtered_4FGL_J0340.5-2118_daily_bin451.fits
Spacecraft file(s): /scratch/kocevski/746728/ft2_4FGL_J0340.5-2118_daily_bin451.fits
Exposure map: /scratch/kocevski/746728/expmap_356227201_356486401_4FGL_J0340.5-2118_daily_bin451.fits
Exposure cube: /scratch/kocevski/746728/ltcube_356227201_356486401_4FGL_J0340.5-2118_daily_bin451.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/746728/Model_4FGL_J0340.5-2118_daily_bin451.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) = 638.618331372

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    10.265       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .25325E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10035E-03   1.0000         .10000E-03   10000.    
     4 'norm      '    9.1403       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10019E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .14700E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    20.991       1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10016E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10766E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .73872E-01   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10097E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    5.2477       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10042E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    .10003E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    .10024E-03   1.0000         .10000E-03   10000.    
    18 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    .12287E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10008E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    .14808E-03   1.0000         .10000E-03   10000.    
    22 'norm      '    .10004E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10047E-03   1.0000         .10000E-03   10000.    
    25 'Prefactor '    .10069E-03   1.0000         .10000E-03   10000.    
    26 'Normalizat'    2.0485       1.0000         .10000E-01   10.000    
    27 'Prefactor '    .22025E-05   1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5020E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   638.5880     FROM MIGRAD    STATUS=CONVERGED    168 CALLS     2766 TOTAL
                     EDM=   .95E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  9.4%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          10.266        9.6584        .13634E-04    .25358E-02
   2  Prefactor     .11664E-03    8.3616        .11084E-04** at limit **
   3  Prefactor     .10016E-03    37.016       -.36636E-04** at limit **
   4  norm          9.1399        9.1475       -.44539E-05   -.80802E-03
   5  Prefactor     .10110E-03    22.590        .23482E-04** at limit **
   6  Prefactor     .10332E-03    393.08        .16318E-03** at limit **
   7  Prefactor     20.994        1.0858       -.10619E-06   -.33287E-03
   8  Prefactor     .10123E-03    21.158       -.19469E-04** at limit **
   9  Prefactor     .10689E-03    63.965       -.36269E-05** at limit **
  10  Prefactor     .14378E-03    6366.3       -.57816E-03** at limit **
  11  Prefactor     .10125E-03    89.681        .71587E-04** at limit **
  12  Prefactor     .10005E-03    32.597        .44275E-04** at limit **
  13  Prefactor     .10000E-03    4.3956       -.16994E-05** at limit **
  14  Prefactor     5.2454        1.1459       -.10867E-05   -.78909E-04
  15  Prefactor     .10000E-03    18.721        .17169E-05** at limit **
  16  norm          .10000E-03    1.6562        .90782E-06** at limit **
  17  Prefactor     .10073E-03    27.612       -.37362E-05** at limit **
  18  norm          .10000E-03    5.8990        .25277E-05** at limit **
  19  Prefactor     .10527E-03    180.22       -.13462E-03** at limit **
  20  Prefactor     .10029E-03    32.984        .15161E-04** at limit **
  21  Prefactor     .10150E-03    26.810        .32317E-05** at limit **
  22  norm          .10000E-03    22.790        .38300E-05** at limit **
  23  Prefactor     .10110E-03    63.327       -.51590E-04** at limit **
  24  Prefactor     .10018E-03    24.687       -.17435E-04** at limit **
  25  Prefactor     .10137E-03    19.459        .35124E-04** at limit **
  26  Normalizat    2.0490        .31711       -.32168E-04   -.33994E-04
  27  Prefactor     .20561E-11    .29609        .47835E-05** at limit **
                               ERR DEF=  .500    
Final values: 
  norm       = 10.2658
  Prefactor  = 0.000116638
  Prefactor  = 0.00010016
  norm       = 9.13985
  Prefactor  = 0.000101097
  Prefactor  = 0.000103322
  Prefactor  = 20.994
  Prefactor  = 0.00010123
  Prefactor  = 0.000106885
  Prefactor  = 0.000143776
  Prefactor  = 0.000101252
  Prefactor  = 0.00010005
  Prefactor  = 0.0001
  Prefactor  = 5.24542
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.000100729
  norm       = 0.0001
  Prefactor  = 0.000105271
  Prefactor  = 0.000100288
  Prefactor  = 0.000101503
  norm       = 0.0001
  Prefactor  = 0.000101102
  Prefactor  = 0.000100181
  Prefactor  = 0.000101369
  Normalizat = 2.04905
  Prefactor  = 2.05613e-12
 **********
 **   18 **HESSE 
 **********

 FCN=   638.5880     FROM HESSE     STATUS=OK           538 CALLS     3304 TOTAL
                     EDM=   .31E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          10.266        9.8593        .31265E-02   -1.5067    
   2  Prefactor     .11664E-03    839.56        .10730E-01   -1.5709    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .10016E-03    50.338        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  norm          9.1399        9.1666        .33141E-02   -1.5103    
   5  Prefactor     .10110E-03    53.423        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10332E-03    410.47        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     20.994        20.514        .21856E-02   -1.4791    
   8  Prefactor     .10123E-03    28.744        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .10689E-03    143.08        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .14378E-03    6370.7        .93859E-02   -1.5707    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10125E-03    134.27        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10005E-03    60.682        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .10000E-03    4.3903        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     5.2454        16.842        .43866E-02   -1.5250    
  15  Prefactor     .10000E-03    18.679        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          .10000E-03    1.6536        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     .10073E-03    32.945        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  norm          .10000E-03    5.8108        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10527E-03    203.41        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10029E-03    35.756        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .10150E-03    20.718        .61796E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  norm          .10000E-03    22.793        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10110E-03    73.862        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     .10018E-03    25.632        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     .10137E-03    26.988        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  Normalizat    2.0490        .38007        .43266E-01   -.63327    
  27  Prefactor     .20561E-11    .26654        .19226       -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.13117e-07
Minuit parameter uncertainties:
  1  9.8609
  2  0.239814
  3  0.0056779
  4  9.16805
  5  0.0153235
  6  0.0743639
  7  20.5207
  8  0.0118992
  9  0.0629264
  10  0.729275
  11  0.0259861
  12  0.00350406
  13  1.57142e-05
  14  16.8574
  15  0.000130697
  16  5.91404e-06
  17  0.00980705
  18  1.1045e-05
  19  0.0657091
  20  0.00641824
  21  0.0111657
  22  0.000159771
  23  0.0180682
  24  0.00431418
  25  0.0121635
  26  0.380632
  27  1.48731e-06
Done.

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

Extracting fit parameters...

4FGL J0340.5-2118
   Spectrum: PowerLaw
267    Prefactor:  1.000e-04  1.571e-05  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:  2.056e-12  1.487e-06  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:  2.049e+00  3.806e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 55.148 -21.316
Photon Flux Upper Limit: 3.14e-07 ph cm-2 s-1
Energy Flux Upper Limit: 2.40e-02 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/746728/likelihoodResults_356227201_356486401_4FGL_J0340.5-2118_daily_bin451.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) = 638.58884662
delta logL = -0.000851315040336

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 638.588004479
delta logL = -9.17410909551e-06

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10188E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.2513       1.0000          .0000       10.000    
     3 'Normalizat'    2.0477       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .43703E-07   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=   638.5880     FROM MIGRAD    STATUS=CONVERGED     99 CALLS      258 TOTAL
                     EDM=   .17E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    81.424        .52026E-02** at limit **
   2  Index         1.8140        7.4983        .50000        .63685E-07
   3  Normalizat    2.0490        .57152E-01    .19120E-03   -.21870E-03
   4  Prefactor     .47465E-09    .10039E-01    .73492E-02** at limit **
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 1.81403
  Normalizat = 2.04904
  Prefactor  = 4.74648e-10
 **********
 **   18 **HESSE 
 **********

 FCN=   638.5880     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      287 TOTAL
                     EDM=   .16E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    646.12        .55300E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         1.8140        6.4275        .50000       -.69085    
   3  Normalizat    2.0490        .18619        .38240E-04   -.63327    
   4  Prefactor     .47465E-09    .10627        .14698E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 1.55683e-09
Minuit parameter uncertainties:
  1  0.000591616
  2  1752.48
  3  0.186254
  4  1.42297e-05
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/746728': 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) = 638.587993898
delta logL = 1.40715144425e-06

Extracting fit parameters...

4FGL J0340.5-2118
   Spectrum: PowerLaw
267    Prefactor:  1.000e-04  5.916e-04  1.000e-04  1.000e+04 ( 1.000e-12)
268        Index:  1.814e+00  1.752e+03  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:  4.746e-10  1.423e-05  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:  2.049e+00  1.863e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 55.148 -21.316

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/746728/cmap_HighResolution_356227201_356486401_4FGL_J0340.5-2118_daily_bin451.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='2.40e-02', job_status='DONE', photon_flux_upper_limit='3.14e-07', time_completed='2021-08-18 22:54:42.191036', job_id='746728', GAL2='0.00', fit_tolerance='1e-08', EG2='2.05', EG='2.05', time_epoch_completed='1629352482.19', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.00', dlogl='1.41e-06', ts2='-0.00', photon_index_error='0.00', photon_index='2.26' WHERE bin_id='451' AND source_name='4FGL J0340.5-2118' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Wed Aug 18 22:54:42 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0045>
Subject: Job 746728: <4FGL_J0340.5-2118_daily_bin451> in cluster <slac> Done

Job <4FGL_J0340.5-2118_daily_bin451> was submitted from host <rhel6-64c> by user <kocevski> in cluster <slac> at Wed Aug 18 22:43:52 2021
Job was executed on host(s) <bullet0045>, in queue <medium>, as user <kocevski> in cluster <slac> at Wed Aug 18 22:43: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 22:43:54 2021
Terminated at Wed Aug 18 22:54:43 2021
Results reported at Wed Aug 18 22:54:43 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J0340.5-2118_daily_bin451 55.1477 -21.3158 356227201 356486401 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 :                                   619.00 sec.
    Max Memory :                                 1255 MB
    Average Memory :                             217.10 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   649 sec.
    Turnaround time :                            651 sec.

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

