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


Performing analysis on: 4FGL_J1321.1+2216_daily_bin454
RA = 200.296, Dec = 22.2808
tmin = 357004801, tmax = 357264001
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='496444', job_status='RUN', time_executed='2021-09-07 13:13:21.343305', time_epoch_executed='1631045601.34' WHERE source_name='4FGL J1321.1+2216' and cadence='daily' and bin_id='454'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/496444

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/496444/ft1_4FGL_J1321.1+2216_daily_bin454.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/496444/ft2_4FGL_J1321.1+2216_daily_bin454.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/496444/ft1_4FGL_J1321.1+2216_daily_bin454.fits outfile=/scratch/kocevski/496444/ft1_filteredMKT_4FGL_J1321.1+2216_daily_bin454.fits ra=200.296 dec=22.2808 rad=12.0 tmin=357004801.0 tmax=357264001.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 4.02
user 3.74
sys 0.21

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/496444/ft1_filtered_4FGL_J1321.1+2216_daily_bin454.fits evtable="EVENTS" scfile=/scratch/kocevski/496444/ft2_4FGL_J1321.1+2216_daily_bin454.fits sctable="SC_DATA" expcube=/scratch/kocevski/496444/ltcube_357004801_357264001_4FGL_J1321.1+2216_daily_bin454.fits outfile=/scratch/kocevski/496444/expmap_357004801_357264001_4FGL_J1321.1+2216_daily_bin454.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/496444/ltcube_357004801_357264001_4FGL_J1321.1+2216_daily_bin454.fits
.....................!
real 192.51
user 186.74
sys 4.78

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/496444/ft1_filtered_4FGL_J1321.1+2216_daily_bin454.fits scfile=/scratch/kocevski/496444/ft2_4FGL_J1321.1+2216_daily_bin454.fits outfile=/scratch/kocevski/496444/cmap_357004801_357264001_4FGL_J1321.1+2216_daily_bin454.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.96
user 0.38
sys 0.17

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/496444/ft1_filtered_4FGL_J1321.1+2216_daily_bin454.fits scfile=/scratch/kocevski/496444/ft2_4FGL_J1321.1+2216_daily_bin454.fits outfile=/scratch/kocevski/496444/cmap_HighResolution_357004801_357264001_4FGL_J1321.1+2216_daily_bin454.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.95
user 0.40
sys 0.15

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

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/496444/ft1_filtered_4FGL_J1321.1+2216_daily_bin454.fits', '/scratch/kocevski/496444/ft2_4FGL_J1321.1+2216_daily_bin454.fits', expMap='/scratch/kocevski/496444/expmap_357004801_357264001_4FGL_J1321.1+2216_daily_bin454.fits', expCube='/scratch/kocevski/496444/ltcube_357004801_357264001_4FGL_J1321.1+2216_daily_bin454.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/496444/Model_4FGL_J1321.1+2216_daily_bin454.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/496444/ft1_filtered_4FGL_J1321.1+2216_daily_bin454.fits
Spacecraft file(s): /scratch/kocevski/496444/ft2_4FGL_J1321.1+2216_daily_bin454.fits
Exposure map: /scratch/kocevski/496444/expmap_357004801_357264001_4FGL_J1321.1+2216_daily_bin454.fits
Exposure cube: /scratch/kocevski/496444/ltcube_357004801_357264001_4FGL_J1321.1+2216_daily_bin454.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/496444/Model_4FGL_J1321.1+2216_daily_bin454.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) = 5605.27228492

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    6.9993       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    .10087E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10006E-03   1.0000         .10000E-03   10000.    
     5 'norm      '    1.8561       1.0000         .10000E-03   10000.    
     6 'norm      '    2.2305       1.0000         .10000E-03   10000.    
     7 'norm      '    1.0652       1.0000         .10000E-03   10000.    
     8 'norm      '    16.568       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
    10 'norm      '    .10008E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    25.295       1.0000         .10000E-03   10000.    
    12 'norm      '    7.7026       1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    11.006       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    19 'Normalizat'    .87852       1.0000         .10000E-01   10.000    
    20 'Prefactor '    1.1832       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.

 FCN=   5605.271     FROM MIGRAD    STATUS=CONVERGED    390 CALLS     1985 TOTAL
                     EDM=   .96E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  3.9%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     6.9643        247.05       -.92369E-05   -.20116E-04
   2  Prefactor     .10000E-03    2.7344        .15595E-07** at limit **
   3  norm          .10000E-03    5.8580       -.55236E-06** at limit **
   4  Prefactor     .10000E-03    7.5548       -.73351E-07** at limit **
   5  norm          1.8560        1.9430       -.30021E-07    .48834E-04
   6  norm          2.2335        5.8015       -.18636E-05   -.29819E-03
   7  norm          1.0616        10.744        .43935E-05   -.13364E-03
   8  norm          16.569        17.011        .49319E-07    .10159E-04
   9  Prefactor     .10000E-03    9.6870        .13873E-06** at limit **
  10  norm          .10000E-03    3.4182        .35322E-07** at limit **
  11  Prefactor     25.296        43.997        .10809E-06    .74977E-05
  12  norm          7.7029        8.8072       -.10160E-07   -.75607E-05
  13  Prefactor     .10000E-03    9.0895        .17762E-06** at limit **
  14  Prefactor     .10000E-03    5.7533        .83793E-07** at limit **
  15  Prefactor     11.008        31.987        .35326E-06    .62022E-05
  16  Prefactor     .10000E-03    1.3179        .14368E-07** at limit **
  17  Prefactor     .10000E-03    10.114       -.76477E-07** at limit **
  18  Prefactor     .10000E-03    8.8229        .20034E-06** at limit **
  19  Normalizat    .87863        .18828        .10082E-05   -.32173E-04
  20  Prefactor     1.1831        .18079       -.60732E-06    .84711E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 6.96426
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 1.85598
  norm       = 2.23347
  norm       = 1.06159
  norm       = 16.5689
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 25.2963
  norm       = 7.70285
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 11.0076
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Normalizat = 0.878632
  Prefactor  = 1.18305
 **********
 **   18 **HESSE 
 **********

 FCN=   5605.271     FROM HESSE     STATUS=OK           289 CALLS     2274 TOTAL
                     EDM=   .19E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     6.9643        259.67        .15164E-03   -1.5180    
   2  Prefactor     .10000E-03    2.7405        .12090E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .10000E-03    5.9413        .35065E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    7.6191        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          1.8560        1.9517        .10398E-03   -1.5435    
   6  norm          2.2335        5.7411        .19286E-03   -1.5409    
   7  norm          1.0616        11.001        .34151E-03   -1.5502    
   8  norm          16.569        17.007        .98396E-04   -1.4894    
   9  Prefactor     .10000E-03    9.7239        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          .10000E-03    3.4321        .13506E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     25.296        44.040        .79648E-04   -1.4702    
  12  norm          7.7029        8.8091        .14449E-03   -1.5153    
  13  Prefactor     .10000E-03    9.1299        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10000E-03    5.7553        .17539E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     11.008        32.008        .12076E-03   -1.5044    
  16  Prefactor     .10000E-03    1.3273        .83925E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     .10000E-03    10.162        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10000E-03    8.8867        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Normalizat    .87863        .22268        .26216E-03   -.97215    
  20  Prefactor     1.1831        .21544        .22672E-03   -.86854    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.92099e-10
