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


Performing analysis on: 4FGL_J2056.5-0202_daily_bin601
RA = 314.142, Dec = -2.0355
tmin = 395107201, tmax = 395366401
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='218368', job_status='RUN', time_executed='2021-09-25 22:03:56.348125', time_epoch_executed='1632632636.35' WHERE source_name='4FGL J2056.5-0202' and cadence='daily' and bin_id='601'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/218368

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

Retrieving the FT1 file...

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

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

Retrieving 55 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/218368/ft1_4FGL_J2056.5-0202_daily_bin601.fits


Retrieving the FT1 file...

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

Retrieving 55 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/218368/ft2_4FGL_J2056.5-0202_daily_bin601.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/218368/ft1_4FGL_J2056.5-0202_daily_bin601.fits outfile=/scratch/kocevski/218368/ft1_filteredMKT_4FGL_J2056.5-0202_daily_bin601.fits ra=314.142 dec=-2.0355 rad=12.0 tmin=395107201.0 tmax=395366401.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 6.34
user 6.08
sys 0.24

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/218368/ft2_4FGL_J2056.5-0202_daily_bin601.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/218368/ft2_4FGL_J2056.5-0202_daily_bin601.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/218368/ft1_filteredMKT_4FGL_J2056.5-0202_daily_bin601.fits evtable="EVENTS" outfile="/scratch/kocevski/218368/ft1_filtered_4FGL_J2056.5-0202_daily_bin601.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.45
user 0.26
sys 0.17

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/218368/ft1_filtered_4FGL_J2056.5-0202_daily_bin601.fits" evtable="EVENTS" scfile=/scratch/kocevski/218368/ft2_4FGL_J2056.5-0202_daily_bin601.fits sctable="SC_DATA" outfile=/scratch/kocevski/218368/ltcube_395107201_395366401_4FGL_J2056.5-0202_daily_bin601.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/218368/ft2_4FGL_J2056.5-0202_daily_bin601.fits
.....................!
real 9.59
user 9.32
sys 0.25

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/218368/ft1_filtered_4FGL_J2056.5-0202_daily_bin601.fits evtable="EVENTS" scfile=/scratch/kocevski/218368/ft2_4FGL_J2056.5-0202_daily_bin601.fits sctable="SC_DATA" expcube=/scratch/kocevski/218368/ltcube_395107201_395366401_4FGL_J2056.5-0202_daily_bin601.fits outfile=/scratch/kocevski/218368/expmap_395107201_395366401_4FGL_J2056.5-0202_daily_bin601.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/218368/ltcube_395107201_395366401_4FGL_J2056.5-0202_daily_bin601.fits
.....................!
real 153.66
user 149.14
sys 4.20

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 180 point sources and 0 extended sources

Setting source of interest to:
4FGL J2056.5-0202 @ 314.142 -2.0355

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/218368/ft1_filtered_4FGL_J2056.5-0202_daily_bin601.fits scfile=/scratch/kocevski/218368/ft2_4FGL_J2056.5-0202_daily_bin601.fits outfile=/scratch/kocevski/218368/cmap_395107201_395366401_4FGL_J2056.5-0202_daily_bin601.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=314.142 yref=-2.0355 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.31
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/218368/ft1_filtered_4FGL_J2056.5-0202_daily_bin601.fits scfile=/scratch/kocevski/218368/ft2_4FGL_J2056.5-0202_daily_bin601.fits outfile=/scratch/kocevski/218368/cmap_HighResolution_395107201_395366401_4FGL_J2056.5-0202_daily_bin601.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=314.142 yref=-2.0355 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.48
user 0.34
sys 0.13

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/218368/ft1_filtered_4FGL_J2056.5-0202_daily_bin601.fits evtable="EVENTS" scfile=/scratch/kocevski/218368/ft2_4FGL_J2056.5-0202_daily_bin601.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/218368/Model_4FGL_J2056.5-0202_daily_bin601.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/218368/ft1_filtered_4FGL_J2056.5-0202_daily_bin601.fits.....................!
real 48.83
user 47.70
sys 1.01

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/218368/ft1_filtered_4FGL_J2056.5-0202_daily_bin601.fits', '/scratch/kocevski/218368/ft2_4FGL_J2056.5-0202_daily_bin601.fits', expMap='/scratch/kocevski/218368/expmap_395107201_395366401_4FGL_J2056.5-0202_daily_bin601.fits', expCube='/scratch/kocevski/218368/ltcube_395107201_395366401_4FGL_J2056.5-0202_daily_bin601.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/218368/Model_4FGL_J2056.5-0202_daily_bin601.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J2056.5-0202'

4FGL J2056.5-0202
   Spectrum: PowerLaw
