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


Performing analysis on: 4FGL_J1249.8+3707_daily_bin381
RA = 192.46, Dec = 37.1306
tmin = 338083201, tmax = 338342401
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='935858', job_status='RUN', time_executed='2021-09-06 06:34:05.999688', time_epoch_executed='1630935246.0' WHERE source_name='4FGL J1249.8+3707' and cadence='daily' and bin_id='381'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/935858

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

Retrieving the FT1 file...

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

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

Retrieving 52 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/935858/ft1_4FGL_J1249.8+3707_daily_bin381.fits


Retrieving the FT1 file...

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

Retrieving 52 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/935858/ft2_4FGL_J1249.8+3707_daily_bin381.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/935858/ft1_4FGL_J1249.8+3707_daily_bin381.fits outfile=/scratch/kocevski/935858/ft1_filteredMKT_4FGL_J1249.8+3707_daily_bin381.fits ra=192.46 dec=37.1306 rad=12.0 tmin=338083201.0 tmax=338342401.0 emin=100.0 emax=100000.0 zmin=0.0 zmax=90.0 evclass=128 evtype="INDEF" convtype=-1 phasemin=0.0 phasemax=1.0 evtable="EVENTS" chatter=2 clobber=yes debug=no gui=no mode="ql"

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

Done.
real 6.66
user 6.36
sys 0.27

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/935858/ft2_4FGL_J1249.8+3707_daily_bin381.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/935858/ft1_filteredMKT_4FGL_J1249.8+3707_daily_bin381.fits evtable="EVENTS" outfile="/scratch/kocevski/935858/ft1_filtered_4FGL_J1249.8+3707_daily_bin381.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.49
user 0.34
sys 0.14

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/935858/ft1_filtered_4FGL_J1249.8+3707_daily_bin381.fits" evtable="EVENTS" scfile=/scratch/kocevski/935858/ft2_4FGL_J1249.8+3707_daily_bin381.fits sctable="SC_DATA" outfile=/scratch/kocevski/935858/ltcube_338083201_338342401_4FGL_J1249.8+3707_daily_bin381.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/935858/ft2_4FGL_J1249.8+3707_daily_bin381.fits
.....................!
real 11.30
user 10.93
sys 0.33

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/935858/ft1_filtered_4FGL_J1249.8+3707_daily_bin381.fits evtable="EVENTS" scfile=/scratch/kocevski/935858/ft2_4FGL_J1249.8+3707_daily_bin381.fits sctable="SC_DATA" expcube=/scratch/kocevski/935858/ltcube_338083201_338342401_4FGL_J1249.8+3707_daily_bin381.fits outfile=/scratch/kocevski/935858/expmap_338083201_338342401_4FGL_J1249.8+3707_daily_bin381.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/935858/ltcube_338083201_338342401_4FGL_J1249.8+3707_daily_bin381.fits
.....................!
real 192.75
user 186.67
sys 5.77

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/935858/ft1_filtered_4FGL_J1249.8+3707_daily_bin381.fits scfile=/scratch/kocevski/935858/ft2_4FGL_J1249.8+3707_daily_bin381.fits outfile=/scratch/kocevski/935858/cmap_338083201_338342401_4FGL_J1249.8+3707_daily_bin381.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.50
user 0.36
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/935858/ft1_filtered_4FGL_J1249.8+3707_daily_bin381.fits scfile=/scratch/kocevski/935858/ft2_4FGL_J1249.8+3707_daily_bin381.fits outfile=/scratch/kocevski/935858/cmap_HighResolution_338083201_338342401_4FGL_J1249.8+3707_daily_bin381.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.55
user 0.39
sys 0.15

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

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/935858/ft1_filtered_4FGL_J1249.8+3707_daily_bin381.fits', '/scratch/kocevski/935858/ft2_4FGL_J1249.8+3707_daily_bin381.fits', expMap='/scratch/kocevski/935858/expmap_338083201_338342401_4FGL_J1249.8+3707_daily_bin381.fits', expCube='/scratch/kocevski/935858/ltcube_338083201_338342401_4FGL_J1249.8+3707_daily_bin381.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/935858/Model_4FGL_J1249.8+3707_daily_bin381.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/935858/ft1_filtered_4FGL_J1249.8+3707_daily_bin381.fits
Spacecraft file(s): /scratch/kocevski/935858/ft2_4FGL_J1249.8+3707_daily_bin381.fits
Exposure map: /scratch/kocevski/935858/expmap_338083201_338342401_4FGL_J1249.8+3707_daily_bin381.fits
Exposure cube: /scratch/kocevski/935858/ltcube_338083201_338342401_4FGL_J1249.8+3707_daily_bin381.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/935858/Model_4FGL_J1249.8+3707_daily_bin381.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) = 5245.66463556

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .60315       1.0000         .10000E-03   10000.    
     6 'Prefactor '    5.1937       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    17.851       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10010E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    12 'norm      '    .90897       1.0000         .10000E-03   10000.    
    13 'Prefactor '    14.620       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10008E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    5.5531       1.0000         .10000E-03   10000.    
    17 'norm      '    27.975       1.0000         .10000E-03   10000.    
    18 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    19 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    25 'Normalizat'    1.0542       1.0000         .10000E-01   10.000    
    26 'Prefactor '    1.0105       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.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   5245.628     FROM MIGRAD    STATUS=CONVERGED    610 CALLS     3106 TOTAL
                     EDM=   .11E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .8%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    30.136       -.14517E-04** at limit **
   2  Prefactor     .10000E-03    16.769        .78999E-05** at limit **
   3  norm          .10000E-03    1.1251        .44931E-07** at limit **
   4  Prefactor     .10000E-03    5.3456       -.16304E-06** at limit **
   5  Prefactor     .60312        2.2442       -.11096E-05   -.13003E-02
   6  Prefactor     5.1938        2.8113        .94096E-07    .80745E-04
   7  Prefactor     .10000E-03    8.8594        .62263E-06** at limit **
   8  Prefactor     17.851        21.363       -.23282E-06   -.75172E-05
   9  Prefactor     .10000E-03    41.464        .20243E-04** at limit **
  10  Prefactor     .10000E-03    51.911        .19600E-04** at limit **
  11  Prefactor     .10000E-03    2.3082       -.14775E-07** at limit **
  12  norm          .91033        4.5984        .52414E-06   -.52241E-03
  13  Prefactor     14.619        66.242       -.24952E-05   -.25500E-05
  14  Prefactor     .10000E-03    65.937       -.30358E-04** at limit **
  15  Prefactor     .10000E-03    5.4174       -.10914E-07** at limit **
  16  norm          5.5533        4.6680        .18532E-06    .49257E-04
  17  norm          27.975        17.453        .25155E-07    .27035E-05
  18  norm          .10000E-03    2.9260        .78937E-07** at limit **
  19  norm          .10000E-03    1.7705        .19944E-07** at limit **
  20  Prefactor     .10000E-03    1.3291        .83406E-08** at limit **
  21  Prefactor     .10000E-03    4.9079        .15791E-06** at limit **
  22  Prefactor     .10000E-03    19.024       -.24806E-05** at limit **
  23  Prefactor     .10000E-03    12.753       -.32361E-05** at limit **
  24  Prefactor     .10000E-03    33.505       -.29847E-05** at limit **
  25  Normalizat    1.0542        .17500        .32510E-07    .72960E-04
  26  Prefactor     1.0105        .21986        .59877E-07    .16480E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.603118
  Prefactor  = 5.19381
  Prefactor  = 0.0001
  Prefactor  = 17.8508
  Prefactor  = 0.000100001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.910332
  Prefactor  = 14.6189
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 5.55333
  norm       = 27.9752
  norm       = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Normalizat = 1.05424
  Prefactor  = 1.01046
 **********
 **   18 **HESSE 
 **********

 FCN=   5245.628     FROM HESSE     STATUS=OK           450 CALLS     3556 TOTAL
                     EDM=   .21E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    30.077        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    16.768        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .10000E-03    1.1300        .74911E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    5.4150        .16350E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .60312        2.2581        .20006E-03   -1.5553    
   6  Prefactor     5.1938        2.7852        .84164E-04   -1.5252    
   7  Prefactor     .10000E-03    8.9073        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     17.851        21.374        .94797E-04   -1.4863    
   9  Prefactor     .10000E-03    42.140        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    51.800        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    2.3129        .10745E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm          .91033        7.9671        .28536E-02   -1.5517    
  13  Prefactor     14.619        66.282        .10475E-03   -1.4943    
  14  Prefactor     .10000E-03    65.557        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .10000E-03    5.4223        .16463E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          5.5533        4.6605        .13887E-03   -1.5237    
  17  norm          27.975        17.447        .75745E-04   -1.4650    
  18  norm          .10000E-03    2.9900        .24118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  norm          .10000E-03    1.7715        .94110E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10000E-03    1.3418        .81479E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .10000E-03    4.9167        .15669E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     .10000E-03    19.026        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10000E-03    12.794        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     .10000E-03    33.526        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Normalizat    1.0542        .20641        .22069E-03   -.91235    
  26  Prefactor     1.0105        .26056        .28373E-03   -.92382    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.12376e-09
