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


Performing analysis on: 4FGL_J2221.9-3504_daily_bin264
RA = 335.497, Dec = -35.0712
tmin = 307756801, tmax = 308016001
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='270373', job_status='RUN', time_executed='2021-09-28 09:49:50.289502', time_epoch_executed='1632847790.29' WHERE source_name='4FGL J2221.9-3504' and cadence='daily' and bin_id='264'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/270373

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/270373/ft1_4FGL_J2221.9-3504_daily_bin264.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/270373/ft2_4FGL_J2221.9-3504_daily_bin264.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/270373/ft1_4FGL_J2221.9-3504_daily_bin264.fits outfile=/scratch/kocevski/270373/ft1_filteredMKT_4FGL_J2221.9-3504_daily_bin264.fits ra=335.497 dec=-35.0712 rad=12.0 tmin=307756801.0 tmax=308016001.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.74
user 3.20
sys 0.21

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/270373/ft1_filtered_4FGL_J2221.9-3504_daily_bin264.fits" evtable="EVENTS" scfile=/scratch/kocevski/270373/ft2_4FGL_J2221.9-3504_daily_bin264.fits sctable="SC_DATA" outfile=/scratch/kocevski/270373/ltcube_307756801_308016001_4FGL_J2221.9-3504_daily_bin264.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/270373/ft2_4FGL_J2221.9-3504_daily_bin264.fits
.....................!
real 11.84
user 11.48
sys 0.33

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/270373/ft1_filtered_4FGL_J2221.9-3504_daily_bin264.fits evtable="EVENTS" scfile=/scratch/kocevski/270373/ft2_4FGL_J2221.9-3504_daily_bin264.fits sctable="SC_DATA" expcube=/scratch/kocevski/270373/ltcube_307756801_308016001_4FGL_J2221.9-3504_daily_bin264.fits outfile=/scratch/kocevski/270373/expmap_307756801_308016001_4FGL_J2221.9-3504_daily_bin264.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/270373/ltcube_307756801_308016001_4FGL_J2221.9-3504_daily_bin264.fits
.....................!
real 194.20
user 188.00
sys 5.81

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/270373/ft1_filtered_4FGL_J2221.9-3504_daily_bin264.fits scfile=/scratch/kocevski/270373/ft2_4FGL_J2221.9-3504_daily_bin264.fits outfile=/scratch/kocevski/270373/cmap_307756801_308016001_4FGL_J2221.9-3504_daily_bin264.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.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/270373/ft1_filtered_4FGL_J2221.9-3504_daily_bin264.fits scfile=/scratch/kocevski/270373/ft2_4FGL_J2221.9-3504_daily_bin264.fits outfile=/scratch/kocevski/270373/cmap_HighResolution_307756801_308016001_4FGL_J2221.9-3504_daily_bin264.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.56
user 0.38
sys 0.15

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/270373/ft1_filtered_4FGL_J2221.9-3504_daily_bin264.fits evtable="EVENTS" scfile=/scratch/kocevski/270373/ft2_4FGL_J2221.9-3504_daily_bin264.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/270373/Model_4FGL_J2221.9-3504_daily_bin264.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/270373/ft1_filtered_4FGL_J2221.9-3504_daily_bin264.fits.....................!
real 45.47
user 44.01
sys 1.24

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/270373/ft1_filtered_4FGL_J2221.9-3504_daily_bin264.fits', '/scratch/kocevski/270373/ft2_4FGL_J2221.9-3504_daily_bin264.fits', expMap='/scratch/kocevski/270373/expmap_307756801_308016001_4FGL_J2221.9-3504_daily_bin264.fits', expCube='/scratch/kocevski/270373/ltcube_307756801_308016001_4FGL_J2221.9-3504_daily_bin264.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/270373/Model_4FGL_J2221.9-3504_daily_bin264.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/270373/ft1_filtered_4FGL_J2221.9-3504_daily_bin264.fits
Spacecraft file(s): /scratch/kocevski/270373/ft2_4FGL_J2221.9-3504_daily_bin264.fits
Exposure map: /scratch/kocevski/270373/expmap_307756801_308016001_4FGL_J2221.9-3504_daily_bin264.fits
Exposure cube: /scratch/kocevski/270373/ltcube_307756801_308016001_4FGL_J2221.9-3504_daily_bin264.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/270373/Model_4FGL_J2221.9-3504_daily_bin264.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) = 5329.04253331

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    4.7003       1.0000         .10000E-03   10000.    
     2 'Prefactor '    7.1684       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .48134E-02   1.0000         .10000E-03   10000.    
     4 'norm      '    3.7499       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .14393E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    59.280       1.0000         .10000E-03   10000.    
     7 'norm      '    .19091E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    1.6242       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10113E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .12362E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    16.334       1.0000         .10000E-03   10000.    
    12 'Prefactor '    2.5694       1.0000         .10000E-03   10000.    
    13 'norm      '    4.0386       1.0000         .10000E-03   10000.    
    14 'Prefactor '    13.671       1.0000         .10000E-03   10000.    
    15 'Prefactor '    23.859       1.0000         .10000E-03   10000.    
    16 'Prefactor '    40.222       1.0000         .10000E-03   10000.    
    17 'norm      '    3.2591       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .17925E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10008E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    2.7016       1.0000         .10000E-03   10000.    
    21 'norm      '    10.931       1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10037E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    16.318       1.0000         .10000E-03   10000.    
    24 'norm      '    .11779E-03   1.0000         .10000E-03   10000.    
    25 'Prefactor '    .10038E-03   1.0000         .10000E-03   10000.    
    26 'Prefactor '    .10278E-03   1.0000         .10000E-03   10000.    
    27 'Normalizat'    1.5027       1.0000         .10000E-01   10.000    
    28 'Prefactor '    .60788       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=   5329.026     FROM MIGRAD    STATUS=CONVERGED    733 CALLS     3568 TOTAL
                     EDM=   .18E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  4.5%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          4.6987        4.5321        .64169E-07   -.15237E-03
   2  Prefactor     7.1531        11.832        .21547E-06   -.16173E-03
   3  Prefactor     .10110E-03    71.905        .14006E-04** at limit **
   4  norm          3.7541        6.6257       -.35453E-06    .29702E-04
   5  Prefactor     .10000E-03    15.418        .23794E-05** at limit **
   6  Prefactor     59.404        69.246        .17450E-05    .23504E-03
   7  norm          .10011E-03    7.7163        .32578E-05** at limit **
   8  norm          1.6251        .51300       -.19992E-06    .19239E-02
   9  Prefactor     .10000E-03    7.1981       -.23808E-06** at limit **
  10  Prefactor     .10000E-03    71.208       -.17442E-06** at limit **
  11  Prefactor     16.335        13.410       -.17757E-06    .61630E-04
  12  Prefactor     2.5690        3.0312        .56116E-07   -.50356E-05
  13  norm          4.0298        32.862        .26860E-06    .14474E-04
  14  Prefactor     13.652        32.964        .19556E-06   -.10067E-04
  15  Prefactor     23.837        32.701       -.14855E-06   -.13611E-05
  16  Prefactor     40.217        26.174        .39919E-06    .87332E-05
  17  norm          3.2577        2.9647       -.13090E-08    .20202E-03
  18  Prefactor     .10000E-03    175.58       -.22561E-05** at limit **
  19  Prefactor     .10000E-03    5.7593       -.34621E-08** at limit **
  20  Prefactor     2.7008        7.2688       -.29215E-05   -.25666E-03
  21  norm          10.932        5.8627        .23109E-06    .47836E-03
  22  Prefactor     .10000E-03    8.9720       -.36158E-06** at limit **
  23  Prefactor     16.339        12.638        .16140E-05    .64222E-03
  24  norm          .10001E-03    .59679        .29311E-06** at limit **
  25  Prefactor     .10000E-03    35.429       -.60013E-06** at limit **
  26  Prefactor     .10000E-03    11.542       -.66981E-06** at limit **
  27  Normalizat    1.5030        .24199        .15938E-05    .90297E-04
  28  Prefactor     .60776        .19356       -.30847E-05    .70347E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 4.69874
  Prefactor  = 7.15307
  Prefactor  = 0.0001011
  norm       = 3.75414
  Prefactor  = 0.0001
  Prefactor  = 59.4038
  norm       = 0.000100113
  norm       = 1.62514
  Prefactor  = 0.0001
  Prefactor  = 0.000100001
  Prefactor  = 16.3349
  Prefactor  = 2.56897
  norm       = 4.02978
  Prefactor  = 13.6518
  Prefactor  = 23.8366
  Prefactor  = 40.2173
  norm       = 3.25769
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 2.70076
  norm       = 10.9324
  Prefactor  = 0.0001
  Prefactor  = 16.3392
  norm       = 0.000100009
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Normalizat = 1.50296
  Prefactor  = 0.607755
 **********
 **   18 **HESSE 
 **********

 FCN=   5329.026     FROM HESSE     STATUS=OK           535 CALLS     4103 TOTAL
                     EDM=   .11E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          4.6987        4.5283        .14728E-03   -1.5274    
   2  Prefactor     7.1531        11.786        .14982E-03   -1.5173    
   3  Prefactor     .10110E-03    9.6938        .61639E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  norm          3.7541        6.6028        .20850E-03   -1.5320    
   5  Prefactor     .10000E-03    15.258        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     59.404        70.027        .26055E-03   -1.4165    
   7  norm          .10011E-03    13.069        .22308E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          1.6251        .50503        .27582E-04   -1.5453    
   9  Prefactor     .10000E-03    7.2163        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    73.108        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     16.335        13.494        .99099E-04   -1.4899    
  12  Prefactor     2.5690        3.0254        .13318E-03   -1.5387    
  13  norm          4.0298        32.709        .20065E-03   -1.5306    
  14  Prefactor     13.652        32.952        .10833E-03   -1.4969    
  15  Prefactor     23.837        32.710        .82007E-04   -1.4731    
  16  Prefactor     40.217        26.198        .63203E-04   -1.4439    
  17  norm          3.2577        2.9470        .11389E-03   -1.5347    
  18  Prefactor     .10000E-03    176.56        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10000E-03    5.7855        .17107E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     2.7008        7.3783        .12392E-02   -1.5379    
  21  norm          10.932        5.8566        .11900E-03   -1.5047    
  22  Prefactor     .10000E-03    8.9921        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     16.339        12.059        .99147E-04   -1.4899    
  24  norm          .10001E-03    7.9158        .84554E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     .10000E-03    35.438        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  Prefactor     .10000E-03    11.599        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  27  Normalizat    1.5030        .28168        .24157E-03   -.77695    
  28  Prefactor     .60776        .22185        .30336E-03   -1.0726    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.10493e-08
