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


Performing analysis on: 4FGL_J1023.1+3949_daily_bin297
RA = 155.788, Dec = 39.8226
tmin = 316310401, tmax = 316569601
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='834226', job_status='RUN', time_executed='2021-09-01 19:11:05.669073', time_epoch_executed='1630548665.67' WHERE source_name='4FGL J1023.1+3949' and cadence='daily' and bin_id='297'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/834226

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/834226/ft1_4FGL_J1023.1+3949_daily_bin297.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/834226/ft2_4FGL_J1023.1+3949_daily_bin297.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/834226/ft1_4FGL_J1023.1+3949_daily_bin297.fits outfile=/scratch/kocevski/834226/ft1_filteredMKT_4FGL_J1023.1+3949_daily_bin297.fits ra=155.788 dec=39.8226 rad=12.0 tmin=316310401.0 tmax=316569601.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.51
user 3.27
sys 0.20

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/834226/ft1_filtered_4FGL_J1023.1+3949_daily_bin297.fits" evtable="EVENTS" scfile=/scratch/kocevski/834226/ft2_4FGL_J1023.1+3949_daily_bin297.fits sctable="SC_DATA" outfile=/scratch/kocevski/834226/ltcube_316310401_316569601_4FGL_J1023.1+3949_daily_bin297.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/834226/ft2_4FGL_J1023.1+3949_daily_bin297.fits
.....................!
real 12.40
user 12.00
sys 0.34

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/834226/ft1_filtered_4FGL_J1023.1+3949_daily_bin297.fits evtable="EVENTS" scfile=/scratch/kocevski/834226/ft2_4FGL_J1023.1+3949_daily_bin297.fits sctable="SC_DATA" expcube=/scratch/kocevski/834226/ltcube_316310401_316569601_4FGL_J1023.1+3949_daily_bin297.fits outfile=/scratch/kocevski/834226/expmap_316310401_316569601_4FGL_J1023.1+3949_daily_bin297.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/834226/ltcube_316310401_316569601_4FGL_J1023.1+3949_daily_bin297.fits
.....................!
real 190.71
user 186.16
sys 4.13

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/834226/ft1_filtered_4FGL_J1023.1+3949_daily_bin297.fits scfile=/scratch/kocevski/834226/ft2_4FGL_J1023.1+3949_daily_bin297.fits outfile=/scratch/kocevski/834226/cmap_316310401_316569601_4FGL_J1023.1+3949_daily_bin297.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/834226/ft1_filtered_4FGL_J1023.1+3949_daily_bin297.fits scfile=/scratch/kocevski/834226/ft2_4FGL_J1023.1+3949_daily_bin297.fits outfile=/scratch/kocevski/834226/cmap_HighResolution_316310401_316569601_4FGL_J1023.1+3949_daily_bin297.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.53
user 0.38
sys 0.14

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

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/834226/ft1_filtered_4FGL_J1023.1+3949_daily_bin297.fits', '/scratch/kocevski/834226/ft2_4FGL_J1023.1+3949_daily_bin297.fits', expMap='/scratch/kocevski/834226/expmap_316310401_316569601_4FGL_J1023.1+3949_daily_bin297.fits', expCube='/scratch/kocevski/834226/ltcube_316310401_316569601_4FGL_J1023.1+3949_daily_bin297.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/834226/Model_4FGL_J1023.1+3949_daily_bin297.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/834226/ft1_filtered_4FGL_J1023.1+3949_daily_bin297.fits
Spacecraft file(s): /scratch/kocevski/834226/ft2_4FGL_J1023.1+3949_daily_bin297.fits
Exposure map: /scratch/kocevski/834226/expmap_316310401_316569601_4FGL_J1023.1+3949_daily_bin297.fits
Exposure cube: /scratch/kocevski/834226/ltcube_316310401_316569601_4FGL_J1023.1+3949_daily_bin297.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/834226/Model_4FGL_J1023.1+3949_daily_bin297.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) = 5745.58044961

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .28441E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    2.3612       1.0000         .10000E-03   10000.    
     3 'norm      '    8.5564       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .91214       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10006E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     7 'norm      '    .10004E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    2.6903       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .17340E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    1.9754       1.0000         .10000E-03   10000.    
    11 'Prefactor '    51.313       1.0000         .10000E-03   10000.    
    12 'norm      '    3.8714       1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10068E-03   1.0000         .10000E-03   10000.    
    14 'norm      '    .10492E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    14.040       1.0000         .10000E-03   10000.    
    17 'Prefactor '    .10200E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .12466E-02   1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .86006E-01   1.0000         .10000E-03   10000.    
    21 'Prefactor '    7.4126       1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    23 'norm      '    2.2196       1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    25 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    26 'norm      '    .10003E-03   1.0000         .10000E-03   10000.    
    27 'Normalizat'    1.1713       1.0000         .10000E-01   10.000    
    28 'Prefactor '    .78990       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=   5745.520     FROM MIGRAD    STATUS=CONVERGED    719 CALLS     4088 TOTAL
                     EDM=   .10E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.0%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .10000E-03    79.693        .37154E-05** at limit **
   2  Prefactor     2.3612        1.8205        .49072E-07   -.39175E-05
   3  norm          8.5458        14.443       -.50001E-06   -.44982E-04
   4  Prefactor     .91548        63.283        .48307E-05   -.64041E-04
   5  Prefactor     .10000E-03    8.3582        .19048E-06** at limit **
   6  Prefactor     .10000E-03    3.4678       -.21432E-06** at limit **
   7  norm          .10000E-03    3.7281       -.26754E-06** at limit **
   8  Prefactor     2.6916        6.6298        .38020E-06   -.15840E-04
   9  Prefactor     .10000E-03    2.7219       -.84157E-06** at limit **
  10  Prefactor     1.9756        2.4784       -.13232E-06   -.15860E-04
  11  Prefactor     51.310        34.449       -.17978E-05   -.15628E-04
  12  norm          3.8715        2.7967       -.50595E-07    .29276E-04
  13  Prefactor     .10000E-03    2.6150       -.33093E-06** at limit **
  14  norm          .10000E-03    5.1418       -.45194E-06** at limit **
  15  Prefactor     .10000E-03    32.144       -.76711E-06** at limit **
  16  Prefactor     14.044        19.949       -.19895E-05   -.59787E-04
  17  Prefactor     .10000E-03    2.5020       -.56689E-06** at limit **
  18  Prefactor     .10002E-03    3.8285        .92924E-06** at limit **
  19  Prefactor     .10000E-03    17.950       -.25265E-06** at limit **
  20  Prefactor     .10003E-03    8767.9       -.21519E-04** at limit **
  21  Prefactor     7.4126        22.767       -.17781E-06   -.17982E-05
  22  Prefactor     .10000E-03    26.881        .56241E-06** at limit **
  23  norm          2.2196        .40794        .51996E-07    .14212E-03
  24  Prefactor     .10000E-03    12.925        .47322E-06** at limit **
  25  Prefactor     .10000E-03    5.8366       -.57252E-07** at limit **
  26  norm          .10000E-03    12.480        .46297E-07** at limit **
  27  Normalizat    1.1713        .19866        .41829E-05    .25475E-04
  28  Prefactor     .78991        .23302       -.32795E-05    .19513E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 0.0001
  Prefactor  = 2.3612
  norm       = 8.54579
  Prefactor  = 0.915484
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 2.69161
  Prefactor  = 0.000100003
  Prefactor  = 1.97563
  Prefactor  = 51.3101
  norm       = 3.87154
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 14.0435
  Prefactor  = 0.0001
  Prefactor  = 0.000100021
  Prefactor  = 0.0001
  Prefactor  = 0.000100028
  Prefactor  = 7.41262
  Prefactor  = 0.0001
  norm       = 2.21955
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Normalizat = 1.17127
  Prefactor  = 0.789908
 **********
 **   18 **HESSE 
 **********

 FCN=   5745.520     FROM HESSE     STATUS=OK           543 CALLS     4631 TOTAL
                     EDM=   .36E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .10000E-03    7.7947        .63493E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     2.3612        1.8204        .87112E-04   -1.5401    
   3  norm          8.5458        15.258        .13704E-03   -1.5123    
   4  Prefactor     .91548        83.915        .49469E-02   -1.5517    
   5  Prefactor     .10000E-03    8.3652        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    3.4796        .13791E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  norm          .10000E-03    3.7361        .14299E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     2.6916        6.7962        .12420E-02   -1.5380    
   9  Prefactor     .10000E-03    7.2304        .17636E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     1.9756        2.4647        .12898E-03   -1.5427    
  11  Prefactor     51.310        34.523        .55987E-04   -1.4274    
  12  norm          3.8715        2.7956        .10372E-03   -1.5314    
  13  Prefactor     .10000E-03    2.6545        .11967E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          .10000E-03    5.1729        .16792E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .10000E-03    32.184        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     14.044        20.446        .10690E-03   -1.4958    
  17  Prefactor     .10000E-03    2.5388        .11706E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10002E-03    43.462        .23911E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10000E-03    17.992        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10003E-03    86.874        .21087       -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     7.4126        22.771        .14731E-03   -1.5163    
  22  Prefactor     .10000E-03    26.874        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  norm          2.2196        .40782        .20032E-04   -1.5410    
  24  Prefactor     .10000E-03    12.932        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     .10000E-03    5.8433        .17887E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  norm          .10000E-03    12.590        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  27  Normalizat    1.1713        .19974        .21874E-03   -.87495    
  28  Prefactor     .78991        .23326        .31383E-03   -1.0010    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.6204e-08
