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


Performing analysis on: 4FGL_J2221.9-3504_daily_bin221
RA = 335.497, Dec = -35.0712
tmin = 296611201, tmax = 296870401
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='270310', job_status='RUN', time_executed='2021-09-28 09:49:05.026916', time_epoch_executed='1632847745.03' WHERE source_name='4FGL J2221.9-3504' and cadence='daily' and bin_id='221'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/270310

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/270310/ft1_4FGL_J2221.9-3504_daily_bin221.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/270310/ft2_4FGL_J2221.9-3504_daily_bin221.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/270310/ft1_4FGL_J2221.9-3504_daily_bin221.fits outfile=/scratch/kocevski/270310/ft1_filteredMKT_4FGL_J2221.9-3504_daily_bin221.fits ra=335.497 dec=-35.0712 rad=12.0 tmin=296611201.0 tmax=296870401.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 4.34
user 4.10
sys 0.20

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/270310/ft1_filtered_4FGL_J2221.9-3504_daily_bin221.fits" evtable="EVENTS" scfile=/scratch/kocevski/270310/ft2_4FGL_J2221.9-3504_daily_bin221.fits sctable="SC_DATA" outfile=/scratch/kocevski/270310/ltcube_296611201_296870401_4FGL_J2221.9-3504_daily_bin221.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/270310/ft2_4FGL_J2221.9-3504_daily_bin221.fits
.....................!
real 11.73
user 11.40
sys 0.29

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/270310/ft1_filtered_4FGL_J2221.9-3504_daily_bin221.fits evtable="EVENTS" scfile=/scratch/kocevski/270310/ft2_4FGL_J2221.9-3504_daily_bin221.fits sctable="SC_DATA" expcube=/scratch/kocevski/270310/ltcube_296611201_296870401_4FGL_J2221.9-3504_daily_bin221.fits outfile=/scratch/kocevski/270310/expmap_296611201_296870401_4FGL_J2221.9-3504_daily_bin221.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/270310/ltcube_296611201_296870401_4FGL_J2221.9-3504_daily_bin221.fits
.....................!
real 190.22
user 185.21
sys 4.66

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/270310/ft1_filtered_4FGL_J2221.9-3504_daily_bin221.fits scfile=/scratch/kocevski/270310/ft2_4FGL_J2221.9-3504_daily_bin221.fits outfile=/scratch/kocevski/270310/cmap_296611201_296870401_4FGL_J2221.9-3504_daily_bin221.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.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/270310/ft1_filtered_4FGL_J2221.9-3504_daily_bin221.fits scfile=/scratch/kocevski/270310/ft2_4FGL_J2221.9-3504_daily_bin221.fits outfile=/scratch/kocevski/270310/cmap_HighResolution_296611201_296870401_4FGL_J2221.9-3504_daily_bin221.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.37
sys 0.15

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/270310/ft1_filtered_4FGL_J2221.9-3504_daily_bin221.fits evtable="EVENTS" scfile=/scratch/kocevski/270310/ft2_4FGL_J2221.9-3504_daily_bin221.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/270310/Model_4FGL_J2221.9-3504_daily_bin221.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/270310/ft1_filtered_4FGL_J2221.9-3504_daily_bin221.fits.....................!
real 53.95
user 52.04
sys 1.70

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    6.4358       1.0000         .10000E-03   10000.    
     2 'Prefactor '    3.3273       1.0000         .10000E-03   10000.    
     3 'Prefactor '    20.909       1.0000         .10000E-03   10000.    
     4 'norm      '    6.2300       1.0000         .10000E-03   10000.    
     5 'Prefactor '    8.3251       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     7 'norm      '    12.600       1.0000         .10000E-03   10000.    
     8 'norm      '    2.5193       1.0000         .10000E-03   10000.    
     9 'Prefactor '    7.3257       1.0000         .10000E-03   10000.    
    10 'Prefactor '    32.110       1.0000         .10000E-03   10000.    
    11 'Prefactor '    32.165       1.0000         .10000E-03   10000.    
    12 'Prefactor '    3.9199       1.0000         .10000E-03   10000.    
    13 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10006E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    7.0048       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    123.23       1.0000         .10000E-03   10000.    
    19 'Prefactor '    6.3205       1.0000         .10000E-03   10000.    
    20 'Prefactor '    9.5040       1.0000         .10000E-03   10000.    
    21 'norm      '    2.9386       1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    5.6850       1.0000         .10000E-03   10000.    
    24 'norm      '    .51566       1.0000         .10000E-03   10000.    
    25 'Prefactor '    39.782       1.0000         .10000E-03   10000.    
    26 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    27 'Normalizat'    .63357       1.0000         .10000E-01   10.000    
    28 'Prefactor '    1.0109       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=   6708.173     FROM MIGRAD    STATUS=CONVERGED    676 CALLS     3520 TOTAL
                     EDM=   .57E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.5%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          6.4356        4.0851        .99827E-08    .33573E-05
   2  Prefactor     3.3270        6.7841        .46697E-05   -.34320E-04
   3  Prefactor     20.909        10.242       -.70103E-06    .31936E-05
   4  norm          6.2300        5.3934       -.23058E-06   -.25493E-05
   5  Prefactor     8.3251        10.474       -.93995E-07   -.41278E-05
   6  Prefactor     .10000E-03    28.906        .50293E-07** at limit **
   7  norm          12.601        5.5118        .37694E-06   -.20005E-04
   8  norm          2.5193        .53262       -.28284E-07   -.13645E-05
   9  Prefactor     7.3256        9.7274        .64359E-07    .22078E-05
  10  Prefactor     32.112        21.487        .70651E-07    .10514E-04
  11  Prefactor     32.167        10.017        .48155E-07    .24474E-04
  12  Prefactor     3.9206        3.1482        .12486E-06    .33590E-04
  13  norm          .10000E-03    12.068        .28672E-07** at limit **
  14  Prefactor     .10000E-03    39.563       -.40365E-06** at limit **
  15  Prefactor     7.0047        9.3233        .21499E-06    .87260E-05
  16  Prefactor     .10000E-03    8.9321       -.14622E-07** at limit **
  17  norm          .10000E-03    .86266        .17287E-06** at limit **
  18  Prefactor     123.24        58.551       -.85472E-06    .94623E-06
  19  Prefactor     6.3261        13.316        .12173E-05    .38820E-04
  20  Prefactor     9.5046        5.5743       -.75894E-07    .29157E-04
  21  norm          2.9386        4.1353        .13393E-06    .12074E-04
  22  Prefactor     .10000E-03    5.7097        .48825E-07** at limit **
  23  Prefactor     5.6873        9.2892        .26052E-06    .58689E-05
  24  norm          .51562        .46943       -.33168E-09    .98578E-04
  25  Prefactor     39.823        65.042       -.63153E-05    .20482E-04
  26  Prefactor     .10000E-03    6.8528        .55303E-07** at limit **
  27  Normalizat    .63323        .19725       -.22263E-05   -.47314E-04
  28  Prefactor     1.0112        .15641        .11188E-05    .86245E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 6.43565
  Prefactor  = 3.32697
  Prefactor  = 20.9087
  norm       = 6.22998
  Prefactor  = 8.32509
  Prefactor  = 0.0001
  norm       = 12.6014
  norm       = 2.51928
  Prefactor  = 7.32557
  Prefactor  = 32.1122
  Prefactor  = 32.167
  Prefactor  = 3.92059
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 7.00469
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 123.237
  Prefactor  = 6.32608
  Prefactor  = 9.50457
  norm       = 2.93864
  Prefactor  = 0.0001
  Prefactor  = 5.6873
  norm       = 0.515618
  Prefactor  = 39.8227
  Prefactor  = 0.0001
  Normalizat = 0.63323
  Prefactor  = 1.01118
 **********
 **   18 **HESSE 
 **********

 FCN=   6708.173     FROM HESSE     STATUS=OK           533 CALLS     4053 TOTAL
                     EDM=   .13E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          6.4356        4.0836        .12726E-03   -1.5201    
   2  Prefactor     3.3270        6.8379        .11095E-02   -1.5343    
   3  Prefactor     20.909        10.246        .87593E-04   -1.4793    
   4  norm          6.2300        5.3918        .16083E-03   -1.5209    
   5  Prefactor     8.3251        10.464        .13894E-03   -1.5131    
   6  Prefactor     .10000E-03    28.927        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  norm          12.601        5.5340        .55939E-03   -1.4998    
   8  norm          2.5193        .53561        .25015E-04   -1.5391    
   9  Prefactor     7.3256        9.7177        .14819E-03   -1.5167    
  10  Prefactor     32.112        21.506        .70712E-04   -1.4574    
  11  Prefactor     32.167        10.043        .70652E-04   -1.4573    
  12  Prefactor     3.9206        3.1504        .12379E-03   -1.5312    
  13  norm          .10000E-03    12.108        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10000E-03    39.704        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     7.0047        9.3195        .75788E-03   -1.5179    
  16  Prefactor     .10000E-03    8.9605        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .10000E-03    .86602        .74196E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     123.24        58.434        .36258E-04   -1.3483    
  19  Prefactor     6.3261        13.410        .15966E-03   -1.5205    
  20  Prefactor     9.5046        5.5794        .64996E-03   -1.5091    
  21  norm          2.9386        4.0831        .17504E-03   -1.5365    
  22  Prefactor     .10000E-03    5.7110        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     5.6873        9.1484        .16847E-03   -1.5231    
  24  norm          .51562        .44792        .48244E-03   -1.5564    
  25  Prefactor     39.823        65.093        .63550E-04   -1.4445    
  26  Prefactor     .10000E-03    6.8622        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  27  Normalizat    .63323        .22591        .31214E-03   -1.0659    
  28  Prefactor     1.0112        .18185        .22584E-03   -.92358    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.3352e-10
