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


Performing analysis on: 4FGL_J1249.8+3707_daily_bin900
RA = 192.46, Dec = 37.1306
tmin = 472608001, tmax = 472867201
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='938871', job_status='RUN', time_executed='2021-09-06 06:41:15.276021', time_epoch_executed='1630935675.28' WHERE source_name='4FGL J1249.8+3707' and cadence='daily' and bin_id='900'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/938871

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/938871/ft1_4FGL_J1249.8+3707_daily_bin900.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/938871/ft2_4FGL_J1249.8+3707_daily_bin900.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/938871/ft1_4FGL_J1249.8+3707_daily_bin900.fits outfile=/scratch/kocevski/938871/ft1_filteredMKT_4FGL_J1249.8+3707_daily_bin900.fits ra=192.46 dec=37.1306 rad=12.0 tmin=472608001.0 tmax=472867201.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.59
user 3.29
sys 0.21

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/938871/ft1_filtered_4FGL_J1249.8+3707_daily_bin900.fits evtable="EVENTS" scfile=/scratch/kocevski/938871/ft2_4FGL_J1249.8+3707_daily_bin900.fits sctable="SC_DATA" expcube=/scratch/kocevski/938871/ltcube_472608001_472867201_4FGL_J1249.8+3707_daily_bin900.fits outfile=/scratch/kocevski/938871/expmap_472608001_472867201_4FGL_J1249.8+3707_daily_bin900.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/938871/ltcube_472608001_472867201_4FGL_J1249.8+3707_daily_bin900.fits
.....................!
real 190.46
user 185.62
sys 4.22

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/938871/ft1_filtered_4FGL_J1249.8+3707_daily_bin900.fits scfile=/scratch/kocevski/938871/ft2_4FGL_J1249.8+3707_daily_bin900.fits outfile=/scratch/kocevski/938871/cmap_472608001_472867201_4FGL_J1249.8+3707_daily_bin900.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.54
user 0.37
sys 0.14

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

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10018E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10009E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    14.395       1.0000         .10000E-03   10000.    
     4 'Prefactor '    7.1473       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    3.5972       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    18.516       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .55668E-03   1.0000         .10000E-03   10000.    
    12 'norm      '    5.2264       1.0000         .10000E-03   10000.    
    13 'Prefactor '    .79087E-01   1.0000         .10000E-03   10000.    
    14 'Prefactor '    17.289       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10015E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    2.8369       1.0000         .10000E-03   10000.    
    17 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
    18 'norm      '    .10152E-03   1.0000         .10000E-03   10000.    
    19 'norm      '    3.1484       1.0000         .10000E-03   10000.    
    20 'Prefactor '    .84005       1.0000         .10000E-03   10000.    
    21 'Prefactor '    6.4513       1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10257E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10010E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10172E-03   1.0000         .10000E-03   10000.    
    25 'Normalizat'    1.4028       1.0000         .10000E-01   10.000    
    26 'Prefactor '    .63685       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=   6885.409     FROM MIGRAD    STATUS=CONVERGED    684 CALLS     4242 TOTAL
                     EDM=   .83E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.8%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    22.017       -.18393E-06** at limit **
   2  Prefactor     .10000E-03    29.249       -.13595E-05** at limit **
   3  norm          14.396        4.6237        .48494E-07    .53793E-04
   4  Prefactor     7.1483        6.0951        .44894E-07    .56890E-04
   5  Prefactor     .10000E-03    1.8225        .17566E-07** at limit **
   6  Prefactor     3.5973        2.7343        .22505E-07    .40088E-04
   7  Prefactor     .10000E-03    4.2741        .85127E-08** at limit **
   8  Prefactor     .10000E-03    26.781        .13088E-05** at limit **
   9  Prefactor     .10000E-03    6.7488       -.11404E-06** at limit **
  10  Prefactor     18.535        106.62       -.10140E-05   -.96401E-06
  11  Prefactor     .10000E-03    3.6092       -.38418E-06** at limit **
  12  norm          5.2322        6.5860       -.51665E-06   -.14660E-03
  13  Prefactor     .10021E-03    42.616       -.78418E-06** at limit **
  14  Prefactor     17.298        31.639        .13318E-06    .74453E-04
  15  Prefactor     .10000E-03    7.2261       -.74610E-07** at limit **
  16  norm          2.8345        4.6441        .20855E-05   -.17055E-03
  17  norm          .10000E-03    3.2047       -.47201E-09** at limit **
  18  norm          .10000E-03    3.3900       -.90053E-06** at limit **
  19  norm          3.1615        5.4021       -.15305E-05   -.34815E-04
  20  Prefactor     .84081        8.9526       -.24738E-05   -.44626E-04
  21  Prefactor     6.4502        24.025        .28473E-05   -.15605E-04
  22  Prefactor     .10000E-03    39.746        .54902E-06** at limit **
  23  Prefactor     .10000E-03    13.807       -.44247E-08** at limit **
  24  Prefactor     .10000E-03    77.666        .87872E-08** at limit **
  25  Normalizat    1.4023        .17335       -.87891E-07    .82202E-04
  26  Prefactor     .63731        .20418       -.68199E-06   -.25271E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 14.3955
  Prefactor  = 7.14833
  Prefactor  = 0.0001
  Prefactor  = 3.59727
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 18.5349
  Prefactor  = 0.0001
  norm       = 5.23221
  Prefactor  = 0.000100214
  Prefactor  = 17.2976
  Prefactor  = 0.0001
  norm       = 2.83447
  norm       = 0.0001
  norm       = 0.0001
  norm       = 3.16147
  Prefactor  = 0.840815
  Prefactor  = 6.45018
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Normalizat = 1.40234
  Prefactor  = 0.637306
 **********
 **   18 **HESSE 
 **********

 FCN=   6885.409     FROM HESSE     STATUS=OK           464 CALLS     4706 TOTAL
                     EDM=   .20E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    22.026        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    29.268        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          14.396        4.5869        .46314E-03   -1.4949    
   4  Prefactor     7.1483        6.0971        .15004E-03   -1.5173    
   5  Prefactor     .10000E-03    1.8649        .21714E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     3.5973        2.7260        .11058E-03   -1.5329    
   7  Prefactor     .10000E-03    4.2832        .16751E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    27.002        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .10000E-03    6.7525        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     18.535        105.70        .93079E-04   -1.4847    
  11  Prefactor     .10000E-03    16.439        .30190E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm          5.2322        6.5629        .17583E-03   -1.5250    
  13  Prefactor     .10021E-03    40.233        .15085       -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     17.298        31.319        .96325E-04   -1.4876    
  15  Prefactor     .10000E-03    7.2496        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          2.8345        4.9969        .11419E-02   -1.5371    
  17  norm          .10000E-03    3.2053        .14508E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  norm          .10000E-03    7.0371        .22009E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  norm          3.1615        5.4120        .22845E-03   -1.5352    
  20  Prefactor     .84081        6.4885        .28262E-03   -1.5525    
  21  Prefactor     6.4502        20.254        .79007E-03   -1.5200    
  22  Prefactor     .10000E-03    39.816        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10000E-03    13.909        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     .10000E-03    77.901        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Normalizat    1.4023        .20319        .21401E-03   -.80561    
  26  Prefactor     .63731        .23713        .36375E-03   -1.0604    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.96813e-10
