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


Performing analysis on: 4FGL_J1631.2+1046_daily_bin239
RA = 247.804, Dec = 10.7753
tmin = 301276801, tmax = 301536001
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='641316', job_status='RUN', time_executed='2021-09-14 19:06:07.111387', time_epoch_executed='1631671567.11' WHERE source_name='4FGL J1631.2+1046' and cadence='daily' and bin_id='239'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/641316

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/641316/ft1_4FGL_J1631.2+1046_daily_bin239.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/641316/ft2_4FGL_J1631.2+1046_daily_bin239.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/641316/ft1_4FGL_J1631.2+1046_daily_bin239.fits outfile=/scratch/kocevski/641316/ft1_filteredMKT_4FGL_J1631.2+1046_daily_bin239.fits ra=247.804 dec=10.7753 rad=12.0 tmin=301276801.0 tmax=301536001.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.57
user 4.31
sys 0.24

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/641316/ft1_filtered_4FGL_J1631.2+1046_daily_bin239.fits evtable="EVENTS" scfile=/scratch/kocevski/641316/ft2_4FGL_J1631.2+1046_daily_bin239.fits sctable="SC_DATA" expcube=/scratch/kocevski/641316/ltcube_301276801_301536001_4FGL_J1631.2+1046_daily_bin239.fits outfile=/scratch/kocevski/641316/expmap_301276801_301536001_4FGL_J1631.2+1046_daily_bin239.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/641316/ltcube_301276801_301536001_4FGL_J1631.2+1046_daily_bin239.fits
.....................!
real 192.52
user 186.39
sys 5.52

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/641316/ft1_filtered_4FGL_J1631.2+1046_daily_bin239.fits scfile=/scratch/kocevski/641316/ft2_4FGL_J1631.2+1046_daily_bin239.fits outfile=/scratch/kocevski/641316/cmap_301276801_301536001_4FGL_J1631.2+1046_daily_bin239.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.38
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/641316/ft1_filtered_4FGL_J1631.2+1046_daily_bin239.fits scfile=/scratch/kocevski/641316/ft2_4FGL_J1631.2+1046_daily_bin239.fits outfile=/scratch/kocevski/641316/cmap_HighResolution_301276801_301536001_4FGL_J1631.2+1046_daily_bin239.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.57
user 0.40
sys 0.16

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/641316/ft1_filtered_4FGL_J1631.2+1046_daily_bin239.fits evtable="EVENTS" scfile=/scratch/kocevski/641316/ft2_4FGL_J1631.2+1046_daily_bin239.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/641316/Model_4FGL_J1631.2+1046_daily_bin239.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/641316/ft1_filtered_4FGL_J1631.2+1046_daily_bin239.fits.....................!
real 91.16
user 89.62
sys 1.25

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/641316/ft1_filtered_4FGL_J1631.2+1046_daily_bin239.fits', '/scratch/kocevski/641316/ft2_4FGL_J1631.2+1046_daily_bin239.fits', expMap='/scratch/kocevski/641316/expmap_301276801_301536001_4FGL_J1631.2+1046_daily_bin239.fits', expCube='/scratch/kocevski/641316/ltcube_301276801_301536001_4FGL_J1631.2+1046_daily_bin239.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/641316/Model_4FGL_J1631.2+1046_daily_bin239.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/641316/ft1_filtered_4FGL_J1631.2+1046_daily_bin239.fits
Spacecraft file(s): /scratch/kocevski/641316/ft2_4FGL_J1631.2+1046_daily_bin239.fits
Exposure map: /scratch/kocevski/641316/expmap_301276801_301536001_4FGL_J1631.2+1046_daily_bin239.fits
Exposure cube: /scratch/kocevski/641316/ltcube_301276801_301536001_4FGL_J1631.2+1046_daily_bin239.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/641316/Model_4FGL_J1631.2+1046_daily_bin239.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) = 12496.1298214

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    1.4150       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    1.3103       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     5 'norm      '    .68782       1.0000         .10000E-03   10000.    
     6 'norm      '    11.560       1.0000         .10000E-03   10000.    
     7 'norm      '    30.112       1.0000         .10000E-03   10000.    
     8 'norm      '    35.184       1.0000         .10000E-03   10000.    
     9 'Prefactor '    8.8879       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10760E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    53.131       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10305E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    .64420E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    4.1150       1.0000         .10000E-03   10000.    
    15 'Prefactor '    7.1064       1.0000         .10000E-03   10000.    
    16 'Prefactor '    5.7187       1.0000         .10000E-03   10000.    
    17 'Prefactor '    35.114       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10011E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    2.9897       1.0000         .10000E-03   10000.    
    20 'Normalizat'    1.2156       1.0000         .10000E-01   10.000    
    21 'Prefactor '    .90288       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5640E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   12496.12     FROM MIGRAD    STATUS=CONVERGED     94 CALLS     1883 TOTAL
                     EDM=   .83E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  9.5%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          1.4149        1.2652       -.10673E-05   -.60216E-03
   2  Prefactor     .10000E-03    26.928        .13330E-04** at limit **
   3  norm          1.3106        2.6555        .56022E-05   -.14938E-03
   4  Prefactor     .10000E-03    16.437        .39254E-05** at limit **
   5  norm          .70009        13.861       -.42626E-04   -.31253E-03
   6  norm          11.560        2.3959        .33071E-06   -.35997E-04
   7  norm          30.112        1.0132       -.81705E-06   -.15198E-02
   8  norm          34.901        78.963       -.39832E-03    .65264E-03
   9  Prefactor     8.8884        1.0126        .58267E-07    .47278E-03
  10  Prefactor     .10001E-03    60.875        .46017E-04** at limit **
  11  Prefactor     53.115        4.4028       -.17411E-04   -.81760E-02
  12  Prefactor     .10000E-03    6.4395        .93564E-06** at limit **
  13  Prefactor     .10000E-03    17.329       -.15441E-04** at limit **
  14  Prefactor     4.1150        3.4884       -.20433E-05   -.21572E-03
  15  Prefactor     7.1074        5.2994        .65292E-05   -.10849E-03
  16  Prefactor     5.7230        1.4817        .13464E-04    .10197E-02
  17  Prefactor     35.125        3.2371        .15419E-04    .43166E-02
  18  Prefactor     .10000E-03    2.0711       -.12994E-05** at limit **
  19  Prefactor     2.9902        1.0333       -.18080E-05    .52356E-03
  20  Normalizat    1.2156        .23896       -.71240E-05   -.24791E-03
  21  Prefactor     .90284        .91490E-01    .67655E-05   -.34372E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 1.41492
  Prefactor  = 0.0001
  norm       = 1.31064
  Prefactor  = 0.000100001
  norm       = 0.70009
  norm       = 11.5601
  norm       = 30.1117
  norm       = 34.9008
  Prefactor  = 8.8884
  Prefactor  = 0.000100012
  Prefactor  = 53.1146
  Prefactor  = 0.0001
  Prefactor  = 0.000100004
  Prefactor  = 4.11504
  Prefactor  = 7.10744
  Prefactor  = 5.723
  Prefactor  = 35.1255
  Prefactor  = 0.0001
  Prefactor  = 2.99015
  Normalizat = 1.21564
  Prefactor  = 0.902835
 **********
 **   18 **HESSE 
 **********

 FCN=   12496.12     FROM HESSE     STATUS=OK           375 CALLS     2258 TOTAL
                     EDM=   .29E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          1.4149        1.2507        .90993E-02   -1.5470    
   2  Prefactor     .10000E-03    26.853        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          1.3106        2.6804        .96303E-02   -1.5479    
   4  Prefactor     .10000E-03    16.421        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          .70009        4.2617        .75575E-01   -1.5541    
   6  norm          11.560        2.4221        .29456E-02   -1.5028    
   7  norm          30.112        14.142        .18254E-02   -1.4610    
   8  norm          34.901        80.124        .16890E-02   -1.4526    
   9  Prefactor     8.8884        11.174        .33611E-02   -1.5112    
  10  Prefactor     .10001E-03    60.514        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     53.115        31.262        .13756E-02   -1.4249    
  12  Prefactor     .10000E-03    6.3013        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .10000E-03    2.6842        .65056E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     4.1150        3.4987        .49681E-02   -1.5302    
  15  Prefactor     7.1074        5.3245        .37620E-02   -1.5175    
  16  Prefactor     5.7230        40.941        .41991E-02   -1.5229    
  17  Prefactor     35.125        35.097        .16907E-02   -1.4522    
  18  Prefactor     .10000E-03    2.0571        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     2.9902        11.305        .58695E-02   -1.5362    
  20  Normalizat    1.2156        .21027        .87100E-01   -.86121    
  21  Prefactor     .90284        .76526E-01    .45042E-01   -.96042    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.90356e-07
