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


Performing analysis on: 4FGL_J1631.2+1046_daily_bin1507
RA = 247.804, Dec = 10.7753
tmin = 629942401, tmax = 630201601
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='651038', job_status='RUN', time_executed='2021-09-14 19:43:20.955466', time_epoch_executed='1631673800.96' WHERE source_name='4FGL J1631.2+1046' and cadence='daily' and bin_id='1507'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/651038

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/651038/ft1_4FGL_J1631.2+1046_daily_bin1507.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/651038/ft2_4FGL_J1631.2+1046_daily_bin1507.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/651038/ft1_4FGL_J1631.2+1046_daily_bin1507.fits outfile=/scratch/kocevski/651038/ft1_filteredMKT_4FGL_J1631.2+1046_daily_bin1507.fits ra=247.804 dec=10.7753 rad=12.0 tmin=629942401.0 tmax=630201601.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.71
user 4.48
sys 0.21

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/651038/ft2_4FGL_J1631.2+1046_daily_bin1507.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/651038/ft2_4FGL_J1631.2+1046_daily_bin1507.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/651038/ft1_filteredMKT_4FGL_J1631.2+1046_daily_bin1507.fits evtable="EVENTS" outfile="/scratch/kocevski/651038/ft1_filtered_4FGL_J1631.2+1046_daily_bin1507.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.69
user 0.32
sys 0.16

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/651038/ft1_filtered_4FGL_J1631.2+1046_daily_bin1507.fits" evtable="EVENTS" scfile=/scratch/kocevski/651038/ft2_4FGL_J1631.2+1046_daily_bin1507.fits sctable="SC_DATA" outfile=/scratch/kocevski/651038/ltcube_629942401_630201601_4FGL_J1631.2+1046_daily_bin1507.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/651038/ft2_4FGL_J1631.2+1046_daily_bin1507.fits
.....................!
real 12.78
user 12.39
sys 0.33

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/651038/ft1_filtered_4FGL_J1631.2+1046_daily_bin1507.fits evtable="EVENTS" scfile=/scratch/kocevski/651038/ft2_4FGL_J1631.2+1046_daily_bin1507.fits sctable="SC_DATA" expcube=/scratch/kocevski/651038/ltcube_629942401_630201601_4FGL_J1631.2+1046_daily_bin1507.fits outfile=/scratch/kocevski/651038/expmap_629942401_630201601_4FGL_J1631.2+1046_daily_bin1507.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/651038/ltcube_629942401_630201601_4FGL_J1631.2+1046_daily_bin1507.fits
.....................!
real 191.58
user 185.32
sys 5.33

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
Extended source FHES J1723.5-0501 in ROI with RadialGaussian spatial model.
Added 168 point sources and 1 extended sources
If using unbinned likelihood you will need to rerun gtdiffrsp for the extended sources or rerun the makeModel function with optional argument psForce=True

Setting source of interest to:
4FGL J1631.2+1046 @ 247.804 10.7753

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/651038/ft1_filtered_4FGL_J1631.2+1046_daily_bin1507.fits scfile=/scratch/kocevski/651038/ft2_4FGL_J1631.2+1046_daily_bin1507.fits outfile=/scratch/kocevski/651038/cmap_629942401_630201601_4FGL_J1631.2+1046_daily_bin1507.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=247.804 yref=10.7753 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.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/651038/ft1_filtered_4FGL_J1631.2+1046_daily_bin1507.fits scfile=/scratch/kocevski/651038/ft2_4FGL_J1631.2+1046_daily_bin1507.fits outfile=/scratch/kocevski/651038/cmap_HighResolution_629942401_630201601_4FGL_J1631.2+1046_daily_bin1507.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=247.804 yref=10.7753 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.37
sys 0.17

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/651038/ft1_filtered_4FGL_J1631.2+1046_daily_bin1507.fits evtable="EVENTS" scfile=/scratch/kocevski/651038/ft2_4FGL_J1631.2+1046_daily_bin1507.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/651038/Model_4FGL_J1631.2+1046_daily_bin1507.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 FHES J1723.5-0501
adding source GAL_V02
Working on...
/scratch/kocevski/651038/ft1_filtered_4FGL_J1631.2+1046_daily_bin1507.fits.....................!
real 62.27
user 60.85
sys 1.24

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/651038/ft1_filtered_4FGL_J1631.2+1046_daily_bin1507.fits', '/scratch/kocevski/651038/ft2_4FGL_J1631.2+1046_daily_bin1507.fits', expMap='/scratch/kocevski/651038/expmap_629942401_630201601_4FGL_J1631.2+1046_daily_bin1507.fits', expCube='/scratch/kocevski/651038/ltcube_629942401_630201601_4FGL_J1631.2+1046_daily_bin1507.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/651038/Model_4FGL_J1631.2+1046_daily_bin1507.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1631.2+1046'

