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


Performing analysis on: 4FGL_J1023.7+0038_daily_bin844
RA = 155.945, Dec = 0.6499
tmin = 458092801, tmax = 458352001
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='846925', job_status='RUN', time_executed='2021-09-01 19:59:00.993444', time_epoch_executed='1630551540.99' WHERE source_name='4FGL J1023.7+0038' and cadence='daily' and bin_id='844'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/846925

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/846925/ft1_4FGL_J1023.7+0038_daily_bin844.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/846925/ft2_4FGL_J1023.7+0038_daily_bin844.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/846925/ft1_4FGL_J1023.7+0038_daily_bin844.fits outfile=/scratch/kocevski/846925/ft1_filteredMKT_4FGL_J1023.7+0038_daily_bin844.fits ra=155.945 dec=0.6499 rad=12.0 tmin=458092801.0 tmax=458352001.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.66
user 3.40
sys 0.23

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/846925/ft2_4FGL_J1023.7+0038_daily_bin844.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/846925/ft2_4FGL_J1023.7+0038_daily_bin844.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/846925/ft1_filteredMKT_4FGL_J1023.7+0038_daily_bin844.fits evtable="EVENTS" outfile="/scratch/kocevski/846925/ft1_filtered_4FGL_J1023.7+0038_daily_bin844.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.53
user 0.34
sys 0.17

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/846925/ft1_filtered_4FGL_J1023.7+0038_daily_bin844.fits" evtable="EVENTS" scfile=/scratch/kocevski/846925/ft2_4FGL_J1023.7+0038_daily_bin844.fits sctable="SC_DATA" outfile=/scratch/kocevski/846925/ltcube_458092801_458352001_4FGL_J1023.7+0038_daily_bin844.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/846925/ft2_4FGL_J1023.7+0038_daily_bin844.fits
.....................!
real 17.39
user 16.96
sys 0.36

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/846925/ft1_filtered_4FGL_J1023.7+0038_daily_bin844.fits evtable="EVENTS" scfile=/scratch/kocevski/846925/ft2_4FGL_J1023.7+0038_daily_bin844.fits sctable="SC_DATA" expcube=/scratch/kocevski/846925/ltcube_458092801_458352001_4FGL_J1023.7+0038_daily_bin844.fits outfile=/scratch/kocevski/846925/expmap_458092801_458352001_4FGL_J1023.7+0038_daily_bin844.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/846925/ltcube_458092801_458352001_4FGL_J1023.7+0038_daily_bin844.fits
.....................!
real 194.86
user 188.27
sys 5.76

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

Setting source of interest to:
4FGL J1023.7+0038 @ 155.945 0.6499

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/846925/ft1_filtered_4FGL_J1023.7+0038_daily_bin844.fits scfile=/scratch/kocevski/846925/ft2_4FGL_J1023.7+0038_daily_bin844.fits outfile=/scratch/kocevski/846925/cmap_458092801_458352001_4FGL_J1023.7+0038_daily_bin844.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=155.945 yref=0.6499 axisrot=0.0 rafield="RA" decfield="DEC" proj="AIT" hpx_ordering_scheme="RING" hpx_order=3 hpx_ebin=yes hpx_region="" evtable="EVENTS" sctable="SC_DATA" efield="ENERGY" tfield="TIME" chatter=2 clobber=yes debug=no gui=no mode="ql"

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

This is gtbin version HEAD
real 0.59
user 0.39
sys 0.17

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/846925/ft1_filtered_4FGL_J1023.7+0038_daily_bin844.fits scfile=/scratch/kocevski/846925/ft2_4FGL_J1023.7+0038_daily_bin844.fits outfile=/scratch/kocevski/846925/cmap_HighResolution_458092801_458352001_4FGL_J1023.7+0038_daily_bin844.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=155.945 yref=0.6499 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.58
user 0.41
sys 0.15

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/846925/ft1_filtered_4FGL_J1023.7+0038_daily_bin844.fits evtable="EVENTS" scfile=/scratch/kocevski/846925/ft2_4FGL_J1023.7+0038_daily_bin844.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/846925/Model_4FGL_J1023.7+0038_daily_bin844.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/846925/ft1_filtered_4FGL_J1023.7+0038_daily_bin844.fits.....................!
real 61.85
user 59.55
sys 1.21

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/846925/ft1_filtered_4FGL_J1023.7+0038_daily_bin844.fits', '/scratch/kocevski/846925/ft2_4FGL_J1023.7+0038_daily_bin844.fits', expMap='/scratch/kocevski/846925/expmap_458092801_458352001_4FGL_J1023.7+0038_daily_bin844.fits', expCube='/scratch/kocevski/846925/ltcube_458092801_458352001_4FGL_J1023.7+0038_daily_bin844.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/846925/Model_4FGL_J1023.7+0038_daily_bin844.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1023.7+0038'

