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


Performing analysis on: 4FGL_J2221.9-3504_daily_bin261
RA = 335.497, Dec = -35.0712
tmin = 306979201, tmax = 307238401
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='270368', job_status='RUN', time_executed='2021-09-28 09:48:04.811827', time_epoch_executed='1632847684.81' WHERE source_name='4FGL J2221.9-3504' and cadence='daily' and bin_id='261'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/270368

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/270368/ft1_4FGL_J2221.9-3504_daily_bin261.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/270368/ft2_4FGL_J2221.9-3504_daily_bin261.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/270368/ft1_4FGL_J2221.9-3504_daily_bin261.fits outfile=/scratch/kocevski/270368/ft1_filteredMKT_4FGL_J2221.9-3504_daily_bin261.fits ra=335.497 dec=-35.0712 rad=12.0 tmin=306979201.0 tmax=307238401.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 14.53
user 14.03
sys 0.37

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/270368/ft1_filtered_4FGL_J2221.9-3504_daily_bin261.fits" evtable="EVENTS" scfile=/scratch/kocevski/270368/ft2_4FGL_J2221.9-3504_daily_bin261.fits sctable="SC_DATA" outfile=/scratch/kocevski/270368/ltcube_306979201_307238401_4FGL_J2221.9-3504_daily_bin261.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/270368/ft2_4FGL_J2221.9-3504_daily_bin261.fits
.....................!
real 11.26
user 10.87
sys 0.30

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/270368/ft1_filtered_4FGL_J2221.9-3504_daily_bin261.fits evtable="EVENTS" scfile=/scratch/kocevski/270368/ft2_4FGL_J2221.9-3504_daily_bin261.fits sctable="SC_DATA" expcube=/scratch/kocevski/270368/ltcube_306979201_307238401_4FGL_J2221.9-3504_daily_bin261.fits outfile=/scratch/kocevski/270368/expmap_306979201_307238401_4FGL_J2221.9-3504_daily_bin261.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/270368/ltcube_306979201_307238401_4FGL_J2221.9-3504_daily_bin261.fits
.....................!
real 190.74
user 184.86
sys 4.65

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/270368/ft1_filtered_4FGL_J2221.9-3504_daily_bin261.fits scfile=/scratch/kocevski/270368/ft2_4FGL_J2221.9-3504_daily_bin261.fits outfile=/scratch/kocevski/270368/cmap_306979201_307238401_4FGL_J2221.9-3504_daily_bin261.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.54
user 0.36
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/270368/ft1_filtered_4FGL_J2221.9-3504_daily_bin261.fits scfile=/scratch/kocevski/270368/ft2_4FGL_J2221.9-3504_daily_bin261.fits outfile=/scratch/kocevski/270368/cmap_HighResolution_306979201_307238401_4FGL_J2221.9-3504_daily_bin261.fits algorithm="CMAP" ebinalg="LOG" emin=30.0 emax=200000.0 ebinfile=NONE tbinalg="LIN" tbinfile=NONE nxpix=500 nypix=500 binsz=0.1 coordsys="CEL" xref=335.497 yref=-35.0712 axisrot=0.0 rafield="RA" decfield="DEC" proj="AIT" hpx_ordering_scheme="RING" hpx_order=3 hpx_ebin=yes hpx_region="" evtable="EVENTS" sctable="SC_DATA" efield="ENERGY" tfield="TIME" chatter=2 clobber=yes debug=no gui=no mode="ql"

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

