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


Performing analysis on: 4FGL_J1249.8+3707_daily_bin462
RA = 192.46, Dec = 37.1306
tmin = 359078401, tmax = 359337601
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='937104', job_status='RUN', time_executed='2021-09-06 06:38:46.504577', time_epoch_executed='1630935526.5' WHERE source_name='4FGL J1249.8+3707' and cadence='daily' and bin_id='462'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/937104

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/937104/ft1_4FGL_J1249.8+3707_daily_bin462.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/937104/ft2_4FGL_J1249.8+3707_daily_bin462.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/937104/ft1_4FGL_J1249.8+3707_daily_bin462.fits outfile=/scratch/kocevski/937104/ft1_filteredMKT_4FGL_J1249.8+3707_daily_bin462.fits ra=192.46 dec=37.1306 rad=12.0 tmin=359078401.0 tmax=359337601.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.77
user 3.52
sys 0.18

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/937104/ft1_filtered_4FGL_J1249.8+3707_daily_bin462.fits" evtable="EVENTS" scfile=/scratch/kocevski/937104/ft2_4FGL_J1249.8+3707_daily_bin462.fits sctable="SC_DATA" outfile=/scratch/kocevski/937104/ltcube_359078401_359337601_4FGL_J1249.8+3707_daily_bin462.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/937104/ft2_4FGL_J1249.8+3707_daily_bin462.fits
.....................!
real 12.09
user 11.52
sys 0.34

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/937104/ft1_filtered_4FGL_J1249.8+3707_daily_bin462.fits evtable="EVENTS" scfile=/scratch/kocevski/937104/ft2_4FGL_J1249.8+3707_daily_bin462.fits sctable="SC_DATA" expcube=/scratch/kocevski/937104/ltcube_359078401_359337601_4FGL_J1249.8+3707_daily_bin462.fits outfile=/scratch/kocevski/937104/expmap_359078401_359337601_4FGL_J1249.8+3707_daily_bin462.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/937104/ltcube_359078401_359337601_4FGL_J1249.8+3707_daily_bin462.fits
.....................!
real 192.27
user 185.96
sys 4.69

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/937104/ft1_filtered_4FGL_J1249.8+3707_daily_bin462.fits scfile=/scratch/kocevski/937104/ft2_4FGL_J1249.8+3707_daily_bin462.fits outfile=/scratch/kocevski/937104/cmap_359078401_359337601_4FGL_J1249.8+3707_daily_bin462.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.63
user 0.37
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/937104/ft1_filtered_4FGL_J1249.8+3707_daily_bin462.fits scfile=/scratch/kocevski/937104/ft2_4FGL_J1249.8+3707_daily_bin462.fits outfile=/scratch/kocevski/937104/cmap_HighResolution_359078401_359337601_4FGL_J1249.8+3707_daily_bin462.fits algorithm="CMAP" ebinalg="LOG" emin=30.0 emax=200000.0 ebinfile=NONE tbinalg="LIN" tbinfile=NONE nxpix=500 nypix=500 binsz=0.1 coordsys="CEL" xref=192.46 yref=37.1306 axisrot=0.0 rafield="RA" decfield="DEC" proj="AIT" hpx_ordering_scheme="RING" hpx_order=3 hpx_ebin=yes hpx_region="" evtable="EVENTS" sctable="SC_DATA" efield="ENERGY" tfield="TIME" chatter=2 clobber=yes debug=no gui=no mode="ql"

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

