/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 52 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 = 7452
number of fields = 30
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J2221.9-3504_daily_bin1006
RA = 335.497, Dec = -35.0712
tmin = 500083201, tmax = 500342401
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='273514', job_status='RUN', time_executed='2021-09-28 09:57:02.482892', time_epoch_executed='1632848222.48' WHERE source_name='4FGL J2221.9-3504' and cadence='daily' and bin_id='1006'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/273514

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/273514/ft1_4FGL_J2221.9-3504_daily_bin1006.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/273514/ft2_4FGL_J2221.9-3504_daily_bin1006.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/273514/ft1_4FGL_J2221.9-3504_daily_bin1006.fits outfile=/scratch/kocevski/273514/ft1_filteredMKT_4FGL_J2221.9-3504_daily_bin1006.fits ra=335.497 dec=-35.0712 rad=12.0 tmin=500083201.0 tmax=500342401.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 5.62
user 5.40
sys 0.21

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/273514/ft1_filtered_4FGL_J2221.9-3504_daily_bin1006.fits" evtable="EVENTS" scfile=/scratch/kocevski/273514/ft2_4FGL_J2221.9-3504_daily_bin1006.fits sctable="SC_DATA" outfile=/scratch/kocevski/273514/ltcube_500083201_500342401_4FGL_J2221.9-3504_daily_bin1006.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/273514/ft2_4FGL_J2221.9-3504_daily_bin1006.fits
.....................!
real 12.06
user 11.71
sys 0.32

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/273514/ft1_filtered_4FGL_J2221.9-3504_daily_bin1006.fits evtable="EVENTS" scfile=/scratch/kocevski/273514/ft2_4FGL_J2221.9-3504_daily_bin1006.fits sctable="SC_DATA" expcube=/scratch/kocevski/273514/ltcube_500083201_500342401_4FGL_J2221.9-3504_daily_bin1006.fits outfile=/scratch/kocevski/273514/expmap_500083201_500342401_4FGL_J2221.9-3504_daily_bin1006.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/273514/ltcube_500083201_500342401_4FGL_J2221.9-3504_daily_bin1006.fits
.....................!
real 191.27
user 186.39
sys 4.58

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/273514/ft1_filtered_4FGL_J2221.9-3504_daily_bin1006.fits scfile=/scratch/kocevski/273514/ft2_4FGL_J2221.9-3504_daily_bin1006.fits outfile=/scratch/kocevski/273514/cmap_500083201_500342401_4FGL_J2221.9-3504_daily_bin1006.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.36
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/273514/ft1_filtered_4FGL_J2221.9-3504_daily_bin1006.fits scfile=/scratch/kocevski/273514/ft2_4FGL_J2221.9-3504_daily_bin1006.fits outfile=/scratch/kocevski/273514/cmap_HighResolution_500083201_500342401_4FGL_J2221.9-3504_daily_bin1006.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.14

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/273514/ft1_filtered_4FGL_J2221.9-3504_daily_bin1006.fits evtable="EVENTS" scfile=/scratch/kocevski/273514/ft2_4FGL_J2221.9-3504_daily_bin1006.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/273514/Model_4FGL_J2221.9-3504_daily_bin1006.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/273514/ft1_filtered_4FGL_J2221.9-3504_daily_bin1006.fits.....................!
real 39.94
user 38.64
sys 1.20

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    10.969       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    11.753       1.0000         .10000E-03   10000.    
     4 'norm      '    .10037E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10035E-03   1.0000         .10000E-03   10000.    
     7 'norm      '    3.0448       1.0000         .10000E-03   10000.    
     8 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    4.0592       1.0000         .10000E-03   10000.    
    10 'Prefactor '    69.085       1.0000         .10000E-03   10000.    
    11 'Prefactor '    23.522       1.0000         .10000E-03   10000.    
    12 'Prefactor '    4.4367       1.0000         .10000E-03   10000.    
    13 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    2.6456       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10220E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10176E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10045E-03   1.0000         .10000E-03   10000.    
    21 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    24 'norm      '    .59788       1.0000         .10000E-03   10000.    
    25 'Prefactor '    16.957       1.0000         .10000E-03   10000.    
    26 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    27 'Normalizat'    1.3226       1.0000         .10000E-01   10.000    
    28 'Prefactor '    .73369       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=   3987.536     FROM MIGRAD    STATUS=CONVERGED    678 CALLS     3571 TOTAL
                     EDM=   .96E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  5.6%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          10.969        6.5504        .15204E-07   -.75453E-04
   2  Prefactor     .10000E-03    5.2914        .67973E-07** at limit **
   3  Prefactor     11.753        9.2257        .48837E-07   -.28789E-04
   4  norm          .10000E-03    18.194        .43178E-06** at limit **
   5  Prefactor     .10000E-03    8.6310       -.54775E-06** at limit **
   6  Prefactor     .10000E-03    24.607        .11429E-05** at limit **
   7  norm          3.0445        5.6797        .52430E-06    .10227E-03
   8  norm          .10000E-03    .20705        .95069E-07** at limit **
   9  Prefactor     4.0578        14.842        .79656E-05   -.31528E-03
  10  Prefactor     69.085        31.403       -.92630E-06   -.40764E-04
  11  Prefactor     23.521        16.248       -.68299E-07   -.53396E-04
  12  Prefactor     4.4365        6.9839        .16439E-06   -.14468E-03
  13  norm          .10000E-03    9.2368        .83729E-06** at limit **
  14  Prefactor     .10000E-03    27.584       -.55778E-06** at limit **
  15  Prefactor     2.6549        115.33        .52966E-05    .27487E-04
  16  Prefactor     .10000E-03    33.423       -.20666E-05** at limit **
  17  norm          .10000E-03    1.8382        .27430E-07** at limit **
  18  Prefactor     .10001E-03    88.793       -.37042E-05** at limit **
  19  Prefactor     .10000E-03    42.709        .19735E-05** at limit **
  20  Prefactor     .10031E-03    8.9537        .14990E-05** at limit **
  21  norm          .10000E-03    2.8547        .14270E-07** at limit **
  22  Prefactor     .10000E-03    7.6953        .28456E-07** at limit **
  23  Prefactor     .10000E-03    6.9560        .17241E-07** at limit **
  24  norm          .59787        .81866        .53314E-07   -.72166E-04
  25  Prefactor     16.906        227.41       -.19937E-04   -.89307E-04
  26  Prefactor     .10000E-03    10.624       -.34913E-06** at limit **
  27  Normalizat    1.3227        .26488        .29727E-06   -.16474E-03
  28  Prefactor     .73368        .19289       -.11356E-05   -.92713E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 10.9685
  Prefactor  = 0.0001
  Prefactor  = 11.753
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 3.04451
  norm       = 0.0001
  Prefactor  = 4.05781
  Prefactor  = 69.0849
  Prefactor  = 23.5214
  Prefactor  = 4.43654
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 2.65486
  Prefactor  = 0.000100002
  norm       = 0.0001
  Prefactor  = 0.000100006
  Prefactor  = 0.000100002
  Prefactor  = 0.000100309
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.597874
  Prefactor  = 16.9056
  Prefactor  = 0.0001
  Normalizat = 1.32266
  Prefactor  = 0.733678
 **********
 **   18 **HESSE 
 **********

 FCN=   3987.536     FROM HESSE     STATUS=OK           515 CALLS     4086 TOTAL
                     EDM=   .58E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          10.969        6.5509        .11949E-03   -1.5045    
   2  Prefactor     .10000E-03    5.3384        .14179E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     11.753        9.2237        .11685E-03   -1.5022    
   4  norm          .10000E-03    18.853        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    8.6711        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    24.676        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  norm          3.0445        5.5206        .18025E-03   -1.5359    
   8  norm          .10000E-03    .24408        .54135E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     4.0578        15.626        .10006E-02   -1.5305    
  10  Prefactor     69.085        31.454        .48293E-04   -1.4044    
  11  Prefactor     23.521        16.350        .82591E-04   -1.4738    
  12  Prefactor     4.4365        7.0073        .19118E-03   -1.5287    
  13  norm          .10000E-03    9.2832        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10000E-03    27.606        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     2.6549        116.58        .25065E-03   -1.5382    
  16  Prefactor     .10000E-03    33.768        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .10000E-03    1.8820        .83597E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10001E-03    90.008        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10000E-03    43.479        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10031E-03    79.369        .35882E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  norm          .10000E-03    2.8645        .10416E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     .10000E-03    7.6968        .17108E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10000E-03    6.9647        .16257E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  norm          .59787        .76393        .64883E-03   -1.5553    
  25  Prefactor     16.906        259.24        .97262E-04   -1.4885    
  26  Prefactor     .10000E-03    10.633        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  27  Normalizat    1.3227        .31831        .25412E-03   -.82893    
  28  Prefactor     .73368        .22852        .25618E-03   -1.0222    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 5.82349e-09
