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


Performing analysis on: 4FGL_J1249.8+3707_daily_bin963
RA = 192.46, Dec = 37.1306
tmin = 488937601, tmax = 489196801
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='940242', job_status='RUN', time_executed='2021-09-06 06:48:25.455422', time_epoch_executed='1630936105.46' WHERE source_name='4FGL J1249.8+3707' and cadence='daily' and bin_id='963'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/940242

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/940242/ft1_4FGL_J1249.8+3707_daily_bin963.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/940242/ft2_4FGL_J1249.8+3707_daily_bin963.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/940242/ft1_4FGL_J1249.8+3707_daily_bin963.fits outfile=/scratch/kocevski/940242/ft1_filteredMKT_4FGL_J1249.8+3707_daily_bin963.fits ra=192.46 dec=37.1306 rad=12.0 tmin=488937601.0 tmax=489196801.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.62
user 3.33
sys 0.24

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/940242/ft1_filtered_4FGL_J1249.8+3707_daily_bin963.fits evtable="EVENTS" scfile=/scratch/kocevski/940242/ft2_4FGL_J1249.8+3707_daily_bin963.fits sctable="SC_DATA" expcube=/scratch/kocevski/940242/ltcube_488937601_489196801_4FGL_J1249.8+3707_daily_bin963.fits outfile=/scratch/kocevski/940242/expmap_488937601_489196801_4FGL_J1249.8+3707_daily_bin963.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/940242/ltcube_488937601_489196801_4FGL_J1249.8+3707_daily_bin963.fits
.....................!
real 191.41
user 185.16
sys 4.92

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/940242/ft1_filtered_4FGL_J1249.8+3707_daily_bin963.fits scfile=/scratch/kocevski/940242/ft2_4FGL_J1249.8+3707_daily_bin963.fits outfile=/scratch/kocevski/940242/cmap_488937601_489196801_4FGL_J1249.8+3707_daily_bin963.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.38
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/940242/ft1_filtered_4FGL_J1249.8+3707_daily_bin963.fits scfile=/scratch/kocevski/940242/ft2_4FGL_J1249.8+3707_daily_bin963.fits outfile=/scratch/kocevski/940242/cmap_HighResolution_488937601_489196801_4FGL_J1249.8+3707_daily_bin963.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.37
sys 0.16

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

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 '    5.7024       1.0000         .10000E-03   10000.    
     3 'norm      '    18.684       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    2.8611       1.0000         .10000E-03   10000.    
     7 'Prefactor '    3.8165       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 '    .10000E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    12 'norm      '    4.8134       1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10000E-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      '    10.788       1.0000         .10000E-03   10000.    
    17 'norm      '    15.965       1.0000         .10000E-03   10000.    
    18 'norm      '    .10004E-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 '    9.4646       1.0000         .10000E-03   10000.    
    24 'Prefactor '    34.089       1.0000         .10000E-03   10000.    
    25 'Normalizat'    1.2065       1.0000         .10000E-01   10.000    
    26 'Prefactor '    .90401       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=   6630.321     FROM MIGRAD    STATUS=CONVERGED    593 CALLS     3014 TOTAL
                     EDM=   .67E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.7%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    21.957        .12751E-05** at limit **
   2  Prefactor     5.7022        17.237       -.24942E-06   -.18553E-04
   3  norm          18.685        4.3062        .58058E-08   -.74451E-04
   4  Prefactor     .10000E-03    2.1543       -.26550E-06** at limit **
   5  Prefactor     .10000E-03    1.5582        .19177E-06** at limit **
   6  Prefactor     2.8612        2.2276       -.83327E-07   -.14320E-03
   7  Prefactor     3.8171        10.913        .47931E-07   -.48510E-04
   8  Prefactor     .10000E-03    9.0113       -.17730E-05** at limit **
   9  Prefactor     .10000E-03    5.3929       -.91616E-06** at limit **
  10  Prefactor     .10000E-03    22.513       -.16595E-05** at limit **
  11  Prefactor     .10000E-03    2.8409       -.95827E-07** at limit **
  12  norm          4.8132        2.9053        .68743E-06   -.28050E-02
  13  Prefactor     .10000E-03    22.250       -.92495E-07** at limit **
  14  Prefactor     .10000E-03    9.5139       -.29667E-05** at limit **
  15  Prefactor     .10000E-03    7.0523        .35212E-05** at limit **
  16  norm          10.788        5.3119       -.35307E-07   -.59618E-04
  17  norm          15.965        13.030       -.43809E-07   -.46503E-05
  18  norm          .10000E-03    1.3549       -.17805E-06** at limit **
  19  norm          .10000E-03    1.7848       -.92289E-07** at limit **
  20  Prefactor     .10000E-03    .97338       -.27951E-07** at limit **
  21  Prefactor     .10000E-03    3.6271        .56635E-06** at limit **
  22  Prefactor     .10000E-03    13.116        .33543E-05** at limit **
  23  Prefactor     9.4643        16.681       -.86904E-07   -.14165E-04
  24  Prefactor     34.087        63.774       -.13054E-05   -.17737E-04
  25  Normalizat    1.2065        .16141       -.20718E-06    .25417E-04
  26  Prefactor     .90395        .20336        .33292E-06    .30896E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 5.7022
  norm       = 18.6852
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 2.86116
  Prefactor  = 3.81708
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 4.8132
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.000100001
  norm       = 10.7885
  norm       = 15.9649
  norm       = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 9.46433
  Prefactor  = 34.0875
  Normalizat = 1.20651
  Prefactor  = 0.903945
 **********
 **   18 **HESSE 
 **********

 FCN=   6630.321     FROM HESSE     STATUS=OK           454 CALLS     3468 TOTAL
                     EDM=   .37E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    21.993        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     5.7022        17.237        .16821E-03   -1.5230    
   3  norm          18.685        4.2804        .77395E-04   -1.4843    
   4  Prefactor     .10000E-03    2.1591        .11674E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    1.5966        .19739E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     2.8612        2.2218        .10155E-03   -1.5370    
   7  Prefactor     3.8171        10.895        .20660E-03   -1.5317    
   8  Prefactor     .10000E-03    9.0718        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .10000E-03    5.4065        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    22.557        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    2.8618        .13401E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm          4.8132        4.6231        .82187E-03   -1.5269    
  13  Prefactor     .10000E-03    22.271        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10000E-03    9.6449        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .10000E-03    7.2205        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          10.788        5.3113        .12198E-03   -1.5051    
  17  norm          15.965        13.037        .10024E-03   -1.4909    
  18  norm          .10000E-03    2.2443        .18377E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  norm          .10000E-03    1.7891        .10621E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10000E-03    .98652        .78409E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .10000E-03    3.6403        .15152E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     .10000E-03    13.266        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     9.4643        16.687        .13026E-03   -1.5093    
  24  Prefactor     34.087        64.082        .68634E-04   -1.4540    
  25  Normalizat    1.2065        .19248        .22080E-03   -.86402    
  26  Prefactor     .90395        .24162        .31650E-03   -.96003    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.69633e-09
