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


Performing analysis on: 4FGL_J1023.1+3949_daily_bin530
RA = 155.788, Dec = 39.8226
tmin = 376704001, tmax = 376963201
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='835587', job_status='RUN', time_executed='2021-09-01 19:15:40.200564', time_epoch_executed='1630548940.2' WHERE source_name='4FGL J1023.1+3949' and cadence='daily' and bin_id='530'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/835587

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/835587/ft1_4FGL_J1023.1+3949_daily_bin530.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/835587/ft2_4FGL_J1023.1+3949_daily_bin530.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/835587/ft1_4FGL_J1023.1+3949_daily_bin530.fits outfile=/scratch/kocevski/835587/ft1_filteredMKT_4FGL_J1023.1+3949_daily_bin530.fits ra=155.788 dec=39.8226 rad=12.0 tmin=376704001.0 tmax=376963201.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.41
user 3.18
sys 0.21

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/835587/ft2_4FGL_J1023.1+3949_daily_bin530.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/835587/ft2_4FGL_J1023.1+3949_daily_bin530.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/835587/ft1_filteredMKT_4FGL_J1023.1+3949_daily_bin530.fits evtable="EVENTS" outfile="/scratch/kocevski/835587/ft1_filtered_4FGL_J1023.1+3949_daily_bin530.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.48
user 0.33
sys 0.15

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/835587/ft1_filtered_4FGL_J1023.1+3949_daily_bin530.fits" evtable="EVENTS" scfile=/scratch/kocevski/835587/ft2_4FGL_J1023.1+3949_daily_bin530.fits sctable="SC_DATA" outfile=/scratch/kocevski/835587/ltcube_376704001_376963201_4FGL_J1023.1+3949_daily_bin530.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/835587/ft2_4FGL_J1023.1+3949_daily_bin530.fits
.....................!
real 11.95
user 11.58
sys 0.33

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/835587/ft1_filtered_4FGL_J1023.1+3949_daily_bin530.fits evtable="EVENTS" scfile=/scratch/kocevski/835587/ft2_4FGL_J1023.1+3949_daily_bin530.fits sctable="SC_DATA" expcube=/scratch/kocevski/835587/ltcube_376704001_376963201_4FGL_J1023.1+3949_daily_bin530.fits outfile=/scratch/kocevski/835587/expmap_376704001_376963201_4FGL_J1023.1+3949_daily_bin530.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/835587/ltcube_376704001_376963201_4FGL_J1023.1+3949_daily_bin530.fits
.....................!
real 190.58
user 185.43
sys 4.56

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

Setting source of interest to:
4FGL J1023.1+3949 @ 155.788 39.8226

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/835587/ft1_filtered_4FGL_J1023.1+3949_daily_bin530.fits scfile=/scratch/kocevski/835587/ft2_4FGL_J1023.1+3949_daily_bin530.fits outfile=/scratch/kocevski/835587/cmap_376704001_376963201_4FGL_J1023.1+3949_daily_bin530.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.788 yref=39.8226 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.54
user 0.37
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/835587/ft1_filtered_4FGL_J1023.1+3949_daily_bin530.fits scfile=/scratch/kocevski/835587/ft2_4FGL_J1023.1+3949_daily_bin530.fits outfile=/scratch/kocevski/835587/cmap_HighResolution_376704001_376963201_4FGL_J1023.1+3949_daily_bin530.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.788 yref=39.8226 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.54
user 0.39
sys 0.14

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/835587/ft1_filtered_4FGL_J1023.1+3949_daily_bin530.fits evtable="EVENTS" scfile=/scratch/kocevski/835587/ft2_4FGL_J1023.1+3949_daily_bin530.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/835587/Model_4FGL_J1023.1+3949_daily_bin530.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/835587/ft1_filtered_4FGL_J1023.1+3949_daily_bin530.fits.....................!
real 54.60
user 53.29
sys 1.13

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/835587/ft1_filtered_4FGL_J1023.1+3949_daily_bin530.fits', '/scratch/kocevski/835587/ft2_4FGL_J1023.1+3949_daily_bin530.fits', expMap='/scratch/kocevski/835587/expmap_376704001_376963201_4FGL_J1023.1+3949_daily_bin530.fits', expCube='/scratch/kocevski/835587/ltcube_376704001_376963201_4FGL_J1023.1+3949_daily_bin530.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/835587/Model_4FGL_J1023.1+3949_daily_bin530.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1023.1+3949'

