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


Performing analysis on: 4FGL_J1248.3+5820_monthly_bin99
RA = 192.084, Dec = 58.3432
tmin = 493603201, tmax = 496195201
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='932825', job_status='RUN', time_executed='2021-10-23 23:33:59.450612', time_epoch_executed='1635057239.45' WHERE source_name='4FGL J1248.3+5820' and cadence='monthly' and bin_id='99'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/932825

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

Retrieving the FT1 file...

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

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

Retrieving 458 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/932825/ft1_4FGL_J1248.3+5820_monthly_bin99.fits


Retrieving the FT1 file...

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

Retrieving 458 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/932825/ft2_4FGL_J1248.3+5820_monthly_bin99.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/932825/ft1_4FGL_J1248.3+5820_monthly_bin99.fits outfile=/scratch/kocevski/932825/ft1_filteredMKT_4FGL_J1248.3+5820_monthly_bin99.fits ra=192.084 dec=58.3432 rad=12.0 tmin=493603201.0 tmax=496195201.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 32.20
user 31.25
sys 0.77

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/932825/ft2_4FGL_J1248.3+5820_monthly_bin99.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/932825/ft2_4FGL_J1248.3+5820_monthly_bin99.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/932825/ft1_filteredMKT_4FGL_J1248.3+5820_monthly_bin99.fits evtable="EVENTS" outfile="/scratch/kocevski/932825/ft1_filtered_4FGL_J1248.3+5820_monthly_bin99.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.91
user 0.64
sys 0.21

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/932825/ft1_filtered_4FGL_J1248.3+5820_monthly_bin99.fits" evtable="EVENTS" scfile=/scratch/kocevski/932825/ft2_4FGL_J1248.3+5820_monthly_bin99.fits sctable="SC_DATA" outfile=/scratch/kocevski/932825/ltcube_493603201_496195201_4FGL_J1248.3+5820_monthly_bin99.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/932825/ft2_4FGL_J1248.3+5820_monthly_bin99.fits
.....................!
real 110.52
user 108.56
sys 1.24

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/932825/ft1_filtered_4FGL_J1248.3+5820_monthly_bin99.fits evtable="EVENTS" scfile=/scratch/kocevski/932825/ft2_4FGL_J1248.3+5820_monthly_bin99.fits sctable="SC_DATA" expcube=/scratch/kocevski/932825/ltcube_493603201_496195201_4FGL_J1248.3+5820_monthly_bin99.fits outfile=/scratch/kocevski/932825/expmap_493603201_496195201_4FGL_J1248.3+5820_monthly_bin99.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/932825/ltcube_493603201_496195201_4FGL_J1248.3+5820_monthly_bin99.fits
.....................!
real 193.46
user 186.03
sys 7.02

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

Setting source of interest to:
4FGL J1248.3+5820 @ 192.084 58.3432

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/932825/ft1_filtered_4FGL_J1248.3+5820_monthly_bin99.fits scfile=/scratch/kocevski/932825/ft2_4FGL_J1248.3+5820_monthly_bin99.fits outfile=/scratch/kocevski/932825/cmap_493603201_496195201_4FGL_J1248.3+5820_monthly_bin99.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=192.084 yref=58.3432 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.76
user 0.59
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/932825/ft1_filtered_4FGL_J1248.3+5820_monthly_bin99.fits scfile=/scratch/kocevski/932825/ft2_4FGL_J1248.3+5820_monthly_bin99.fits outfile=/scratch/kocevski/932825/cmap_HighResolution_493603201_496195201_4FGL_J1248.3+5820_monthly_bin99.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=192.084 yref=58.3432 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.78
user 0.58
sys 0.18

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/932825/ft1_filtered_4FGL_J1248.3+5820_monthly_bin99.fits evtable="EVENTS" scfile=/scratch/kocevski/932825/ft2_4FGL_J1248.3+5820_monthly_bin99.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/932825/Model_4FGL_J1248.3+5820_monthly_bin99.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/932825/ft1_filtered_4FGL_J1248.3+5820_monthly_bin99.fits.....................!
real 467.61
user 462.18
sys 3.99

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/932825/ft1_filtered_4FGL_J1248.3+5820_monthly_bin99.fits', '/scratch/kocevski/932825/ft2_4FGL_J1248.3+5820_monthly_bin99.fits', expMap='/scratch/kocevski/932825/expmap_493603201_496195201_4FGL_J1248.3+5820_monthly_bin99.fits', expCube='/scratch/kocevski/932825/ltcube_493603201_496195201_4FGL_J1248.3+5820_monthly_bin99.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/932825/Model_4FGL_J1248.3+5820_monthly_bin99.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1248.3+5820'

