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


Performing analysis on: 4FGL_J2221.9-3504_daily_bin338
RA = 335.497, Dec = -35.0712
tmin = 326937601, tmax = 327196801
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='270483', job_status='RUN', time_executed='2021-09-28 09:47:54.375186', time_epoch_executed='1632847674.38' WHERE source_name='4FGL J2221.9-3504' and cadence='daily' and bin_id='338'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/270483

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

Retrieving the FT1 file...

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

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

Retrieving 45 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/270483/ft1_4FGL_J2221.9-3504_daily_bin338.fits


Retrieving the FT1 file...

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

Retrieving 45 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/270483/ft2_4FGL_J2221.9-3504_daily_bin338.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/270483/ft1_4FGL_J2221.9-3504_daily_bin338.fits outfile=/scratch/kocevski/270483/ft1_filteredMKT_4FGL_J2221.9-3504_daily_bin338.fits ra=335.497 dec=-35.0712 rad=12.0 tmin=326937601.0 tmax=327196801.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.34
user 3.11
sys 0.20

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/270483/ft2_4FGL_J2221.9-3504_daily_bin338.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/270483/ft1_filteredMKT_4FGL_J2221.9-3504_daily_bin338.fits evtable="EVENTS" outfile="/scratch/kocevski/270483/ft1_filtered_4FGL_J2221.9-3504_daily_bin338.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.33
sys 0.14

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/270483/ft1_filtered_4FGL_J2221.9-3504_daily_bin338.fits" evtable="EVENTS" scfile=/scratch/kocevski/270483/ft2_4FGL_J2221.9-3504_daily_bin338.fits sctable="SC_DATA" outfile=/scratch/kocevski/270483/ltcube_326937601_327196801_4FGL_J2221.9-3504_daily_bin338.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/270483/ft2_4FGL_J2221.9-3504_daily_bin338.fits
.....................!
real 11.84
user 11.49
sys 0.31

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/270483/ft1_filtered_4FGL_J2221.9-3504_daily_bin338.fits evtable="EVENTS" scfile=/scratch/kocevski/270483/ft2_4FGL_J2221.9-3504_daily_bin338.fits sctable="SC_DATA" expcube=/scratch/kocevski/270483/ltcube_326937601_327196801_4FGL_J2221.9-3504_daily_bin338.fits outfile=/scratch/kocevski/270483/expmap_326937601_327196801_4FGL_J2221.9-3504_daily_bin338.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/270483/ltcube_326937601_327196801_4FGL_J2221.9-3504_daily_bin338.fits
.....................!
real 192.18
user 186.53
sys 5.29

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/270483/ft1_filtered_4FGL_J2221.9-3504_daily_bin338.fits scfile=/scratch/kocevski/270483/ft2_4FGL_J2221.9-3504_daily_bin338.fits outfile=/scratch/kocevski/270483/cmap_326937601_327196801_4FGL_J2221.9-3504_daily_bin338.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/270483/ft1_filtered_4FGL_J2221.9-3504_daily_bin338.fits scfile=/scratch/kocevski/270483/ft2_4FGL_J2221.9-3504_daily_bin338.fits outfile=/scratch/kocevski/270483/cmap_HighResolution_326937601_327196801_4FGL_J2221.9-3504_daily_bin338.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.55
user 0.39
sys 0.15

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    3.1003       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10006E-03   1.0000         .10000E-03   10000.    
     4 'norm      '    .10032E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .47745E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    3.5309       1.0000         .10000E-03   10000.    
     7 'norm      '    .10137E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    2.2039       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10014E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    74.272       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10026E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    1.0846       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10019E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    3.2208       1.0000         .10000E-03   10000.    
    20 'Prefactor '    5.3005       1.0000         .10000E-03   10000.    
    21 'norm      '    6.9174       1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10010E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    12.399       1.0000         .10000E-03   10000.    
    24 'norm      '    .90303       1.0000         .10000E-03   10000.    
    25 'Prefactor '    29.893       1.0000         .10000E-03   10000.    
    26 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    27 'Normalizat'    .93656       1.0000         .10000E-01   10.000    
    28 'Prefactor '    .92687       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=   6590.117     FROM MIGRAD    STATUS=CONVERGED    659 CALLS     3460 TOTAL
                     EDM=   .15E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.6%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          3.0992        4.6551        .39544E-06   -.28439E-04
   2  Prefactor     .10000E-03    2.9402        .34588E-07** at limit **
   3  Prefactor     .10000E-03    2.8926        .98786E-07** at limit **
   4  norm          .10000E-03    4.7106        .41562E-06** at limit **
   5  Prefactor     .10000E-03    61.293       -.16944E-04** at limit **
   6  Prefactor     3.4965        139.64       -.10926E-05    .33626E-04
   7  norm          .10000E-03    2.9317       -.71958E-06** at limit **
   8  norm          2.2038        .47875        .92815E-08    .15959E-02
   9  Prefactor     .10000E-03    11.211       -.75213E-06** at limit **
  10  Prefactor     .10000E-03    8.5751        .38829E-06** at limit **
  11  Prefactor     .10000E-03    3.3541        .26464E-06** at limit **
  12  Prefactor     .10000E-03    1.0700        .56999E-07** at limit **
  13  norm          .10000E-03    11.804       -.33082E-06** at limit **
  14  Prefactor     .10000E-03    10.998       -.27826E-06** at limit **
  15  Prefactor     74.281        26.428        .42400E-06    .14706E-03
  16  Prefactor     .10000E-03    9.0208        .42936E-06** at limit **
  17  norm          1.0847        1.7126        .14003E-06    .15662E-03
  18  Prefactor     .10000E-03    14.373        .67186E-06** at limit **
  19  Prefactor     3.2215        6.3033        .31475E-06   -.12621E-04
  20  Prefactor     5.3018        6.9231        .14375E-06   -.11215E-04
  21  norm          6.9173        4.3442        .63528E-06   -.11971E-03
  22  Prefactor     .10000E-03    5.8988       -.41016E-06** at limit **
  23  Prefactor     12.403        10.727       -.53463E-06   -.11171E-04
  24  norm          .90278        .76192        .17677E-07   -.20139E-03
  25  Prefactor     29.871        53.688       -.26247E-05   -.86733E-04
  26  Prefactor     .10000E-03    4.0159       -.17765E-06** at limit **
  27  Normalizat    .93635        .17231        .39152E-06    .10025E-03
  28  Prefactor     .92703        .15096       -.42763E-06    .19480E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 3.09922
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.000100004
  Prefactor  = 3.49649
  norm       = 0.0001
  norm       = 2.20379
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 74.2814
  Prefactor  = 0.0001
  norm       = 1.08475
  Prefactor  = 0.0001
  Prefactor  = 3.22147
  Prefactor  = 5.30177
  norm       = 6.91731
  Prefactor  = 0.0001
  Prefactor  = 12.4029
  norm       = 0.902779
  Prefactor  = 29.8709
  Prefactor  = 0.0001
  Normalizat = 0.936349
  Prefactor  = 0.927028
 **********
 **   18 **HESSE 
 **********

 FCN=   6590.117     FROM HESSE     STATUS=OK           513 CALLS     3973 TOTAL
                     EDM=   .32E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          3.0992        4.6580        .20520E-03   -1.5356    
   2  Prefactor     .10000E-03    2.9602        .13592E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .10000E-03    2.9010        .13482E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  norm          .10000E-03    4.7657        .17212E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    61.312        .42360E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     3.4965        141.48        .21513E-03   -1.5334    
   7  norm          .10000E-03    2.9781        .13535E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          2.2038        .47900        .24904E-04   -1.5411    
   9  Prefactor     .10000E-03    11.332        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    8.6322        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    3.3761        .14512E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    1.0785        .81980E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .10000E-03    11.845        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10000E-03    11.007        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     74.281        26.543        .46588E-04   -1.3982    
  16  Prefactor     .10000E-03    9.0372        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          1.0847        1.4322        .12888E-02   -1.5500    
  18  Prefactor     .10000E-03    14.406        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     3.2215        6.2874        .22573E-03   -1.5349    
  20  Prefactor     5.3018        6.9363        .17457E-03   -1.5247    
  21  norm          6.9173        4.3278        .60440E-03   -1.5182    
  22  Prefactor     .10000E-03    5.9108        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     12.403        11.068        .11376E-03   -1.5003    
  24  norm          .90278        .77213        .48895E-04   -1.5518    
  25  Prefactor     29.871        54.358        .73280E-04   -1.4614    
  26  Prefactor     .10000E-03    4.0188        .15881E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  27  Normalizat    .93635        .20251        .25372E-03   -.95194    
  28  Prefactor     .92703        .17729        .23031E-03   -.95203    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.22892e-10