Minuit parameter uncertainties:
  1  7.92324e-06
  2  3.76908e-06
  3  4.17053e-06
  4  1.00579e-06
  5  2.25843
  6  2.78523
  7  8.22995e-06
  8  21.3833
  9  0.000489287
  10  2.08557e-05
  11  2.53945e-06
  12  5.38685
  13  62.3711
  14  0.000176148
  15  7.98661e-07
  16  4.66082
  17  17.45
  18  5.58539e-06
  19  5.08844e-07
  20  9.08127e-07
  21  1.56186e-06
  22  6.45166e-07
  23  4.27072e-06
  24  1.22067e-06
  25  0.206568
  26  0.260889
Done.

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

Extracting fit parameters...

4FGL J1249.8+3707
   Spectrum: PowerLaw
313    Prefactor:  1.000e-04  4.893e-04  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:  1.010e+00  2.609e-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.054e+00  2.066e-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: 4.30e-08 ph cm-2 s-1
Energy Flux Upper Limit: 3.16e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/935858/likelihoodResults_338083201_338342401_4FGL_J1249.8+3707_daily_bin381.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) = 5245.62812393
delta logL = -0.000113176849482

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 5245.62801035
delta logL = 4.06684193877e-07

Fit tolerance = 1e-08

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

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

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
 MIGRAD TERMINATED WITHOUT CONVERGENCE.

 FCN=   5245.620     FROM MIGRAD    STATUS=FAILED       222 CALLS      406 TOTAL
                     EDM=   .22E-07    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .50100        104.02        .18142E-02    .12271E-02
   2  Index         2.4679        5.4746        .96232E-02    .62286E-04
   3  Normalizat    1.0526        .20459        .22085E-03   -.27115E-03
   4  Prefactor     1.0097        .25979        .28383E-03   -.26260E-03
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   5245.620     FROM SIMPLEX   STATUS=UNCHANGED     86 CALLS      492 TOTAL
                     EDM=   .15E-04    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .50100        104.02        .40815E-03   -1.5566    
   2  Index         2.4679        5.4746        .31829E-02   -.53102    
   3  Normalizat    1.0526        .20459        .10132E-03   -.91289    
   4  Prefactor     1.0097        .25979        .11637E-03   -.92408    
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   5245.620     FROM MIGRAD    STATUS=CONVERGED     30 CALLS      522 TOTAL
                     EDM=   .18E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .50099        15.172        .36285E-03   -.51384E-05
   2  Index         2.4679        2.7882        .19246E-02    .14826E-05
   3  Normalizat    1.0526        .20458        .44170E-04    .56624E-06
   4  Prefactor     1.0097        .25823        .56766E-04    .32044E-06
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.500987
  Index      = 2.46795
  Normalizat = 1.05258
  Prefactor  = 1.00967
 **********
 **   18 **HESSE 
 **********

 FCN=   5245.620     FROM HESSE     STATUS=OK            23 CALLS      545 TOTAL
                     EDM=   .17E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .50099        13.326        .14514E-04   -1.5566    
   2  Index         2.4679        2.6405        .76985E-04   -.53102    
   3  Normalizat    1.0526        .20462        .88341E-05   -.91289    
   4  Prefactor     1.0097        .25824        .11353E-04   -.92408    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.6605e-12