4FGL J1631.2+1046
   Spectrum: PowerLaw
254    Prefactor:  8.500e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-13)
255        Index:  2.463e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
256        Scale:  8.952e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/651038/ft1_filtered_4FGL_J1631.2+1046_daily_bin1507.fits
Spacecraft file(s): /scratch/kocevski/651038/ft2_4FGL_J1631.2+1046_daily_bin1507.fits
Exposure map: /scratch/kocevski/651038/expmap_629942401_630201601_4FGL_J1631.2+1046_daily_bin1507.fits
Exposure cube: /scratch/kocevski/651038/ltcube_629942401_630201601_4FGL_J1631.2+1046_daily_bin1507.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/651038/Model_4FGL_J1631.2+1046_daily_bin1507.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) = 7864.98201155

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    2.6971       1.0000         .10000E-03   10000.    
     2 'Prefactor '    17.058       1.0000         .10000E-03   10000.    
     3 'norm      '    .10008E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    56.576       1.0000         .10000E-03   10000.    
     5 'norm      '    18.875       1.0000         .10000E-03   10000.    
     6 'norm      '    11.537       1.0000         .10000E-03   10000.    
     7 'norm      '    22.414       1.0000         .10000E-03   10000.    
     8 'norm      '    80.830       1.0000         .10000E-03   10000.    
     9 'Prefactor '    2.6606       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10011E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    6.7279       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10016E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10021E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    5.6729       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10023E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10084E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    .10044E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    12.941       1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10033E-03   1.0000         .10000E-03   10000.    
    20 'Normalizat'    .90203       1.0000         .10000E-01   10.000    
    21 'Prefactor '    1.0484       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5640E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   7864.937     FROM MIGRAD    STATUS=CONVERGED    445 CALLS     2232 TOTAL
                     EDM=   .14E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .1%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          2.6971        1.9820       -.18660E-07    .14125E-03
   2  Prefactor     17.057        33.321       -.77565E-06   -.33487E-05
   3  norm          .10000E-03    1.2506        .50056E-06** at limit **
   4  Prefactor     56.533        63.950       -.38294E-04   -.20221E-05
   5  norm          18.874        11.090        .53131E-06   -.17786E-04
   6  norm          11.537        3.2229        .26472E-06    .67915E-05
   7  norm          22.411        18.787        .12797E-05   -.52117E-05
   8  norm          80.914        81.529        .74650E-04    .26751E-05
   9  Prefactor     2.6483        11.284       -.16461E-05   -.19246E-03
  10  Prefactor     .10000E-03    162.63        .13743E-04** at limit **
  11  Prefactor     6.7217        40.299       -.50031E-05   -.15169E-04
  12  Prefactor     .10000E-03    4.9876        .24831E-07** at limit **
  13  Prefactor     .10000E-03    6.4767       -.17933E-06** at limit **
  14  Prefactor     5.6707        8.0313       -.25288E-05   -.25859E-03
  15  Prefactor     .10000E-03    5.0251        .93974E-06** at limit **
  16  Prefactor     .10000E-03    37.434        .60333E-06** at limit **
  17  Prefactor     .10000E-03    45.616       -.27433E-05** at limit **
  18  Prefactor     12.940        10.672        .85361E-06   -.68379E-04
  19  Prefactor     .10000E-03    7.7175        .29847E-06** at limit **
  20  Normalizat    .90206        .27823        .18742E-05   -.52305E-04
  21  Prefactor     1.0484        .10447        .39107E-07    .11917E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 2.69708
  Prefactor  = 17.0573
  norm       = 0.0001
  Prefactor  = 56.5334
  norm       = 18.8744
  norm       = 11.5372
  norm       = 22.4108
  norm       = 80.9141
  Prefactor  = 2.64829
  Prefactor  = 0.0001
  Prefactor  = 6.72175
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 5.67074
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 12.9399
  Prefactor  = 0.0001
  Normalizat = 0.902063
  Prefactor  = 1.04841
 **********
 **   18 **HESSE 
 **********

 FCN=   7864.937     FROM HESSE     STATUS=OK           319 CALLS     2551 TOTAL
                     EDM=   .28E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          2.6971        1.9829        .10392E-03   -1.5379    
   2  Prefactor     17.057        33.312        .96974E-04   -1.4882    
   3  norm          .10000E-03    1.2529        .96856E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     56.533        63.976        .53333E-04   -1.4203    
   5  norm          18.874        11.100        .92190E-04   -1.4839    
   6  norm          11.537        3.2239        .79216E-04   -1.5029    
   7  norm          22.411        18.811        .84606E-04   -1.4761    
   8  norm          80.914        81.507        .22337E-03   -1.3906    
   9  Prefactor     2.6483        11.297        .24989E-03   -1.5382    
  10  Prefactor     .10000E-03    163.47        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     6.7217        40.294        .15470E-03   -1.5189    
  12  Prefactor     .10000E-03    5.0122        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .10000E-03    6.5569        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     5.6707        8.0249        .16865E-03   -1.5232    
  15  Prefactor     .10000E-03    5.1120        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     .10000E-03    37.778        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     .10000E-03    45.819        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     12.940        10.665        .11135E-03   -1.4988    
  19  Prefactor     .10000E-03    7.7434        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Normalizat    .90206        .32165        .43468E-03   -.96388    
  21  Prefactor     1.0484        .12274        .16126E-03   -.91133    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.84889e-10
