/nfs/farm/g/glast/g/LCRepository/bin/miniconda2/envs/fermitools_v1.0.5/lib/python2.7/site-packages/matplotlib/font_manager.py:281: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment.
  'Matplotlib is building the font cache using fc-list. '
/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 72 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 = 7458
number of fields = 30
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J1221.5+2814_daily_bin1340
RA = 185.378, Dec = 28.2382
tmin = 586656001, tmax = 586915201
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='532407', job_status='RUN', time_executed='2021-09-05 10:02:30.268819', time_epoch_executed='1630861350.27' WHERE source_name='4FGL J1221.5+2814' and cadence='daily' and bin_id='1340'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/532407

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/532407/ft1_4FGL_J1221.5+2814_daily_bin1340.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/532407/ft2_4FGL_J1221.5+2814_daily_bin1340.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/532407/ft1_4FGL_J1221.5+2814_daily_bin1340.fits outfile=/scratch/kocevski/532407/ft1_filteredMKT_4FGL_J1221.5+2814_daily_bin1340.fits ra=185.378 dec=28.2382 rad=12.0 tmin=586656001.0 tmax=586915201.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.63
user 3.42
sys 0.20

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/532407/ft2_4FGL_J1221.5+2814_daily_bin1340.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/532407/ft2_4FGL_J1221.5+2814_daily_bin1340.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/532407/ft1_filteredMKT_4FGL_J1221.5+2814_daily_bin1340.fits evtable="EVENTS" outfile="/scratch/kocevski/532407/ft1_filtered_4FGL_J1221.5+2814_daily_bin1340.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.48
user 0.33
sys 0.15

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/532407/ft1_filtered_4FGL_J1221.5+2814_daily_bin1340.fits" evtable="EVENTS" scfile=/scratch/kocevski/532407/ft2_4FGL_J1221.5+2814_daily_bin1340.fits sctable="SC_DATA" outfile=/scratch/kocevski/532407/ltcube_586656001_586915201_4FGL_J1221.5+2814_daily_bin1340.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/532407/ft2_4FGL_J1221.5+2814_daily_bin1340.fits
.....................!
real 11.72
user 11.30
sys 0.32

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/532407/ft1_filtered_4FGL_J1221.5+2814_daily_bin1340.fits evtable="EVENTS" scfile=/scratch/kocevski/532407/ft2_4FGL_J1221.5+2814_daily_bin1340.fits sctable="SC_DATA" expcube=/scratch/kocevski/532407/ltcube_586656001_586915201_4FGL_J1221.5+2814_daily_bin1340.fits outfile=/scratch/kocevski/532407/expmap_586656001_586915201_4FGL_J1221.5+2814_daily_bin1340.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/532407/ltcube_586656001_586915201_4FGL_J1221.5+2814_daily_bin1340.fits
.....................!
real 191.02
user 185.71
sys 4.76

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

Setting source of interest to:
4FGL J1221.5+2814 @ 185.378 28.2382

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/532407/ft1_filtered_4FGL_J1221.5+2814_daily_bin1340.fits scfile=/scratch/kocevski/532407/ft2_4FGL_J1221.5+2814_daily_bin1340.fits outfile=/scratch/kocevski/532407/cmap_586656001_586915201_4FGL_J1221.5+2814_daily_bin1340.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=185.378 yref=28.2382 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.55
user 0.35
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/532407/ft1_filtered_4FGL_J1221.5+2814_daily_bin1340.fits scfile=/scratch/kocevski/532407/ft2_4FGL_J1221.5+2814_daily_bin1340.fits outfile=/scratch/kocevski/532407/cmap_HighResolution_586656001_586915201_4FGL_J1221.5+2814_daily_bin1340.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=185.378 yref=28.2382 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.55
user 0.38
sys 0.14

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/532407/ft1_filtered_4FGL_J1221.5+2814_daily_bin1340.fits evtable="EVENTS" scfile=/scratch/kocevski/532407/ft2_4FGL_J1221.5+2814_daily_bin1340.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/532407/Model_4FGL_J1221.5+2814_daily_bin1340.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/532407/ft1_filtered_4FGL_J1221.5+2814_daily_bin1340.fits.....................!
real 51.50
user 50.20
sys 1.19

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/532407/ft1_filtered_4FGL_J1221.5+2814_daily_bin1340.fits', '/scratch/kocevski/532407/ft2_4FGL_J1221.5+2814_daily_bin1340.fits', expMap='/scratch/kocevski/532407/expmap_586656001_586915201_4FGL_J1221.5+2814_daily_bin1340.fits', expCube='/scratch/kocevski/532407/ltcube_586656001_586915201_4FGL_J1221.5+2814_daily_bin1340.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/532407/Model_4FGL_J1221.5+2814_daily_bin1340.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1221.5+2814'

