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


Performing analysis on: 4FGL_J1520.5+4209_daily_bin970
RA = 230.135, Dec = 42.16
tmin = 490752001, tmax = 491011201
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='493355', job_status='RUN', time_executed='2021-09-12 01:25:51.397450', time_epoch_executed='1631435151.4' WHERE source_name='4FGL J1520.5+4209' and cadence='daily' and bin_id='970'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/493355

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/493355/ft1_4FGL_J1520.5+4209_daily_bin970.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/493355/ft2_4FGL_J1520.5+4209_daily_bin970.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/493355/ft1_4FGL_J1520.5+4209_daily_bin970.fits outfile=/scratch/kocevski/493355/ft1_filteredMKT_4FGL_J1520.5+4209_daily_bin970.fits ra=230.135 dec=42.16 rad=12.0 tmin=490752001.0 tmax=491011201.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 5.74
user 5.51
sys 0.21

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/493355/ft2_4FGL_J1520.5+4209_daily_bin970.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/493355/ft1_filteredMKT_4FGL_J1520.5+4209_daily_bin970.fits evtable="EVENTS" outfile="/scratch/kocevski/493355/ft1_filtered_4FGL_J1520.5+4209_daily_bin970.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.32
sys 0.17

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/493355/ft1_filtered_4FGL_J1520.5+4209_daily_bin970.fits evtable="EVENTS" scfile=/scratch/kocevski/493355/ft2_4FGL_J1520.5+4209_daily_bin970.fits sctable="SC_DATA" expcube=/scratch/kocevski/493355/ltcube_490752001_491011201_4FGL_J1520.5+4209_daily_bin970.fits outfile=/scratch/kocevski/493355/expmap_490752001_491011201_4FGL_J1520.5+4209_daily_bin970.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/493355/ltcube_490752001_491011201_4FGL_J1520.5+4209_daily_bin970.fits
.....................!
real 190.00
user 185.55
sys 4.13

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/493355/ft1_filtered_4FGL_J1520.5+4209_daily_bin970.fits scfile=/scratch/kocevski/493355/ft2_4FGL_J1520.5+4209_daily_bin970.fits outfile=/scratch/kocevski/493355/cmap_490752001_491011201_4FGL_J1520.5+4209_daily_bin970.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.37
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/493355/ft1_filtered_4FGL_J1520.5+4209_daily_bin970.fits scfile=/scratch/kocevski/493355/ft2_4FGL_J1520.5+4209_daily_bin970.fits outfile=/scratch/kocevski/493355/cmap_HighResolution_490752001_491011201_4FGL_J1520.5+4209_daily_bin970.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.37
sys 0.16

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    28.826       1.0000         .10000E-03   10000.    
     3 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    107.07       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     6 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    11.835       1.0000         .10000E-03   10000.    
     8 'Prefactor '    .11002E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    8.0431       1.0000         .10000E-03   10000.    
    10 'Prefactor '    9.2930       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10021E-03   1.0000         .10000E-03   10000.    
    12 'norm      '    5.0599       1.0000         .10000E-03   10000.    
    13 'Prefactor '    12.512       1.0000         .10000E-03   10000.    
    14 'Prefactor '    4.3692       1.0000         .10000E-03   10000.    
    15 'norm      '    4.1141       1.0000         .10000E-03   10000.    
    16 'norm      '    .10029E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    10.162       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    .20092E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    10.646       1.0000         .10000E-03   10000.    
    21 'norm      '    2.9186       1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    24 'norm      '    11.138       1.0000         .10000E-03   10000.    
    25 'Prefactor '    11.203       1.0000         .10000E-03   10000.    
    26 'Prefactor '    119.40       1.0000         .10000E-03   10000.    
    27 'Prefactor '    .52968       1.0000         .10000E-03   10000.    
    28 'Prefactor '    .10036E-03   1.0000         .10000E-03   10000.    
    29 'Normalizat'    1.3512       1.0000         .10000E-01   10.000    
    30 'Prefactor '    .40977       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=   4597.506     FROM MIGRAD    STATUS=CONVERGED    760 CALLS     3867 TOTAL
                     EDM=   .55E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .5%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    10.304       -.58284E-05** at limit **
   2  Prefactor     28.828        21.467       -.48553E-06    .20231E-04
   3  norm          .10000E-03    8.1494       -.43320E-06** at limit **
   4  Prefactor     107.07        112.67        .84325E-06    .16380E-04
   5  Prefactor     .10000E-03    8.9521        .19904E-05** at limit **
   6  norm          .10000E-03    4.2218        .69471E-07** at limit **
   7  Prefactor     11.835        26.936       -.36751E-06   -.32196E-05
   8  Prefactor     .10000E-03    17.673       -.30015E-05** at limit **
   9  norm          8.0431        8.1417        .11005E-06    .20607E-04
  10  Prefactor     9.2933        13.024       -.48810E-07   -.25763E-04
  11  Prefactor     .10000E-03    13.328       -.36507E-05** at limit **
  12  norm          5.0601        2.6690        .29774E-07    .99474E-04
  13  Prefactor     12.512        10.767        .37936E-07   -.80764E-04
  14  Prefactor     4.3717        8.9788        .19352E-06   -.13024E-03
  15  norm          4.1136        2.2802        .13464E-06   -.39455E-03
  16  norm          .10000E-03    2.0514       -.10665E-06** at limit **
  17  Prefactor     10.171        13.876        .12284E-04   -.45597E-03
  18  Prefactor     .10000E-03    28.147        .14957E-04** at limit **
  19  Prefactor     .10000E-03    64.579        .45952E-04** at limit **
  20  Prefactor     10.534        26.473       -.29034E-04   -.26154E-03
  21  norm          2.9185        1.2839        .43225E-07   -.11283E-03
  22  Prefactor     .10000E-03    3.9558        .46257E-07** at limit **
  23  Prefactor     .10000E-03    11.688        .81270E-05** at limit **
  24  norm          11.137        12.646        .29894E-06   -.12962E-03
  25  Prefactor     11.204        15.953        .16538E-05   -.24006E-04
  26  Prefactor     119.48        134.53        .61318E-04    .28990E-04
  27  Prefactor     .53203        7.7505       -.78191E-05    .20883E-03
  28  Prefactor     .10001E-03    40.415       -.33813E-04** at limit **
  29  Normalizat    1.3512        .21655        .66617E-06    .25709E-03
  30  Prefactor     .40977        .19669       -.25958E-05    .11023E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 28.8279
  norm       = 0.0001
  Prefactor  = 107.069
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 11.8347
  Prefactor  = 0.0001
  norm       = 8.04307
  Prefactor  = 9.29327
  Prefactor  = 0.0001
  norm       = 5.06009
  Prefactor  = 12.5119
  Prefactor  = 4.37166
  norm       = 4.11361
  norm       = 0.0001
  Prefactor  = 10.1708
  Prefactor  = 0.000100002
  Prefactor  = 0.000100001
  Prefactor  = 10.5343
  norm       = 2.91848
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 11.1371
  Prefactor  = 11.2035
  Prefactor  = 119.476
  Prefactor  = 0.53203
  Prefactor  = 0.000100009
  Normalizat = 1.35118
  Prefactor  = 0.409767
 **********
 **   18 **HESSE 
 **********

 FCN=   4597.506     FROM HESSE     STATUS=OK           588 CALLS     4455 TOTAL
                     EDM=   .16E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    10.299        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     28.828        21.480        .74621E-04   -1.4634    
   3  norm          .10000E-03    8.1496        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     107.07        112.73        .38866E-04   -1.3635    
   5  Prefactor     .10000E-03    8.9545        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  norm          .10000E-03    4.2607        .13604E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     11.835        26.927        .11645E-03   -1.5020    
   8  Prefactor     .10000E-03    17.725        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          8.0431        8.1422        .14137E-03   -1.5141    
  10  Prefactor     9.2933        13.018        .13147E-03   -1.5098    
  11  Prefactor     .10000E-03    13.346        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm          5.0601        2.6699        .77656E-04   -1.5258    
  13  Prefactor     12.512        10.783        .11325E-03   -1.5000    
  14  Prefactor     4.3717        8.9596        .19269E-03   -1.5290    
  15  norm          4.1136        2.2843        .68349E-04   -1.5302    
  16  norm          .10000E-03    2.0587        .94657E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     10.171        13.771        .12569E-03   -1.5070    
  18  Prefactor     .10000E-03    28.113        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10000E-03    66.183        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     10.534        26.913        .12279E-03   -1.5059    
  21  norm          2.9185        1.2838        .48798E-04   -1.5366    
  22  Prefactor     .10000E-03    3.9707        .13162E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10000E-03    11.684        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  norm          11.137        12.638        .12004E-03   -1.5040    
  25  Prefactor     11.204        15.945        .11970E-03   -1.5038    
  26  Prefactor     119.48        135.29        .18413E-03   -1.3517    
  27  Prefactor     .53203        20.086        .34864E-02   -1.5562    
  28  Prefactor     .10001E-03    40.283        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  29  Normalizat    1.3512        .25391        .21161E-03   -.82051    
  30  Prefactor     .40977        .22481        .34402E-03   -1.1631    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.60599e-09