This is gtbin version HEAD
real 0.54
user 0.38
sys 0.15

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/270368/ft1_filtered_4FGL_J2221.9-3504_daily_bin261.fits evtable="EVENTS" scfile=/scratch/kocevski/270368/ft2_4FGL_J2221.9-3504_daily_bin261.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/270368/Model_4FGL_J2221.9-3504_daily_bin261.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/270368/ft1_filtered_4FGL_J2221.9-3504_daily_bin261.fits.........................!
real 19.11
user 17.75
sys 1.22

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .10003E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10007E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10006E-03   1.0000         .10000E-03   10000.    
     4 'norm      '    .10007E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10413E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10371E-03   1.0000         .10000E-03   10000.    
     7 'norm      '    27.949       1.0000         .10000E-03   10000.    
     8 'norm      '    .70674       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10012E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    9.2174       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    78.831       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .21230E-02   1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10181E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    125.32       1.0000         .10000E-03   10000.    
    17 'norm      '    .96520       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .27752E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    48.072       1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
    21 'norm      '    .10015E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10129E-03   1.0000         .10000E-03   10000.    
    24 'norm      '    .10044E-03   1.0000         .10000E-03   10000.    
    25 'Prefactor '    .10120E-03   1.0000         .10000E-03   10000.    
    26 'Prefactor '    .10078E-03   1.0000         .10000E-03   10000.    
    27 'Normalizat'    1.0943       1.0000         .10000E-01   10.000    
    28 'Prefactor '    .86385       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=   867.6475     FROM MIGRAD    STATUS=CONVERGED    677 CALLS     3450 TOTAL
                     EDM=   .19E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .6%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .10000E-03    30.887        .89399E-05** at limit **
   2  Prefactor     .10000E-03    23.858       -.22559E-04** at limit **
   3  Prefactor     .10000E-03    33.578        .19256E-04** at limit **
   4  norm          .10000E-03    15.956       -.12883E-04** at limit **
   5  Prefactor     .10000E-03    42.671       -.13174E-04** at limit **
   6  Prefactor     .10000E-03    210.94       -.13696E-04** at limit **
   7  norm          27.947        22.386        .20748E-05    .41060E-04
   8  norm          .70672        .81288       -.30242E-07    .17435E-03
   9  Prefactor     .10000E-03    13.471        .61180E-05** at limit **
  10  Prefactor     .10000E-03    19.661        .10462E-04** at limit **
  11  Prefactor     9.2085        49.730       -.82822E-05   -.52550E-05
  12  Prefactor     .10000E-03    17.577        .10685E-04** at limit **
  13  norm          78.841        77.265        .82229E-05   -.13050E-04
  14  Prefactor     .10001E-03    1780.0       -.65964E-03** at limit **
  15  Prefactor     .10000E-03    42.411       -.11432E-04** at limit **
  16  Prefactor     125.35        115.44        .22162E-04    .23296E-03
  17  norm          .95984        8.3519        .55374E-06   -.12684E-03
  18  Prefactor     .10000E-03    363.30       -.19307E-04** at limit **
  19  Prefactor     48.112        52.399        .23060E-04   -.39698E-04
  20  Prefactor     .10000E-03    20.838       -.49382E-06** at limit **
  21  norm          .10000E-03    3.6448       -.14044E-06** at limit **
  22  Prefactor     .10000E-03    12.887       -.29349E-05** at limit **
  23  Prefactor     .10000E-03    9.2210        .93716E-07** at limit **
  24  norm          .10000E-03    .94212       -.14581E-06** at limit **
  25  Prefactor     .10000E-03    107.97        .19922E-04** at limit **
  26  Prefactor     .10000E-03    30.132        .51099E-05** at limit **
  27  Normalizat    1.0939        .66036       -.27315E-04    .24006E-03
  28  Prefactor     .86421        .49728        .11295E-04   -.24236E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 27.9474
  norm       = 0.706715
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 9.20847
  Prefactor  = 0.0001
  norm       = 78.8413
  Prefactor  = 0.000100005
  Prefactor  = 0.0001
  Prefactor  = 125.352
  norm       = 0.959845
  Prefactor  = 0.0001
  Prefactor  = 48.1122
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Normalizat = 1.09393
  Prefactor  = 0.864214
 **********
 **   18 **HESSE 
 **********

 FCN=   867.6475     FROM HESSE     STATUS=OK           503 CALLS     3953 TOTAL
                     EDM=   .58E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .10000E-03    30.887        .16000E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    23.854        .14058E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .10000E-03    33.581        .16683E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  norm          .10000E-03    15.955        .11495E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    42.684        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    211.03        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  norm          27.947        22.552        .75779E-04   -1.4650    
   8  norm          .70672        .81156        .27155E-04   -1.5540    
   9  Prefactor     .10000E-03    13.480        .10563E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    19.675        .12763E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     9.2085        50.569        .13201E-03   -1.5101    
  12  Prefactor     .10000E-03    17.581        .12066E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          78.841        76.857        .45231E-04   -1.3930    
  14  Prefactor     .10001E-03    1791.1        .20175E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .10000E-03    42.418        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     125.35        116.03        .17979E-03   -1.3464    
  17  norm          .95984        8.1332        .15364E-03   -1.5512    
  18  Prefactor     .10000E-03    363.34        .21422E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     48.112        54.416        .57834E-04   -1.4320    
  20  Prefactor     .10000E-03    20.843        .13139E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  norm          .10000E-03    3.6465        .54926E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     .10000E-03    12.890        .10331E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10000E-03    9.2339        .87364E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  norm          .10000E-03    .99044        .55638E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     .10000E-03    107.97        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  Prefactor     .10000E-03    30.231        .15796E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  27  Normalizat    1.0939        .84290        .28852E-03   -.89947    
  28  Prefactor     .86421        .63028        .26800E-03   -.97403    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 5.82653e-09
