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


Performing analysis on: 4FGL_J2131.5-0916_daily_bin1620
RA = 322.891, Dec = -9.2684
tmin = 659232001, tmax = 659491201
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='471093', job_status='RUN', time_executed='2021-12-08 07:42:40.551156', time_epoch_executed='1638978160.55' WHERE source_name='4FGL J2131.5-0916' and cadence='daily' and bin_id='1620'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/471093

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/471093/ft1_4FGL_J2131.5-0916_daily_bin1620.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/471093/ft2_4FGL_J2131.5-0916_daily_bin1620.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/471093/ft1_4FGL_J2131.5-0916_daily_bin1620.fits outfile=/scratch/kocevski/471093/ft1_filteredMKT_4FGL_J2131.5-0916_daily_bin1620.fits ra=322.891 dec=-9.2684 rad=12.0 tmin=659232001.0 tmax=659491201.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 2.83
user 2.62
sys 0.20

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/471093/ft2_4FGL_J2131.5-0916_daily_bin1620.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/471093/ft2_4FGL_J2131.5-0916_daily_bin1620.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/471093/ft1_filteredMKT_4FGL_J2131.5-0916_daily_bin1620.fits evtable="EVENTS" outfile="/scratch/kocevski/471093/ft1_filtered_4FGL_J2131.5-0916_daily_bin1620.fits" apply_filter=yes overwrite=yes header_obstimes=yes tstart=0.0 tstop=0.0 gtifile="default" chatter=3 clobber=yes debug=no gui=no mode="ql"

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

This is gtmktime version HEAD
Applying GTI filter:
IN_SAA!=T && LIVETIME>0 && gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nogrb.gti',(START+STOP)/2) && (angsep(RA_SUN,DEC_SUN,RA_ZENITH,DEC_ZENITH)>115 || gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nosolarflares.gti',(START+STOP)/2))
real 0.52
user 0.33
sys 0.16

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/471093/ft1_filtered_4FGL_J2131.5-0916_daily_bin1620.fits" evtable="EVENTS" scfile=/scratch/kocevski/471093/ft2_4FGL_J2131.5-0916_daily_bin1620.fits sctable="SC_DATA" outfile=/scratch/kocevski/471093/ltcube_659232001_659491201_4FGL_J2131.5-0916_daily_bin1620.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/471093/ft2_4FGL_J2131.5-0916_daily_bin1620.fits
.....................!
real 13.74
user 13.37
sys 0.33

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/471093/ft1_filtered_4FGL_J2131.5-0916_daily_bin1620.fits evtable="EVENTS" scfile=/scratch/kocevski/471093/ft2_4FGL_J2131.5-0916_daily_bin1620.fits sctable="SC_DATA" expcube=/scratch/kocevski/471093/ltcube_659232001_659491201_4FGL_J2131.5-0916_daily_bin1620.fits outfile=/scratch/kocevski/471093/expmap_659232001_659491201_4FGL_J2131.5-0916_daily_bin1620.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/471093/ltcube_659232001_659491201_4FGL_J2131.5-0916_daily_bin1620.fits
.....................!
real 190.92
user 185.40
sys 5.16

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