Minuit parameter uncertainties:
  1  1.1199e-05
  2  8.68431e-05
  3  4.58705
  4  6.09762
  5  7.4705e-07
  6  2.72612
  7  5.45697e-06
  8  4.94665e-05
  9  7.21358e-06
  10  88.764
  11  4.78049e-05
  12  6.56376
  13  0.00587543
  14  31.3486
  15  2.3994e-05
  16  4.99765
  17  3.66561e-07
  18  8.42272e-05
  19  5.41281
  20  4.67186
  21  20.2758
  22  0.000113408
  23  1.94681e-05
  24  5.34008e-05
  25  0.203305
  26  0.237502
Done.

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

Extracting fit parameters...

4FGL J1249.8+3707
   Spectrum: PowerLaw
313    Prefactor:  1.000e-04  7.214e-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.373e-01  2.375e-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.402e+00  2.033e-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.21e-08 ph cm-2 s-1
Energy Flux Upper Limit: 2.36e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/938871/likelihoodResults_472608001_472867201_4FGL_J1249.8+3707_daily_bin900.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) = 6885.4096675
delta logL = -0.000699679848367

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 6885.40896784
delta logL = -2.36159394262e-08

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10077E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    1.7680       1.0000          .0000       10.000    
     3 'Normalizat'    1.4024       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .63728       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=   6885.409     FROM MIGRAD    STATUS=CONVERGED     54 CALLS      212 TOTAL
                     EDM=   .21E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    113.13        .90712E-02** at limit **
   2  Index         1.7560        9.1145        .50000        .12802E-04
   3  Normalizat    1.4023        .16962E-01    .48412E-01   -.11345E-04
   4  Prefactor     .63731        .20341E-01    .82134E-01    .69321E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 1.75602
  Normalizat = 1.40234
  Prefactor  = 0.637307
 **********
 **   18 **HESSE 
 **********

 FCN=   6885.409     FROM HESSE     STATUS=NOT POSDEF    33 CALLS      245 TOTAL
                     EDM=   .16E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    513.26        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         1.7560        6.7154        .50000       -.70600    
   3  Normalizat    1.4023        .39322E-01    .21401E-03   -.80561    
   4  Prefactor     .63731        .47041E-01    .36375E-03   -1.0604    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 1.61513e-08