4FGL J1023.7+0038
   Spectrum: LogParabola
214         norm:  2.061e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-11)
215        alpha:  2.233e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
216         beta:  1.811e-01  0.000e+00  0.000e+00  1.000e+01 ( 1.000e+00) fixed
217           Eb:  5.178e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/846925/ft1_filtered_4FGL_J1023.7+0038_daily_bin844.fits
Spacecraft file(s): /scratch/kocevski/846925/ft2_4FGL_J1023.7+0038_daily_bin844.fits
Exposure map: /scratch/kocevski/846925/expmap_458092801_458352001_4FGL_J1023.7+0038_daily_bin844.fits
Exposure cube: /scratch/kocevski/846925/ltcube_458092801_458352001_4FGL_J1023.7+0038_daily_bin844.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/846925/Model_4FGL_J1023.7+0038_daily_bin844.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) = 6237.91056093

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .41757       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     5 'norm      '    10.856       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10162E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10008E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .15875E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    4.7961       1.0000         .10000E-03   10000.    
    10 'norm      '    1.4334       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .18269       1.0000         .10000E-03   10000.    
    12 'Prefactor '    2.4510       1.0000         .10000E-03   10000.    
    13 'Prefactor '    9.5103       1.0000         .10000E-03   10000.    
    14 'norm      '    2.0269       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10009E-03   1.0000         .10000E-03   10000.    
    16 'Normalizat'    .92804       1.0000         .10000E-01   10.000    
    17 'Prefactor '    1.1817       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .4990E+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.
 MIGRAD TERMINATED WITHOUT CONVERGENCE.

 FCN=   6237.862     FROM MIGRAD    STATUS=FAILED       579 CALLS     1630 TOTAL
                     EDM=   .40E-07    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .10000E-03    .43823        .80790E-03** at limit **
   2  Prefactor     .39037        55.895        .42203E-02    .13414E-02
   3  Prefactor     .10000E-03    28.677        .18142E-02** at limit **
   4  Prefactor     .10000E-03    8.7151        .18142E-02** at limit **
   5  norm          10.846        11.717        .12160E-03    .22493E-03
   6  Prefactor     .10000E-03    5.4543        .17971E-02** at limit **
   7  Prefactor     .10000E-03    16.721        .18142E-02** at limit **
   8  Prefactor     .10000E-03    40.601        .18142E-02** at limit **
   9  Prefactor     4.7848        11.151        .18371E-03    .58370E-03
  10  norm          1.4340        1.2353        .78115E-04    .74486E-03
  11  Prefactor     .14311        9.0459        .53314E-01    .44197E-03
  12  Prefactor     2.4474        4.4648        .20187E-03    .84466E-03
  13  Prefactor     9.5138        9.1447        .12995E-03    .37146E-03
  14  norm          2.0271        .63935        .34092E-04    .64593E-03
  15  Prefactor     .10000E-03    3.5862        .14565E-02** at limit **
  16  Normalizat    .92809        .23936        .29750E-03    .98913E-03
  17  Prefactor     1.1817        .18640        .21569E-03    .10909E-02
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   6237.862     FROM SIMPLEX   STATUS=UNCHANGED    870 CALLS     2500 TOTAL
                     EDM=   .14E-04    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .10000E-03    .43823        .79286E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .39037        55.895        .50311E-06   -1.5583    
   3  Prefactor     .10000E-03    28.677        .52846E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    8.7151        .42315E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          10.846        11.717        .10193E-06   -1.5049    
   6  Prefactor     .10000E-03    5.4543        .30078E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    16.721        .29225E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    40.601        .16931E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     4.7848        11.151        .10339E-06   -1.5270    
  10  norm          1.4340        1.2353        .10487E-06   -1.5468    
  11  Prefactor     .14311        9.0459        .10594E-06   -1.5632    
  12  Prefactor     2.4474        4.4648        .10456E-06   -1.5395    
  13  Prefactor     9.5138        9.1447        .10247E-06   -1.5091    
  14  norm          2.0271        .63935        .10471E-06   -1.5423    
  15  Prefactor     .10000E-03    3.5862        .15586E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Normalizat    .92809        .23936        .64666E-07   -.95480    
  17  Prefactor     1.1817        .18640        .58939E-07   -.86896    
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   6237.862     FROM MIGRAD    STATUS=CONVERGED    220 CALLS     2720 TOTAL
                     EDM=   .49E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .10000E-03    .43860        .16158E-03** at limit **
   2  Prefactor     .39055        55.301        .84406E-03    .98863E-05
   3  Prefactor     .10000E-03    28.680        .36285E-03** at limit **
   4  Prefactor     .10000E-03    8.7152        .36285E-03** at limit **
   5  norm          10.845        11.573        .24319E-04   -.30105E-04
   6  Prefactor     .10000E-03    5.4551        .35941E-03** at limit **
   7  Prefactor     .10000E-03    16.722        .36285E-03** at limit **
   8  Prefactor     .10000E-03    40.604        .36285E-03** at limit **
   9  Prefactor     4.7845        11.150        .73482E-05   -.55697E-05
  10  norm          1.4340        1.2349        .31246E-05   -.98238E-04
  11  Prefactor     .14312        8.2417        .56416E-01    .36687E-03
  12  Prefactor     2.4473        4.4624        .80746E-05   -.81661E-05
  13  Prefactor     9.5138        9.1423        .51980E-05   -.69988E-05
  14  norm          2.0271        .63930        .68184E-05   -.32680E-04
  15  Prefactor     .10000E-03    3.5865        .29130E-03** at limit **
  16  Normalizat    .92808        .23924        .59501E-04   -.54569E-04
  17  Prefactor     1.1817        .18654        .43138E-04   -.68732E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 0.0001
  Prefactor  = 0.390554
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 10.8455
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 4.78449
  norm       = 1.43402
  Prefactor  = 0.143122
  Prefactor  = 2.44733
  Prefactor  = 9.51382
  norm       = 2.02706
  Prefactor  = 0.0001
  Normalizat = 0.928083
  Prefactor  = 1.1817
 **********
 **   18 **HESSE 
 **********

 FCN=   6237.862     FROM HESSE     STATUS=OK           217 CALLS     2937 TOTAL
                     EDM=   .54E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .10000E-03    .43862        .32316E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .39055        54.922        .33762E-04   -1.5583    
   3  Prefactor     .10000E-03    28.680        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    8.7152        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          10.845        11.538        .48639E-05   -1.5049    
   6  Prefactor     .10000E-03    5.4552        .71883E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    16.722        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    40.604        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     4.7845        11.154        .14696E-05   -1.5270    
  10  norm          1.4340        1.2348        .62492E-06   -1.5468    
  11  Prefactor     .14312        8.5309        .55235E-01   -1.5632    
  12  Prefactor     2.4473        4.4612        .16149E-05   -1.5395    
  13  Prefactor     9.5138        9.1438        .10396E-05   -1.5091    
  14  norm          2.0271        .63931        .13637E-05   -1.5423    
  15  Prefactor     .10000E-03    3.5866        .58260E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Normalizat    .92808        .23922        .11900E-04   -.95480    
  17  Prefactor     1.1817        .18657        .86275E-05   -.86896    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 5.36065e-10
