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


Performing analysis on: 4FGL_J2221.9-3504_daily_bin543
RA = 335.497, Dec = -35.0712
tmin = 380073601, tmax = 380332801
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='271810', job_status='RUN', time_executed='2021-09-28 09:51:00.819762', time_epoch_executed='1632847860.82' WHERE source_name='4FGL J2221.9-3504' and cadence='daily' and bin_id='543'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/271810

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/271810/ft1_4FGL_J2221.9-3504_daily_bin543.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/271810/ft2_4FGL_J2221.9-3504_daily_bin543.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/271810/ft1_4FGL_J2221.9-3504_daily_bin543.fits outfile=/scratch/kocevski/271810/ft1_filteredMKT_4FGL_J2221.9-3504_daily_bin543.fits ra=335.497 dec=-35.0712 rad=12.0 tmin=380073601.0 tmax=380332801.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.46
user 4.24
sys 0.21

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/271810/ft2_4FGL_J2221.9-3504_daily_bin543.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/271810/ft1_filteredMKT_4FGL_J2221.9-3504_daily_bin543.fits evtable="EVENTS" outfile="/scratch/kocevski/271810/ft1_filtered_4FGL_J2221.9-3504_daily_bin543.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.51
user 0.33
sys 0.16

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/271810/ft1_filtered_4FGL_J2221.9-3504_daily_bin543.fits" evtable="EVENTS" scfile=/scratch/kocevski/271810/ft2_4FGL_J2221.9-3504_daily_bin543.fits sctable="SC_DATA" outfile=/scratch/kocevski/271810/ltcube_380073601_380332801_4FGL_J2221.9-3504_daily_bin543.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/271810/ft2_4FGL_J2221.9-3504_daily_bin543.fits
.....................!
real 11.98
user 11.62
sys 0.33

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/271810/ft1_filtered_4FGL_J2221.9-3504_daily_bin543.fits evtable="EVENTS" scfile=/scratch/kocevski/271810/ft2_4FGL_J2221.9-3504_daily_bin543.fits sctable="SC_DATA" expcube=/scratch/kocevski/271810/ltcube_380073601_380332801_4FGL_J2221.9-3504_daily_bin543.fits outfile=/scratch/kocevski/271810/expmap_380073601_380332801_4FGL_J2221.9-3504_daily_bin543.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/271810/ltcube_380073601_380332801_4FGL_J2221.9-3504_daily_bin543.fits
.....................!
real 191.04
user 185.27
sys 5.40

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/271810/ft1_filtered_4FGL_J2221.9-3504_daily_bin543.fits scfile=/scratch/kocevski/271810/ft2_4FGL_J2221.9-3504_daily_bin543.fits outfile=/scratch/kocevski/271810/cmap_380073601_380332801_4FGL_J2221.9-3504_daily_bin543.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/271810/ft1_filtered_4FGL_J2221.9-3504_daily_bin543.fits scfile=/scratch/kocevski/271810/ft2_4FGL_J2221.9-3504_daily_bin543.fits outfile=/scratch/kocevski/271810/cmap_HighResolution_380073601_380332801_4FGL_J2221.9-3504_daily_bin543.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/271810/ft1_filtered_4FGL_J2221.9-3504_daily_bin543.fits evtable="EVENTS" scfile=/scratch/kocevski/271810/ft2_4FGL_J2221.9-3504_daily_bin543.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/271810/Model_4FGL_J2221.9-3504_daily_bin543.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/271810/ft1_filtered_4FGL_J2221.9-3504_daily_bin543.fits.....................!
real 46.39
user 45.06
sys 1.20

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    2.3651       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    13.807       1.0000         .10000E-03   10000.    
     4 'norm      '    1.2617       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .12621E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    14.182       1.0000         .10000E-03   10000.    
     7 'norm      '    54.248       1.0000         .10000E-03   10000.    
     8 'norm      '    .42401       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    22.227       1.0000         .10000E-03   10000.    
    11 'Prefactor '    4.4699       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    22.902       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    29.126       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10028E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    6.5010       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .11088E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    61.257       1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    21 'norm      '    10.398       1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10096E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    13.237       1.0000         .10000E-03   10000.    
    24 'norm      '    .10481E-03   1.0000         .10000E-03   10000.    
    25 'Prefactor '    8.3719       1.0000         .10000E-03   10000.    
    26 'Prefactor '    25.757       1.0000         .10000E-03   10000.    
    27 'Normalizat'    .94346       1.0000         .10000E-01   10.000    
    28 'Prefactor '    .86705       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=   5373.087     FROM MIGRAD    STATUS=CONVERGED    670 CALLS     2999 TOTAL
                     EDM=   .61E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.7%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          2.3651        3.7818        .67001E-06    .17204E-03
   2  Prefactor     .10000E-03    12.495        .12479E-06** at limit **
   3  Prefactor     13.808        10.272        .13358E-06   -.35666E-05
   4  norm          1.2626        9.7007        .30544E-05   -.38313E-04
   5  Prefactor     .10000E-03    28.634       -.76403E-05** at limit **
   6  Prefactor     14.095        66.450       -.17907E-04   -.17780E-03
   7  norm          54.249        9.4978        .39526E-06    .49462E-04
   8  norm          .42398        .31169       -.20757E-07    .28472E-03
   9  Prefactor     .10000E-03    5.2810       -.13169E-06** at limit **
  10  Prefactor     22.227        24.613        .59441E-06   -.11178E-05
  11  Prefactor     4.4714        9.2872        .77268E-05   -.16354E-03
  12  Prefactor     .10000E-03    2.1824        .20360E-06** at limit **
  13  norm          22.907        25.044        .46985E-06    .38092E-04
  14  Prefactor     .10000E-03    11.687       -.99847E-07** at limit **
  15  Prefactor     29.130        23.346       -.61234E-06   -.82085E-05
  16  Prefactor     .10000E-03    27.867        .42029E-07** at limit **
  17  norm          6.5008        3.7892        .26067E-06    .26082E-03
  18  Prefactor     .10000E-03    73.840        .99090E-06** at limit **
  19  Prefactor     61.256        21.868       -.22497E-07   -.37219E-04
  20  Prefactor     .10000E-03    2.2865        .61783E-07** at limit **
  21  norm          10.397        6.8266       -.63283E-07   -.39059E-04
  22  Prefactor     .10000E-03    11.887        .68693E-07** at limit **
  23  Prefactor     13.225        16.720        .98173E-06    .84770E-04
  24  norm          .10000E-03    .53856       -.11888E-06** at limit **
  25  Prefactor     8.3760        55.648        .19655E-05    .13867E-04
  26  Prefactor     25.738        24.857       -.21481E-06    .98159E-05
  27  Normalizat    .94344        .21846       -.26728E-05    .14280E-04
  28  Prefactor     .86705        .18124        .22779E-06   -.73335E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 2.36509
  Prefactor  = 0.0001
  Prefactor  = 13.8077
  norm       = 1.2626
  Prefactor  = 0.000100004
  Prefactor  = 14.0946
  norm       = 54.2493
  norm       = 0.423984
  Prefactor  = 0.0001
  Prefactor  = 22.2273
  Prefactor  = 4.47135
  Prefactor  = 0.0001
  norm       = 22.9071
  Prefactor  = 0.0001
  Prefactor  = 29.1303
  Prefactor  = 0.0001
  norm       = 6.50084
  Prefactor  = 0.0001
  Prefactor  = 61.2562
  Prefactor  = 0.0001
  norm       = 10.3969
  Prefactor  = 0.0001
  Prefactor  = 13.2245
  norm       = 0.0001
  Prefactor  = 8.37603
  Prefactor  = 25.7383
  Normalizat = 0.943439
  Prefactor  = 0.867048
 **********
 **   18 **HESSE 
 **********

 FCN=   5373.087     FROM HESSE     STATUS=OK           527 CALLS     3526 TOTAL
                     EDM=   .13E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          2.3651        3.7655        .17357E-03   -1.5400    
   2  Prefactor     .10000E-03    12.876        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     13.808        10.261        .10779E-03   -1.4965    
   4  norm          1.2626        9.7651        .39697E-03   -1.5483    
   5  Prefactor     .10000E-03    28.303        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     14.095        72.992        .10636E-03   -1.4957    
   7  norm          54.249        9.4872        .54459E-04   -1.4234    
   8  norm          .42398        .31349        .33401E-04   -1.5578    
   9  Prefactor     .10000E-03    5.2891        .16450E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     22.227        24.615        .84960E-04   -1.4765    
  11  Prefactor     4.4714        9.5027        .95225E-03   -1.5285    
  12  Prefactor     .10000E-03    2.2426        .21133E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          22.907        25.041        .83701E-04   -1.4750    
  14  Prefactor     .10000E-03    11.688        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     29.130        23.368        .74236E-04   -1.4628    
  16  Prefactor     .10000E-03    28.025        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          6.5008        3.7863        .10391E-03   -1.5198    
  18  Prefactor     .10000E-03    73.906        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     61.256        21.952        .51266E-04   -1.4141    
  20  Prefactor     .10000E-03    2.2894        .10824E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  norm          10.397        6.7911        .12425E-03   -1.5063    
  22  Prefactor     .10000E-03    11.897        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     13.225        16.408        .11009E-03   -1.4980    
  24  norm          .10000E-03    3.2518        .92640E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     8.3760        55.616        .13855E-03   -1.5129    
  26  Prefactor     25.738        24.414        .78932E-04   -1.4693    
  27  Normalizat    .94344        .24881        .28588E-03   -.94950    
  28  Prefactor     .86705        .20631        .25545E-03   -.97302    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.26333e-09
