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


Performing analysis on: 4FGL_J1239.5+0443_daily_bin319
RA = 189.885, Dec = 4.7284
tmin = 322012801, tmax = 322272001
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='866004', job_status='RUN', time_executed='2021-09-06 03:04:26.501045', time_epoch_executed='1630922666.5' WHERE source_name='4FGL J1239.5+0443' and cadence='daily' and bin_id='319'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/866004

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/866004/ft1_4FGL_J1239.5+0443_daily_bin319.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/866004/ft2_4FGL_J1239.5+0443_daily_bin319.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/866004/ft1_4FGL_J1239.5+0443_daily_bin319.fits outfile=/scratch/kocevski/866004/ft1_filteredMKT_4FGL_J1239.5+0443_daily_bin319.fits ra=189.885 dec=4.7284 rad=12.0 tmin=322012801.0 tmax=322272001.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.60
user 3.17
sys 0.23

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/866004/ft2_4FGL_J1239.5+0443_daily_bin319.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/866004/ft2_4FGL_J1239.5+0443_daily_bin319.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/866004/ft1_filteredMKT_4FGL_J1239.5+0443_daily_bin319.fits evtable="EVENTS" outfile="/scratch/kocevski/866004/ft1_filtered_4FGL_J1239.5+0443_daily_bin319.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.84
user 0.34
sys 0.15

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/866004/ft1_filtered_4FGL_J1239.5+0443_daily_bin319.fits" evtable="EVENTS" scfile=/scratch/kocevski/866004/ft2_4FGL_J1239.5+0443_daily_bin319.fits sctable="SC_DATA" outfile=/scratch/kocevski/866004/ltcube_322012801_322272001_4FGL_J1239.5+0443_daily_bin319.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/866004/ft2_4FGL_J1239.5+0443_daily_bin319.fits
.....................!
real 14.02
user 13.60
sys 0.34

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/866004/ft1_filtered_4FGL_J1239.5+0443_daily_bin319.fits evtable="EVENTS" scfile=/scratch/kocevski/866004/ft2_4FGL_J1239.5+0443_daily_bin319.fits sctable="SC_DATA" expcube=/scratch/kocevski/866004/ltcube_322012801_322272001_4FGL_J1239.5+0443_daily_bin319.fits outfile=/scratch/kocevski/866004/expmap_322012801_322272001_4FGL_J1239.5+0443_daily_bin319.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/866004/ltcube_322012801_322272001_4FGL_J1239.5+0443_daily_bin319.fits
.....................!
real 191.98
user 185.92
sys 4.97

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

Setting source of interest to:
4FGL J1239.5+0443 @ 189.885 4.7284

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/866004/ft1_filtered_4FGL_J1239.5+0443_daily_bin319.fits scfile=/scratch/kocevski/866004/ft2_4FGL_J1239.5+0443_daily_bin319.fits outfile=/scratch/kocevski/866004/cmap_322012801_322272001_4FGL_J1239.5+0443_daily_bin319.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.885 yref=4.7284 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.38
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/866004/ft1_filtered_4FGL_J1239.5+0443_daily_bin319.fits scfile=/scratch/kocevski/866004/ft2_4FGL_J1239.5+0443_daily_bin319.fits outfile=/scratch/kocevski/866004/cmap_HighResolution_322012801_322272001_4FGL_J1239.5+0443_daily_bin319.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.885 yref=4.7284 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.55
user 0.40
sys 0.15

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/866004/ft1_filtered_4FGL_J1239.5+0443_daily_bin319.fits evtable="EVENTS" scfile=/scratch/kocevski/866004/ft2_4FGL_J1239.5+0443_daily_bin319.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/866004/Model_4FGL_J1239.5+0443_daily_bin319.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/866004/ft1_filtered_4FGL_J1239.5+0443_daily_bin319.fits.....................!
real 52.12
user 50.01
sys 1.36

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/866004/ft1_filtered_4FGL_J1239.5+0443_daily_bin319.fits', '/scratch/kocevski/866004/ft2_4FGL_J1239.5+0443_daily_bin319.fits', expMap='/scratch/kocevski/866004/expmap_322012801_322272001_4FGL_J1239.5+0443_daily_bin319.fits', expCube='/scratch/kocevski/866004/ltcube_322012801_322272001_4FGL_J1239.5+0443_daily_bin319.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/866004/Model_4FGL_J1239.5+0443_daily_bin319.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1239.5+0443'

