/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 170 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 = 7450
number of fields = 27
No RA_SUN column yet. Adding RA_SUN/DEC_SUN columns.
Done.


Performing analysis on: 4FGL_J1238.3-1959_daily_bin345
RA = 189.594, Dec = -19.9945
tmin = 328752001, tmax = 329011201
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='846840', job_status='RUN', time_executed='2021-09-06 02:04:56.774084', time_epoch_executed='1630919096.77' WHERE source_name='4FGL J1238.3-1959' and cadence='daily' and bin_id='345'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/846840

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/846840/ft1_4FGL_J1238.3-1959_daily_bin345.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/846840/ft2_4FGL_J1238.3-1959_daily_bin345.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/846840/ft1_4FGL_J1238.3-1959_daily_bin345.fits outfile=/scratch/kocevski/846840/ft1_filteredMKT_4FGL_J1238.3-1959_daily_bin345.fits ra=189.594 dec=-19.9945 rad=12.0 tmin=328752001.0 tmax=329011201.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.65
user 3.24
sys 0.25

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/846840/ft1_filtered_4FGL_J1238.3-1959_daily_bin345.fits" evtable="EVENTS" scfile=/scratch/kocevski/846840/ft2_4FGL_J1238.3-1959_daily_bin345.fits sctable="SC_DATA" outfile=/scratch/kocevski/846840/ltcube_328752001_329011201_4FGL_J1238.3-1959_daily_bin345.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/846840/ft2_4FGL_J1238.3-1959_daily_bin345.fits
.....................!
real 14.10
user 13.63
sys 0.32

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/846840/ft1_filtered_4FGL_J1238.3-1959_daily_bin345.fits evtable="EVENTS" scfile=/scratch/kocevski/846840/ft2_4FGL_J1238.3-1959_daily_bin345.fits sctable="SC_DATA" expcube=/scratch/kocevski/846840/ltcube_328752001_329011201_4FGL_J1238.3-1959_daily_bin345.fits outfile=/scratch/kocevski/846840/expmap_328752001_329011201_4FGL_J1238.3-1959_daily_bin345.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/846840/ltcube_328752001_329011201_4FGL_J1238.3-1959_daily_bin345.fits
.....................!
real 191.52
user 186.07
sys 4.61

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/846840/ft1_filtered_4FGL_J1238.3-1959_daily_bin345.fits scfile=/scratch/kocevski/846840/ft2_4FGL_J1238.3-1959_daily_bin345.fits outfile=/scratch/kocevski/846840/cmap_328752001_329011201_4FGL_J1238.3-1959_daily_bin345.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.37
sys 0.17

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/846840/ft1_filtered_4FGL_J1238.3-1959_daily_bin345.fits scfile=/scratch/kocevski/846840/ft2_4FGL_J1238.3-1959_daily_bin345.fits outfile=/scratch/kocevski/846840/cmap_HighResolution_328752001_329011201_4FGL_J1238.3-1959_daily_bin345.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.59
user 0.40
sys 0.16

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/846840/ft1_filtered_4FGL_J1238.3-1959_daily_bin345.fits evtable="EVENTS" scfile=/scratch/kocevski/846840/ft2_4FGL_J1238.3-1959_daily_bin345.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/846840/Model_4FGL_J1238.3-1959_daily_bin345.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/846840/ft1_filtered_4FGL_J1238.3-1959_daily_bin345.fits.....................!
real 62.35
user 60.41
sys 1.54

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10054E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    12.280       1.0000         .10000E-03   10000.    
     3 'norm      '    .16009E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    2.0352       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .11264E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    17.243       1.0000         .10000E-03   10000.    
     7 'Prefactor '    3.3306       1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10708E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10119E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    6.8216       1.0000         .10000E-03   10000.    
    11 'Prefactor '    4.2661       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    19.378       1.0000         .10000E-03   10000.    
    14 'norm      '    3.1646       1.0000         .10000E-03   10000.    
    15 'Prefactor '    33.838       1.0000         .10000E-03   10000.    
    16 'norm      '    .10014E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    10.156       1.0000         .10000E-03   10000.    
    18 'Prefactor '    4.9338       1.0000         .10000E-03   10000.    
    19 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    20 'Normalizat'    .86019       1.0000         .10000E-01   10.000    
    21 'Prefactor '    1.0818       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=   7915.544     FROM MIGRAD    STATUS=CONVERGED    439 CALLS     2172 TOTAL
                     EDM=   .12E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.1%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    38.704       -.75638E-06** at limit **
   2  Prefactor     12.286        16.731        .23464E-05   -.27811E-04
   3  norm          .10000E-03    4.8250       -.21770E-06** at limit **
   4  Prefactor     2.0330        6.6290       -.84822E-05   -.47187E-03
   5  Prefactor     .10000E-03    31.554        .33968E-05** at limit **
   6  Prefactor     17.250        32.616        .98123E-05    .71498E-04
   7  Prefactor     3.3242        30.674       -.64533E-05    .66801E-04
   8  Prefactor     .10000E-03    29.650       -.15003E-05** at limit **
   9  Prefactor     .10000E-03    16.410       -.26382E-06** at limit **
  10  Prefactor     6.8216        6.2623        .38578E-06   -.22990E-03
  11  Prefactor     4.2661        2.2927       -.10851E-06   -.36808E-05
  12  Prefactor     .10000E-03    3.9576       -.36498E-08** at limit **
  13  Prefactor     19.379        13.462        .32222E-07   -.82871E-04
  14  norm          3.1646        1.0950        .21869E-07    .59199E-04
  15  Prefactor     33.819        69.630       -.27357E-04    .32370E-03
  16  norm          .10000E-03    8.4946        .10719E-06** at limit **
  17  norm          10.156        5.4910        .14632E-05   -.96355E-04
  18  Prefactor     4.9341        3.6751        .19882E-06    .16429E-03
  19  norm          .10000E-03    .80128        .92038E-08** at limit **
  20  Normalizat    .86008        .23761        .90959E-06    .91418E-04
  21  Prefactor     1.0819        .11472        .52572E-06    .18147E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 12.2859
  norm       = 0.0001
  Prefactor  = 2.03304
  Prefactor  = 0.000100001
  Prefactor  = 17.2495
  Prefactor  = 3.32422
  Prefactor  = 0.000100001
  Prefactor  = 0.0001
  Prefactor  = 6.82159
  Prefactor  = 4.26608
  Prefactor  = 0.0001
  Prefactor  = 19.3786
  norm       = 3.16461
  Prefactor  = 33.8194
  norm       = 0.0001
  norm       = 10.1561
  Prefactor  = 4.93408
  norm       = 0.0001
  Normalizat = 0.860076
  Prefactor  = 1.08187
 **********
 **   18 **HESSE 
 **********

 FCN=   7915.544     FROM HESSE     STATUS=OK           317 CALLS     2489 TOTAL
                     EDM=   .23E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    38.824        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     12.286        16.587        .11431E-03   -1.5007    
   3  norm          .10000E-03    4.8564        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     2.0330        6.9486        .28993E-03   -1.5423    
   5  Prefactor     .10000E-03    31.546        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     17.250        32.784        .96452E-04   -1.4877    
   7  Prefactor     3.3242        30.442        .22179E-03   -1.5343    
   8  Prefactor     .10000E-03    29.659        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .10000E-03    16.554        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     6.8216        6.2540        .15362E-03   -1.5186    
  11  Prefactor     4.2661        2.2922        .92698E-04   -1.5295    
  12  Prefactor     .10000E-03    3.9634        .17284E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     19.379        13.509        .90987E-04   -1.4827    
  14  norm          3.1646        1.0938        .52413E-04   -1.5352    
  15  Prefactor     33.819        67.653        .68888E-04   -1.4544    
  16  norm          .10000E-03    8.7201        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          10.156        5.4580        .12573E-03   -1.5070    
  18  Prefactor     4.9341        3.6734        .14015E-03   -1.5264    
  19  norm          .10000E-03    .80689        .77758E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Normalizat    .86008        .27126        .39554E-03   -.97878    
  21  Prefactor     1.0819        .13201        .17831E-03   -.90048    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.33138e-09
