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


Performing analysis on: 4FGL_J2221.9-3504_daily_bin132
RA = 335.497, Dec = -35.0712
tmin = 273542401, tmax = 273801601
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='270185', job_status='RUN', time_executed='2021-09-28 09:47:28.478921', time_epoch_executed='1632847648.48' WHERE source_name='4FGL J2221.9-3504' and cadence='daily' and bin_id='132'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/270185

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/270185/ft1_4FGL_J2221.9-3504_daily_bin132.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/270185/ft2_4FGL_J2221.9-3504_daily_bin132.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/270185/ft1_4FGL_J2221.9-3504_daily_bin132.fits outfile=/scratch/kocevski/270185/ft1_filteredMKT_4FGL_J2221.9-3504_daily_bin132.fits ra=335.497 dec=-35.0712 rad=12.0 tmin=273542401.0 tmax=273801601.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.55
user 3.32
sys 0.20

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/270185/ft2_4FGL_J2221.9-3504_daily_bin132.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/270185/ft1_filteredMKT_4FGL_J2221.9-3504_daily_bin132.fits evtable="EVENTS" outfile="/scratch/kocevski/270185/ft1_filtered_4FGL_J2221.9-3504_daily_bin132.fits" apply_filter=yes overwrite=yes header_obstimes=yes tstart=0.0 tstop=0.0 gtifile="default" chatter=3 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

This is gtmktime version HEAD
Applying GTI filter:
IN_SAA!=T && LIVETIME>0 && gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nogrb.gti',(START+STOP)/2) && (angsep(RA_SUN,DEC_SUN,RA_ZENITH,DEC_ZENITH)>115 || gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nosolarflares.gti',(START+STOP)/2))
real 0.48
user 0.32
sys 0.15

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/270185/ft1_filtered_4FGL_J2221.9-3504_daily_bin132.fits" evtable="EVENTS" scfile=/scratch/kocevski/270185/ft2_4FGL_J2221.9-3504_daily_bin132.fits sctable="SC_DATA" outfile=/scratch/kocevski/270185/ltcube_273542401_273801601_4FGL_J2221.9-3504_daily_bin132.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/270185/ft2_4FGL_J2221.9-3504_daily_bin132.fits
.....................!
real 12.14
user 11.79
sys 0.32

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/270185/ft1_filtered_4FGL_J2221.9-3504_daily_bin132.fits evtable="EVENTS" scfile=/scratch/kocevski/270185/ft2_4FGL_J2221.9-3504_daily_bin132.fits sctable="SC_DATA" expcube=/scratch/kocevski/270185/ltcube_273542401_273801601_4FGL_J2221.9-3504_daily_bin132.fits outfile=/scratch/kocevski/270185/expmap_273542401_273801601_4FGL_J2221.9-3504_daily_bin132.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/270185/ltcube_273542401_273801601_4FGL_J2221.9-3504_daily_bin132.fits
.....................!
real 190.24
user 185.52
sys 4.35

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/270185/ft1_filtered_4FGL_J2221.9-3504_daily_bin132.fits scfile=/scratch/kocevski/270185/ft2_4FGL_J2221.9-3504_daily_bin132.fits outfile=/scratch/kocevski/270185/cmap_273542401_273801601_4FGL_J2221.9-3504_daily_bin132.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.38
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/270185/ft1_filtered_4FGL_J2221.9-3504_daily_bin132.fits scfile=/scratch/kocevski/270185/ft2_4FGL_J2221.9-3504_daily_bin132.fits outfile=/scratch/kocevski/270185/cmap_HighResolution_273542401_273801601_4FGL_J2221.9-3504_daily_bin132.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.53
user 0.39
sys 0.14

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/270185/ft1_filtered_4FGL_J2221.9-3504_daily_bin132.fits evtable="EVENTS" scfile=/scratch/kocevski/270185/ft2_4FGL_J2221.9-3504_daily_bin132.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/270185/Model_4FGL_J2221.9-3504_daily_bin132.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/270185/ft1_filtered_4FGL_J2221.9-3504_daily_bin132.fits.....................!
real 50.82
user 49.58
sys 1.15

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/270185/ft1_filtered_4FGL_J2221.9-3504_daily_bin132.fits', '/scratch/kocevski/270185/ft2_4FGL_J2221.9-3504_daily_bin132.fits', expMap='/scratch/kocevski/270185/expmap_273542401_273801601_4FGL_J2221.9-3504_daily_bin132.fits', expCube='/scratch/kocevski/270185/ltcube_273542401_273801601_4FGL_J2221.9-3504_daily_bin132.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/270185/Model_4FGL_J2221.9-3504_daily_bin132.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/270185/ft1_filtered_4FGL_J2221.9-3504_daily_bin132.fits
Spacecraft file(s): /scratch/kocevski/270185/ft2_4FGL_J2221.9-3504_daily_bin132.fits
Exposure map: /scratch/kocevski/270185/expmap_273542401_273801601_4FGL_J2221.9-3504_daily_bin132.fits
Exposure cube: /scratch/kocevski/270185/ltcube_273542401_273801601_4FGL_J2221.9-3504_daily_bin132.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/270185/Model_4FGL_J2221.9-3504_daily_bin132.xml
Optimizer: MINUIT
Statistic: UNBINNED