Minuit parameter uncertainties:
  1  4.65852
  2  3.87057e-06
  3  1.42251e-06
  4  2.35799e-05
  5  0.000990207
  6  44.5965
  7  1.14133e-05
  8  0.479001
  9  2.92487e-05
  10  4.01201e-05
  11  1.57967e-06
  12  7.22392e-07
  13  5.0488e-05
  14  3.70942e-05
  15  26.547
  16  2.76199e-05
  17  1.43222
  18  8.14583e-05
  19  6.28873
  20  6.93733
  21  4.32798
  22  3.07376e-05
  23  11.0703
  24  0.77214
  25  54.4488
  26  9.43142e-06
  27  0.202676
  28  0.177403
Done.

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

Extracting fit parameters...

4FGL J2221.9-3504
   Spectrum: PowerLaw
253    Prefactor:  1.000e-04  1.580e-06  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.270e-01  1.774e-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:  9.363e-01  2.027e-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.15e-08 ph cm-2 s-1
Energy Flux Upper Limit: 4.84e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/270483/likelihoodResults_326937601_327196801_4FGL_J2221.9-3504_daily_bin338.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) = 6590.11817558
delta logL = -0.0014112089857

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 6590.11676451
delta logL = -1.34407855512e-07

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10077E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.6840       1.0000          .0000       10.000    
     3 'Normalizat'    .93632       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .92708       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=   6590.117     FROM MIGRAD    STATUS=CONVERGED    143 CALLS      290 TOTAL
                     EDM=   .20E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .15625E-02    .20031        .14540E-01** at limit **
   2  Index         5.3536        7.0774        .50000        .16640E-04
   3  Normalizat    .93604        .44266E-02    .25372E-03    .21060E-05
   4  Prefactor     .92720        .40221E-02    .23031E-03    .83916E-06
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.00156246
  Index      = 5.35357
  Normalizat = 0.936042
  Prefactor  = 0.927199
 **********
 **   18 **HESSE 
 **********

 FCN=   6590.117     FROM HESSE     STATUS=NOT POSDEF    39 CALLS      329 TOTAL
                     EDM=   .37E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .15625E-02    .45455        .10272E-01   -1.5716    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         5.3536        6.3315        .50000        .70773E-01
   3  Normalizat    .93604        .51515E-02    .10149E-04   -.95205    
   4  Prefactor     .92720        .46808E-02    .92125E-05   -.95197    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 3.68713e-09
