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


Performing analysis on: 4FGL_J1221.5+2814_daily_bin968
RA = 185.378, Dec = 28.2382
tmin = 490233601, tmax = 490492801
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='530556', job_status='RUN', time_executed='2021-09-05 09:55:56.362432', time_epoch_executed='1630860956.36' WHERE source_name='4FGL J1221.5+2814' and cadence='daily' and bin_id='968'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/530556

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/530556/ft1_4FGL_J1221.5+2814_daily_bin968.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/530556/ft2_4FGL_J1221.5+2814_daily_bin968.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/530556/ft1_4FGL_J1221.5+2814_daily_bin968.fits outfile=/scratch/kocevski/530556/ft1_filteredMKT_4FGL_J1221.5+2814_daily_bin968.fits ra=185.378 dec=28.2382 rad=12.0 tmin=490233601.0 tmax=490492801.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.73
user 3.46
sys 0.21

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/530556/ft1_filtered_4FGL_J1221.5+2814_daily_bin968.fits" evtable="EVENTS" scfile=/scratch/kocevski/530556/ft2_4FGL_J1221.5+2814_daily_bin968.fits sctable="SC_DATA" outfile=/scratch/kocevski/530556/ltcube_490233601_490492801_4FGL_J1221.5+2814_daily_bin968.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/530556/ft2_4FGL_J1221.5+2814_daily_bin968.fits
.....................!
real 12.40
user 11.87
sys 0.31

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/530556/ft1_filtered_4FGL_J1221.5+2814_daily_bin968.fits evtable="EVENTS" scfile=/scratch/kocevski/530556/ft2_4FGL_J1221.5+2814_daily_bin968.fits sctable="SC_DATA" expcube=/scratch/kocevski/530556/ltcube_490233601_490492801_4FGL_J1221.5+2814_daily_bin968.fits outfile=/scratch/kocevski/530556/expmap_490233601_490492801_4FGL_J1221.5+2814_daily_bin968.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/530556/ltcube_490233601_490492801_4FGL_J1221.5+2814_daily_bin968.fits
.....................!
real 192.28
user 185.84
sys 5.95

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/530556/ft1_filtered_4FGL_J1221.5+2814_daily_bin968.fits scfile=/scratch/kocevski/530556/ft2_4FGL_J1221.5+2814_daily_bin968.fits outfile=/scratch/kocevski/530556/cmap_490233601_490492801_4FGL_J1221.5+2814_daily_bin968.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.56
user 0.37
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/530556/ft1_filtered_4FGL_J1221.5+2814_daily_bin968.fits scfile=/scratch/kocevski/530556/ft2_4FGL_J1221.5+2814_daily_bin968.fits outfile=/scratch/kocevski/530556/cmap_HighResolution_490233601_490492801_4FGL_J1221.5+2814_daily_bin968.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.53
user 0.38
sys 0.13

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10071E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    14.462       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10025E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .11038E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10015E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    34.168       1.0000         .10000E-03   10000.    
     7 'norm      '    .82274       1.0000         .10000E-03   10000.    
     8 'Prefactor '    4.2406       1.0000         .10000E-03   10000.    
     9 'Prefactor '    71.608       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .74815       1.0000         .10000E-03   10000.    
    12 'norm      '    10.701       1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10418E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10012E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    9.0373       1.0000         .10000E-03   10000.    
    17 'norm      '    .46806       1.0000         .10000E-03   10000.    
    18 'norm      '    1.8088       1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    16.528       1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    .48100E-01   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    24 'norm      '    5.7879       1.0000         .10000E-03   10000.    
    25 'Prefactor '    .10049E-03   1.0000         .10000E-03   10000.    
    26 'norm      '    .10046E-03   1.0000         .10000E-03   10000.    
    27 'norm      '    6.2488       1.0000         .10000E-03   10000.    
    28 'norm      '    3.5355       1.0000         .10000E-03   10000.    
    29 'Normalizat'    1.2775       1.0000         .10000E-01   10.000    
    30 'Prefactor '    .78719       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=   5914.138     FROM MIGRAD    STATUS=CONVERGED    794 CALLS     3982 TOTAL
                     EDM=   .11E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.3%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    15.313        .17555E-06** at limit **
   2  Prefactor     14.459        13.014        .19477E-06   -.21570E-06
   3  Prefactor     .10000E-03    1.7069        .31290E-06** at limit **
   4  Prefactor     .10000E-03    36.035       -.31853E-06** at limit **
   5  Prefactor     .10000E-03    .91714       -.14885E-06** at limit **
   6  Prefactor     34.136        32.014       -.37068E-05    .36577E-04
   7  norm          .82278        1.2964        .73363E-06    .22104E-02
   8  Prefactor     4.2378        5.0847        .22352E-06    .99696E-04
   9  Prefactor     71.552        46.447        .10300E-05   -.50277E-04
  10  Prefactor     .10000E-03    2.1471       -.37276E-06** at limit **
  11  Prefactor     .74679        3.0137        .35548E-06   -.14717E-04
  12  norm          10.701        3.8202       -.59868E-07   -.10953E-03
  13  Prefactor     .10000E-03    3.9516        .17109E-06** at limit **
  14  Prefactor     .10000E-03    .78806       -.41911E-07** at limit **
  15  Prefactor     .10000E-03    .93639       -.12110E-06** at limit **
  16  Prefactor     9.0364        9.6419       -.27924E-05    .53368E-04
  17  norm          .46799        .26418        .74704E-08    .52160E-03
  18  norm          1.8079        4.9415        .78772E-05   -.96521E-04
  19  Prefactor     .10000E-03    5.7807       -.15354E-06** at limit **
  20  Prefactor     16.526        15.850       -.75168E-08    .10605E-04
  21  Prefactor     .10000E-03    28.314        .21231E-06** at limit **
  22  Prefactor     .15792E-01    7.3723       -.38574E-05    .51725E-03
  23  Prefactor     .10000E-03    2.3912       -.17187E-07** at limit **
  24  norm          5.7860        5.0984       -.15711E-06    .84689E-04
  25  Prefactor     .10000E-03    28.098        .37880E-06** at limit **
  26  norm          .10000E-03    1.9670        .12939E-05** at limit **
  27  norm          6.2467        8.6342        .35433E-06    .16320E-03
  28  norm          3.5377        13.065       -.36449E-06   -.83391E-05
  29  Normalizat    1.2779        .19924       -.30529E-05    .20326E-03
  30  Prefactor     .78686        .20533        .37053E-05    .37145E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 14.4591
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 34.1364
  norm       = 0.822783
  Prefactor  = 4.23775
  Prefactor  = 71.5516
  Prefactor  = 0.0001
  Prefactor  = 0.746786
  norm       = 10.7008
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 9.03637
  norm       = 0.467993
  norm       = 1.80794
  Prefactor  = 0.0001
  Prefactor  = 16.5265
  Prefactor  = 0.0001
  Prefactor  = 0.0157916
  Prefactor  = 0.0001
  norm       = 5.78601
  Prefactor  = 0.0001
  norm       = 0.000100001
  norm       = 6.24666
  norm       = 3.53774
  Normalizat = 1.27794
  Prefactor  = 0.786859
 **********
 **   18 **HESSE 
 **********

 FCN=   5914.138     FROM HESSE     STATUS=OK           598 CALLS     4580 TOTAL
                     EDM=   .31E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    15.363        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     14.459        13.008        .10532E-03   -1.4947    
   3  Prefactor     .10000E-03    1.7121        .98187E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    36.482        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    .93530        .71877E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     34.136        32.073        .68555E-04   -1.4539    
   7  norm          .82278        1.2018        .10343E-02   -1.5527    
   8  Prefactor     4.2378        5.0106        .17573E-03   -1.5296    
   9  Prefactor     71.552        46.473        .47441E-04   -1.4014    
  10  Prefactor     .10000E-03    3.6204        .20135E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .74679        2.8095        .23980E-03   -1.5535    
  12  norm          10.701        3.8120        .86103E-04   -1.5054    
  13  Prefactor     .10000E-03    3.9643        .14922E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10000E-03    .79153        .66603E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .10000E-03    .94537        .72622E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     9.0364        9.6818        .13332E-03   -1.5107    
  17  norm          .46799        .26185        .27791E-04   -1.5571    
  18  norm          1.8079        5.0128        .12382E-02   -1.5439    
  19  Prefactor     .10000E-03    5.8120        .18057E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     16.526        15.848        .98516E-04   -1.4895    
  21  Prefactor     .10000E-03    28.322        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     .15792E-01    8.7737        .57356E-01   -1.5683    
  23  Prefactor     .10000E-03    2.3945        .11613E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  norm          5.7860        5.0947        .15401E-03   -1.5227    
  25  Prefactor     .10000E-03    28.225        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  norm          .10000E-03    3.9392        .20663E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  27  norm          6.2467        9.1513        .14331E-03   -1.5208    
  28  norm          3.5377        13.836        .21498E-03   -1.5332    
  29  Normalizat    1.2779        .23847        .23584E-03   -.84227    
  30  Prefactor     .78686        .24463        .31752E-03   -1.0021    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.12125e-09
