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


Performing analysis on: 4FGL_J1520.5+4209_daily_bin1133
RA = 230.135, Dec = 42.16
tmin = 533001601, tmax = 533260801
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='494551', job_status='RUN', time_executed='2021-09-12 01:30:40.092781', time_epoch_executed='1631435440.09' WHERE source_name='4FGL J1520.5+4209' and cadence='daily' and bin_id='1133'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/494551

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/494551/ft1_4FGL_J1520.5+4209_daily_bin1133.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/494551/ft2_4FGL_J1520.5+4209_daily_bin1133.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/494551/ft1_4FGL_J1520.5+4209_daily_bin1133.fits outfile=/scratch/kocevski/494551/ft1_filteredMKT_4FGL_J1520.5+4209_daily_bin1133.fits ra=230.135 dec=42.16 rad=12.0 tmin=533001601.0 tmax=533260801.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 3.56
user 3.34
sys 0.20

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/494551/ft1_filtered_4FGL_J1520.5+4209_daily_bin1133.fits evtable="EVENTS" scfile=/scratch/kocevski/494551/ft2_4FGL_J1520.5+4209_daily_bin1133.fits sctable="SC_DATA" expcube=/scratch/kocevski/494551/ltcube_533001601_533260801_4FGL_J1520.5+4209_daily_bin1133.fits outfile=/scratch/kocevski/494551/expmap_533001601_533260801_4FGL_J1520.5+4209_daily_bin1133.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/494551/ltcube_533001601_533260801_4FGL_J1520.5+4209_daily_bin1133.fits
.....................!
real 189.58
user 184.93
sys 4.31

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/494551/ft1_filtered_4FGL_J1520.5+4209_daily_bin1133.fits scfile=/scratch/kocevski/494551/ft2_4FGL_J1520.5+4209_daily_bin1133.fits outfile=/scratch/kocevski/494551/cmap_533001601_533260801_4FGL_J1520.5+4209_daily_bin1133.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.36
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/494551/ft1_filtered_4FGL_J1520.5+4209_daily_bin1133.fits scfile=/scratch/kocevski/494551/ft2_4FGL_J1520.5+4209_daily_bin1133.fits outfile=/scratch/kocevski/494551/cmap_HighResolution_533001601_533260801_4FGL_J1520.5+4209_daily_bin1133.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.38
sys 0.14

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .31290       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10045E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     6 'norm      '    3.6830       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    4.7174       1.0000         .10000E-03   10000.    
     9 'norm      '    7.9243       1.0000         .10000E-03   10000.    
    10 'Prefactor '    18.728       1.0000         .10000E-03   10000.    
    11 'Prefactor '    4.1493       1.0000         .10000E-03   10000.    
    12 'norm      '    2.1525       1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10023E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    9.6093       1.0000         .10000E-03   10000.    
    15 'norm      '    .91050       1.0000         .10000E-03   10000.    
    16 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    .10018E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    36.562       1.0000         .10000E-03   10000.    
    19 'Prefactor '    .30487E-01   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10080E-03   1.0000         .10000E-03   10000.    
    21 'norm      '    4.0678       1.0000         .10000E-03   10000.    
    22 'Prefactor '    2.1191       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 '    .10020E-03   1.0000         .10000E-03   10000.    
    26 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    27 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    28 'Prefactor '    20.113       1.0000         .10000E-03   10000.    
    29 'Normalizat'    1.1250       1.0000         .10000E-01   10.000    
    30 'Prefactor '    .74008       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=   5684.134     FROM MIGRAD    STATUS=CONVERGED    821 CALLS     3972 TOTAL
                     EDM=   .15E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.3%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10254E-03    24.502        .10414E-06** at limit **
   2  Prefactor     .10000E-03    18.949       -.28104E-06** at limit **
   3  norm          .10000E-03    5.8001       -.75731E-07** at limit **
   4  Prefactor     .10000E-03    91.352       -.84025E-06** at limit **
   5  Prefactor     .10000E-03    9.1227        .16079E-05** at limit **
   6  norm          3.6827        4.0366        .24284E-05   -.19792E-02
   7  Prefactor     .10000E-03    16.714       -.32349E-06** at limit **
   8  Prefactor     4.7225        16.808       -.52975E-06   -.86539E-04
   9  norm          7.9242        6.8821       -.30462E-06   -.30292E-04
  10  Prefactor     18.722        13.180        .19674E-05    .69276E-03
  11  Prefactor     4.1481        19.545       -.18240E-05   -.97340E-04
  12  norm          2.1524        1.6643        .10410E-06    .25118E-04
  13  Prefactor     .10000E-03    8.9058       -.23199E-05** at limit **
  14  Prefactor     9.6086        6.2738        .15773E-05    .10430E-02
  15  norm          .91008        1.0013       -.29315E-07   -.53988E-05
  16  norm          .10000E-03    1.3382       -.55246E-07** at limit **
  17  Prefactor     .10000E-03    4.5910        .11185E-06** at limit **
  18  Prefactor     36.550        46.101       -.31709E-06   -.26888E-04
  19  Prefactor     .10018E-03    14.892        .11246E-05** at limit **
  20  Prefactor     .10000E-03    9.4867        .89385E-06** at limit **
  21  norm          4.0668        1.6810        .66925E-07   -.22694E-04
  22  Prefactor     2.1132        15.618       -.10214E-05   -.20180E-03
  23  Prefactor     .10000E-03    5.8463        .78030E-07** at limit **
  24  norm          .10000E-03    4.0223       -.17333E-07** at limit **
  25  Prefactor     .10000E-03    47.738        .43990E-06** at limit **
  26  Prefactor     .10000E-03    18.110        .21671E-06** at limit **
  27  Prefactor     .10000E-03    4.3309        .11528E-06** at limit **
  28  Prefactor     20.112        24.976        .28330E-05    .24353E-03
  29  Normalizat    1.1253        .17733       -.15213E-05   -.18908E-04
  30  Prefactor     .73978        .17564        .37971E-06   -.96155E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000102539
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.000100001
  norm       = 3.68271
  Prefactor  = 0.0001
  Prefactor  = 4.72252
  norm       = 7.9242
  Prefactor  = 18.7221
  Prefactor  = 4.1481
  norm       = 2.15242
  Prefactor  = 0.000100001
  Prefactor  = 9.60858
  norm       = 0.910082
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 36.5505
  Prefactor  = 0.000100182
  Prefactor  = 0.0001
  norm       = 4.06684
  Prefactor  = 2.11322
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 20.1122
  Normalizat = 1.12534
  Prefactor  = 0.739779
 **********
 **   18 **HESSE 
 **********

 FCN=   5684.134     FROM HESSE     STATUS=OK           592 CALLS     4564 TOTAL
                     EDM=   .51E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10254E-03    33.823        .10015       -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    19.253        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .10000E-03    5.8012        .17734E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    91.450        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    9.2106        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  norm          3.6827        4.6027        .87529E-03   -1.5324    
   7  Prefactor     .10000E-03    16.748        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     4.7225        16.654        .18527E-03   -1.5273    
   9  norm          7.9242        6.8820        .14244E-03   -1.5145    
  10  Prefactor     18.722        13.559        .92551E-04   -1.4842    
  11  Prefactor     4.1481        19.179        .19788E-03   -1.5301    
  12  norm          2.1524        1.6467        .79503E-04   -1.5415    
  13  Prefactor     .10000E-03    9.3331        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     9.6086        6.4213        .12928E-03   -1.5088    
  15  norm          .91008        .97949        .75862E-04   -1.5517    
  16  norm          .10000E-03    1.3611        .85143E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     .10000E-03    4.6429        .15758E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     36.550        46.085        .66280E-04   -1.4498    
  19  Prefactor     .10018E-03    178.30        .54780E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10000E-03    9.6093        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  norm          4.0668        1.6603        .50395E-04   -1.5305    
  22  Prefactor     2.1132        15.539        .28332E-03   -1.5417    
  23  Prefactor     .10000E-03    5.8494        .17805E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  norm          .10000E-03    4.0255        .14767E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     .10000E-03    48.883        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  Prefactor     .10000E-03    18.111        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  27  Prefactor     .10000E-03    4.3416        .15270E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  Prefactor     20.112        25.132        .89310E-04   -1.4811    
  29  Normalizat    1.1253        .20370        .21259E-03   -.88942    
  30  Prefactor     .73978        .20318        .26728E-03   -1.0199    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 5.11724e-09