Minuit parameter uncertainties:
  1  4.52864
  2  11.7894
  3  0.00653316
  4  6.60411
  5  0.00011962
  6  70.1245
  7  0.00242692
  8  0.505033
  9  1.60674e-05
  10  0.000396816
  11  13.4967
  12  3.02556
  13  22.9786
  14  32.9964
  15  32.7348
  16  26.205
  17  2.94714
  18  0.000583258
  19  7.03172e-06
  20  7.3808
  21  5.85692
  22  3.91748e-05
  23  12.0609
  24  0.000520955
  25  3.2675e-06
  26  7.24362e-05
  27  0.281977
  28  0.222169
Done.

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

Extracting fit parameters...

4FGL J2221.9-3504
   Spectrum: PowerLaw
253    Prefactor:  1.633e+01  1.350e+01  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:  6.078e-01  2.222e-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.503e+00  2.820e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 2.11
Ra Dec: 335.497 -35.071
Photon Index (Fixed Index): 2.68 +/- 0.00
Photon Flux (Fixed Index): 7.88e-08 +/- 6.50e-08
Energy Flux (Fixed Index): 1.93e-05 +/- 1.60e-05

TS (Fixed Index): 2.11
Ra Dec: 335.497 -35.071
Photon Flux Upper Limit: 2.03e-07 ph cm-2 s-1
Energy Flux Upper Limit: 1.59e-02 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/270373/likelihoodResults_307756801_308016001_4FGL_J2221.9-3504_daily_bin264.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) = 5328.75245167
delta logL = 0.273641770475

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5328.74143678
delta logL = 0.284656658032

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    10.297       1.0000         .10000E-03   10000.    
     2 'Index     '    3.3551       1.0000          .0000       10.000    
     3 'Normalizat'    1.4615       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .63550       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=   5328.741     FROM MIGRAD    STATUS=CONVERGED     89 CALLS      303 TOTAL
                     EDM=   .14E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     10.292        16.694        .12486E-03   -.28999E-03
   2  Index         3.3556        1.2925        .65605E-02   -.64743E-04
   3  Normalizat    1.4617        .27137        .24425E-03    .48799E-04
   4  Prefactor     .63538        .22249        .29732E-03    .14752E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 10.2924
  Index      = 3.35561
  Normalizat = 1.46167
  Prefactor  = 0.635381
 **********
 **   18 **HESSE 
 **********

 FCN=   5328.741     FROM HESSE     STATUS=OK            25 CALLS      328 TOTAL
                     EDM=   .17E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     10.292        13.778        .49946E-05   -1.5066    
   2  Index         3.3556        1.0696        .26242E-03   -.33512    
   3  Normalizat    1.4617        .27159        .48849E-04   -.78861    
   4  Prefactor     .63538        .22226        .11893E-04   -1.0612    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.6755e-10