Minuit parameter uncertainties:
  1  0.00020405
  2  16.5934
  3  5.18913e-05
  4  6.95135
  5  0.000252641
  6  32.8177
  7  20.1324
  8  0.000288832
  9  1.74326e-05
  10  6.25457
  11  2.29228
  12  6.1799e-06
  13  13.5113
  14  1.09384
  15  67.8072
  16  1.23455e-06
  17  5.45829
  18  3.67352
  19  1.1954e-06
  20  0.271685
  21  0.13205
Done.

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

Extracting fit parameters...

4FGL J1238.3-1959
   Spectrum: PowerLaw
307    Prefactor:  1.000e-04  6.180e-06  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:  1.082e+00  1.320e-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:  8.601e-01  2.717e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 189.594 -19.994
Photon Flux Upper Limit: 5.80e-08 ph cm-2 s-1
Energy Flux Upper Limit: 4.40e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/846840/likelihoodResults_328752001_329011201_4FGL_J1238.3-1959_daily_bin345.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) = 7915.54496886
delta logL = -0.00119955720675

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 7915.54376967
delta logL = -3.64408151654e-07

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 'Index     '    2.1489       1.0000          .0000       10.000    
     3 'Normalizat'    .85993       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0819       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=   7915.544     FROM MIGRAD    STATUS=CONVERGED     52 CALLS      201 TOTAL
                     EDM=   .65E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    947.02        .90712E-02** at limit **
   2  Index         2.1465        7.9024        .50000        .48839E-05
   3  Normalizat    .86008        .21428        .89307E-01    .30123E-04
   4  Prefactor     1.0819        .10694        .38319E-01   -.83984E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 2.14648
  Normalizat = 0.860075
  Prefactor  = 1.08187
 **********
 **   18 **HESSE 
 **********

 FCN=   7915.544     FROM HESSE     STATUS=NOT POSDEF    33 CALLS      234 TOTAL
                     EDM=   .41E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    737.23        .17289E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.1465        5.9696        .50000       -.60736    
   3  Normalizat    .86008        .11757        .39554E-03   -.97878    
   4  Prefactor     1.0819        .59260E-01    .17831E-03   -.90048    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 4.13427e-09