4FGL J1239.5+0443
   Spectrum: LogParabola
294         norm:  4.221e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-11)
295        alpha:  2.228e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
296         beta:  1.234e-01  0.000e+00  0.000e+00  1.000e+01 ( 1.000e+00) fixed
297           Eb:  5.025e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/866004/ft1_filtered_4FGL_J1239.5+0443_daily_bin319.fits
Spacecraft file(s): /scratch/kocevski/866004/ft2_4FGL_J1239.5+0443_daily_bin319.fits
Exposure map: /scratch/kocevski/866004/expmap_322012801_322272001_4FGL_J1239.5+0443_daily_bin319.fits
Exposure cube: /scratch/kocevski/866004/ltcube_322012801_322272001_4FGL_J1239.5+0443_daily_bin319.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/866004/Model_4FGL_J1239.5+0443_daily_bin319.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) = 5848.87560273

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .11098E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10113E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10084E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    44.967       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10025E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    .10021E-03   1.0000         .10000E-03   10000.    
    10 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10040E-03   1.0000         .10000E-03   10000.    
    12 'norm      '    15.529       1.0000         .10000E-03   10000.    
    13 'Prefactor '    .61211E-03   1.0000         .10000E-03   10000.    
    14 'norm      '    1.3664       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10179E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    .47460       1.0000         .10000E-03   10000.    
    18 'norm      '    5.7753       1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    14.555       1.0000         .10000E-03   10000.    
    21 'Prefactor '    8.1258       1.0000         .10000E-03   10000.    
    22 'Prefactor '    68.301       1.0000         .10000E-03   10000.    
    23 'norm      '    12.759       1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10024E-03   1.0000         .10000E-03   10000.    
    25 'norm      '    1.4681       1.0000         .10000E-03   10000.    
    26 'Prefactor '    9.9345       1.0000         .10000E-03   10000.    
    27 'Prefactor '    81.299       1.0000         .10000E-03   10000.    
    28 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    29 'Prefactor '    .10008E-03   1.0000         .10000E-03   10000.    
    30 'Normalizat'    1.0646       1.0000         .10000E-01   10.000    
    31 'Prefactor '    .88062       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5600E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   5848.855     FROM MIGRAD    STATUS=CONVERGED    807 CALLS     4159 TOTAL
                     EDM=   .95E-11  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.8%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    258.79        .12123E-04** at limit **
   2  Prefactor     .10000E-03    4.6552        .43480E-07** at limit **
   3  Prefactor     .10000E-03    2.7973       -.15308E-07** at limit **
   4  Prefactor     .10000E-03    153.24       -.87426E-05** at limit **
   5  Prefactor     .10000E-03    81.583        .11496E-05** at limit **
   6  Prefactor     44.962        28.849        .63618E-07    .77768E-05
   7  Prefactor     .10000E-03    19.305        .18543E-06** at limit **
   8  Prefactor     .10000E-03    3.9970       -.26429E-07** at limit **
   9  norm          .10000E-03    1.1387       -.40117E-07** at limit **
  10  norm          .10000E-03    1.6622        .77142E-07** at limit **
  11  Prefactor     .10000E-03    12.963       -.73877E-07** at limit **
  12  norm          15.528        43.130        .65426E-07   -.21252E-05
  13  Prefactor     .10000E-03    379.35        .38066E-05** at limit **
  14  norm          1.3665        .65382        .17929E-07    .11703E-03
  15  Prefactor     .10000E-03    3.0907       -.52575E-07** at limit **
  16  Prefactor     .10000E-03    31.679       -.34493E-06** at limit **
  17  Prefactor     .43607        32.624        .28438E-05    .21376E-05
  18  norm          5.7753        2.3225       -.49429E-07    .19123E-04
  19  Prefactor     .10000E-03    6.0462        .20320E-06** at limit **
  20  Prefactor     14.548        37.989        .99149E-07    .51168E-05
  21  Prefactor     8.1218        52.455        .13376E-06   -.34610E-06
  22  Prefactor     68.296        50.358       -.16114E-06    .28576E-05
  23  norm          12.754        19.250       -.41297E-09    .17766E-05
  24  Prefactor     .10000E-03    5.9904        .12560E-06** at limit **
  25  norm          1.4681        .38802       -.23142E-07    .22763E-03
  26  Prefactor     9.9322        12.663       -.40679E-06    .43211E-05
  27  Prefactor     81.283        79.083        .58943E-06    .21036E-06
  28  Prefactor     .10000E-03    5.6510        .18655E-07** at limit **
  29  Prefactor     .10000E-03    4.6455       -.19841E-06** at limit **
  30  Normalizat    1.0646        .21014        .91781E-06    .32845E-04
  31  Prefactor     .88075        .16837        .48572E-06    .52462E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 44.9622
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 15.5279
  Prefactor  = 0.0001
  norm       = 1.36653
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.436069
  norm       = 5.77527
  Prefactor  = 0.0001
  Prefactor  = 14.5476
  Prefactor  = 8.12181
  Prefactor  = 68.2959
  norm       = 12.7542
  Prefactor  = 0.0001
  norm       = 1.46811
  Prefactor  = 9.93221
  Prefactor  = 81.2829
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Normalizat = 1.06462
  Prefactor  = 0.880748
 **********
 **   18 **HESSE 
 **********

 FCN=   5848.855     FROM HESSE     STATUS=OK           616 CALLS     4775 TOTAL
                     EDM=   .81E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    256.83        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    4.6621        .16114E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .10000E-03    2.8022        .12492E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    154.48        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    81.878        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     44.962        28.843        .59789E-04   -1.4366    
   7  Prefactor     .10000E-03    19.343        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    4.0064        .14930E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          .10000E-03    1.1835        .15928E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          .10000E-03    1.6689        .95723E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    12.972        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm          15.528        43.129        .10164E-03   -1.4920    
  13  Prefactor     .10000E-03    380.69        .21053E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          1.3665        .64808        .37726E-04   -1.5474    
  15  Prefactor     .10000E-03    3.0954        .13132E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     .10000E-03    32.183        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     .43607        32.424        .39561E-02   -1.5576    
  18  norm          5.7753        2.3217        .68490E-04   -1.5227    
  19  Prefactor     .10000E-03    6.1376        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     14.548        37.939        .10499E-03   -1.4945    
  21  Prefactor     8.1218        52.938        .14065E-03   -1.5138    
  22  Prefactor     68.296        50.378        .48567E-04   -1.4053    
  23  norm          12.754        19.247        .11214E-03   -1.4994    
  24  Prefactor     .10000E-03    6.0070        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  norm          1.4681        .39029        .22243E-04   -1.5466    
  26  Prefactor     9.9322        12.702        .12713E-03   -1.5078    
  27  Prefactor     81.283        79.223        .44545E-04   -1.3902    
  28  Prefactor     .10000E-03    5.6527        .17756E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  29  Prefactor     .10000E-03    4.6576        .16104E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  30  Normalizat    1.0646        .24648        .28108E-03   -.90896    
  31  Prefactor     .88075        .19740        .24939E-03   -.96817    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 8.05103e-11
