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


Performing analysis on: 4FGL_J1520.5+4209_daily_bin261
RA = 230.135, Dec = 42.16
tmin = 306979201, tmax = 307238401
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='490033', job_status='RUN', time_executed='2021-09-12 01:17:44.757100', time_epoch_executed='1631434664.76' WHERE source_name='4FGL J1520.5+4209' and cadence='daily' and bin_id='261'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/490033

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/490033/ft1_4FGL_J1520.5+4209_daily_bin261.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/490033/ft2_4FGL_J1520.5+4209_daily_bin261.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/490033/ft1_4FGL_J1520.5+4209_daily_bin261.fits outfile=/scratch/kocevski/490033/ft1_filteredMKT_4FGL_J1520.5+4209_daily_bin261.fits ra=230.135 dec=42.16 rad=12.0 tmin=306979201.0 tmax=307238401.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 14.00
user 13.45
sys 0.50

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/490033/ft2_4FGL_J1520.5+4209_daily_bin261.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/490033/ft1_filteredMKT_4FGL_J1520.5+4209_daily_bin261.fits evtable="EVENTS" outfile="/scratch/kocevski/490033/ft1_filtered_4FGL_J1520.5+4209_daily_bin261.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.50
user 0.33
sys 0.16

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/490033/ft1_filtered_4FGL_J1520.5+4209_daily_bin261.fits" evtable="EVENTS" scfile=/scratch/kocevski/490033/ft2_4FGL_J1520.5+4209_daily_bin261.fits sctable="SC_DATA" outfile=/scratch/kocevski/490033/ltcube_306979201_307238401_4FGL_J1520.5+4209_daily_bin261.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/490033/ft2_4FGL_J1520.5+4209_daily_bin261.fits
.....................!
real 11.63
user 11.27
sys 0.31

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/490033/ft1_filtered_4FGL_J1520.5+4209_daily_bin261.fits evtable="EVENTS" scfile=/scratch/kocevski/490033/ft2_4FGL_J1520.5+4209_daily_bin261.fits sctable="SC_DATA" expcube=/scratch/kocevski/490033/ltcube_306979201_307238401_4FGL_J1520.5+4209_daily_bin261.fits outfile=/scratch/kocevski/490033/expmap_306979201_307238401_4FGL_J1520.5+4209_daily_bin261.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/490033/ltcube_306979201_307238401_4FGL_J1520.5+4209_daily_bin261.fits
.....................!
real 191.08
user 185.58
sys 5.03

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/490033/ft1_filtered_4FGL_J1520.5+4209_daily_bin261.fits scfile=/scratch/kocevski/490033/ft2_4FGL_J1520.5+4209_daily_bin261.fits outfile=/scratch/kocevski/490033/cmap_306979201_307238401_4FGL_J1520.5+4209_daily_bin261.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.61
user 0.38
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/490033/ft1_filtered_4FGL_J1520.5+4209_daily_bin261.fits scfile=/scratch/kocevski/490033/ft2_4FGL_J1520.5+4209_daily_bin261.fits outfile=/scratch/kocevski/490033/cmap_HighResolution_306979201_307238401_4FGL_J1520.5+4209_daily_bin261.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.56
user 0.38
sys 0.16

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

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/490033/ft1_filtered_4FGL_J1520.5+4209_daily_bin261.fits', '/scratch/kocevski/490033/ft2_4FGL_J1520.5+4209_daily_bin261.fits', expMap='/scratch/kocevski/490033/expmap_306979201_307238401_4FGL_J1520.5+4209_daily_bin261.fits', expCube='/scratch/kocevski/490033/ltcube_306979201_307238401_4FGL_J1520.5+4209_daily_bin261.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/490033/Model_4FGL_J1520.5+4209_daily_bin261.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/490033/ft1_filtered_4FGL_J1520.5+4209_daily_bin261.fits
Spacecraft file(s): /scratch/kocevski/490033/ft2_4FGL_J1520.5+4209_daily_bin261.fits
Exposure map: /scratch/kocevski/490033/expmap_306979201_307238401_4FGL_J1520.5+4209_daily_bin261.fits
Exposure cube: /scratch/kocevski/490033/ltcube_306979201_307238401_4FGL_J1520.5+4209_daily_bin261.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/490033/Model_4FGL_J1520.5+4209_daily_bin261.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) = 4577.67906909

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .14851E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    11.615       1.0000         .10000E-03   10000.    
     3 'norm      '    1.5730       1.0000         .10000E-03   10000.    
     4 'Prefactor '    65.370       1.0000         .10000E-03   10000.    
     5 'Prefactor '    35.054       1.0000         .10000E-03   10000.    
     6 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    36.099       1.0000         .10000E-03   10000.    
     8 'Prefactor '    .18841E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    .10006E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10094E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    20.427       1.0000         .10000E-03   10000.    
    12 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    18.657       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10091E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    1.4591       1.0000         .10000E-03   10000.    
    16 'norm      '    4.8199       1.0000         .10000E-03   10000.    
    17 'Prefactor '    .10037E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    21.872       1.0000         .10000E-03   10000.    
    20 'Prefactor '    .12818E-03   1.0000         .10000E-03   10000.    
    21 'norm      '    11.333       1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    24 'norm      '    .10008E-03   1.0000         .10000E-03   10000.    
    25 'Prefactor '    11.092       1.0000         .10000E-03   10000.    
    26 'Prefactor '    225.90       1.0000         .10000E-03   10000.    
    27 'Prefactor '    .18982E-02   1.0000         .10000E-03   10000.    
    28 'Prefactor '    .10054E-03   1.0000         .10000E-03   10000.    
    29 'Normalizat'    1.4450       1.0000         .10000E-01   10.000    
    30 'Prefactor '    .69375       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=   4577.642     FROM MIGRAD    STATUS=CONVERGED    772 CALLS     3898 TOTAL
                     EDM=   .12E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.9%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    167.14        .52491E-05** at limit **
   2  Prefactor     11.610        25.328        .31708E-06    .19574E-04
   3  norm          1.5221        171.59       -.82083E-05    .19136E-05
   4  Prefactor     65.283        79.841        .56149E-05    .18901E-04
   5  Prefactor     35.040        43.033       -.31684E-06    .15063E-04
   6  norm          .10000E-03    3.1006        .56019E-07** at limit **
   7  Prefactor     36.094        52.885        .64250E-07    .12188E-04
   8  Prefactor     .10000E-03    16.709        .40272E-05** at limit **
   9  norm          .10000E-03    4.3590        .48020E-08** at limit **
  10  Prefactor     .10000E-03    10.042        .30696E-06** at limit **
  11  Prefactor     20.421        16.161       -.52405E-06   -.39760E-04
  12  norm          .10000E-03    .51218        .11850E-06** at limit **
  13  Prefactor     18.643        17.056        .41837E-06    .62904E-04
  14  Prefactor     .10000E-03    4.2393       -.34190E-07** at limit **
  15  norm          1.4620        2.6346       -.84841E-06   -.12318E-03
  16  norm          4.8176        3.8574        .12049E-06   -.21642E-04
  17  Prefactor     .10000E-03    5.6176       -.23385E-06** at limit **
  18  Prefactor     .10000E-03    65.596       -.14410E-05** at limit **
  19  Prefactor     21.849        21.070        .59523E-06   -.92949E-05
  20  Prefactor     .10000E-03    37.499        .42829E-06** at limit **
  21  norm          11.333        3.1014       -.18399E-06    .21182E-03
  22  Prefactor     .10000E-03    11.826       -.49139E-06** at limit **
  23  Prefactor     .10000E-03    8.1956       -.14981E-06** at limit **
  24  norm          .10000E-03    6.9256       -.14286E-07** at limit **
  25  Prefactor     11.088        26.708       -.54754E-06    .74109E-05
  26  Prefactor     225.97        126.66        .16104E-05    .19404E-04
  27  Prefactor     .10000E-03    34.565        .94979E-05** at limit **
  28  Prefactor     .10000E-03    12.721       -.11763E-06** at limit **
  29  Normalizat    1.4452        .23268        .21714E-05    .61128E-04
  30  Prefactor     .69347        .22670        .12553E-05    .12687E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100005
  Prefactor  = 11.6104
  norm       = 1.52214
  Prefactor  = 65.2832
  Prefactor  = 35.0395
  norm       = 0.0001
  Prefactor  = 36.0936
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 20.4212
  norm       = 0.0001
  Prefactor  = 18.6427
  Prefactor  = 0.0001
  norm       = 1.46201
  norm       = 4.81761
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 21.8487
  Prefactor  = 0.000100002
  norm       = 11.3328
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 11.0884
  Prefactor  = 225.968
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Normalizat = 1.44525
  Prefactor  = 0.693467
 **********
 **   18 **HESSE 
 **********

 FCN=   4577.642     FROM HESSE     STATUS=OK           582 CALLS     4480 TOTAL
                     EDM=   .25E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    168.06        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     11.610        25.129        .11755E-03   -1.5026    
   3  norm          1.5221        173.01        .33888E-03   -1.5461    
   4  Prefactor     65.283        80.090        .24819E-03   -1.4090    
   5  Prefactor     35.040        43.117        .67685E-04   -1.4523    
   6  norm          .10000E-03    3.1043        .11633E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     36.094        52.862        .66702E-04   -1.4506    
   8  Prefactor     .10000E-03    16.492        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          .10000E-03    4.3600        .13796E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    10.053        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     20.421        16.175        .88619E-04   -1.4804    
  12  norm          .10000E-03    .52028        .47217E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     18.643        16.824        .92725E-04   -1.4844    
  14  Prefactor     .10000E-03    4.2697        .13598E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          1.4620        2.5801        .12274E-03   -1.5466    
  16  norm          4.8176        3.8566        .11477E-03   -1.5269    
  17  Prefactor     .10000E-03    5.6404        .15658E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10000E-03    65.645        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     21.849        21.046        .85646E-04   -1.4773    
  20  Prefactor     .10000E-03    38.339        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  norm          11.333        3.0981        .59648E-04   -1.5035    
  22  Prefactor     .10000E-03    11.847        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10000E-03    8.1989        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  norm          .10000E-03    6.9345        .17390E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     11.088        26.706        .12029E-03   -1.5042    
  26  Prefactor     225.97        125.70        .13460E-03   -1.2690    
  27  Prefactor     .10000E-03    33.970        .35121E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  Prefactor     .10000E-03    12.731        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  29  Normalizat    1.4452        .27415        .23584E-03   -.79329    
  30  Prefactor     .69347        .26583        .32794E-03   -1.0378    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.45259e-10
