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


Performing analysis on: 4FGL_J1249.8+3707_daily_bin701
RA = 192.46, Dec = 37.1306
tmin = 421027201, tmax = 421286401
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='938590', job_status='RUN', time_executed='2021-09-06 06:42:43.216264', time_epoch_executed='1630935763.22' WHERE source_name='4FGL J1249.8+3707' and cadence='daily' and bin_id='701'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/938590

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/938590/ft1_4FGL_J1249.8+3707_daily_bin701.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/938590/ft2_4FGL_J1249.8+3707_daily_bin701.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/938590/ft1_4FGL_J1249.8+3707_daily_bin701.fits outfile=/scratch/kocevski/938590/ft1_filteredMKT_4FGL_J1249.8+3707_daily_bin701.fits ra=192.46 dec=37.1306 rad=12.0 tmin=421027201.0 tmax=421286401.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.73
user 3.53
sys 0.18

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

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

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/938590/ft1_filtered_4FGL_J1249.8+3707_daily_bin701.fits evtable="EVENTS" scfile=/scratch/kocevski/938590/ft2_4FGL_J1249.8+3707_daily_bin701.fits sctable="SC_DATA" expcube=/scratch/kocevski/938590/ltcube_421027201_421286401_4FGL_J1249.8+3707_daily_bin701.fits outfile=/scratch/kocevski/938590/expmap_421027201_421286401_4FGL_J1249.8+3707_daily_bin701.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/938590/ltcube_421027201_421286401_4FGL_J1249.8+3707_daily_bin701.fits
.....................!
real 191.52
user 186.53
sys 4.52

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/938590/ft1_filtered_4FGL_J1249.8+3707_daily_bin701.fits scfile=/scratch/kocevski/938590/ft2_4FGL_J1249.8+3707_daily_bin701.fits outfile=/scratch/kocevski/938590/cmap_421027201_421286401_4FGL_J1249.8+3707_daily_bin701.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.57
user 0.36
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/938590/ft1_filtered_4FGL_J1249.8+3707_daily_bin701.fits scfile=/scratch/kocevski/938590/ft2_4FGL_J1249.8+3707_daily_bin701.fits outfile=/scratch/kocevski/938590/cmap_HighResolution_421027201_421286401_4FGL_J1249.8+3707_daily_bin701.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.14

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    20.435       1.0000         .10000E-03   10000.    
     2 'Prefactor '    44.603       1.0000         .10000E-03   10000.    
     3 'norm      '    10.791       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    4.6729       1.0000         .10000E-03   10000.    
     6 'Prefactor '    2.0504       1.0000         .10000E-03   10000.    
     7 'Prefactor '    12.297       1.0000         .10000E-03   10000.    
     8 'Prefactor '    13.029       1.0000         .10000E-03   10000.    
     9 'Prefactor '    10.276       1.0000         .10000E-03   10000.    
    10 'Prefactor '    27.501       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10010E-03   1.0000         .10000E-03   10000.    
    12 'norm      '    9.0245       1.0000         .10000E-03   10000.    
    13 'Prefactor '    10.076       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    18 'norm      '    23.126       1.0000         .10000E-03   10000.    
    19 'norm      '    8.4706       1.0000         .10000E-03   10000.    
    20 'Prefactor '    5.5111       1.0000         .10000E-03   10000.    
    21 'Prefactor '    28.888       1.0000         .10000E-03   10000.    
    22 'Prefactor '    11.080       1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    94.226       1.0000         .10000E-03   10000.    
    25 'Normalizat'    .99249       1.0000         .10000E-01   10.000    
    26 'Prefactor '    .82895       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=   6396.667     FROM MIGRAD    STATUS=CONVERGED    570 CALLS     3028 TOTAL
                     EDM=   .30E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.0%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     20.436        44.286        .88623E-07    .14165E-05
   2  Prefactor     44.604        32.947        .75174E-07    .25989E-05
   3  norm          10.791        4.0758       -.22590E-07   -.18495E-04
   4  Prefactor     .10000E-03    2.8408        .30450E-07** at limit **
   5  Prefactor     4.6728        2.8599       -.13602E-07   -.30293E-04
   6  Prefactor     2.0503        2.6995        .22407E-06    .23865E-04
   7  Prefactor     12.297        10.499       -.48383E-07   -.76946E-05
   8  Prefactor     13.029        22.809        .16245E-06   -.46954E-05
   9  Prefactor     10.273        13.885       -.37439E-07   -.11069E-04
  10  Prefactor     27.439        89.830       -.48422E-05   -.31793E-04
  11  Prefactor     .10000E-03    2.7272       -.35581E-07** at limit **
  12  norm          9.0247        6.2150        .14070E-05    .33950E-04
  13  Prefactor     10.074        32.531        .10441E-06   -.27281E-05
  14  Prefactor     .10000E-03    11.668       -.13869E-06** at limit **
  15  Prefactor     .10000E-03    5.4884       -.52696E-08** at limit **
  16  norm          .10000E-03    1.4168        .10618E-07** at limit **
  17  norm          .10000E-03    5.3464        .38945E-07** at limit **
  18  norm          23.127        7.8684       -.18302E-06   -.86984E-05
  19  norm          8.4706        8.4936       -.14595E-08   -.89010E-05
  20  Prefactor     5.5108        4.3361        .68296E-07   -.92682E-05
  21  Prefactor     28.883        22.847        .84350E-07   -.32577E-04
  22  Prefactor     11.101        96.289       -.18195E-07    .12046E-04
  23  Prefactor     .10000E-03    7.9537       -.20321E-07** at limit **
  24  Prefactor     94.234        78.753        .28244E-06    .96423E-05
  25  Normalizat    .99249        .17654       -.78277E-06    .25920E-04
  26  Prefactor     .82895        .20815        .73630E-06   -.34039E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 20.4358
  Prefactor  = 44.6037
  norm       = 10.7906
  Prefactor  = 0.0001
  Prefactor  = 4.67276
  Prefactor  = 2.05029
  Prefactor  = 12.2974
  Prefactor  = 13.0286
  Prefactor  = 10.2734
  Prefactor  = 27.4391
  Prefactor  = 0.0001
  norm       = 9.0247
  Prefactor  = 10.0739
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 0.0001
  norm       = 23.1269
  norm       = 8.47061
  Prefactor  = 5.51078
  Prefactor  = 28.8826
  Prefactor  = 11.1011
  Prefactor  = 0.0001
  Prefactor  = 94.2337
  Normalizat = 0.992493
  Prefactor  = 0.828953
 **********
 **   18 **HESSE 
 **********

 FCN=   6396.667     FROM HESSE     STATUS=OK           464 CALLS     3492 TOTAL
                     EDM=   .64E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     20.436        44.287        .88602E-04   -1.4804    
   2  Prefactor     44.604        32.988        .60031E-04   -1.4371    
   3  norm          10.791        4.0782        .90001E-04   -1.5051    
   4  Prefactor     .10000E-03    2.8633        .13163E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     4.6728        2.8597        .96672E-04   -1.5276    
   6  Prefactor     2.0503        2.6717        .13827E-03   -1.5422    
   7  Prefactor     12.297        10.473        .11423E-03   -1.5006    
   8  Prefactor     13.029        22.869        .11097E-03   -1.4986    
   9  Prefactor     10.273        13.884        .12499E-03   -1.5067    
  10  Prefactor     27.439        90.776        .76393E-04   -1.4660    
  11  Prefactor     .10000E-03    2.7502        .12895E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm          9.0247        6.2319        .66709E-03   -1.5107    
  13  Prefactor     10.074        32.538        .12624E-03   -1.5073    
  14  Prefactor     .10000E-03    11.690        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .10000E-03    5.5042        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          .10000E-03    1.4192        .92959E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .10000E-03    5.3521        .18061E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  norm          23.127        7.9045        .83294E-04   -1.4746    
  19  norm          8.4706        8.5138        .13774E-03   -1.5126    
  20  Prefactor     5.5108        4.3153        .12583E-03   -1.5238    
  21  Prefactor     28.883        22.844        .74541E-04   -1.4633    
  22  Prefactor     11.101        95.993        .12036E-03   -1.5041    
  23  Prefactor     .10000E-03    7.9621        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     94.234        79.199        .41403E-04   -1.3763    
  25  Normalizat    .99249        .20833        .24261E-03   -.93282    
  26  Prefactor     .82895        .24430        .32029E-03   -.98670    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.37185e-11
