/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 134 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 = 7009
number of fields = 22
No RA_SUN column yet. Adding RA_SUN/DEC_SUN columns.
Done.


Performing analysis on: 4FGL_J1321.1+2216_daily_bin43
RA = 200.296, Dec = 22.2808
tmin = 250473601, tmax = 250732801
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='495599', job_status='RUN', time_executed='2021-09-07 13:10:27.150193', time_epoch_executed='1631045427.15' WHERE source_name='4FGL J1321.1+2216' and cadence='daily' and bin_id='43'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/495599

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

Retrieving the FT1 file...

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

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

Retrieving 42 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/495599/ft1_4FGL_J1321.1+2216_daily_bin43.fits


Retrieving the FT1 file...

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

Retrieving 44 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/495599/ft2_4FGL_J1321.1+2216_daily_bin43.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/495599/ft1_4FGL_J1321.1+2216_daily_bin43.fits outfile=/scratch/kocevski/495599/ft1_filteredMKT_4FGL_J1321.1+2216_daily_bin43.fits ra=200.296 dec=22.2808 rad=12.0 tmin=250473601.0 tmax=250732801.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 1.55
user 1.19
sys 0.18

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/495599/ft2_4FGL_J1321.1+2216_daily_bin43.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/495599/ft2_4FGL_J1321.1+2216_daily_bin43.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/495599/ft1_filteredMKT_4FGL_J1321.1+2216_daily_bin43.fits evtable="EVENTS" outfile="/scratch/kocevski/495599/ft1_filtered_4FGL_J1321.1+2216_daily_bin43.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.51
user 0.35
sys 0.15

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/495599/ft1_filtered_4FGL_J1321.1+2216_daily_bin43.fits" evtable="EVENTS" scfile=/scratch/kocevski/495599/ft2_4FGL_J1321.1+2216_daily_bin43.fits sctable="SC_DATA" outfile=/scratch/kocevski/495599/ltcube_250473601_250732801_4FGL_J1321.1+2216_daily_bin43.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/495599/ft2_4FGL_J1321.1+2216_daily_bin43.fits
.....................!
real 17.54
user 17.16
sys 0.31

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/495599/ft1_filtered_4FGL_J1321.1+2216_daily_bin43.fits evtable="EVENTS" scfile=/scratch/kocevski/495599/ft2_4FGL_J1321.1+2216_daily_bin43.fits sctable="SC_DATA" expcube=/scratch/kocevski/495599/ltcube_250473601_250732801_4FGL_J1321.1+2216_daily_bin43.fits outfile=/scratch/kocevski/495599/expmap_250473601_250732801_4FGL_J1321.1+2216_daily_bin43.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/495599/ltcube_250473601_250732801_4FGL_J1321.1+2216_daily_bin43.fits
.....................!
real 194.35
user 188.78
sys 4.09

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 175 point sources and 0 extended sources

Setting source of interest to:
4FGL J1321.1+2216 @ 200.296 22.2808

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/495599/ft1_filtered_4FGL_J1321.1+2216_daily_bin43.fits scfile=/scratch/kocevski/495599/ft2_4FGL_J1321.1+2216_daily_bin43.fits outfile=/scratch/kocevski/495599/cmap_250473601_250732801_4FGL_J1321.1+2216_daily_bin43.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=200.296 yref=22.2808 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.63
user 0.40
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/495599/ft1_filtered_4FGL_J1321.1+2216_daily_bin43.fits scfile=/scratch/kocevski/495599/ft2_4FGL_J1321.1+2216_daily_bin43.fits outfile=/scratch/kocevski/495599/cmap_HighResolution_250473601_250732801_4FGL_J1321.1+2216_daily_bin43.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=200.296 yref=22.2808 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.57
user 0.41
sys 0.14

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/495599/ft1_filtered_4FGL_J1321.1+2216_daily_bin43.fits evtable="EVENTS" scfile=/scratch/kocevski/495599/ft2_4FGL_J1321.1+2216_daily_bin43.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/495599/Model_4FGL_J1321.1+2216_daily_bin43.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/495599/ft1_filtered_4FGL_J1321.1+2216_daily_bin43.fits.....................!
real 62.93
user 61.41
sys 1.16

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/495599/ft1_filtered_4FGL_J1321.1+2216_daily_bin43.fits', '/scratch/kocevski/495599/ft2_4FGL_J1321.1+2216_daily_bin43.fits', expMap='/scratch/kocevski/495599/expmap_250473601_250732801_4FGL_J1321.1+2216_daily_bin43.fits', expCube='/scratch/kocevski/495599/ltcube_250473601_250732801_4FGL_J1321.1+2216_daily_bin43.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/495599/Model_4FGL_J1321.1+2216_daily_bin43.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1321.1+2216'