Minuit parameter uncertainties:
  1  0.000204958
  2  33.3155
  3  0.0393227
  4  0.0470435
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/938871': 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) = 6885.40896773
delta logL = 8.33651938592e-08

Extracting fit parameters...

4FGL J1249.8+3707
   Spectrum: PowerLaw
313    Prefactor:  1.000e-04  2.050e-04  1.000e-04  1.000e+04 ( 1.000e-14)
314        Index:  1.756e+00  3.332e+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.373e-01  4.704e-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.402e+00  3.932e-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 -2.500e-04 [aplpy.core]
INFO: Auto-setting vmax to  2.775e-03 [aplpy.core]
Saving /scratch/kocevski/938871/cmap_HighResolution_472608001_472867201_4FGL_J1249.8+3707_daily_bin900.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='2.36e-03', job_status='DONE', photon_flux_upper_limit='3.21e-08', time_completed='2021-09-06 06:56:32.339301', job_id='938871', GAL2='0.64', fit_tolerance='1e-08', EG2='1.40', EG='1.40', time_epoch_completed='1630936592.34', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.64', dlogl='8.34e-08', ts2='-0.00', photon_index_error='0.00', photon_index='1.78' WHERE bin_id='900' AND source_name='4FGL J1249.8+3707' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 06:56:32 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0262>
Subject: Job 938871: <4FGL_J1249.8+3707_daily_bin900> in cluster <slac> Done

Job <4FGL_J1249.8+3707_daily_bin900> was submitted from host <rhel6-64k> by user <kocevski> in cluster <slac> at Mon Sep  6 06:40:40 2021
Job was executed on host(s) <bullet0262>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep  6 06:40:42 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:42 2021
Terminated at Mon Sep  6 06:56:33 2021
Results reported at Mon Sep  6 06:56:33 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1249.8+3707_daily_bin900 192.46 37.1306 472608001 472867201 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 :                                   904.00 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             328.16 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   950 sec.
    Turnaround time :                            953 sec.

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