Minuit parameter uncertainties:
  1  3.76589
  2  2.23638e-05
  3  10.2626
  4  7.02397
  5  0.000630072
  6  64.2733
  7  9.48745
  8  0.313494
  9  7.73335e-06
  10  24.6264
  11  9.50594
  12  7.82962e-06
  13  25.0523
  14  1.13377e-05
  15  23.3751
  16  2.63487e-05
  17  3.78647
  18  3.48902e-05
  19  21.9549
  20  2.31594e-06
  21  6.79157
  22  1.66458e-05
  23  16.4133
  24  4.10213e-05
  25  43.2248
  26  24.4232
  27  0.249114
  28  0.206498
Done.

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

Extracting fit parameters...

4FGL J2221.9-3504
   Spectrum: PowerLaw
253    Prefactor:  4.471e+00  9.506e+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

GAL_V02
   Spectrum: PowerLaw
560    Prefactor:  8.670e-01  2.065e-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.434e-01  2.491e-01  1.000e-02  1.000e+01 ( 1.000e+00)


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

Saving results to:
/scratch/kocevski/271810/likelihoodResults_380073601_380332801_4FGL_J2221.9-3504_daily_bin543.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) = 5373.08554444
delta logL = 0.00162810460006

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5373.08534596
delta logL = 0.00182658619633

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    4.3004       1.0000         .10000E-03   10000.    
     2 'Index     '    2.7504       1.0000          .0000       10.000    
     3 'Normalizat'    .94213       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .86790       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=   5373.085     FROM MIGRAD    STATUS=CONVERGED     81 CALLS      262 TOTAL
                     EDM=   .63E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     4.2997        9.9631        .19427E-03    .21026E-03
   2  Index         2.7506        1.2613        .12124E-01    .68259E-04
   3  Normalizat    .94240        .23520        .28603E-03   -.31910E-03
   4  Prefactor     .86767        .20001        .25537E-03   -.21764E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 4.29968
  Index      = 2.75055
  Normalizat = 0.942396
  Prefactor  = 0.867671
 **********
 **   18 **HESSE 
 **********

 FCN=   5373.085     FROM HESSE     STATUS=OK            25 CALLS      287 TOTAL
                     EDM=   .61E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     4.2997        9.6401        .77707E-05   -1.5293    
   2  Index         2.7506        1.2213        .48495E-03   -.46664    
   3  Normalizat    .94240        .23548        .57205E-04   -.94986    
   4  Prefactor     .86767        .20017        .51073E-04   -.97280    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.0669e-10
