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


Performing analysis on: 4FGL_J1249.8+3707_daily_bin613
RA = 192.46, Dec = 37.1306
tmin = 398217601, tmax = 398476801
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='937325', job_status='RUN', time_executed='2021-09-06 06:37:46.785003', time_epoch_executed='1630935466.79' WHERE source_name='4FGL J1249.8+3707' and cadence='daily' and bin_id='613'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/937325

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

Retrieving the FT1 file...

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

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

Retrieving 49 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/937325/ft1_4FGL_J1249.8+3707_daily_bin613.fits


Retrieving the FT1 file...

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

Retrieving 49 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/937325/ft2_4FGL_J1249.8+3707_daily_bin613.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/937325/ft1_4FGL_J1249.8+3707_daily_bin613.fits outfile=/scratch/kocevski/937325/ft1_filteredMKT_4FGL_J1249.8+3707_daily_bin613.fits ra=192.46 dec=37.1306 rad=12.0 tmin=398217601.0 tmax=398476801.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.95
user 6.22
sys 0.22

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/937325/ft2_4FGL_J1249.8+3707_daily_bin613.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/937325/ft1_filteredMKT_4FGL_J1249.8+3707_daily_bin613.fits evtable="EVENTS" outfile="/scratch/kocevski/937325/ft1_filtered_4FGL_J1249.8+3707_daily_bin613.fits" apply_filter=yes overwrite=yes header_obstimes=yes tstart=0.0 tstop=0.0 gtifile="default" chatter=3 clobber=yes debug=no gui=no mode="ql"

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/937325/ft1_filtered_4FGL_J1249.8+3707_daily_bin613.fits" evtable="EVENTS" scfile=/scratch/kocevski/937325/ft2_4FGL_J1249.8+3707_daily_bin613.fits sctable="SC_DATA" outfile=/scratch/kocevski/937325/ltcube_398217601_398476801_4FGL_J1249.8+3707_daily_bin613.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/937325/ft2_4FGL_J1249.8+3707_daily_bin613.fits
.....................!
real 10.65
user 10.27
sys 0.32

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/937325/ft1_filtered_4FGL_J1249.8+3707_daily_bin613.fits evtable="EVENTS" scfile=/scratch/kocevski/937325/ft2_4FGL_J1249.8+3707_daily_bin613.fits sctable="SC_DATA" expcube=/scratch/kocevski/937325/ltcube_398217601_398476801_4FGL_J1249.8+3707_daily_bin613.fits outfile=/scratch/kocevski/937325/expmap_398217601_398476801_4FGL_J1249.8+3707_daily_bin613.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/937325/ltcube_398217601_398476801_4FGL_J1249.8+3707_daily_bin613.fits
.....................!
real 190.61
user 185.83
sys 4.32

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/937325/ft1_filtered_4FGL_J1249.8+3707_daily_bin613.fits scfile=/scratch/kocevski/937325/ft2_4FGL_J1249.8+3707_daily_bin613.fits outfile=/scratch/kocevski/937325/cmap_398217601_398476801_4FGL_J1249.8+3707_daily_bin613.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.61
user 0.38
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/937325/ft1_filtered_4FGL_J1249.8+3707_daily_bin613.fits scfile=/scratch/kocevski/937325/ft2_4FGL_J1249.8+3707_daily_bin613.fits outfile=/scratch/kocevski/937325/cmap_HighResolution_398217601_398476801_4FGL_J1249.8+3707_daily_bin613.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.58
user 0.38
sys 0.15

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .12302E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .20260E-02   1.0000         .10000E-03   10000.    
     3 'norm      '    14.873       1.0000         .10000E-03   10000.    
     4 'Prefactor '    6.5904       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    2.8832       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10442E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    3.3913       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10033E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10198E-03   1.0000         .10000E-03   10000.    
    12 'norm      '    .10334E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    .12403E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    23.657       1.0000         .10000E-03   10000.    
    15 'Prefactor '    11.419       1.0000         .10000E-03   10000.    
    16 'norm      '    .10095E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    10.596       1.0000         .10000E-03   10000.    
    18 'norm      '    1.4343       1.0000         .10000E-03   10000.    
    19 'norm      '    .31821E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    2.6463       1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10337E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10063E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10118E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10037E-03   1.0000         .10000E-03   10000.    
    25 'Normalizat'    .86722       1.0000         .10000E-01   10.000    
    26 'Prefactor '    1.0429       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=   4014.055     FROM MIGRAD    STATUS=CONVERGED    617 CALLS     3100 TOTAL
                     EDM=   .24E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  5.4%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    74.197       -.58056E-05** at limit **
   2  Prefactor     .10000E-03    203.31       -.79212E-05** at limit **
   3  norm          14.874        4.8559       -.45510E-07    .23736E-04
   4  Prefactor     6.5914        8.1085       -.57963E-06   -.37391E-04
   5  Prefactor     .10000E-03    1.0612       -.70104E-07** at limit **
   6  Prefactor     2.8833        2.5833       -.81432E-07   -.33172E-04
   7  Prefactor     .10000E-03    4.9637        .14154E-08** at limit **
   8  Prefactor     .10000E-03    22.285        .30369E-07** at limit **
   9  Prefactor     3.4031        24.023       -.90773E-06    .72647E-07
  10  Prefactor     .10000E-03    35.443        .11509E-05** at limit **
  11  Prefactor     .10000E-03    4.0661       -.53199E-06** at limit **
  12  norm          .10000E-03    2.8003       -.15594E-05** at limit **
  13  Prefactor     .10000E-03    93.289        .44697E-07** at limit **
  14  Prefactor     23.704        35.915       -.31330E-05    .20274E-04
  15  Prefactor     11.419        17.875        .31473E-06    .58549E-04
  16  norm          .10000E-03    4.8745       -.13618E-05** at limit **
  17  norm          10.618        23.106       -.49282E-06   -.15880E-04
  18  norm          1.4325        3.1030        .15119E-05    .12331E-03
  19  norm          .10000E-03    5.4453       -.15545E-05** at limit **
  20  Prefactor     2.6458        3.9604       -.17312E-06    .71811E-04
  21  Prefactor     .10000E-03    21.872        .48909E-06** at limit **
  22  Prefactor     .10000E-03    27.075       -.24464E-05** at limit **
  23  Prefactor     .10000E-03    22.254        .89871E-07** at limit **
  24  Prefactor     .10000E-03    36.662        .19704E-05** at limit **
  25  Normalizat    .86699        .21434        .36073E-05   -.15384E-04
  26  Prefactor     1.0430        .26426       -.31753E-05    .20835E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100001
  Prefactor  = 0.000100002
  norm       = 14.8736
  Prefactor  = 6.59137
  Prefactor  = 0.0001
  Prefactor  = 2.88329
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 3.40314
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 23.7044
  Prefactor  = 11.4195
  norm       = 0.0001
  norm       = 10.6178
  norm       = 1.4325
  norm       = 0.0001
  Prefactor  = 2.64583
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Normalizat = 0.866988
  Prefactor  = 1.04304
 **********
 **   18 **HESSE 
 **********

 FCN=   4014.055     FROM HESSE     STATUS=OK           454 CALLS     3554 TOTAL
                     EDM=   .59E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    75.564        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    199.28        .54070E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          14.874        4.8446        .76464E-04   -1.4936    
   4  Prefactor     6.5914        8.0977        .15632E-03   -1.5194    
   5  Prefactor     .10000E-03    1.0665        .63654E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     2.8833        2.5776        .92598E-04   -1.5368    
   7  Prefactor     .10000E-03    4.9806        .13785E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    22.455        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     3.4031        24.034        .21970E-03   -1.5339    
  10  Prefactor     .10000E-03    35.535        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    4.0709        .12464E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm          .10000E-03    2.8472        .10411E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .10000E-03    93.901        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     23.704        35.782        .82355E-04   -1.4734    
  15  Prefactor     11.419        17.870        .11855E-03   -1.5032    
  16  norm          .10000E-03    4.9151        .13657E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          10.618        23.200        .12308E-03   -1.5056    
  18  norm          1.4325        3.2704        .16486E-03   -1.5469    
  19  norm          .10000E-03    10.831        .27364E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     2.6458        3.9185        .14328E-03   -1.5383    
  21  Prefactor     .10000E-03    22.088        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     .10000E-03    27.266        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10000E-03    22.365        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     .10000E-03    36.761        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Normalizat    .86699        .24174        .23785E-03   -.97630    
  26  Prefactor     1.0430        .30204        .27335E-03   -.91308    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 5.85609e-10