Minuit parameter uncertainties:
  1  0.0515661
  2  13.6269
  3  0.00515152
  4  0.00468084
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/270483': 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) = 6590.11673181
delta logL = 3.25629807776e-05

Extracting fit parameters...

4FGL J2221.9-3504
   Spectrum: PowerLaw
253    Prefactor:  1.562e-03  5.157e-02  1.000e-04  1.000e+04 ( 1.000e-12)
254        Index:  5.354e+00  1.363e+01  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.272e-01  4.681e-03  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:  9.360e-01  5.152e-03  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/270483/cmap_HighResolution_326937601_327196801_4FGL_J2221.9-3504_daily_bin338.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='4.84e-03', job_status='DONE', photon_flux_upper_limit='6.15e-08', time_completed='2021-09-28 10:01:05.626169', job_id='270483', GAL2='0.93', fit_tolerance='1e-08', EG2='0.94', EG='0.94', time_epoch_completed='1632848465.63', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.93', dlogl='3.26e-05', ts2='0.00', photon_index_error='0.00', photon_index='2.68' WHERE bin_id='338' AND source_name='4FGL J2221.9-3504' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Tue Sep 28 10:01:05 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0076>
Subject: Job 270483: <4FGL_J2221.9-3504_daily_bin338> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2221.9-3504_daily_bin338 335.497 -35.0712 326937601 327196801 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 :                                   789.21 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             316.90 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   911 sec.
    Turnaround time :                            914 sec.

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