4FGL J1321.1+2216
   Spectrum: LogParabola
324         norm:  7.564e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-12)
325        alpha:  2.281e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
326         beta:  7.755e-02  0.000e+00  0.000e+00  1.000e+01 ( 1.000e+00) fixed
327           Eb:  6.546e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/495599/ft1_filtered_4FGL_J1321.1+2216_daily_bin43.fits
Spacecraft file(s): /scratch/kocevski/495599/ft2_4FGL_J1321.1+2216_daily_bin43.fits
Exposure map: /scratch/kocevski/495599/expmap_250473601_250732801_4FGL_J1321.1+2216_daily_bin43.fits
Exposure cube: /scratch/kocevski/495599/ltcube_250473601_250732801_4FGL_J1321.1+2216_daily_bin43.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/495599/Model_4FGL_J1321.1+2216_daily_bin43.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) = 7788.00120719

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    2.2157       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     5 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     6 'norm      '    6.6315       1.0000         .10000E-03   10000.    
     7 'norm      '    .19197E-02   1.0000         .10000E-03   10000.    
     8 'norm      '    29.494       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    10 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    12 'norm      '    9.6511       1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10018E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    4.4366       1.0000         .10000E-03   10000.    
    15 'Prefactor '    35.765       1.0000         .10000E-03   10000.    
    16 'Prefactor '    3.0203       1.0000         .10000E-03   10000.    
    17 'Prefactor '    3.2865       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .18269E-03   1.0000         .10000E-03   10000.    
    19 'Normalizat'    1.1322       1.0000         .10000E-01   10.000    
    20 'Prefactor '    .97165       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5610E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   7787.974     FROM MIGRAD    STATUS=CONVERGED     70 CALLS     1428 TOTAL
                     EDM=   .60E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  7.3%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10034E-03    19.742       -.84107E-05** at limit **
   2  Prefactor     .10000E-03    2.7902        .47263E-06** at limit **
   3  norm          2.2165        3.3589        .35314E-05    .14693E-02
   4  Prefactor     .10003E-03    2.8177        .10656E-05** at limit **
   5  norm          .10000E-03    1.0029       -.53911E-06** at limit **
   6  norm          6.6174        3.2555       -.18651E-05   -.28520E-02
   7  norm          .10001E-03    16.583        .23827E-04** at limit **
   8  norm          29.494        1.0003       -.11919E-07    .61922E-04
   9  Prefactor     .10003E-03    2.8881       -.15252E-05** at limit **
  10  norm          .10000E-03    1.7742       -.13071E-06** at limit **
  11  Prefactor     .10000E-03    12.458       -.52669E-05** at limit **
  12  norm          9.6512        1.0133        .12614E-06    .25486E-03
  13  Prefactor     .10000E-03    6.1950       -.42409E-06** at limit **
  14  Prefactor     4.4336        1.2088       -.10005E-05    .68787E-03
  15  Prefactor     35.765        1.0047       -.52112E-07    .34255E-03
  16  Prefactor     3.0203        1.3000        .79273E-06    .11799E-03
  17  Prefactor     3.2866        1.0123       -.20696E-07   -.10579E-04
  18  Prefactor     .10030E-03    17.519        .28368E-05** at limit **
  19  Normalizat    1.1322        .18020        .18846E-05    .61512E-04
  20  Prefactor     .97166        .17639        .10299E-05    .56287E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100338
  Prefactor  = 0.0001
  norm       = 2.21645
  Prefactor  = 0.000100033
  norm       = 0.0001
  norm       = 6.61743
  norm       = 0.00010001
  norm       = 29.4943
  Prefactor  = 0.00010003
  norm       = 0.0001
  Prefactor  = 0.000100002
  norm       = 9.65118
  Prefactor  = 0.0001
  Prefactor  = 4.4336
  Prefactor  = 35.765
  Prefactor  = 3.02032
  Prefactor  = 3.28661
  Prefactor  = 0.000100302
  Normalizat = 1.13224
  Prefactor  = 0.971664
 **********
 **   18 **HESSE 
 **********

 FCN=   7787.974     FROM HESSE     STATUS=OK           339 CALLS     1767 TOTAL
                     EDM=   .63E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10034E-03    36.573        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    2.7710        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          2.2165        3.5041        .69073E-02   -1.5410    
   4  Prefactor     .10003E-03    4.3338        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          .10000E-03    .99440        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  norm          6.6174        4.1419        .38957E-02   -1.5193    
   7  norm          .10001E-03    5.5086        .58344E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          29.494        14.974        .18443E-02   -1.4621    
   9  Prefactor     .10003E-03    4.2887        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          .10000E-03    1.7653        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    12.654        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm          9.6512        6.3843        .32248E-02   -1.5087    
  13  Prefactor     .10000E-03    6.1946        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     4.4336        21.568        .47796E-02   -1.5287    
  15  Prefactor     35.765        33.769        .16753E-02   -1.4511    
  16  Prefactor     3.0203        3.8472        .58380E-02   -1.5360    
  17  Prefactor     3.2866        5.5722        .55837E-02   -1.5345    
  18  Prefactor     .10030E-03    5.3387        .90712E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Normalizat    1.1322        .15668        .53416E-01   -.88723    
  20  Prefactor     .97166        .14953        .45912E-01   -.93680    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.3477e-08