Minuit parameter uncertainties:
  1  0.000103413
  2  21.4862
  3  8.5559e-06
  4  112.956
  5  2.797e-05
  6  4.49874e-06
  7  26.9545
  8  7.69079e-05
  9  8.14335
  10  13.0217
  11  8.74644e-05
  12  2.67001
  13  10.7848
  14  8.96234
  15  2.28437
  16  1.98315e-05
  17  13.7749
  18  0.000411906
  19  0.000417304
  20  26.9443
  21  1.28382
  22  3.32731e-06
  23  0.000134622
  24  12.641
  25  15.9515
  26  135.644
  27  6.53976
  28  0.00122932
  29  0.254148
  30  0.225297
Done.

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

Extracting fit parameters...

4FGL J1520.5+4209
   Spectrum: PowerLaw
308    Prefactor:  1.000e-04  4.173e-04  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:  4.098e-01  2.253e-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.351e+00  2.541e-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: 1.10e-07 ph cm-2 s-1
Energy Flux Upper Limit: 8.56e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/493355/likelihoodResults_490752001_491011201_4FGL_J1520.5+4209_daily_bin970.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) = 4597.50575361
delta logL = -7.19122590453e-05

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 4597.50568193
delta logL = -2.23489223572e-07

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.4518       1.0000          .0000       10.000    
     3 'Normalizat'    1.3512       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .40977       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=   4597.506     FROM MIGRAD    STATUS=CONVERGED    101 CALLS      296 TOTAL
                     EDM=   .48E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10004E-03    149.33        .36285E-03** at limit **
   2  Index         2.5526        6.2014        .50000       -.19483E-04
   3  Normalizat    1.3512        .23164        .21161E-03    .93997E-04
   4  Prefactor     .40977        .21818        .34402E-03    .44844E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100037
  Index      = 2.55259
  Normalizat = 1.35118
  Prefactor  = 0.409768
 **********
 **   18 **HESSE 
 **********

 FCN=   4597.506     FROM HESSE     STATUS=OK            29 CALLS      325 TOTAL
                     EDM=   .69E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10004E-03    89.655        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.5526        6.2732        .50000       -.51149    
   3  Normalizat    1.3512        .23176        .42322E-04   -.82051    
   4  Prefactor     .40977        .21830        .13761E-04   -1.1631    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.86661e-10
