aklog: Couldn't determine realm of user:aklog: unknown RPC error (-1765328189)  while getting realm
/nfs/farm/g/glast/g/LCRepository/bin/miniconda2/envs/fermitools_v1.0.5/lib/python2.7/site-packages/matplotlib/font_manager.py:281: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment.
  'Matplotlib is building the font cache using fc-list. '
/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 61 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 = 17153
number of fields = 30
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J0502.5+1340_weekly_bin300
RA = 75.6341, Dec = 13.6685
tmin = 420422401, tmax = 421027201
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='799668', job_status='RUN', time_executed='2021-07-08 07:21:35.588132', time_epoch_executed='1625754095.59' WHERE source_name='4FGL J0502.5+1340' and cadence='weekly' and bin_id='300'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/799668

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

Retrieving the FT1 file...

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

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

Retrieving 107 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/799668/ft1_4FGL_J0502.5+1340_weekly_bin300.fits


Retrieving the FT1 file...

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

Retrieving 107 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/799668/ft2_4FGL_J0502.5+1340_weekly_bin300.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/799668/ft1_4FGL_J0502.5+1340_weekly_bin300.fits outfile=/scratch/kocevski/799668/ft1_filteredMKT_4FGL_J0502.5+1340_weekly_bin300.fits ra=75.6341 dec=13.6685 rad=12.0 tmin=420422401.0 tmax=421027201.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 10.17
user 7.00
sys 0.39

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/799668/ft2_4FGL_J0502.5+1340_weekly_bin300.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/799668/ft2_4FGL_J0502.5+1340_weekly_bin300.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/799668/ft1_filteredMKT_4FGL_J0502.5+1340_weekly_bin300.fits evtable="EVENTS" outfile="/scratch/kocevski/799668/ft1_filtered_4FGL_J0502.5+1340_weekly_bin300.fits" apply_filter=yes overwrite=yes header_obstimes=yes tstart=0.0 tstop=0.0 gtifile="default" chatter=3 clobber=yes debug=no gui=no mode="ql"

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/799668/ft1_filtered_4FGL_J0502.5+1340_weekly_bin300.fits" evtable="EVENTS" scfile=/scratch/kocevski/799668/ft2_4FGL_J0502.5+1340_weekly_bin300.fits sctable="SC_DATA" outfile=/scratch/kocevski/799668/ltcube_420422401_421027201_4FGL_J0502.5+1340_weekly_bin300.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/799668/ft2_4FGL_J0502.5+1340_weekly_bin300.fits
.....................!
real 28.27
user 26.29
sys 0.44

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/799668/ft1_filtered_4FGL_J0502.5+1340_weekly_bin300.fits evtable="EVENTS" scfile=/scratch/kocevski/799668/ft2_4FGL_J0502.5+1340_weekly_bin300.fits sctable="SC_DATA" expcube=/scratch/kocevski/799668/ltcube_420422401_421027201_4FGL_J0502.5+1340_weekly_bin300.fits outfile=/scratch/kocevski/799668/expmap_420422401_421027201_4FGL_J0502.5+1340_weekly_bin300.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/799668/ltcube_420422401_421027201_4FGL_J0502.5+1340_weekly_bin300.fits
.....................!
real 198.79
user 185.48
sys 5.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
Extended source S 147 in ROI, make sure /nfs/farm/g/glast/g/LCRepository/Likelihood/ExtendedSources/Extended_archive_v18/Templates/S147.fits is the correct path to the extended template.
Extended source IC 443 in ROI with RadialGaussian spatial model.
Added 161 point sources and 2 extended sources
If using unbinned likelihood you will need to rerun gtdiffrsp for the extended sources or rerun the makeModel function with optional argument psForce=True

Setting source of interest to:
4FGL J0502.5+1340 @ 75.6341 13.6685

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/799668/ft1_filtered_4FGL_J0502.5+1340_weekly_bin300.fits scfile=/scratch/kocevski/799668/ft2_4FGL_J0502.5+1340_weekly_bin300.fits outfile=/scratch/kocevski/799668/cmap_420422401_421027201_4FGL_J0502.5+1340_weekly_bin300.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=75.6341 yref=13.6685 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 5.28
user 0.42
sys 0.27

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/799668/ft1_filtered_4FGL_J0502.5+1340_weekly_bin300.fits scfile=/scratch/kocevski/799668/ft2_4FGL_J0502.5+1340_weekly_bin300.fits outfile=/scratch/kocevski/799668/cmap_HighResolution_420422401_421027201_4FGL_J0502.5+1340_weekly_bin300.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=75.6341 yref=13.6685 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 2.22
user 0.43
sys 0.26

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/799668/ft1_filtered_4FGL_J0502.5+1340_weekly_bin300.fits evtable="EVENTS" scfile=/scratch/kocevski/799668/ft2_4FGL_J0502.5+1340_weekly_bin300.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/799668/Model_4FGL_J0502.5+1340_weekly_bin300.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
adding source IC 443
adding source S 147
Working on...
/scratch/kocevski/799668/ft1_filtered_4FGL_J0502.5+1340_weekly_bin300.fits.....................!
real 911.64
user 888.65
sys 1.59

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/799668/ft1_filtered_4FGL_J0502.5+1340_weekly_bin300.fits', '/scratch/kocevski/799668/ft2_4FGL_J0502.5+1340_weekly_bin300.fits', expMap='/scratch/kocevski/799668/expmap_420422401_421027201_4FGL_J0502.5+1340_weekly_bin300.fits', expCube='/scratch/kocevski/799668/ltcube_420422401_421027201_4FGL_J0502.5+1340_weekly_bin300.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/799668/Model_4FGL_J0502.5+1340_weekly_bin300.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J0502.5+1340'