Minuit parameter uncertainties:
  1  2.24003e-05
  2  1.82044
  3  15.265
  4  17.5541
  5  2.49839e-05
  6  6.03633e-06
  7  3.13093e-06
  8  6.79818
  9  0.000305711
  10  2.46486
  11  34.5365
  12  2.79569
  13  4.56711e-06
  14  1.90878e-05
  15  2.28098e-05
  16  20.4566
  17  9.51116e-06
  18  0.00191097
  19  9.04725e-06
  20  0.00312639
  21  22.7975
  22  0.000125559
  23  0.407817
  24  8.08504e-05
  25  9.4055e-07
  26  4.52146e-05
  27  0.199869
  28  0.233547
Done.

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

Extracting fit parameters...

4FGL J1023.1+3949
   Spectrum: LogParabola
329         norm:  1.000e-04  1.909e-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:  7.899e-01  2.335e-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.171e+00  1.999e-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: 5.56e-08 ph cm-2 s-1
Energy Flux Upper Limit: 1.94e-05 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/834226/likelihoodResults_316310401_316569601_4FGL_J1023.1+3949_daily_bin297.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) = 5745.52132671
delta logL = -0.000919577085369

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 5745.52040711
delta logL = 2.97968654195e-08

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .10123E-03   1.0000         .10000E-03   10000.    
     2 'alpha     '    2.2705       1.0000          .0000       5.0000    
     3 'Normalizat'    1.1713       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .78990       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=   5745.452     FROM MIGRAD    STATUS=FAILED       158 CALLS      306 TOTAL
                     EDM=   .14E-06    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .42050        32.385        .27158E-01    .13146E-02
   2  alpha         4.6792        3.8668        .50000       -.16289E-04
   3  Normalizat    1.1478        .38726E-01    .21874E-03   -.99269E-05
   4  Prefactor     .80713        .43453E-01    .31382E-03   -.13512E-04
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   5745.452     FROM SIMPLEX   STATUS=UNCHANGED     83 CALLS      389 TOTAL
                     EDM=   .13E-04    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .42050        32.385        .13533E-03    .13146E-02
   2  alpha         4.6792        3.8668        .14434E-01   -.16289E-04
   3  Normalizat    1.1478        .38726E-01    .10509E-03   -.99269E-05
   4  Prefactor     .80713        .43453E-01    .70034E-04   -.13512E-04
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
 MACHINE ACCURACY LIMITS FURTHER IMPROVEMENT.

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   5745.452     FROM MIGRAD    STATUS=CONVERGED     82 CALLS      471 TOTAL
                     EDM=   .55E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .42050        2.9580        .21896E-03    .21086E-03
   2  alpha         4.6792        4.8348        .53314E-02   -.55443E-07
   3  Normalizat    1.1478        .20159        .17499E-05   -.64967E-05
   4  Prefactor     .80713        .23566        .25106E-05   -.11774E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 0.4205
  alpha      = 4.67917
  Normalizat = 1.14779
  Prefactor  = 0.807133
 **********
 **   18 **HESSE 
 **********

 FCN=   5745.452     FROM HESSE     STATUS=OK            25 CALLS      496 TOTAL
                     EDM=   .42E-12    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .42050        2.4272        .43791E-04   -1.5578    
   2  alpha         4.6792        4.8226        .21326E-03    7.3418    
   3  Normalizat    1.1478        .18947        .34998E-06   -.88232    
   4  Prefactor     .80713        .22031        .50212E-06   -.99466    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.16129e-13