4FGL J1221.5+2814
   Spectrum: PowerLaw
324    Prefactor:  3.206e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-12)
325        Index:  2.153e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
326        Scale:  1.082e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/532407/ft1_filtered_4FGL_J1221.5+2814_daily_bin1340.fits
Spacecraft file(s): /scratch/kocevski/532407/ft2_4FGL_J1221.5+2814_daily_bin1340.fits
Exposure map: /scratch/kocevski/532407/expmap_586656001_586915201_4FGL_J1221.5+2814_daily_bin1340.fits
Exposure cube: /scratch/kocevski/532407/ltcube_586656001_586915201_4FGL_J1221.5+2814_daily_bin1340.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/532407/Model_4FGL_J1221.5+2814_daily_bin1340.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) = 5846.69532508

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10178E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    .14148E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    26.412       1.0000         .10000E-03   10000.    
     5 'Prefactor '    4.4202       1.0000         .10000E-03   10000.    
     6 'Prefactor '    57.586       1.0000         .10000E-03   10000.    
     7 'norm      '    1.5489       1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    10.611       1.0000         .10000E-03   10000.    
    10 'Prefactor '    1.0621       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    12 'norm      '    5.5291       1.0000         .10000E-03   10000.    
    13 'Prefactor '    6.2367       1.0000         .10000E-03   10000.    
    14 'Prefactor '    4.0198       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    5.5138       1.0000         .10000E-03   10000.    
    17 'norm      '    .78378E-01   1.0000         .10000E-03   10000.    
    18 'norm      '    10.635       1.0000         .10000E-03   10000.    
    19 'Prefactor '    13.908       1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10050E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    27.751       1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    12.032       1.0000         .10000E-03   10000.    
    24 'norm      '    2.5869       1.0000         .10000E-03   10000.    
    25 'Prefactor '    20.581       1.0000         .10000E-03   10000.    
    26 'norm      '    1.6881       1.0000         .10000E-03   10000.    
    27 'norm      '    12.415       1.0000         .10000E-03   10000.    
    28 'norm      '    3.3467       1.0000         .10000E-03   10000.    
    29 'Normalizat'    .97227       1.0000         .10000E-01   10.000    
    30 'Prefactor '    .90018       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6240E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   5846.628     FROM MIGRAD    STATUS=CONVERGED    765 CALLS     3951 TOTAL
                     EDM=   .86E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.9%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    22.543       -.50087E-06** at limit **
   2  Prefactor     .10000E-03    4.5791        .34244E-06** at limit **
   3  Prefactor     .10000E-03    9.0917       -.11562E-05** at limit **
   4  Prefactor     26.402        28.964        .67198E-06    .20327E-04
   5  Prefactor     4.4194        2.7179       -.69137E-07   -.64924E-04
   6  Prefactor     57.565        43.122        .71645E-05    .18180E-03
   7  norm          1.5486        1.2728       -.41977E-07   -.12577E-03
   8  Prefactor     .10000E-03    5.0957        .32583E-06** at limit **
   9  Prefactor     10.544        38.404       -.87372E-05   -.31103E-04
  10  Prefactor     1.0610        2.9669        .42967E-07   -.23190E-03
  11  Prefactor     .10000E-03    1.3720       -.47541E-07** at limit **
  12  norm          5.5291        2.9529        .37820E-07    .48572E-04
  13  Prefactor     6.2362        7.8355       -.88623E-06   -.93803E-04
  14  Prefactor     4.0198        2.5436       -.49383E-08    .13648E-04
  15  Prefactor     .10000E-03    1.1249       -.15276E-06** at limit **
  16  Prefactor     5.5135        5.7350        .18417E-07   -.29180E-04
  17  norm          .78455E-01    .17118       -.62940E-07   -.13065E-02
  18  norm          10.634        5.6039        .12471E-07    .23047E-05
  19  Prefactor     13.908        10.223        .32502E-06    .31366E-04
  20  Prefactor     .10000E-03    8.0597       -.14961E-06** at limit **
  21  Prefactor     27.741        47.483       -.71673E-05   -.64185E-04
  22  Prefactor     .10000E-03    2.5074       -.24046E-07** at limit **
  23  Prefactor     12.032        9.3429        .81602E-06    .54305E-04
  24  norm          2.5867        3.3398        .13309E-06   -.17482E-04
  25  Prefactor     20.579        23.354       -.98072E-06   -.32947E-04
  26  norm          1.6884        3.2333        .32131E-07   -.15326E-03
  27  norm          12.414        6.0556       -.17791E-06   -.12857E-04
  28  norm          3.3471        4.2418        .11665E-05   -.16806E-02
  29  Normalizat    .97250        .20039       -.12336E-05    .10309E-03
  30  Prefactor     .89993        .20486        .78395E-06   -.27161E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.000100001
  Prefactor  = 26.4022
  Prefactor  = 4.41939
  Prefactor  = 57.5648
  norm       = 1.54865
  Prefactor  = 0.0001
  Prefactor  = 10.5436
  Prefactor  = 1.06097
  Prefactor  = 0.0001
  norm       = 5.52909
  Prefactor  = 6.23623
  Prefactor  = 4.01979
  Prefactor  = 0.0001
  Prefactor  = 5.5135
  norm       = 0.0784551
  norm       = 10.6342
  Prefactor  = 13.9078
  Prefactor  = 0.0001
  Prefactor  = 27.7413
  Prefactor  = 0.0001
  Prefactor  = 12.0321
  norm       = 2.58665
  Prefactor  = 20.579
  norm       = 1.68843
  norm       = 12.4137
  norm       = 3.34712
  Normalizat = 0.972495
  Prefactor  = 0.899925
 **********
 **   18 **HESSE 
 **********

 FCN=   5846.628     FROM HESSE     STATUS=OK           598 CALLS     4549 TOTAL
                     EDM=   .62E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    22.739        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    4.5798        .15975E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .10000E-03    9.3837        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     26.402        29.028        .77949E-04   -1.4680    
   5  Prefactor     4.4194        2.7075        .86738E-04   -1.5287    
   6  Prefactor     57.565        43.446        .52865E-04   -1.4189    
   7  norm          1.5486        1.2553        .73309E-04   -1.5459    
   8  Prefactor     .10000E-03    5.2377        .33599E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     10.544        38.439        .12300E-03   -1.5058    
  10  Prefactor     1.0610        2.9356        .20403E-03   -1.5502    
  11  Prefactor     .10000E-03    1.3778        .87216E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm          5.5291        2.9611        .89437E-04   -1.5238    
  13  Prefactor     6.2362        7.8256        .16074E-03   -1.5208    
  14  Prefactor     4.0198        2.5486        .90281E-04   -1.5307    
  15  Prefactor     .10000E-03    1.1688        .15812E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     5.5135        5.7232        .17111E-03   -1.5238    
  17  norm          .78455E-01    .14808        .43776E-03   -1.5652    
  18  norm          10.634        5.6015        .12087E-03   -1.5056    
  19  Prefactor     13.908        10.214        .10740E-03   -1.4962    
  20  Prefactor     .10000E-03    8.0628        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     27.741        47.525        .76050E-04   -1.4654    
  22  Prefactor     .10000E-03    2.5157        .11823E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     12.032        9.3300        .11549E-03   -1.5014    
  24  norm          2.5867        3.3260        .15213E-03   -1.5386    
  25  Prefactor     20.579        23.383        .88289E-04   -1.4800    
  26  norm          1.6884        3.2103        .18286E-03   -1.5448    
  27  norm          12.414        7.0840        .11369E-03   -1.5003    
  28  norm          3.3471        8.4120        .11062E-02   -1.5342    
  29  Normalizat    .97250        .23865        .25519E-03   -.93958    
  30  Prefactor     .89993        .24474        .29012E-03   -.96144    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.23587e-09