Minuit parameter uncertainties:
  1  85.4537
  2  2.02245e-06
  3  7.81945e-05
  4  1.61176e-05
  5  1.95174
  6  5.74254
  7  6.83598
  8  17.012
  9  7.41231e-06
  10  4.68942e-06
  11  44.0966
  12  8.81054
  13  2.29667e-06
  14  1.97144e-06
  15  32.0574
  16  1.32189e-06
  17  1.90208e-05
  18  5.73281e-06
  19  0.222913
  20  0.215596
Done.

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

Extracting fit parameters...

4FGL J1321.1+2216
   Spectrum: LogParabola
324         norm:  1.000e-04  4.689e-06  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:  1.183e+00  2.156e-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:  8.786e-01  2.229e-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: 6.83e-08 ph cm-2 s-1
Energy Flux Upper Limit: 2.46e-05 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/496444/likelihoodResults_357004801_357264001_4FGL_J1321.1+2216_daily_bin454.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) = 5605.27260076
delta logL = -0.00138607529516

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 5605.27121735
delta logL = -2.65891139861e-06

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .11916E-03   1.0000         .10000E-03   10000.    
     2 'alpha     '    2.3017       1.0000          .0000       5.0000    
     3 'Normalizat'    .87876       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1830       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=   5605.161     FROM MIGRAD    STATUS=FAILED       189 CALLS      336 TOTAL
                     EDM=   .18E-05    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .17143        16.688        .13746E-01    .71452E-03
   2  alpha         4.8277        2.5608        .50000       -.69435E-04
   3  Normalizat    .84049        .88714E-01    .26215E-03   -.29277E-03
   4  Prefactor     1.2063        .62351E-01    .22672E-03   -.29503E-03
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   5605.161     FROM SIMPLEX   STATUS=UNCHANGED     86 CALLS      422 TOTAL
                     EDM=   .75E-05    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .17143        16.688        .63400E-04    .71452E-03
   2  alpha         4.8277        2.5608        .58209E-02   -.69435E-04
   3  Normalizat    .84049        .88714E-01    .93721E-04   -.29277E-03
   4  Prefactor     1.2063        .62351E-01    .35129E-04   -.29503E-03
                               ERR DEF=  .500    

 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.

 FCN=   5605.161     FROM MIGRAD    STATUS=CONVERGED     73 CALLS      495 TOTAL
                     EDM=   .59E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .17142        5.8519        .11573E-03   -.39677E-03
   2  alpha         4.8278        3.4785        .26051E-01    .81651E-06
   3  Normalizat    .84049        .23086        .20972E-05   -.15070E-03
   4  Prefactor     1.2063        .21798        .90686E-05   -.17200E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 0.171418
  alpha      = 4.82778
  Normalizat = 0.840489
  Prefactor  = 1.20633
 **********
 **   18 **HESSE 
 **********

 FCN=   5605.161     FROM HESSE     STATUS=OK            25 CALLS      520 TOTAL
                     EDM=   .22E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .17142        1.5213        .46292E-05   -1.5625    
   2  alpha         4.8278        4.3641        .10420E-02    7.4806    
   3  Normalizat    .84049        .23293        .41945E-06   -.98584    
   4  Prefactor     1.2063        .22172        .18137E-05   -.86137    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.20036e-10