4FGL J1023.1+3949
   Spectrum: LogParabola
329         norm:  9.888e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-12)
330        alpha:  2.250e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
331         beta:  1.077e-01  0.000e+00  0.000e+00  1.000e+01 ( 1.000e+00) fixed
332           Eb:  5.203e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/835587/ft1_filtered_4FGL_J1023.1+3949_daily_bin530.fits
Spacecraft file(s): /scratch/kocevski/835587/ft2_4FGL_J1023.1+3949_daily_bin530.fits
Exposure map: /scratch/kocevski/835587/expmap_376704001_376963201_4FGL_J1023.1+3949_daily_bin530.fits
Exposure cube: /scratch/kocevski/835587/ltcube_376704001_376963201_4FGL_J1023.1+3949_daily_bin530.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/835587/Model_4FGL_J1023.1+3949_daily_bin530.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) = 6519.35339005

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .10010E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    8.1854       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10014E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    1.7631       1.0000         .10000E-03   10000.    
     6 'Prefactor '    3.8564       1.0000         .10000E-03   10000.    
     7 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    2.3477       1.0000         .10000E-03   10000.    
     9 'Prefactor '    1.5797       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    74.072       1.0000         .10000E-03   10000.    
    12 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    .91081E-02   1.0000         .10000E-03   10000.    
    14 'norm      '    .10035E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10043E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    3.4138       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10015E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10036E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    43.908       1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    23 'norm      '    2.4853       1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10085E-03   1.0000         .10000E-03   10000.    
    25 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    26 'norm      '    13.951       1.0000         .10000E-03   10000.    
    27 'Normalizat'    1.3336       1.0000         .10000E-01   10.000    
    28 'Prefactor '    .51477       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6530E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   6519.342     FROM MIGRAD    STATUS=CONVERGED    703 CALLS     3525 TOTAL
                     EDM=   .98E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  3.9%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .10000E-03    8.0448        .14247E-06** at limit **
   2  Prefactor     .10000E-03    1.3669       -.17015E-06** at limit **
   3  norm          8.1891        14.266        .17876E-05    .28032E-03
   4  Prefactor     .10000E-03    7.5380       -.79178E-07** at limit **
   5  Prefactor     1.6944        90.132       -.34447E-06    .28595E-04
   6  Prefactor     3.8560        8.0438        .45946E-06    .28070E-03
   7  norm          .10000E-03    4.6266       -.60353E-07** at limit **
   8  Prefactor     2.3502        6.7663        .12128E-05    .70080E-03
   9  Prefactor     1.5797        1.9001       -.32750E-07   -.38509E-04
  10  Prefactor     .10000E-03    1.4283       -.33707E-07** at limit **
  11  Prefactor     74.064        41.636        .11640E-05    .13550E-03
  12  norm          .10000E-03    1.3108        .67149E-07** at limit **
  13  Prefactor     .10086E-03    6.7476        .23261E-05** at limit **
  14  norm          .10000E-03    3.5613        .38891E-06** at limit **
  15  Prefactor     .10000E-03    14.396        .51060E-06** at limit **
  16  Prefactor     .10000E-03    27.323        .81702E-06** at limit **
  17  Prefactor     3.4140        4.2480        .34180E-06    .25326E-03
  18  Prefactor     .10000E-03    2.5894        .94876E-07** at limit **
  19  Prefactor     .10000E-03    28.194        .13967E-05** at limit **
  20  Prefactor     43.905        83.323        .25313E-06    .12101E-04
  21  Prefactor     .10000E-03    15.968       -.66761E-06** at limit **
  22  Prefactor     .10000E-03    26.968        .51956E-06** at limit **
  23  norm          2.4854        .39116       -.36128E-07   -.17413E-02
  24  Prefactor     .10000E-03    19.422       -.15361E-05** at limit **
  25  Prefactor     .10000E-03    8.9359       -.31371E-06** at limit **
  26  norm          13.952        12.072       -.43710E-06   -.13611E-03
  27  Normalizat    1.3334        .18415       -.18623E-05    .13923E-03
  28  Prefactor     .51490        .20960        .40920E-05    .13252E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 8.18911
  Prefactor  = 0.0001
  Prefactor  = 1.69436
  Prefactor  = 3.85602
  norm       = 0.0001
  Prefactor  = 2.35024
  Prefactor  = 1.57968
  Prefactor  = 0.0001
  Prefactor  = 74.064
  norm       = 0.0001
  Prefactor  = 0.000100865
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 3.41398
  Prefactor  = 0.0001
  Prefactor  = 0.000100001
  Prefactor  = 43.9047
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 2.48538
  Prefactor  = 0.000100001
  Prefactor  = 0.0001
  norm       = 13.9516
  Normalizat = 1.33341
  Prefactor  = 0.514904
 **********
 **   18 **HESSE 
 **********

 FCN=   6519.342     FROM HESSE     STATUS=OK           515 CALLS     4040 TOTAL
                     EDM=   .20E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .10000E-03    8.1310        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    1.4143        .18466E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          8.1891        14.363        .14013E-03   -1.5136    
   4  Prefactor     .10000E-03    7.5451        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     1.6944        90.800        .31552E-03   -1.5448    
   6  Prefactor     3.8560        8.0435        .10275E-02   -1.5315    
   7  norm          .10000E-03    4.6356        .16962E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     2.3502        6.9505        .13377E-02   -1.5401    
   9  Prefactor     1.5797        1.8871        .11836E-03   -1.5457    
  10  Prefactor     .10000E-03    1.4377        .94089E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     74.064        41.582        .46651E-04   -1.3985    
  12  norm          .10000E-03    2.7654        .17871E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .10086E-03    42.796        .22052E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          .10000E-03    3.5590        .14860E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .10000E-03    14.432        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     .10000E-03    27.451        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     3.4140        4.2304        .17462E-03   -1.5338    
  18  Prefactor     .10000E-03    2.6242        .12676E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10000E-03    28.304        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     43.905        83.309        .60502E-04   -1.4382    
  21  Prefactor     .10000E-03    16.074        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     .10000E-03    27.004        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  norm          2.4854        .39160        .19330E-04   -1.5393    
  24  Prefactor     .10000E-03    19.679        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     .10000E-03    8.9599        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  norm          13.952        12.082        .10723E-03   -1.4961    
  27  Normalizat    1.3334        .19659        .20307E-03   -.82574    
  28  Prefactor     .51490        .22183        .37196E-03   -1.1130    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.04469e-08