This is gtbin version HEAD
real 0.54
user 0.38
sys 0.15

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

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 '    .10000E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    8.5620       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    5.4186       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    12.885       1.0000         .10000E-03   10000.    
     8 'Prefactor '    12.501       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    41.819       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    12 'norm      '    .10003E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    15.823       1.0000         .10000E-03   10000.    
    14 'Prefactor '    16.886       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      '    .10057E-03   1.0000         .10000E-03   10000.    
    18 'norm      '    5.9322       1.0000         .10000E-03   10000.    
    19 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .30731E-01   1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    32.378       1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    25 'Normalizat'    1.1790       1.0000         .10000E-01   10.000    
    26 'Prefactor '    .64920       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=   5800.568     FROM MIGRAD    STATUS=CONVERGED    598 CALLS     3054 TOTAL
                     EDM=   .54E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .5%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    35.581       -.49289E-05** at limit **
   2  Prefactor     .10000E-03    17.575       -.69794E-05** at limit **
   3  norm          8.5621        3.8168       -.57015E-07   -.60231E-03
   4  Prefactor     .10000E-03    3.8971       -.40289E-07** at limit **
   5  Prefactor     5.4185        3.1458        .13811E-07   -.10994E-03
   6  Prefactor     .10000E-03    .76705       -.39398E-07** at limit **
   7  Prefactor     12.885        9.1920       -.17360E-06   -.26867E-04
   8  Prefactor     12.501        20.390       -.56264E-06   -.38626E-03
   9  Prefactor     .10000E-03    12.388        .36499E-05** at limit **
  10  Prefactor     41.848        69.061        .40175E-04    .41011E-05
  11  Prefactor     .10000E-03    1.9132        .61851E-07** at limit **
  12  norm          .10000E-03    2.1014       -.44153E-06** at limit **
  13  Prefactor     15.821        37.758       -.33352E-05    .64442E-05
  14  Prefactor     16.891        27.024        .46786E-05   -.31541E-05
  15  Prefactor     .10000E-03    3.5894        .41086E-08** at limit **
  16  norm          .10000E-03    1.3816        .69082E-07** at limit **
  17  norm          .10000E-03    18.509       -.36809E-05** at limit **
  18  norm          5.9322        4.1351       -.11331E-05   -.21907E-03
  19  norm          .10000E-03    2.7486        .10321E-06** at limit **
  20  Prefactor     .32854E-01    1.3444       -.11895E-06    .27011E-04
  21  Prefactor     .10000E-03    8.0014       -.96153E-06** at limit **
  22  Prefactor     32.376        30.342       -.24577E-05    .68660E-05
  23  Prefactor     .10000E-03    6.4401        .47704E-06** at limit **
  24  Prefactor     .10000E-03    23.823        .12426E-04** at limit **
  25  Normalizat    1.1788        .16696       -.17131E-05    .14431E-03
  26  Prefactor     .64933        .20146       -.23777E-06   -.46709E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 8.56211
  Prefactor  = 0.0001
  Prefactor  = 5.41854
  Prefactor  = 0.0001
  Prefactor  = 12.8854
  Prefactor  = 12.5007
  Prefactor  = 0.0001
  Prefactor  = 41.8484
  Prefactor  = 0.0001
  norm       = 0.000100001
  Prefactor  = 15.8207
  Prefactor  = 16.8911
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 0.0001
  norm       = 5.93219
  norm       = 0.0001
  Prefactor  = 0.0328545
  Prefactor  = 0.0001
  Prefactor  = 32.3756
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Normalizat = 1.17884
  Prefactor  = 0.649328
 **********
 **   18 **HESSE 
 **********

 FCN=   5800.568     FROM HESSE     STATUS=OK           452 CALLS     3506 TOTAL
                     EDM=   .12E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    35.639        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    17.599        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          8.5621        3.8417        .43545E-03   -1.5123    
   4  Prefactor     .10000E-03    3.9288        .14681E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     5.4185        3.1635        .90083E-04   -1.5242    
   6  Prefactor     .10000E-03    .77550        .65076E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     12.885        9.1886        .11159E-03   -1.4990    
   8  Prefactor     12.501        20.460        .56647E-03   -1.5001    
   9  Prefactor     .10000E-03    12.481        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     41.848        68.865        .61989E-04   -1.4413    
  11  Prefactor     .10000E-03    1.9184        .10286E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm          .10000E-03    2.1142        .10781E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     15.821        37.755        .10069E-03   -1.4912    
  14  Prefactor     16.891        26.912        .97468E-04   -1.4886    
  15  Prefactor     .10000E-03    3.5918        .14091E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          .10000E-03    1.3845        .87404E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .10000E-03    18.908        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  norm          5.9322        4.1140        .11579E-03   -1.5221    
  19  norm          .10000E-03    2.7521        .12313E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .32854E-01    23.109        .16578E-02   -1.5672    
  21  Prefactor     .10000E-03    8.0335        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     32.376        30.329        .70419E-04   -1.4569    
  23  Prefactor     .10000E-03    6.4506        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     .10000E-03    23.827        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Normalizat    1.1788        .19248        .20191E-03   -.87259    
  26  Prefactor     .64933        .23175        .32590E-03   -1.0555    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.22486e-09
