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


Performing analysis on: 4FGL_J0939.3-1732_daily_bin1517
RA = 144.836, Dec = -17.5418
tmin = 632534401, tmax = 632793601
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='385402', job_status='RUN', time_executed='2021-08-31 20:01:07.946899', time_epoch_executed='1630465267.95' WHERE source_name='4FGL J0939.3-1732' and cadence='daily' and bin_id='1517'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/385402

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/385402/ft1_4FGL_J0939.3-1732_daily_bin1517.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/385402/ft2_4FGL_J0939.3-1732_daily_bin1517.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/385402/ft1_4FGL_J0939.3-1732_daily_bin1517.fits outfile=/scratch/kocevski/385402/ft1_filteredMKT_4FGL_J0939.3-1732_daily_bin1517.fits ra=144.836 dec=-17.5418 rad=12.0 tmin=632534401.0 tmax=632793601.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.64
user 3.31
sys 0.23

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/385402/ft2_4FGL_J0939.3-1732_daily_bin1517.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/385402/ft2_4FGL_J0939.3-1732_daily_bin1517.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/385402/ft1_filteredMKT_4FGL_J0939.3-1732_daily_bin1517.fits evtable="EVENTS" outfile="/scratch/kocevski/385402/ft1_filtered_4FGL_J0939.3-1732_daily_bin1517.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.48
user 0.33
sys 0.14

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/385402/ft1_filtered_4FGL_J0939.3-1732_daily_bin1517.fits" evtable="EVENTS" scfile=/scratch/kocevski/385402/ft2_4FGL_J0939.3-1732_daily_bin1517.fits sctable="SC_DATA" outfile=/scratch/kocevski/385402/ltcube_632534401_632793601_4FGL_J0939.3-1732_daily_bin1517.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/385402/ft2_4FGL_J0939.3-1732_daily_bin1517.fits
.....................!
real 11.68
user 11.36
sys 0.27

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/385402/ft1_filtered_4FGL_J0939.3-1732_daily_bin1517.fits evtable="EVENTS" scfile=/scratch/kocevski/385402/ft2_4FGL_J0939.3-1732_daily_bin1517.fits sctable="SC_DATA" expcube=/scratch/kocevski/385402/ltcube_632534401_632793601_4FGL_J0939.3-1732_daily_bin1517.fits outfile=/scratch/kocevski/385402/expmap_632534401_632793601_4FGL_J0939.3-1732_daily_bin1517.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/385402/ltcube_632534401_632793601_4FGL_J0939.3-1732_daily_bin1517.fits
.....................!
real 191.39
user 186.38
sys 4.60

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 169 point sources and 0 extended sources

Setting source of interest to:
4FGL J0939.3-1732 @ 144.836 -17.5418

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/385402/ft1_filtered_4FGL_J0939.3-1732_daily_bin1517.fits scfile=/scratch/kocevski/385402/ft2_4FGL_J0939.3-1732_daily_bin1517.fits outfile=/scratch/kocevski/385402/cmap_632534401_632793601_4FGL_J0939.3-1732_daily_bin1517.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=144.836 yref=-17.5418 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.54
user 0.39
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/385402/ft1_filtered_4FGL_J0939.3-1732_daily_bin1517.fits scfile=/scratch/kocevski/385402/ft2_4FGL_J0939.3-1732_daily_bin1517.fits outfile=/scratch/kocevski/385402/cmap_HighResolution_632534401_632793601_4FGL_J0939.3-1732_daily_bin1517.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=144.836 yref=-17.5418 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.54
user 0.38
sys 0.15

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/385402/ft1_filtered_4FGL_J0939.3-1732_daily_bin1517.fits evtable="EVENTS" scfile=/scratch/kocevski/385402/ft2_4FGL_J0939.3-1732_daily_bin1517.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/385402/Model_4FGL_J0939.3-1732_daily_bin1517.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/385402/ft1_filtered_4FGL_J0939.3-1732_daily_bin1517.fits.....................!
real 89.32
user 87.77
sys 1.18

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/385402/ft1_filtered_4FGL_J0939.3-1732_daily_bin1517.fits', '/scratch/kocevski/385402/ft2_4FGL_J0939.3-1732_daily_bin1517.fits', expMap='/scratch/kocevski/385402/expmap_632534401_632793601_4FGL_J0939.3-1732_daily_bin1517.fits', expCube='/scratch/kocevski/385402/ltcube_632534401_632793601_4FGL_J0939.3-1732_daily_bin1517.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/385402/Model_4FGL_J0939.3-1732_daily_bin1517.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J0939.3-1732'

4FGL J0939.3-1732
   Spectrum: PowerLaw