Minuit parameter uncertainties:
  1  5.16836
  2  2.84189
  3  0.204776
  4  0.258558
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/935858': 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) = 5245.6203188
delta logL = 0.00769195914927

Extracting fit parameters...

4FGL J1249.8+3707
   Spectrum: PowerLaw
313    Prefactor:  5.010e-01  5.168e+00  1.000e-04  1.000e+04 ( 1.000e-14)
314        Index:  2.468e+00  2.842e+00  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:  1.010e+00  2.586e-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.053e+00  2.048e-01  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/935858/cmap_HighResolution_338083201_338342401_4FGL_J1249.8+3707_daily_bin381.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='3.16e-03', job_status='DONE', photon_flux_upper_limit='4.30e-08', time_completed='2021-09-06 06:46:17.784149', job_id='935858', GAL2='1.01', fit_tolerance='1e-08', EG2='1.05', EG='1.05', time_epoch_completed='1630935977.78', return_code2='0', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.01', dlogl='7.69e-03', ts2='0.02', photon_index_error='0.00', photon_index='1.78' WHERE bin_id='381' AND source_name='4FGL J1249.8+3707' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 06:46:17 PDT 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0015>
Subject: Job 935858: <4FGL_J1249.8+3707_daily_bin381> in cluster <slac> Done

Job <4FGL_J1249.8+3707_daily_bin381> was submitted from host <rhel6-64h> by user <kocevski> in cluster <slac> at Mon Sep  6 06:30:59 2021
Job was executed on host(s) <bullet0015>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep  6 06:31:02 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:31:02 2021
Terminated at Mon Sep  6 06:46:18 2021
Results reported at Mon Sep  6 06:46:18 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1249.8+3707_daily_bin381 192.46 37.1306 338083201 338342401 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 :                                   729.00 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             238.57 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   916 sec.
    Turnaround time :                            919 sec.

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

