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


Performing analysis on: 4FGL_J1159.3-2142_daily_bin1328
RA = 179.843, Dec = -21.7038
tmin = 583545601, tmax = 583804801
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='228593', job_status='RUN', time_executed='2021-09-04 19:01:41.465883', time_epoch_executed='1630807301.47' WHERE source_name='4FGL J1159.3-2142' and cadence='daily' and bin_id='1328'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/228593

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/228593/ft1_4FGL_J1159.3-2142_daily_bin1328.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/228593/ft2_4FGL_J1159.3-2142_daily_bin1328.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/228593/ft1_4FGL_J1159.3-2142_daily_bin1328.fits outfile=/scratch/kocevski/228593/ft1_filteredMKT_4FGL_J1159.3-2142_daily_bin1328.fits ra=179.843 dec=-21.7038 rad=12.0 tmin=583545601.0 tmax=583804801.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.48
user 3.21
sys 0.23

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/228593/ft2_4FGL_J1159.3-2142_daily_bin1328.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/228593/ft2_4FGL_J1159.3-2142_daily_bin1328.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/228593/ft1_filteredMKT_4FGL_J1159.3-2142_daily_bin1328.fits evtable="EVENTS" outfile="/scratch/kocevski/228593/ft1_filtered_4FGL_J1159.3-2142_daily_bin1328.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.49
user 0.34
sys 0.14

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/228593/ft1_filtered_4FGL_J1159.3-2142_daily_bin1328.fits" evtable="EVENTS" scfile=/scratch/kocevski/228593/ft2_4FGL_J1159.3-2142_daily_bin1328.fits sctable="SC_DATA" outfile=/scratch/kocevski/228593/ltcube_583545601_583804801_4FGL_J1159.3-2142_daily_bin1328.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/228593/ft2_4FGL_J1159.3-2142_daily_bin1328.fits
.....................!
real 11.87
user 11.49
sys 0.33

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/228593/ft1_filtered_4FGL_J1159.3-2142_daily_bin1328.fits evtable="EVENTS" scfile=/scratch/kocevski/228593/ft2_4FGL_J1159.3-2142_daily_bin1328.fits sctable="SC_DATA" expcube=/scratch/kocevski/228593/ltcube_583545601_583804801_4FGL_J1159.3-2142_daily_bin1328.fits outfile=/scratch/kocevski/228593/expmap_583545601_583804801_4FGL_J1159.3-2142_daily_bin1328.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/228593/ltcube_583545601_583804801_4FGL_J1159.3-2142_daily_bin1328.fits
.....................!
real 190.31
user 185.55
sys 4.34

Generating the xml model:
radLim = 0.001
maxRad = 12
normsOnly = True
freeVariableSources = True
Fixing all sources to their catalog values, except variable sources
Creating file and adding sources from 4FGL
Added 185 point sources and 0 extended sources

Setting source of interest to:
4FGL J1159.3-2142 @ 179.843 -21.7038

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/228593/ft1_filtered_4FGL_J1159.3-2142_daily_bin1328.fits scfile=/scratch/kocevski/228593/ft2_4FGL_J1159.3-2142_daily_bin1328.fits outfile=/scratch/kocevski/228593/cmap_583545601_583804801_4FGL_J1159.3-2142_daily_bin1328.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=179.843 yref=-21.7038 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.56
user 0.37
sys 0.17

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/228593/ft1_filtered_4FGL_J1159.3-2142_daily_bin1328.fits scfile=/scratch/kocevski/228593/ft2_4FGL_J1159.3-2142_daily_bin1328.fits outfile=/scratch/kocevski/228593/cmap_HighResolution_583545601_583804801_4FGL_J1159.3-2142_daily_bin1328.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=179.843 yref=-21.7038 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.55
user 0.38
sys 0.16

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/228593/ft1_filtered_4FGL_J1159.3-2142_daily_bin1328.fits evtable="EVENTS" scfile=/scratch/kocevski/228593/ft2_4FGL_J1159.3-2142_daily_bin1328.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/228593/Model_4FGL_J1159.3-2142_daily_bin1328.xml irfs="P8R3_SOURCE_V2" evclsmin=0 evclass="INDEF" evtype="INDEF" convert=yes chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