Minuit parameter uncertainties:
  1  2.0204
  2  3.01952
  3  0.189578
  4  0.220554
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/834226': 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) = 5745.45169688
delta logL = 0.0687102540505

Extracting fit parameters...

4FGL J1023.1+3949
   Spectrum: LogParabola
329         norm:  4.205e-01  2.020e+00  1.000e-04  1.000e+04 ( 1.000e-12)
330        alpha:  4.679e+00  3.020e+00  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:  8.071e-01  2.206e-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.148e+00  1.896e-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/834226/cmap_HighResolution_316310401_316569601_4FGL_J1023.1+3949_daily_bin297.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.94e-05', job_status='DONE', photon_flux_upper_limit='5.56e-08', time_completed='2021-09-01 19:25:26.781114', job_id='834226', GAL2='0.81', fit_tolerance='1e-08', EG2='1.15', EG='1.17', time_epoch_completed='1630549526.78', return_code2='0', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.79', dlogl='6.87e-02', ts2='0.15', photon_index_error='0.00', photon_index='2.25' WHERE bin_id='297' AND source_name='4FGL J1023.1+3949' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Wed Sep  1 19:25:26 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0096>
Subject: Job 834226: <4FGL_J1023.1+3949_daily_bin297> in cluster <slac> Done

Job <4FGL_J1023.1+3949_daily_bin297> was submitted from host <rhel6-64j> by user <kocevski> in cluster <slac> at Wed Sep  1 19:10:47 2021
Job was executed on host(s) <bullet0096>, in queue <medium>, as user <kocevski> in cluster <slac> at Wed Sep  1 19:10:50 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:10:50 2021
Terminated at Wed Sep  1 19:25:27 2021
Results reported at Wed Sep  1 19:25:27 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1023.1+3949_daily_bin297 155.788 39.8226 316310401 316569601 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 :                                   856.39 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             331.43 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   877 sec.
    Turnaround time :                            880 sec.

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