Minuit parameter uncertainties:
  1  0.018546
  2  2.18478e-05
  3  5.36194e-06
  4  0.000110079
  5  0.000157687
  6  4.60316
  7  4.09728e-05
  8  16.6701
  9  6.88271
  10  13.5609
  11  17.8479
  12  1.64678
  13  0.000232801
  14  6.42173
  15  0.979505
  16  4.08054e-06
  17  1.47137e-06
  18  46.1296
  19  0.011435
  20  7.23241e-05
  21  1.66028
  22  11.4649
  23  8.64019e-06
  24  9.54323e-07
  25  0.000127778
  26  2.26762e-05
  27  4.69437e-05
  28  25.1453
  29  0.203839
  30  0.203382
Done.

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

Extracting fit parameters...

4FGL J1520.5+4209
   Spectrum: PowerLaw
308    Prefactor:  1.002e-04  1.144e-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.398e-01  2.034e-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.125e+00  2.038e-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: 7.72e-08 ph cm-2 s-1
Energy Flux Upper Limit: 6.01e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/494551/likelihoodResults_533001601_533260801_4FGL_J1520.5+4209_daily_bin1133.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) = 5684.13389536
delta logL = -2.56383182204e-05

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 5684.13389535
delta logL = -2.56299999819e-05

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .96355E-02   1.0000         .10000E-03   10000.    
     2 'Index     '    2.5048       1.0000          .0000       10.000    
     3 'Normalizat'    1.1253       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .73979       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.
 MACHINE ACCURACY LIMITS FURTHER IMPROVEMENT.

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
 MIGRAD TERMINATED WITHOUT CONVERGENCE.

 FCN=   5683.184     FROM MIGRAD    STATUS=FAILED       223 CALLS      387 TOTAL
                     EDM=   .22E-04    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .25356E-03    .14672E-01    .13201E-04** at limit **
   2  Index         8.3977        8.4108        .35395E-01    .30542E-02
   3  Normalizat    1.0552        .10091        .21854E-03   -.48516E-03
   4  Prefactor     .78781        .10464        .25984E-03   -.68144E-03
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   5683.184     FROM SIMPLEX   STATUS=UNCHANGED     98 CALLS      485 TOTAL
                     EDM=   .68E-05    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .25356E-03    .14672E-01    .23117E-05** at limit **
   2  Index         8.3977        8.4108        .17992E-02    .30542E-02
   3  Normalizat    1.0552        .10091        .79836E-04   -.48516E-03
   4  Prefactor     .78781        .10464        .46848E-04   -.68144E-03
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   5683.184     FROM MIGRAD    STATUS=CONVERGED     31 CALLS      516 TOTAL
                     EDM=   .26E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .25347E-03    .16367E-01    .52803E-06** at limit **
   2  Index         8.3979        8.5685        .39502E-02   -.14491E-04
   3  Normalizat    1.0552        .17526        .43707E-04    .66432E-04
   4  Prefactor     .78781        .18048        .51967E-04   -.10860E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000253466
  Index      = 8.39785
  Normalizat = 1.05521
  Prefactor  = 0.787813
 **********
 **   18 **HESSE 
 **********

 FCN=   5683.184     FROM HESSE     STATUS=OK            27 CALLS      543 TOTAL
                     EDM=   .22E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .25347E-03    .54452E-01    .74890E-07   -1.5705    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         8.3979        8.7846        .15801E-03    .74718    
   3  Normalizat    1.0552        .20073        .87414E-05   -.91203    
   4  Prefactor     .78781        .20514        .10393E-04   -1.0018    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.17811e-10
