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


Performing analysis on: 4FGL_J1249.8+3707_daily_bin707
RA = 192.46, Dec = 37.1306
tmin = 422582401, tmax = 422841601
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='938598', job_status='RUN', time_executed='2021-09-06 06:42:45.509143', time_epoch_executed='1630935765.51' WHERE source_name='4FGL J1249.8+3707' and cadence='daily' and bin_id='707'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/938598

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/938598/ft1_4FGL_J1249.8+3707_daily_bin707.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/938598/ft2_4FGL_J1249.8+3707_daily_bin707.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/938598/ft1_4FGL_J1249.8+3707_daily_bin707.fits outfile=/scratch/kocevski/938598/ft1_filteredMKT_4FGL_J1249.8+3707_daily_bin707.fits ra=192.46 dec=37.1306 rad=12.0 tmin=422582401.0 tmax=422841601.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 3.60
user 3.27
sys 0.24

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/938598/ft2_4FGL_J1249.8+3707_daily_bin707.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/938598/ft2_4FGL_J1249.8+3707_daily_bin707.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/938598/ft1_filteredMKT_4FGL_J1249.8+3707_daily_bin707.fits evtable="EVENTS" outfile="/scratch/kocevski/938598/ft1_filtered_4FGL_J1249.8+3707_daily_bin707.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.58
user 0.33
sys 0.16

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/938598/ft1_filtered_4FGL_J1249.8+3707_daily_bin707.fits" evtable="EVENTS" scfile=/scratch/kocevski/938598/ft2_4FGL_J1249.8+3707_daily_bin707.fits sctable="SC_DATA" outfile=/scratch/kocevski/938598/ltcube_422582401_422841601_4FGL_J1249.8+3707_daily_bin707.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/938598/ft2_4FGL_J1249.8+3707_daily_bin707.fits
.....................!
real 11.86
user 11.40
sys 0.35

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/938598/ft1_filtered_4FGL_J1249.8+3707_daily_bin707.fits evtable="EVENTS" scfile=/scratch/kocevski/938598/ft2_4FGL_J1249.8+3707_daily_bin707.fits sctable="SC_DATA" expcube=/scratch/kocevski/938598/ltcube_422582401_422841601_4FGL_J1249.8+3707_daily_bin707.fits outfile=/scratch/kocevski/938598/expmap_422582401_422841601_4FGL_J1249.8+3707_daily_bin707.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/938598/ltcube_422582401_422841601_4FGL_J1249.8+3707_daily_bin707.fits
.....................!
real 190.80
user 185.38
sys 4.86

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

Setting source of interest to:
4FGL J1249.8+3707 @ 192.46 37.1306

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/938598/ft1_filtered_4FGL_J1249.8+3707_daily_bin707.fits scfile=/scratch/kocevski/938598/ft2_4FGL_J1249.8+3707_daily_bin707.fits outfile=/scratch/kocevski/938598/cmap_422582401_422841601_4FGL_J1249.8+3707_daily_bin707.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=192.46 yref=37.1306 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/938598/ft1_filtered_4FGL_J1249.8+3707_daily_bin707.fits scfile=/scratch/kocevski/938598/ft2_4FGL_J1249.8+3707_daily_bin707.fits outfile=/scratch/kocevski/938598/cmap_HighResolution_422582401_422841601_4FGL_J1249.8+3707_daily_bin707.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=192.46 yref=37.1306 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.56
user 0.39
sys 0.14

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/938598/ft1_filtered_4FGL_J1249.8+3707_daily_bin707.fits evtable="EVENTS" scfile=/scratch/kocevski/938598/ft2_4FGL_J1249.8+3707_daily_bin707.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/938598/Model_4FGL_J1249.8+3707_daily_bin707.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/938598/ft1_filtered_4FGL_J1249.8+3707_daily_bin707.fits.....................!
real 48.85
user 47.12
sys 1.20

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/938598/ft1_filtered_4FGL_J1249.8+3707_daily_bin707.fits', '/scratch/kocevski/938598/ft2_4FGL_J1249.8+3707_daily_bin707.fits', expMap='/scratch/kocevski/938598/expmap_422582401_422841601_4FGL_J1249.8+3707_daily_bin707.fits', expCube='/scratch/kocevski/938598/ltcube_422582401_422841601_4FGL_J1249.8+3707_daily_bin707.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/938598/Model_4FGL_J1249.8+3707_daily_bin707.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1249.8+3707'

4FGL J1249.8+3707
   Spectrum: PowerLaw