Minuit parameter uncertainties:
  1  0.00058005
  2  4.6034e-06
  3  3.05648e-06
  4  5.12589e-05
  5  0.000230258
  6  28.8522
  7  2.4599e-05
  8  4.98742e-06
  9  2.86818e-06
  10  6.4045e-06
  11  7.96286e-06
  12  43.2156
  13  0.000506857
  14  0.648084
  15  2.47459e-06
  16  5.93485e-05
  17  7.52376
  18  2.32177
  19  1.23917e-05
  20  38.0021
  21  41.5241
  22  50.4098
  23  19.2568
  24  5.65888e-06
  25  0.390294
  26  12.7057
  27  79.3265
  28  2.60021e-06
  29  3.97338e-06
  30  0.24675
  31  0.197556
Done.

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

Extracting fit parameters...

4FGL J1239.5+0443
   Spectrum: LogParabola
294         norm:  5.775e+00  2.322e+00  1.000e-04  1.000e+04 ( 1.000e-11)
295        alpha:  2.228e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
296         beta:  1.234e-01  0.000e+00  0.000e+00  1.000e+01 ( 1.000e+00) fixed
297           Eb:  5.025e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
557    Prefactor:  8.807e-01  1.976e-01  0.000e+00  1.000e+01 ( 1.000e+00)
558        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
559        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
556   Normalization:  1.065e+00  2.468e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 16.63
Ra Dec: 189.885 4.728
Photon Index (Fixed Index): 2.23 +/- 0.00
Photon Flux (Fixed Index): 1.48e-07 +/- 5.93e-08
Energy Flux (Fixed Index): 5.18e-05 +/- 2.08e-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) = 5848.66135996
delta logL = 0.193877792402

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5848.65705321
delta logL = 0.19818453515

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    5.7831       1.0000         .10000E-03   10000.    
     2 'alpha     '    2.4813       1.0000          .0000       5.0000    
     3 'Normalizat'    1.0260       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .89930       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5600E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   5848.657     FROM MIGRAD    STATUS=CONVERGED     53 CALLS      231 TOTAL
                     EDM=   .55E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          5.7891        35.751        .41753E-02    .15644E-03
   2  alpha         2.4825        3.6290        .25269        .21299E-04
   3  Normalizat    1.0260        .29550        .64504E-01    .12164E-04
   4  Prefactor     .89906        .24678        .44996E-01    .10428E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 5.7891
  alpha      = 2.48245
  Normalizat = 1.02601
  Prefactor  = 0.899058
 **********
 **   18 **HESSE 
 **********

 FCN=   5848.657     FROM HESSE     STATUS=OK            33 CALLS      264 TOTAL
                     EDM=   .19E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          5.7891        2.1856        .63524E-04   -1.5227    
   2  alpha         2.4825        .40237        .10454E-01   -.70189E-02
   3  Normalizat    1.0260        .24664        .28531E-03   -.92164    
   4  Prefactor     .89906        .19628        .24695E-03   -.96174    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.94673e-10