adding source EG_v02
adding source GAL_V02
Working on...
/scratch/kocevski/228593/ft1_filtered_4FGL_J1159.3-2142_daily_bin1328.fits.....................!
real 63.86
user 61.96
sys 1.22

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/228593/ft1_filtered_4FGL_J1159.3-2142_daily_bin1328.fits', '/scratch/kocevski/228593/ft2_4FGL_J1159.3-2142_daily_bin1328.fits', expMap='/scratch/kocevski/228593/expmap_583545601_583804801_4FGL_J1159.3-2142_daily_bin1328.fits', expCube='/scratch/kocevski/228593/ltcube_583545601_583804801_4FGL_J1159.3-2142_daily_bin1328.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/228593/Model_4FGL_J1159.3-2142_daily_bin1328.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1159.3-2142'

4FGL J1159.3-2142
   Spectrum: LogParabola
308         norm:  3.158e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-12)
309        alpha:  2.383e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
310         beta:  1.306e-01  0.000e+00  0.000e+00  1.000e+01 ( 1.000e+00) fixed
311           Eb:  8.690e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/228593/ft1_filtered_4FGL_J1159.3-2142_daily_bin1328.fits
Spacecraft file(s): /scratch/kocevski/228593/ft2_4FGL_J1159.3-2142_daily_bin1328.fits
Exposure map: /scratch/kocevski/228593/expmap_583545601_583804801_4FGL_J1159.3-2142_daily_bin1328.fits
Exposure cube: /scratch/kocevski/228593/ltcube_583545601_583804801_4FGL_J1159.3-2142_daily_bin1328.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/228593/Model_4FGL_J1159.3-2142_daily_bin1328.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) = 7028.98688462

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

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 '    .10015E-03   1.0000         .10000E-03   10000.    
     6 'norm      '    .10404E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    3.3346       1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    2.0166       1.0000         .10000E-03   10000.    
    10 'Prefactor '    4.4033       1.0000         .10000E-03   10000.    
    11 'Prefactor '    20.996       1.0000         .10000E-03   10000.    
    12 'norm      '    10.646       1.0000         .10000E-03   10000.    
    13 'Prefactor '    10.109       1.0000         .10000E-03   10000.    
    14 'norm      '    .10060E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10011E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    50.190       1.0000         .10000E-03   10000.    
    17 'Prefactor '    3.1070       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10019E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    43.915       1.0000         .10000E-03   10000.    
    20 'Prefactor '    24.819       1.0000         .10000E-03   10000.    
    21 'Prefactor '    7.3530       1.0000         .10000E-03   10000.    
    22 'Prefactor '    9.3413       1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    24 'norm      '    1.1172       1.0000         .10000E-03   10000.    
    25 'Normalizat'    1.1797       1.0000         .10000E-01   10.000    
    26 'Prefactor '    1.1171       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5930E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   7028.978     FROM MIGRAD    STATUS=CONVERGED    608 CALLS     3079 TOTAL
                     EDM=   .38E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  4.5%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    11.753        .17657E-06** at limit **
   2  Prefactor     .10000E-03    28.473        .77463E-06** at limit **
   3  Prefactor     .10000E-03    21.386       -.80288E-06** at limit **
   4  Prefactor     .10000E-03    8.4093       -.39926E-08** at limit **
   5  Prefactor     .10000E-03    63.011        .16995E-05** at limit **
   6  norm          .10000E-03    .48096       -.20810E-07** at limit **
   7  Prefactor     3.3352        8.8728        .37766E-05   -.95967E-05
   8  Prefactor     .10000E-03    46.758       -.22349E-05** at limit **
   9  Prefactor     2.0114        6.5285        .77411E-06   -.13478E-04
  10  Prefactor     4.4040        26.079        .33510E-05    .27954E-05
  11  Prefactor     21.004        21.692       -.27088E-06   -.11607E-04
  12  norm          10.646        18.004        .10676E-06   -.15155E-05
  13  Prefactor     10.115        18.564        .37731E-06   -.17252E-04
  14  norm          .10000E-03    4.7776        .28424E-09** at limit **
  15  Prefactor     .10000E-03    1.9570       -.10367E-06** at limit **
  16  Prefactor     50.192        75.098       -.11535E-06   -.28209E-04
  17  Prefactor     3.0987        60.338        .19815E-05   -.50303E-05
  18  Prefactor     .10000E-03    25.534        .16704E-05** at limit **
  19  Prefactor     43.923        56.096       -.12016E-05   -.50840E-04
  20  Prefactor     24.816        32.136        .50164E-06   -.16411E-04
  21  Prefactor     7.3529        9.2981        .11719E-05   -.27416E-04
  22  Prefactor     9.3412        3.4816       -.10693E-06    .50881E-05
  23  Prefactor     .10000E-03    10.391       -.96356E-07** at limit **
  24  norm          1.1170        1.4070        .80277E-07   -.53464E-04
  25  Normalizat    1.1795        .25663       -.15252E-05    .12485E-04
  26  Prefactor     1.1172        .13352       -.15147E-07   -.62086E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 3.33517
  Prefactor  = 0.0001
  Prefactor  = 2.01137
  Prefactor  = 4.40405
  Prefactor  = 21.0039
  norm       = 10.6455
  Prefactor  = 10.1152
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 50.1917
  Prefactor  = 3.09868
  Prefactor  = 0.000100001
  Prefactor  = 43.9233
  Prefactor  = 24.8161
  Prefactor  = 7.35288
  Prefactor  = 9.34116
  Prefactor  = 0.0001
  norm       = 1.117
  Normalizat = 1.17953
  Prefactor  = 1.11722
 **********
 **   18 **HESSE 
 **********

 FCN=   7028.978     FROM HESSE     STATUS=OK           456 CALLS     3535 TOTAL
                     EDM=   .16E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    11.754        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    28.465        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .10000E-03    21.418        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    8.4728        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    63.231        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  norm          .10000E-03    4.0604        .11236E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     3.3352        8.8723        .11083E-02   -1.5343    
   8  Prefactor     .10000E-03    46.702        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     2.0114        6.4968        .29147E-03   -1.5424    
  10  Prefactor     4.4040        26.077        .95961E-03   -1.5288    
  11  Prefactor     21.004        21.647        .87412E-04   -1.4791    
  12  norm          10.646        18.012        .12279E-03   -1.5055    
  13  Prefactor     10.115        18.427        .12602E-03   -1.5072    
  14  norm          .10000E-03    4.8092        .17762E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .10000E-03    1.9679        .11451E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     50.192        74.887        .56606E-04   -1.4290    
  17  Prefactor     3.0987        60.208        .23005E-03   -1.5356    
  18  Prefactor     .10000E-03    25.918        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     43.923        56.331        .60498E-04   -1.4381    
  20  Prefactor     24.816        32.116        .80407E-04   -1.4711    
  21  Prefactor     7.3529        9.3017        .73956E-03   -1.5166    
  22  Prefactor     9.3412        3.4843        .87253E-04   -1.5097    
  23  Prefactor     .10000E-03    10.470        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  norm          1.1170        1.3791        .10708E-03   -1.5497    
  25  Normalizat    1.1795        .29629        .35689E-03   -.87238    
  26  Prefactor     1.1172        .15614        .19559E-03   -.88918    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.57441e-10
