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


Performing analysis on: 4FGL_J1238.3-1959_daily_bin1013
RA = 189.594, Dec = -19.9945
tmin = 501897601, tmax = 502156801
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='851428', job_status='RUN', time_executed='2021-09-06 02:20:25.192999', time_epoch_executed='1630920025.19' WHERE source_name='4FGL J1238.3-1959' and cadence='daily' and bin_id='1013'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/851428

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/851428/ft1_4FGL_J1238.3-1959_daily_bin1013.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/851428/ft2_4FGL_J1238.3-1959_daily_bin1013.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/851428/ft1_4FGL_J1238.3-1959_daily_bin1013.fits outfile=/scratch/kocevski/851428/ft1_filteredMKT_4FGL_J1238.3-1959_daily_bin1013.fits ra=189.594 dec=-19.9945 rad=12.0 tmin=501897601.0 tmax=502156801.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 4.18
user 3.31
sys 0.21

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/851428/ft2_4FGL_J1238.3-1959_daily_bin1013.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/851428/ft1_filteredMKT_4FGL_J1238.3-1959_daily_bin1013.fits evtable="EVENTS" outfile="/scratch/kocevski/851428/ft1_filtered_4FGL_J1238.3-1959_daily_bin1013.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 1.73
user 0.34
sys 0.18

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/851428/ft1_filtered_4FGL_J1238.3-1959_daily_bin1013.fits" evtable="EVENTS" scfile=/scratch/kocevski/851428/ft2_4FGL_J1238.3-1959_daily_bin1013.fits sctable="SC_DATA" outfile=/scratch/kocevski/851428/ltcube_501897601_502156801_4FGL_J1238.3-1959_daily_bin1013.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/851428/ft2_4FGL_J1238.3-1959_daily_bin1013.fits
.....................!
real 14.46
user 13.87
sys 0.36

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/851428/ft1_filtered_4FGL_J1238.3-1959_daily_bin1013.fits evtable="EVENTS" scfile=/scratch/kocevski/851428/ft2_4FGL_J1238.3-1959_daily_bin1013.fits sctable="SC_DATA" expcube=/scratch/kocevski/851428/ltcube_501897601_502156801_4FGL_J1238.3-1959_daily_bin1013.fits outfile=/scratch/kocevski/851428/expmap_501897601_502156801_4FGL_J1238.3-1959_daily_bin1013.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/851428/ltcube_501897601_502156801_4FGL_J1238.3-1959_daily_bin1013.fits
.....................!
real 192.77
user 187.73
sys 4.13

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/851428/ft1_filtered_4FGL_J1238.3-1959_daily_bin1013.fits scfile=/scratch/kocevski/851428/ft2_4FGL_J1238.3-1959_daily_bin1013.fits outfile=/scratch/kocevski/851428/cmap_501897601_502156801_4FGL_J1238.3-1959_daily_bin1013.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.63
user 0.36
sys 0.17

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/851428/ft1_filtered_4FGL_J1238.3-1959_daily_bin1013.fits scfile=/scratch/kocevski/851428/ft2_4FGL_J1238.3-1959_daily_bin1013.fits outfile=/scratch/kocevski/851428/cmap_HighResolution_501897601_502156801_4FGL_J1238.3-1959_daily_bin1013.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.61
user 0.38
sys 0.16

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/851428/ft1_filtered_4FGL_J1238.3-1959_daily_bin1013.fits evtable="EVENTS" scfile=/scratch/kocevski/851428/ft2_4FGL_J1238.3-1959_daily_bin1013.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/851428/Model_4FGL_J1238.3-1959_daily_bin1013.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/851428/ft1_filtered_4FGL_J1238.3-1959_daily_bin1013.fits.....................!
real 60.71
user 58.90
sys 1.17

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/851428/ft1_filtered_4FGL_J1238.3-1959_daily_bin1013.fits', '/scratch/kocevski/851428/ft2_4FGL_J1238.3-1959_daily_bin1013.fits', expMap='/scratch/kocevski/851428/expmap_501897601_502156801_4FGL_J1238.3-1959_daily_bin1013.fits', expCube='/scratch/kocevski/851428/ltcube_501897601_502156801_4FGL_J1238.3-1959_daily_bin1013.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/851428/Model_4FGL_J1238.3-1959_daily_bin1013.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/851428/ft1_filtered_4FGL_J1238.3-1959_daily_bin1013.fits
Spacecraft file(s): /scratch/kocevski/851428/ft2_4FGL_J1238.3-1959_daily_bin1013.fits
Exposure map: /scratch/kocevski/851428/expmap_501897601_502156801_4FGL_J1238.3-1959_daily_bin1013.fits
Exposure cube: /scratch/kocevski/851428/ltcube_501897601_502156801_4FGL_J1238.3-1959_daily_bin1013.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/851428/Model_4FGL_J1238.3-1959_daily_bin1013.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) = 7175.96665927

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10057E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10059E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    11.447       1.0000         .10000E-03   10000.    
     4 'Prefactor '    16.473       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10008E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    9.5110       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .18502E-02   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10063E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    32.852       1.0000         .10000E-03   10000.    
    10 'Prefactor '    2.5761       1.0000         .10000E-03   10000.    
    11 'Prefactor '    5.8104       1.0000         .10000E-03   10000.    
    12 'Prefactor '    18.495       1.0000         .10000E-03   10000.    
    13 'Prefactor '    5.7887       1.0000         .10000E-03   10000.    
    14 'norm      '    .53082       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    8.0033       1.0000         .10000E-03   10000.    
    18 'Prefactor '    5.1003       1.0000         .10000E-03   10000.    
    19 'norm      '    3.1190       1.0000         .10000E-03   10000.    
    20 'Normalizat'    1.4886       1.0000         .10000E-01   10.000    
    21 'Prefactor '    .83812       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=   7175.862     FROM MIGRAD    STATUS=CONVERGED    439 CALLS     1901 TOTAL
                     EDM=   .43E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .5%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    28.388       -.10493E-04** at limit **
   2  Prefactor     .10000E-03    8.7968       -.16077E-06** at limit **
   3  norm          11.445        5.7967        .41523E-06   -.16258E-03
   4  Prefactor     16.473        7.7725        .45081E-06   -.87014E-04
   5  Prefactor     .10000E-03    19.442        .19197E-05** at limit **
   6  Prefactor     9.5089        31.577       -.33073E-05   -.21404E-04
   7  Prefactor     .10008E-03    12.341        .52421E-06** at limit **
   8  Prefactor     .10000E-03    45.621        .34514E-04** at limit **
   9  Prefactor     32.852        26.556       -.61749E-07   -.90329E-05
  10  Prefactor     2.5760        3.6955       -.25213E-06   -.39894E-03
  11  Prefactor     5.8103        2.3046        .25995E-07    .91331E-04
  12  Prefactor     18.496        13.576       -.63082E-07    .19971E-05
  13  Prefactor     5.7890        11.442       -.26274E-06   -.98313E-04
  14  norm          .53084        .54442        .37439E-07    .41581E-03
  15  Prefactor     .10000E-03    58.612       -.33373E-04** at limit **
  16  norm          .10000E-03    4.8010        .27555E-07** at limit **
  17  norm          8.0067        8.4878       -.40627E-06    .52384E-04
  18  Prefactor     5.0987        6.9948       -.10620E-05   -.13240E-03
  19  norm          3.1189        2.4129       -.24920E-06   -.15594E-02
  20  Normalizat    1.4885        .25799        .16917E-06   -.27226E-04
  21  Prefactor     .83818        .12034        .15114E-06   -.76973E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 11.4454
  Prefactor  = 16.4726
  Prefactor  = 0.0001
  Prefactor  = 9.50894
  Prefactor  = 0.000100082
  Prefactor  = 0.0001
  Prefactor  = 32.8517
  Prefactor  = 2.57604
  Prefactor  = 5.81033
  Prefactor  = 18.4959
  Prefactor  = 5.789
  norm       = 0.530845
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 8.00674
  Prefactor  = 5.09865
  norm       = 3.1189
  Normalizat = 1.48848
  Prefactor  = 0.83818
 **********
 **   18 **HESSE 
 **********

 FCN=   7175.862     FROM HESSE     STATUS=OK           327 CALLS     2228 TOTAL
                     EDM=   .19E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    28.400        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    8.8119        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          11.445        5.7941        .11841E-03   -1.5031    
   4  Prefactor     16.473        7.7582        .98681E-04   -1.4896    
   5  Prefactor     .10000E-03    19.445        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     9.5089        31.515        .12994E-03   -1.5091    
   7  Prefactor     .10008E-03    61.763        .57759E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    45.451        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     32.852        26.561        .69911E-04   -1.4561    
  10  Prefactor     2.5760        3.6847        .18732E-03   -1.5387    
  11  Prefactor     5.8103        2.3073        .77724E-04   -1.5226    
  12  Prefactor     18.496        13.589        .93130E-04   -1.4848    
  13  Prefactor     5.7890        11.469        .16693E-03   -1.5227    
  14  norm          .53084        .55162        .61414E-04   -1.5562    
  15  Prefactor     .10000E-03    58.332        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          .10000E-03    4.8291        .18124E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          8.0067        8.4409        .14173E-03   -1.5142    
  18  Prefactor     5.0987        6.9631        .17803E-03   -1.5256    
  19  norm          3.1189        2.4241        .56353E-03   -1.5355    
  20  Normalizat    1.4885        .30828        .33522E-03   -.78102    
  21  Prefactor     .83818        .14333        .20606E-03   -.98336    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.86718e-09
