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


Performing analysis on: 4FGL_J1238.5-1201_daily_bin1483
RA = 189.625, Dec = -12.028
tmin = 623721601, tmax = 623980801
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='864171', job_status='RUN', time_executed='2021-09-06 02:56:20.699373', time_epoch_executed='1630922180.7' WHERE source_name='4FGL J1238.5-1201' and cadence='daily' and bin_id='1483'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/864171

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/864171/ft1_4FGL_J1238.5-1201_daily_bin1483.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/864171/ft2_4FGL_J1238.5-1201_daily_bin1483.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/864171/ft1_4FGL_J1238.5-1201_daily_bin1483.fits outfile=/scratch/kocevski/864171/ft1_filteredMKT_4FGL_J1238.5-1201_daily_bin1483.fits ra=189.625 dec=-12.028 rad=12.0 tmin=623721601.0 tmax=623980801.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.27
user 4.99
sys 0.22

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/864171/ft2_4FGL_J1238.5-1201_daily_bin1483.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/864171/ft2_4FGL_J1238.5-1201_daily_bin1483.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/864171/ft1_filteredMKT_4FGL_J1238.5-1201_daily_bin1483.fits evtable="EVENTS" outfile="/scratch/kocevski/864171/ft1_filtered_4FGL_J1238.5-1201_daily_bin1483.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.51
user 0.35
sys 0.15

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/864171/ft1_filtered_4FGL_J1238.5-1201_daily_bin1483.fits" evtable="EVENTS" scfile=/scratch/kocevski/864171/ft2_4FGL_J1238.5-1201_daily_bin1483.fits sctable="SC_DATA" outfile=/scratch/kocevski/864171/ltcube_623721601_623980801_4FGL_J1238.5-1201_daily_bin1483.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/864171/ft2_4FGL_J1238.5-1201_daily_bin1483.fits
.....................!
real 14.46
user 14.07
sys 0.33

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/864171/ft1_filtered_4FGL_J1238.5-1201_daily_bin1483.fits evtable="EVENTS" scfile=/scratch/kocevski/864171/ft2_4FGL_J1238.5-1201_daily_bin1483.fits sctable="SC_DATA" expcube=/scratch/kocevski/864171/ltcube_623721601_623980801_4FGL_J1238.5-1201_daily_bin1483.fits outfile=/scratch/kocevski/864171/expmap_623721601_623980801_4FGL_J1238.5-1201_daily_bin1483.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/864171/ltcube_623721601_623980801_4FGL_J1238.5-1201_daily_bin1483.fits
.....................!
real 191.18
user 186.47
sys 4.26

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

Setting source of interest to:
4FGL J1238.5-1201 @ 189.625 -12.028

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/864171/ft1_filtered_4FGL_J1238.5-1201_daily_bin1483.fits scfile=/scratch/kocevski/864171/ft2_4FGL_J1238.5-1201_daily_bin1483.fits outfile=/scratch/kocevski/864171/cmap_623721601_623980801_4FGL_J1238.5-1201_daily_bin1483.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.625 yref=-12.028 axisrot=0.0 rafield="RA" decfield="DEC" proj="AIT" hpx_ordering_scheme="RING" hpx_order=3 hpx_ebin=yes hpx_region="" evtable="EVENTS" sctable="SC_DATA" efield="ENERGY" tfield="TIME" chatter=2 clobber=yes debug=no gui=no mode="ql"

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