326    Prefactor:  1.312e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-12)
327        Index:  2.517e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
328        Scale:  7.173e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/218368/ft1_filtered_4FGL_J2056.5-0202_daily_bin601.fits
Spacecraft file(s): /scratch/kocevski/218368/ft2_4FGL_J2056.5-0202_daily_bin601.fits
Exposure map: /scratch/kocevski/218368/expmap_395107201_395366401_4FGL_J2056.5-0202_daily_bin601.fits
Exposure cube: /scratch/kocevski/218368/ltcube_395107201_395366401_4FGL_J2056.5-0202_daily_bin601.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/218368/Model_4FGL_J2056.5-0202_daily_bin601.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) = 5635.91732056

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .11855E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .70390E-02   1.0000         .10000E-03   10000.    
     3 'norm      '    3.1806       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     5 'norm      '    3.3048       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .25719E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    48.297       1.0000         .10000E-03   10000.    
     9 'Prefactor '    24.343       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .11119E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10006E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    6.7927       1.0000         .10000E-03   10000.    
    14 'Prefactor '    33.594       1.0000         .10000E-03   10000.    
    15 'Prefactor '    7.8793       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .11536E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10041E-03   1.0000         .10000E-03   10000.    
    19 'Normalizat'    .89187       1.0000         .10000E-01   10.000    
    20 'Prefactor '    .89313       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5890E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   5635.911     FROM MIGRAD    STATUS=CONVERGED    440 CALLS     2062 TOTAL
                     EDM=   .28E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  7.3%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    75.525        .18410E-05** at limit **
   2  Prefactor     .10000E-03    58.768        .16166E-04** at limit **
   3  norm          3.1811        1.7247       -.11318E-06    .97838E-04
   4  Prefactor     .10000E-03    9.7648       -.44775E-06** at limit **
   5  norm          3.3061        4.7873       -.10520E-05   -.46766E-04
   6  Prefactor     .10000E-03    3.3265       -.25163E-07** at limit **
   7  Prefactor     .10000E-03    6.9585       -.65907E-07** at limit **
   8  Prefactor     48.293        37.869        .27874E-06    .73413E-04
   9  Prefactor     24.301        23.910       -.72512E-06   -.21471E-03
  10  Prefactor     .10000E-03    73.953        .15772E-04** at limit **
  11  Prefactor     .10000E-03    21.188       -.70264E-06** at limit **
  12  Prefactor     .10000E-03    8.9294        .18382E-06** at limit **
  13  Prefactor     6.8019        20.537       -.84195E-06   -.49534E-04
  14  Prefactor     33.591        43.458       -.56753E-06   -.29687E-04
  15  Prefactor     7.8818        7.8841       -.12057E-06    .32367E-07
  16  Prefactor     .10000E-03    1.4050        .57853E-07** at limit **
  17  Prefactor     .10000E-03    11.685        .33657E-06** at limit **
  18  Prefactor     .10000E-03    28.976        .15373E-05** at limit **
  19  Normalizat    .89136        .26543       -.10908E-06   -.16898E-04
  20  Prefactor     .89319        .10839        .35648E-06   -.32048E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100002
  Prefactor  = 0.000100001
  norm       = 3.18111
  Prefactor  = 0.0001
  norm       = 3.30613
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 48.2928
  Prefactor  = 24.3014
  Prefactor  = 0.0001
  Prefactor  = 0.000100001
  Prefactor  = 0.0001
  Prefactor  = 6.80186
  Prefactor  = 33.5908
  Prefactor  = 7.88178
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.000100002
  Normalizat = 0.89136
  Prefactor  = 0.89319
 **********
 **   18 **HESSE 
 **********

 FCN=   5635.911     FROM HESSE     STATUS=OK           289 CALLS     2351 TOTAL
                     EDM=   .57E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    76.528        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    57.616        .37693E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          3.1811        1.7207        .69707E-04   -1.5351    
   4  Prefactor     .10000E-03    9.7985        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          3.3061        4.7732        .19067E-03   -1.5344    
   6  Prefactor     .10000E-03    6.2711        .26402E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    6.9773        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     48.293        37.874        .57700E-04   -1.4317    
   9  Prefactor     24.301        24.046        .81188E-04   -1.4722    
  10  Prefactor     .10000E-03    74.810        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    21.235        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    8.9442        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     6.8019        20.540        .15395E-03   -1.5186    
  14  Prefactor     33.591        42.991        .69136E-04   -1.4548    
  15  Prefactor     7.8818        7.8884        .14285E-03   -1.5146    
  16  Prefactor     .10000E-03    2.2370        .16913E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     .10000E-03    11.701        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10000E-03    29.137        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Normalizat    .89136        .31698        .37313E-03   -.96764    
  20  Prefactor     .89319        .12987        .15641E-03   -.96379    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 5.71539e-10
Minuit parameter uncertainties:
  1  0.000800716
  2  0.000382001
  3  1.72071
  4  6.93007e-05
  5  4.77375
  6  3.72045e-06
  7  3.70946e-06
  8  37.8933
  9  24.0554
  10  0.000113241
  11  0.000223207
  12  4.28889e-05
  13  20.5615
  14  43.0306
  15  7.88941
  16  4.02163e-05
  17  7.2156e-05
  18  0.000503911
  19  0.317643
  20  0.129911
Done.

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

Extracting fit parameters...

4FGL J2056.5-0202
   Spectrum: PowerLaw