Minuit parameter uncertainties:
  1  7.24461e-05
  2  4.26122e-06
  3  0.000178539
  4  29.0438
  5  2.70762
  6  43.4704
  7  1.25534
  8  1.38047e-05
  9  38.5298
  10  2.93599
  11  1.30673e-06
  12  2.96116
  13  7.8269
  14  2.54869
  15  1.99598e-07
  16  5.72372
  17  0.148079
  18  5.60181
  19  10.2151
  20  1.08554e-05
  21  47.5896
  22  1.4191e-06
  23  9.33111
  24  3.32622
  25  23.3939
  26  3.21063
  27  7.08444
  28  8.41494
  29  0.238916
  30  0.24504
Done.

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

Extracting fit parameters...

4FGL J1221.5+2814
   Spectrum: PowerLaw
324    Prefactor:  1.000e-04  1.996e-07  1.000e-04  1.000e+04 ( 1.000e-12)
325        Index:  2.153e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
326        Scale:  1.082e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
621    Prefactor:  8.999e-01  2.450e-01  0.000e+00  1.000e+01 ( 1.000e+00)
622        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
623        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
620   Normalization:  9.725e-01  2.389e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 185.378 28.238
Photon Flux Upper Limit: 5.79e-08 ph cm-2 s-1
Energy Flux Upper Limit: 4.39e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/532407/likelihoodResults_586656001_586915201_4FGL_J1221.5+2814_daily_bin1340.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) = 5846.63165371
delta logL = -0.00406252751964

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 5846.62759135
delta logL = -1.68826773006e-07

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10014E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.1433       1.0000          .0000       10.000    
     3 'Normalizat'    .97253       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .89997       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6240E+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=   5846.628     FROM MIGRAD    STATUS=FAILED        89 CALLS      239 TOTAL
                     EDM=   .39E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10022E-03    100.26        .15880E-03** at limit **
   2  Index         2.1196        5.9782        .50000        .51969E-04
   3  Normalizat    .97249        .46303E-01    .25519E-03    .80013E-04
   4  Prefactor     .89993        .51053E-01    .29012E-03    .67871E-04
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   5846.628     FROM SIMPLEX   STATUS=UNCHANGED    149 CALLS      388 TOTAL
                     EDM=   .19E-04    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10022E-03    100.26        .22886E-03** at limit **
   2  Index         2.1196        5.9782        .74397E-04    .51969E-04
   3  Normalizat    .97249        .46303E-01    .15688E-05    .80013E-04
   4  Prefactor     .89993        .51053E-01    .13133E-05    .67871E-04
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   5846.628     FROM MIGRAD    STATUS=CONVERGED     44 CALLS      432 TOTAL
                     EDM=   .45E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    2.7268        .31760E-04** at limit **
   2  Index         2.0278        5.9839        .50000        .48317E-06
   3  Normalizat    .97249        .21605        .10207E-04   -.22275E-05
   4  Prefactor     .89993        .23820        .11605E-04   -.25471E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 2.02783
  Normalizat = 0.972494
  Prefactor  = 0.899927
 **********
 **   18 **HESSE 
 **********

 FCN=   5846.628     FROM HESSE     STATUS=OK            29 CALLS      461 TOTAL
                     EDM=   .20E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    1.2262        .63519E-05   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.0278        7.3874        .50000       -.63656    
   3  Normalizat    .97249        .21609        .20415E-05   -.93958    
   4  Prefactor     .89993        .23820        .23209E-05   -.96144    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.96844e-11