Minuit parameter uncertainties:
  1  0.000612793
  2  0.00123669
  3  4.84477
  4  8.09905
  5  2.93062e-10
  6  2.57768
  7  6.07255e-07
  8  1.35336e-05
  9  18.0977
  10  9.78849e-05
  11  2.0627e-06
  12  1.28784e-05
  13  6.71536e-05
  14  35.8143
  15  17.8786
  16  7.57359e-06
  17  23.2194
  18  3.27085
  19  0.000134626
  20  3.91883
  21  6.43269e-05
  22  0.000148329
  23  1.41029e-05
  24  0.000122625
  25  0.242045
  26  0.302529
Done.

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

Extracting fit parameters...

4FGL J1249.8+3707
   Spectrum: PowerLaw
313    Prefactor:  3.403e+00  1.810e+01  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.043e+00  3.025e-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:  8.670e-01  2.420e-01  1.000e-02  1.000e+01 ( 1.000e+00)


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

Saving results to:
/scratch/kocevski/937325/likelihoodResults_398217601_398476801_4FGL_J1249.8+3707_daily_bin613.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) = 4013.84594065
delta logL = 0.20954588477

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 4013.80985249
delta logL = 0.245634045092

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    1.7847       1.0000         .10000E-03   10000.    
     2 'Index     '    2.8364       1.0000          .0000       10.000    
     3 'Normalizat'    .83576       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0583       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=   4013.810     FROM MIGRAD    STATUS=CONVERGED     59 CALLS      240 TOTAL
                     EDM=   .25E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     1.7869        79.584        .78300E-02    .10484E-02
   2  Index         2.8363        3.0676        .94227E-01    .23235E-03
   3  Normalizat    .83563        .51551E-01    .44075E-01   -.56015E-04
   4  Prefactor     1.0584        .61816E-01    .61366E-01   -.94593E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 1.78686
  Index      = 2.8363
  Normalizat = 0.835629
  Prefactor  = 1.05844
 **********
 **   18 **HESSE 
 **********

 FCN=   4013.810     FROM HESSE     STATUS=NOT POSDEF    33 CALLS      273 TOTAL
                     EDM=   .27E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     1.7869        188.32        .12163E-03   -1.5441    
   2  Index         2.8363        6.1198        .50879E-02   -.44753    
   3  Normalizat    .83563        .29865        .24176E-03   -.98760    
   4  Prefactor     1.0584        .34511        .27140E-03   -.90806    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 2.69903e-09