Minuit parameter uncertainties:
  1  1.19199e-05
  2  2.52838e-05
  3  5.79443
  4  7.75871
  5  1.61131e-05
  6  31.5703
  7  0.00449385
  8  0.000135323
  9  26.5705
  10  3.68498
  11  2.30734
  12  13.5915
  13  11.4729
  14  0.551621
  15  0.000126615
  16  3.40605e-06
  17  8.44211
  18  6.96417
  19  2.42419
  20  0.308671
  21  0.143398
Done.

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

Extracting fit parameters...

4FGL J1238.3-1959
   Spectrum: PowerLaw
307    Prefactor:  1.850e+01  1.359e+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:  8.382e-01  1.434e-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.488e+00  3.087e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 5.49
Ra Dec: 189.594 -19.994
Photon Index (Fixed Index): 2.15 +/- 0.00
Photon Flux (Fixed Index): 5.47e-08 +/- 4.02e-08
Energy Flux (Fixed Index): 2.70e-05 +/- 1.98e-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) = 7175.79907314
delta logL = 0.0626320522779

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 7175.79736668
delta logL = 0.0643385123221

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    21.094       1.0000         .10000E-03   10000.    
     2 'Index     '    1.9177       1.0000          .0000       10.000    
     3 'Normalizat'    1.5059       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .83334       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=   7175.797     FROM MIGRAD    STATUS=CONVERGED     60 CALLS      269 TOTAL
                     EDM=   .31E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     21.129        535.54        .21802E-02   -.21051E-04
   2  Index         1.9200        5.2809        .15937        .27349E-04
   3  Normalizat    1.5059        .26137        .75389E-01   -.84445E-05
   4  Prefactor     .83323        .67838E-01    .44150E-01   -.43023E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 21.1291
  Index      = 1.92005
  Normalizat = 1.50591
  Prefactor  = 0.833229
 **********
 **   18 **HESSE 
 **********

 FCN=   7175.797     FROM HESSE     STATUS=OK            33 CALLS      302 TOTAL
                     EDM=   .41E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     21.129        16.722        .87208E-04   -1.4788    
   2  Index         1.9200        .62622        .99720E-02   -.66364    
   3  Normalizat    1.5059        .29928        .33361E-03   -.77612    
   4  Prefactor     .83323        .14261        .20660E-03   -.98515    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.05224e-12
