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


Performing analysis on: 4FGL_J1221.5+2814_daily_bin5
RA = 185.378, Dec = 28.2382
tmin = 240624001, tmax = 240883201
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='524667', job_status='RUN', time_executed='2021-09-05 09:37:27.170297', time_epoch_executed='1630859847.17' WHERE source_name='4FGL J1221.5+2814' and cadence='daily' and bin_id='5'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/524667

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

Retrieving the FT1 file...

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

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

Retrieving 44 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/524667/ft1_4FGL_J1221.5+2814_daily_bin5.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/524667/ft2_4FGL_J1221.5+2814_daily_bin5.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/524667/ft1_4FGL_J1221.5+2814_daily_bin5.fits outfile=/scratch/kocevski/524667/ft1_filteredMKT_4FGL_J1221.5+2814_daily_bin5.fits ra=185.378 dec=28.2382 rad=12.0 tmin=240624001.0 tmax=240883201.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.37
user 1.20
sys 0.15

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/524667/ft1_filtered_4FGL_J1221.5+2814_daily_bin5.fits" evtable="EVENTS" scfile=/scratch/kocevski/524667/ft2_4FGL_J1221.5+2814_daily_bin5.fits sctable="SC_DATA" outfile=/scratch/kocevski/524667/ltcube_240624001_240883201_4FGL_J1221.5+2814_daily_bin5.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/524667/ft2_4FGL_J1221.5+2814_daily_bin5.fits
.....................!
real 12.81
user 12.37
sys 0.33

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/524667/ft1_filtered_4FGL_J1221.5+2814_daily_bin5.fits evtable="EVENTS" scfile=/scratch/kocevski/524667/ft2_4FGL_J1221.5+2814_daily_bin5.fits sctable="SC_DATA" expcube=/scratch/kocevski/524667/ltcube_240624001_240883201_4FGL_J1221.5+2814_daily_bin5.fits outfile=/scratch/kocevski/524667/expmap_240624001_240883201_4FGL_J1221.5+2814_daily_bin5.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/524667/ltcube_240624001_240883201_4FGL_J1221.5+2814_daily_bin5.fits
.....................!
real 191.26
user 185.39
sys 4.58

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/524667/ft1_filtered_4FGL_J1221.5+2814_daily_bin5.fits scfile=/scratch/kocevski/524667/ft2_4FGL_J1221.5+2814_daily_bin5.fits outfile=/scratch/kocevski/524667/cmap_240624001_240883201_4FGL_J1221.5+2814_daily_bin5.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.54
user 0.37
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/524667/ft1_filtered_4FGL_J1221.5+2814_daily_bin5.fits scfile=/scratch/kocevski/524667/ft2_4FGL_J1221.5+2814_daily_bin5.fits outfile=/scratch/kocevski/524667/cmap_HighResolution_240624001_240883201_4FGL_J1221.5+2814_daily_bin5.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.15

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

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/524667/ft1_filtered_4FGL_J1221.5+2814_daily_bin5.fits', '/scratch/kocevski/524667/ft2_4FGL_J1221.5+2814_daily_bin5.fits', expMap='/scratch/kocevski/524667/expmap_240624001_240883201_4FGL_J1221.5+2814_daily_bin5.fits', expCube='/scratch/kocevski/524667/ltcube_240624001_240883201_4FGL_J1221.5+2814_daily_bin5.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/524667/Model_4FGL_J1221.5+2814_daily_bin5.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/524667/ft1_filtered_4FGL_J1221.5+2814_daily_bin5.fits
Spacecraft file(s): /scratch/kocevski/524667/ft2_4FGL_J1221.5+2814_daily_bin5.fits
Exposure map: /scratch/kocevski/524667/expmap_240624001_240883201_4FGL_J1221.5+2814_daily_bin5.fits
Exposure cube: /scratch/kocevski/524667/ltcube_240624001_240883201_4FGL_J1221.5+2814_daily_bin5.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/524667/Model_4FGL_J1221.5+2814_daily_bin5.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) = 5734.87096044

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .75739E-02   1.0000         .10000E-03   10000.    
     2 'Prefactor '    2.4017       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    5.2341       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10113E-03   1.0000         .10000E-03   10000.    
     7 'norm      '    2.1098       1.0000         .10000E-03   10000.    
     8 'Prefactor '    4.2232       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    1.8960       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    12 'norm      '    3.1647       1.0000         .10000E-03   10000.    
    13 'Prefactor '    4.9743       1.0000         .10000E-03   10000.    
    14 'Prefactor '    3.5953       1.0000         .10000E-03   10000.    
    15 'Prefactor '    6.7289       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .36161E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    .46102       1.0000         .10000E-03   10000.    
    18 'norm      '    .20058E-01   1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10011E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10027E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    24 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    25 'Prefactor '    .10025E-03   1.0000         .10000E-03   10000.    
    26 'norm      '    .32790       1.0000         .10000E-03   10000.    
    27 'norm      '    49.889       1.0000         .10000E-03   10000.    
    28 'norm      '    6.0518       1.0000         .10000E-03   10000.    
    29 'Normalizat'    1.0166       1.0000         .10000E-01   10.000    
    30 'Prefactor '    .97060       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=   5734.601     FROM MIGRAD    STATUS=FAILED      1407 CALLS     4034 TOTAL
                     EDM=   .22E-07    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10023E-03    155.70        .60464E-02** at limit **
   2  Prefactor     2.3805        17.872        .26421E-03   -.56755E-04
   3  Prefactor     .10000E-03    4.3211        .15216E-02** at limit **
   4  Prefactor     5.2322        18.899        .17570E-03   -.48918E-04
   5  Prefactor     .10000E-03    1.4064        .17144E-03** at limit **
   6  Prefactor     .10000E-03    19.173        .18142E-02** at limit **
   7  norm          2.1098        1.3154        .65452E-04   -.82331E-04
   8  Prefactor     4.2244        4.5439        .15729E-03    .16190E-04
   9  Prefactor     .10000E-03    13.753        .18142E-02** at limit **
  10  Prefactor     1.8970        2.3669        .12480E-03    .58120E-04
  11  Prefactor     .10000E-03    1.7955        .19474E-03** at limit **
  12  norm          3.1651        4.2382        .14402E-03    .19553E-03
  13  Prefactor     4.9742        6.0321        .18032E-03    .46026E-05
  14  Prefactor     3.5947        3.6217        .11553E-03   -.53436E-04
  15  Prefactor     6.7282        3.3107        .87178E-04    .44078E-04
  16  Prefactor     .10000E-03    12.145        .33376E-02** at limit **
  17  norm          .46109        .21616        .23153E-04   -.10803E-03
  18  norm          .62046E-01    67.555        .23276E-02    .85076E-03
  19  Prefactor     .10000E-03    9.1958        .18142E-02** at limit **
  20  Prefactor     .10000E-03    14.737        .18142E-02** at limit **
  21  Prefactor     .10000E-03    16.500        .18142E-02** at limit **
  22  Prefactor     .10000E-03    2.6848        .12074E-02** at limit **
  23  Prefactor     .10000E-03    3.2193        .13217E-02** at limit **
  24  norm          .10000E-03    3.0267        .12749E-02** at limit **
  25  Prefactor     .10000E-03    49.632        .18142E-02** at limit **
  26  norm          .33009        6.0619        .23962E-02   -.22052E-03
  27  norm          49.893        10.434        .56776E-04   -.92950E-04
  28  norm          6.0495        13.133        .16321E-03    .10518E-04
  29  Normalizat    1.0166        .21732        .24630E-03   -.20992E-03
  30  Prefactor     .97037        .23498        .28614E-03   -.17367E-03
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   5734.601     FROM SIMPLEX   STATUS=UNCHANGED   1651 CALLS     5685 TOTAL
                     EDM=   .19E-04    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10023E-03    155.70        .17689E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     2.3805        17.872        .26070E-05   -1.5399    
   3  Prefactor     .10000E-03    4.3211        .26933E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     5.2322        18.899        .26057E-05   -1.5250    
   5  Prefactor     .10000E-03    1.4064        .18906E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    19.173        .29349E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  norm          2.1098        1.3154        .26322E-05   -1.5417    
   8  Prefactor     4.2244        4.5439        .26116E-05   -1.5297    
   9  Prefactor     .10000E-03    13.753        .14218E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     1.8970        2.3669        .26347E-05   -1.5433    
  11  Prefactor     .10000E-03    1.7955        .20596E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm          3.1651        4.2382        .26209E-05   -1.5352    
  13  Prefactor     4.9742        6.0321        .26054E-05   -1.5262    
  14  Prefactor     3.5947        3.6217        .26170E-05   -1.5329    
  15  Prefactor     6.7282        3.3107        .25931E-05   -1.5189    
  16  Prefactor     .10000E-03    12.145        .23089E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .46109        .21616        .26586E-05   -1.5572    
  18  norm          .62046E-01    67.555        .26683E-05   -1.5658    
  19  Prefactor     .10000E-03    9.1958        .27590E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10000E-03    14.737        .16460E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .10000E-03    16.500        .75890E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     .10000E-03    2.6848        .10563E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10000E-03    3.2193        .14739E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  norm          .10000E-03    3.0267        .14054E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     .10000E-03    49.632        .87833E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  norm          .33009        6.0619        .26622E-05   -1.5593    
  27  norm          49.893        10.434        .24405E-05   -1.4294    
  28  norm          6.0495        13.133        .25979E-05   -1.5216    
  29  Normalizat    1.0166        .21732        .15789E-05   -.92475    
  30  Prefactor     .97037        .23498        .16002E-05   -.93724    
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   5734.601     FROM MIGRAD    STATUS=CONVERGED    565 CALLS     6250 TOTAL
                     EDM=   .17E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    157.25        .24186E-03** at limit **
   2  Prefactor     2.3804        17.461        .10568E-04   -.70782E-04
   3  Prefactor     .10000E-03    4.3234        .30431E-03** at limit **
   4  Prefactor     5.2322        18.890        .70279E-05   -.19412E-05
   5  Prefactor     .10000E-03    1.4064        .34287E-04** at limit **
   6  Prefactor     .10000E-03    19.176        .36285E-03** at limit **
   7  norm          2.1098        1.3151        .26181E-05    .13896E-04
   8  Prefactor     4.2244        4.5423        .62917E-05    .16262E-04
   9  Prefactor     .10000E-03    13.754        .36285E-03** at limit **
  10  Prefactor     1.8970        2.3665        .49919E-05    .13665E-04
  11  Prefactor     .10000E-03    1.7955        .38948E-04** at limit **
  12  norm          3.1650        4.2378        .57607E-05    .39470E-04
  13  Prefactor     4.9742        6.0313        .72126E-05    .34677E-05
  14  Prefactor     3.5947        3.6218        .46210E-05    .52156E-04
  15  Prefactor     6.7282        3.3070        .34871E-05    .32667E-03
  16  Prefactor     .10000E-03    12.182        .66752E-03** at limit **
  17  norm          .46109        .21610        .92610E-06    .73736E-03
  18  norm          .61495E-01    70.080        .93103E-03    .43165E-04
  19  Prefactor     .10000E-03    9.1980        .36285E-03** at limit **
  20  Prefactor     .10000E-03    14.739        .36285E-03** at limit **
  21  Prefactor     .10000E-03    16.500        .36285E-03** at limit **
  22  Prefactor     .10000E-03    2.6851        .24147E-03** at limit **
  23  Prefactor     .10000E-03    3.2198        .26433E-03** at limit **
  24  norm          .10000E-03    3.0278        .25498E-03** at limit **
  25  Prefactor     .10000E-03    49.676        .36285E-03** at limit **
  26  norm          .33013        6.0529        .95847E-04   -.28467E-05
  27  norm          49.893        10.431        .11355E-04    .13015E-04
  28  norm          6.0495        13.130        .65285E-05    .69656E-06
  29  Normalizat    1.0166        .21721        .49259E-04    .13589E-03
  30  Prefactor     .97037        .23495        .11445E-04    .13966E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 2.38041
  Prefactor  = 0.0001
  Prefactor  = 5.23219
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 2.10984
  Prefactor  = 4.2244
  Prefactor  = 0.0001
  Prefactor  = 1.89696
  Prefactor  = 0.0001
  norm       = 3.16502
  Prefactor  = 4.97417
  Prefactor  = 3.5947
  Prefactor  = 6.72822
  Prefactor  = 0.000100001
  norm       = 0.46109
  norm       = 0.0614953
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 0.330128
  norm       = 49.8929
  norm       = 6.04952
  Normalizat = 1.01665
  Prefactor  = 0.970375
 **********
 **   18 **HESSE 
 **********

 FCN=   5734.601     FROM HESSE     STATUS=OK           558 CALLS     6808 TOTAL
                     EDM=   .17E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    157.26        .48371E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     2.3804        17.509        .21137E-05   -1.5399    
   3  Prefactor     .10000E-03    4.3235        .60863E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     5.2322        18.915        .14056E-05   -1.5250    
   5  Prefactor     .10000E-03    1.4064        .68574E-05   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    19.177        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  norm          2.1098        1.3154        .52362E-06   -1.5417    
   8  Prefactor     4.2244        4.5423        .12583E-05   -1.5297    
   9  Prefactor     .10000E-03    13.754        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     1.8970        2.3666        .99838E-06   -1.5433    
  11  Prefactor     .10000E-03    1.7955        .77897E-05   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm          3.1650        4.2374        .11521E-05   -1.5352    
  13  Prefactor     4.9742        6.0310        .14425E-05   -1.5262    
  14  Prefactor     3.5947        3.6213        .92420E-06   -1.5329    
  15  Prefactor     6.7282        3.3055        .69743E-06   -1.5189    
  16  Prefactor     .10000E-03    12.184        .13350E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .46109        .21608        .37127E-06   -1.5572    
  18  norm          .61495E-01    69.940        .37241E-04   -1.5658    
  19  Prefactor     .10000E-03    9.1981        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10000E-03    14.739        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .10000E-03    16.500        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     .10000E-03    2.6851        .48294E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10000E-03    3.2199        .52866E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  norm          .10000E-03    3.0278        .50995E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     .10000E-03    49.678        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  norm          .33013        6.0521        .38339E-05   -1.5593    
  27  norm          49.893        10.437        .22710E-05   -1.4294    
  28  norm          6.0495        13.148        .13057E-05   -1.5216    
  29  Normalizat    1.0166        .21743        .98518E-05   -.92475    
  30  Prefactor     .97037        .23518        .22891E-05   -.93724    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.67979e-10