Minuit parameter uncertainties:
  1  1.25068
  2  6.51538e-05
  3  2.68069
  4  0.000227835
  5  3.45473
  6  2.42217
  7  14.1435
  8  80.3723
  9  11.177
  10  0.00170539
  11  31.2717
  12  4.76653e-05
  13  0.000209148
  14  3.49889
  15  5.32481
  16  30.6436
  17  35.1174
  18  3.21316e-05
  19  11.3136
  20  0.210419
  21  0.0765347
Done.

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

Extracting fit parameters...

4FGL J1631.2+1046
   Spectrum: PowerLaw
254    Prefactor:  5.311e+01  3.127e+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:  9.028e-01  7.653e-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:  1.216e+00  2.104e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 3.90
Ra Dec: 247.804 10.775
Photon Index (Fixed Index): 2.46 +/- 0.00
Photon Flux (Fixed Index): 8.03e-08 +/- 4.72e-08
Energy Flux (Fixed Index): 2.43e-05 +/- 1.43e-05

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

Saving results to:
/scratch/kocevski/641316/likelihoodResults_301276801_301536001_4FGL_J1631.2+1046_daily_bin239.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) = 12496.028615
delta logL = 0.0914736724953

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 12496.0229608
delta logL = 0.0971279548139

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    40.490       1.0000         .10000E-03   10000.    
     2 'Index     '    2.7240       1.0000          .0000       10.000    
     3 'Normalizat'    1.2003       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .90688       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.

 FCN=   12496.02     FROM MIGRAD    STATUS=CONVERGED     82 CALLS      289 TOTAL
                     EDM=   .23E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     40.478        44.001        .62994E-04    .27352E-03
   2  Index         2.7238        .70235        .72578E-02    .13405E-03
   3  Normalizat    1.2004        .24135        .38779E-03   -.10848E-02
   4  Prefactor     .90695        .91482E-01    .16763E-03   -.28073E-02
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 40.4783
  Index      = 2.72384
  Normalizat = 1.20037
  Prefactor  = 0.906953
 **********
 **   18 **HESSE 
 **********

 FCN=   12496.02     FROM HESSE     STATUS=OK            25 CALLS      314 TOTAL
                     EDM=   .22E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     40.478        38.083        .12599E-04   -1.4435    
   2  Index         2.7238        .60766        .29031E-03   -.47263    
   3  Normalizat    1.2004        .24106        .77557E-04   -.86591    
   4  Prefactor     .90695        .91363E-01    .33526E-04   -.95899    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.23993e-09