Setting source of interest to:
4FGL J2131.5-0916 @ 322.891 -9.2684

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/471093/ft1_filtered_4FGL_J2131.5-0916_daily_bin1620.fits scfile=/scratch/kocevski/471093/ft2_4FGL_J2131.5-0916_daily_bin1620.fits outfile=/scratch/kocevski/471093/cmap_659232001_659491201_4FGL_J2131.5-0916_daily_bin1620.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=322.891 yref=-9.2684 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.55
user 0.38
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/471093/ft1_filtered_4FGL_J2131.5-0916_daily_bin1620.fits scfile=/scratch/kocevski/471093/ft2_4FGL_J2131.5-0916_daily_bin1620.fits outfile=/scratch/kocevski/471093/cmap_HighResolution_659232001_659491201_4FGL_J2131.5-0916_daily_bin1620.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=322.891 yref=-9.2684 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.55
user 0.39
sys 0.15

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/471093/ft1_filtered_4FGL_J2131.5-0916_daily_bin1620.fits evtable="EVENTS" scfile=/scratch/kocevski/471093/ft2_4FGL_J2131.5-0916_daily_bin1620.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/471093/Model_4FGL_J2131.5-0916_daily_bin1620.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/471093/ft1_filtered_4FGL_J2131.5-0916_daily_bin1620.fits.....................!
real 85.81
user 84.46
sys 1.17

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/471093/ft1_filtered_4FGL_J2131.5-0916_daily_bin1620.fits', '/scratch/kocevski/471093/ft2_4FGL_J2131.5-0916_daily_bin1620.fits', expMap='/scratch/kocevski/471093/expmap_659232001_659491201_4FGL_J2131.5-0916_daily_bin1620.fits', expCube='/scratch/kocevski/471093/ltcube_659232001_659491201_4FGL_J2131.5-0916_daily_bin1620.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/471093/Model_4FGL_J2131.5-0916_daily_bin1620.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J2131.5-0916'

4FGL J2131.5-0916
   Spectrum: PowerLaw
287    Prefactor:  1.196e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-13)
288        Index:  1.989e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
289        Scale:  2.343e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/471093/ft1_filtered_4FGL_J2131.5-0916_daily_bin1620.fits
Spacecraft file(s): /scratch/kocevski/471093/ft2_4FGL_J2131.5-0916_daily_bin1620.fits
Exposure map: /scratch/kocevski/471093/expmap_659232001_659491201_4FGL_J2131.5-0916_daily_bin1620.fits
Exposure cube: /scratch/kocevski/471093/ltcube_659232001_659491201_4FGL_J2131.5-0916_daily_bin1620.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/471093/Model_4FGL_J2131.5-0916_daily_bin1620.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) = 8909.01074813

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .27548E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    6.5733       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .12166E-02   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10025E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    4.8564       1.0000         .10000E-03   10000.    
     9 'Prefactor '    48.367       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    24.759       1.0000         .10000E-03   10000.    
    12 'norm      '    .10021E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    11.355       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .43719E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10063E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    18.636       1.0000         .10000E-03   10000.    
    17 'Normalizat'    .98541       1.0000         .10000E-01   10.000    
    18 'Prefactor '    .92194       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5500E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   8908.984     FROM MIGRAD    STATUS=CONVERGED    358 CALLS     1762 TOTAL
                     EDM=   .17E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10021E-03    1.5387        .68663E-01** at limit **
   2  Prefactor     .10000E-03    2.7802        .90712E-02** at limit **
   3  Prefactor     .10001E-03    12.961        .90712E-02** at limit **
   4  Prefactor     6.5883        18.294        .39131E-02   -.60629E-03
   5  Prefactor     .10003E-03    5.5095        .10314    ** at limit **
   6  Prefactor     .10003E-03    51.916        .90712E-02** at limit **
   7  Prefactor     .10000E-03    3.8299        .90712E-02** at limit **
   8  Prefactor     4.8571        2.0432        .45634E-02    .12438E-03
   9  Prefactor     48.367        26.629        .14415E-02   -.34081E-03
  10  Prefactor     .10001E-03    12.225        .90712E-02** at limit **
  11  Prefactor     24.763        16.181        .20126E-02   -.70921E-03
  12  norm          .10000E-03    2.2465        .90712E-02** at limit **
  13  Prefactor     11.357        6.2349        .29721E-02   -.54359E-02
  14  Prefactor     .10078E-03    4.7663        .10611    ** at limit **
  15  Prefactor     .10000E-03    4.8709        .90712E-02** at limit **
  16  Prefactor     18.640        10.984        .23194E-02   -.35494E-03
  17  Normalizat    .98476        .18909        .70514E-01    .10344E-04
  18  Prefactor     .92231        .98488E-01    .45284E-01    .84935E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100214
  Prefactor  = 0.0001
  Prefactor  = 0.000100006
  Prefactor  = 6.58828
  Prefactor  = 0.000100026
  Prefactor  = 0.00010003
  Prefactor  = 0.0001
  Prefactor  = 4.85714
  Prefactor  = 48.3671
  Prefactor  = 0.000100006
  Prefactor  = 24.7634
  norm       = 0.0001
  Prefactor  = 11.3571
  Prefactor  = 0.000100776
  Prefactor  = 0.0001
  Prefactor  = 18.6397
  Normalizat = 0.984761
  Prefactor  = 0.922313
 **********
 **   18 **HESSE 
 **********

 FCN=   8908.984     FROM HESSE     STATUS=OK           250 CALLS     2012 TOTAL
                     EDM=   .32E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10021E-03    2.7606        .42059E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    2.7854        .15369E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .10001E-03    12.969        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     6.5883        17.498        .15652E-03   -1.5195    
   5  Prefactor     .10003E-03    26.907        .40503E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10003E-03    52.717        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    3.8806        .18023E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     4.8571        2.0412        .83223E-04   -1.5267    
   9  Prefactor     48.367        26.629        .57658E-04   -1.4316    
  10  Prefactor     .10001E-03    12.238        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     24.763        16.279        .80504E-04   -1.4712    
  12  norm          .10000E-03    2.2631        .13815E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     11.357        6.2487        .11889E-03   -1.5034    
  14  Prefactor     .10078E-03    50.208        .39670E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .10000E-03    4.8761        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     18.640        11.011        .92777E-04   -1.4844    
  17  Normalizat    .98476        .22956        .31196E-03   -.93543    
  18  Prefactor     .92231        .12023        .17786E-03   -.95366    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.1724e-08