Minuit parameter uncertainties:
  1  1.02106
  2  3.41425
  3  0.233206
  4  0.221896
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/496444': 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) = 5605.16120388
delta logL = 0.110010813443

Extracting fit parameters...

4FGL J1321.1+2216
   Spectrum: LogParabola
324         norm:  1.714e-01  1.021e+00  1.000e-04  1.000e+04 ( 1.000e-12)
325        alpha:  4.828e+00  3.414e+00  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:  1.206e+00  2.219e-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:  8.405e-01  2.332e-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  0.000e+00 [aplpy.core]
INFO: Auto-setting vmax to  0.000e+00 [aplpy.core]
Saving /scratch/kocevski/496444/cmap_HighResolution_357004801_357264001_4FGL_J1321.1+2216_daily_bin454.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='2.46e-05', job_status='DONE', photon_flux_upper_limit='6.83e-08', time_completed='2021-09-07 13:23:05.795586', job_id='496444', GAL2='1.21', fit_tolerance='1e-08', EG2='0.84', EG='0.88', time_epoch_completed='1631046185.8', return_code2='0', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.18', dlogl='1.10e-01', ts2='0.26', photon_index_error='0.00', photon_index='2.28' WHERE bin_id='454' AND source_name='4FGL J1321.1+2216' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Tue Sep  7 13:23:05 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0076>
Subject: Job 496444: <4FGL_J1321.1+2216_daily_bin454> in cluster <slac> Done

Job <4FGL_J1321.1+2216_daily_bin454> was submitted from host <rhel6-64n> by user <kocevski> in cluster <slac> at Tue Sep  7 13:10:44 2021
Job was executed on host(s) <bullet0076>, in queue <medium>, as user <kocevski> in cluster <slac> at Tue Sep  7 13:13: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:13:01 2021
Terminated at Tue Sep  7 13:23:06 2021
Results reported at Tue Sep  7 13:23:06 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1321.1+2216_daily_bin454 200.296 22.2808 357004801 357264001 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 :                                   572.00 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             326.62 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   605 sec.
    Turnaround time :                            742 sec.

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

