/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 160 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 = 7401
number of fields = 27
No RA_SUN column yet. Adding RA_SUN/DEC_SUN columns.
Done.


Performing analysis on: 4FGL_J2221.9-3504_daily_bin402
RA = 335.497, Dec = -35.0712
tmin = 343526401, tmax = 343785601
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='271563', job_status='RUN', time_executed='2021-09-28 09:53:09.983629', time_epoch_executed='1632847989.98' WHERE source_name='4FGL J2221.9-3504' and cadence='daily' and bin_id='402'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/271563

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/271563/ft1_4FGL_J2221.9-3504_daily_bin402.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/271563/ft2_4FGL_J2221.9-3504_daily_bin402.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/271563/ft1_4FGL_J2221.9-3504_daily_bin402.fits outfile=/scratch/kocevski/271563/ft1_filteredMKT_4FGL_J2221.9-3504_daily_bin402.fits ra=335.497 dec=-35.0712 rad=12.0 tmin=343526401.0 tmax=343785601.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.48
user 3.26
sys 0.21

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/271563/ft2_4FGL_J2221.9-3504_daily_bin402.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/271563/ft2_4FGL_J2221.9-3504_daily_bin402.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/271563/ft1_filteredMKT_4FGL_J2221.9-3504_daily_bin402.fits evtable="EVENTS" outfile="/scratch/kocevski/271563/ft1_filtered_4FGL_J2221.9-3504_daily_bin402.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.56
user 0.33
sys 0.15

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/271563/ft1_filtered_4FGL_J2221.9-3504_daily_bin402.fits" evtable="EVENTS" scfile=/scratch/kocevski/271563/ft2_4FGL_J2221.9-3504_daily_bin402.fits sctable="SC_DATA" outfile=/scratch/kocevski/271563/ltcube_343526401_343785601_4FGL_J2221.9-3504_daily_bin402.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/271563/ft2_4FGL_J2221.9-3504_daily_bin402.fits
.....................!
real 12.58
user 11.79
sys 0.75

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/271563/ft1_filtered_4FGL_J2221.9-3504_daily_bin402.fits evtable="EVENTS" scfile=/scratch/kocevski/271563/ft2_4FGL_J2221.9-3504_daily_bin402.fits sctable="SC_DATA" expcube=/scratch/kocevski/271563/ltcube_343526401_343785601_4FGL_J2221.9-3504_daily_bin402.fits outfile=/scratch/kocevski/271563/expmap_343526401_343785601_4FGL_J2221.9-3504_daily_bin402.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/271563/ltcube_343526401_343785601_4FGL_J2221.9-3504_daily_bin402.fits
.....................!
real 191.54
user 186.53
sys 4.69

Generating the xml model:
radLim = 0.001
maxRad = 12
normsOnly = True
freeVariableSources = True
Fixing all sources to their catalog values, except variable sources
Creating file and adding sources from 4FGL
Added 175 point sources and 0 extended sources

Setting source of interest to:
4FGL J2221.9-3504 @ 335.497 -35.0712

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/271563/ft1_filtered_4FGL_J2221.9-3504_daily_bin402.fits scfile=/scratch/kocevski/271563/ft2_4FGL_J2221.9-3504_daily_bin402.fits outfile=/scratch/kocevski/271563/cmap_343526401_343785601_4FGL_J2221.9-3504_daily_bin402.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=335.497 yref=-35.0712 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.37
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/271563/ft1_filtered_4FGL_J2221.9-3504_daily_bin402.fits scfile=/scratch/kocevski/271563/ft2_4FGL_J2221.9-3504_daily_bin402.fits outfile=/scratch/kocevski/271563/cmap_HighResolution_343526401_343785601_4FGL_J2221.9-3504_daily_bin402.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=335.497 yref=-35.0712 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.36
sys 0.17

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/271563/ft1_filtered_4FGL_J2221.9-3504_daily_bin402.fits evtable="EVENTS" scfile=/scratch/kocevski/271563/ft2_4FGL_J2221.9-3504_daily_bin402.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/271563/Model_4FGL_J2221.9-3504_daily_bin402.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/271563/ft1_filtered_4FGL_J2221.9-3504_daily_bin402.fits.....................!
real 44.99
user 43.63
sys 1.26

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/271563/ft1_filtered_4FGL_J2221.9-3504_daily_bin402.fits', '/scratch/kocevski/271563/ft2_4FGL_J2221.9-3504_daily_bin402.fits', expMap='/scratch/kocevski/271563/expmap_343526401_343785601_4FGL_J2221.9-3504_daily_bin402.fits', expCube='/scratch/kocevski/271563/ltcube_343526401_343785601_4FGL_J2221.9-3504_daily_bin402.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/271563/Model_4FGL_J2221.9-3504_daily_bin402.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J2221.9-3504'