Minuit parameter uncertainties:
  1  9.64356
  2  1.2371
  3  0.235737
  4  0.200337
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/271810': 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) = 5373.08534522
delta logL = 0.00182732609301

Extracting fit parameters...

4FGL J2221.9-3504
   Spectrum: PowerLaw
253    Prefactor:  4.300e+00  9.644e+00  1.000e-04  1.000e+04 ( 1.000e-12)
254        Index:  2.751e+00  1.237e+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:  8.677e-01  2.003e-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.424e-01  2.357e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.27
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/271810/cmap_HighResolution_380073601_380332801_4FGL_J2221.9-3504_daily_bin543.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.01e-02', job_status='DONE', photon_flux_upper_limit='1.28e-07', time_completed='2021-09-28 10:02:25.900711', job_id='271810', GAL2='0.87', fit_tolerance='1e-08', EG2='0.94', EG='0.94', time_epoch_completed='1632848545.9', return_code2='0', ts='0.27', comment='SUCCESS', return_code='0', GAL='0.87', dlogl='1.83e-03', ts2='0.27', photon_index_error='0.00', photon_index='2.68' WHERE bin_id='543' AND source_name='4FGL J2221.9-3504' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Tue Sep 28 10:02:25 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0208>
Subject: Job 271810: <4FGL_J2221.9-3504_daily_bin543> in cluster <slac> Done

Job <4FGL_J2221.9-3504_daily_bin543> was submitted from host <rhel6-64d> by user <kocevski> in cluster <slac> at Tue Sep 28 09:50:41 2021
Job was executed on host(s) <bullet0208>, in queue <medium>, as user <kocevski> in cluster <slac> at Tue Sep 28 09:50:42 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:50:42 2021
Terminated at Tue Sep 28 10:02:26 2021
Results reported at Tue Sep 28 10:02:26 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2221.9-3504_daily_bin543 335.497 -35.0712 380073601 380332801 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 :                                   684.00 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             335.30 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   704 sec.
    Turnaround time :                            705 sec.

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

