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


Performing analysis on: 4FGL_J1520.5+4209_daily_bin329
RA = 230.135, Dec = 42.16
tmin = 324604801, tmax = 324864001
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='490131', job_status='RUN', time_executed='2021-09-12 01:18:19.696339', time_epoch_executed='1631434699.7' WHERE source_name='4FGL J1520.5+4209' and cadence='daily' and bin_id='329'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/490131

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/490131/ft1_4FGL_J1520.5+4209_daily_bin329.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/490131/ft2_4FGL_J1520.5+4209_daily_bin329.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/490131/ft1_4FGL_J1520.5+4209_daily_bin329.fits outfile=/scratch/kocevski/490131/ft1_filteredMKT_4FGL_J1520.5+4209_daily_bin329.fits ra=230.135 dec=42.16 rad=12.0 tmin=324604801.0 tmax=324864001.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 9.41
user 8.98
sys 0.40

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/490131/ft1_filtered_4FGL_J1520.5+4209_daily_bin329.fits" evtable="EVENTS" scfile=/scratch/kocevski/490131/ft2_4FGL_J1520.5+4209_daily_bin329.fits sctable="SC_DATA" outfile=/scratch/kocevski/490131/ltcube_324604801_324864001_4FGL_J1520.5+4209_daily_bin329.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/490131/ft2_4FGL_J1520.5+4209_daily_bin329.fits
.....................!
real 12.81
user 11.32
sys 0.33

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/490131/ft1_filtered_4FGL_J1520.5+4209_daily_bin329.fits evtable="EVENTS" scfile=/scratch/kocevski/490131/ft2_4FGL_J1520.5+4209_daily_bin329.fits sctable="SC_DATA" expcube=/scratch/kocevski/490131/ltcube_324604801_324864001_4FGL_J1520.5+4209_daily_bin329.fits outfile=/scratch/kocevski/490131/expmap_324604801_324864001_4FGL_J1520.5+4209_daily_bin329.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/490131/ltcube_324604801_324864001_4FGL_J1520.5+4209_daily_bin329.fits
.....................!
real 191.83
user 186.16
sys 5.34

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/490131/ft1_filtered_4FGL_J1520.5+4209_daily_bin329.fits scfile=/scratch/kocevski/490131/ft2_4FGL_J1520.5+4209_daily_bin329.fits outfile=/scratch/kocevski/490131/cmap_324604801_324864001_4FGL_J1520.5+4209_daily_bin329.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.52
user 0.37
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/490131/ft1_filtered_4FGL_J1520.5+4209_daily_bin329.fits scfile=/scratch/kocevski/490131/ft2_4FGL_J1520.5+4209_daily_bin329.fits outfile=/scratch/kocevski/490131/cmap_HighResolution_324604801_324864001_4FGL_J1520.5+4209_daily_bin329.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.53
user 0.37
sys 0.16

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    17.703       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10309E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    .10238E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .11479E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .11942E-03   1.0000         .10000E-03   10000.    
     6 'norm      '    13.257       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10316E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10046E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    8.7852       1.0000         .10000E-03   10000.    
    10 'Prefactor '    6.4711       1.0000         .10000E-03   10000.    
    11 'Prefactor '    28.317       1.0000         .10000E-03   10000.    
    12 'norm      '    .10015E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10013E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    3.8128       1.0000         .10000E-03   10000.    
    16 'norm      '    6.9607       1.0000         .10000E-03   10000.    
    17 'Prefactor '    .10342E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .48740E-02   1.0000         .10000E-03   10000.    
    19 'Prefactor '    34.469       1.0000         .10000E-03   10000.    
    20 'Prefactor '    .11567E-03   1.0000         .10000E-03   10000.    
    21 'norm      '    12.305       1.0000         .10000E-03   10000.    
    22 'Prefactor '    8.0454       1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10025E-03   1.0000         .10000E-03   10000.    
    24 'norm      '    .10111E-03   1.0000         .10000E-03   10000.    
    25 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    26 'Prefactor '    .13618E-03   1.0000         .10000E-03   10000.    
    27 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    28 'Prefactor '    25.754       1.0000         .10000E-03   10000.    
    29 'Normalizat'    .89150       1.0000         .10000E-01   10.000    
    30 'Prefactor '    .75307       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=   4009.882     FROM MIGRAD    STATUS=CONVERGED    752 CALLS     3861 TOTAL
                     EDM=   .33E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .3%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     17.690        34.913        .17143E-05    .36143E-06
   2  Prefactor     .10000E-03    9.2970       -.15814E-05** at limit **
   3  norm          .10000E-03    10.463        .20061E-05** at limit **
   4  Prefactor     .10000E-03    29.660       -.72958E-05** at limit **
   5  Prefactor     .10000E-03    20.864        .37843E-05** at limit **
   6  norm          13.262        9.3472       -.84060E-06   -.40997E-04
   7  Prefactor     .10000E-03    16.113       -.29021E-05** at limit **
   8  Prefactor     .10000E-03    5.5471       -.14249E-06** at limit **
   9  norm          8.7897        8.9358       -.96886E-06    .21694E-04
  10  Prefactor     6.4633        20.675        .12637E-04   -.15605E-04
  11  Prefactor     28.337        24.746       -.10580E-04   -.34988E-04
  12  norm          .10000E-03    1.3002        .41528E-06** at limit **
  13  Prefactor     .10000E-03    4.2350       -.12048E-06** at limit **
  14  Prefactor     .10000E-03    3.6480        .24962E-06** at limit **
  15  norm          3.8061        2.2304       -.32189E-06    .37047E-04
  16  norm          6.9613        4.7256        .99876E-06    .84014E-05
  17  Prefactor     .10000E-03    5.9510       -.77405E-06** at limit **
  18  Prefactor     .10000E-03    280.11       -.28731E-04** at limit **
  19  Prefactor     34.473        23.232       -.20654E-05    .30916E-05
  20  Prefactor     .10000E-03    16.885        .96567E-06** at limit **
  21  norm          12.304        2.8229       -.60457E-07    .74751E-04
  22  Prefactor     8.0459        10.141       -.61344E-06   -.42252E-03
  23  Prefactor     .10000E-03    7.4877        .36038E-06** at limit **
  24  norm          .10000E-03    6.2807        .22687E-06** at limit **
  25  Prefactor     .10000E-03    5.6894        .69470E-06** at limit **
  26  Prefactor     .10000E-03    31.764        .46003E-05** at limit **
  27  Prefactor     .10000E-03    11.126       -.26690E-08** at limit **
  28  Prefactor     25.779        32.510       -.26060E-05   -.68076E-06
  29  Normalizat    .89153        .22033        .24701E-05   -.74214E-04
  30  Prefactor     .75276        .20757       -.35662E-06    .37370E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 17.69
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 13.2621
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 8.78966
  Prefactor  = 6.46334
  Prefactor  = 28.337
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 3.8061
  norm       = 6.96132
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 34.4727
  Prefactor  = 0.0001
  norm       = 12.3043
  Prefactor  = 8.04586
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 25.7794
  Normalizat = 0.891531
  Prefactor  = 0.752757
 **********
 **   18 **HESSE 
 **********

 FCN=   4009.882     FROM HESSE     STATUS=OK           584 CALLS     4445 TOTAL
                     EDM=   .71E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     17.690        35.159        .95192E-04   -1.4867    
   2  Prefactor     .10000E-03    9.3026        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .10000E-03    10.462        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    29.629        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    21.048        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  norm          13.262        9.3582        .11001E-03   -1.4979    
   7  Prefactor     .10000E-03    16.113        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    5.5482        .14566E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          8.7897        8.9277        .13523E-03   -1.5115    
  10  Prefactor     6.4633        20.553        .15777E-03   -1.5199    
  11  Prefactor     28.337        24.814        .75288E-04   -1.4643    
  12  norm          .10000E-03    1.3655        .14111E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .10000E-03    4.2421        .12723E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10000E-03    3.6600        .11812E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          3.8061        2.2264        .68581E-04   -1.5318    
  16  norm          6.9613        4.7212        .10873E-03   -1.5180    
  17  Prefactor     .10000E-03    5.9666        .15069E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10000E-03    282.45        .19237E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     34.473        23.242        .68257E-04   -1.4533    
  20  Prefactor     .10000E-03    17.036        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  norm          12.304        2.8265        .46788E-04   -1.5006    
  22  Prefactor     8.0459        10.187        .70677E-03   -1.5141    
  23  Prefactor     .10000E-03    7.4899        .16924E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  norm          .10000E-03    6.2859        .15499E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     .10000E-03    5.6894        .14752E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  Prefactor     .10000E-03    31.769        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  27  Prefactor     .10000E-03    11.348        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  Prefactor     25.779        32.616        .78937E-04   -1.4692    
  29  Normalizat    .89153        .26378        .24065E-03   -.96758    
  30  Prefactor     .75276        .24692        .26009E-03   -1.0149    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 7.09825e-10
