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


Performing analysis on: 4FGL_J1249.8+3707_daily_bin629
RA = 192.46, Dec = 37.1306
tmin = 402364801, tmax = 402624001
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='937348', job_status='RUN', time_executed='2021-09-06 06:37:49.830876', time_epoch_executed='1630935469.83' WHERE source_name='4FGL J1249.8+3707' and cadence='daily' and bin_id='629'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/937348

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

Retrieving the FT1 file...

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

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

Retrieving 50 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/937348/ft1_4FGL_J1249.8+3707_daily_bin629.fits


Retrieving the FT1 file...

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

Retrieving 50 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/937348/ft2_4FGL_J1249.8+3707_daily_bin629.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/937348/ft1_4FGL_J1249.8+3707_daily_bin629.fits outfile=/scratch/kocevski/937348/ft1_filteredMKT_4FGL_J1249.8+3707_daily_bin629.fits ra=192.46 dec=37.1306 rad=12.0 tmin=402364801.0 tmax=402624001.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 5.31
user 3.26
sys 0.23

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/937348/ft1_filtered_4FGL_J1249.8+3707_daily_bin629.fits evtable="EVENTS" scfile=/scratch/kocevski/937348/ft2_4FGL_J1249.8+3707_daily_bin629.fits sctable="SC_DATA" expcube=/scratch/kocevski/937348/ltcube_402364801_402624001_4FGL_J1249.8+3707_daily_bin629.fits outfile=/scratch/kocevski/937348/expmap_402364801_402624001_4FGL_J1249.8+3707_daily_bin629.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/937348/ltcube_402364801_402624001_4FGL_J1249.8+3707_daily_bin629.fits
.....................!
real 190.50
user 185.14
sys 4.91

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/937348/ft1_filtered_4FGL_J1249.8+3707_daily_bin629.fits scfile=/scratch/kocevski/937348/ft2_4FGL_J1249.8+3707_daily_bin629.fits outfile=/scratch/kocevski/937348/cmap_402364801_402624001_4FGL_J1249.8+3707_daily_bin629.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.64
user 0.38
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/937348/ft1_filtered_4FGL_J1249.8+3707_daily_bin629.fits scfile=/scratch/kocevski/937348/ft2_4FGL_J1249.8+3707_daily_bin629.fits outfile=/scratch/kocevski/937348/cmap_HighResolution_402364801_402624001_4FGL_J1249.8+3707_daily_bin629.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.64
user 0.38
sys 0.16

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

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 'Prefactor '    19.629       1.0000         .10000E-03   10000.    
     3 'norm      '    14.729       1.0000         .10000E-03   10000.    
     4 'Prefactor '    2.4646       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .12198E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10143E-02   1.0000         .10000E-03   10000.    
     7 'Prefactor '    8.6896       1.0000         .10000E-03   10000.    
     8 'Prefactor '    7.9855       1.0000         .10000E-03   10000.    
     9 'Prefactor '    8.3060       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10006E-03   1.0000         .10000E-03   10000.    
    12 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10020E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    .12888E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    .10021E-03   1.0000         .10000E-03   10000.    
    18 'norm      '    7.3839       1.0000         .10000E-03   10000.    
    19 'norm      '    1.5656       1.0000         .10000E-03   10000.    
    20 'Prefactor '    1.3385       1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10921E-03   1.0000         .10000E-03   10000.    
    25 'Normalizat'    1.4642       1.0000         .10000E-01   10.000    
    26 'Prefactor '    .37899       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=   5738.681     FROM MIGRAD    STATUS=CONVERGED    654 CALLS     3147 TOTAL
                     EDM=   .43E-05    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    17.853         .0000    ** at limit **
   2  Prefactor     19.620        25.575         .0000       -.14956E-03
   3  norm          14.722        4.0635         .0000       -.25749E-03
   4  Prefactor     2.4650        7.9722         .0000       -.45869E-03
   5  Prefactor     .10000E-03    1.3879         .0000    ** at limit **
   6  Prefactor     .18963E-01    1.0962         .0000        .83680E-03
   7  Prefactor     8.6823        8.1888         .0000        .30212E-02
   8  Prefactor     7.9876        13.992         .0000        .78746E-03
   9  Prefactor     8.3081        14.779         .0000        .82883E-03
  10  Prefactor     .10036E-03    33.303         .0000    ** at limit **
  11  Prefactor     .10000E-03    1.8356         .0000    ** at limit **
  12  norm          .10000E-03    1.2183         .0000    ** at limit **
  13  Prefactor     .10200E-03    43.930         .0000    ** at limit **
  14  Prefactor     .10000E-03    7.4624         .0000    ** at limit **
  15  Prefactor     .10001E-03    4.6921         .0000    ** at limit **
  16  norm          .10000E-03    2.8416         .0000    ** at limit **
  17  norm          .10022E-03    32.689         .0000    ** at limit **
  18  norm          7.3843        12.167         .0000        .23568E-03
  19  norm          1.5671        57.170         .0000        .19362E-01
  20  Prefactor     1.3398        2.4031         .0000        .56737E-03
  21  Prefactor     .10000E-03    4.6008         .0000    ** at limit **
  22  Prefactor     .10001E-03    19.726         .0000    ** at limit **
  23  Prefactor     .10002E-03    4.6879         .0000    ** at limit **
  24  Prefactor     .10114E-03    136.17         .0000    ** at limit **
  25  Normalizat    1.4639        .19306         .0000       -.58605E-04
  26  Prefactor     .37924        .22322         .0000        .97593E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 19.6204
  norm       = 14.7223
  Prefactor  = 2.46499
  Prefactor  = 0.0001
  Prefactor  = 0.0189634
  Prefactor  = 8.68228
  Prefactor  = 7.98755
  Prefactor  = 8.30809
  Prefactor  = 0.000100365
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.000101998
  Prefactor  = 0.0001
  Prefactor  = 0.000100014
  norm       = 0.0001
  norm       = 0.000100216
  norm       = 7.38431
  norm       = 1.56711
  Prefactor  = 1.33983
  Prefactor  = 0.0001
  Prefactor  = 0.000100009
  Prefactor  = 0.000100017
  Prefactor  = 0.000101137
  Normalizat = 1.46393
  Prefactor  = 0.379245
 **********
 **   18 **HESSE 
 **********

 FCN=   5738.681     FROM HESSE     STATUS=OK           458 CALLS     3605 TOTAL
                     EDM=   .92E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    17.866        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     19.620        25.574        .90402E-04   -1.4822    
   3  norm          14.722        3.9185        .74010E-04   -1.4940    
   4  Prefactor     2.4650        7.9531        .26049E-03   -1.5394    
   5  Prefactor     .10000E-03    2.1597        .16677E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .18963E-01    2.1597        .28553E-01   -1.5680    
   7  Prefactor     8.6823        8.1896        .13598E-03   -1.5119    
   8  Prefactor     7.9876        13.987        .14189E-03   -1.5143    
   9  Prefactor     8.3081        14.762        .13910E-03   -1.5131    
  10  Prefactor     .10036E-03    33.321        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    1.8403        .10021E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm          .10000E-03    1.2212        .81639E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .10200E-03    44.079        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10000E-03    7.4685        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .10001E-03    4.6997        .16023E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          .10000E-03    6.4043        .24658E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .10022E-03    33.762        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  norm          7.3843        10.711        .10764E-03   -1.5164    
  19  norm          1.5671        44.612        .16996E-02   -1.5458    
  20  Prefactor     1.3398        2.3371        .14692E-03   -1.5476    
  21  Prefactor     .10000E-03    4.6054        .15864E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     .10001E-03    19.732        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10002E-03    4.6898        .16019E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     .10114E-03    136.82        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Normalizat    1.4639        .20067        .19089E-03   -.78797    
  26  Prefactor     .37924        .22937        .41918E-03   -1.1788    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 9.15201e-08