Minuit parameter uncertainties:
  1  2.13722e-06
  2  2.02235e-05
  3  1.1546e-05
  4  1.66264e-05
  5  1.84248e-05
  6  0.00016203
  7  22.5588
  8  0.81157
  9  7.25348e-06
  10  1.46321e-05
  11  43.2147
  12  8.18803e-06
  13  76.9538
  14  0.00643648
  15  6.1449e-05
  16  116.242
  17  5.5888
  18  0.000101567
  19  54.4724
  20  1.3037e-05
  21  1.07552e-05
  22  9.28636e-06
  23  3.00679e-05
  24  2.71014e-06
  25  7.01649e-05
  26  1.27142e-06
  27  0.853598
  28  0.635687
Done.

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

Extracting fit parameters...

4FGL J2221.9-3504
   Spectrum: PowerLaw
253    Prefactor:  9.208e+00  4.321e+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:  8.642e-01  6.357e-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.094e+00  8.536e-01  1.000e-02  1.000e+01 ( 1.000e+00)


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

Saving results to:
/scratch/kocevski/270368/likelihoodResults_306979201_307238401_4FGL_J2221.9-3504_daily_bin261.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) = 867.564103737
delta logL = 0.0834318890174

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 867.548621547
delta logL = 0.098914079012

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    7.9333       1.0000         .10000E-03   10000.    
     2 'Index     '    4.0152       1.0000          .0000       10.000    
     3 'Normalizat'    .96536       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .93744       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=   867.5486     FROM MIGRAD    STATUS=CONVERGED     88 CALLS      283 TOTAL
                     EDM=   .30E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     7.9220        52.556        .14236E-03   -.47916E-06
   2  Index         4.0156        3.7951        .76660E-02   -.67638E-05
   3  Normalizat    .96670        .79167        .30432E-03   -.16680E-04
   4  Prefactor     .93629        .63397        .25853E-03    .60243E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 7.92198
  Index      = 4.01564
  Normalizat = 0.9667
  Prefactor  = 0.936285
 **********
 **   18 **HESSE 
 **********

 FCN=   867.5486     FROM HESSE     STATUS=OK            25 CALLS      308 TOTAL
                     EDM=   .30E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     7.9220        30.696        .56943E-05   -1.5145    
   2  Index         4.0156        3.0183        .30664E-03   -.19817    
   3  Normalizat    .96670        .79165        .12173E-04   -.94155    
   4  Prefactor     .93629        .63244        .51707E-04   -.94884    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.03065e-10
Minuit parameter uncertainties:
  1  30.7574
  2  3.25157
  3  0.801549
  4  0.637514
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/270368': 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) = 867.548619764
delta logL = 0.0989158618581

Extracting fit parameters...

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

GAL_V02
   Spectrum: PowerLaw
560    Prefactor:  9.363e-01  6.375e-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.667e-01  8.015e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.05
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/270368/cmap_HighResolution_306979201_307238401_4FGL_J2221.9-3504_daily_bin261.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='5.10e-02', job_status='DONE', photon_flux_upper_limit='6.49e-07', time_completed='2021-09-28 09:55:14.129240', job_id='270368', GAL2='0.94', fit_tolerance='1e-08', EG2='0.97', EG='1.09', time_epoch_completed='1632848114.13', return_code2='0', ts='0.05', comment='SUCCESS', return_code='0', GAL='0.86', dlogl='9.89e-02', ts2='0.29', photon_index_error='0.00', photon_index='2.68' WHERE bin_id='261' AND source_name='4FGL J2221.9-3504' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Tue Sep 28 09:55:14 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0202>
Subject: Job 270368: <4FGL_J2221.9-3504_daily_bin261> in cluster <slac> Done

Job <4FGL_J2221.9-3504_daily_bin261> 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) <bullet0202>, 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 09:55:14 2021
Results reported at Tue Sep 28 09:55:14 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2221.9-3504_daily_bin261 335.497 -35.0712 306979201 307238401 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 :                                   425.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             265.40 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   569 sec.
    Turnaround time :                            571 sec.

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