4FGL J0502.5+1340
   Spectrum: PowerLaw
218    Prefactor:  1.139e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-13)
219        Index:  2.232e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
220        Scale:  1.884e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/799668/ft1_filtered_4FGL_J0502.5+1340_weekly_bin300.fits
Spacecraft file(s): /scratch/kocevski/799668/ft2_4FGL_J0502.5+1340_weekly_bin300.fits
Exposure map: /scratch/kocevski/799668/expmap_420422401_421027201_4FGL_J0502.5+1340_weekly_bin300.fits
Exposure cube: /scratch/kocevski/799668/ltcube_420422401_421027201_4FGL_J0502.5+1340_weekly_bin300.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/799668/Model_4FGL_J0502.5+1340_weekly_bin300.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) = 40226.3209801

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    14.050       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    1.6600       1.0000         .10000E-03   10000.    
     4 'norm      '    3.2869       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .12179E-03   1.0000         .10000E-03   10000.    
     7 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    20.019       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    11 'norm      '    .10011E-03   1.0000         .10000E-03   10000.    
    12 'norm      '    8.2579       1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    14 'norm      '    8.6761       1.0000         .10000E-03   10000.    
    15 'Prefactor '    2.3670       1.0000         .10000E-03   10000.    
    16 'Prefactor '    50.673       1.0000         .10000E-03   10000.    
    17 'norm      '    2.2405       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    19 'norm      '    .10009E-03   1.0000         .10000E-03   10000.    
    20 'norm      '    1.3671       1.0000         .10000E-03   10000.    
    21 'Prefactor '    1.1890       1.0000         .10000E-03   10000.    
    22 'norm      '    8.5031       1.0000         .10000E-03   10000.    
    23 'Prefactor '    3.1049       1.0000         .10000E-03   10000.    
    24 'Prefactor '    .19571E-02   1.0000         .10000E-03   10000.    
    25 'Prefactor '    29.568       1.0000         .10000E-03   10000.    
    26 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    27 'Prefactor '    3.0367       1.0000         .10000E-03   10000.    
    28 'Normalizat'    1.3653       1.0000         .10000E-01   10.000    
    29 'Prefactor '    .96537       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5520E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   40226.23     FROM MIGRAD    STATUS=CONVERGED    740 CALLS     3769 TOTAL
                     EDM=   .77E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.8%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     14.049        21.919       -.13958E-05    .25448E-04
   2  Prefactor     .10000E-03    8.9394       -.14534E-05** at limit **
   3  Prefactor     1.6594        1.0845        .71225E-07   -.14513E-02
   4  norm          3.2881        1.7575       -.41047E-07   -.15222E-04
   5  Prefactor     .10000E-03    10.483        .11081E-05** at limit **
   6  Prefactor     .10000E-03    1.1432       -.65986E-07** at limit **
   7  norm          .10000E-03    .38034       -.29115E-07** at limit **
   8  Prefactor     .10000E-03    6.6515        .92625E-06** at limit **
   9  Prefactor     20.017        16.486       -.32296E-06    .53964E-04
  10  Prefactor     .10000E-03    1.6986        .24879E-07** at limit **
  11  norm          .10000E-03    .99413E-01   -.52309E-11** at limit **
  12  norm          8.2576        2.7045       -.32753E-06    .32675E-03
  13  Prefactor     .10000E-03    .52221        .12205E-10** at limit **
  14  norm          8.6761        3.2709        .25520E-06   -.38034E-04
  15  Prefactor     2.3674        2.0425        .22173E-06    .14433E-03
  16  Prefactor     50.665        38.799       -.85251E-05    .20122E-03
  17  norm          2.2404        1.1058        .10096E-10    .39292E-04
  18  Prefactor     .10000E-03    2.1497        .96928E-07** at limit **
  19  norm          .10000E-03    1.9515        .33343E-07** at limit **
  20  norm          1.3672        .68569       -.78167E-07    .18611E-02
  21  Prefactor     1.1890        .97296E-01   -.58156E-08    .25739E-02
  22  norm          8.5031        2.4710        .59189E-07   -.13397E-02
  23  Prefactor     3.1050        .66609       -.46868E-08    .48315E-03
  24  Prefactor     .10000E-03    8.0874       -.22640E-05** at limit **
  25  Prefactor     29.575        19.170        .28585E-05    .82939E-03
  26  Prefactor     .10000E-03    6.5229        .13321E-06** at limit **
  27  Prefactor     3.0370        2.7755       -.13967E-05    .43901E-03
  28  Normalizat    1.3653        .19516        .86250E-06    .34944E-03
  29  Prefactor     .96537        .36522E-01    .48709E-07    .11454E-02
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 14.0491
  Prefactor  = 0.0001
  Prefactor  = 1.65941
  norm       = 3.28814
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 20.0166
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 8.2576
  Prefactor  = 0.0001
  norm       = 8.67607
  Prefactor  = 2.3674
  Prefactor  = 50.6649
  norm       = 2.24044
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 1.36721
  Prefactor  = 1.18899
  norm       = 8.50312
  Prefactor  = 3.10496
  Prefactor  = 0.000100004
  Prefactor  = 29.5748
  Prefactor  = 0.0001
  Prefactor  = 3.03695
  Normalizat = 1.3653
  Prefactor  = 0.965375
 **********
 **   18 **HESSE 
 **********

 FCN=   40226.23     FROM HESSE     STATUS=OK           559 CALLS     4328 TOTAL
                     EDM=   .34E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     14.049        21.938        .10686E-03   -1.4958    
   2  Prefactor     .10000E-03    8.9421        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     1.6594        4.1544        .16373E-02   -1.5450    
   4  norm          3.2881        1.7506        .18650E-03   -1.5345    
   5  Prefactor     .10000E-03    10.498        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    4.7795        .40692E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  norm          .10000E-03    .39065        .24128E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    6.6645        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     20.017        16.233        .89519E-04   -1.4813    
  10  Prefactor     .10000E-03    1.7126        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  norm          .10000E-03    .17142        .11717E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm          8.2576        2.6724        .13951E-03   -1.5133    
  13  Prefactor     .10000E-03    .52886        .14147E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          8.6761        3.2666        .13609E-03   -1.5119    
  15  Prefactor     2.3674        2.0442        .25692E-03   -1.5400    
  16  Prefactor     50.665        37.914        .56337E-04   -1.4283    
  17  norm          2.2404        1.1070        .14392E-03   -1.5409    
  18  Prefactor     .10000E-03    2.1518        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  norm          .10000E-03    1.9888        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  norm          1.3672        .66846        .11028E-03   -1.5474    
  21  Prefactor     1.1890        .10905        .11900E-04   -1.5490    
  22  norm          8.5031        2.7289        .68736E-03   -1.5125    
  23  Prefactor     3.1050        .71070        .57360E-04   -1.5356    
  24  Prefactor     .10000E-03    47.691        .91685E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     29.575        17.352        .73681E-04   -1.4620    
  26  Prefactor     .10000E-03    6.5502        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  27  Prefactor     3.0370        2.7505        .23285E-03   -1.5359    
  28  Normalizat    1.3653        .20737        .64667E-03   -.81638    
  29  Prefactor     .96537        .39798E-01    .15038E-03   -.93893    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.37983e-09