Performing an iterative likelihood fit...

Fit tolerance = 1

Performing likelihood fit...
Done.

MINUIT Return Code (Fixed Index): 102
logL (Fixed Index) = 6423.00950838

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    12.483       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     4 'norm      '    10.815       1.0000         .10000E-03   10000.    
     5 'Prefactor '    5.2479       1.0000         .10000E-03   10000.    
     6 'Prefactor '    10.016       1.0000         .10000E-03   10000.    
     7 'norm      '    4.5271       1.0000         .10000E-03   10000.    
     8 'norm      '    2.0808       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    24.437       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10520E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    24.797       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    15.054       1.0000         .10000E-03   10000.    
    19 'Prefactor '    .28746E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    21 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    5.9719       1.0000         .10000E-03   10000.    
    24 'norm      '    1.1006       1.0000         .10000E-03   10000.    
    25 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    26 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    27 'Normalizat'    1.0189       1.0000         .10000E-01   10.000    
    28 'Prefactor '    .96103       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=   6422.992     FROM MIGRAD    STATUS=CONVERGED    659 CALLS     3951 TOTAL
                     EDM=   .44E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  4.3%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          12.483        4.9545        .28645E-08   -.46155E-04
   2  Prefactor     .10000E-03    3.6174        .97729E-07** at limit **
   3  Prefactor     .10000E-03    2.8319        .89851E-07** at limit **
   4  norm          10.815        7.2049        .54855E-06    .21433E-03
   5  Prefactor     5.2790        58.434       -.96767E-06    .72358E-04
   6  Prefactor     9.9549        261.01        .63420E-05    .36855E-04
   7  norm          4.5274        4.3617       -.43938E-07    .43204E-04
   8  norm          2.0808        .46797        .75997E-08    .27983E-03
   9  Prefactor     .10000E-03    5.4424        .14645E-06** at limit **
  10  Prefactor     24.435        20.077       -.10098E-05   -.16180E-03
  11  Prefactor     .10000E-03    3.5223        .46185E-06** at limit **
  12  Prefactor     .10003E-03    2.0242        .78110E-06** at limit **
  13  norm          .10000E-03    9.0401       -.18634E-05** at limit **
  14  Prefactor     .10000E-03    10.160        .29529E-07** at limit **
  15  Prefactor     24.797        18.270        .53685E-07   -.14794E-04
  16  Prefactor     .10000E-03    4.6958       -.95011E-06** at limit **
  17  norm          .10000E-03    .63632        .32714E-07** at limit **
  18  Prefactor     15.054        31.952        .48338E-06    .95798E-05
  19  Prefactor     .10001E-03    8.0453        .88053E-06** at limit **
  20  Prefactor     .10000E-03    3.1336       -.87466E-07** at limit **
  21  norm          .10000E-03    1.2527       -.67047E-07** at limit **
  22  Prefactor     .10000E-03    5.5452        .71921E-06** at limit **
  23  Prefactor     5.9704        12.920       -.61810E-06   -.21385E-04
  24  norm          1.1007        .93231        .11242E-06   -.14861E-03
  25  Prefactor     .10000E-03    19.821       -.38445E-06** at limit **
  26  Prefactor     .10000E-03    6.6671       -.33739E-06** at limit **
  27  Normalizat    1.0190        .19820        .17745E-05   -.31030E-03
  28  Prefactor     .96095        .17314       -.20935E-05   -.20863E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 12.4829
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 10.8146
  Prefactor  = 5.279
  Prefactor  = 9.95495
  norm       = 4.52735
  norm       = 2.08077
  Prefactor  = 0.0001
  Prefactor  = 24.435
  Prefactor  = 0.0001
  Prefactor  = 0.000100031
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 24.7974
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 15.0542
  Prefactor  = 0.000100008
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 5.97039
  norm       = 1.10066
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Normalizat = 1.01901
  Prefactor  = 0.96095
 **********
 **   18 **HESSE 
 **********

 FCN=   6422.992     FROM HESSE     STATUS=OK           517 CALLS     4468 TOTAL
                     EDM=   .35E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          12.483        4.9539        .54529E-03   -1.5001    
   2  Prefactor     .10000E-03    3.6459        .14882E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .10000E-03    2.8442        .13172E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  norm          10.815        7.2299        .60915E-03   -1.5050    
   5  Prefactor     5.2790        58.162        .17546E-03   -1.5248    
   6  Prefactor     9.9549        262.63        .12661E-03   -1.5077    
   7  norm          4.5274        4.3488        .14853E-03   -1.5282    
   8  norm          2.0808        .46960        .24336E-04   -1.5419    
   9  Prefactor     .10000E-03    5.4625        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     24.435        20.146        .81032E-04   -1.4719    
  11  Prefactor     .10000E-03    3.5654        .14703E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10003E-03    10.643        .19307E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .10000E-03    9.2195        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10000E-03    10.164        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     24.797        18.287        .80443E-04   -1.4712    
  16  Prefactor     .10000E-03    4.7456        .17044E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .10000E-03    .63662        .62275E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     15.054        31.971        .10323E-03   -1.4932    
  19  Prefactor     .10001E-03    24.945        .41568E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10000E-03    3.1813        .13853E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  norm          .10000E-03    1.2550        .87528E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     .10000E-03    5.5748        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     5.9704        14.530        .16431E-03   -1.5219    
  24  norm          1.1007        1.0259        .48382E-04   -1.5498    
  25  Prefactor     .10000E-03    19.838        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  Prefactor     .10000E-03    6.6775        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  27  Normalizat    1.0190        .21777        .25277E-03   -.92396    
  28  Prefactor     .96095        .19213        .23514E-03   -.94043    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.47922e-09