260    Prefactor:  3.013e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-13)
261        Index:  2.263e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
262        Scale:  1.278e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/385402/ft1_filtered_4FGL_J0939.3-1732_daily_bin1517.fits
Spacecraft file(s): /scratch/kocevski/385402/ft2_4FGL_J0939.3-1732_daily_bin1517.fits
Exposure map: /scratch/kocevski/385402/expmap_632534401_632793601_4FGL_J0939.3-1732_daily_bin1517.fits
Exposure cube: /scratch/kocevski/385402/ltcube_632534401_632793601_4FGL_J0939.3-1732_daily_bin1517.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/385402/Model_4FGL_J0939.3-1732_daily_bin1517.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) = 8670.20447933

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10027E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    2.8666       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .17287E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .50965E-02   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10016E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .16573E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    9.8903       1.0000         .10000E-03   10000.    
     8 'norm      '    .10048E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    .97126       1.0000         .10000E-03   10000.    
    10 'norm      '    .10004E-03   1.0000         .10000E-03   10000.    
    11 'norm      '    10.985       1.0000         .10000E-03   10000.    
    12 'norm      '    1.0100       1.0000         .10000E-03   10000.    
    13 'norm      '    6.3429       1.0000         .10000E-03   10000.    
    14 'norm      '    4.8307       1.0000         .10000E-03   10000.    
    15 'Prefactor '    4.6831       1.0000         .10000E-03   10000.    
    16 'Normalizat'    .94219       1.0000         .10000E-01   10.000    
    17 'Prefactor '    .88073       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5570E+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=   8669.614     FROM MIGRAD    STATUS=FAILED       585 CALLS     1687 TOTAL
                     EDM=   .20E-07    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    2.7783        .15017E-02** at limit **
   2  Prefactor     2.8786        8.0064        .12004E-02    .26713E-02
   3  Prefactor     .10000E-03    16.231        .33082E-02** at limit **
   4  Prefactor     .10173E-03    20.546        .11273    ** at limit **
   5  Prefactor     .10000E-03    9.2501        .18142E-02** at limit **
   6  Prefactor     .10000E-03    13.218        .18142E-02** at limit **
   7  Prefactor     9.9298        9.5812        .12742E-03    .11242E-03
   8  norm          .10000E-03    2.5542        .14392E-02** at limit **
   9  norm          .97409        4.9451        .39642E-03    .10763E-02
  10  norm          .10000E-03    .91085        .86592E-03** at limit **
  11  norm          11.020        7.4686        .12088E-03   -.46272E-04
  12  norm          1.0101        .95132        .81394E-03   -.58334E-03
  13  norm          6.3437        6.7110        .79687E-03    .14305E-02
  14  norm          4.8303        1.3117        .53188E-04    .82548E-03
  15  Prefactor     4.6835        4.9177        .18596E-03   -.28122E-05
  16  Normalizat    .94206        .18299        .28836E-03    .28220E-03
  17  Prefactor     .88078        .10222        .17009E-03    .87615E-03
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   8669.614     FROM SIMPLEX   STATUS=UNCHANGED    841 CALLS     2528 TOTAL
                     EDM=   .17E-04    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    2.7783        .25241E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     2.8786        8.0064        .10415E-06   -1.5369    
   3  Prefactor     .10000E-03    16.231        .48150E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10173E-03    20.546        .24324E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    9.2501        .32252E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    13.218        .30707E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     9.9298        9.5812        .97858E-07   -1.5078    
   8  norm          .10000E-03    2.5542        .18377E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          .97409        4.9451        .10434E-06   -1.5511    
  10  norm          .10000E-03    .91085        .81650E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  norm          11.020        7.4686        .10926E-06   -1.5044    
  12  norm          1.0101        .95132        .10649E-06   -1.5507    
  13  norm          6.3437        6.7110        .13957E-06   -1.5204    
  14  norm          4.8303        1.3117        .10636E-06   -1.5268    
  15  Prefactor     4.6835        4.9177        .10328E-06   -1.5275    
  16  Normalizat    .94206        .18299        .67402E-07   -.94998    
  17  Prefactor     .88078        .10222        .63271E-07   -.96816    
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   8669.614     FROM MIGRAD    STATUS=CONVERGED    224 CALLS     2752 TOTAL
                     EDM=   .20E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    2.7796        .30033E-03** at limit **
   2  Prefactor     2.8775        8.0041        .48018E-04   -.18941E-05
   3  Prefactor     .10000E-03    16.422        .66165E-03** at limit **
   4  Prefactor     .10168E-03    19.714        .11604    ** at limit **
   5  Prefactor     .10000E-03    9.2504        .36285E-03** at limit **
   6  Prefactor     .10000E-03    13.220        .36285E-03** at limit **
   7  Prefactor     9.9298        9.5810        .50967E-05    .13384E-04
   8  norm          .10000E-03    2.5554        .28784E-03** at limit **
   9  norm          .97388        4.9434        .15857E-04    .25811E-05
  10  norm          .10000E-03    .91088        .17318E-03** at limit **
  11  norm          11.020        7.4686        .48352E-05    .18810E-05
  12  norm          1.0101        .95143        .32558E-04   -.23745E-05
  13  norm          6.3435        6.7101        .31875E-04    .14267E-05
  14  norm          4.8303        1.3117        .21275E-05    .10687E-04
  15  Prefactor     4.6835        4.9177        .74384E-05    .61135E-06
  16  Normalizat    .94206        .18308        .11535E-04    .31934E-04
  17  Prefactor     .88077        .10230        .34017E-04    .43714E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 2.87755
  Prefactor  = 0.0001
  Prefactor  = 0.000101676
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 9.92976
  norm       = 0.0001
  norm       = 0.97388
  norm       = 0.0001
  norm       = 11.02
  norm       = 1.01007
  norm       = 6.34349
  norm       = 4.83026
  Prefactor  = 4.68352
  Normalizat = 0.942061
  Prefactor  = 0.880774
 **********
 **   18 **HESSE 
 **********

 FCN=   8669.614     FROM HESSE     STATUS=OK           215 CALLS     2967 TOTAL
                     EDM=   .21E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    2.7796        .60067E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     2.8775        8.0009        .19207E-05   -1.5369    
   3  Prefactor     .10000E-03    16.430        .13233E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10168E-03    19.951        .11506       -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    9.2505        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    13.220        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     9.9298        9.5754        .10193E-05   -1.5078    
   8  norm          .10000E-03    2.5554        .57569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          .97388        4.9403        .31714E-05   -1.5511    
  10  norm          .10000E-03    .91089        .34637E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  norm          11.020        7.4668        .96705E-06   -1.5044    
  12  norm          1.0101        .95143        .65115E-05   -1.5507    
  13  norm          6.3435        6.7100        .12750E-05   -1.5204    
  14  norm          4.8303        1.3113        .42551E-06   -1.5268    
  15  Prefactor     4.6835        4.9163        .14877E-05   -1.5275    
  16  Normalizat    .94206        .18287        .23069E-05   -.94998    
  17  Prefactor     .88077        .10223        .68034E-05   -.96816    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.05812e-12
