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


Performing analysis on: 4FGL_J1249.8+3707_daily_bin744
RA = 192.46, Dec = 37.1306
tmin = 432172801, tmax = 432432001
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='938650', job_status='RUN', time_executed='2021-09-06 06:42:36.717003', time_epoch_executed='1630935756.72' WHERE source_name='4FGL J1249.8+3707' and cadence='daily' and bin_id='744'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/938650

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/938650/ft1_4FGL_J1249.8+3707_daily_bin744.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/938650/ft2_4FGL_J1249.8+3707_daily_bin744.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/938650/ft1_4FGL_J1249.8+3707_daily_bin744.fits outfile=/scratch/kocevski/938650/ft1_filteredMKT_4FGL_J1249.8+3707_daily_bin744.fits ra=192.46 dec=37.1306 rad=12.0 tmin=432172801.0 tmax=432432001.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.17
user 4.91
sys 0.24

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/938650/ft1_filtered_4FGL_J1249.8+3707_daily_bin744.fits evtable="EVENTS" scfile=/scratch/kocevski/938650/ft2_4FGL_J1249.8+3707_daily_bin744.fits sctable="SC_DATA" expcube=/scratch/kocevski/938650/ltcube_432172801_432432001_4FGL_J1249.8+3707_daily_bin744.fits outfile=/scratch/kocevski/938650/expmap_432172801_432432001_4FGL_J1249.8+3707_daily_bin744.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/938650/ltcube_432172801_432432001_4FGL_J1249.8+3707_daily_bin744.fits
.....................!
real 190.40
user 185.56
sys 4.30

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/938650/ft1_filtered_4FGL_J1249.8+3707_daily_bin744.fits scfile=/scratch/kocevski/938650/ft2_4FGL_J1249.8+3707_daily_bin744.fits outfile=/scratch/kocevski/938650/cmap_432172801_432432001_4FGL_J1249.8+3707_daily_bin744.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.60
user 0.38
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/938650/ft1_filtered_4FGL_J1249.8+3707_daily_bin744.fits scfile=/scratch/kocevski/938650/ft2_4FGL_J1249.8+3707_daily_bin744.fits outfile=/scratch/kocevski/938650/cmap_HighResolution_432172801_432432001_4FGL_J1249.8+3707_daily_bin744.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.61
user 0.39
sys 0.15

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10025E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    12.399       1.0000         .10000E-03   10000.    
     3 'norm      '    2.0419       1.0000         .10000E-03   10000.    
     4 'Prefactor '    10.313       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    7.8232       1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10053E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10015E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10206E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10135E-03   1.0000         .10000E-03   10000.    
    12 'norm      '    .10103E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    61.716       1.0000         .10000E-03   10000.    
    14 'Prefactor '    30.185       1.0000         .10000E-03   10000.    
    15 'Prefactor '    13.097       1.0000         .10000E-03   10000.    
    16 'norm      '    .22271E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    11.219       1.0000         .10000E-03   10000.    
    18 'norm      '    4.1931       1.0000         .10000E-03   10000.    
    19 'norm      '    18.991       1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10006E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10179E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10008E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10071E-03   1.0000         .10000E-03   10000.    
    25 'Normalizat'    .98010       1.0000         .10000E-01   10.000    
    26 'Prefactor '    1.0040       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=   4317.549     FROM MIGRAD    STATUS=CONVERGED    630 CALLS     3126 TOTAL
                     EDM=   .85E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  4.3%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    39.148        .63430E-05** at limit **
   2  Prefactor     12.399        21.845        .10199E-06   -.53615E-05
   3  norm          2.0419        1.9107        .64174E-08   -.75866E-05
   4  Prefactor     10.314        8.6200        .12800E-06   -.33949E-04
   5  Prefactor     .10000E-03    .97983       -.75528E-08** at limit **
   6  Prefactor     .10000E-03    1.6273       -.19476E-07** at limit **
   7  Prefactor     7.8227        13.098        .26630E-07   -.37511E-04
   8  Prefactor     .10000E-03    17.560       -.51904E-08** at limit **
   9  Prefactor     .10000E-03    7.3267       -.10173E-07** at limit **
  10  Prefactor     .10000E-03    221.53        .31776E-05** at limit **
  11  Prefactor     .10000E-03    2.6346        .13124E-06** at limit **
  12  norm          .10000E-03    5.0400       -.19016E-05** at limit **
  13  Prefactor     61.725        54.355       -.57060E-06    .14988E-04
  14  Prefactor     30.239        34.073       -.70393E-05   -.48033E-03
  15  Prefactor     13.115        15.223        .72194E-06   -.69170E-04
  16  norm          .10001E-03    5.5809        .60962E-05** at limit **
  17  norm          11.215        17.235        .17635E-06    .42518E-05
  18  norm          4.1688        9.7786        .88384E-05   -.10347E-02
  19  norm          19.017        18.852       -.59141E-05   -.51322E-03
  20  Prefactor     .10000E-03    2.5210        .14287E-06** at limit **
  21  Prefactor     .10000E-03    8.9054        .78969E-06** at limit **
  22  Prefactor     .10000E-03    35.369       -.44359E-05** at limit **
  23  Prefactor     .10000E-03    4.5718        .25755E-08** at limit **
  24  Prefactor     .10000E-03    58.593       -.30047E-05** at limit **
  25  Normalizat    .97956        .19606       -.29523E-05   -.39548E-03
  26  Prefactor     1.0048        .24168        .26074E-05   -.27173E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100001
  Prefactor  = 12.3992
  norm       = 2.04195
  Prefactor  = 10.3136
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 7.82271
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.000100001
  Prefactor  = 0.0001
  norm       = 0.000100001
  Prefactor  = 61.7253
  Prefactor  = 30.2389
  Prefactor  = 13.1148
  norm       = 0.000100006
  norm       = 11.2153
  norm       = 4.16883
  norm       = 19.0175
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Normalizat = 0.979563
  Prefactor  = 1.00477
 **********
 **   18 **HESSE 
 **********

 FCN=   4317.549     FROM HESSE     STATUS=OK           450 CALLS     3576 TOTAL
                     EDM=   .21E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    38.911        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     12.399        21.841        .11376E-03   -1.5004    
   3  norm          2.0419        1.9210        .85457E-04   -1.5422    
   4  Prefactor     10.314        8.6200        .12477E-03   -1.5066    
   5  Prefactor     .10000E-03    .98656        .63480E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    1.6692        .16347E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     7.8227        13.080        .14336E-03   -1.5149    
   8  Prefactor     .10000E-03    17.722        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .10000E-03    7.3290        .17372E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    223.56        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    2.6395        .10414E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm          .10000E-03    9.8426        .26712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     61.725        54.392        .25538E-03   -1.4135    
  14  Prefactor     30.239        34.063        .72926E-04   -1.4608    
  15  Prefactor     13.115        14.996        .11068E-03   -1.4984    
  16  norm          .10001E-03    9.4548        .26577E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          11.215        17.236        .11961E-03   -1.5038    
  18  norm          4.1688        10.802        .89990E-03   -1.5300    
  19  norm          19.017        20.206        .91907E-04   -1.4836    
  20  Prefactor     .10000E-03    2.5932        .20348E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .10000E-03    8.9443        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     .10000E-03    35.266        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10000E-03    4.5722        .13722E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     .10000E-03    58.616        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Normalizat    .97956        .23204        .22946E-03   -.93718    
  26  Prefactor     1.0048        .28516        .28565E-03   -.92571    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.10252e-09
