/nfs/farm/g/glast/g/LCRepository/bin/miniconda2/envs/fermitools_v1.0.5/lib/python2.7/site-packages/pyfits/__init__.py:22: PyFITSDeprecationWarning: PyFITS is deprecated, please use astropy.io.fits
  PyFITSDeprecationWarning)  # noqa

Likelihood Analysis Tool
Support Contact: Daniel Kocevski (daniel.kocevski@nasa.gov)


Waiting 9 seconds before starting...
Proceeding.

Importing modules...
This is make3FGLxml version 01r0.
The default diffuse model files and names are for pass 8 and assume you have v10r00p05 of the Fermi Science Tools or higher.
This is make4FGLxml version 01r04.
The default diffuse model files and names are for pass 8 and 4FGL and assume you have v11r5p3 of the Fermi Science Tools or higher.

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

/nfs/farm/g/glast/g/LCRepository/bin/miniconda2/envs/fermitools_v1.0.5/lib/python2.7/site-packages/matplotlib/cbook/deprecation.py:106: MatplotlibDeprecationWarning: The mpl_toolkits.axes_grid module was deprecated in version 2.1. Use mpl_toolkits.axes_grid1 and mpl_toolkits.axisartist provies the same functionality instead.
  warnings.warn(message, mplDeprecation, stacklevel=1)

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

number of points = 7352
number of fields = 30
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J1238.3-1959_daily_bin1420
RA = 189.594, Dec = -19.9945
tmin = 607392001, tmax = 607651201
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='854579', job_status='RUN', time_executed='2021-09-06 02:26:17.267039', time_epoch_executed='1630920377.27' WHERE source_name='4FGL J1238.3-1959' and cadence='daily' and bin_id='1420'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/854579

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/854579/ft1_4FGL_J1238.3-1959_daily_bin1420.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/854579/ft2_4FGL_J1238.3-1959_daily_bin1420.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/854579/ft1_4FGL_J1238.3-1959_daily_bin1420.fits outfile=/scratch/kocevski/854579/ft1_filteredMKT_4FGL_J1238.3-1959_daily_bin1420.fits ra=189.594 dec=-19.9945 rad=12.0 tmin=607392001.0 tmax=607651201.0 emin=100.0 emax=100000.0 zmin=0.0 zmax=90.0 evclass=128 evtype="INDEF" convtype=-1 phasemin=0.0 phasemax=1.0 evtable="EVENTS" chatter=2 clobber=yes debug=no gui=no mode="ql"

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