4FGL J1248.3+5820
   Spectrum: LogParabola
364         norm:  3.611e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-12)
365        alpha:  1.811e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
366         beta:  4.589e-02  0.000e+00  0.000e+00  1.000e+01 ( 1.000e+00) fixed
367           Eb:  1.135e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/932825/ft1_filtered_4FGL_J1248.3+5820_monthly_bin99.fits
Spacecraft file(s): /scratch/kocevski/932825/ft2_4FGL_J1248.3+5820_monthly_bin99.fits
Exposure map: /scratch/kocevski/932825/expmap_493603201_496195201_4FGL_J1248.3+5820_monthly_bin99.fits
Exposure cube: /scratch/kocevski/932825/ltcube_493603201_496195201_4FGL_J1248.3+5820_monthly_bin99.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/932825/Model_4FGL_J1248.3+5820_monthly_bin99.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) = 65127.4368294

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .19145       1.0000         .10000E-03   10000.    
     3 'norm      '    .10688E-02   1.0000         .10000E-03   10000.    
     4 'Prefactor '    2.3780       1.0000         .10000E-03   10000.    
     5 'norm      '    .85174       1.0000         .10000E-03   10000.    
     6 'Prefactor '    5.2142       1.0000         .10000E-03   10000.    
     7 'Prefactor '    8.0441       1.0000         .10000E-03   10000.    
     8 'norm      '    2.4521       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10286E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .31032E-03   1.0000         .10000E-03   10000.    
    11 'norm      '    6.6677       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .33201E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    .78622       1.0000         .10000E-03   10000.    
    14 'norm      '    2.8817       1.0000         .10000E-03   10000.    
    15 'Prefactor '    5.6692       1.0000         .10000E-03   10000.    
    16 'norm      '    3.5875       1.0000         .10000E-03   10000.    
    17 'Prefactor '    5.8616       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10015E-03   1.0000         .10000E-03   10000.    
    19 'norm      '    .60242       1.0000         .10000E-03   10000.    
    20 'Prefactor '    20.497       1.0000         .10000E-03   10000.    
    21 'Prefactor '    20.852       1.0000         .10000E-03   10000.    
    22 'Prefactor '    2.9482       1.0000         .10000E-03   10000.    
    23 'norm      '    .45314       1.0000         .10000E-03   10000.    
    24 'Prefactor '    6.3773       1.0000         .10000E-03   10000.    
    25 'Prefactor '    .12675E-03   1.0000         .10000E-03   10000.    
    26 'Prefactor '    .11393       1.0000         .10000E-03   10000.    
    27 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    28 'norm      '    .10398E-03   1.0000         .10000E-03   10000.    
    29 'norm      '    .59304       1.0000         .10000E-03   10000.    
    30 'Prefactor '    3.7322       1.0000         .10000E-03   10000.    
    31 'Prefactor '    .10229E-03   1.0000         .10000E-03   10000.    
    32 'Normalizat'    1.0189       1.0000         .10000E-01   10.000    
    33 'Prefactor '    1.0297       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6980E+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=   65127.32     FROM MIGRAD    STATUS=FAILED      1733 CALLS     4927 TOTAL
                     EDM=   .25E-06    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    .43886        .53173E-01** at limit **
   2  Prefactor     .16586        1.4770        .10259        .31645E-02
   3  norm          .10000E-03    .70002        .75375E-01** at limit **
   4  Prefactor     2.3786        1.1869        .19041E-03    .21780E-03
   5  norm          .85440        1.3652        .32451E-03    .53923E-03
   6  Prefactor     5.2072        2.2940        .17604E-03   -.43501E-03
   7  Prefactor     8.0656        4.6285        .14136E-03   -.52113E-04
   8  norm          2.4525        .67733        .10470E-03   -.68627E-04
   9  Prefactor     .10070E-03    1.2838        .86658E-01** at limit **
  10  Prefactor     .10000E-03    25.871        .42751E-03** at limit **
  11  norm          6.6683        1.9900        .77700E-03    .15976E-02
  12  Prefactor     .10002E-03    9.2769        .59865E-02** at limit **
  13  Prefactor     .78612        .87398        .24794E-02    .18000E-02
  14  norm          2.8816        .59131        .85058E-04   -.80730E-03
  15  Prefactor     5.6926        5.5552        .16871E-03    .86255E-05
  16  norm          3.5873        .63534        .83002E-04   -.30024E-03
  17  Prefactor     5.8602        4.9254        .16587E-03   -.44412E-04
  18  Prefactor     .10000E-03    .52927        .18011E-02** at limit **
  19  norm          .60191        .57728        .20698E-02    .36173E-01
  20  Prefactor     20.426        14.890        .88468E-04    .35982E-04
  21  Prefactor     20.923        11.692        .87712E-04    .19701E-03
  22  Prefactor     2.9665        3.5894        .11826E-02    .27701E-03
  23  norm          .45188        .74138        .22854E-02    .37285E-01
  24  Prefactor     6.3456        12.886        .15894E-03   -.13219E-03
  25  Prefactor     .10000E-03    3.0798        .20289E-02** at limit **
  26  Prefactor     .16859        3.0593        .12586        .11493E-02
  27  Prefactor     .10000E-03    1.2856        .36285E-02** at limit **
  28  norm          .10000E-03    3.2390        .18142E-02** at limit **
  29  norm          .59286        1.0145        .31388E-03    .27295E-03
  30  Prefactor     3.7297        5.5966        .10451E-02    .31826E-03
  31  Prefactor     .10000E-03    19.316        .18142E-02** at limit **
  32  Normalizat    1.0188        .59815E-01    .21711E-03   -.89856E-03
  33  Prefactor     1.0297        .70954E-01    .27109E-03   -.13349E-02
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   65127.32     FROM SIMPLEX   STATUS=UNCHANGED   1618 CALLS     6545 TOTAL
                     EDM=   .20E-04    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    .43886        .35666E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .16586        1.4770        .16049E-05   -1.5627    
   3  norm          .10000E-03    .70002        .36356E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     2.3786        1.1869        .15749E-05   -1.5400    
   5  norm          .85440        1.3652        .15918E-05   -1.5523    
   6  Prefactor     5.2072        2.2940        .15628E-05   -1.5252    
   7  Prefactor     8.0656        4.6285        .15796E-05   -1.5140    
   8  norm          2.4525        .67733        .15695E-05   -1.5395    
   9  Prefactor     .10070E-03    1.2838        .33440E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    25.871        .74848E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  norm          6.6683        1.9900        .15368E-05   -1.5191    
  12  Prefactor     .10002E-03    9.2769        .40600E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .78612        .87398        .15711E-05   -1.5531    
  14  norm          2.8816        .59131        .15548E-05   -1.5368    
  15  Prefactor     5.6926        5.5552        .15405E-05   -1.5231    
  16  norm          3.5873        .63534        .15508E-05   -1.5329    
  17  Prefactor     5.8602        4.9254        .15424E-05   -1.5224    
  18  Prefactor     .10000E-03    .52927        .11839E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  norm          .60191        .57728        .15734E-05   -1.5553    
  20  Prefactor     20.426        14.890        .14974E-05   -1.4804    
  21  Prefactor     20.923        11.692        .14962E-05   -1.4793    
  22  Prefactor     2.9665        3.5894        .15541E-05   -1.5363    
  23  norm          .45188        .74138        .15753E-05   -1.5574    
  24  Prefactor     6.3456        12.886        .15398E-05   -1.5204    
  25  Prefactor     .10000E-03    3.0798        .23261E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  Prefactor     .16859        3.0593        .15803E-05   -1.5626    
  27  Prefactor     .10000E-03    1.2856        .12584E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  norm          .10000E-03    3.2390        .31516E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  29  norm          .59286        1.0145        .15736E-05   -1.5554    
  30  Prefactor     3.7297        5.5966        .15501E-05   -1.5322    
  31  Prefactor     .10000E-03    19.316        .41641E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  32  Normalizat    1.0188        .59815E-01    .93482E-06   -.92404    
  33  Prefactor     1.0297        .70954E-01    .92815E-06   -.91745    
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   65127.32     FROM MIGRAD    STATUS=CONVERGED    727 CALLS     7272 TOTAL
                     EDM=   .76E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    .43556        .53528E-01** at limit **
   2  Prefactor     .16583        1.4833        .10215        .31262E-02
   3  norm          .10000E-03    .68646        .77100E-01** at limit **
   4  Prefactor     2.3786        1.1868        .76165E-05    .71646E-05
   5  norm          .85438        1.3629        .12981E-04   -.35033E-04
   6  Prefactor     5.2072        2.2913        .70416E-05    .10075E-03
   7  Prefactor     8.0656        4.6279        .56546E-05   -.19301E-04
   8  norm          2.4525        .67725        .41878E-05    .17374E-03
   9  Prefactor     .10068E-03    1.2691        .87472E-01** at limit **
  10  Prefactor     .10000E-03    25.872        .85502E-04** at limit **
  11  norm          6.6683        1.9854        .31080E-04    .13168E-03
  12  Prefactor     .10000E-03    9.4467        .11973E-02** at limit **
  13  Prefactor     .78611        .87120        .99178E-04   -.14948E-03
  14  norm          2.8816        .59065        .34023E-05    .18178E-03
  15  Prefactor     5.6926        5.5543        .67483E-05    .43128E-04
  16  norm          3.5873        .63533        .33201E-05    .12053E-03
  17  Prefactor     5.8602        4.9256        .66350E-05    .54830E-06
  18  Prefactor     .10000E-03    .52954        .36021E-03** at limit **
  19  norm          .60191        .57612        .41397E-03    .14303E-03
  20  Prefactor     20.426        14.889        .35387E-05   -.15421E-04
  21  Prefactor     20.923        11.685        .35085E-05   -.41476E-04
  22  Prefactor     2.9665        3.5725        .47306E-04   -.61523E-04
  23  norm          .45189        .73648        .45707E-03    .35160E-03
  24  Prefactor     6.3457        12.883        .63575E-05    .31473E-04
  25  Prefactor     .10000E-03    3.1763        .81156E-04** at limit **
  26  Prefactor     .16859        3.0033        .12766        .11411E-02
  27  Prefactor     .10000E-03    1.2950        .72569E-03** at limit **
  28  norm          .10000E-03    3.2391        .36285E-03** at limit **
  29  norm          .59285        1.0140        .12555E-04   -.40566E-04
  30  Prefactor     3.7296        5.5958        .41802E-04   -.65271E-04
  31  Prefactor     .10000E-03    19.316        .36285E-03** at limit **
  32  Normalizat    1.0188        .59833E-01    .86844E-05    .37283E-03
  33  Prefactor     1.0297        .71032E-01    .10843E-04    .37408E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.165835
  norm       = 0.000100002
  Prefactor  = 2.37864
  norm       = 0.854379
  Prefactor  = 5.20721
  Prefactor  = 8.06562
  norm       = 2.45246
  Prefactor  = 0.000100677
  Prefactor  = 0.0001
  norm       = 6.66828
  Prefactor  = 0.0001
  Prefactor  = 0.78611
  norm       = 2.88156
  Prefactor  = 5.69256
  norm       = 3.58731
  Prefactor  = 5.86016
  Prefactor  = 0.0001
  norm       = 0.601915
  Prefactor  = 20.426
  Prefactor  = 20.923
  Prefactor  = 2.9665
  norm       = 0.451894
  Prefactor  = 6.3457
  Prefactor  = 0.0001
  Prefactor  = 0.168587
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 0.592849
  Prefactor  = 3.7296
  Prefactor  = 0.0001
  Normalizat = 1.01878
  Prefactor  = 1.02973
 **********
 **   18 **HESSE 
 **********

 FCN=   65127.32     FROM HESSE     STATUS=OK           715 CALLS     7987 TOTAL
                     EDM=   .76E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    .43609        .53473E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .16583        1.4825        .10221       -1.5627    
   3  norm          .10000E-03    .68751        .76963E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     2.3786        1.1869        .15233E-05   -1.5400    
   5  norm          .85438        1.3629        .25961E-05   -1.5523    
   6  Prefactor     5.2072        2.2906        .14083E-05   -1.5252    
   7  Prefactor     8.0656        4.6306        .11309E-05   -1.5140    
   8  norm          2.4525        .67726        .83757E-06   -1.5395    
   9  Prefactor     .10068E-03    1.2722        .87304E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    25.874        .17100E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  norm          6.6683        1.9857        .12432E-05   -1.5191    
  12  Prefactor     .10000E-03    9.4537        .23946E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .78611        .87114        .39671E-05   -1.5531    
  14  norm          2.8816        .59067        .68046E-06   -1.5368    
  15  Prefactor     5.6926        5.5543        .13497E-05   -1.5231    
  16  norm          3.5873        .63538        .66402E-06   -1.5329    
  17  Prefactor     5.8602        4.9255        .66350E-05   -1.5224    
  18  Prefactor     .10000E-03    .52955        .72043E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  norm          .60191        .57603        .16559E-04   -1.5553    
  20  Prefactor     20.426        14.819        .70774E-06   -1.4804    
  21  Prefactor     20.923        11.731        .70170E-06   -1.4793    
  22  Prefactor     2.9665        3.5719        .18922E-05   -1.5363    
  23  norm          .45189        .73572        .18283E-04   -1.5574    
  24  Prefactor     6.3457        12.796        .12715E-05   -1.5204    
  25  Prefactor     .10000E-03    3.1765        .16231E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  Prefactor     .16859        3.0145        .12726       -1.5626    
  27  Prefactor     .10000E-03    1.2954        .14514E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  norm          .10000E-03    3.2391        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  29  norm          .59285        1.0141        .25110E-05   -1.5554    
  30  Prefactor     3.7296        5.5957        .16721E-05   -1.5322    
  31  Prefactor     .10000E-03    19.316        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  32  Normalizat    1.0188        .59935E-01    .17369E-05   -.92404    
  33  Prefactor     1.0297        .71130E-01    .21687E-05   -.91745    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 7.60546e-09
