/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 6 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_J0239.7+0415_daily_bin1507
RA = 39.9403, Dec = 4.2643
tmin = 629942401, tmax = 630201601
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='642679', job_status='RUN', time_executed='2021-08-16 11:26:30.554418', time_epoch_executed='1629138390.55' WHERE source_name='4FGL J0239.7+0415' and cadence='daily' and bin_id='1507'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/642679

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/642679/ft1_4FGL_J0239.7+0415_daily_bin1507.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/642679/ft2_4FGL_J0239.7+0415_daily_bin1507.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/642679/ft1_4FGL_J0239.7+0415_daily_bin1507.fits outfile=/scratch/kocevski/642679/ft1_filteredMKT_4FGL_J0239.7+0415_daily_bin1507.fits ra=39.9403 dec=4.2643 rad=12.0 tmin=629942401.0 tmax=630201601.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.38
user 4.49
sys 0.84

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/642679/ft2_4FGL_J0239.7+0415_daily_bin1507.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/642679/ft2_4FGL_J0239.7+0415_daily_bin1507.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/642679/ft1_filteredMKT_4FGL_J0239.7+0415_daily_bin1507.fits evtable="EVENTS" outfile="/scratch/kocevski/642679/ft1_filtered_4FGL_J0239.7+0415_daily_bin1507.fits" apply_filter=yes overwrite=yes header_obstimes=yes tstart=0.0 tstop=0.0 gtifile="default" chatter=3 clobber=yes debug=no gui=no mode="ql"

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

This is gtmktime version HEAD
Applying GTI filter:
IN_SAA!=T && LIVETIME>0 && gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nogrb.gti',(START+STOP)/2) && (angsep(RA_SUN,DEC_SUN,RA_ZENITH,DEC_ZENITH)>115 || gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nosolarflares.gti',(START+STOP)/2))
real 1.14
user 0.35
sys 0.77

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/642679/ft1_filtered_4FGL_J0239.7+0415_daily_bin1507.fits" evtable="EVENTS" scfile=/scratch/kocevski/642679/ft2_4FGL_J0239.7+0415_daily_bin1507.fits sctable="SC_DATA" outfile=/scratch/kocevski/642679/ltcube_629942401_630201601_4FGL_J0239.7+0415_daily_bin1507.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/642679/ft2_4FGL_J0239.7+0415_daily_bin1507.fits
.....................!
real 14.50
user 13.32
sys 1.01

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/642679/ft1_filtered_4FGL_J0239.7+0415_daily_bin1507.fits evtable="EVENTS" scfile=/scratch/kocevski/642679/ft2_4FGL_J0239.7+0415_daily_bin1507.fits sctable="SC_DATA" expcube=/scratch/kocevski/642679/ltcube_629942401_630201601_4FGL_J0239.7+0415_daily_bin1507.fits outfile=/scratch/kocevski/642679/expmap_629942401_630201601_4FGL_J0239.7+0415_daily_bin1507.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/642679/ltcube_629942401_630201601_4FGL_J0239.7+0415_daily_bin1507.fits
.....................!
real 193.72
user 186.82
sys 5.48

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

Setting source of interest to:
4FGL J0239.7+0415 @ 39.9403 4.2643

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/642679/ft1_filtered_4FGL_J0239.7+0415_daily_bin1507.fits scfile=/scratch/kocevski/642679/ft2_4FGL_J0239.7+0415_daily_bin1507.fits outfile=/scratch/kocevski/642679/cmap_629942401_630201601_4FGL_J0239.7+0415_daily_bin1507.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=39.9403 yref=4.2643 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 1.23
user 0.36
sys 0.77

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/642679/ft1_filtered_4FGL_J0239.7+0415_daily_bin1507.fits scfile=/scratch/kocevski/642679/ft2_4FGL_J0239.7+0415_daily_bin1507.fits outfile=/scratch/kocevski/642679/cmap_HighResolution_629942401_630201601_4FGL_J0239.7+0415_daily_bin1507.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=39.9403 yref=4.2643 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 1.61
user 0.38
sys 0.77

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/642679/ft1_filtered_4FGL_J0239.7+0415_daily_bin1507.fits evtable="EVENTS" scfile=/scratch/kocevski/642679/ft2_4FGL_J0239.7+0415_daily_bin1507.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/642679/Model_4FGL_J0239.7+0415_daily_bin1507.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/642679/ft1_filtered_4FGL_J0239.7+0415_daily_bin1507.fits.....................!
real 84.85
user 80.90
sys 2.05

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/642679/ft1_filtered_4FGL_J0239.7+0415_daily_bin1507.fits', '/scratch/kocevski/642679/ft2_4FGL_J0239.7+0415_daily_bin1507.fits', expMap='/scratch/kocevski/642679/expmap_629942401_630201601_4FGL_J0239.7+0415_daily_bin1507.fits', expCube='/scratch/kocevski/642679/ltcube_629942401_630201601_4FGL_J0239.7+0415_daily_bin1507.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/642679/Model_4FGL_J0239.7+0415_daily_bin1507.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J0239.7+0415'