Minuit parameter uncertainties:
  1  16.7261
  2  0.628884
  3  0.299631
  4  0.142676
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/851428': 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) = 7175.79735371
delta logL = 0.0643514836065

Extracting fit parameters...

4FGL J1238.3-1959
   Spectrum: PowerLaw
307    Prefactor:  2.113e+01  1.673e+01  1.000e-04  1.000e+04 ( 1.000e-13)
308        Index:  1.920e+00  6.289e-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.332e-01  1.427e-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.506e+00  2.996e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 5.62
Ra Dec: 189.594 -19.994
Photon Index (Free Index): 1.92 +/- 0.63
Photon Flux (Free Index): 4.17e-08 +/- 4.57e-08
Energy Flux (Free Index): 3.54e-05 +/- 4.17e-05

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/851428/cmap_HighResolution_501897601_502156801_4FGL_J1238.3-1959_daily_bin1013.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='5.47e-08', energy_flux2='3.54e-05', photon_flux_error='4.02e-08', dlogl='6.44e-02', energy_flux='2.70e-05', photon_flux2='4.17e-08', job_status='DONE', time_completed='2021-09-06 02:30:28.183227', photon_index_error2='0.63', photon_index2='1.92', ts='5.49', fit_tolerance='1e-08', GAL='0.84', photon_index_error='0.00', energy_flux_error2='4.17e-05', EG='1.49', time_epoch_completed='1630920628.18', return_code='0', job_id='851428', GAL2='0.83', EG2='1.51', return_code2='0', energy_flux_error='1.98e-05', photon_flux_error2='4.57e-08', ts2='5.62', photon_index='2.15' WHERE bin_id='1013' AND source_name='4FGL J1238.3-1959' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 02:30:28 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0074>
Subject: Job 851428: <4FGL_J1238.3-1959_daily_bin1013> in cluster <slac> Done

Job <4FGL_J1238.3-1959_daily_bin1013> was submitted from host <rhel6-64k> by user <kocevski> in cluster <slac> at Mon Sep  6 02:15:36 2021
Job was executed on host(s) <bullet0074>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep  6 02:16:17 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:16:17 2021
Terminated at Mon Sep  6 02:30:28 2021
Results reported at Mon Sep  6 02:30:28 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1238.3-1959_daily_bin1013 189.594 -19.9945 501897601 502156801 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 :                                   595.22 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             270.18 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              7
    Max Threads :                                21
    Run time :                                   851 sec.
    Turnaround time :                            892 sec.

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