Minuit parameter uncertainties:
  1  4.40472e-08
  2  8.00386
  3  7.75047e-06
  4  0.0115702
  5  1.87381e-07
  6  3.87539e-06
  7  9.57692
  8  1.96856e-07
  9  4.38727
  10  3.47273e-08
  11  7.46738
  12  0.951446
  13  6.71078
  14  1.31135
  15  4.91668
  16  0.182992
  17  0.102249
Done.

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

Extracting fit parameters...

4FGL J0939.3-1732
   Spectrum: PowerLaw
260    Prefactor:  9.930e+00  9.577e+00  1.000e-04  1.000e+04 ( 1.000e-13)
261        Index:  2.263e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
262        Scale:  1.278e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
554    Prefactor:  8.808e-01  1.022e-01  0.000e+00  1.000e+01 ( 1.000e+00)
555        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
556        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
553   Normalization:  9.421e-01  1.830e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 1.92
Ra Dec: 144.836 -17.542
Photon Index (Fixed Index): 2.26 +/- 0.00
Photon Flux (Fixed Index): 2.51e-08 +/- 2.42e-08
Energy Flux (Fixed Index): 1.01e-05 +/- 9.73e-06

TS (Fixed Index): 1.92
Ra Dec: 144.836 -17.542
Photon Flux Upper Limit: 8.29e-08 ph cm-2 s-1
Energy Flux Upper Limit: 6.35e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/385402/likelihoodResults_632534401_632793601_4FGL_J0939.3-1732_daily_bin1517.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) = 8669.50838233
delta logL = 0.105336811497

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 8669.50256893
delta logL = 0.11115020647

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    6.1728       1.0000         .10000E-03   10000.    
     2 'Index     '    2.8200       1.0000          .0000       10.000    
     3 'Normalizat'    .91319       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .89049       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5570E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
 MACHINE ACCURACY LIMITS FURTHER IMPROVEMENT.

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
 MIGRAD TERMINATED WITHOUT CONVERGENCE.

 FCN=   8669.503     FROM MIGRAD    STATUS=FAILED       105 CALLS      307 TOTAL
                     EDM=   .15E-05    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     6.1622        180.81        .80791E-03   -.10931E-03
   2  Index         2.8227        6.0942        .73836E-02    .72479E-03
   3  Normalizat    .91297        .34038        .29247E-03   -.85674E-04
   4  Prefactor     .89057        .14706        .16925E-03   -.16599E-03
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   8669.503     FROM SIMPLEX   STATUS=UNCHANGED     91 CALLS      398 TOTAL
                     EDM=   .77E-05    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     6.1622        180.81        .12478E-03   -.10931E-03
   2  Index         2.8227        6.0942        .10071E-02    .72479E-03
   3  Normalizat    .91297        .34038        .22084E-03   -.85674E-04
   4  Prefactor     .89057        .14706        .95554E-04   -.16599E-03
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   8669.503     FROM MIGRAD    STATUS=CONVERGED     34 CALLS      432 TOTAL
                     EDM=   .15E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     6.1622        12.550        .32316E-04   -.12313E-03
   2  Index         2.8227        1.3558        .14767E-02   -.24543E-04
   3  Normalizat    .91297        .19272        .11699E-04   -.85518E-04
   4  Prefactor     .89057        .10558        .33851E-04   -.16604E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 6.16222
  Index      = 2.82266
  Normalizat = 0.912975
  Prefactor  = 0.890567
 **********
 **   18 **HESSE 
 **********

 FCN=   8669.503     FROM HESSE     STATUS=OK            23 CALLS      455 TOTAL
                     EDM=   .16E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     6.1622        11.450        .12927E-05   -1.5211    
   2  Index         2.8227        1.2396        .59069E-04   -.45056    
   3  Normalizat    .91297        .19100        .23397E-05   -.96006    
   4  Prefactor     .89057        .10509        .67701E-05   -.96471    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.57624e-11