Minuit parameter uncertainties:
  1  1.98299
  2  33.348
  3  7.32536e-06
  4  64.0535
  5  11.1013
  6  3.2239
  7  18.8158
  8  81.6198
  9  10.9425
  10  0.000237109
  11  32.9477
  12  7.14644e-06
  13  7.46615e-06
  14  8.02646
  15  6.43008e-07
  16  4.36979e-05
  17  3.60168e-05
  18  10.6666
  19  1.0418e-05
  20  0.322338
  21  0.122776
Done.

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

Extracting fit parameters...

4FGL J1631.2+1046
   Spectrum: PowerLaw
254    Prefactor:  6.722e+00  3.295e+01  1.000e-04  1.000e+04 ( 1.000e-13)
255        Index:  2.463e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
256        Scale:  8.952e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
561    Prefactor:  1.048e+00  1.228e-01  0.000e+00  1.000e+01 ( 1.000e+00)
562        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
563        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
557   Normalization:  9.021e-01  3.223e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.05
Ra Dec: 247.804 10.775
Photon Flux Upper Limit: 1.29e-07 ph cm-2 s-1
Energy Flux Upper Limit: 1.00e-02 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/651038/likelihoodResults_629942401_630201601_4FGL_J1631.2+1046_daily_bin1507.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) = 7864.23155591
delta logL = 0.705537281147

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 7864.12202059
delta logL = 0.815072593864

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .11338E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    9.2075       1.0000          .0000       10.000    
     3 'Normalizat'    .79127       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0789       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5640E+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=   7864.122     FROM MIGRAD    STATUS=FAILED       391 CALLS      807 TOTAL
                     EDM=   .83E-06    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    .21271E-01    .17412E-03** at limit **
   2  Index         9.2658        9.3812        .14765E-01    .42548E-03
   3  Normalizat    .79137        .13585        .46163E-03    .30833E-04
   4  Prefactor     1.0789        .53830E-01    .15919E-03    .89483E-04
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   7864.122     FROM SIMPLEX   STATUS=UNCHANGED    169 CALLS      976 TOTAL
                     EDM=   .18E-05    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    .21271E-01    .48294E-05** at limit **
   2  Index         9.2658        9.3812        .21684E-03    .42548E-03
   3  Normalizat    .79137        .13585        .53375E-05    .30833E-04
   4  Prefactor     1.0789        .53830E-01    .88414E-06    .89483E-04
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   7864.122     FROM MIGRAD    STATUS=CONVERGED     38 CALLS     1014 TOTAL
                     EDM=   .13E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    .12597E-01    .22898E-03** at limit **
   2  Index         9.2658        9.2939        .29529E-02    .16791E-04
   3  Normalizat    .79137        .12041        .18465E-04    .30784E-04
   4  Prefactor     1.0789        .47801E-01    .63677E-05    .89268E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 9.2658
  Normalizat = 0.79137
  Prefactor  = 1.07889
 **********
 **   18 **HESSE 
 **********

 FCN=   7864.122     FROM HESSE     STATUS=NOT POSDEF    35 CALLS     1049 TOTAL
                     EDM=   .35E-11    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    .15973E-01    .20399E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         9.2658        9.3569        .59058E-03    1.0220    
   3  Normalizat    .79137        .13052        .36930E-05   -1.0039    
   4  Prefactor     1.0789        .51794E-01    .12735E-05   -.90144    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 3.52456e-12