Minuit parameter uncertainties:
  1  6.46167e-05
  2  25.5881
  3  3.91861
  4  7.95655
  5  8.94591e-07
  6  0.403694
  7  8.19062
  8  13.9923
  9  14.7684
  10  0.00697511
  11  2.49609e-07
  12  5.44098e-07
  13  0.0187835
  14  6.39516e-06
  15  0.000516229
  16  1.23878e-06
  17  0.00540683
  18  10.7133
  19  16.7359
  20  2.3373
  21  3.87664e-05
  22  0.000841078
  23  0.00056561
  24  0.0249975
  25  0.200779
  26  0.229924
Done.

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

Extracting fit parameters...

4FGL J1249.8+3707
   Spectrum: PowerLaw
313    Prefactor:  8.308e+00  1.477e+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:  3.792e-01  2.299e-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.464e+00  2.008e-01  1.000e-02  1.000e+01 ( 1.000e+00)


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

Saving results to:
/scratch/kocevski/937348/likelihoodResults_402364801_402624001_4FGL_J1249.8+3707_daily_bin629.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) = 5738.51297261
delta logL = 0.167765899729

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5738.51104036
delta logL = 0.16969814705

Fit tolerance = 1e-08

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

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

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   5738.511     FROM MIGRAD    STATUS=CONVERGED     88 CALLS      284 TOTAL
                     EDM=   .10E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     4.3861        12.566        .19234E-03    .60687E-03
   2  Index         2.2436        1.0004        .57209E-02    .24029E-03
   3  Normalizat    1.4595        .19118        .19110E-03    .33573E-03
   4  Prefactor     .37989        .22615        .41866E-03    .16806E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 4.38613
  Index      = 2.24361
  Normalizat = 1.45949
  Prefactor  = 0.379886
 **********
 **   18 **HESSE 
 **********

 FCN=   5738.511     FROM HESSE     STATUS=OK            25 CALLS      309 TOTAL
                     EDM=   .76E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     4.3861        10.267        .76934E-05   -1.5289    
   2  Index         2.2436        .82004        .22884E-03   -.58389    
   3  Normalizat    1.4595        .19112        .38220E-04   -.78923    
   4  Prefactor     .37989        .22608        .16746E-04   -1.1785    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 7.62329e-10