Minuit parameter uncertainties:
  1  11.4541
  2  1.25588
  3  0.191143
  4  0.105118
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/385402': 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) = 8669.50256399
delta logL = 0.11115515221

Extracting fit parameters...

4FGL J0939.3-1732
   Spectrum: PowerLaw
260    Prefactor:  6.162e+00  1.145e+01  1.000e-04  1.000e+04 ( 1.000e-13)
261        Index:  2.823e+00  1.256e+00  0.000e+00  1.000e+01 (-1.000e+00)
262        Scale:  1.278e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
554    Prefactor:  8.906e-01  1.051e-01  0.000e+00  1.000e+01 ( 1.000e+00)
555        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
556        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
553   Normalization:  9.130e-01  1.911e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 2.18
Ra Dec: 144.836 -17.542
Photon Index (Free Index): 2.82 +/- 1.26
Photon Flux (Free Index): 4.50e-08 +/- 5.25e-08
Energy Flux (Free Index): 9.92e-06 +/- 8.07e-06

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/385402/cmap_HighResolution_632534401_632793601_4FGL_J0939.3-1732_daily_bin1517.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='6.35e-03', comment='SUCCESS', photon_flux='2.51e-08', energy_flux2='9.92e-06', photon_flux_error='2.42e-08', dlogl='1.11e-01', energy_flux='1.01e-05', photon_flux2='4.50e-08', job_status='DONE', time_completed='2021-08-31 20:14:03.495694', photon_index_error2='1.26', photon_index2='2.82', ts='1.92', fit_tolerance='1e-08', GAL='0.88', photon_index_error='0.00', photon_flux_upper_limit='8.29e-08', energy_flux_error2='8.07e-06', EG='0.94', time_epoch_completed='1630466043.5', return_code='0', job_id='385402', GAL2='0.89', EG2='0.91', return_code2='0', energy_flux_error='9.73e-06', photon_flux_error2='5.25e-08', ts2='2.18', photon_index='2.26' WHERE bin_id='1517' AND source_name='4FGL J0939.3-1732' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Tue Aug 31 20:14:03 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0169>
Subject: Job 385402: <4FGL_J0939.3-1732_daily_bin1517> in cluster <slac> Done

Job <4FGL_J0939.3-1732_daily_bin1517> was submitted from host <rhel6-64q> by user <kocevski> in cluster <slac> at Tue Aug 31 20:00:43 2021
Job was executed on host(s) <bullet0169>, in queue <medium>, as user <kocevski> in cluster <slac> at Tue Aug 31 20:00:44 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Tue Aug 31 20:00:44 2021
Terminated at Tue Aug 31 20:14:04 2021
Results reported at Tue Aug 31 20:14:04 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J0939.3-1732_daily_bin1517 144.836 -17.5418 632534401 632793601 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J0939.3-1732 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   760.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             319.52 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   799 sec.
    Turnaround time :                            801 sec.

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