Done.
real 5.28
user 5.01
sys 0.22

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/854579/ft2_4FGL_J1238.3-1959_daily_bin1420.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/854579/ft2_4FGL_J1238.3-1959_daily_bin1420.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/854579/ft1_filteredMKT_4FGL_J1238.3-1959_daily_bin1420.fits evtable="EVENTS" outfile="/scratch/kocevski/854579/ft1_filtered_4FGL_J1238.3-1959_daily_bin1420.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.68
user 0.36
sys 0.14

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/854579/ft1_filtered_4FGL_J1238.3-1959_daily_bin1420.fits" evtable="EVENTS" scfile=/scratch/kocevski/854579/ft2_4FGL_J1238.3-1959_daily_bin1420.fits sctable="SC_DATA" outfile=/scratch/kocevski/854579/ltcube_607392001_607651201_4FGL_J1238.3-1959_daily_bin1420.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/854579/ft2_4FGL_J1238.3-1959_daily_bin1420.fits
.....................!
real 13.60
user 13.21
sys 0.34

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/854579/ft1_filtered_4FGL_J1238.3-1959_daily_bin1420.fits evtable="EVENTS" scfile=/scratch/kocevski/854579/ft2_4FGL_J1238.3-1959_daily_bin1420.fits sctable="SC_DATA" expcube=/scratch/kocevski/854579/ltcube_607392001_607651201_4FGL_J1238.3-1959_daily_bin1420.fits outfile=/scratch/kocevski/854579/expmap_607392001_607651201_4FGL_J1238.3-1959_daily_bin1420.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/854579/ltcube_607392001_607651201_4FGL_J1238.3-1959_daily_bin1420.fits
.....................!
real 192.02
user 186.71
sys 4.80

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 J1238.3-1959 @ 189.594 -19.9945

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/854579/ft1_filtered_4FGL_J1238.3-1959_daily_bin1420.fits scfile=/scratch/kocevski/854579/ft2_4FGL_J1238.3-1959_daily_bin1420.fits outfile=/scratch/kocevski/854579/cmap_607392001_607651201_4FGL_J1238.3-1959_daily_bin1420.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=189.594 yref=-19.9945 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.59
user 0.40
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/854579/ft1_filtered_4FGL_J1238.3-1959_daily_bin1420.fits scfile=/scratch/kocevski/854579/ft2_4FGL_J1238.3-1959_daily_bin1420.fits outfile=/scratch/kocevski/854579/cmap_HighResolution_607392001_607651201_4FGL_J1238.3-1959_daily_bin1420.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=189.594 yref=-19.9945 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.65
user 0.42
sys 0.14

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/854579/ft1_filtered_4FGL_J1238.3-1959_daily_bin1420.fits evtable="EVENTS" scfile=/scratch/kocevski/854579/ft2_4FGL_J1238.3-1959_daily_bin1420.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/854579/Model_4FGL_J1238.3-1959_daily_bin1420.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/854579/ft1_filtered_4FGL_J1238.3-1959_daily_bin1420.fits.....................!
real 48.41
user 46.78
sys 1.25

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/854579/ft1_filtered_4FGL_J1238.3-1959_daily_bin1420.fits', '/scratch/kocevski/854579/ft2_4FGL_J1238.3-1959_daily_bin1420.fits', expMap='/scratch/kocevski/854579/expmap_607392001_607651201_4FGL_J1238.3-1959_daily_bin1420.fits', expCube='/scratch/kocevski/854579/ltcube_607392001_607651201_4FGL_J1238.3-1959_daily_bin1420.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/854579/Model_4FGL_J1238.3-1959_daily_bin1420.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1238.3-1959'

4FGL J1238.3-1959
   Spectrum: PowerLaw