Minuit parameter uncertainties:
  1  0.00178345
  2  25.1514
  3  32.5513
  4  80.2229
  5  43.1557
  6  3.72102e-06
  7  52.9305
  8  0.000179797
  9  2.13767e-06
  10  7.09501e-06
  11  16.1782
  12  2.76653e-06
  13  16.8284
  14  2.18602e-05
  15  2.58028
  16  3.85676
  17  3.29033e-05
  18  6.45225e-05
  19  21.0533
  20  0.00048095
  21  3.09818
  22  4.84387e-06
  23  8.79115e-06
  24  9.04989e-06
  25  26.7352
  26  125.845
  27  0.000101244
  28  8.97478e-06
  29  0.274429
  30  0.266313
Done.

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

Extracting fit parameters...

4FGL J1520.5+4209
   Spectrum: PowerLaw
308    Prefactor:  2.185e+01  2.105e+01  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:  6.935e-01  2.663e-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.445e+00  2.744e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 2.14
Ra Dec: 230.135 42.160
Photon Index (Fixed Index): 2.50 +/- 0.00
Photon Flux (Fixed Index): 3.93e-08 +/- 3.79e-08
Energy Flux (Fixed Index): 1.14e-05 +/- 1.09e-05

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

Saving results to:
/scratch/kocevski/490033/likelihoodResults_306979201_307238401_4FGL_J1520.5+4209_daily_bin261.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) = 4577.48187772
delta logL = 0.160078212866

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 4577.4814922
delta logL = 0.160463728825

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    28.812       1.0000         .10000E-03   10000.    
     2 'Index     '    2.0520       1.0000          .0000       10.000    
     3 'Normalizat'    1.4621       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .68202       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.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   4577.481     FROM MIGRAD    STATUS=CONVERGED     89 CALLS      299 TOTAL
                     EDM=   .10E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     28.831        27.997        .37320E-03   -.26046E-04
   2  Index         2.0526        .73028        .89705E-02    .56790E-05
   3  Normalizat    1.4621        .26389        .23468E-03    .11607E-04
   4  Prefactor     .68202        .26455        .33034E-03   -.17724E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 28.8312
  Index      = 2.05263
  Normalizat = 1.4621
  Prefactor  = 0.682017
 **********
 **   18 **HESSE 
 **********

 FCN=   4577.481     FROM HESSE     STATUS=OK            25 CALLS      324 TOTAL
                     EDM=   .96E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     28.831        27.829        .14928E-04   -1.4634    
   2  Index         2.0526        .72579        .35882E-03   -.63041    
   3  Normalizat    1.4621        .26403        .46937E-04   -.78849    
   4  Prefactor     .68202        .26473        .13214E-04   -1.0424    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 9.55506e-12