Minuit parameter uncertainties:
  1  3.3907e-07
  2  9.27033
  3  5.83225e-06
  4  7.96376e-07
  5  11.54
  6  3.0897e-06
  7  2.34242e-06
  8  2.60624e-05
  9  11.1586
  10  1.23487
  11  2.20949
  12  4.46178
  13  9.14512
  14  0.639311
  15  5.03958e-07
  16  0.239496
  17  0.186672
Done.

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

Extracting fit parameters...

4FGL J1023.7+0038
   Spectrum: LogParabola
214         norm:  1.434e+00  1.235e+00  1.000e-04  1.000e+04 ( 1.000e-11)
215        alpha:  2.233e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
216         beta:  1.811e-01  0.000e+00  0.000e+00  1.000e+01 ( 1.000e+00) fixed
217           Eb:  5.178e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
496    Prefactor:  1.182e+00  1.867e-01  0.000e+00  1.000e+01 ( 1.000e+00)
497        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
498        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
495   Normalization:  9.281e-01  2.395e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 3.20
Ra Dec: 155.945 0.650
Photon Index (Fixed Index): 2.23 +/- 0.00
Photon Flux (Fixed Index): 3.65e-08 +/- 3.14e-08
Energy Flux (Fixed Index): 1.25e-05 +/- 1.08e-05