Minuit parameter uncertainties:
  1  1.57465e-07
  2  5.52555
  3  0.130573
  4  0.0517968
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/651038': 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) = 7864.12187935
delta logL = 0.815213839082

Extracting fit parameters...

4FGL J1631.2+1046
   Spectrum: PowerLaw
254    Prefactor:  1.000e-04  1.575e-07  1.000e-04  1.000e+04 ( 1.000e-13)
255        Index:  9.266e+00  5.526e+00  0.000e+00  1.000e+01 (-1.000e+00)
256        Scale:  8.952e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
561    Prefactor:  1.079e+00  5.180e-02  0.000e+00  1.000e+01 ( 1.000e+00)
562        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
563        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
557   Normalization:  7.914e-01  1.306e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.82
Ra Dec: 247.804 10.775
Photon Index (Free Index): 9.27 +/- 5.53
Photon Flux (Free Index): 8.22e-08 +/- 9.15e-07
Energy Flux (Free Index): 9.29e-06 +/- 1.03e-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/651038/cmap_HighResolution_629942401_630201601_4FGL_J1631.2+1046_daily_bin1507.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.00e-02', comment='SUCCESS', energy_flux2='9.29e-06', dlogl='8.15e-01', photon_flux2='8.22e-08', job_status='DONE', time_completed='2021-09-14 19:56:24.629090', photon_index_error2='5.53', photon_index2='9.27', ts='0.05', fit_tolerance='1e-08', GAL='1.05', photon_index_error='0.00', photon_flux_upper_limit='1.29e-07', energy_flux_error2='1.03e-04', EG='0.90', time_epoch_completed='1631674584.63', return_code='0', job_id='651038', GAL2='1.08', EG2='0.79', return_code2='102', photon_flux_error2='9.15e-07', ts2='1.82', photon_index='2.46' WHERE bin_id='1507' AND source_name='4FGL J1631.2+1046' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Tue Sep 14 19:56:24 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0243>
Subject: Job 651038: <4FGL_J1631.2+1046_daily_bin1507> in cluster <slac> Done

Job <4FGL_J1631.2+1046_daily_bin1507> was submitted from host <rhel6-64f> by user <kocevski> in cluster <slac> at Tue Sep 14 19:40:25 2021
Job was executed on host(s) <bullet0243>, in queue <medium>, as user <kocevski> in cluster <slac> at Tue Sep 14 19:41:13 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Tue Sep 14 19:41:13 2021
Terminated at Tue Sep 14 19:56:25 2021
Results reported at Tue Sep 14 19:56:25 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1631.2+1046_daily_bin1507 247.804 10.7753 629942401 630201601 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1631.2+1046 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   769.28 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             258.34 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   914 sec.
    Turnaround time :                            960 sec.

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

