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


Performing analysis on: 4FGL_J1239.5+0443_daily_bin670
RA = 189.885, Dec = 4.7284
tmin = 412992001, tmax = 413251201
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='868062', job_status='RUN', time_executed='2021-09-06 03:10:02.212908', time_epoch_executed='1630923002.21' WHERE source_name='4FGL J1239.5+0443' and cadence='daily' and bin_id='670'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/868062

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/868062/ft1_4FGL_J1239.5+0443_daily_bin670.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/868062/ft2_4FGL_J1239.5+0443_daily_bin670.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/868062/ft1_4FGL_J1239.5+0443_daily_bin670.fits outfile=/scratch/kocevski/868062/ft1_filteredMKT_4FGL_J1239.5+0443_daily_bin670.fits ra=189.885 dec=4.7284 rad=12.0 tmin=412992001.0 tmax=413251201.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.35
sys 0.20

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/868062/ft2_4FGL_J1239.5+0443_daily_bin670.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/868062/ft1_filteredMKT_4FGL_J1239.5+0443_daily_bin670.fits evtable="EVENTS" outfile="/scratch/kocevski/868062/ft1_filtered_4FGL_J1239.5+0443_daily_bin670.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.57
user 0.38
sys 0.16

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/868062/ft1_filtered_4FGL_J1239.5+0443_daily_bin670.fits" evtable="EVENTS" scfile=/scratch/kocevski/868062/ft2_4FGL_J1239.5+0443_daily_bin670.fits sctable="SC_DATA" outfile=/scratch/kocevski/868062/ltcube_412992001_413251201_4FGL_J1239.5+0443_daily_bin670.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/868062/ft2_4FGL_J1239.5+0443_daily_bin670.fits
.....................!
real 15.74
user 15.34
sys 0.31

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/868062/ft1_filtered_4FGL_J1239.5+0443_daily_bin670.fits evtable="EVENTS" scfile=/scratch/kocevski/868062/ft2_4FGL_J1239.5+0443_daily_bin670.fits sctable="SC_DATA" expcube=/scratch/kocevski/868062/ltcube_412992001_413251201_4FGL_J1239.5+0443_daily_bin670.fits outfile=/scratch/kocevski/868062/expmap_412992001_413251201_4FGL_J1239.5+0443_daily_bin670.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/868062/ltcube_412992001_413251201_4FGL_J1239.5+0443_daily_bin670.fits
.....................!
real 191.73
user 186.89
sys 4.17

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/868062/ft1_filtered_4FGL_J1239.5+0443_daily_bin670.fits scfile=/scratch/kocevski/868062/ft2_4FGL_J1239.5+0443_daily_bin670.fits outfile=/scratch/kocevski/868062/cmap_412992001_413251201_4FGL_J1239.5+0443_daily_bin670.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.57
user 0.39
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/868062/ft1_filtered_4FGL_J1239.5+0443_daily_bin670.fits scfile=/scratch/kocevski/868062/ft2_4FGL_J1239.5+0443_daily_bin670.fits outfile=/scratch/kocevski/868062/cmap_HighResolution_412992001_413251201_4FGL_J1239.5+0443_daily_bin670.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.57
user 0.41
sys 0.14

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

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/868062/ft1_filtered_4FGL_J1239.5+0443_daily_bin670.fits', '/scratch/kocevski/868062/ft2_4FGL_J1239.5+0443_daily_bin670.fits', expMap='/scratch/kocevski/868062/expmap_412992001_413251201_4FGL_J1239.5+0443_daily_bin670.fits', expCube='/scratch/kocevski/868062/ltcube_412992001_413251201_4FGL_J1239.5+0443_daily_bin670.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/868062/Model_4FGL_J1239.5+0443_daily_bin670.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/868062/ft1_filtered_4FGL_J1239.5+0443_daily_bin670.fits
Spacecraft file(s): /scratch/kocevski/868062/ft2_4FGL_J1239.5+0443_daily_bin670.fits
Exposure map: /scratch/kocevski/868062/expmap_412992001_413251201_4FGL_J1239.5+0443_daily_bin670.fits
Exposure cube: /scratch/kocevski/868062/ltcube_412992001_413251201_4FGL_J1239.5+0443_daily_bin670.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/868062/Model_4FGL_J1239.5+0443_daily_bin670.xml
Optimizer: MINUIT
Statistic: UNBINNED