Minuit parameter uncertainties:
  1  0.00703899
  2  2.24481e-05
  3  3.50442
  4  0.000754254
  5  9.21202e-07
  6  4.14211
  7  0.000469305
  8  14.9762
  9  0.000719641
  10  1.28125e-07
  11  0.000306303
  12  6.38476
  13  8.91019e-05
  14  19.5687
  15  33.7874
  16  3.84752
  17  5.57307
  18  0.00254007
  19  0.156741
  20  0.149592
Done.

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

Extracting fit parameters...

4FGL J1321.1+2216
   Spectrum: LogParabola
324         norm:  1.000e-04  1.281e-07  1.000e-04  1.000e+04 ( 1.000e-12)
325        alpha:  2.281e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
326         beta:  7.755e-02  0.000e+00  0.000e+00  1.000e+01 ( 1.000e+00) fixed
327           Eb:  6.546e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
558    Prefactor:  9.717e-01  1.496e-01  0.000e+00  1.000e+01 ( 1.000e+00)
559        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
560        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
557   Normalization:  1.132e+00  1.567e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 200.296 22.281
Photon Flux Upper Limit: 4.01e-08 ph cm-2 s-1
Energy Flux Upper Limit: 1.44e-05 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/495599/likelihoodResults_250473601_250732801_4FGL_J1321.1+2216_daily_bin43.txt

Performing a free index iterative likelihood fit...

Freezing all point sources, except source of interest...

Done.

Freeing candidate source...
Done.