Minuit parameter uncertainties:
  1  10.2711
  2  0.825413
  3  0.191213
  4  0.226611
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/937348': 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) = 5738.51104029
delta logL = 0.169698223107

Extracting fit parameters...

4FGL J1249.8+3707
   Spectrum: PowerLaw
313    Prefactor:  4.386e+00  1.027e+01  1.000e-04  1.000e+04 ( 1.000e-14)
314        Index:  2.244e+00  8.254e-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:  3.799e-01  2.266e-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.459e+00  1.912e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.42
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/937348/cmap_HighResolution_402364801_402624001_4FGL_J1249.8+3707_daily_bin629.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='3.38e-03', job_status='DONE', photon_flux_upper_limit='4.60e-08', time_completed='2021-09-06 06:50:21.712288', job_id='937348', GAL2='0.38', fit_tolerance='1e-08', EG2='1.46', EG='1.46', time_epoch_completed='1630936221.71', return_code2='0', ts='0.42', comment='SUCCESS', return_code='0', GAL='0.38', dlogl='1.70e-01', ts2='0.76', photon_index_error='0.00', photon_index='1.78' WHERE bin_id='629' AND source_name='4FGL J1249.8+3707' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 06:50:21 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0264>
Subject: Job 937348: <4FGL_J1249.8+3707_daily_bin629> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1249.8+3707_daily_bin629 192.46 37.1306 402364801 402624001 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 :                                   746.00 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             289.93 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   876 sec.
    Turnaround time :                            878 sec.

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

