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


Performing analysis on: 4FGL_J1520.5+4209_daily_bin1152
RA = 230.135, Dec = 42.16
tmin = 537926401, tmax = 538185601
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='494578', job_status='RUN', time_executed='2021-09-12 01:33:00.280006', time_epoch_executed='1631435580.28' WHERE source_name='4FGL J1520.5+4209' and cadence='daily' and bin_id='1152'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/494578

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/494578/ft1_4FGL_J1520.5+4209_daily_bin1152.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/494578/ft2_4FGL_J1520.5+4209_daily_bin1152.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/494578/ft1_4FGL_J1520.5+4209_daily_bin1152.fits outfile=/scratch/kocevski/494578/ft1_filteredMKT_4FGL_J1520.5+4209_daily_bin1152.fits ra=230.135 dec=42.16 rad=12.0 tmin=537926401.0 tmax=538185601.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 6.58
user 6.33
sys 0.22

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/494578/ft2_4FGL_J1520.5+4209_daily_bin1152.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/494578/ft2_4FGL_J1520.5+4209_daily_bin1152.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/494578/ft1_filteredMKT_4FGL_J1520.5+4209_daily_bin1152.fits evtable="EVENTS" outfile="/scratch/kocevski/494578/ft1_filtered_4FGL_J1520.5+4209_daily_bin1152.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.49
user 0.34
sys 0.14

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/494578/ft1_filtered_4FGL_J1520.5+4209_daily_bin1152.fits" evtable="EVENTS" scfile=/scratch/kocevski/494578/ft2_4FGL_J1520.5+4209_daily_bin1152.fits sctable="SC_DATA" outfile=/scratch/kocevski/494578/ltcube_537926401_538185601_4FGL_J1520.5+4209_daily_bin1152.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/494578/ft2_4FGL_J1520.5+4209_daily_bin1152.fits
.....................!
real 12.14
user 11.77
sys 0.34

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/494578/ft1_filtered_4FGL_J1520.5+4209_daily_bin1152.fits evtable="EVENTS" scfile=/scratch/kocevski/494578/ft2_4FGL_J1520.5+4209_daily_bin1152.fits sctable="SC_DATA" expcube=/scratch/kocevski/494578/ltcube_537926401_538185601_4FGL_J1520.5+4209_daily_bin1152.fits outfile=/scratch/kocevski/494578/expmap_537926401_538185601_4FGL_J1520.5+4209_daily_bin1152.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/494578/ltcube_537926401_538185601_4FGL_J1520.5+4209_daily_bin1152.fits
.....................!
real 192.72
user 187.24
sys 5.15

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

Setting source of interest to:
4FGL J1520.5+4209 @ 230.135 42.16

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/494578/ft1_filtered_4FGL_J1520.5+4209_daily_bin1152.fits scfile=/scratch/kocevski/494578/ft2_4FGL_J1520.5+4209_daily_bin1152.fits outfile=/scratch/kocevski/494578/cmap_537926401_538185601_4FGL_J1520.5+4209_daily_bin1152.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=230.135 yref=42.16 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

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/494578/ft1_filtered_4FGL_J1520.5+4209_daily_bin1152.fits scfile=/scratch/kocevski/494578/ft2_4FGL_J1520.5+4209_daily_bin1152.fits outfile=/scratch/kocevski/494578/cmap_HighResolution_537926401_538185601_4FGL_J1520.5+4209_daily_bin1152.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=230.135 yref=42.16 axisrot=0.0 rafield="RA" decfield="DEC" proj="AIT" hpx_ordering_scheme="RING" hpx_order=3 hpx_ebin=yes hpx_region="" evtable="EVENTS" sctable="SC_DATA" efield="ENERGY" tfield="TIME" chatter=2 clobber=yes debug=no gui=no mode="ql"

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