Minuit parameter uncertainties:
  1  38.1059
  2  0.609561
  3  0.241286
  4  0.0913781
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/641316': 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) = 12496.0229588
delta logL = 0.097129942591

Extracting fit parameters...

4FGL J1631.2+1046
   Spectrum: PowerLaw
254    Prefactor:  4.048e+01  3.811e+01  1.000e-04  1.000e+04 ( 1.000e-13)
255        Index:  2.724e+00  6.096e-01  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:  9.070e-01  9.138e-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:  1.200e+00  2.413e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 4.10
Ra Dec: 247.804 10.775
Photon Index (Free Index): 2.72 +/- 0.61
Photon Flux (Free Index): 9.21e-08 +/- 5.68e-08
Energy Flux (Free Index): 2.18e-05 +/- 1.34e-05

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/641316/cmap_HighResolution_301276801_301536001_4FGL_J1631.2+1046_daily_bin239.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.32e-02', comment='SUCCESS', photon_flux='8.03e-08', energy_flux2='2.18e-05', photon_flux_error='4.72e-08', dlogl='9.71e-02', energy_flux='2.43e-05', photon_flux2='9.21e-08', job_status='DONE', time_completed='2021-09-14 19:20:59.959656', photon_index_error2='0.61', photon_index2='2.72', ts='3.90', fit_tolerance='1e-08', GAL='0.90', photon_index_error='0.00', photon_flux_upper_limit='1.70e-07', energy_flux_error2='1.34e-05', EG='1.22', time_epoch_completed='1631672459.96', return_code='0', job_id='641316', GAL2='0.91', EG2='1.20', return_code2='0', energy_flux_error='1.43e-05', photon_flux_error2='5.68e-08', ts2='4.10', photon_index='2.46' WHERE bin_id='239' AND source_name='4FGL J1631.2+1046' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Tue Sep 14 19:20:59 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0211>
Subject: Job 641316: <4FGL_J1631.2+1046_daily_bin239> in cluster <slac> Done

Job <4FGL_J1631.2+1046_daily_bin239> was submitted from host <rhel6-64d> by user <kocevski> in cluster <slac> at Tue Sep 14 19:05:25 2021
Job was executed on host(s) <bullet0211>, in queue <medium>, as user <kocevski> in cluster <slac> at Tue Sep 14 19:05:53 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:05:53 2021
Terminated at Tue Sep 14 19:21:00 2021
Results reported at Tue Sep 14 19:21:00 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1631.2+1046_daily_bin239 247.804 10.7753 301276801 301536001 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 :                                   888.56 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             335.61 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   907 sec.
    Turnaround time :                            935 sec.

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