313    Prefactor:  2.229e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-14)
314        Index:  1.780e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
315        Scale:  4.011e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/938598/ft1_filtered_4FGL_J1249.8+3707_daily_bin707.fits
Spacecraft file(s): /scratch/kocevski/938598/ft2_4FGL_J1249.8+3707_daily_bin707.fits
Exposure map: /scratch/kocevski/938598/expmap_422582401_422841601_4FGL_J1249.8+3707_daily_bin707.fits
Exposure cube: /scratch/kocevski/938598/ltcube_422582401_422841601_4FGL_J1249.8+3707_daily_bin707.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/938598/Model_4FGL_J1249.8+3707_daily_bin707.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) = 5725.40372819

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    48.738       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    6.3901       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    1.3712       1.0000         .10000E-03   10000.    
     6 'Prefactor '    2.5109       1.0000         .10000E-03   10000.    
     7 'Prefactor '    6.7855       1.0000         .10000E-03   10000.    
     8 'Prefactor '    3.0187       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .15023E-02   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10010E-03   1.0000         .10000E-03   10000.    
    12 'norm      '    2.2669       1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10011E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    .10003E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    18 'norm      '    11.756       1.0000         .10000E-03   10000.    
    19 'norm      '    .10017E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    6.2096       1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10020E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10008E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
    25 'Normalizat'    1.3209       1.0000         .10000E-01   10.000    
    26 'Prefactor '    .60546       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6280E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
 MACHINE ACCURACY LIMITS FURTHER IMPROVEMENT.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   5725.379     FROM MIGRAD    STATUS=CONVERGED    645 CALLS     3080 TOTAL
                     EDM=   .21E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     48.497        71.837         .0000        .25477E-04
   2  Prefactor     .10000E-03    20.628         .0000    ** at limit **
   3  norm          6.3901        3.1226         .0000       -.14287E-04
   4  Prefactor     .10000E-03    3.7961         .0000    ** at limit **
   5  Prefactor     1.3711        1.4033         .0000       -.20261E-03
   6  Prefactor     2.5106        2.2472         .0000        .37691E-04
   7  Prefactor     6.7834        10.176         .0000        .21286E-02
   8  Prefactor     3.0184        13.769         .0000        .10690E-03
   9  Prefactor     .10000E-03    8.7016         .0000    ** at limit **
  10  Prefactor     .10000E-03    135.07         .0000    ** at limit **
  11  Prefactor     .10000E-03    3.5558         .0000    ** at limit **
  12  norm          2.2437        5.6132         .0000        .16949E-01
  13  Prefactor     .10001E-03    22.198         .0000    ** at limit **
  14  Prefactor     .10000E-03    34.356         .0000    ** at limit **
  15  Prefactor     .10000E-03    7.6266         .0000    ** at limit **
  16  norm          .10000E-03    3.1172         .0000    ** at limit **
  17  norm          .10000E-03    4.9013         .0000    ** at limit **
  18  norm          11.761        5.5308         .0000        .14525E-02
  19  norm          .10000E-03    2.6419         .0000    ** at limit **
  20  Prefactor     6.2140        4.1175         .0000        .47308E-02
  21  Prefactor     .10007E-03    23.094         .0000    ** at limit **
  22  Prefactor     .10002E-03    21.987         .0000    ** at limit **
  23  Prefactor     .10000E-03    7.5354         .0000    ** at limit **
  24  Prefactor     .10001E-03    26.793         .0000    ** at limit **
  25  Normalizat    1.3208        .17651         .0000        .35512E-06
  26  Prefactor     .60554        .20690         .0000        .28592E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 48.4972
  Prefactor  = 0.000100004
  norm       = 6.39009
  Prefactor  = 0.0001
  Prefactor  = 1.37109
  Prefactor  = 2.51063
  Prefactor  = 6.78339
  Prefactor  = 3.01842
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 2.24366
  Prefactor  = 0.000100009
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 0.0001
  norm       = 11.7611
  norm       = 0.0001
  Prefactor  = 6.21398
  Prefactor  = 0.000100066
  Prefactor  = 0.000100025
  Prefactor  = 0.0001
  Prefactor  = 0.000100006
  Normalizat = 1.32084
  Prefactor  = 0.605542
 **********
 **   18 **HESSE 
 **********

 FCN=   5725.379     FROM HESSE     STATUS=OK           448 CALLS     3528 TOTAL
                     EDM=   .58E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     48.497        71.821        .57439E-04   -1.4314    
   2  Prefactor     .10000E-03    20.667        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          6.3901        3.1174        .88899E-04   -1.5202    
   4  Prefactor     .10000E-03    3.8217        .14396E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     1.3711        1.4154        .87278E-04   -1.5474    
   6  Prefactor     2.5106        2.2447        .10131E-03   -1.5391    
   7  Prefactor     6.7834        10.149        .77015E-03   -1.5187    
   8  Prefactor     3.0184        13.742        .23358E-03   -1.5360    
   9  Prefactor     .10000E-03    8.7084        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    136.19        .20470E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    3.5933        .13931E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm          2.2437        5.5670        .13015E-02   -1.5408    
  13  Prefactor     .10001E-03    22.216        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10000E-03    34.512        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .10000E-03    7.6514        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          .10000E-03    3.1614        .13034E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .10000E-03    4.9067        .16361E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  norm          11.761        5.5048        .10910E-03   -1.5022    
  19  norm          .10000E-03    2.6430        .11999E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     6.2140        4.1090        .57799E-03   -1.5209    
  21  Prefactor     .10007E-03    23.290        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     .10002E-03    21.993        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10000E-03    7.5581        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     .10001E-03    26.816        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Normalizat    1.3208        .20570        .21001E-03   -.82946    
  26  Prefactor     .60554        .23865        .35353E-03   -1.0735    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 5.78911e-09