4FGL J0239.7+0415
   Spectrum: PowerLaw
277    Prefactor:  7.975e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-12)
278        Index:  2.775e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
279        Scale:  4.112e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/642679/ft1_filtered_4FGL_J0239.7+0415_daily_bin1507.fits
Spacecraft file(s): /scratch/kocevski/642679/ft2_4FGL_J0239.7+0415_daily_bin1507.fits
Exposure map: /scratch/kocevski/642679/expmap_629942401_630201601_4FGL_J0239.7+0415_daily_bin1507.fits
Exposure cube: /scratch/kocevski/642679/ltcube_629942401_630201601_4FGL_J0239.7+0415_daily_bin1507.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/642679/Model_4FGL_J0239.7+0415_daily_bin1507.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) = 6961.59760603

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

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 'norm      '    .67110       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10006E-03   1.0000         .10000E-03   10000.    
     4 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    4.8867       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    193.16       1.0000         .10000E-03   10000.    
     8 'Prefactor '    .24122E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10057E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10012E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    7.1141       1.0000         .10000E-03   10000.    
    15 'norm      '    .10019E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    .10036E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    10.533       1.0000         .10000E-03   10000.    
    20 'norm      '    .52828E-03   1.0000         .10000E-03   10000.    
    21 'norm      '    1.1817       1.0000         .10000E-03   10000.    
    22 'Prefactor '    3.1194       1.0000         .10000E-03   10000.    
    23 'norm      '    .10006E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    .11233E-03   1.0000         .10000E-03   10000.    
    25 'Prefactor '    20.279       1.0000         .10000E-03   10000.    
    26 'Prefactor '    7.2068       1.0000         .10000E-03   10000.    
    27 'Normalizat'    .93445       1.0000         .10000E-01   10.000    
    28 'Prefactor '    .85098       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5190E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   6961.591     FROM MIGRAD    STATUS=CONVERGED    694 CALLS     3504 TOTAL
                     EDM=   .15E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  3.4%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    2.7078       -.15902E-07** at limit **
   2  norm          .65963        4.0720        .18269E-05   -.33300E-03
   3  Prefactor     .10000E-03    1.1578       -.33807E-07** at limit **
   4  norm          .10000E-03    .29581       -.27601E-07** at limit **
   5  Prefactor     4.8901        19.148        .10435E-05    .53297E-04
   6  Prefactor     .10000E-03    6.1045       -.98337E-08** at limit **
   7  Prefactor     193.16        94.278        .23685E-06    .73641E-06
   8  Prefactor     .10020E-03    15.496        .43097E-05** at limit **
   9  Prefactor     .10000E-03    7.5610        .19361E-07** at limit **
  10  Prefactor     .10000E-03    14.511       -.80937E-08** at limit **
  11  Prefactor     .10000E-03    3.4741       -.11164E-07** at limit **
  12  Prefactor     .10000E-03    16.461        .74690E-08** at limit **
  13  Prefactor     .10000E-03    83.156        .16752E-06** at limit **
  14  Prefactor     7.1174        16.803        .59548E-06    .73403E-04
  15  norm          .10000E-03    12.271       -.40080E-07** at limit **
  16  Prefactor     .10000E-03    6.2857        .16735E-07** at limit **
  17  Prefactor     .10000E-03    44.381        .65097E-08** at limit **
  18  Prefactor     .10000E-03    18.277        .18683E-06** at limit **
  19  Prefactor     10.535        6.6170       -.39078E-07    .21020E-03
  20  norm          .10002E-03    9.1737       -.32313E-05** at limit **
  21  norm          1.1837        2.8984        .20130E-05    .14119E-02
  22  Prefactor     3.1205        4.6465        .59978E-06    .70139E-03
  23  norm          .10000E-03    3.0322       -.30307E-07** at limit **
  24  Prefactor     .10000E-03    11.249        .28413E-06** at limit **
  25  Prefactor     20.277        19.340       -.39823E-06   -.86601E-04
  26  Prefactor     7.2062        4.9158        .45231E-07   -.18552E-04
  27  Normalizat    .93441        .16632        .18269E-07   -.28034E-03
  28  Prefactor     .85101        .93831E-01   -.58407E-06   -.14223E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  norm       = 0.659631
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 4.89012
  Prefactor  = 0.0001
  Prefactor  = 193.158
  Prefactor  = 0.000100199
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.000100001
  Prefactor  = 7.11743
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 10.5351
  norm       = 0.000100024
  norm       = 1.18366
  Prefactor  = 3.12053
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 20.2774
  Prefactor  = 7.20623
  Normalizat = 0.934407
  Prefactor  = 0.85101
 **********
 **   18 **HESSE 
 **********

 FCN=   6961.591     FROM HESSE     STATUS=OK           517 CALLS     4021 TOTAL
                     EDM=   .73E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    2.7092        .13408E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  norm          .65963        9.8895        .26759E-02   -1.5546    
   3  Prefactor     .10000E-03    1.1982        .17504E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  norm          .10000E-03    .38931        .87346E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     4.8901        19.148        .18196E-03   -1.5266    
   6  Prefactor     .10000E-03    6.1476        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     193.16        93.948        .29063E-04   -1.2919    
   8  Prefactor     .10020E-03    47.920        .43316E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .10000E-03    7.6160        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    14.655        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    3.4805        .15186E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    16.669        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .10000E-03    83.546        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     7.1174        16.843        .15040E-03   -1.5174    
  15  norm          .10000E-03    12.415        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     .10000E-03    6.3042        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     .10000E-03    44.600        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10000E-03    18.218        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     10.535        6.5720        .12346E-03   -1.5059    
  20  norm          .10002E-03    27.892        .38257E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  norm          1.1837        3.1350        .23061E-03   -1.5490    
  22  Prefactor     3.1205        4.6513        .21023E-03   -1.5355    
  23  norm          .10000E-03    3.0463        .14185E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     .10000E-03    11.276        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     20.277        19.302        .88943E-04   -1.4807    
  26  Prefactor     7.2062        4.9340        .14711E-03   -1.5171    
  27  Normalizat    .93441        .17808        .29957E-03   -.95261    
  28  Prefactor     .85101        .10282        .17592E-03   -.97875    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 7.2863e-09