Minuit parameter uncertainties:
  1  36.8066
  2  7.28781
  3  0.29924
  4  0.34584
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/937325': 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) = 4013.80985217
delta logL = 0.245634367453

Extracting fit parameters...

4FGL J1249.8+3707
   Spectrum: PowerLaw
313    Prefactor:  1.787e+00  3.681e+01  1.000e-04  1.000e+04 ( 1.000e-14)
314        Index:  2.836e+00  7.288e+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.058e+00  3.458e-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:  8.356e-01  2.992e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.04
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/937325/cmap_HighResolution_398217601_398476801_4FGL_J1249.8+3707_daily_bin613.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='4.49e-03', job_status='DONE', photon_flux_upper_limit='6.11e-08', time_completed='2021-09-06 06:48:04.046268', job_id='937325', GAL2='1.06', fit_tolerance='1e-08', EG2='0.84', EG='0.87', time_epoch_completed='1630936084.05', return_code2='102', ts='0.04', comment='SUCCESS', return_code='0', GAL='1.04', dlogl='2.46e-01', ts2='0.55', photon_index_error='0.00', photon_index='1.78' WHERE bin_id='613' AND source_name='4FGL J1249.8+3707' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 06:48:04 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0281>
Subject: Job 937325: <4FGL_J1249.8+3707_daily_bin613> in cluster <slac> Done

Job <4FGL_J1249.8+3707_daily_bin613> was submitted from host <rhel6-64q> by user <kocevski> in cluster <slac> at Mon Sep  6 06:35:42 2021
Job was executed on host(s) <bullet0281>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep  6 06:35:44 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:35:44 2021
Terminated at Mon Sep  6 06:48:04 2021
Results reported at Mon Sep  6 06:48:04 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1249.8+3707_daily_bin613 192.46 37.1306 398217601 398476801 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 :                                   611.00 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             256.21 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   740 sec.
    Turnaround time :                            742 sec.

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