Minuit parameter uncertainties:
  1  0.000351463
  2  21.855
  3  1.92101
  4  8.62106
  5  1.69005e-07
  6  4.95942e-07
  7  13.0849
  8  4.9911e-06
  9  5.18811e-06
  10  0.000742033
  11  9.9399e-06
  12  0.000195448
  13  54.4357
  14  34.0845
  15  15.0003
  16  0.000467707
  17  17.2436
  18  10.8074
  19  20.2132
  20  1.96052e-07
  21  3.87297e-05
  22  0.000218845
  23  4.39918e-07
  24  0.000197893
  25  0.232276
  26  0.285592
Done.

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

Extracting fit parameters...

4FGL J1249.8+3707
   Spectrum: PowerLaw
313    Prefactor:  1.000e-04  5.188e-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:  1.005e+00  2.856e-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.796e-01  2.323e-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.66e-08 ph cm-2 s-1
Energy Flux Upper Limit: 2.69e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/938650/likelihoodResults_432172801_432432001_4FGL_J1249.8+3707_daily_bin744.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) = 4317.54971188
delta logL = -0.000626076449407

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 4317.5490861
delta logL = -3.01117324852e-07

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10812E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    1.7499       1.0000          .0000       10.000    
     3 'Normalizat'    .97952       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0048       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=   4317.549     FROM MIGRAD    STATUS=CONVERGED     89 CALLS      241 TOTAL
                     EDM=   .27E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10085E-03    38.600        .18041E-02** at limit **
   2  Index         1.7031        7.6083        .50000        .26886E-04
   3  Normalizat    .97956        .10398E-01    .22947E-03    .49544E-07
   4  Prefactor     1.0048        .13149E-01    .28565E-03    .35820E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100849
  Index      = 1.70307
  Normalizat = 0.979565
  Prefactor  = 1.00477
 **********
 **   18 **HESSE 
 **********

 FCN=   4317.549     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      270 TOTAL
                     EDM=   .12E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10085E-03    175.16        .36081E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         1.7031        8.2634        .50000       -.72000    
   3  Normalizat    .97956        .22611E-01    .91786E-05   -.93718    
   4  Prefactor     1.0048        .28593E-01    .11426E-04   -.92571    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 1.22883e-08
Minuit parameter uncertainties:
  1  0.0244604
  2  224.311
  3  0.022611
  4  0.0285938
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/938650': 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) = 4317.54908525
delta logL = 5.55720362172e-07

Extracting fit parameters...

4FGL J1249.8+3707
   Spectrum: PowerLaw
313    Prefactor:  1.008e-04  2.446e-02  1.000e-04  1.000e+04 ( 1.000e-14)
314        Index:  1.703e+00  2.243e+02  0.000e+00  1.000e+01 (-1.000e+00)
315        Scale:  4.011e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
625    Prefactor:  1.005e+00  2.859e-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:  9.796e-01  2.261e-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  0.000e+00 [aplpy.core]
INFO: Auto-setting vmax to  0.000e+00 [aplpy.core]
Saving /scratch/kocevski/938650/cmap_HighResolution_432172801_432432001_4FGL_J1249.8+3707_daily_bin744.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='2.69e-03', job_status='DONE', photon_flux_upper_limit='3.66e-08', time_completed='2021-09-06 06:53:19.621062', job_id='938650', GAL2='1.00', fit_tolerance='1e-08', EG2='0.98', EG='0.98', time_epoch_completed='1630936399.62', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.00', dlogl='5.56e-07', ts2='-0.00', photon_index_error='0.00', photon_index='1.78' WHERE bin_id='744' AND source_name='4FGL J1249.8+3707' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 06:53:19 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0122>
Subject: Job 938650: <4FGL_J1249.8+3707_daily_bin744> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1249.8+3707_daily_bin744 192.46 37.1306 432172801 432432001 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 :                                   641.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             294.48 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   771 sec.
    Turnaround time :                            773 sec.

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