This is gtbin version HEAD
real 0.56
user 0.39
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/864171/ft1_filtered_4FGL_J1238.5-1201_daily_bin1483.fits scfile=/scratch/kocevski/864171/ft2_4FGL_J1238.5-1201_daily_bin1483.fits outfile=/scratch/kocevski/864171/cmap_HighResolution_623721601_623980801_4FGL_J1238.5-1201_daily_bin1483.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.625 yref=-12.028 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.57
user 0.40
sys 0.15

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/864171/ft1_filtered_4FGL_J1238.5-1201_daily_bin1483.fits evtable="EVENTS" scfile=/scratch/kocevski/864171/ft2_4FGL_J1238.5-1201_daily_bin1483.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/864171/Model_4FGL_J1238.5-1201_daily_bin1483.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/864171/ft1_filtered_4FGL_J1238.5-1201_daily_bin1483.fits.....................!
real 77.12
user 75.52
sys 1.16

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/864171/ft1_filtered_4FGL_J1238.5-1201_daily_bin1483.fits', '/scratch/kocevski/864171/ft2_4FGL_J1238.5-1201_daily_bin1483.fits', expMap='/scratch/kocevski/864171/expmap_623721601_623980801_4FGL_J1238.5-1201_daily_bin1483.fits', expCube='/scratch/kocevski/864171/ltcube_623721601_623980801_4FGL_J1238.5-1201_daily_bin1483.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/864171/Model_4FGL_J1238.5-1201_daily_bin1483.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1238.5-1201'

4FGL J1238.5-1201
   Spectrum: PowerLaw