4FGL J2221.9-3504
   Spectrum: PowerLaw
253    Prefactor:  1.240e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-12)
254        Index:  2.677e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
255        Scale:  5.158e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/271563/ft1_filtered_4FGL_J2221.9-3504_daily_bin402.fits
Spacecraft file(s): /scratch/kocevski/271563/ft2_4FGL_J2221.9-3504_daily_bin402.fits
Exposure map: /scratch/kocevski/271563/expmap_343526401_343785601_4FGL_J2221.9-3504_daily_bin402.fits
Exposure cube: /scratch/kocevski/271563/ltcube_343526401_343785601_4FGL_J2221.9-3504_daily_bin402.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/271563/Model_4FGL_J2221.9-3504_daily_bin402.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) = 5063.59975791

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    3.1222       1.0000         .10000E-03   10000.    
     2 'Prefactor '    2.2128       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10021E-03   1.0000         .10000E-03   10000.    
     4 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10307E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    108.60       1.0000         .10000E-03   10000.    
     7 'norm      '    .47149       1.0000         .10000E-03   10000.    
     8 'norm      '    .77640       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    1.4603       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .31192E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    23.764       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10049E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    7.5113       1.0000         .10000E-03   10000.    
    17 'norm      '    .12494E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    89.120       1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10207E-03   1.0000         .10000E-03   10000.    
    21 'norm      '    26.559       1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10093E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .23102E-02   1.0000         .10000E-03   10000.    
    24 'norm      '    .91797       1.0000         .10000E-03   10000.    
    25 'Prefactor '    .10043E-03   1.0000         .10000E-03   10000.    
    26 'Prefactor '    .10016E-03   1.0000         .10000E-03   10000.    
    27 'Normalizat'    1.3816       1.0000         .10000E-01   10.000    
    28 'Prefactor '    .86421       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5630E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   5063.586     FROM MIGRAD    STATUS=CONVERGED    709 CALLS     3620 TOTAL
                     EDM=   .11E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  3.0%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          3.1224        3.6932        .75079E-08    .14878E-04
   2  Prefactor     2.2130        7.5187       -.33348E-06    .25015E-03
   3  Prefactor     .10000E-03    2.8689        .45955E-07** at limit **
   4  norm          .10000E-03    3.3835        .48148E-07** at limit **
   5  Prefactor     .10000E-03    27.501        .28247E-05** at limit **
   6  Prefactor     108.60        75.972        .17737E-06    .74461E-04
   7  norm          .45754        5.6175       -.21815E-05    .82960E-03
   8  norm          .77646        .43637        .10814E-07    .10870E-02
   9  Prefactor     .10000E-03    6.3386       -.72305E-08** at limit **
  10  Prefactor     1.4661        95.621        .27220E-06    .85620E-05
  11  Prefactor     .10000E-03    7.9150        .27427E-06** at limit **
  12  Prefactor     .10000E-03    2.0924        .74468E-07** at limit **
  13  norm          23.754        40.152        .36731E-05    .10973E-03
  14  Prefactor     .10000E-03    18.354       -.12705E-05** at limit **
  15  Prefactor     .10000E-03    7.4522        .79954E-07** at limit **
  16  Prefactor     7.5124        32.196       -.97967E-06    .28304E-05
  17  norm          .10000E-03    3.4122        .75541E-06** at limit **
  18  Prefactor     89.242        79.228        .75451E-06   -.78655E-04
  19  Prefactor     .10000E-03    22.542       -.15563E-05** at limit **
  20  Prefactor     .10000E-03    6.3894       -.13494E-05** at limit **
  21  norm          26.558        9.6668        .19404E-06   -.39790E-03
  22  Prefactor     .10000E-03    24.483        .99295E-06** at limit **
  23  Prefactor     .10004E-03    12.427        .91994E-06** at limit **
  24  norm          .91754        1.0065       -.51936E-06   -.21045E-02
  25  Prefactor     .10000E-03    42.994       -.15954E-05** at limit **
  26  Prefactor     .10000E-03    9.2631       -.33187E-07** at limit **
  27  Normalizat    1.3814        .23430       -.17673E-06    .15523E-03
  28  Prefactor     .86430        .18953        .19316E-06    .16866E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 3.1224
  Prefactor  = 2.213
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.000100001
  Prefactor  = 108.6
  norm       = 0.457535
  norm       = 0.776463
  Prefactor  = 0.0001
  Prefactor  = 1.46608
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 23.7542
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 7.51238
  norm       = 0.000100001
  Prefactor  = 89.2417
  Prefactor  = 0.0001
  Prefactor  = 0.000100003
  norm       = 26.5577
  Prefactor  = 0.0001
  Prefactor  = 0.000100043
  norm       = 0.917538
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Normalizat = 1.3814
  Prefactor  = 0.864301
 **********
 **   18 **HESSE 
 **********

 FCN=   5063.586     FROM HESSE     STATUS=OK           523 CALLS     4143 TOTAL
                     EDM=   .68E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          3.1224        3.6882        .14431E-03   -1.5355    
   2  Prefactor     2.2130        8.1872        .13825E-02   -1.5410    
   3  Prefactor     .10000E-03    2.8734        .11771E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  norm          .10000E-03    3.3945        .12782E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    27.572        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     108.60        75.407        .38595E-04   -1.3620    
   7  norm          .45754        18.968        .22992E-02   -1.5573    
   8  norm          .77646        .44310        .32093E-04   -1.5532    
   9  Prefactor     .10000E-03    6.3445        .17496E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     1.4661        97.148        .35608E-03   -1.5466    
  11  Prefactor     .10000E-03    27.219        .38066E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    2.1323        .10049E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          23.754        40.041        .82170E-04   -1.4733    
  14  Prefactor     .10000E-03    18.349        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .10000E-03    7.4540        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     7.5124        32.472        .14633E-03   -1.5160    
  17  norm          .10000E-03    3.8803        .19970E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     89.242        81.639        .21281E-03   -1.3816    
  19  Prefactor     .10000E-03    22.907        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10000E-03    17.160        .32387E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  norm          26.558        9.5348        .77734E-04   -1.4677    
  22  Prefactor     .10000E-03    24.814        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10004E-03    155.83        .41175E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  norm          .91754        .97743        .66240E-03   -1.5516    
  25  Prefactor     .10000E-03    43.043        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  Prefactor     .10000E-03    9.2711        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  27  Normalizat    1.3814        .27319        .25256E-03   -.81168    
  28  Prefactor     .86430        .22352        .26492E-03   -.97400    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.84077e-09
