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


Performing analysis on: 4FGL_J2221.9-3504_daily_bin252
RA = 335.497, Dec = -35.0712
tmin = 304646401, tmax = 304905601
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='270355', job_status='RUN', time_executed='2021-09-28 09:49:28.624747', time_epoch_executed='1632847768.62' WHERE source_name='4FGL J2221.9-3504' and cadence='daily' and bin_id='252'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/270355

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/270355/ft1_4FGL_J2221.9-3504_daily_bin252.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/270355/ft2_4FGL_J2221.9-3504_daily_bin252.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/270355/ft1_4FGL_J2221.9-3504_daily_bin252.fits outfile=/scratch/kocevski/270355/ft1_filteredMKT_4FGL_J2221.9-3504_daily_bin252.fits ra=335.497 dec=-35.0712 rad=12.0 tmin=304646401.0 tmax=304905601.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 2.66
user 2.46
sys 0.19

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/270355/ft2_4FGL_J2221.9-3504_daily_bin252.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/270355/ft1_filteredMKT_4FGL_J2221.9-3504_daily_bin252.fits evtable="EVENTS" outfile="/scratch/kocevski/270355/ft1_filtered_4FGL_J2221.9-3504_daily_bin252.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.41
user 0.27
sys 0.13

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/270355/ft1_filtered_4FGL_J2221.9-3504_daily_bin252.fits" evtable="EVENTS" scfile=/scratch/kocevski/270355/ft2_4FGL_J2221.9-3504_daily_bin252.fits sctable="SC_DATA" outfile=/scratch/kocevski/270355/ltcube_304646401_304905601_4FGL_J2221.9-3504_daily_bin252.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/270355/ft2_4FGL_J2221.9-3504_daily_bin252.fits
.....................!
real 9.15
user 8.87
sys 0.26

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/270355/ft1_filtered_4FGL_J2221.9-3504_daily_bin252.fits evtable="EVENTS" scfile=/scratch/kocevski/270355/ft2_4FGL_J2221.9-3504_daily_bin252.fits sctable="SC_DATA" expcube=/scratch/kocevski/270355/ltcube_304646401_304905601_4FGL_J2221.9-3504_daily_bin252.fits outfile=/scratch/kocevski/270355/expmap_304646401_304905601_4FGL_J2221.9-3504_daily_bin252.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/270355/ltcube_304646401_304905601_4FGL_J2221.9-3504_daily_bin252.fits
.....................!
real 145.00
user 141.05
sys 3.70

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/270355/ft1_filtered_4FGL_J2221.9-3504_daily_bin252.fits scfile=/scratch/kocevski/270355/ft2_4FGL_J2221.9-3504_daily_bin252.fits outfile=/scratch/kocevski/270355/cmap_304646401_304905601_4FGL_J2221.9-3504_daily_bin252.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.48
user 0.30
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/270355/ft1_filtered_4FGL_J2221.9-3504_daily_bin252.fits scfile=/scratch/kocevski/270355/ft2_4FGL_J2221.9-3504_daily_bin252.fits outfile=/scratch/kocevski/270355/cmap_HighResolution_304646401_304905601_4FGL_J2221.9-3504_daily_bin252.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.48
user 0.30
sys 0.14

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/270355/ft1_filtered_4FGL_J2221.9-3504_daily_bin252.fits evtable="EVENTS" scfile=/scratch/kocevski/270355/ft2_4FGL_J2221.9-3504_daily_bin252.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/270355/Model_4FGL_J2221.9-3504_daily_bin252.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/270355/ft1_filtered_4FGL_J2221.9-3504_daily_bin252.fits....................!
real 42.37
user 41.25
sys 1.02

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    6.1581       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    3.7213       1.0000         .10000E-03   10000.    
     4 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10280E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    32.903       1.0000         .10000E-03   10000.    
     7 'norm      '    8.5248       1.0000         .10000E-03   10000.    
     8 'norm      '    1.5668       1.0000         .10000E-03   10000.    
     9 'Prefactor '    7.9117       1.0000         .10000E-03   10000.    
    10 'Prefactor '    4.2444       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10010E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    6.7813       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    11.366       1.0000         .10000E-03   10000.    
    16 'Prefactor '    41.410       1.0000         .10000E-03   10000.    
    17 'norm      '    2.9203       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10140E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    6.8274       1.0000         .10000E-03   10000.    
    21 'norm      '    7.0212       1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10044E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    1.3972       1.0000         .10000E-03   10000.    
    24 'norm      '    .86532       1.0000         .10000E-03   10000.    
    25 'Prefactor '    6.4361       1.0000         .10000E-03   10000.    
    26 'Prefactor '    4.5066       1.0000         .10000E-03   10000.    
    27 'Normalizat'    .50964       1.0000         .10000E-01   10.000    
    28 'Prefactor '    1.1463       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.
 MACHINE ACCURACY LIMITS FURTHER IMPROVEMENT.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   7566.663     FROM MIGRAD    STATUS=CONVERGED    666 CALLS     3452 TOTAL
                     EDM=   .19E-05    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          6.1581        3.7760         .0000        .49774E-03
   2  Prefactor     .10000E-03    2.3779         .0000    ** at limit **
   3  Prefactor     3.7211        4.5729         .0000        .45652E-03
   4  norm          .10000E-03    2.6440         .0000    ** at limit **
   5  Prefactor     .10000E-03    9.2931         .0000    ** at limit **
   6  Prefactor     32.902        52.769         .0000        .12745E-02
   7  norm          8.5254        5.1878         .0000        .25832E-02
   8  norm          1.5669        .39520         .0000        .57095E-04
   9  Prefactor     7.9120        7.7275         .0000        .13633E-03
  10  Prefactor     4.2439        12.884         .0000        .22975E-02
  11  Prefactor     .10000E-03    1.8531         .0000    ** at limit **
  12  Prefactor     .10000E-03    1.2695         .0000    ** at limit **
  13  norm          6.7808        10.563         .0000       -.23891E-03
  14  Prefactor     .10000E-03    13.963         .0000    ** at limit **
  15  Prefactor     11.363        14.415         .0000       -.69683E-03
  16  Prefactor     41.410        16.874         .0000       -.22036E-03
  17  norm          2.9192        1.8128         .0000        .29762E-04
  18  Prefactor     .10000E-03    65.886         .0000    ** at limit **
  19  Prefactor     .10000E-03    2.4353         .0000    ** at limit **
  20  Prefactor     6.8275        5.7046         .0000        .34068E-03
  21  norm          7.0237        3.6799         .0000       -.57563E-03
  22  Prefactor     .10000E-03    4.1642         .0000    ** at limit **
  23  Prefactor     1.3871        8.6669         .0000        .33007E-01
  24  norm          .86563        .51404         .0000        .32351E-03
  25  Prefactor     6.4360        15.889         .0000        .73452E-03
  26  Prefactor     4.5096        5.3599         .0000       -.22211E-03
  27  Normalizat    .50965        .15222         .0000        .15740E-04
  28  Prefactor     1.1463        .14009         .0000       -.40277E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 6.15814
  Prefactor  = 0.0001
  Prefactor  = 3.72111
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 32.902
  norm       = 8.52536
  norm       = 1.56688
  Prefactor  = 7.91198
  Prefactor  = 4.24387
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 6.7808
  Prefactor  = 0.0001
  Prefactor  = 11.363
  Prefactor  = 41.41
  norm       = 2.91916
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 6.82747
  norm       = 7.02367
  Prefactor  = 0.0001
  Prefactor  = 1.38708
  norm       = 0.865627
  Prefactor  = 6.436
  Prefactor  = 4.50956
  Normalizat = 0.509648
  Prefactor  = 1.14627
 **********
 **   18 **HESSE 
 **********

 FCN=   7566.663     FROM HESSE     STATUS=OK           517 CALLS     3969 TOTAL
                     EDM=   .16E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          6.1581        3.7767        .12804E-03   -1.5212    
   2  Prefactor     .10000E-03    2.3983        .13094E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     3.7211        4.5653        .19952E-03   -1.5322    
   4  norm          .10000E-03    2.6752        .13809E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    9.2956        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     32.902        52.594        .69857E-04   -1.4560    
   7  norm          8.5254        5.2031        .12643E-03   -1.5124    
   8  norm          1.5669        .39774        .24978E-04   -1.5458    
   9  Prefactor     7.9120        7.7186        .14255E-03   -1.5145    
  10  Prefactor     4.2439        12.859        .97790E-03   -1.5296    
  11  Prefactor     .10000E-03    1.8630        .11561E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    1.2862        .95642E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          6.7808        10.556        .15408E-03   -1.5187    
  14  Prefactor     .10000E-03    13.982        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     11.363        14.415        .11883E-03   -1.5034    
  16  Prefactor     41.410        16.880        .62293E-04   -1.4420    
  17  norm          2.9192        1.8045        .89079E-04   -1.5366    
  18  Prefactor     .10000E-03    66.418        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10000E-03    2.4449        .13255E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     6.8275        5.6998        .15355E-03   -1.5185    
  21  norm          7.0237        3.6045        .10541E-03   -1.5178    
  22  Prefactor     .10000E-03    4.1652        .17308E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     1.3871        8.1990        .18176E-02   -1.5472    
  24  norm          .86563        .50991        .38996E-04   -1.5522    
  25  Prefactor     6.4360        15.879        .79101E-03   -1.5201    
  26  Prefactor     4.5096        5.3010        .18965E-03   -1.5283    
  27  Normalizat    .50965        .17263        .30278E-03   -1.1197    
  28  Prefactor     1.1463        .16085        .19804E-03   -.88001    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.59347e-08