326    Prefactor:  4.386e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-12)
327        Index:  2.660e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
328        Scale:  5.228e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/864171/ft1_filtered_4FGL_J1238.5-1201_daily_bin1483.fits
Spacecraft file(s): /scratch/kocevski/864171/ft2_4FGL_J1238.5-1201_daily_bin1483.fits
Exposure map: /scratch/kocevski/864171/expmap_623721601_623980801_4FGL_J1238.5-1201_daily_bin1483.fits
Exposure cube: /scratch/kocevski/864171/ltcube_623721601_623980801_4FGL_J1238.5-1201_daily_bin1483.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/864171/Model_4FGL_J1238.5-1201_daily_bin1483.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) = 9492.72294366

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    2.0679       1.0000         .10000E-03   10000.    
     2 'Prefactor '    76.224       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10031E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    1.9711       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10007E-03   1.0000         .10000E-03   10000.    
     6 'norm      '    1.6104       1.0000         .10000E-03   10000.    
     7 'Prefactor '    9.0841       1.0000         .10000E-03   10000.    
     8 'Prefactor '    8.2882       1.0000         .10000E-03   10000.    
     9 'Prefactor '    8.6253       1.0000         .10000E-03   10000.    
    10 'Prefactor '    6.2150       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10009E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    14 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    3.3017       1.0000         .10000E-03   10000.    
    17 'norm      '    2.5651       1.0000         .10000E-03   10000.    
    18 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10015E-03   1.0000         .10000E-03   10000.    
    20 'norm      '    18.196       1.0000         .10000E-03   10000.    
    21 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    24 'Normalizat'    1.0813       1.0000         .10000E-01   10.000    
    25 'Prefactor '    1.2767       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6130E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   9492.693     FROM MIGRAD    STATUS=CONVERGED    575 CALLS     2444 TOTAL
                     EDM=   .69E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  6.1%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     2.0651        6.8214       -.32914E-06   -.70813E-04
   2  Prefactor     76.227        26.346       -.23119E-06   -.10202E-03
   3  Prefactor     .10000E-03    54.350        .46926E-05** at limit **
   4  Prefactor     1.9715        23.554        .10950E-04   -.43231E-04
   5  Prefactor     .10000E-03    44.693       -.22177E-05** at limit **
   6  norm          1.6103        2.1184        .16152E-08    .50180E-05
   7  Prefactor     9.0839        5.9038        .63149E-07   -.11432E-04
   8  Prefactor     8.2882        2.5660        .37399E-08   -.10757E-04
   9  Prefactor     8.6253        10.266        .70182E-06    .20587E-05
  10  Prefactor     6.2151        6.4164        .74786E-07    .23172E-05
  11  Prefactor     .10000E-03    5.8859        .10275E-06** at limit **
  12  Prefactor     .10000E-03    3.3023        .19280E-08** at limit **
  13  Prefactor     .10000E-03    34.923       -.37950E-05** at limit **
  14  norm          .10000E-03    8.8250        .37998E-06** at limit **
  15  Prefactor     .10000E-03    12.577       -.57931E-06** at limit **
  16  norm          3.3016        .42366        .20796E-07    .12533E-02
  17  norm          2.5651        3.0219       -.28363E-08   -.13743E-05
  18  norm          .10000E-03    1.9761       -.83376E-08** at limit **
  19  Prefactor     .10000E-03    24.800        .24358E-05** at limit **
  20  norm          18.195        13.829        .12302E-06   -.25597E-04
  21  norm          .10000E-03    3.5856       -.73776E-08** at limit **
  22  Prefactor     .10000E-03    2.4550       -.45606E-08** at limit **
  23  Prefactor     .10000E-03    6.5669       -.25101E-06** at limit **
  24  Normalizat    1.0813        .23854       -.16767E-05    .16728E-04
  25  Prefactor     1.2767        .13642        .41358E-06   -.36179E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 2.0651
  Prefactor  = 76.227
  Prefactor  = 0.000100001
  Prefactor  = 1.97146
  Prefactor  = 0.0001
  norm       = 1.61035
  Prefactor  = 9.08388
  Prefactor  = 8.28824
  Prefactor  = 8.6253
  Prefactor  = 6.21509
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.000100001
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 3.30165
  norm       = 2.56514
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 18.1953
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Normalizat = 1.08134
  Prefactor  = 1.27668
 **********
 **   18 **HESSE 
 **********

 FCN=   9492.693     FROM HESSE     STATUS=OK           421 CALLS     2865 TOTAL
                     EDM=   .12E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     2.0651        6.7174        .28729E-03   -1.5421    
   2  Prefactor     76.227        26.053        .45992E-04   -1.3960    
   3  Prefactor     .10000E-03    54.518        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     1.9715        23.669        .14767E-02   -1.5427    
   5  Prefactor     .10000E-03    44.932        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  norm          1.6103        2.1016        .15848E-03   -1.5454    
   7  Prefactor     9.0839        5.9089        .13298E-03   -1.5105    
   8  Prefactor     8.2882        2.5685        .82185E-04   -1.5132    
   9  Prefactor     8.6253        10.260        .68244E-03   -1.5121    
  10  Prefactor     6.2151        6.4168        .80513E-03   -1.5209    
  11  Prefactor     .10000E-03    5.9357        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    3.3244        .17289E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .10000E-03    35.061        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          .10000E-03    8.8294        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .10000E-03    12.582        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          3.3016        .42514        .21632E-04   -1.5345    
  17  norm          2.5651        3.0203        .17919E-03   -1.5388    
  18  norm          .10000E-03    2.0116        .13374E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10000E-03    24.849        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  norm          18.195        13.829        .46947E-03   -1.4855    
  21  norm          .10000E-03    3.5883        .18018E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     .10000E-03    2.4574        .14908E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10000E-03    6.6427        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Normalizat    1.0813        .28106        .39698E-03   -.90353    
  25  Prefactor     1.2767        .16194        .21870E-03   -.84003    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.18487e-10
Minuit parameter uncertainties:
  1  6.71982
  2  26.0571
  3  0.000474348
  4  13.6685
  5  0.000275062
  6  2.10172
  7  5.90933
  8  2.56857
  9  10.262
  10  6.41747
  11  2.27455e-06
  12  2.77609e-07
  13  0.000362269
  14  1.82075e-05
  15  3.42565e-05
  16  0.425145
  17  3.02051
  18  3.61504e-07
  19  0.000199194
  20  13.8317
  21  2.56876e-07
  22  5.47897e-08
  23  6.96056e-06
  24  0.28145
  25  0.162002
Done.

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

Extracting fit parameters...

4FGL J1238.5-1201
   Spectrum: PowerLaw