TS (Fixed Index): 3.20
Ra Dec: 155.945 0.650
Photon Flux Upper Limit: 1.14e-07 ph cm-2 s-1
Energy Flux Upper Limit: 3.91e-05 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/846925/likelihoodResults_458092801_458352001_4FGL_J1023.7+0038_daily_bin844.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) = 6237.70733066
delta logL = 0.154566975924

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6237.68906182
delta logL = 0.17283581512

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   6237.689     FROM MIGRAD    STATUS=CONVERGED     51 CALLS      204 TOTAL
                     EDM=   .51E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          1.1886        1.0421        .10451E-01    .26715E-04
   2  alpha         1.7313        .62454        .43927       -.26310E-04
   3  Normalizat    .94206        .19709        .66809E-01    .16657E-04
   4  Prefactor     1.1770        .15963        .35198E-01    .20563E-05
                               ERR DEF=  .500    
Final values: 
  norm       = 1.18855
  alpha      = 1.73126
  Normalizat = 0.942063
  Prefactor  = 1.17703
 **********
 **   18 **HESSE 
 **********

 FCN=   6237.689     FROM HESSE     STATUS=OK            33 CALLS      237 TOTAL
                     EDM=   .14E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          1.1886        1.2265        .73061E-04   -1.5490    
   2  alpha         1.7313        .82247        .20349E-01   -.31256    
   3  Normalizat    .94206        .22903        .29553E-03   -.94997    
   4  Prefactor     1.1770        .18581        .21606E-03   -.87041    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.38252e-09
Minuit parameter uncertainties:
  1  1.22653
  2  0.839809
  3  0.229266
  4  0.185912
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/846925': 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) = 6237.68906175
delta logL = 0.172835877415

Extracting fit parameters...

4FGL J1023.7+0038
   Spectrum: LogParabola
214         norm:  1.189e+00  1.227e+00  1.000e-04  1.000e+04 ( 1.000e-11)
215        alpha:  1.731e+00  8.398e-01  0.000e+00  5.000e+00 ( 1.000e+00)
216         beta:  1.811e-01  0.000e+00  0.000e+00  1.000e+01 ( 1.000e+00) fixed
217           Eb:  5.178e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
496    Prefactor:  1.177e+00  1.859e-01  0.000e+00  1.000e+01 ( 1.000e+00)
497        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
498        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
495   Normalization:  9.421e-01  2.293e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 3.55
Ra Dec: 155.945 0.650
Photon Index (Free Index): 1.73 +/- 0.84
Photon Flux (Free Index): 2.20e-08 +/- 2.81e-08
Energy Flux (Free Index): 1.35e-05 +/- 1.23e-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/846925/cmap_HighResolution_458092801_458352001_4FGL_J1023.7+0038_daily_bin844.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='3.91e-05', comment='SUCCESS', photon_flux='3.65e-08', energy_flux2='1.35e-05', photon_flux_error='3.14e-08', dlogl='1.73e-01', energy_flux='1.25e-05', photon_flux2='2.20e-08', job_status='DONE', time_completed='2021-09-01 20:09:03.295860', photon_index_error2='0.84', photon_index2='1.73', ts='3.20', fit_tolerance='1e-08', GAL='1.18', photon_index_error='0.00', photon_flux_upper_limit='1.14e-07', energy_flux_error2='1.23e-05', EG='0.93', time_epoch_completed='1630552143.3', return_code='0', job_id='846925', GAL2='1.18', EG2='0.94', return_code2='0', energy_flux_error='1.08e-05', photon_flux_error2='2.81e-08', ts2='3.55', photon_index='2.23' WHERE bin_id='844' AND source_name='4FGL J1023.7+0038' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Wed Sep  1 20:09:03 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0231>
Subject: Job 846925: <4FGL_J1023.7+0038_daily_bin844> in cluster <slac> Done

Job <4FGL_J1023.7+0038_daily_bin844> was submitted from host <rhel6-64j> by user <kocevski> in cluster <slac> at Wed Sep  1 19:55:21 2021
Job was executed on host(s) <bullet0231>, in queue <medium>, as user <kocevski> in cluster <slac> at Wed Sep  1 19:55:23 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Wed Sep  1 19:55:23 2021
Terminated at Wed Sep  1 20:09:04 2021
Results reported at Wed Sep  1 20:09:04 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1023.7+0038_daily_bin844 155.945 0.6499 458092801 458352001 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1023.7+0038 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   600.26 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             270.82 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   820 sec.
    Turnaround time :                            823 sec.

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