307    Prefactor:  3.073e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-13)
308        Index:  2.151e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
309        Scale:  1.503e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/854579/ft1_filtered_4FGL_J1238.3-1959_daily_bin1420.fits
Spacecraft file(s): /scratch/kocevski/854579/ft2_4FGL_J1238.3-1959_daily_bin1420.fits
Exposure map: /scratch/kocevski/854579/expmap_607392001_607651201_4FGL_J1238.3-1959_daily_bin1420.fits
Exposure cube: /scratch/kocevski/854579/ltcube_607392001_607651201_4FGL_J1238.3-1959_daily_bin1420.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/854579/Model_4FGL_J1238.3-1959_daily_bin1420.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) = 5102.69442241

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    6.8350       1.0000         .10000E-03   10000.    
     2 'Prefactor '    5.1833       1.0000         .10000E-03   10000.    
     3 'norm      '    .12653E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .55867E-01   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10164E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    6.7599       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10066E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10010E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    13.505       1.0000         .10000E-03   10000.    
    10 'Prefactor '    17.786       1.0000         .10000E-03   10000.    
    11 'Prefactor '    3.8942       1.0000         .10000E-03   10000.    
    12 'Prefactor '    19.380       1.0000         .10000E-03   10000.    
    13 'Prefactor '    24.585       1.0000         .10000E-03   10000.    
    14 'norm      '    .44118E-01   1.0000         .10000E-03   10000.    
    15 'Prefactor '    .27476E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    .10047E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    .10011E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    19 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    20 'Normalizat'    1.5949       1.0000         .10000E-01   10.000    
    21 'Prefactor '    .90067       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6030E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   5102.693     FROM MIGRAD    STATUS=CONVERGED    478 CALLS     2269 TOTAL
                     EDM=   .71E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .4%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     6.8492        72.799        .46363E-04   -.35426E-05
   2  Prefactor     5.2238        29.388       -.39268E-05    .89785E-04
   3  norm          .10006E-03    7.8598        .16407E-06** at limit **
   4  Prefactor     .10354E-03    7.2109       -.68718E-05** at limit **
   5  Prefactor     .10000E-03    21.624        .22022E-07** at limit **
   6  Prefactor     6.8178        37.596        .50816E-04    .12825E-03
   7  Prefactor     .10000E-03    11.364        .42889E-07** at limit **
   8  Prefactor     .10000E-03    38.790       -.22464E-04** at limit **
   9  Prefactor     13.518        33.192       -.63884E-05    .10077E-03
  10  Prefactor     17.785        10.415        .44666E-06   -.52411E-04
  11  Prefactor     3.8943        2.7876        .39056E-07   -.19086E-04
  12  Prefactor     19.374        16.114       -.22925E-05    .73899E-04
  13  Prefactor     24.584        15.546       -.16353E-05    .74205E-04
  14  norm          .49027E-01    .68846       -.35235E-09   -.20876E-03
  15  Prefactor     .10000E-03    414.33        .24281E-05** at limit **
  16  norm          .10001E-03    35.021        .23724E-04** at limit **
  17  norm          .10000E-03    4.3209        .81713E-07** at limit **
  18  Prefactor     .10000E-03    3.2260        .20380E-07** at limit **
  19  norm          .10000E-03    1.0847       -.38458E-07** at limit **
  20  Normalizat    1.5951        .31112       -.89957E-07    .20636E-03
  21  Prefactor     .90060        .14590       -.11994E-05    .39048E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 6.84919
  Prefactor  = 5.2238
  norm       = 0.000100057
  Prefactor  = 0.000103536
  Prefactor  = 0.0001
  Prefactor  = 6.81777
  Prefactor  = 0.0001
  Prefactor  = 0.000100005
  Prefactor  = 13.518
  Prefactor  = 17.785
  Prefactor  = 3.89425
  Prefactor  = 19.374
  Prefactor  = 24.584
  norm       = 0.0490267
  Prefactor  = 0.0001
  norm       = 0.00010001
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Normalizat = 1.59506
  Prefactor  = 0.900601
 **********
 **   18 **HESSE 
 **********

 FCN=   5102.693     FROM HESSE     STATUS=OK           325 CALLS     2594 TOTAL
                     EDM=   .31E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     6.8492        73.340        .15347E-03   -1.5184    
   2  Prefactor     5.2238        20.264        .17657E-03   -1.5251    
   3  norm          .10006E-03    28.504        .31393E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10354E-03    9.0251        .54384E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    21.627        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     6.8178        40.144        .15432E-03   -1.5186    
   7  Prefactor     .10000E-03    11.370        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    38.602        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     13.518        33.168        .10899E-03   -1.4972    
  10  Prefactor     17.785        10.417        .94969E-04   -1.4864    
  11  Prefactor     3.8943        2.7893        .94217E-04   -1.5313    
  12  Prefactor     19.374        16.121        .90981E-04   -1.4827    
  13  Prefactor     24.584        15.584        .80788E-04   -1.4716    
  14  norm          .49027E-01    6.1708        .11295E-02   -1.5664    
  15  Prefactor     .10000E-03    419.59        .21426E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          .10001E-03    35.686        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .10000E-03    4.3443        .14497E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10000E-03    3.2415        .12528E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  norm          .10000E-03    1.0871        .72650E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Normalizat    1.5951        .37125        .34113E-03   -.75141    
  21  Prefactor     .90060        .17534        .20597E-03   -.96120    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.07322e-09
Minuit parameter uncertainties:
  1  44.8951
  2  20.2906
  3  0.00255274
  4  0.0113007
  5  7.74401e-06
  6  33.1205
  7  2.7293e-06
  8  0.000856332
  9  33.2136
  10  10.4184
  11  2.7894
  12  16.1244
  13  15.5868
  14  1.09905
  15  0.000464382
  16  0.00117087
  17  4.75697e-06
  18  4.20238e-06
  19  1.28805e-06
  20  0.371891
  21  0.175451
Done.

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

Extracting fit parameters...

4FGL J1238.3-1959
   Spectrum: PowerLaw