Minuit parameter uncertainties:
  1  1.53588e-05
  2  0.991402
  3  7.2032e-05
  4  1.18691
  5  1.36292
  6  2.29066
  7  4.63082
  8  0.677259
  9  0.00185614
  10  9.01382e-06
  11  1.98574
  12  0.000125533
  13  0.871157
  14  0.590666
  15  5.55482
  16  0.635377
  17  4.92587
  18  9.8161e-09
  19  0.576038
  20  14.8213
  21  11.732
  22  3.57212
  23  0.735732
  24  12.8011
  25  3.98769e-06
  26  1.42542
  27  1.00599e-06
  28  2.43798e-07
  29  1.01414
  30  5.59652
  31  3.83619e-06
  32  0.0599392
  33  0.0711363
Done.

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

Extracting fit parameters...

4FGL J1248.3+5820
   Spectrum: LogParabola
364         norm:  2.882e+00  5.907e-01  1.000e-04  1.000e+04 ( 1.000e-12)
365        alpha:  1.811e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
366         beta:  4.589e-02  0.000e+00  0.000e+00  1.000e+01 ( 1.000e+00) fixed
367           Eb:  1.135e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
695    Prefactor:  1.030e+00  7.114e-02  0.000e+00  1.000e+01 ( 1.000e+00)
696        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
697        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
694   Normalization:  1.019e+00  5.994e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 86.30
Ra Dec: 192.084 58.343
Photon Index (Fixed Index): 1.81 +/- 0.00
Photon Flux (Fixed Index): 2.54e-08 +/- 5.21e-09
Energy Flux (Fixed Index): 2.54e-05 +/- 5.22e-06

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) = 65127.2857452
delta logL = 0.0384272633892

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 65127.2850017
delta logL = 0.0391707196468

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   65127.29     FROM MIGRAD    STATUS=CONVERGED     43 CALLS      204 TOTAL
                     EDM=   .34E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          2.8801        7.6720        .59872E-02    .34547E-03
   2  alpha         1.8559        1.5633        .37106        .10614E-03
   3  Normalizat    1.0173        .34573E-01    .43785E-01    .81953E-04
   4  Prefactor     1.0305        .29406E-01    .61274E-01    .11832E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 2.88014
  alpha      = 1.85589
  Normalizat = 1.01726
  Prefactor  = 1.03055
 **********
 **   18 **HESSE 
 **********

 FCN=   65127.29     FROM HESSE     STATUS=OK            33 CALLS      237 TOTAL
                     EDM=   .94E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          2.8801        .57879        .84213E-04   -1.5369    
   2  alpha         1.8559        .16150        .13013E-01   -.26058    
   3  Normalizat    1.0173        .56121E-01    .21725E-03   -.92454    
   4  Prefactor     1.0305        .70370E-01    .27098E-03   -.91718    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 9.41589e-12