Minuit parameter uncertainties:
  1  27.8417
  2  0.729759
  3  0.26428
  4  0.26522
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/490033': 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) = 4577.48149136
delta logL = 0.160464573006

Extracting fit parameters...

4FGL J1520.5+4209
   Spectrum: PowerLaw
308    Prefactor:  2.883e+01  2.784e+01  1.000e-04  1.000e+04 ( 1.000e-13)
309        Index:  2.053e+00  7.298e-01  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:  6.820e-01  2.652e-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.462e+00  2.643e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 2.46
Ra Dec: 230.135 42.160
Photon Index (Free Index): 2.05 +/- 0.73
Photon Flux (Free Index): 2.70e-08 +/- 3.30e-08
Energy Flux (Free Index): 1.64e-05 +/- 2.16e-05

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/490033/cmap_HighResolution_306979201_307238401_4FGL_J1520.5+4209_daily_bin261.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.05e-02', comment='SUCCESS', photon_flux='3.93e-08', energy_flux2='1.64e-05', photon_flux_error='3.79e-08', dlogl='1.60e-01', energy_flux='1.14e-05', photon_flux2='2.70e-08', job_status='DONE', time_completed='2021-09-12 01:31:09.972791', photon_index_error2='0.73', photon_index2='2.05', ts='2.14', fit_tolerance='1e-08', GAL='0.69', photon_index_error='0.00', photon_flux_upper_limit='1.35e-07', energy_flux_error2='2.16e-05', EG='1.45', time_epoch_completed='1631435469.97', return_code='0', job_id='490033', GAL2='0.68', EG2='1.46', return_code2='0', energy_flux_error='1.09e-05', photon_flux_error2='3.30e-08', ts2='2.46', photon_index='2.50' WHERE bin_id='261' AND source_name='4FGL J1520.5+4209' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sun Sep 12 01:31:09 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0293>
Subject: Job 490033: <4FGL_J1520.5+4209_daily_bin261> in cluster <slac> Done

Job <4FGL_J1520.5+4209_daily_bin261> was submitted from host <rhel6-64k> by user <kocevski> in cluster <slac> at Sun Sep 12 01:15:13 2021
Job was executed on host(s) <bullet0293>, in queue <medium>, as user <kocevski> in cluster <slac> at Sun Sep 12 01:15:14 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:15:14 2021
Terminated at Sun Sep 12 01:31:10 2021
Results reported at Sun Sep 12 01:31:10 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1520.5+4209_daily_bin261 230.135 42.16 306979201 307238401 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 :                                   794.42 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             285.62 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   956 sec.
    Turnaround time :                            957 sec.

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