Minuit parameter uncertainties:
  1  7.80265e-05
  2  17.2523
  3  4.28042
  4  5.31365e-06
  5  2.39751e-06
  6  2.22191
  7  10.9004
  8  7.0774e-05
  9  2.87718e-05
  10  0.000104498
  11  3.24496e-06
  12  4.62347
  13  7.18137e-06
  14  0.000121095
  15  0.000123849
  16  5.3115
  17  13.0391
  18  4.09814e-06
  19  1.37376e-06
  20  5.00039e-07
  21  1.42315e-05
  22  0.000162735
  23  16.6954
  24  64.212
  25  0.192595
  26  0.241904
Done.

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

Extracting fit parameters...

4FGL J1249.8+3707
   Spectrum: PowerLaw
313    Prefactor:  1.000e-04  2.877e-05  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:  9.039e-01  2.419e-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.207e+00  1.926e-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: 2.76e-08 ph cm-2 s-1
Energy Flux Upper Limit: 2.03e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/940242/likelihoodResults_488937601_489196801_4FGL_J1249.8+3707_daily_bin963.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) = 6630.32195067
delta logL = -0.000867800700689

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6630.32108326
delta logL = -3.9217138692e-07

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10007E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    1.7578       1.0000          .0000       10.000    
     3 'Normalizat'    1.2067       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .90370       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=   6630.321     FROM MIGRAD    STATUS=CONVERGED     53 CALLS      209 TOTAL
                     EDM=   .27E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    62.030        .90712E-02** at limit **
   2  Index         1.7357        8.5893        .50000        .28603E-04
   3  Normalizat    1.2065        .13548E-01    .49943E-01    .23693E-04
   4  Prefactor     .90395        .17161E-01    .71534E-01    .29888E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100001
  Index      = 1.73568
  Normalizat = 1.20651
  Prefactor  = 0.903946
 **********
 **   18 **HESSE 
 **********

 FCN=   6630.321     FROM HESSE     STATUS=OK            33 CALLS      242 TOTAL
                     EDM=   .86E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    5.9864        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         1.7357        5.8302        .50000       -.71136    
   3  Normalizat    1.2065        .18827        .22080E-03   -.86402    
   4  Prefactor     .90395        .23805        .31650E-03   -.96003    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 8.56012e-10
Minuit parameter uncertainties:
  1  0.000152516
  2  3.91319
  3  0.188373
  4  0.23832
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/940242': 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) = 6630.32108252
delta logL = 3.51834387402e-07

Extracting fit parameters...

4FGL J1249.8+3707
   Spectrum: PowerLaw
313    Prefactor:  1.000e-04  1.525e-04  1.000e-04  1.000e+04 ( 1.000e-14)
314        Index:  1.736e+00  3.913e+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:  9.039e-01  2.383e-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.207e+00  1.884e-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 -2.500e-04 [aplpy.core]
INFO: Auto-setting vmax to  2.775e-03 [aplpy.core]
Saving /scratch/kocevski/940242/cmap_HighResolution_488937601_489196801_4FGL_J1249.8+3707_daily_bin963.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='2.03e-03', job_status='DONE', photon_flux_upper_limit='2.76e-08', time_completed='2021-09-06 07:02:00.481712', job_id='940242', GAL2='0.90', fit_tolerance='1e-08', EG2='1.21', EG='1.21', time_epoch_completed='1630936920.48', return_code2='0', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.90', dlogl='3.52e-07', ts2='-0.00', photon_index_error='0.00', photon_index='1.78' WHERE bin_id='963' AND source_name='4FGL J1249.8+3707' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 07:02:00 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0037>
Subject: Job 940242: <4FGL_J1249.8+3707_daily_bin963> in cluster <slac> Done

Job <4FGL_J1249.8+3707_daily_bin963> was submitted from host <rhel6-64c> by user <kocevski> in cluster <slac> at Mon Sep  6 06:45:23 2021
Job was executed on host(s) <bullet0037>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep  6 06:45:24 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:45:24 2021
Terminated at Mon Sep  6 07:02:01 2021
Results reported at Mon Sep  6 07:02:01 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1249.8+3707_daily_bin963 192.46 37.1306 488937601 489196801 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 :                                   800.00 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             284.94 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   996 sec.
    Turnaround time :                            998 sec.

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