Minuit parameter uncertainties:
  1  0.578794
  2  0.161618
  3  0.0561244
  4  0.0703767
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/932825': 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) = 65127.2850017
delta logL = 0.0391707197996

Extracting fit parameters...

4FGL J1248.3+5820
   Spectrum: LogParabola
364         norm:  2.880e+00  5.788e-01  1.000e-04  1.000e+04 ( 1.000e-12)
365        alpha:  1.856e+00  1.616e-01  0.000e+00  5.000e+00 ( 1.000e+00)
366         beta:  4.589e-02  0.000e+00  0.000e+00  1.000e+01 ( 1.000e+00) fixed
367           Eb:  1.135e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
695    Prefactor:  1.031e+00  7.038e-02  0.000e+00  1.000e+01 ( 1.000e+00)
696        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
697        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
694   Normalization:  1.017e+00  5.612e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 86.33
Ra Dec: 192.084 58.343
Photon Index (Free Index): 1.86 +/- 0.16
Photon Flux (Free Index): 2.68e-08 +/- 7.30e-09
Energy Flux (Free Index): 2.40e-05 +/- 6.95e-06

Creating a high resolution counts map...
INFO: Auto-setting vmin to -1.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  1.110e+00 [aplpy.core]
Saving /scratch/kocevski/932825/cmap_HighResolution_493603201_496195201_4FGL_J1248.3+5820_monthly_bin99.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='2.54e-08', energy_flux2='2.40e-05', photon_flux_error='5.21e-09', dlogl='3.92e-02', energy_flux='2.54e-05', photon_flux2='2.68e-08', job_status='DONE', time_completed='2021-10-24 02:20:43.549248', photon_index_error2='0.16', photon_index2='1.86', ts='86.30', fit_tolerance='1e-08', GAL='1.03', photon_index_error='0.00', energy_flux_error2='6.95e-06', EG='1.02', time_epoch_completed='1635067243.55', return_code='0', job_id='932825', GAL2='1.03', EG2='1.02', return_code2='0', energy_flux_error='5.22e-06', photon_flux_error2='7.30e-09', ts2='86.33', photon_index='1.81' WHERE bin_id='99' AND source_name='4FGL J1248.3+5820' AND cadence='monthly';

Database successfully updated.


Analysis Complete.


Sun Oct 24 02:20:43 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0089>
Subject: Job 932825: <4FGL_J1248.3+5820_monthly_bin99> in cluster <slac> Done

Job <4FGL_J1248.3+5820_monthly_bin99> was submitted from host <rhel6-64q> by user <kocevski> in cluster <slac> at Sat Oct 23 23:30:19 2021
Job was executed on host(s) <bullet0089>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Oct 23 23:30:20 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Sat Oct 23 23:30:20 2021
Terminated at Sun Oct 24 02:20:44 2021
Results reported at Sun Oct 24 02:20:44 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1248.3+5820_monthly_bin99 192.084 58.3432 493603201 496195201 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1248.3+5820 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   9924.00 sec.
    Max Memory :                                 628 MB
    Average Memory :                             397.22 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   10224 sec.
    Turnaround time :                            10225 sec.

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