Minuit parameter uncertainties:
  1  44.3588
  2  33.0019
  3  4.07829
  4  2.92007e-07
  5  2.8598
  6  2.6719
  7  10.4744
  8  22.8845
  9  13.8881
  10  91.2375
  11  1.21491e-06
  12  6.23237
  13  32.5957
  14  2.39181e-05
  15  4.28514e-06
  16  4.88588e-07
  17  3.14935e-06
  18  7.90483
  19  8.51503
  20  4.31556
  21  22.8509
  22  65.4293
  23  1.32882e-06
  24  79.2881
  25  0.2085
  26  0.244624
Done.

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

Extracting fit parameters...

4FGL J1249.8+3707
   Spectrum: PowerLaw
313    Prefactor:  1.027e+01  1.389e+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:  8.290e-01  2.446e-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:  9.925e-01  2.085e-01  1.000e-02  1.000e+01 ( 1.000e+00)


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

Saving results to:
/scratch/kocevski/938590/likelihoodResults_421027201_421286401_4FGL_J1249.8+3707_daily_bin701.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) = 6396.60204234
delta logL = 0.064794006219

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6396.59937846
delta logL = 0.0674578864109

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    6.8658       1.0000         .10000E-03   10000.    
     2 'Index     '    2.0472       1.0000          .0000       10.000    
     3 'Normalizat'    .99017       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .82958       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=   6396.599     FROM MIGRAD    STATUS=CONVERGED     87 CALLS      279 TOTAL
                     EDM=   .22E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     6.8668        15.103        .15312E-03    .22972E-03
   2  Index         2.0473        .84415        .62353E-02    .10374E-03
   3  Normalizat    .99019        .19586        .24285E-03    .20569E-03
   4  Prefactor     .82958        .23931        .32014E-03    .18448E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 6.86675
  Index      = 2.04734
  Normalizat = 0.990186
  Prefactor  = 0.829581
 **********
 **   18 **HESSE 
 **********

 FCN=   6396.599     FROM HESSE     STATUS=OK            25 CALLS      304 TOTAL
                     EDM=   .16E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     6.8668        13.395        .61247E-05   -1.5184    
   2  Index         2.0473        .74998        .24941E-03   -.63172    
   3  Normalizat    .99019        .19596        .48570E-04   -.93360    
   4  Prefactor     .82958        .23945        .12806E-04   -.98647    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.61377e-10
