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


Performing analysis on: 4FGL_J2216.9+2421_daily_bin1063
RA = 334.238, Dec = 24.3575
tmin = 514857601, tmax = 515116801
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='231317', job_status='RUN', time_executed='2021-09-28 07:37:22.956240', time_epoch_executed='1632839842.96' WHERE source_name='4FGL J2216.9+2421' and cadence='daily' and bin_id='1063'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/231317

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/231317/ft1_4FGL_J2216.9+2421_daily_bin1063.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/231317/ft2_4FGL_J2216.9+2421_daily_bin1063.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/231317/ft1_4FGL_J2216.9+2421_daily_bin1063.fits outfile=/scratch/kocevski/231317/ft1_filteredMKT_4FGL_J2216.9+2421_daily_bin1063.fits ra=334.238 dec=24.3575 rad=12.0 tmin=514857601.0 tmax=515116801.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.51
user 3.27
sys 0.22

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/231317/ft2_4FGL_J2216.9+2421_daily_bin1063.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/231317/ft2_4FGL_J2216.9+2421_daily_bin1063.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/231317/ft1_filteredMKT_4FGL_J2216.9+2421_daily_bin1063.fits evtable="EVENTS" outfile="/scratch/kocevski/231317/ft1_filtered_4FGL_J2216.9+2421_daily_bin1063.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.31
sys 0.16

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/231317/ft1_filtered_4FGL_J2216.9+2421_daily_bin1063.fits" evtable="EVENTS" scfile=/scratch/kocevski/231317/ft2_4FGL_J2216.9+2421_daily_bin1063.fits sctable="SC_DATA" outfile=/scratch/kocevski/231317/ltcube_514857601_515116801_4FGL_J2216.9+2421_daily_bin1063.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/231317/ft2_4FGL_J2216.9+2421_daily_bin1063.fits
.....................!
real 11.91
user 11.49
sys 0.39

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/231317/ft1_filtered_4FGL_J2216.9+2421_daily_bin1063.fits evtable="EVENTS" scfile=/scratch/kocevski/231317/ft2_4FGL_J2216.9+2421_daily_bin1063.fits sctable="SC_DATA" expcube=/scratch/kocevski/231317/ltcube_514857601_515116801_4FGL_J2216.9+2421_daily_bin1063.fits outfile=/scratch/kocevski/231317/expmap_514857601_515116801_4FGL_J2216.9+2421_daily_bin1063.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/231317/ltcube_514857601_515116801_4FGL_J2216.9+2421_daily_bin1063.fits
.....................!
real 190.52
user 184.71
sys 5.40

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
Extended source Cygnus Loop in ROI, make sure /nfs/farm/g/glast/g/LCRepository/Likelihood/ExtendedSources/Extended_archive_v18/Templates/CygnusLoop.fits is the correct path to the extended template.
Added 159 point sources and 1 extended sources
If using unbinned likelihood you will need to rerun gtdiffrsp for the extended sources or rerun the makeModel function with optional argument psForce=True

Setting source of interest to:
4FGL J2216.9+2421 @ 334.238 24.3575

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/231317/ft1_filtered_4FGL_J2216.9+2421_daily_bin1063.fits scfile=/scratch/kocevski/231317/ft2_4FGL_J2216.9+2421_daily_bin1063.fits outfile=/scratch/kocevski/231317/cmap_514857601_515116801_4FGL_J2216.9+2421_daily_bin1063.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=334.238 yref=24.3575 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.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/231317/ft1_filtered_4FGL_J2216.9+2421_daily_bin1063.fits scfile=/scratch/kocevski/231317/ft2_4FGL_J2216.9+2421_daily_bin1063.fits outfile=/scratch/kocevski/231317/cmap_HighResolution_514857601_515116801_4FGL_J2216.9+2421_daily_bin1063.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=334.238 yref=24.3575 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/231317/ft1_filtered_4FGL_J2216.9+2421_daily_bin1063.fits evtable="EVENTS" scfile=/scratch/kocevski/231317/ft2_4FGL_J2216.9+2421_daily_bin1063.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/231317/Model_4FGL_J2216.9+2421_daily_bin1063.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 Cygnus Loop
adding source EG_v02
adding source GAL_V02
Working on...
/scratch/kocevski/231317/ft1_filtered_4FGL_J2216.9+2421_daily_bin1063.fits.....................!
real 157.14
user 155.58
sys 1.20

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/231317/ft1_filtered_4FGL_J2216.9+2421_daily_bin1063.fits', '/scratch/kocevski/231317/ft2_4FGL_J2216.9+2421_daily_bin1063.fits', expMap='/scratch/kocevski/231317/expmap_514857601_515116801_4FGL_J2216.9+2421_daily_bin1063.fits', expCube='/scratch/kocevski/231317/ltcube_514857601_515116801_4FGL_J2216.9+2421_daily_bin1063.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/231317/Model_4FGL_J2216.9+2421_daily_bin1063.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J2216.9+2421'