307    Prefactor:  1.937e+01  1.612e+01  1.000e-04  1.000e+04 ( 1.000e-13)
308        Index:  2.151e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
309        Scale:  1.503e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
600    Prefactor:  9.006e-01  1.755e-01  0.000e+00  1.000e+01 ( 1.000e+00)
601        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
602        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
599   Normalization:  1.595e+00  3.719e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 8.41
Ra Dec: 189.594 -19.994
Photon Index (Fixed Index): 2.15 +/- 0.00
Photon Flux (Fixed Index): 5.73e-08 +/- 4.77e-08
Energy Flux (Fixed Index): 2.83e-05 +/- 2.35e-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) = 5101.83518154
delta logL = 0.857482930332

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5101.81785531
delta logL = 0.87480916238

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   5101.818     FROM MIGRAD    STATUS=CONVERGED     58 CALLS      215 TOTAL
                     EDM=   .58E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     22.926        21.419        .20940E-02   -.85620E-05
   2  Index         1.4886        .43901        .20442       -.17609E-04
   3  Normalizat    1.6151        .30405        .76690E-01    .19685E-05
   4  Prefactor     .89890        .14412        .44994E-01   -.20704E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 22.9262
  Index      = 1.48856
  Normalizat = 1.61512
  Prefactor  = 0.898903
 **********
 **   18 **HESSE 
 **********

 FCN=   5101.818     FROM HESSE     STATUS=OK            33 CALLS      248 TOTAL
                     EDM=   .11E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     22.926        22.132        .83758E-04   -1.4750    
   2  Index         1.4886        .50623        .80778E-02   -.77861    
   3  Normalizat    1.6151        .36269        .33936E-03   -.74593    
   4  Prefactor     .89890        .17247        .20615E-03   -.96179    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.13891e-10
Minuit parameter uncertainties:
  1  22.1403
  2  0.507953
  3  0.363281
  4  0.17257
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/854579': 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) = 5101.81785107
delta logL = 0.874813398822

Extracting fit parameters...

4FGL J1238.3-1959
   Spectrum: PowerLaw
307    Prefactor:  2.293e+01  2.214e+01  1.000e-04  1.000e+04 ( 1.000e-13)
308        Index:  1.489e+00  5.080e-01  0.000e+00  1.000e+01 (-1.000e+00)
309        Scale:  1.503e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
600    Prefactor:  8.989e-01  1.726e-01  0.000e+00  1.000e+01 ( 1.000e+00)
601        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
602        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
599   Normalization:  1.615e+00  3.633e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 10.16
Ra Dec: 189.594 -19.994
Photon Index (Free Index): 1.49 +/- 0.51
Photon Flux (Free Index): 2.56e-08 +/- 3.15e-08
Energy Flux (Free Index): 8.41e-05 +/- 1.03e-04

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/854579/cmap_HighResolution_607392001_607651201_4FGL_J1238.3-1959_daily_bin1420.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='5.73e-08', energy_flux2='8.41e-05', photon_flux_error='4.77e-08', dlogl='8.75e-01', energy_flux='2.83e-05', photon_flux2='2.56e-08', job_status='DONE', time_completed='2021-09-06 02:35:28.020223', photon_index_error2='0.51', photon_index2='1.49', ts='8.41', fit_tolerance='1e-08', GAL='0.90', photon_index_error='0.00', energy_flux_error2='1.03e-04', EG='1.60', time_epoch_completed='1630920928.02', return_code='0', job_id='854579', GAL2='0.90', EG2='1.62', return_code2='0', energy_flux_error='2.35e-05', photon_flux_error2='3.15e-08', ts2='10.16', photon_index='2.15' WHERE bin_id='1420' AND source_name='4FGL J1238.3-1959' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 02:35:28 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0203>
Subject: Job 854579: <4FGL_J1238.3-1959_daily_bin1420> in cluster <slac> Done

Job <4FGL_J1238.3-1959_daily_bin1420> was submitted from host <rhel6-64f> by user <kocevski> in cluster <slac> at Mon Sep  6 02:25:27 2021
Job was executed on host(s) <bullet0203>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep  6 02:25:54 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Mon Sep  6 02:25:54 2021
Terminated at Mon Sep  6 02:35:28 2021
Results reported at Mon Sep  6 02:35:28 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1238.3-1959_daily_bin1420 189.594 -19.9945 607392001 607651201 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1238.3-1959 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   544.03 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             329.00 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   574 sec.
    Turnaround time :                            601 sec.

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