This is gtbin version HEAD
real 0.54
user 0.39
sys 0.15

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/494578/ft1_filtered_4FGL_J1520.5+4209_daily_bin1152.fits evtable="EVENTS" scfile=/scratch/kocevski/494578/ft2_4FGL_J1520.5+4209_daily_bin1152.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/494578/Model_4FGL_J1520.5+4209_daily_bin1152.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/494578/ft1_filtered_4FGL_J1520.5+4209_daily_bin1152.fits..........................!
real 18.40
user 17.22
sys 1.15

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/494578/ft1_filtered_4FGL_J1520.5+4209_daily_bin1152.fits', '/scratch/kocevski/494578/ft2_4FGL_J1520.5+4209_daily_bin1152.fits', expMap='/scratch/kocevski/494578/expmap_537926401_538185601_4FGL_J1520.5+4209_daily_bin1152.fits', expCube='/scratch/kocevski/494578/ltcube_537926401_538185601_4FGL_J1520.5+4209_daily_bin1152.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/494578/Model_4FGL_J1520.5+4209_daily_bin1152.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1520.5+4209'

4FGL J1520.5+4209
   Spectrum: PowerLaw
308    Prefactor:  3.393e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-13)
309        Index:  2.505e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
310        Scale:  9.357e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/494578/ft1_filtered_4FGL_J1520.5+4209_daily_bin1152.fits
Spacecraft file(s): /scratch/kocevski/494578/ft2_4FGL_J1520.5+4209_daily_bin1152.fits
Exposure map: /scratch/kocevski/494578/expmap_537926401_538185601_4FGL_J1520.5+4209_daily_bin1152.fits
Exposure cube: /scratch/kocevski/494578/ltcube_537926401_538185601_4FGL_J1520.5+4209_daily_bin1152.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/494578/Model_4FGL_J1520.5+4209_daily_bin1152.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) = 829.748738549

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    30.599       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10006E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10022E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .11032E-03   1.0000         .10000E-03   10000.    
     6 'norm      '    .10160E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    26.591       1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10019E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10011E-03   1.0000         .10000E-03   10000.    
    12 'norm      '    17.013       1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10032E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    .81222       1.0000         .10000E-03   10000.    
    16 'norm      '    .10010E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    .10133E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    .53560E-02   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10351E-03   1.0000         .10000E-03   10000.    
    21 'norm      '    6.2640       1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10197E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    24 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    25 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    26 'Prefactor '    .10011E-03   1.0000         .10000E-03   10000.    
    27 'Prefactor '    .10030E-03   1.0000         .10000E-03   10000.    
    28 'Prefactor '    .10064E-03   1.0000         .10000E-03   10000.    
    29 'Normalizat'    1.1532       1.0000         .10000E-01   10.000    
    30 'Prefactor '    .73353       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6280E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   829.7464     FROM MIGRAD    STATUS=CONVERGED    738 CALLS     3793 TOTAL
                     EDM=   .22E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.8%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     30.497        72.038       -.28648E-05   -.34805E-04
   2  Prefactor     .10000E-03    19.284       -.11939E-06** at limit **
   3  norm          .10000E-03    32.984       -.11874E-07** at limit **
   4  Prefactor     .10000E-03    112.04       -.17985E-06** at limit **
   5  Prefactor     .10000E-03    78.384       -.16973E-05** at limit **
   6  norm          .10000E-03    16.715       -.43688E-07** at limit **
   7  Prefactor     26.583        135.30       -.55286E-06   -.12791E-04
   8  Prefactor     .10000E-03    34.562       -.30681E-06** at limit **
   9  norm          .10000E-03    20.990        .12311E-06** at limit **
  10  Prefactor     .10000E-03    37.409        .27344E-06** at limit **
  11  Prefactor     .10000E-03    55.418       -.27671E-06** at limit **
  12  norm          17.010        9.2259       -.30867E-08   -.34281E-04
  13  Prefactor     .10000E-03    58.617        .27039E-06** at limit **
  14  Prefactor     .10000E-03    12.940       -.20531E-07** at limit **
  15  norm          .79817        13.655       -.29081E-05   -.58686E-04
  16  norm          .10000E-03    15.505        .66946E-08** at limit **
  17  Prefactor     .10000E-03    32.618       -.39990E-06** at limit **
  18  Prefactor     .10000E-03    162.60        .22936E-06** at limit **
  19  Prefactor     .10004E-03    781.25       -.18979E-04** at limit **
  20  Prefactor     .10000E-03    45.502       -.56876E-06** at limit **
  21  norm          6.2633        5.0021        .42640E-06    .65818E-04
  22  Prefactor     .10000E-03    135.45        .24522E-05** at limit **
  23  Prefactor     .10000E-03    33.701        .80116E-07** at limit **
  24  norm          .10000E-03    24.439        .46969E-07** at limit **
  25  Prefactor     .10000E-03    48.938        .13605E-06** at limit **
  26  Prefactor     .10000E-03    84.650        .10413E-06** at limit **
  27  Prefactor     .10000E-03    9.6202        .39446E-06** at limit **
  28  Prefactor     .10000E-03    37.318        .61591E-06** at limit **
  29  Normalizat    1.1545        .57442        .10727E-04   -.18990E-03
  30  Prefactor     .73186        .57514       -.19553E-04   -.72647E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 30.4967
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 26.5828
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 17.0104
  Prefactor  = 0.000100001
  Prefactor  = 0.0001
  norm       = 0.798174
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.000100038
  Prefactor  = 0.0001
  norm       = 6.2633
  Prefactor  = 0.000100002
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Normalizat = 1.15446
  Prefactor  = 0.731858
 **********
 **   18 **HESSE 
 **********

 FCN=   829.7464     FROM HESSE     STATUS=OK           560 CALLS     4353 TOTAL
                     EDM=   .54E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     30.497        72.756        .72432E-04   -1.4603    
   2  Prefactor     .10000E-03    19.287        .12361E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .10000E-03    32.988        .16170E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    112.07        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    78.601        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  norm          .10000E-03    16.728        .11502E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     26.583        135.35        .77687E-04   -1.4676    
   8  Prefactor     .10000E-03    34.616        .16549E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          .10000E-03    20.997        .12898E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    37.436        .17222E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    55.462        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm          17.010        9.2372        .61251E-04   -1.4883    
  13  Prefactor     .10000E-03    58.571        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10000E-03    12.943        .10123E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          .79817        13.407        .18898E-03   -1.5529    
  16  norm          .10000E-03    15.545        .11082E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     .10000E-03    32.635        .16075E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10000E-03    162.64        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10004E-03    802.27        .38212E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10000E-03    45.532        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  norm          6.2633        4.9994        .55481E-04   -1.5207    
  22  Prefactor     .10000E-03    137.29        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10000E-03    33.704        .16345E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  norm          .10000E-03    24.445        .13917E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     .10000E-03    48.948        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  Prefactor     .10000E-03    84.661        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  27  Prefactor     .10000E-03    9.6604        .87326E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  Prefactor     .10000E-03    37.407        .17205E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  29  Normalizat    1.1545        .62143        .22315E-03   -.88022    
  30  Prefactor     .73186        .60385        .28237E-03   -1.0229    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 5.39186e-10