Minuit parameter uncertainties:
  1  3.68847
  2  8.19131
  3  4.2713e-06
  4  5.76959e-06
  5  0.000392059
  6  75.474
  7  5.89329
  8  0.4431
  9  8.07181e-07
  10  23.9083
  11  8.64264e-05
  12  1.19682e-06
  13  40.0859
  14  0.000127513
  15  5.47789e-06
  16  31.2658
  17  0.000118748
  18  81.7421
  19  0.000181469
  20  0.000485302
  21  9.53539
  22  0.0001501
  23  0.00518212
  24  0.977445
  25  0.000255723
  26  5.06989e-06
  27  0.273476
  28  0.223754
Done.

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

Extracting fit parameters...

4FGL J2221.9-3504
   Spectrum: PowerLaw
253    Prefactor:  1.000e-04  8.643e-05  1.000e-04  1.000e+04 ( 1.000e-12)
254        Index:  2.677e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
255        Scale:  5.158e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
560    Prefactor:  8.643e-01  2.238e-01  0.000e+00  1.000e+01 ( 1.000e+00)
561        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
562        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
559   Normalization:  1.381e+00  2.735e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 335.497 -35.071
Photon Flux Upper Limit: 1.13e-07 ph cm-2 s-1
Energy Flux Upper Limit: 8.87e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/271563/likelihoodResults_343526401_343785601_4FGL_J2221.9-3504_daily_bin402.txt