Minuit parameter uncertainties:
  1  35.2
  2  4.48686e-06
  3  1.76155e-06
  4  2.67675e-05
  5  3.19015e-05
  6  9.35926
  7  3.14401e-06
  8  2.13542e-05
  9  8.92906
  10  20.575
  11  24.8232
  12  4.76376e-05
  13  2.51552e-05
  14  4.93599e-05
  15  2.22642
  16  4.72146
  17  9.38095e-07
  18  1.48917e-05
  19  23.2479
  20  5.84269e-05
  21  2.82654
  22  10.1888
  23  3.1744e-06
  24  4.1569e-06
  25  4.61327e-07
  26  1.73536e-07
  27  6.16429e-05
  28  32.639
  29  0.264159
  30  0.24728
Done.

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

Extracting fit parameters...

4FGL J1520.5+4209
   Spectrum: PowerLaw
308    Prefactor:  3.447e+01  2.325e+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:  7.528e-01  2.473e-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:  8.915e-01  2.642e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 5.86
Ra Dec: 230.135 42.160
Photon Index (Fixed Index): 2.50 +/- 0.00
Photon Flux (Fixed Index): 6.21e-08 +/- 4.18e-08
Energy Flux (Fixed Index): 1.79e-05 +/- 1.21e-05

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) = 4009.70295332
delta logL = 0.179068961178

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 4009.6990459
delta logL = 0.182976383566

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    23.100       1.0000         .10000E-03   10000.    
     2 'Index     '    2.9362       1.0000          .0000       10.000    
     3 'Normalizat'    .86401       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .77074       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=   4009.699     FROM MIGRAD    STATUS=CONVERGED     77 CALLS      277 TOTAL
                     EDM=   .26E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     23.104        27.064        .83341E-04   -.20969E-03
   2  Index         2.9366        .80444        .46395E-02   -.76675E-04
   3  Normalizat    .86404        .24812        .24385E-03    .25866E-03
   4  Prefactor     .77053        .24540        .25728E-03    .31890E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 23.1039
  Index      = 2.93656
  Normalizat = 0.864038
  Prefactor  = 0.770534
 **********
 **   18 **HESSE 
 **********

 FCN=   4009.699     FROM HESSE     STATUS=OK            25 CALLS      302 TOTAL
                     EDM=   .28E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     23.104        24.380        .16668E-04   -1.4746    
   2  Index         2.9366        .72482        .18558E-03   -.42540    
   3  Normalizat    .86404        .24792        .48771E-04   -.97736    
   4  Prefactor     .77053        .24537        .51457E-04   -1.0082    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.79042e-10