Minuit parameter uncertainties:
  1  1.71242e-07
  2  36.8178
  3  0.216283
  4  0.238472
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/532407': 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) = 5846.62759011
delta logL = 1.06738752947e-06

Extracting fit parameters...

4FGL J1221.5+2814
   Spectrum: PowerLaw
324    Prefactor:  1.000e-04  1.712e-07  1.000e-04  1.000e+04 ( 1.000e-12)
325        Index:  2.028e+00  3.682e+01  0.000e+00  1.000e+01 (-1.000e+00)
326        Scale:  1.082e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
621    Prefactor:  8.999e-01  2.385e-01  0.000e+00  1.000e+01 ( 1.000e+00)
622        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
623        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
620   Normalization:  9.725e-01  2.163e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 185.378 28.238

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/532407/cmap_HighResolution_586656001_586915201_4FGL_J1221.5+2814_daily_bin1340.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='4.39e-03', job_status='DONE', photon_flux_upper_limit='5.79e-08', time_completed='2021-09-05 10:17:03.447356', job_id='532407', GAL2='0.90', fit_tolerance='1e-08', EG2='0.97', EG='0.97', time_epoch_completed='1630862223.45', return_code2='0', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.90', dlogl='1.07e-06', ts2='-0.00', photon_index_error='0.00', photon_index='2.15' WHERE bin_id='1340' AND source_name='4FGL J1221.5+2814' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sun Sep  5 10:17:03 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0239>
Subject: Job 532407: <4FGL_J1221.5+2814_daily_bin1340> in cluster <slac> Done

Job <4FGL_J1221.5+2814_daily_bin1340> was submitted from host <rhel6-64m> by user <kocevski> in cluster <slac> at Sun Sep  5 10:00:56 2021
Job was executed on host(s) <bullet0239>, in queue <medium>, as user <kocevski> in cluster <slac> at Sun Sep  5 10:00:58 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Sun Sep  5 10:00:58 2021
Terminated at Sun Sep  5 10:17:03 2021
Results reported at Sun Sep  5 10:17:03 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1221.5+2814_daily_bin1340 185.378 28.2382 586656001 586915201 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1221.5+2814 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   866.00 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             301.61 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   965 sec.
    Turnaround time :                            967 sec.

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