Minuit parameter uncertainties:
  1  2.70312e-06
  2  5.10882
  3  3.35192e-06
  4  7.35634e-07
  5  19.1725
  6  4.75609e-05
  7  94.0214
  8  0.00618073
  9  3.55203e-05
  10  0.000164329
  11  1.14478e-06
  12  8.14178e-05
  13  0.000435863
  14  16.8538
  15  1.96439e-05
  16  7.79755e-05
  17  0.000150989
  18  0.000156634
  19  6.57244
  20  0.00163968
  21  3.13543
  22  4.65186
  23  3.33157e-06
  24  1.18761e-05
  25  19.3081
  26  4.93428
  27  0.178188
  28  0.102839
Done.

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

Extracting fit parameters...

4FGL J0239.7+0415
   Spectrum: PowerLaw
277    Prefactor:  7.117e+00  1.685e+01  1.000e-04  1.000e+04 ( 1.000e-12)
278        Index:  2.775e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
279        Scale:  4.112e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
516    Prefactor:  8.510e-01  1.028e-01  0.000e+00  1.000e+01 ( 1.000e+00)
517        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
518        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
515   Normalization:  9.344e-01  1.782e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.22
Ra Dec: 39.940 4.264
Photon Flux Upper Limit: 1.27e-07 ph cm-2 s-1
Energy Flux Upper Limit: 1.00e-02 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/642679/likelihoodResults_629942401_630201601_4FGL_J0239.7+0415_daily_bin1507.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): 0
logL (Free Index) = 6961.47087241
delta logL = 0.119886502872

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6961.05831363
delta logL = 0.532445282324

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .25669E-02   1.0000         .10000E-03   10000.    
     2 'Index     '    9.9998       1.0000          .0000       10.000    
     3 'Normalizat'    .91333       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .86101       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5190E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   6961.058     FROM MIGRAD    STATUS=CONVERGED     59 CALLS      311 TOTAL
                     EDM=   .60E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .25643E-02    .15835        .99957E-03** at limit **
   2  Index        10.0000        8.0186        .50000    ** at limit **
   3  Normalizat    .91330        .84334E-01    .68376E-01   -.33677E-04
   4  Prefactor     .86104        .45076E-01    .44506E-01    .42232E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.00256426
  Index      = 10
  Normalizat = 0.913305
  Prefactor  = 0.861041
 **********
 **   18 **HESSE 
 **********

 FCN=   6961.058     FROM HESSE     STATUS=OK            37 CALLS      348 TOTAL
                     EDM=   .37E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .25643E-02    .34805E-02    .50974E-04   -1.5698    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index        10.0000        6.2495        .50000        1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Normalizat    .91330        .17525        .30248E-03   -.95994    
   4  Prefactor     .86104        .98022E-01    .17502E-03   -.97516    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.73572e-11