4FGL J2216.9+2421
   Spectrum: PowerLaw
286    Prefactor:  5.564e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-13)
287        Index:  2.284e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
288        Scale:  1.223e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/231317/ft1_filtered_4FGL_J2216.9+2421_daily_bin1063.fits
Spacecraft file(s): /scratch/kocevski/231317/ft2_4FGL_J2216.9+2421_daily_bin1063.fits
Exposure map: /scratch/kocevski/231317/expmap_514857601_515116801_4FGL_J2216.9+2421_daily_bin1063.fits
Exposure cube: /scratch/kocevski/231317/ltcube_514857601_515116801_4FGL_J2216.9+2421_daily_bin1063.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/231317/Model_4FGL_J2216.9+2421_daily_bin1063.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) = 9717.18651065

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    72.713       1.0000         .10000E-03   10000.    
     2 'norm      '    3.2957       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    10.798       1.0000         .10000E-03   10000.    
     5 'norm      '    .30902       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10029E-03   1.0000         .10000E-03   10000.    
     7 'norm      '    .10064E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    2.5776       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    12 'norm      '    .21790       1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    14 'norm      '    1.8347       1.0000         .10000E-03   10000.    
    15 'Prefactor '    23.593       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    1.6718       1.0000         .10000E-03   10000.    
    18 'Prefactor '    3.7493       1.0000         .10000E-03   10000.    
    19 'Normalizat'    .98068       1.0000         .10000E-01   10.000    
    20 'Prefactor '    1.0163       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5350E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   9717.181     FROM MIGRAD    STATUS=CONVERGED    420 CALLS     2041 TOTAL
                     EDM=   .12E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     72.713        73.439        .11770E-02   -.49754E-03
   2  norm          3.2954        2.5317        .55755E-02    .62195E-03
   3  Prefactor     .10000E-03    1.8107        .90712E-02** at limit **
   4  Prefactor     10.798        31.604        .30481E-02   -.40098E-03
   5  norm          .30899        .58627        .10464E-02    .44853E-03
   6  Prefactor     .10000E-03    39.386        .90712E-02** at limit **
   7  norm          .10000E-03    .50179        .22958E-01** at limit **
   8  Prefactor     .10000E-03    6.2035        .90712E-02** at limit **
   9  norm          2.5777        3.1449        .63552E-02    .17651E-03
  10  Prefactor     .10000E-03    16.171        .90712E-02** at limit **
  11  Prefactor     .10000E-03    9.3435        .90712E-02** at limit **
  12  norm          .21786        .68445        .10059E-01    .38807E-02
  13  Prefactor     .10000E-03    5.0817        .90712E-02** at limit **
  14  norm          1.8350        1.3869        .77012E-02    .24993E-02
  15  Prefactor     23.592        33.813        .20617E-02    .10072E-02
  16  Prefactor     .10000E-03    4.0216        .90712E-02** at limit **
  17  Prefactor     1.6716        .31816        .51759E-02   -.12996E-02
  18  Prefactor     3.7492        5.1339        .52129E-02    .12437E-03
  19  Normalizat    .98083        .20281        .85206E-01    .54846E-04
  20  Prefactor     1.0163        .93389E-01    .42528E-01    .45611E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 72.7128
  norm       = 3.29538
  Prefactor  = 0.0001
  Prefactor  = 10.7984
  norm       = 0.308993
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 2.57771
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.217863
  Prefactor  = 0.0001
  norm       = 1.83505
  Prefactor  = 23.5918
  Prefactor  = 0.0001
  Prefactor  = 1.67164
  Prefactor  = 3.74925
  Normalizat = 0.980833
  Prefactor  = 1.01627
 **********
 **   18 **HESSE 
 **********

 FCN=   9717.181     FROM HESSE     STATUS=OK           287 CALLS     2328 TOTAL
                     EDM=   .81E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     72.713        73.420        .47082E-04   -1.4000    
   2  norm          3.2954        2.5105        .12388E-03   -1.5345    
   3  Prefactor     .10000E-03    1.8140        .12953E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     10.798        31.335        .12192E-03   -1.5051    
   5  norm          .30899        .58574        .41858E-04   -1.5597    
   6  Prefactor     .10000E-03    39.445        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  norm          .10000E-03    1.2951        .13418E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    6.2568        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          2.5777        3.1371        .18736E-03   -1.5387    
  10  Prefactor     .10000E-03    16.172        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    9.6832        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm          .21786        .69015        .13839E-03   -1.5615    
  13  Prefactor     .10000E-03    5.0864        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          1.8350        1.3878        .49115E-03   -1.5437    
  15  Prefactor     23.592        33.958        .82467E-04   -1.4736    
  16  Prefactor     .10000E-03    4.0370        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     1.6716        .31984        .22892E-04   -1.5449    
  18  Prefactor     3.7492        5.1265        .20852E-03   -1.5321    
  19  Normalizat    .98083        .23350        .37724E-03   -.93675    
  20  Prefactor     1.0163        .10878        .17474E-03   -.92189    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 8.11934e-09