Minuit parameter uncertainties:
  1  2.53881e-05
  2  56.7371
  3  0.117608
  4  0.0592633
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/846840': No such file or directory
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 7915.5437693
delta logL = 5.92990545556e-09

Extracting fit parameters...

4FGL J1238.3-1959
   Spectrum: PowerLaw
307    Prefactor:  1.000e-04  2.539e-05  1.000e-04  1.000e+04 ( 1.000e-13)
308        Index:  2.146e+00  5.674e+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:  1.082e+00  5.926e-02  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:  8.601e-01  1.176e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 189.594 -19.994

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/846840/cmap_HighResolution_328752001_329011201_4FGL_J1238.3-1959_daily_bin345.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='4.40e-03', job_status='DONE', photon_flux_upper_limit='5.80e-08', time_completed='2021-09-06 02:16:53.419476', job_id='846840', GAL2='1.08', fit_tolerance='1e-08', EG2='0.86', EG='0.86', time_epoch_completed='1630919813.42', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.08', dlogl='5.93e-09', ts2='-0.00', photon_index_error='0.00', photon_index='2.15' WHERE bin_id='345' AND source_name='4FGL J1238.3-1959' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 02:16:53 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0278>
Subject: Job 846840: <4FGL_J1238.3-1959_daily_bin345> in cluster <slac> Done

Job <4FGL_J1238.3-1959_daily_bin345> was submitted from host <rhel6-64h> by user <kocevski> in cluster <slac> at Mon Sep  6 02:00:42 2021
Job was executed on host(s) <bullet0278>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep  6 02:01:58 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:01:58 2021
Terminated at Mon Sep  6 02:16:54 2021
Results reported at Mon Sep  6 02:16:54 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1238.3-1959_daily_bin345 189.594 -19.9945 328752001 329011201 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 :                                   714.00 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             305.33 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   895 sec.
    Turnaround time :                            972 sec.

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