Minuit parameter uncertainties:
  1  13.4011
  2  0.754365
  3  0.196098
  4  0.239756
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/938590': 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) = 6396.59937837
delta logL = 0.0674579777187

Extracting fit parameters...

4FGL J1249.8+3707
   Spectrum: PowerLaw
313    Prefactor:  6.867e+00  1.340e+01  1.000e-04  1.000e+04 ( 1.000e-14)
314        Index:  2.047e+00  7.544e-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:  8.296e-01  2.398e-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:  9.902e-01  1.961e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.06
Ra Dec: 192.460 37.131
Photon Index (Free Index): 2.05 +/- 0.75
Photon Flux (Free Index): 1.26e-08 +/- 1.75e-08
Energy Flux (Free Index): 7.75e-06 +/- 1.33e-05

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/938590/cmap_HighResolution_421027201_421286401_4FGL_J1249.8+3707_daily_bin701.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='3.44e-03', comment='SUCCESS', energy_flux2='7.75e-06', dlogl='6.75e-02', photon_flux2='1.26e-08', job_status='DONE', time_completed='2021-09-06 06:55:42.792394', photon_index_error2='0.75', photon_index2='2.05', ts='0.92', fit_tolerance='1e-08', GAL='0.83', photon_index_error='0.00', photon_flux_upper_limit='4.67e-08', energy_flux_error2='1.33e-05', EG='0.99', time_epoch_completed='1630936542.79', return_code='0', job_id='938590', GAL2='0.83', EG2='0.99', return_code2='0', photon_flux_error2='1.75e-08', ts2='1.06', photon_index='1.78' WHERE bin_id='701' AND source_name='4FGL J1249.8+3707' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 06:55:42 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0209>
Subject: Job 938590: <4FGL_J1249.8+3707_daily_bin701> in cluster <slac> Done

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

Your job looked like:

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

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