Minuit parameter uncertainties:
  1  6.55129
  2  5.30829e-07
  3  9.22477
  4  1.87501e-05
  5  8.54337e-05
  6  0.000200897
  7  5.52157
  8  4.48353e-06
  9  15.6416
  10  31.4616
  11  16.3532
  12  7.0086
  13  0.000106036
  14  0.000123097
  15  35.2577
  16  0.000504389
  17  2.55268e-06
  18  0.0014676
  19  0.000634037
  20  0.00991066
  21  1.01263e-06
  22  3.76429e-06
  23  3.06126e-06
  24  0.763943
  25  133.096
  26  4.65702e-05
  27  0.318784
  28  0.228811
Done.

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

Extracting fit parameters...

4FGL J2221.9-3504
   Spectrum: PowerLaw
253    Prefactor:  2.352e+01  1.635e+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:  7.337e-01  2.288e-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.323e+00  3.188e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 4.52
Ra Dec: 335.497 -35.071
Photon Index (Fixed Index): 2.68 +/- 0.00
Photon Flux (Fixed Index): 1.13e-07 +/- 7.88e-08
Energy Flux (Fixed Index): 2.78e-05 +/- 1.93e-05

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) = 3987.43483154
delta logL = 0.101124846773

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 3987.42844024
delta logL = 0.107516154113