Minuit parameter uncertainties:
  1  2.1856
  2  0.404124
  3  0.246912
  4  0.196438
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/866004': 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) = 5848.65704127
delta logL = 0.198196478349

Extracting fit parameters...

4FGL J1239.5+0443
   Spectrum: LogParabola
294         norm:  5.789e+00  2.186e+00  1.000e-04  1.000e+04 ( 1.000e-11)
295        alpha:  2.482e+00  4.041e-01  0.000e+00  5.000e+00 ( 1.000e+00)
296         beta:  1.234e-01  0.000e+00  0.000e+00  1.000e+01 ( 1.000e+00) fixed
297           Eb:  5.025e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
557    Prefactor:  8.991e-01  1.964e-01  0.000e+00  1.000e+01 ( 1.000e+00)
558        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
559        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
556   Normalization:  1.026e+00  2.469e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 16.99
Ra Dec: 189.885 4.728
Photon Index (Free Index): 2.48 +/- 0.40
Photon Flux (Free Index): 1.83e-07 +/- 8.50e-08
Energy Flux (Free Index): 5.12e-05 +/- 1.89e-05

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/866004/cmap_HighResolution_322012801_322272001_4FGL_J1239.5+0443_daily_bin319.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='1.48e-07', energy_flux2='5.12e-05', photon_flux_error='5.93e-08', dlogl='1.98e-01', energy_flux='5.18e-05', photon_flux2='1.83e-07', job_status='DONE', time_completed='2021-09-06 03:16:31.975971', photon_index_error2='0.40', photon_index2='2.48', ts='16.63', fit_tolerance='1e-08', GAL='0.88', photon_index_error='0.00', energy_flux_error2='1.89e-05', EG='1.06', time_epoch_completed='1630923391.98', return_code='0', job_id='866004', GAL2='0.90', EG2='1.03', return_code2='0', energy_flux_error='2.08e-05', photon_flux_error2='8.50e-08', ts2='16.99', photon_index='2.23' WHERE bin_id='319' AND source_name='4FGL J1239.5+0443' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 03:16:32 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0049>
Subject: Job 866004: <4FGL_J1239.5+0443_daily_bin319> in cluster <slac> Done

Job <4FGL_J1239.5+0443_daily_bin319> was submitted from host <rhel6-64m> by user <kocevski> in cluster <slac> at Mon Sep  6 03:00:40 2021
Job was executed on host(s) <bullet0049>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep  6 03:01:19 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Mon Sep  6 03:01:19 2021
Terminated at Mon Sep  6 03:16:32 2021
Results reported at Mon Sep  6 03:16:32 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1239.5+0443_daily_bin319 189.885 4.7284 322012801 322272001 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1239.5+0443 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   722.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             281.24 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   913 sec.
    Turnaround time :                            952 sec.

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