Minuit parameter uncertainties:
  1  71.9499
  2  0.00057256
  3  3.11745
  4  1.3189e-07
  5  1.41542
  6  2.24481
  7  10.1517
  8  12.8858
  9  4.58483e-06
  10  0.000347104
  11  3.13196e-07
  12  5.56828
  13  0.000917493
  14  0.000189992
  15  0.000111794
  16  9.62991e-08
  17  1.70444e-06
  18  5.50504
  19  1.49441e-07
  20  4.10914
  21  0.00247227
  22  0.00147502
  23  7.48329e-05
  24  0.00082354
  25  0.205831
  26  0.239053
Done.

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

Extracting fit parameters...

4FGL J1249.8+3707
   Spectrum: PowerLaw
313    Prefactor:  1.000e-04  4.585e-06  1.000e-04  1.000e+04 ( 1.000e-14)
314        Index:  1.780e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
315        Scale:  4.011e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
625    Prefactor:  6.055e-01  2.391e-01  0.000e+00  1.000e+01 ( 1.000e+00)
626        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
627        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
624   Normalization:  1.321e+00  2.058e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 192.460 37.131
Photon Flux Upper Limit: 3.86e-08 ph cm-2 s-1
Energy Flux Upper Limit: 2.84e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/938598/likelihoodResults_422582401_422841601_4FGL_J1249.8+3707_daily_bin707.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) = 5725.37940814
delta logL = -0.000544613923921

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 5725.37886353
delta logL = 2.69119482255e-09

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    1.7758       1.0000          .0000       10.000    
     3 'Normalizat'    1.3208       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .60554       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6280E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   5725.379     FROM MIGRAD    STATUS=CONVERGED     54 CALLS      210 TOTAL
                     EDM=   .27E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    168.66        .90712E-02** at limit **
   2  Index         1.7715        8.9086        .50000        .36096E-05
   3  Normalizat    1.3208        .19313E-01    .47507E-01   -.17604E-05
   4  Prefactor     .60554        .22972E-01    .79829E-01    .29248E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 1.77149
  Normalizat = 1.32084
  Prefactor  = 0.605542
 **********
 **   18 **HESSE 
 **********

 FCN=   5725.379     FROM HESSE     STATUS=NOT POSDEF    31 CALLS      241 TOTAL
                     EDM=   .59E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    412.53        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         1.7715        5.8282        .50000       -.70194    
   3  Normalizat    1.3208        .31363E-01    .21001E-03   -.82946    
   4  Prefactor     .60554        .37219E-01    .35353E-03   -1.0735    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 5.90778e-10
Minuit parameter uncertainties:
  1  1.28242e-05
  2  26.4851
  3  0.0313636
  4  0.0372202
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/938598': 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) = 5725.37886352
delta logL = 8.39099811856e-09

Extracting fit parameters...

4FGL J1249.8+3707
   Spectrum: PowerLaw
313    Prefactor:  1.000e-04  1.282e-05  1.000e-04  1.000e+04 ( 1.000e-14)
314        Index:  1.771e+00  2.649e+01  0.000e+00  1.000e+01 (-1.000e+00)
315        Scale:  4.011e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
625    Prefactor:  6.055e-01  3.722e-02  0.000e+00  1.000e+01 ( 1.000e+00)
626        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
627        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
624   Normalization:  1.321e+00  3.136e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 192.460 37.131

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/938598/cmap_HighResolution_422582401_422841601_4FGL_J1249.8+3707_daily_bin707.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='2.84e-03', job_status='DONE', photon_flux_upper_limit='3.86e-08', time_completed='2021-09-06 06:54:49.081174', job_id='938598', GAL2='0.61', fit_tolerance='1e-08', EG2='1.32', EG='1.32', time_epoch_completed='1630936489.08', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.61', dlogl='8.39e-09', ts2='-0.00', photon_index_error='0.00', photon_index='1.78' WHERE bin_id='707' AND source_name='4FGL J1249.8+3707' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 06:54:49 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0259>
Subject: Job 938598: <4FGL_J1249.8+3707_daily_bin707> in cluster <slac> Done

Job <4FGL_J1249.8+3707_daily_bin707> was submitted from host <rhel6-64k> by user <kocevski> in cluster <slac> at Mon Sep  6 06:40:23 2021
Job was executed on host(s) <bullet0259>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep  6 06:40:25 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Mon Sep  6 06:40:25 2021
Terminated at Mon Sep  6 06:54:49 2021
Results reported at Mon Sep  6 06:54:49 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1249.8+3707_daily_bin707 192.46 37.1306 422582401 422841601 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1249.8+3707 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   720.00 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             295.54 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   864 sec.
    Turnaround time :                            866 sec.

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