Minuit parameter uncertainties:
  1  1.08012e-05
  2  1.01786e-05
  3  14.3692
  4  2.61542e-05
  5  24.8463
  6  8.04573
  7  5.13828e-06
  8  6.95288
  9  1.88714
  10  6.49518e-06
  11  41.5984
  12  2.32325e-05
  13  0.0121747
  14  1.61942e-05
  15  9.45702e-05
  16  0.000141503
  17  4.23074
  18  2.25547e-06
  19  0.000251782
  20  83.5307
  21  0.000113678
  22  0.000130717
  23  0.391603
  24  0.000255439
  25  3.55966e-05
  26  12.0845
  27  0.196703
  28  0.222202
Done.

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

Extracting fit parameters...

4FGL J1023.1+3949
   Spectrum: LogParabola
329         norm:  1.000e-04  1.619e-05  1.000e-04  1.000e+04 ( 1.000e-12)
330        alpha:  2.250e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
331         beta:  1.077e-01  0.000e+00  0.000e+00  1.000e+01 ( 1.000e+00) fixed
332           Eb:  5.203e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
650    Prefactor:  5.149e-01  2.222e-01  0.000e+00  1.000e+01 ( 1.000e+00)
651        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
652        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
649   Normalization:  1.333e+00  1.967e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 155.788 39.823
Photon Flux Upper Limit: 4.85e-08 ph cm-2 s-1
Energy Flux Upper Limit: 1.69e-05 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/835587/likelihoodResults_376704001_376963201_4FGL_J1023.1+3949_daily_bin530.txt

Performing a free index iterative likelihood fit...

Freezing all point sources, except source of interest...

Done.

Freeing candidate source...
Done.