Minuit parameter uncertainties:
  1  0.00348052
  2  0.000155459
  3  0.17536
  4  0.0980416
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/642679': 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) = 6961.05830822
delta logL = 0.532450690323

Extracting fit parameters...

4FGL J0239.7+0415
   Spectrum: PowerLaw
277    Prefactor:  2.564e-03  3.481e-03  1.000e-04  1.000e+04 ( 1.000e-12)
278        Index:  1.000e+01  1.555e-04  0.000e+00  1.000e+01 (-1.000e+00)
279        Scale:  4.112e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
516    Prefactor:  8.610e-01  9.804e-02  0.000e+00  1.000e+01 ( 1.000e+00)
517        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
518        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
515   Normalization:  9.133e-01  1.754e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.32
Ra Dec: 39.940 4.264
Photon Index (Free Index): 10.00 +/- 0.00
Photon Flux (Free Index): 4.06e-08 +/- 5.34e-08
Energy Flux (Free Index): 4.54e-06 +/- 6.01e-06

Creating a high resolution counts map...
INFO: Auto-setting vmin to -2.500e-04 [aplpy.core]
INFO: Auto-setting vmax to  2.775e-03 [aplpy.core]
Saving /scratch/kocevski/642679/cmap_HighResolution_629942401_630201601_4FGL_J0239.7+0415_daily_bin1507.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.00e-02', comment='SUCCESS', energy_flux2='4.54e-06', dlogl='5.32e-01', photon_flux2='4.06e-08', job_status='DONE', time_completed='2021-08-16 11:40:39.408523', photon_index_error2='0.00', photon_index2='10.00', ts='0.22', fit_tolerance='1e-08', GAL='0.85', photon_index_error='0.00', photon_flux_upper_limit='1.27e-07', energy_flux_error2='6.01e-06', EG='0.93', time_epoch_completed='1629139239.41', return_code='0', job_id='642679', GAL2='0.86', EG2='0.91', return_code2='0', photon_flux_error2='5.34e-08', ts2='1.32', photon_index='2.78' WHERE bin_id='1507' AND source_name='4FGL J0239.7+0415' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Aug 16 11:40:39 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0290>
Subject: Job 642679: <4FGL_J0239.7+0415_daily_bin1507> in cluster <slac> Done

Job <4FGL_J0239.7+0415_daily_bin1507> was submitted from host <rhel6-64q> by user <kocevski> in cluster <slac> at Mon Aug 16 11:25:28 2021
Job was executed on host(s) <bullet0290>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Aug 16 11:26:01 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Mon Aug 16 11:26:01 2021
Terminated at Mon Aug 16 11:40:40 2021
Results reported at Mon Aug 16 11:40:40 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J0239.7+0415_daily_bin1507 39.9403 4.2643 629942401 630201601 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J0239.7+0415 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   844.26 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             364.00 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   878 sec.
    Turnaround time :                            912 sec.

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