326    Prefactor:  1.000e-04  2.275e-06  1.000e-04  1.000e+04 ( 1.000e-12)
327        Index:  2.660e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
328        Scale:  5.228e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
610    Prefactor:  1.277e+00  1.620e-01  0.000e+00  1.000e+01 ( 1.000e+00)
611        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
612        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
609   Normalization:  1.081e+00  2.815e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 189.625 -12.028
Photon Flux Upper Limit: 9.02e-08 ph cm-2 s-1
Energy Flux Upper Limit: 7.08e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/864171/likelihoodResults_623721601_623980801_4FGL_J1238.5-1201_daily_bin1483.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) = 9492.69415555
delta logL = -0.00080255685134

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 9492.69335314
delta logL = -1.44853402162e-07

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10124E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.6513       1.0000          .0000       10.000    
     3 'Normalizat'    1.0813       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.2767       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6130E+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.

 FCN=   9492.693     FROM MIGRAD    STATUS=CONVERGED     89 CALLS      246 TOTAL
                     EDM=   .12E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10072E-03    208.87        .18142E-02** at limit **
   2  Index         2.5904        5.2893        .50000        .10007E-04
   3  Normalizat    1.0813        .35139E-01    .39698E-03    .21593E-04
   4  Prefactor     1.2767        .20944E-01    .21870E-03    .33665E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100723
  Index      = 2.59039
  Normalizat = 1.08134
  Prefactor  = 1.27668
 **********
 **   18 **HESSE 
 **********

 FCN=   9492.693     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      275 TOTAL
                     EDM=   .53E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10072E-03    766.72        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.5904        8.6945        .50000       -.50285    
   3  Normalizat    1.0813        .79838E-01    .15879E-04   -.90353    
   4  Prefactor     1.2767        .47587E-01    .43739E-04   -.84003    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 5.30477e-08
Minuit parameter uncertainties:
  1  0.0477018
  2  1669.67
  3  0.0798467
  4  0.0475882
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/864171': 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) = 9492.69335287
delta logL = 1.28160536406e-07

Extracting fit parameters...

4FGL J1238.5-1201
   Spectrum: PowerLaw
326    Prefactor:  1.007e-04  4.770e-02  1.000e-04  1.000e+04 ( 1.000e-12)
327        Index:  2.590e+00  1.670e+03  0.000e+00  1.000e+01 (-1.000e+00)
328        Scale:  5.228e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
610    Prefactor:  1.277e+00  4.759e-02  0.000e+00  1.000e+01 ( 1.000e+00)
611        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
612        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
609   Normalization:  1.081e+00  7.985e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 189.625 -12.028

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/864171/cmap_HighResolution_623721601_623980801_4FGL_J1238.5-1201_daily_bin1483.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='7.08e-03', job_status='DONE', photon_flux_upper_limit='9.02e-08', time_completed='2021-09-06 03:11:52.813831', job_id='864171', GAL2='1.28', fit_tolerance='1e-08', EG2='1.08', EG='1.08', time_epoch_completed='1630923112.81', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.28', dlogl='1.28e-07', ts2='-0.00', photon_index_error='0.00', photon_index='2.66' WHERE bin_id='1483' AND source_name='4FGL J1238.5-1201' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 03:11:52 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0261>
Subject: Job 864171: <4FGL_J1238.5-1201_daily_bin1483> in cluster <slac> Done

Job <4FGL_J1238.5-1201_daily_bin1483> was submitted from host <rhel6-64m> by user <kocevski> in cluster <slac> at Mon Sep  6 02:55:30 2021
Job was executed on host(s) <bullet0261>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep  6 02:56:04 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:56:04 2021
Terminated at Mon Sep  6 03:11:53 2021
Results reported at Mon Sep  6 03:11:53 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1238.5-1201_daily_bin1483 189.625 -12.028 623721601 623980801 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1238.5-1201 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   923.00 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             357.40 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   949 sec.
    Turnaround time :                            983 sec.

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