Minuit parameter uncertainties:
  1  72.9691
  2  2.37407e-06
  3  1.07708e-05
  4  9.82823e-05
  5  0.000325784
  6  3.60953e-06
  7  120.398
  8  3.70348e-06
  9  3.96471e-05
  10  0.000104081
  11  3.76759e-05
  12  9.23794
  13  0.000391442
  14  4.39912e-06
  15  6.54386
  16  5.67852e-05
  17  8.53315e-06
  18  0.000303008
  19  0.0112339
  20  2.66191e-05
  21  4.99972
  22  0.00100148
  23  8.86382e-06
  24  8.94194e-06
  25  6.00183e-05
  26  5.04424e-05
  27  2.71237e-05
  28  0.000111631
  29  0.625453
  30  0.609391
Done.

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

Extracting fit parameters...

4FGL J1520.5+4209
   Spectrum: PowerLaw
308    Prefactor:  1.000e-04  1.123e-02  1.000e-04  1.000e+04 ( 1.000e-13)
309        Index:  2.505e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
310        Scale:  9.357e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
625    Prefactor:  7.319e-01  6.094e-01  0.000e+00  1.000e+01 ( 1.000e+00)
626        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
627        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
624   Normalization:  1.154e+00  6.255e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 230.135 42.160
Photon Flux Upper Limit: 4.70e-07 ph cm-2 s-1
Energy Flux Upper Limit: 3.66e-02 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/494578/likelihoodResults_537926401_538185601_4FGL_J1520.5+4209_daily_bin1152.txt