Minuit parameter uncertainties:
  1  73.5114
  2  2.51057
  3  1.30385e-06
  4  31.3825
  5  0.585756
  6  7.14457e-05
  7  7.3075e-07
  8  1.51725e-05
  9  3.13728
  10  4.73348e-05
  11  1.32433e-05
  12  0.690173
  13  1.56042e-05
  14  1.38782
  15  33.9858
  16  1.3556e-05
  17  0.319837
  18  5.12706
  19  0.23374
  20  0.108803
Done.

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

Extracting fit parameters...

4FGL J2216.9+2421
   Spectrum: PowerLaw
286    Prefactor:  1.000e-04  1.517e-05  1.000e-04  1.000e+04 ( 1.000e-13)
287        Index:  2.284e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
288        Scale:  1.223e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
532    Prefactor:  1.016e+00  1.088e-01  0.000e+00  1.000e+01 ( 1.000e+00)
533        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
534        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
531   Normalization:  9.808e-01  2.337e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 334.238 24.358
Photon Flux Upper Limit: 4.91e-08 ph cm-2 s-1
Energy Flux Upper Limit: 3.77e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/231317/likelihoodResults_514857601_515116801_4FGL_J2216.9+2421_daily_bin1063.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) = 9717.18150647
delta logL = -0.000761617133321

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 9717.18074385
delta logL = 1.00213037513e-06

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .11725E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.2026       1.0000          .0000       10.000    
     3 'Normalizat'    .98084       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0163       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5350E+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.
 MIGRAD TERMINATED WITHOUT CONVERGENCE.

 FCN=   9717.123     FROM MIGRAD    STATUS=FAILED       229 CALLS      386 TOTAL
                     EDM=   .45E-06    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     3.8901        1210.4        .18142E-01    .84663E-03
   2  Index         1.4623        6.1635        .32375       -.33264E-04
   3  Normalizat    .98461        .72407E-01    .37724E-03    .74799E-04
   4  Prefactor     1.0130        .37414E-01    .17474E-03    .15336E-03
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   9717.123     FROM SIMPLEX   STATUS=UNCHANGED    102 CALLS      488 TOTAL
                     EDM=   .11E-04    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     3.8901        1210.4        .12961E-03    .84663E-03
   2  Index         1.4623        6.1635        .15134E-02   -.33264E-04
   3  Normalizat    .98461        .72407E-01    .12230E-03    .74799E-04
   4  Prefactor     1.0130        .37414E-01    .24886E-04    .15336E-03
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   9717.123     FROM MIGRAD    STATUS=CONVERGED     40 CALLS      528 TOTAL
                     EDM=   .18E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     3.8901        12.229        .59790E-03   -.18102E-04
   2  Index         1.4623        .82855        .17760E-01   -.11809E-04
   3  Normalizat    .98461        .22816        .15090E-04    .75040E-04
   4  Prefactor     1.0130        .10846        .34947E-04    .15589E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 3.89012
  Index      = 1.46229
  Normalizat = 0.984609
  Prefactor  = 1.01305
 **********
 **   18 **HESSE 
 **********

 FCN=   9717.123     FROM HESSE     STATUS=OK            25 CALLS      553 TOTAL
                     EDM=   .14E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     3.8901        12.259        .23916E-04   -1.5313    
   2  Index         1.4623        .83131        .71042E-03   -.78601    
   3  Normalizat    .98461        .22794        .30179E-05   -.93548    
   4  Prefactor     1.0130        .10837        .69895E-05   -.92296    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.42758e-11