Minuit parameter uncertainties:
  1  0.000389183
  2  12.9167
  3  1.38172e-06
  4  18.937
  5  6.97316e-08
  6  3.44597e-06
  7  1.31542
  8  4.54265
  9  1.28166e-06
  10  2.36674
  11  4.8998e-08
  12  4.23776
  13  6.03177
  14  3.62153
  15  3.30561
  16  0.000183445
  17  0.216081
  18  4.14925
  19  2.55258e-06
  20  2.1985e-06
  21  3.19332e-07
  22  3.43924e-07
  23  4.48217e-07
  24  6.59137e-07
  25  1.15709e-05
  26  2.82689
  27  10.4376
  28  13.1542
  29  0.217616
  30  0.235429
Done.

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

Extracting fit parameters...

4FGL J1221.5+2814
   Spectrum: PowerLaw
324    Prefactor:  6.728e+00  3.306e+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

GAL_V02
   Spectrum: PowerLaw
621    Prefactor:  9.704e-01  2.354e-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:  1.017e+00  2.176e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 11.06
Ra Dec: 185.378 28.238
Photon Index (Fixed Index): 2.15 +/- 0.00
Photon Flux (Fixed Index): 9.85e-08 +/- 4.84e-08
Energy Flux (Fixed Index): 4.84e-05 +/- 2.38e-05

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) = 5734.6003197
delta logL = 0.000405604889238

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5734.6001866
delta logL = 0.000538707471605

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    6.7103       1.0000         .10000E-03   10000.    
     2 'Index     '    2.1724       1.0000          .0000       10.000    
     3 'Normalizat'    1.0137       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .97201       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.

 FCN=   5734.600     FROM MIGRAD    STATUS=CONVERGED     54 CALLS      227 TOTAL
                     EDM=   .11E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     6.7055        53.940        .38725E-02    .13164E-03
   2  Index         2.1711        6.0372        .11515        .10752E-03
   3  Normalizat    1.0139        .19571        .44503E-01    .11276E-04
   4  Prefactor     .97201        .10084        .45916E-01    .11384E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 6.70547
  Index      = 2.17111
  Normalizat = 1.01391
  Prefactor  = 0.972012
 **********
 **   18 **HESSE 
 **********

 FCN=   5734.600     FROM HESSE     STATUS=OK            33 CALLS      260 TOTAL
                     EDM=   .66E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     6.7055        3.2694        .86199E-04   -1.5190    
   2  Index         2.1711        .55262        .66317E-02   -.60138    
   3  Normalizat    1.0139        .22205        .24657E-03   -.92566    
   4  Prefactor     .97201        .23760        .28591E-03   -.93668    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.56712e-12