Performing an iterative likelihood fit...

Fit tolerance = 1

Performing likelihood fit...
Done.

MINUIT Return Code (Fixed Index): 102
logL (Fixed Index) = 1271.84644866

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10009E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .29705       1.0000         .10000E-03   10000.    
     3 'Prefactor '    18.295       1.0000         .10000E-03   10000.    
     4 'Prefactor '    149.07       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10133E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10062E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10025E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    10 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    12 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10075E-03   1.0000         .10000E-03   10000.    
    14 'norm      '    1.3744       1.0000         .10000E-03   10000.    
    15 'Prefactor '    18.788       1.0000         .10000E-03   10000.    
    16 'Prefactor '    95.269       1.0000         .10000E-03   10000.    
    17 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    18 'norm      '    14.719       1.0000         .10000E-03   10000.    
    19 'Prefactor '    104.16       1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10018E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    .11131E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10010E-03   1.0000         .10000E-03   10000.    
    23 'norm      '    13.963       1.0000         .10000E-03   10000.    
    24 'Prefactor '    46.326       1.0000         .10000E-03   10000.    
    25 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    26 'Prefactor '    39.771       1.0000         .10000E-03   10000.    
    27 'Prefactor '    .10037E-03   1.0000         .10000E-03   10000.    
    28 'Prefactor '    .10014E-03   1.0000         .10000E-03   10000.    
    29 'Prefactor '    .10020E-03   1.0000         .10000E-03   10000.    
    30 'Normalizat'    .75493E-01   1.0000         .10000E-01   10.000    
    31 'Prefactor '    .81341       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.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   1271.572     FROM MIGRAD    STATUS=CONVERGED   1402 CALLS     5408 TOTAL
                     EDM=   .30E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    138.98        .18142E-02** at limit **
   2  Prefactor     .26343        444.99        .40672E-02    .95590E-05
   3  Prefactor     18.302        35.545        .93638E-04   -.14266E-05
   4  Prefactor     149.19        207.45        .16504E-03   -.30136E-05
   5  Prefactor     .10000E-03    73.329        .18142E-02** at limit **
   6  Prefactor     .10000E-03    132.69        .18142E-02** at limit **
   7  Prefactor     .10000E-03    26.658        .17991E-02** at limit **
   8  Prefactor     .10000E-03    39.667        .18142E-02** at limit **
   9  norm          .10000E-03    9.4537        .10710E-02** at limit **
  10  norm          .10000E-03    5.3781        .80690E-03** at limit **
  11  Prefactor     .10000E-03    51.920        .18142E-02** at limit **
  12  norm          .10000E-03    65.622        .18142E-02** at limit **
  13  Prefactor     .10000E-03    128.68        .18142E-02** at limit **
  14  norm          1.3742        2.2416        .64382E-04   -.11787E-04
  15  Prefactor     18.796        19.242        .92403E-04   -.31989E-04
  16  Prefactor     95.241        56.282        .20589E-03    .40999E-05
  17  Prefactor     .10000E-03    43.750        .18142E-02** at limit **
  18  norm          14.719        7.0368        .59787E-04   -.10316E-04
  19  Prefactor     104.20        130.38        .19699E-03   -.25133E-05
  20  Prefactor     .10000E-03    79.087        .18142E-02** at limit **
  21  Prefactor     .10000E-03    1222.2        .18142E-02** at limit **
  22  Prefactor     .10000E-03    50.372        .18142E-02** at limit **
  23  norm          13.879        858.56        .10719E-03   -.82196E-06
  24  Prefactor     46.325        31.362        .58909E-04   -.16935E-04
  25  norm          .10000E-03    2.6360        .56551E-03** at limit **
  26  Prefactor     39.768        25.687        .63559E-04   -.43376E-05
  27  Prefactor     .10000E-03    257.96        .18142E-02** at limit **
  28  Prefactor     .10000E-03    36.804        .18142E-02** at limit **
  29  Prefactor     .10000E-03    21.065        .15949E-02** at limit **
  30  Normalizat    .75318E-01    .81094        .76979E-02    .47905E-05
  31  Prefactor     .81359        .35382        .20687E-03    .21708E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.263429
  Prefactor  = 18.3025
  Prefactor  = 149.188
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 1.37425
  Prefactor  = 18.7963
  Prefactor  = 95.2408
  Prefactor  = 0.0001
  norm       = 14.7187
  Prefactor  = 104.197
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 13.8792
  Prefactor  = 46.3255
  norm       = 0.0001
  Prefactor  = 39.7684
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Normalizat = 0.0753184
  Prefactor  = 0.813587
 **********
 **   18 **HESSE 
 **********

 FCN=   1271.572     FROM HESSE     STATUS=OK           594 CALLS     6002 TOTAL
                     EDM=   .36E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    138.99        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .26343        418.68        .16269E-03   -1.5605    
   3  Prefactor     18.302        35.529        .37455E-05   -1.4852    
   4  Prefactor     149.19        198.57        .66017E-05   -1.3259    
   5  Prefactor     .10000E-03    73.330        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    132.69        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    26.658        .35982E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    39.667        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          .10000E-03    9.4537        .21421E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          .10000E-03    5.3781        .16138E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    51.924        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm          .10000E-03    65.622        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .10000E-03    128.68        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          1.3742        2.2414        .25753E-05   -1.5474    
  15  Prefactor     18.796        19.239        .36961E-05   -1.4841    
  16  Prefactor     95.241        56.063        .82357E-05   -1.3753    
  17  Prefactor     .10000E-03    43.750        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  norm          14.719        7.0285        .23915E-05   -1.4940    
  19  Prefactor     104.20        130.63        .39398E-04   -1.3663    
  20  Prefactor     .10000E-03    79.087        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .10000E-03    1222.2        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     .10000E-03    50.373        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  norm          13.879        865.21        .42877E-05   -1.4963    
  24  Prefactor     46.325        31.158        .23564E-05   -1.4346    
  25  norm          .10000E-03    2.6360        .11310E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  Prefactor     39.768        25.648        .25424E-05   -1.4446    
  27  Prefactor     .10000E-03    257.96        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  Prefactor     .10000E-03    36.804        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  29  Prefactor     .10000E-03    21.068        .31897E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  30  Normalizat    .75318E-01    .69558        .30792E-03   -1.4089    
  31  Prefactor     .81359        .33139        .82748E-05   -.99229    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.64558e-12