Minuit parameter uncertainties:
  1  1.39562e-06
  2  8.43144e-06
  3  1.30181e-05
  4  8.35463e-08
  5  0.000133851
  6  4.02634e-06
  7  8.87575
  8  0.000124409
  9  6.49911
  10  21.447
  11  21.6555
  12  18.0215
  13  18.4368
  14  1.23687e-06
  15  8.16584e-06
  16  75.0282
  17  27.3491
  18  0.000265281
  19  56.399
  20  32.1383
  21  9.30357
  22  3.48438
  23  7.79004e-06
  24  1.37913
  25  0.296715
  26  0.156207
Done.

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

Extracting fit parameters...

4FGL J1159.3-2142
   Spectrum: LogParabola
308         norm:  1.000e-04  1.237e-06  1.000e-04  1.000e+04 ( 1.000e-12)
309        alpha:  2.383e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
310         beta:  1.306e-01  0.000e+00  0.000e+00  1.000e+01 ( 1.000e+00) fixed
311           Eb:  8.690e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
590    Prefactor:  1.117e+00  1.562e-01  0.000e+00  1.000e+01 ( 1.000e+00)
591        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
592        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
589   Normalization:  1.180e+00  2.967e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 179.843 -21.704
Photon Flux Upper Limit: 1.07e-07 ph cm-2 s-1
Energy Flux Upper Limit: 3.69e-05 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/228593/likelihoodResults_583545601_583804801_4FGL_J1159.3-2142_daily_bin1328.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) = 7028.97864058
delta logL = -0.000991406303001

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 7028.97763467
delta logL = 1.44971809277e-05

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .15461E-03   1.0000         .10000E-03   10000.    
     2 'alpha     '    3.5669       1.0000          .0000       5.0000    
     3 'Normalizat'    1.1795       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1172       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5930E+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.
 MIGRAD TERMINATED WITHOUT CONVERGENCE.

 FCN=   7028.977     FROM MIGRAD    STATUS=FAILED       120 CALLS      316 TOTAL
                     EDM=   .22E-04    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .79980E-01    1307.4        .12252E-02    .45503E-03
   2  alpha         3.4850        4.0739        .15045        .18882E-03
   3  Normalizat    1.1759        .18973        .35736E-03    .36825E-03
   4  Prefactor     1.1180        .73331E-01    .19552E-03    .37918E-03
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   7028.977     FROM SIMPLEX   STATUS=UNCHANGED    102 CALLS      418 TOTAL
                     EDM=   .92E-05    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .79980E-01    1307.4        .42958E-03    .45503E-03
   2  alpha         3.4850        4.0739        .25724E-02    .18882E-03
   3  Normalizat    1.1759        .18973        .67139E-04    .36825E-03
   4  Prefactor     1.1180        .73331E-01    .12875E-04    .37918E-03
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   7028.977     FROM MIGRAD    STATUS=CONVERGED     32 CALLS      450 TOTAL
                     EDM=   .34E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .79947E-01    14.229        .49009E-04    .19114E-03
   2  alpha         3.4851        3.9796        .30089E-01    .48854E-05
   3  Normalizat    1.1759        .29378        .71472E-04    .32507E-03
   4  Prefactor     1.1180        .15295        .39104E-04    .34102E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 0.079947
  alpha      = 3.48511
  Normalizat = 1.17586
  Prefactor  = 1.11802
 **********
 **   18 **HESSE 
 **********

 FCN=   7028.977     FROM HESSE     STATUS=OK            25 CALLS      475 TOTAL
                     EDM=   .34E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .79947E-01    11.333        .19604E-05   -1.5651    
   2  alpha         3.4851        4.1541        .12036E-02    .40503    
   3  Normalizat    1.1759        .29369        .14294E-04   -.87352    
   4  Prefactor     1.1180        .15302        .78209E-05   -.88893    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.40987e-10