Minuit parameter uncertainties:
  1  21.9507
  2  2.33368e-05
  3  4.15516
  4  1.75066
  5  2.41494e-05
  6  9.69499e-06
  7  5.18753e-07
  8  1.30644e-05
  9  16.2365
  10  3.92354e-07
  11  3.33295e-06
  12  2.67242
  13  3.10015e-08
  14  3.26665
  15  2.0443
  16  37.9316
  17  1.107
  18  5.34809e-07
  19  1.30618e-05
  20  0.668466
  21  0.109051
  22  2.72898
  23  0.710697
  24  0.000908031
  25  17.3554
  26  1.66e-05
  27  2.75065
  28  0.207497
  29  0.0397996
Done.

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

Extracting fit parameters...

4FGL J0502.5+1340
   Spectrum: PowerLaw
218    Prefactor:  1.000e-04  3.924e-07  1.000e-04  1.000e+04 ( 1.000e-13)
219        Index:  2.232e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
220        Scale:  1.884e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
541    Prefactor:  9.654e-01  3.980e-02  0.000e+00  1.000e+01 ( 1.000e+00)
542        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
543        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
540   Normalization:  1.365e+00  2.075e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 75.634 13.668
Photon Flux Upper Limit: 4.13e-08 ph cm-2 s-1
Energy Flux Upper Limit: 3.15e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/799668/likelihoodResults_420422401_421027201_4FGL_J0502.5+1340_weekly_bin300.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) = 40226.2321073
delta logL = -0.00278401848482

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 40226.2293231
delta logL = 1.26579834614e-07

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.2193       1.0000          .0000       10.000    
     3 'Normalizat'    1.3653       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .96538       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5520E+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=   40226.23     FROM MIGRAD    STATUS=FAILED        90 CALLS      247 TOTAL
                     EDM=   .30E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10069E-03    16.387        .18142E-02** at limit **
   2  Index         2.1727        8.9015        .50000        .49201E-04
   3  Normalizat    1.3653        .15472E-01    .64667E-03   -.22925E-04
   4  Prefactor     .96537        .31225E-02    .15038E-03   -.73783E-04
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   40226.23     FROM SIMPLEX   STATUS=UNCHANGED    115 CALLS      362 TOTAL
                     EDM=   .12E-04    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10069E-03    16.387        .23549E-03** at limit **
   2  Index         2.1727        8.9015        .51619E-03    .49201E-04
   3  Normalizat    1.3653        .15472E-01    .21500E-05   -.22925E-04
   4  Prefactor     .96537        .31225E-02    .64612E-06   -.73783E-04
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   40226.23     FROM MIGRAD    STATUS=CONVERGED     46 CALLS      408 TOTAL
                     EDM=   .33E-11    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    12.784        .36285E-02** at limit **
   2  Index         1.9009        8.3911        .50000        .72396E-07
   3  Normalizat    1.3653        .13243E-01    .25867E-04    .33121E-03
   4  Prefactor     .96538        .26728E-02    .60154E-05    .14212E-02
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 1.9009
  Normalizat = 1.3653
  Prefactor  = 0.965375
 **********
 **   18 **HESSE 
 **********

 FCN=   40226.23     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      437 TOTAL
                     EDM=   .22E-10    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    84.516        .72569E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         1.9009        5.3113        .50000       -.66851    
   3  Normalizat    1.3653        .35623E-01    .51734E-05   -.81638    
   4  Prefactor     .96538        .71874E-02    .12031E-05   -.93893    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 2.23147e-11