Fit tolerance = 1

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 6519.34326264
delta logL = -0.00132987530469

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 6519.34193267
delta logL = 9.07930370886e-08

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .10010E-03   1.0000         .10000E-03   10000.    
     2 'alpha     '    2.2646       1.0000          .0000       5.0000    
     3 'Normalizat'    1.3334       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .51490       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6530E+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=   6519.231     FROM MIGRAD    STATUS=FAILED       140 CALLS      284 TOTAL
                     EDM=   .15E-06    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .29052        65.020        .14979E-01    .18393E-02
   2  alpha         5.0000        3.4076        .16554    ** at limit **
   3  Normalizat    1.3061        .40019        .20307E-03    .26244E-03
   4  Prefactor     .53650        .19179        .37196E-03    .44684E-04
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   6519.231     FROM SIMPLEX   STATUS=UNCHANGED    138 CALLS      422 TOTAL
                     EDM=   .67E-05    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .29052        65.020        .40234E-05    .18393E-02
   2  alpha         5.0000        3.4076        .90573E-02** at limit **
   3  Normalizat    1.3061        .40019        .75947E-06    .26244E-03
   4  Prefactor     .53650        .19179        .21032E-06    .44684E-04
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   6519.231     FROM MIGRAD    STATUS=CONVERGED     32 CALLS      454 TOTAL
                     EDM=   .97E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .29052        .65586        .88184E-03    .83075E-02
   2  alpha         5.0000        3.9653        .33108E-01** at limit **
   3  Normalizat    1.3061        .19245        .40614E-04    .26251E-03
   4  Prefactor     .53650        .22316        .14879E-04    .44623E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 0.290517
  alpha      = 5
  Normalizat = 1.30611
  Prefactor  = 0.536504
 **********
 **   18 **HESSE 
 **********

 FCN=   6519.231     FROM HESSE     STATUS=OK            25 CALLS      479 TOTAL
                     EDM=   .24E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .29052        .65361        .17637E-03   -1.5600    
   2  alpha         5.0000        3.9646        .66215E-02    7.8540    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Normalizat    1.3061        .19202        .81228E-05   -.83384    
   4  Prefactor     .53650        .22295        .29757E-05   -1.1033    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.40367e-10
Minuit parameter uncertainties:
  1  0.653631
  2  6.52363e-05
  3  0.192125
  4  0.223311
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/835587': 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) = 6519.23077708
delta logL = 0.111155688853

Extracting fit parameters...

4FGL J1023.1+3949
   Spectrum: LogParabola
329         norm:  2.905e-01  6.536e-01  1.000e-04  1.000e+04 ( 1.000e-12)
330        alpha:  5.000e+00  6.524e-05  0.000e+00  5.000e+00 ( 1.000e+00)
331         beta:  1.077e-01  0.000e+00  0.000e+00  1.000e+01 ( 1.000e+00) fixed
332           Eb:  5.203e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
650    Prefactor:  5.365e-01  2.233e-01  0.000e+00  1.000e+01 ( 1.000e+00)
651        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
652        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
649   Normalization:  1.306e+00  1.921e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 155.788 39.823

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/835587/cmap_HighResolution_376704001_376963201_4FGL_J1023.1+3949_daily_bin530.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.69e-05', job_status='DONE', photon_flux_upper_limit='4.85e-08', time_completed='2021-09-01 19:30:44.451737', job_id='835587', GAL2='0.54', fit_tolerance='1e-08', EG2='1.31', EG='1.33', time_epoch_completed='1630549844.45', return_code2='0', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.51', dlogl='1.11e-01', ts2='0.25', photon_index_error='0.00', photon_index='2.25' WHERE bin_id='530' AND source_name='4FGL J1023.1+3949' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Wed Sep  1 19:30:44 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0106>
Subject: Job 835587: <4FGL_J1023.1+3949_daily_bin530> in cluster <slac> Done

Job <4FGL_J1023.1+3949_daily_bin530> was submitted from host <rhel6-64d> by user <kocevski> in cluster <slac> at Wed Sep  1 19:15:30 2021
Job was executed on host(s) <bullet0106>, in queue <medium>, as user <kocevski> in cluster <slac> at Wed Sep  1 19:15:32 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:15:32 2021
Terminated at Wed Sep  1 19:30:45 2021
Results reported at Wed Sep  1 19:30:45 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1023.1+3949_daily_bin530 155.788 39.8226 376704001 376963201 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1023.1+3949 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   900.01 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             348.53 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   912 sec.
    Turnaround time :                            915 sec.

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