Minuit parameter uncertainties:
  1  24.3909
  2  0.72792
  3  0.24825
  4  0.245718
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/490131': 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) = 4009.69904421
delta logL = 0.182978071236

Extracting fit parameters...

4FGL J1520.5+4209
   Spectrum: PowerLaw
308    Prefactor:  2.310e+01  2.439e+01  1.000e-04  1.000e+04 ( 1.000e-13)
309        Index:  2.937e+00  7.279e-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:  7.705e-01  2.457e-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:  8.640e-01  2.482e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 6.23
Ra Dec: 230.135 42.160
Photon Index (Free Index): 2.94 +/- 0.73
Photon Flux (Free Index): 8.49e-08 +/- 6.01e-08
Energy Flux (Free Index): 1.75e-05 +/- 1.05e-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/490131/cmap_HighResolution_324604801_324864001_4FGL_J1520.5+4209_daily_bin329.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='6.21e-08', energy_flux2='1.75e-05', photon_flux_error='4.18e-08', dlogl='1.83e-01', energy_flux='1.79e-05', photon_flux2='8.49e-08', job_status='DONE', time_completed='2021-09-12 01:29:03.798057', photon_index_error2='0.73', photon_index2='2.94', ts='5.86', fit_tolerance='1e-08', GAL='0.75', photon_index_error='0.00', energy_flux_error2='1.05e-05', EG='0.89', time_epoch_completed='1631435343.8', return_code='0', job_id='490131', GAL2='0.77', EG2='0.86', return_code2='0', energy_flux_error='1.21e-05', photon_flux_error2='6.01e-08', ts2='6.23', photon_index='2.50' WHERE bin_id='329' AND source_name='4FGL J1520.5+4209' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sun Sep 12 01:29:03 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0297>
Subject: Job 490131: <4FGL_J1520.5+4209_daily_bin329> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1520.5+4209_daily_bin329 230.135 42.16 324604801 324864001 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 :                                   633.00 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             293.78 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   823 sec.
    Turnaround time :                            825 sec.

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