Minuit parameter uncertainties:
  1  3.77689
  2  4.08966e-06
  3  4.5657
  4  2.83704e-06
  5  5.11286e-05
  6  52.6679
  7  5.20335
  8  0.397744
  9  7.71958
  10  12.8672
  11  3.69354e-07
  12  7.71153e-07
  13  10.559
  14  1.42816e-06
  15  14.4196
  16  16.8819
  17  1.80452
  18  0.000161824
  19  2.11301e-06
  20  5.70022
  21  3.60465
  22  1.78047e-06
  23  6.74584
  24  0.509916
  25  15.8895
  26  5.30155
  27  0.17281
  28  0.160914
Done.

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

Extracting fit parameters...

4FGL J2221.9-3504
   Spectrum: PowerLaw
253    Prefactor:  1.000e-04  3.694e-07  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:  1.146e+00  1.609e-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:  5.096e-01  1.728e-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: 4.13e-08 ph cm-2 s-1
Energy Flux Upper Limit: 3.25e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/270355/likelihoodResults_304646401_304905601_4FGL_J2221.9-3504_daily_bin252.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) = 7566.6652948
delta logL = -0.0025432254015

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 7566.66275153
delta logL = 4.62059688289e-08

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10015E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.6664       1.0000          .0000       10.000    
     3 'Normalizat'    .50965       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1463       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=   7566.663     FROM MIGRAD    STATUS=CONVERGED     86 CALLS      237 TOTAL
                     EDM=   .41E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    1.9840        .11614E-02** at limit **
   2  Index         2.6557        6.3241        .50000        .50306E-04
   3  Normalizat    .50965        .16429        .30278E-03   -.43593E-04
   4  Prefactor     1.1463        .15769        .19804E-03   -.29702E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100005
  Index      = 2.65574
  Normalizat = 0.509648
  Prefactor  = 1.14627
 **********
 **   18 **HESSE 
 **********

 FCN=   7566.663     FROM HESSE     STATUS=OK            29 CALLS      266 TOTAL
                     EDM=   .49E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    1.8827        .23228E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.6557        6.3195        .50000       -.48799    
   3  Normalizat    .50965        .16442        .12111E-04   -1.1197    
   4  Prefactor     1.1463        .15780        .39607E-04   -.88001    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.85952e-09