Minuit parameter uncertainties:
  1  4.95403
  2  4.13937e-06
  3  4.2594e-06
  4  7.23048
  5  35.088
  6  102.768
  7  4.34909
  8  0.469597
  9  1.08688e-05
  10  20.1512
  11  1.93563e-05
  12  0.00114534
  13  0.000135188
  14  2.06694e-07
  15  18.2912
  16  5.22664e-05
  17  3.91537e-07
  18  32.0073
  19  0.000882623
  20  4.51924e-06
  21  1.79936e-06
  22  4.22455e-05
  23  14.5387
  24  1.02591
  25  4.37029e-05
  26  2.15831e-05
  27  0.217965
  28  0.192266
Done.

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

Extracting fit parameters...

4FGL J2221.9-3504
   Spectrum: PowerLaw
253    Prefactor:  1.000e-04  1.936e-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:  9.609e-01  1.923e-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.019e+00  2.180e-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: 6.13e-08 ph cm-2 s-1
Energy Flux Upper Limit: 4.82e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/270185/likelihoodResults_273542401_273801601_4FGL_J2221.9-3504_daily_bin132.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) = 6422.99343808
delta logL = -0.00133622130397

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 6422.99210204
delta logL = -1.79167727765e-07

Fit tolerance = 1e-08

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

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

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   6422.992     FROM MIGRAD    STATUS=CONVERGED     95 CALLS      242 TOTAL
                     EDM=   .36E-10    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    16.634        .14922E-01** at limit **
   2  Index         2.2783        8.7168        .50000        .10818E-06
   3  Normalizat    1.0190        .87366E-02    .25277E-03   -.58236E-03
   4  Prefactor     .96095        .79565E-02    .23514E-03   -.61876E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 2.27826
  Normalizat = 1.01901
  Prefactor  = 0.960948
 **********
 **   18 **HESSE 
 **********

 FCN=   6422.992     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      271 TOTAL
                     EDM=   .35E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    164.51        .15932E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.2783        8.8049        .50000       -.57561    
   3  Normalizat    1.0190        .28309E-01    .50554E-04   -.92396    
   4  Prefactor     .96095        .25782E-01    .47028E-04   -.94043    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 3.53552e-10
Minuit parameter uncertainties:
  1  1.03373e-05
  2  624.371
  3  0.0283098
  4  0.0257821
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/270185': 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) = 6422.99209962
delta logL = 2.23576716962e-06

Extracting fit parameters...

4FGL J2221.9-3504
   Spectrum: PowerLaw
253    Prefactor:  1.000e-04  1.034e-05  1.000e-04  1.000e+04 ( 1.000e-12)
254        Index:  2.278e+00  6.244e+02  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.609e-01  2.578e-02  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.019e+00  2.831e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 335.497 -35.071

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/270185/cmap_HighResolution_273542401_273801601_4FGL_J2221.9-3504_daily_bin132.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='4.82e-03', job_status='DONE', photon_flux_upper_limit='6.13e-08', time_completed='2021-09-28 10:01:13.174610', job_id='270185', GAL2='0.96', fit_tolerance='1e-08', EG2='1.02', EG='1.02', time_epoch_completed='1632848473.17', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.96', dlogl='2.24e-06', ts2='-0.00', photon_index_error='0.00', photon_index='2.68' WHERE bin_id='132' AND source_name='4FGL J2221.9-3504' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Tue Sep 28 10:01:13 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0032>
Subject: Job 270185: <4FGL_J2221.9-3504_daily_bin132> in cluster <slac> Done

Job <4FGL_J2221.9-3504_daily_bin132> was submitted from host <rhel6-64f> by user <kocevski> in cluster <slac> at Tue Sep 28 09:45:29 2021
Job was executed on host(s) <bullet0032>, in queue <medium>, as user <kocevski> in cluster <slac> at Tue Sep 28 09:45:31 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:45:31 2021
Terminated at Tue Sep 28 10:01:13 2021
Results reported at Tue Sep 28 10:01:13 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2221.9-3504_daily_bin132 335.497 -35.0712 273542401 273801601 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 :                                   824.21 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             313.24 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   942 sec.
    Turnaround time :                            944 sec.

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