Minuit parameter uncertainties:
  1  3.68878e-05
  2  13.011
  3  2.50463e-05
  4  0.000143456
  5  8.89887e-06
  6  32.0889
  7  1.20187
  8  5.01107
  9  46.4969
  10  3.1633e-05
  11  2.80999
  12  3.81213
  13  2.54611e-05
  14  2.48364e-06
  15  7.87182e-06
  16  9.68347
  17  0.261848
  18  5.01395
  19  2.53071e-05
  20  15.8522
  21  1.99686e-05
  22  0.742194
  23  1.73027e-06
  24  5.09509
  25  0.00019629
  26  0.000106996
  27  9.15334
  28  13.8481
  29  0.238677
  30  0.244972
Done.

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

Extracting fit parameters...

4FGL J1221.5+2814
   Spectrum: PowerLaw
324    Prefactor:  1.000e-04  7.872e-06  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:  7.869e-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:  1.278e+00  2.387e-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: 6.33e-08 ph cm-2 s-1
Energy Flux Upper Limit: 4.80e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/530556/likelihoodResults_490233601_490492801_4FGL_J1221.5+2814_daily_bin968.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) = 5914.14286821
delta logL = -0.00493241161075

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 5914.13793595
delta logL = -1.43475517689e-07

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10013E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.1461       1.0000          .0000       10.000    
     3 'Normalizat'    1.2780       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .78690       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=   5914.138     FROM MIGRAD    STATUS=FAILED        89 CALLS      241 TOTAL
                     EDM=   .28E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10031E-03    36.031        .72778E-03** at limit **
   2  Index         2.1131        5.1747        .50000        .51190E-04
   3  Normalizat    1.2779        .29874E-01    .23584E-03   -.85806E-05
   4  Prefactor     .78685        .32519E-01    .31752E-03   -.49411E-05
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   5914.138     FROM SIMPLEX   STATUS=UNCHANGED    134 CALLS      375 TOTAL
                     EDM=   .91E-05    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10031E-03    36.031        .15881E-03** at limit **
   2  Index         2.1131        5.1747        .27314E-03    .51190E-04
   3  Normalizat    1.2779        .29874E-01    .40630E-05   -.85806E-05
   4  Prefactor     .78685        .32519E-01    .60502E-05   -.49411E-05
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   5914.138     FROM MIGRAD    STATUS=CONVERGED     41 CALLS      416 TOTAL
                     EDM=   .39E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    177.96        .14556E-03** at limit **
   2  Index         1.9624        8.5539        .50000       -.95133E-07
   3  Normalizat    1.2779        .92774E-01    .94335E-05    .14582E-03
   4  Prefactor     .78685        .10078        .12701E-04    .11547E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 1.96245
  Normalizat = 1.27794
  Prefactor  = 0.786855
 **********
 **   18 **HESSE 
 **********

 FCN=   5914.138     FROM HESSE     STATUS=OK            29 CALLS      445 TOTAL
                     EDM=   .26E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    1.1039        .29111E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         1.9624        5.8782        .50000       -.65292    
   3  Normalizat    1.2779        .22279        .18867E-05   -.84227    
   4  Prefactor     .78685        .24233        .25401E-05   -1.0021    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.59799e-11