Minuit parameter uncertainties:
  1  0.00153818
  2  4.24049e-06
  3  0.000562619
  4  17.5112
  5  0.00167052
  6  0.00250025
  7  1.43139e-05
  8  2.04122
  9  26.6355
  10  0.000553119
  11  16.2814
  12  2.44987e-06
  13  6.24905
  14  0.0124907
  15  7.63745e-06
  16  11.0123
  17  0.229795
  18  0.120265
Done.

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

Extracting fit parameters...

4FGL J2131.5-0916
   Spectrum: PowerLaw
287    Prefactor:  1.000e-04  1.431e-05  1.000e-04  1.000e+04 ( 1.000e-13)
288        Index:  1.989e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
289        Scale:  2.343e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
547    Prefactor:  9.223e-01  1.203e-01  0.000e+00  1.000e+01 ( 1.000e+00)
548        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
549        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
546   Normalization:  9.848e-01  2.298e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 322.891 -9.268
Photon Flux Upper Limit: 6.13e-08 ph cm-2 s-1
Energy Flux Upper Limit: 4.59e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/471093/likelihoodResults_659232001_659491201_4FGL_J2131.5-0916_daily_bin1620.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) = 8908.98501921
delta logL = -0.00122843144709

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 8908.98379224
delta logL = -1.46004094859e-06

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .12181E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.0390       1.0000          .0000       10.000    
     3 'Normalizat'    .98469       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .92230       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5500E+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=   8908.984     FROM MIGRAD    STATUS=FAILED        92 CALLS      245 TOTAL
                     EDM=   .49E-05    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10012E-03    296.20        .36285E-03** at limit **
   2  Index         2.1058        6.0007        .50000       -.14757E-03
   3  Normalizat    .98476        .35507E-01    .31196E-03   -.18753E-03
   4  Prefactor     .92231        .19791E-01    .17786E-03   -.28068E-03
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   8908.055     FROM SIMPLEX   STATUS=PROGRESS     307 CALLS      552 TOTAL
                     EDM=   .12E-04    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .12090E-01    296.20        .44867E-04   -.32005E-02
   2  Index         4.6058        6.0007        .24631E-02   -.14757E-03
   3  Normalizat    .99067        .35507E-01    .20139E-04   -.18753E-03
   4  Prefactor     .92375        .19791E-01    .50385E-05   -.28068E-03
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   8907.856     FROM MIGRAD    STATUS=CONVERGED     99 CALLS      651 TOTAL
                     EDM=   .11E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .99820E-02    .20694        .72569E-03   -.33884E-01
   2  Index         4.7327        2.4726        .74795E-01    .39761E-03
   3  Normalizat    .87375        .10318        .12478E-03    .58308E-05
   4  Prefactor     .95936        .49240E-01    .35572E-04    .13934E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.00998201
  Index      = 4.73275
  Normalizat = 0.873751
  Prefactor  = 0.959358
 **********
 **   18 **HESSE 
 **********

 FCN=   8907.856     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      680 TOTAL
                     EDM=   .57E-04    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .99820E-02    .24768        .98120E-05    205.77    
   2  Index         4.7327        3.1265        .36666E-02   -.53476E-01
   3  Normalizat    .87375        .18517        .49914E-05   -.97389    
   4  Prefactor     .95936        .10081        .71145E-05   -.94097    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 5.67463e-05