Minuit parameter uncertainties:
  1  2.05904e-06
  2  21.1498
  3  35.5704
  4  199.469
  5  1.0396e-05
  6  1.39762e-07
  7  5.39611e-07
  8  9.70941e-07
  9  2.18923e-07
  10  3.16105e-07
  11  5.44053e-06
  12  1.1668e-06
  13  4.10744e-06
  14  2.24158
  15  19.245
  16  56.0942
  17  1.72371e-06
  18  7.02892
  19  130.997
  20  1.57003e-05
  21  0.00038169
  22  8.42437e-06
  23  222.62
  24  31.1692
  25  1.71947e-07
  26  25.6547
  27  1.07514e-05
  28  2.1877e-06
  29  6.24328e-06
  30  0.432911
  31  0.332208
Done.

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

Extracting fit parameters...

4FGL J1239.5+0443
   Spectrum: LogParabola
294         norm:  1.472e+01  7.029e+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.136e-01  3.322e-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:  7.532e-02  4.329e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 10.83
Ra Dec: 189.885 4.728
Photon Index (Fixed Index): 2.23 +/- 0.00
Photon Flux (Fixed Index): 3.76e-07 +/- 1.80e-07
Energy Flux (Fixed Index): 1.32e-04 +/- 6.30e-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) = 1271.46160348
delta logL = 0.110018406671

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 1271.45472377
delta logL = 0.116898117127

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    14.533       1.0000         .10000E-03   10000.    
     2 'alpha     '    2.4835       1.0000          .0000       5.0000    
     3 'Normalizat'    .35438E-01   1.0000         .10000E-01   10.000    
     4 'Prefactor '    .83438       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=   1271.455     FROM MIGRAD    STATUS=CONVERGED     47 CALLS      224 TOTAL
                     EDM=   .57E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          14.533        7.4287        .26266E-02    .35033E-02
   2  alpha         2.4834        1.2068        .15940        .10284E-05
   3  Normalizat    .35437E-01    8.5599        .18565        .15169E-04
   4  Prefactor     .83431        2.0406        .44163E-01    .15608E-05
                               ERR DEF=  .500    