Minuit parameter uncertainties:
  1  1.90293
  2  5.40962
  3  0.294106
  4  0.153076
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/228593': 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) = 7028.97664136
delta logL = 0.00100781601213

Extracting fit parameters...

4FGL J1159.3-2142
   Spectrum: LogParabola
308         norm:  7.995e-02  1.903e+00  1.000e-04  1.000e+04 ( 1.000e-12)
309        alpha:  3.485e+00  5.410e+00  0.000e+00  5.000e+00 ( 1.000e+00)
310         beta:  1.306e-01  0.000e+00  0.000e+00  1.000e+01 ( 1.000e+00) fixed
311           Eb:  8.690e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
590    Prefactor:  1.118e+00  1.531e-01  0.000e+00  1.000e+01 ( 1.000e+00)
591        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
592        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
589   Normalization:  1.176e+00  2.941e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 179.843 -21.704

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/228593/cmap_HighResolution_583545601_583804801_4FGL_J1159.3-2142_daily_bin1328.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='3.69e-05', job_status='DONE', photon_flux_upper_limit='1.07e-07', time_completed='2021-09-04 19:15:18.591765', job_id='228593', GAL2='1.12', fit_tolerance='1e-08', EG2='1.18', EG='1.18', time_epoch_completed='1630808118.59', return_code2='0', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.12', dlogl='1.01e-03', ts2='0.00', photon_index_error='0.00', photon_index='2.38' WHERE bin_id='1328' AND source_name='4FGL J1159.3-2142' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep  4 19:15:18 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0089>
Subject: Job 228593: <4FGL_J1159.3-2142_daily_bin1328> in cluster <slac> Done

Job <4FGL_J1159.3-2142_daily_bin1328> was submitted from host <rhel6-64d> by user <kocevski> in cluster <slac> at Sat Sep  4 19:00:57 2021
Job was executed on host(s) <bullet0089>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Sep  4 19:00:58 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Sat Sep  4 19:00:58 2021
Terminated at Sat Sep  4 19:15:19 2021
Results reported at Sat Sep  4 19:15:19 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1159.3-2142_daily_bin1328 179.843 -21.7038 583545601 583804801 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1159.3-2142 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   814.06 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             301.90 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   860 sec.
    Turnaround time :                            862 sec.

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