Minuit parameter uncertainties:
  1  13.7818
  2  1.07893
  3  0.271862
  4  0.222573
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/270373': 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) = 5328.74143648
delta logL = 0.284656963016

Extracting fit parameters...

4FGL J2221.9-3504
   Spectrum: PowerLaw
253    Prefactor:  1.029e+01  1.378e+01  1.000e-04  1.000e+04 ( 1.000e-12)
254        Index:  3.356e+00  1.079e+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:  6.354e-01  2.226e-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.462e+00  2.719e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 2.75
Ra Dec: 335.497 -35.071
Photon Index (Free Index): 3.36 +/- 1.08
Photon Flux (Free Index): 1.08e-07 +/- 7.85e-08
Energy Flux (Free Index): 1.87e-05 +/- 1.36e-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/270373/cmap_HighResolution_307756801_308016001_4FGL_J2221.9-3504_daily_bin264.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.59e-02', comment='SUCCESS', photon_flux='7.88e-08', energy_flux2='1.87e-05', photon_flux_error='6.50e-08', dlogl='2.85e-01', energy_flux='1.93e-05', photon_flux2='1.08e-07', job_status='DONE', time_completed='2021-09-28 10:01:40.766039', photon_index_error2='1.08', photon_index2='3.36', ts='2.11', fit_tolerance='1e-08', GAL='0.61', photon_index_error='0.00', photon_flux_upper_limit='2.03e-07', energy_flux_error2='1.36e-05', EG='1.50', time_epoch_completed='1632848500.77', return_code='0', job_id='270373', GAL2='0.64', EG2='1.46', return_code2='0', energy_flux_error='1.60e-05', photon_flux_error2='7.85e-08', ts2='2.75', photon_index='2.68' WHERE bin_id='264' AND source_name='4FGL J2221.9-3504' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Tue Sep 28 10:01:40 PDT 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0160>
Subject: Job 270373: <4FGL_J2221.9-3504_daily_bin264> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2221.9-3504_daily_bin264 335.497 -35.0712 307756801 308016001 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 :                                   710.02 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             251.45 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   968 sec.
    Turnaround time :                            958 sec.

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