Minuit parameter uncertainties:
  1  12.267
  2  0.839177
  3  0.228167
  4  0.108393
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/231317': 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) = 9717.12254775
delta logL = 0.0581971019401

Extracting fit parameters...

4FGL J2216.9+2421
   Spectrum: PowerLaw
286    Prefactor:  3.890e+00  1.227e+01  1.000e-04  1.000e+04 ( 1.000e-13)
287        Index:  1.462e+00  8.392e-01  0.000e+00  1.000e+01 (-1.000e+00)
288        Scale:  1.223e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
532    Prefactor:  1.013e+00  1.084e-01  0.000e+00  1.000e+01 ( 1.000e+00)
533        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
534        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
531   Normalization:  9.846e-01  2.282e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 334.238 24.358

Creating a high resolution counts map...
INFO: Auto-setting vmin to -1.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  1.110e+00 [aplpy.core]
Saving /scratch/kocevski/231317/cmap_HighResolution_514857601_515116801_4FGL_J2216.9+2421_daily_bin1063.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='3.77e-03', job_status='DONE', photon_flux_upper_limit='4.91e-08', time_completed='2021-09-28 07:51:21.594521', job_id='231317', GAL2='1.01', fit_tolerance='1e-08', EG2='0.98', EG='0.98', time_epoch_completed='1632840681.59', return_code2='0', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.02', dlogl='5.82e-02', ts2='0.12', photon_index_error='0.00', photon_index='2.28' WHERE bin_id='1063' AND source_name='4FGL J2216.9+2421' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Tue Sep 28 07:51:21 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0030>
Subject: Job 231317: <4FGL_J2216.9+2421_daily_bin1063> in cluster <slac> Done

Job <4FGL_J2216.9+2421_daily_bin1063> was submitted from host <rhel6-64p> by user <kocevski> in cluster <slac> at Tue Sep 28 07:35:14 2021
Job was executed on host(s) <bullet0030>, in queue <medium>, as user <kocevski> in cluster <slac> at Tue Sep 28 07:35:16 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Tue Sep 28 07:35:16 2021
Terminated at Tue Sep 28 07:51:22 2021
Results reported at Tue Sep 28 07:51:22 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2216.9+2421_daily_bin1063 334.238 24.3575 514857601 515116801 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J2216.9+2421 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   831.06 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             322.75 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              7
    Max Threads :                                21
    Run time :                                   965 sec.
    Turnaround time :                            968 sec.

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