Minuit parameter uncertainties:
  1  4.08373
  2  6.8395
  3  10.247
  4  5.39218
  5  10.4661
  6  2.29633e-05
  7  5.53424
  8  0.535606
  9  9.71978
  10  21.5111
  11  10.0437
  12  3.15058
  13  9.9342e-06
  14  4.5857e-05
  15  9.32143
  16  6.45879e-07
  17  7.47857e-06
  18  58.4616
  19  13.4164
  20  5.57966
  21  4.08352
  22  2.80797e-06
  23  9.15065
  24  0.447925
  25  65.2094
  26  4.24678e-06
  27  0.226244
  28  0.181959
Done.

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

Extracting fit parameters...

4FGL J2221.9-3504
   Spectrum: PowerLaw
253    Prefactor:  3.217e+01  1.004e+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:  1.011e+00  1.820e-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:  6.332e-01  2.262e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 24.35
Ra Dec: 335.497 -35.071
Photon Index (Fixed Index): 2.68 +/- 0.00
Photon Flux (Fixed Index): 1.55e-07 +/- 4.84e-08
Energy Flux (Fixed Index): 3.80e-05 +/- 1.19e-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) = 6707.17043873
delta logL = 1.00305320031

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6706.9363526
delta logL = 1.23713932978

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    40.537       1.0000         .10000E-03   10000.    
     2 'Index     '    2.1889       1.0000          .0000       10.000    
     3 'Normalizat'    .68191       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .97801       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=   6706.936     FROM MIGRAD    STATUS=CONVERGED     48 CALLS      211 TOTAL
                     EDM=   .45E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     40.537        15.569        .15740E-02    .13308E-03
   2  Index         2.1889        .32517        .11942       -.10753E-04
   3  Normalizat    .68190        .16982        .68112E-01   -.17939E-05
   4  Prefactor     .97802        .15134        .45992E-01    .11253E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 40.5366
  Index      = 2.18889
  Normalizat = 0.681896
  Prefactor  = 0.978022
 **********
 **   18 **HESSE 
 **********

 FCN=   6706.936     FROM HESSE     STATUS=OK            31 CALLS      242 TOTAL
                     EDM=   .78E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     40.537        12.853        .62958E-04   -1.4434    
   2  Index         2.1889        .28212        .50103E-02   -.59707    
   3  Normalizat    .68190        .19559        .30141E-03   -1.0461    
   4  Prefactor     .97802        .17417        .22893E-03   -.93466    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 7.78808e-11