Minuit parameter uncertainties:
  1  3.26944
  2  0.55429
  3  0.222257
  4  0.237854
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/524667': 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) = 5734.60018108
delta logL = 0.000544226822967

Extracting fit parameters...

4FGL J1221.5+2814
   Spectrum: PowerLaw
324    Prefactor:  6.705e+00  3.269e+00  1.000e-04  1.000e+04 ( 1.000e-12)
325        Index:  2.171e+00  5.543e-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:  9.720e-01  2.379e-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:  1.014e+00  2.223e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 11.08
Ra Dec: 185.378 28.238
Photon Index (Free Index): 2.17 +/- 0.55
Photon Flux (Free Index): 1.01e-07 +/- 8.47e-08
Energy Flux (Free Index): 4.79e-05 +/- 2.85e-05

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/524667/cmap_HighResolution_240624001_240883201_4FGL_J1221.5+2814_daily_bin5.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='9.85e-08', energy_flux2='4.79e-05', photon_flux_error='4.84e-08', dlogl='5.44e-04', energy_flux='4.84e-05', photon_flux2='1.01e-07', job_status='DONE', time_completed='2021-09-05 09:52:51.944562', photon_index_error2='0.55', photon_index2='2.17', ts='11.06', fit_tolerance='1e-08', GAL='0.97', photon_index_error='0.00', energy_flux_error2='2.85e-05', EG='1.02', time_epoch_completed='1630860771.94', return_code='0', job_id='524667', GAL2='0.97', EG2='1.01', return_code2='0', energy_flux_error='2.38e-05', photon_flux_error2='8.47e-08', ts2='11.08', photon_index='2.15' WHERE bin_id='5' AND source_name='4FGL J1221.5+2814' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sun Sep  5 09:52:51 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0211>
Subject: Job 524667: <4FGL_J1221.5+2814_daily_bin5> in cluster <slac> Done

Job <4FGL_J1221.5+2814_daily_bin5> was submitted from host <rhel6-64k> by user <kocevski> in cluster <slac> at Sun Sep  5 09:36:17 2021
Job was executed on host(s) <bullet0211>, in queue <medium>, as user <kocevski> in cluster <slac> at Sun Sep  5 09:36:18 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Sun Sep  5 09:36:18 2021
Terminated at Sun Sep  5 09:52:52 2021
Results reported at Sun Sep  5 09:52:52 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1221.5+2814_daily_bin5 185.378 28.2382 240624001 240883201 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 :                                   921.07 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             321.94 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   994 sec.
    Turnaround time :                            995 sec.

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