Minuit parameter uncertainties:
  1  3.60228e-05
  2  2.73091e-05
  3  3.84185
  4  5.76181e-06
  5  3.16364
  6  5.64873e-07
  7  9.1896
  8  20.471
  9  1.23222e-05
  10  68.996
  11  4.5584e-06
  12  7.63471e-05
  13  37.8121
  14  26.9314
  15  2.86364e-06
  16  2.22681e-06
  17  0.000128657
  18  4.11421
  19  1.16115e-05
  20  1.7407
  21  3.25816e-05
  22  30.3431
  23  5.97602e-06
  24  1.81062e-05
  25  0.192592
  26  0.232096
Done.

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

Extracting fit parameters...

4FGL J1249.8+3707
   Spectrum: PowerLaw
313    Prefactor:  1.000e-04  1.232e-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:  6.493e-01  2.321e-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.179e+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: 3.42e-08 ph cm-2 s-1
Energy Flux Upper Limit: 2.51e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/937104/likelihoodResults_359078401_359337601_4FGL_J1249.8+3707_daily_bin462.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) = 5800.56842314
delta logL = -0.000381632327844

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 5800.56804151
delta logL = 6.23913365416e-10

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 'Index     '    1.7844       1.0000          .0000       10.000    
     3 'Normalizat'    1.1788       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .64933       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=   5800.568     FROM MIGRAD    STATUS=CONVERGED     54 CALLS      207 TOTAL
                     EDM=   .33E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    3.4249        .90712E-02** at limit **
   2  Index         1.7885        5.7742        .50000       -.24297E-05
   3  Normalizat    1.1788        .20478E-02    .35432E-01   -.64189E-05
   4  Prefactor     .64933        .25365E-02    .73623E-01    .19008E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 1.78854
  Normalizat = 1.17884
  Prefactor  = 0.64933
 **********
 **   18 **HESSE 
 **********

 FCN=   5800.568     FROM HESSE     STATUS=NOT POSDEF    33 CALLS      240 TOTAL
                     EDM=   .45E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    47.650        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         1.7885        7.0583        .50000       -.69748    
   3  Normalizat    1.1788        .76369E-02    .20191E-03   -.87259    
   4  Prefactor     .64933        .94398E-02    .32590E-03   -1.0555    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 4.50388e-09
Minuit parameter uncertainties:
  1  8.3615e-06
  2  106.38
  3  0.0076369
  4  0.00943983
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/937104': 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) = 5800.5680415
delta logL = 5.68797986489e-09

Extracting fit parameters...

4FGL J1249.8+3707
   Spectrum: PowerLaw
313    Prefactor:  1.000e-04  8.361e-06  1.000e-04  1.000e+04 ( 1.000e-14)
314        Index:  1.789e+00  1.064e+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:  6.493e-01  9.440e-03  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.179e+00  7.637e-03  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/937104/cmap_HighResolution_359078401_359337601_4FGL_J1249.8+3707_daily_bin462.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='2.51e-03', job_status='DONE', photon_flux_upper_limit='3.42e-08', time_completed='2021-09-06 06:51:11.116685', job_id='937104', GAL2='0.65', fit_tolerance='1e-08', EG2='1.18', EG='1.18', time_epoch_completed='1630936271.12', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.65', dlogl='5.69e-09', ts2='-0.00', photon_index_error='0.00', photon_index='1.78' WHERE bin_id='462' AND source_name='4FGL J1249.8+3707' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 06:51:11 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0214>
Subject: Job 937104: <4FGL_J1249.8+3707_daily_bin462> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1249.8+3707_daily_bin462 192.46 37.1306 359078401 359337601 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 :                                   739.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             242.97 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   943 sec.
    Turnaround time :                            944 sec.

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