Minuit parameter uncertainties:
  1  0.00365432
  2  4.40294
  3  0.231943
  4  0.21874
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/493355': 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) = 4597.5056815
delta logL = 2.06290678761e-07

Extracting fit parameters...

4FGL J1520.5+4209
   Spectrum: PowerLaw
308    Prefactor:  1.000e-04  3.654e-03  1.000e-04  1.000e+04 ( 1.000e-13)
309        Index:  2.553e+00  4.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:  4.098e-01  2.187e-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.351e+00  2.319e-01  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/493355/cmap_HighResolution_490752001_491011201_4FGL_J1520.5+4209_daily_bin970.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='8.56e-03', job_status='DONE', photon_flux_upper_limit='1.10e-07', time_completed='2021-09-12 01:38:06.667856', job_id='493355', GAL2='0.41', fit_tolerance='1e-08', EG2='1.35', EG='1.35', time_epoch_completed='1631435886.67', return_code2='0', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.41', dlogl='2.06e-07', ts2='-0.00', photon_index_error='0.00', photon_index='2.50' WHERE bin_id='970' AND source_name='4FGL J1520.5+4209' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sun Sep 12 01:38:06 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0236>
Subject: Job 493355: <4FGL_J1520.5+4209_daily_bin970> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1520.5+4209_daily_bin970 230.135 42.16 490752001 491011201 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 :                                   726.42 sec.
    Max Memory :                                 1147 MB
    Average Memory :                             334.83 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   758 sec.
    Turnaround time :                            757 sec.

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