Performing a free index iterative likelihood fit...

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

Done.

Freeing candidate source...
Done.

Fit tolerance = 1

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 5063.58628798
delta logL = -0.000173667628587

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 5063.58611411
delta logL = 2.01410330192e-07

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .14360E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.7917       1.0000          .0000       10.000    
     3 'Normalizat'    1.3817       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .86409       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5630E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   5062.941     FROM MIGRAD    STATUS=CONVERGED    155 CALLS      326 TOTAL
                     EDM=   .15E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .43596E-02    .83922E-01    .90712E-03    .68223E-02
   2  Index         8.6105        8.3840        .22629        .52124E-04
   3  Normalizat    1.2782        .55405E-01    .59004E-01   -.13326E-03
   4  Prefactor     .92441        .47526E-01    .44546E-01   -.87816E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.00435963
  Index      = 8.61052
  Normalizat = 1.27819
  Prefactor  = 0.924407
 **********
 **   18 **HESSE 
 **********

 FCN=   5062.941     FROM HESSE     STATUS=NOT POSDEF    33 CALLS      359 TOTAL
                     EDM=   .46E-06    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .43596E-02    .20479        .45016E-04   -1.5695    
   2  Index         8.6105        9.2807        .11580E-01    .80684    
   3  Normalizat    1.2782        .19013        .26095E-03   -.84220    
   4  Prefactor     .92441        .15919        .25728E-03   -.95293    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 4.637e-07
Minuit parameter uncertainties:
  1  0.059071
  2  8.70886
  3  0.19023
  4  0.159271
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/271563': 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): 102
logL (Free Index) = 5062.94110663
delta logL = 0.645007684173

Extracting fit parameters...

4FGL J2221.9-3504
   Spectrum: PowerLaw
253    Prefactor:  4.360e-03  5.907e-02  1.000e-04  1.000e+04 ( 1.000e-12)
254        Index:  8.611e+00  8.709e+00  0.000e+00  1.000e+01 (-1.000e+00)
255        Scale:  5.158e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
560    Prefactor:  9.244e-01  1.593e-01  0.000e+00  1.000e+01 ( 1.000e+00)
561        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
562        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
559   Normalization:  1.278e+00  1.902e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.41
Ra Dec: 335.497 -35.071
Photon Index (Free Index): 8.61 +/- 8.71
Photon Flux (Free Index): 8.00e-08 +/- 7.68e-08
Energy Flux (Free Index): 9.16e-06 +/- 9.55e-06

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/271563/cmap_HighResolution_343526401_343785601_4FGL_J2221.9-3504_daily_bin402.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='8.87e-03', comment='SUCCESS', energy_flux2='9.16e-06', dlogl='6.45e-01', photon_flux2='8.00e-08', job_status='DONE', time_completed='2021-09-28 10:04:42.372107', photon_index_error2='8.71', photon_index2='8.61', ts='-0.00', fit_tolerance='1e-08', GAL='0.86', photon_index_error='0.00', photon_flux_upper_limit='1.13e-07', energy_flux_error2='9.55e-06', EG='1.38', time_epoch_completed='1632848682.37', return_code='0', job_id='271563', GAL2='0.92', EG2='1.28', return_code2='102', photon_flux_error2='7.68e-08', ts2='1.41', photon_index='2.68' WHERE bin_id='402' AND source_name='4FGL J2221.9-3504' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Tue Sep 28 10:04:42 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0031>
Subject: Job 271563: <4FGL_J2221.9-3504_daily_bin402> in cluster <slac> Done

Job <4FGL_J2221.9-3504_daily_bin402> was submitted from host <rhel6-64d> by user <kocevski> in cluster <slac> at Tue Sep 28 09:50:18 2021
Job was executed on host(s) <bullet0031>, in queue <medium>, as user <kocevski> in cluster <slac> at Tue Sep 28 09:50:19 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Tue Sep 28 09:50:19 2021
Terminated at Tue Sep 28 10:04:43 2021
Results reported at Tue Sep 28 10:04:43 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2221.9-3504_daily_bin402 335.497 -35.0712 343526401 343785601 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J2221.9-3504 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   693.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             282.83 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   863 sec.
    Turnaround time :                            865 sec.

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