Minuit parameter uncertainties:
  1  3.52187e-05
  2  492.479
  3  0.0356236
  4  0.00718745
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/799668': 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): 102
logL (Free Index) = 40226.2293209
delta logL = 2.36665800912e-06

Extracting fit parameters...

4FGL J0502.5+1340
   Spectrum: PowerLaw
218    Prefactor:  1.000e-04  3.522e-05  1.000e-04  1.000e+04 ( 1.000e-13)
219        Index:  1.901e+00  4.925e+02  0.000e+00  1.000e+01 (-1.000e+00)
220        Scale:  1.884e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
541    Prefactor:  9.654e-01  7.187e-03  0.000e+00  1.000e+01 ( 1.000e+00)
542        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
543        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
540   Normalization:  1.365e+00  3.562e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 75.634 13.668

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/799668/cmap_HighResolution_420422401_421027201_4FGL_J0502.5+1340_weekly_bin300.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='3.15e-03', job_status='DONE', photon_flux_upper_limit='4.13e-08', time_completed='2021-07-08 08:36:37.527062', job_id='799668', GAL2='0.97', fit_tolerance='1e-08', EG2='1.37', EG='1.37', time_epoch_completed='1625758597.53', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.97', dlogl='2.37e-06', ts2='-0.00', photon_index_error='0.00', photon_index='2.23' WHERE bin_id='300' AND source_name='4FGL J0502.5+1340' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Thu Jul  8 08:36:37 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0232>
Subject: Job 799668: <4FGL_J0502.5+1340_weekly_bin300> in cluster <slac> Done

Job <4FGL_J0502.5+1340_weekly_bin300> was submitted from host <rhel6-64h> by user <kocevski> in cluster <slac> at Wed Jul  7 21:06:05 2021
Job was executed on host(s) <bullet0232>, in queue <medium>, as user <kocevski> in cluster <slac> at Wed Jul  7 21:11:22 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Wed Jul  7 21:11:22 2021
Terminated at Thu Jul  8 08:37:03 2021
Results reported at Thu Jul  8 08:37:03 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J0502.5+1340_weekly_bin300 75.6341 13.6685 420422401 421027201 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J0502.5+1340 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   4438.00 sec.
    Max Memory :                                 1261 MB
    Average Memory :                             85.93 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              7
    Max Threads :                                21
    Run time :                                   41140 sec.
    Turnaround time :                            41458 sec.

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