Fit tolerance = 1e-08

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

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

 FCN=   3987.428     FROM MIGRAD    STATUS=CONVERGED     58 CALLS      259 TOTAL
                     EDM=   .58E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     20.716        302.51        .22008E-02    .40284E-03
   2  Index         3.0204        6.4552        .17907        .47344E-04
   3  Normalizat    1.2904        .12506        .58055E-01    .73507E-07
   4  Prefactor     .75106        .88259E-01    .43076E-01    .54235E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 20.7164
  Index      = 3.02041
  Normalizat = 1.29038
  Prefactor  = 0.751061
 **********
 **   18 **HESSE 
 **********

 FCN=   3987.428     FROM HESSE     STATUS=OK            33 CALLS      292 TOTAL
                     EDM=   .11E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     20.716        16.774        .44016E-03   -1.4797    
   2  Index         3.0204        .79100        .66846E-02   -.40707    
   3  Normalizat    1.2904        .30605        .25674E-03   -.83854    
   4  Prefactor     .75106        .23096        .25351E-03   -1.0156    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.11188e-09
Minuit parameter uncertainties:
  1  16.7782
  2  0.794962
  3  0.306478
  4  0.231255
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/273514': 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) = 3987.42843633
delta logL = 0.107520060588

Extracting fit parameters...

4FGL J2221.9-3504
   Spectrum: PowerLaw
253    Prefactor:  2.072e+01  1.678e+01  1.000e-04  1.000e+04 ( 1.000e-12)
254        Index:  3.020e+00  7.950e-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:  7.511e-01  2.313e-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.290e+00  3.065e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 4.76
Ra Dec: 335.497 -35.071
Photon Index (Free Index): 3.02 +/- 0.79
Photon Flux (Free Index): 1.46e-07 +/- 1.11e-07
Energy Flux (Free Index): 2.88e-05 +/- 1.85e-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/273514/cmap_HighResolution_500083201_500342401_4FGL_J2221.9-3504_daily_bin1006.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='1.13e-07', energy_flux2='2.88e-05', photon_flux_error='7.88e-08', dlogl='1.08e-01', energy_flux='2.78e-05', photon_flux2='1.46e-07', job_status='DONE', time_completed='2021-09-28 10:06:15.391885', photon_index_error2='0.79', photon_index2='3.02', ts='4.52', fit_tolerance='1e-08', GAL='0.73', photon_index_error='0.00', energy_flux_error2='1.85e-05', EG='1.32', time_epoch_completed='1632848775.39', return_code='0', job_id='273514', GAL2='0.75', EG2='1.29', return_code2='0', energy_flux_error='1.93e-05', photon_flux_error2='1.11e-07', ts2='4.76', photon_index='2.68' WHERE bin_id='1006' AND source_name='4FGL J2221.9-3504' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Tue Sep 28 10:06:15 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0058>
Subject: Job 273514: <4FGL_J2221.9-3504_daily_bin1006> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2221.9-3504_daily_bin1006 335.497 -35.0712 500083201 500342401 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 :                                   552.28 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             311.25 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   614 sec.
    Turnaround time :                            616 sec.

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