Performing a free index iterative likelihood fit...

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

Done.

Freeing candidate source...
Done.

Fit tolerance = 1

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 829.746440141
delta logL = -5.78875096835e-06

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 829.74644014
delta logL = -5.7884162743e-06

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .96361E-02   1.0000         .10000E-03   10000.    
     2 'Index     '    2.5048       1.0000          .0000       10.000    
     3 'Normalizat'    1.1545       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .73186       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6280E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   829.7464     FROM MIGRAD    STATUS=CONVERGED     81 CALLS      228 TOTAL
                     EDM=   .34E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .42994E-03    432.31        .10897    ** at limit **
   2  Index         2.6536        5.9749        .50000       -.94351E-05
   3  Normalizat    1.1545        .18256E-01    .36119E-01   -.12825E-03
   4  Prefactor     .73185        .18874E-01    .63835E-01   -.64908E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000429941
  Index      = 2.65359
  Normalizat = 1.15446
  Prefactor  = 0.731853
 **********
 **   18 **HESSE 
 **********

 FCN=   829.7464     FROM HESSE     STATUS=NOT POSDEF    39 CALLS      267 TOTAL
                     EDM=   .44E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .42994E-03    542.60        .98505E-01   -1.5704    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.6536        5.8981        .50000       -.48848    
   3  Normalizat    1.1545        .18900E-01    .22313E-03   -.88022    
   4  Prefactor     .73185        .19512E-01    .28239E-03   -1.0229    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 4.44473e-09
Minuit parameter uncertainties:
  1  0.854078
  2  7.40269
  3  0.0189001
  4  0.019512
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/494578': 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) = 829.746434249
delta logL = 1.02499598142e-07

Extracting fit parameters...

4FGL J1520.5+4209
   Spectrum: PowerLaw
308    Prefactor:  4.299e-04  8.541e-01  1.000e-04  1.000e+04 ( 1.000e-13)
309        Index:  2.654e+00  7.403e+00  0.000e+00  1.000e+01 (-1.000e+00)
310        Scale:  9.357e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
625    Prefactor:  7.319e-01  1.951e-02  0.000e+00  1.000e+01 ( 1.000e+00)
626        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
627        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
624   Normalization:  1.154e+00  1.890e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 230.135 42.160

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/494578/cmap_HighResolution_537926401_538185601_4FGL_J1520.5+4209_daily_bin1152.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='3.66e-02', job_status='DONE', photon_flux_upper_limit='4.70e-07', time_completed='2021-09-12 01:42:19.399131', job_id='494578', GAL2='0.73', fit_tolerance='1e-08', EG2='1.15', EG='1.15', time_epoch_completed='1631436139.4', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.73', dlogl='1.02e-07', ts2='0.00', photon_index_error='0.00', photon_index='2.50' WHERE bin_id='1152' AND source_name='4FGL J1520.5+4209' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sun Sep 12 01:42:19 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0224>
Subject: Job 494578: <4FGL_J1520.5+4209_daily_bin1152> in cluster <slac> Done

Job <4FGL_J1520.5+4209_daily_bin1152> was submitted from host <rhel6-64k> by user <kocevski> in cluster <slac> at Sun Sep 12 01:30:29 2021
Job was executed on host(s) <bullet0224>, in queue <medium>, as user <kocevski> in cluster <slac> at Sun Sep 12 01:30:31 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Sun Sep 12 01:30:31 2021
Terminated at Sun Sep 12 01:42:19 2021
Results reported at Sun Sep 12 01:42:19 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1520.5+4209_daily_bin1152 230.135 42.16 537926401 538185601 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1520.5+4209 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   416.33 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             193.17 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   708 sec.
    Turnaround time :                            710 sec.

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