Minuit parameter uncertainties:
  1  0.0989462
  2  3.37845
  3  0.185307
  4  0.100825
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/471093': 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): 102
logL (Free Index) = 8907.85645244
delta logL = 1.12733833556

Extracting fit parameters...

4FGL J2131.5-0916
   Spectrum: PowerLaw
287    Prefactor:  9.982e-03  9.895e-02  1.000e-04  1.000e+04 ( 1.000e-13)
288        Index:  4.733e+00  3.378e+00  0.000e+00  1.000e+01 (-1.000e+00)
289        Scale:  2.343e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
547    Prefactor:  9.594e-01  1.008e-01  0.000e+00  1.000e+01 ( 1.000e+00)
548        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
549        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
546   Normalization:  8.738e-01  1.853e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 2.47
Ra Dec: 322.891 -9.268
Photon Index (Free Index): 4.73 +/- 3.38
Photon Flux (Free Index): 8.17e-08 +/- 1.60e-06
Energy Flux (Free Index): 1.11e-05 +/- 2.14e-04

Creating a high resolution counts map...
INFO: Auto-setting vmin to -1.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  1.110e+00 [aplpy.core]
Saving /scratch/kocevski/471093/cmap_HighResolution_659232001_659491201_4FGL_J2131.5-0916_daily_bin1620.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='4.59e-03', comment='SUCCESS', energy_flux2='1.11e-05', dlogl='1.13e+00', photon_flux2='8.17e-08', job_status='DONE', time_completed='2021-12-08 07:54:28.923929', photon_index_error2='3.38', photon_index2='4.73', ts='-0.00', fit_tolerance='1e-08', GAL='0.92', photon_index_error='0.00', photon_flux_upper_limit='6.13e-08', energy_flux_error2='2.14e-04', EG='0.98', time_epoch_completed='1638978868.92', return_code='0', job_id='471093', GAL2='0.96', EG2='0.87', return_code2='102', photon_flux_error2='1.60e-06', ts2='2.47', photon_index='1.99' WHERE bin_id='1620' AND source_name='4FGL J2131.5-0916' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Wed Dec  8 07:54:28 PST 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0048>
Subject: Job 471093: <4FGL_J2131.5-0916_daily_bin1620> in cluster <slac> Done

Job <4FGL_J2131.5-0916_daily_bin1620> was submitted from host <rhel6-64p> by user <kocevski> in cluster <slac> at Wed Dec  8 07:40:25 2021
Job was executed on host(s) <bullet0048>, in queue <medium>, as user <kocevski> in cluster <slac> at Wed Dec  8 07:42:34 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Wed Dec  8 07:42:34 2021
Terminated at Wed Dec  8 07:54:29 2021
Results reported at Wed Dec  8 07:54:29 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2131.5-0916_daily_bin1620 322.891 -9.2684 659232001 659491201 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J2131.5-0916 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   708.00 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             364.96 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   716 sec.
    Turnaround time :                            844 sec.

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