Minuit parameter uncertainties:
  1  0.000190009
  2  4.42107
  3  0.164572
  4  0.15787
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/270355': 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) = 7566.66275133
delta logL = 2.40942426899e-07

Extracting fit parameters...

4FGL J2221.9-3504
   Spectrum: PowerLaw
253    Prefactor:  1.000e-04  1.900e-04  1.000e-04  1.000e+04 ( 1.000e-12)
254        Index:  2.656e+00  4.421e+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:  1.146e+00  1.579e-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:  5.096e-01  1.646e-01  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 -1.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  1.110e+00 [aplpy.core]
Saving /scratch/kocevski/270355/cmap_HighResolution_304646401_304905601_4FGL_J2221.9-3504_daily_bin252.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='3.25e-03', job_status='DONE', photon_flux_upper_limit='4.13e-08', time_completed='2021-09-28 10:00:14.553502', job_id='270355', GAL2='1.15', fit_tolerance='1e-08', EG2='0.51', EG='0.51', time_epoch_completed='1632848414.55', return_code2='0', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.15', dlogl='2.41e-07', ts2='-0.00', photon_index_error='0.00', photon_index='2.68' WHERE bin_id='252' AND source_name='4FGL J2221.9-3504' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Tue Sep 28 10:00:14 PDT 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0033>
Subject: Job 270355: <4FGL_J2221.9-3504_daily_bin252> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2221.9-3504_daily_bin252 335.497 -35.0712 304646401 304905601 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 :                                   644.25 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             276.88 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   870 sec.
    Turnaround time :                            873 sec.

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