Minuit parameter uncertainties:
  1  0.00578156
  2  10.6447
  3  0.200871
  4  0.205337
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/494551': 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) = 5683.18448809
delta logL = 0.949381632206

Extracting fit parameters...

4FGL J1520.5+4209
   Spectrum: PowerLaw
308    Prefactor:  2.535e-04  5.782e-03  1.000e-04  1.000e+04 ( 1.000e-13)
309        Index:  8.398e+00  1.064e+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.878e-01  2.053e-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.055e+00  2.009e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.99
Ra Dec: 230.135 42.160
Photon Index (Free Index): 8.40 +/- 10.64
Photon Flux (Free Index): 5.01e-08 +/- 4.79e-08
Energy Flux (Free Index): 5.76e-06 +/- 6.20e-06

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/494551/cmap_HighResolution_533001601_533260801_4FGL_J1520.5+4209_daily_bin1133.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='6.01e-03', comment='SUCCESS', energy_flux2='5.76e-06', dlogl='9.49e-01', photon_flux2='5.01e-08', job_status='DONE', time_completed='2021-09-12 01:45:09.234422', photon_index_error2='10.64', photon_index2='8.40', ts='-0.00', fit_tolerance='1e-08', GAL='0.74', photon_index_error='0.00', photon_flux_upper_limit='7.72e-08', energy_flux_error2='6.20e-06', EG='1.13', time_epoch_completed='1631436309.23', return_code='0', job_id='494551', GAL2='0.79', EG2='1.06', return_code2='0', photon_flux_error2='4.79e-08', ts2='1.99', photon_index='2.50' WHERE bin_id='1133' AND source_name='4FGL J1520.5+4209' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sun Sep 12 01:45:09 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0112>
Subject: Job 494551: <4FGL_J1520.5+4209_daily_bin1133> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1520.5+4209_daily_bin1133 230.135 42.16 533001601 533260801 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 :                                   863.00 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             331.75 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   881 sec.
    Turnaround time :                            882 sec.

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