Fit tolerance = 1

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 7787.97699209
delta logL = -0.00266912800816

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 7787.97432296
delta logL = 4.47016645921e-09

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     2 'alpha     '    2.2834       1.0000          .0000       5.0000    
     3 'Normalizat'    1.1322       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .97166       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5610E+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=   7787.974     FROM MIGRAD    STATUS=FAILED        83 CALLS      232 TOTAL
                     EDM=   .55E-07    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .10007E-03    3.1138        .11444E-02** at limit **
   2  alpha         2.3189        2.8904        .16539       -.30311E-05
   3  Normalizat    1.1322        .17871        .23618E-03    .15788E-04
   4  Prefactor     .97166        .17594        .24764E-03    .21118E-04
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   7787.974     FROM SIMPLEX   STATUS=UNCHANGED    117 CALLS      349 TOTAL
                     EDM=   .14E-04    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .10007E-03    3.1138        .16216E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  alpha         2.3189        2.8904        .68595E-03   -.72512E-01
   3  Normalizat    1.1322        .17871        .67885E-04   -.88723    
   4  Prefactor     .97166        .17594        .92684E-04   -.93680    
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   7787.974     FROM MIGRAD    STATUS=CONVERGED     30 CALLS      379 TOTAL
                     EDM=   .49E-12    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .10000E-03    1.7813        .22889E-03** at limit **
   2  alpha         2.3617        2.6083        .66157E-02   -.41242E-08
   3  Normalizat    1.1322        .17888        .94473E-05   -.21179E-04
   4  Prefactor     .97166        .17612        .99055E-05   -.19741E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 0.0001
  alpha      = 2.36175
  Normalizat = 1.13224
  Prefactor  = 0.971664
 **********
 **   18 **HESSE 
 **********

 FCN=   7787.974     FROM HESSE     STATUS=OK            23 CALLS      402 TOTAL
                     EDM=   .47E-12    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .10000E-03    1.7813        .45778E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  alpha         2.3617        2.5841        .13231E-02   -.55329E-01
   3  Normalizat    1.1322        .17901        .18895E-05   -.88723    
   4  Prefactor     .97166        .17624        .19811E-05   -.93680    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.6592e-13
Minuit parameter uncertainties:
  1  7.13226e-07
  2  188.376
  3  0.179104
  4  0.176347
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/495599': 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) = 7787.97432287
delta logL = 9.14888005354e-08

Extracting fit parameters...

4FGL J1321.1+2216
   Spectrum: LogParabola
324         norm:  1.000e-04  7.132e-07  1.000e-04  1.000e+04 ( 1.000e-12)
325        alpha:  2.362e+00  1.884e+02  0.000e+00  5.000e+00 ( 1.000e+00)
326         beta:  7.755e-02  0.000e+00  0.000e+00  1.000e+01 ( 1.000e+00) fixed
327           Eb:  6.546e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
558    Prefactor:  9.717e-01  1.763e-01  0.000e+00  1.000e+01 ( 1.000e+00)
559        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
560        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
557   Normalization:  1.132e+00  1.791e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 200.296 22.281

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/495599/cmap_HighResolution_250473601_250732801_4FGL_J1321.1+2216_daily_bin43.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.44e-05', job_status='DONE', photon_flux_upper_limit='4.01e-08', time_completed='2021-09-07 13:20:53.054460', job_id='495599', GAL2='0.97', fit_tolerance='1e-08', EG2='1.13', EG='1.13', time_epoch_completed='1631046053.05', return_code2='0', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.97', dlogl='9.15e-08', ts2='-0.00', photon_index_error='0.00', photon_index='2.28' WHERE bin_id='43' AND source_name='4FGL J1321.1+2216' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Tue Sep  7 13:20:53 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0245>
Subject: Job 495599: <4FGL_J1321.1+2216_daily_bin43> in cluster <slac> Done

Job <4FGL_J1321.1+2216_daily_bin43> was submitted from host <rhel6-64d> by user <kocevski> in cluster <slac> at Tue Sep  7 13:05:43 2021
Job was executed on host(s) <bullet0245>, in queue <medium>, as user <kocevski> in cluster <slac> at Tue Sep  7 13:08:01 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Tue Sep  7 13:08:01 2021
Terminated at Tue Sep  7 13:20:53 2021
Results reported at Tue Sep  7 13:20:53 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1321.1+2216_daily_bin43 200.296 22.2808 250473601 250732801 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1321.1+2216 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   624.28 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             289.54 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   772 sec.
    Turnaround time :                            910 sec.

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