326    Prefactor:  1.000e-04  3.720e-06  1.000e-04  1.000e+04 ( 1.000e-12)
327        Index:  2.517e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
328        Scale:  7.173e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
586    Prefactor:  8.932e-01  1.299e-01  0.000e+00  1.000e+01 ( 1.000e+00)
587        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
588        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
585   Normalization:  8.914e-01  3.176e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 314.142 -2.035
Photon Flux Upper Limit: 1.16e-07 ph cm-2 s-1
Energy Flux Upper Limit: 9.06e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/218368/likelihoodResults_395107201_395366401_4FGL_J2056.5-0202_daily_bin601.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): 102
logL (Free Index) = 5635.91143386
delta logL = -0.000758832150495

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 5635.91067331
delta logL = 1.72115778696e-06

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10222E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.4385       1.0000          .0000       10.000    
     3 'Normalizat'    .89143       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .89316       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5890E+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.
 MIGRAD TERMINATED WITHOUT CONVERGENCE.

 FCN=   5635.911     FROM MIGRAD    STATUS=FAILED       112 CALLS      282 TOTAL
                     EDM=   .15E-01    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .26098E-03    9118.9        .29833E-02** at limit **
   2  Index         1.7986        5.3818        .50000       -.23027E-04
   3  Normalizat    .89136        .84281E-01    .37313E-03    .11929E-03
   4  Prefactor     .89319        .47919E-01    .15641E-03    .30874E-03
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   5635.910     FROM SIMPLEX   STATUS=PROGRESS     136 CALLS      418 TOTAL
                     EDM=   .51E-05    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .25105        9118.9        .56848E-03   -.11710E-01
   2  Index         1.7985        5.3818        .41734E-05   -.23027E-04
   3  Normalizat    .89135        .84281E-01    .14876E-06    .11929E-03
   4  Prefactor     .89319        .47919E-01    .30107E-07    .30874E-03
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   5635.909     FROM MIGRAD    STATUS=CONVERGED     63 CALLS      481 TOTAL
                     EDM=   .29E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .27307        1420.6        .11933E-02    .31982E-04
   2  Index         1.8455        7.5022        .50000       -.10505E-04
   3  Normalizat    .89210        .52105E-01    .14925E-04    .61090E-04
   4  Prefactor     .89246        .22853E-01    .31281E-04    .16107E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.273071
  Index      = 1.84553
  Normalizat = 0.892099
  Prefactor  = 0.892458
 **********
 **   18 **HESSE 
 **********

 FCN=   5635.909     FROM HESSE     STATUS=OK            29 CALLS      510 TOTAL
                     EDM=   .12E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .27307        30.606        .47733E-04   -1.5603    
   2  Index         1.8455        2.6480        .27553E-01   -.68270    
   3  Normalizat    .89210        .30397        .29850E-05   -.96738    
   4  Prefactor     .89246        .12945        .62563E-05   -.96405    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.19756e-09
Minuit parameter uncertainties:
  1  5.78391
  2  2.91458
  3  0.304553
  4  0.129497
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/218368': 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) = 5635.90935933
delta logL = 0.00131569941641

Extracting fit parameters...

4FGL J2056.5-0202
   Spectrum: PowerLaw
326    Prefactor:  2.731e-01  5.784e+00  1.000e-04  1.000e+04 ( 1.000e-12)
327        Index:  1.846e+00  2.915e+00  0.000e+00  1.000e+01 (-1.000e+00)
328        Scale:  7.173e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
586    Prefactor:  8.925e-01  1.295e-01  0.000e+00  1.000e+01 ( 1.000e+00)
587        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
588        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
585   Normalization:  8.921e-01  3.046e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 314.142 -2.035

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/218368/cmap_HighResolution_395107201_395366401_4FGL_J2056.5-0202_daily_bin601.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='9.06e-03', job_status='DONE', photon_flux_upper_limit='1.16e-07', time_completed='2021-09-25 22:12:29.885608', job_id='218368', GAL2='0.89', fit_tolerance='1e-08', EG2='0.89', EG='0.89', time_epoch_completed='1632633149.89', return_code2='0', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.89', dlogl='1.32e-03', ts2='0.00', photon_index_error='0.00', photon_index='2.52' WHERE bin_id='601' AND source_name='4FGL J2056.5-0202' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep 25 22:12:29 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0023>
Subject: Job 218368: <4FGL_J2056.5-0202_daily_bin601> in cluster <slac> Done

Job <4FGL_J2056.5-0202_daily_bin601> was submitted from host <rhel6-64o> by user <kocevski> in cluster <slac> at Sat Sep 25 22:00:37 2021
Job was executed on host(s) <bullet0023>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Sep 25 22:01:19 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Sat Sep 25 22:01:19 2021
Terminated at Sat Sep 25 22:12:30 2021
Results reported at Sat Sep 25 22:12:30 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2056.5-0202_daily_bin601 314.142 -2.0355 395107201 395366401 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J2056.5-0202 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   510.01 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             256.68 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   671 sec.
    Turnaround time :                            713 sec.

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