Minuit parameter uncertainties:
  1  12.8538
  2  0.282343
  3  0.195793
  4  0.174266
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/270310': 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) = 6706.9363526
delta logL = 1.23713933232

Extracting fit parameters...

4FGL J2221.9-3504
   Spectrum: PowerLaw
253    Prefactor:  4.054e+01  1.285e+01  1.000e-04  1.000e+04 ( 1.000e-12)
254        Index:  2.189e+00  2.823e-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.780e-01  1.743e-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:  6.819e-01  1.958e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 26.29
Ra Dec: 335.497 -35.071
Photon Index (Free Index): 2.19 +/- 0.28
Photon Flux (Free Index): 1.24e-07 +/- 4.46e-08
Energy Flux (Free Index): 5.67e-05 +/- 2.68e-05

Creating a high resolution counts map...
INFO: Auto-setting vmin to -9.398e-02 [aplpy.core]
INFO: Auto-setting vmax to  1.043e+00 [aplpy.core]
Saving /scratch/kocevski/270310/cmap_HighResolution_296611201_296870401_4FGL_J2221.9-3504_daily_bin221.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='1.55e-07', energy_flux2='5.67e-05', photon_flux_error='4.84e-08', dlogl='1.24e+00', energy_flux='3.80e-05', photon_flux2='1.24e-07', job_status='DONE', time_completed='2021-09-28 10:01:09.543794', photon_index_error2='0.28', photon_index2='2.19', ts='24.35', fit_tolerance='1e-08', GAL='1.01', photon_index_error='0.00', energy_flux_error2='2.68e-05', EG='0.63', time_epoch_completed='1632848469.54', return_code='0', job_id='270310', GAL2='0.98', EG2='0.68', return_code2='0', energy_flux_error='1.19e-05', photon_flux_error2='4.46e-08', ts2='26.29', photon_index='2.68' WHERE bin_id='221' AND source_name='4FGL J2221.9-3504' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Tue Sep 28 10:01:09 PDT 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0116>
Subject: Job 270310: <4FGL_J2221.9-3504_daily_bin221> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2221.9-3504_daily_bin221 335.497 -35.0712 296611201 296870401 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 :                                   724.10 sec.
    Max Memory :                                 1255 MB
    Average Memory :                             297.00 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   928 sec.
    Turnaround time :                            932 sec.

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