Final values: 
  norm       = 14.5327
  alpha      = 2.48345
  Normalizat = 0.0354374
  Prefactor  = 0.834314
 **********
 **   18 **HESSE 
 **********

 FCN=   1271.455     FROM HESSE     STATUS=OK            31 CALLS      255 TOTAL
                     EDM=   .40E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          14.533        6.6238        .57348E-04   -1.4945    
   2  alpha         2.4834        .53909        .69412E-03   -.66210E-02
   3  Normalizat    .35437E-01    2.1071        .10350E-01   -1.4698    
   4  Prefactor     .83431        .39447        .20423E-03   -.98476    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.99566e-09
Minuit parameter uncertainties:
  1  6.62412
  2  0.543363
  3  0.481797
  4  0.395823
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/868062': 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) = 1271.45472369
delta logL = 0.116898202841

Extracting fit parameters...

4FGL J1239.5+0443
   Spectrum: LogParabola
294         norm:  1.453e+01  6.624e+00  1.000e-04  1.000e+04 ( 1.000e-11)
295        alpha:  2.483e+00  5.434e-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.343e-01  3.958e-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:  3.544e-02  4.818e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 10.75
Ra Dec: 189.885 4.728
Photon Index (Free Index): 2.48 +/- 0.54
Photon Flux (Free Index): 4.61e-07 +/- 2.73e-07
Energy Flux (Free Index): 1.28e-04 +/- 5.73e-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/868062/cmap_HighResolution_412992001_413251201_4FGL_J1239.5+0443_daily_bin670.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='3.76e-07', energy_flux2='1.28e-04', photon_flux_error='1.80e-07', dlogl='1.17e-01', energy_flux='1.32e-04', photon_flux2='4.61e-07', job_status='DONE', time_completed='2021-09-06 03:17:17.398868', photon_index_error2='0.54', photon_index2='2.48', ts='10.83', fit_tolerance='1e-08', GAL='0.81', photon_index_error='0.00', energy_flux_error2='5.73e-05', EG='0.08', time_epoch_completed='1630923437.4', return_code='0', job_id='868062', GAL2='0.83', EG2='0.04', return_code2='0', energy_flux_error='6.30e-05', photon_flux_error2='2.73e-07', ts2='10.75', photon_index='2.23' WHERE bin_id='670' AND source_name='4FGL J1239.5+0443' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 03:17:17 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0273>
Subject: Job 868062: <4FGL_J1239.5+0443_daily_bin670> in cluster <slac> Done

Job <4FGL_J1239.5+0443_daily_bin670> was submitted from host <rhel6-64q> by user <kocevski> in cluster <slac> at Mon Sep  6 03:06:20 2021
Job was executed on host(s) <bullet0273>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep  6 03:06:55 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:06:55 2021
Terminated at Mon Sep  6 03:17:19 2021
Results reported at Mon Sep  6 03:17:19 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1239.5+0443_daily_bin670 189.885 4.7284 412992001 413251201 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 :                                   425.11 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             262.14 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   623 sec.
    Turnaround time :                            659 sec.

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