Minuit parameter uncertainties:
  1  4.57137e-07
  2  52.4094
  3  0.222955
  4  0.24266
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/530556': 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) = 5914.13793429
delta logL = 1.51188669406e-06

Extracting fit parameters...

4FGL J1221.5+2814
   Spectrum: PowerLaw
324    Prefactor:  1.000e-04  4.571e-07  1.000e-04  1.000e+04 ( 1.000e-12)
325        Index:  1.962e+00  5.241e+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:  7.869e-01  2.427e-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.278e+00  2.230e-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/530556/cmap_HighResolution_490233601_490492801_4FGL_J1221.5+2814_daily_bin968.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='4.80e-03', job_status='DONE', photon_flux_upper_limit='6.33e-08', time_completed='2021-09-05 10:10:57.816670', job_id='530556', GAL2='0.79', fit_tolerance='1e-08', EG2='1.28', EG='1.28', time_epoch_completed='1630861857.82', return_code2='0', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.79', dlogl='1.51e-06', ts2='-0.00', photon_index_error='0.00', photon_index='2.15' WHERE bin_id='968' AND source_name='4FGL J1221.5+2814' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sun Sep  5 10:10:57 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0031>
Subject: Job 530556: <4FGL_J1221.5+2814_daily_bin968> in cluster <slac> Done

Job <4FGL_J1221.5+2814_daily_bin968> was submitted from host <rhel6-64q> by user <kocevski> in cluster <slac> at Sun Sep  5 09:55:34 2021
Job was executed on host(s) <bullet0031>, in queue <medium>, as user <kocevski> in cluster <slac> at Sun Sep  5 09:55:36 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:55:36 2021
Terminated at Sun Sep  5 10:10:58 2021
Results reported at Sun Sep  5 10:10:58 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1221.5+2814_daily_bin968 185.378 28.2382 490233601 490492801 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 :                                   888.00 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             337.42 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   922 sec.
    Turnaround time :                            924 sec.

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

