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


Performing analysis on: 4FGL_J1249.8+3707_daily_bin635
RA = 192.46, Dec = 37.1306
tmin = 403920001, tmax = 404179201
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='937357', job_status='RUN', time_executed='2021-09-06 06:37:42.148573', time_epoch_executed='1630935462.15' WHERE source_name='4FGL J1249.8+3707' and cadence='daily' and bin_id='635'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/937357

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

Retrieving the FT1 file...

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

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

Retrieving 39 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/937357/ft1_4FGL_J1249.8+3707_daily_bin635.fits


Retrieving the FT1 file...

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

Retrieving 39 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/937357/ft2_4FGL_J1249.8+3707_daily_bin635.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/937357/ft1_4FGL_J1249.8+3707_daily_bin635.fits outfile=/scratch/kocevski/937357/ft1_filteredMKT_4FGL_J1249.8+3707_daily_bin635.fits ra=192.46 dec=37.1306 rad=12.0 tmin=403920001.0 tmax=404179201.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 10.09
user 9.70
sys 0.32

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/937357/ft1_filtered_4FGL_J1249.8+3707_daily_bin635.fits evtable="EVENTS" scfile=/scratch/kocevski/937357/ft2_4FGL_J1249.8+3707_daily_bin635.fits sctable="SC_DATA" expcube=/scratch/kocevski/937357/ltcube_403920001_404179201_4FGL_J1249.8+3707_daily_bin635.fits outfile=/scratch/kocevski/937357/expmap_403920001_404179201_4FGL_J1249.8+3707_daily_bin635.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/937357/ltcube_403920001_404179201_4FGL_J1249.8+3707_daily_bin635.fits
.....................!
real 191.26
user 185.71
sys 4.87

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/937357/ft1_filtered_4FGL_J1249.8+3707_daily_bin635.fits scfile=/scratch/kocevski/937357/ft2_4FGL_J1249.8+3707_daily_bin635.fits outfile=/scratch/kocevski/937357/cmap_403920001_404179201_4FGL_J1249.8+3707_daily_bin635.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.62
user 0.35
sys 0.17

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

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

This is gtbin version HEAD
real 0.64
user 0.40
sys 0.14

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    39.908       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10077E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    17.755       1.0000         .10000E-03   10000.    
     4 'Prefactor '    3.3276       1.0000         .10000E-03   10000.    
     5 'Prefactor '    2.3564       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    7.1487       1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10177E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10035E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .35561E-02   1.0000         .10000E-03   10000.    
    11 'Prefactor '    1.5660       1.0000         .10000E-03   10000.    
    12 'norm      '    2.0585       1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10082E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10406E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10236E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    .10008E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    40.566       1.0000         .10000E-03   10000.    
    18 'norm      '    .10053E-03   1.0000         .10000E-03   10000.    
    19 'norm      '    .10009E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10026E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    .81900E-02   1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10133E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10028E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    30.658       1.0000         .10000E-03   10000.    
    25 'Normalizat'    1.1963       1.0000         .10000E-01   10.000    
    26 'Prefactor '    .75249       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=   3047.721     FROM MIGRAD    STATUS=CONVERGED    640 CALLS     3077 TOTAL
                     EDM=   .70E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  4.4%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     39.910        78.680       -.12148E-06   -.21468E-06
   2  Prefactor     .10000E-03    17.365        .20665E-06** at limit **
   3  norm          17.755        6.9518       -.20693E-06   -.73140E-04
   4  Prefactor     3.3279        9.7614        .55635E-05    .57363E-03
   5  Prefactor     2.3562        2.9829        .50210E-07    .28328E-06
   6  Prefactor     .10000E-03    2.1209        .65316E-07** at limit **
   7  Prefactor     7.1522        19.186       -.11993E-06   -.95989E-05
   8  Prefactor     .10000E-03    35.951       -.23156E-05** at limit **
   9  Prefactor     .10000E-03    15.000       -.78637E-07** at limit **
  10  Prefactor     .10000E-03    594.29        .10015E-04** at limit **
  11  Prefactor     1.5637        9.4574        .73269E-06    .31390E-04
  12  norm          2.0708        7.3094        .33144E-06   -.37949E-04
  13  Prefactor     .10000E-03    28.642        .26501E-05** at limit **
  14  Prefactor     .10000E-03    24.610       -.13095E-05** at limit **
  15  Prefactor     .10000E-03    41.340        .55373E-06** at limit **
  16  norm          .10000E-03    3.6183       -.23672E-07** at limit **
  17  norm          40.554        28.455       -.13223E-05   -.85551E-04
  18  norm          .10000E-03    2.5189        .11439E-07** at limit **
  19  norm          .10000E-03    2.9218        .25582E-08** at limit **
  20  Prefactor     .10000E-03    2.6431        .53077E-07** at limit **
  21  Prefactor     .10028E-03    42.938        .12091E-04** at limit **
  22  Prefactor     .10000E-03    77.440        .71090E-05** at limit **
  23  Prefactor     .10000E-03    8.9831       -.45925E-08** at limit **
  24  Prefactor     30.656        115.62        .15979E-05   -.56645E-05
  25  Normalizat    1.1965        .24228        .60993E-07   -.10673E-03
  26  Prefactor     .75221        .29366       -.48024E-06   -.48000E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 39.9099
  Prefactor  = 0.0001
  norm       = 17.7545
  Prefactor  = 3.32794
  Prefactor  = 2.35622
  Prefactor  = 0.0001
  Prefactor  = 7.15223
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.000100001
  Prefactor  = 1.56366
  norm       = 2.07082
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 40.5544
  norm       = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.000100279
  Prefactor  = 0.000100001
  Prefactor  = 0.0001
  Prefactor  = 30.6559
  Normalizat = 1.19649
  Prefactor  = 0.752215
 **********
 **   18 **HESSE 
 **********

 FCN=   3047.721     FROM HESSE     STATUS=OK           448 CALLS     3525 TOTAL
                     EDM=   .44E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     39.910        78.647        .63450E-04   -1.4444    
   2  Prefactor     .10000E-03    17.372        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          17.755        6.9488        .85478E-04   -1.4865    
   4  Prefactor     3.3279        10.867        .11095E-02   -1.5343    
   5  Prefactor     2.3562        2.9749        .10128E-03   -1.5401    
   6  Prefactor     .10000E-03    2.1382        .78393E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     7.1522        19.179        .15003E-03   -1.5173    
   8  Prefactor     .10000E-03    36.576        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .10000E-03    15.002        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    594.96        .19636E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     1.5637        9.3798        .32480E-03   -1.5458    
  12  norm          2.0708        7.2820        .26539E-03   -1.5420    
  13  Prefactor     .10000E-03    28.728        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10000E-03    24.672        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .10000E-03    42.070        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          .10000E-03    3.6305        .10253E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          40.554        28.488        .62935E-04   -1.4433    
  18  norm          .10000E-03    2.5466        .85505E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  norm          .10000E-03    2.9235        .92160E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10000E-03    2.6624        .87447E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .10028E-03    86.864        .42403E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     .10000E-03    77.516        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10000E-03    8.9845        .16162E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     30.656        116.37        .72363E-04   -1.4600    
  25  Normalizat    1.1965        .27949        .21557E-03   -.86711    
  26  Prefactor     .75221        .33825        .32253E-03   -1.0151    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.41108e-09
Minuit parameter uncertainties:
  1  78.8526
  2  4.83395e-06
  3  6.94907
  4  10.8737
  5  2.97506
  6  6.19272e-06
  7  19.1951
  8  6.87918e-05
  9  9.65621e-06
  10  0.00133558
  11  7.66104
  12  7.28508
  13  0.000182647
  14  9.45797e-05
  15  9.63198e-05
  16  7.39188e-06
  17  28.4971
  18  7.4167e-06
  19  2.44191e-06
  20  1.54205e-05
  21  0.00986475
  22  0.000512943
  23  4.47349e-06
  24  117.243
  25  0.279844
  26  0.339185
Done.

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

Extracting fit parameters...

4FGL J1249.8+3707
   Spectrum: PowerLaw
313    Prefactor:  1.000e-04  9.656e-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:  7.522e-01  3.392e-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.196e+00  2.798e-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: 6.42e-08 ph cm-2 s-1
Energy Flux Upper Limit: 4.72e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/937357/likelihoodResults_403920001_404179201_4FGL_J1249.8+3707_daily_bin635.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) = 3047.72148144
delta logL = -0.000315459292324

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 3047.72116625
delta logL = -2.69641532213e-07

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10059E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    1.8778       1.0000          .0000       10.000    
     3 'Normalizat'    1.1965       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .75221       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=   3047.721     FROM MIGRAD    STATUS=CONVERGED     53 CALLS      229 TOTAL
                     EDM=   .62E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    158.66        .90712E-02** at limit **
   2  Index         1.8581        8.5324        .50000        .10491E-04
   3  Normalizat    1.1965        .19637E-01    .34978E-01    .60268E-04
   4  Prefactor     .75221        .23953E-01    .72877E-01    .51880E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100002
  Index      = 1.85807
  Normalizat = 1.19649
  Prefactor  = 0.752215
 **********
 **   18 **HESSE 
 **********

 FCN=   3047.721     FROM HESSE     STATUS=NOT POSDEF    31 CALLS      260 TOTAL
                     EDM=   .62E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    1391.9        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         1.8581        9.0476        .50000       -.67948    
   3  Normalizat    1.1965        .67723E-01    .21557E-03   -.86711    
   4  Prefactor     .75221        .82442E-01    .32254E-03   -1.0151    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 6.18033e-10
Minuit parameter uncertainties:
  1  0.00371321
  2  39.5926
  3  0.0677277
  4  0.0824551
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/937357': 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) = 3047.72116617
delta logL = -1.92929292098e-07

Extracting fit parameters...

4FGL J1249.8+3707
   Spectrum: PowerLaw
313    Prefactor:  1.000e-04  3.713e-03  1.000e-04  1.000e+04 ( 1.000e-14)
314        Index:  1.858e+00  3.959e+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:  7.522e-01  8.246e-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:  1.196e+00  6.773e-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/937357/cmap_HighResolution_403920001_404179201_4FGL_J1249.8+3707_daily_bin635.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='4.72e-03', job_status='DONE', photon_flux_upper_limit='6.42e-08', time_completed='2021-09-06 06:47:11.210525', job_id='937357', GAL2='0.75', fit_tolerance='1e-08', EG2='1.20', EG='1.20', time_epoch_completed='1630936031.21', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.75', dlogl='-1.93e-07', ts2='-0.00', photon_index_error='0.00', photon_index='1.78' WHERE bin_id='635' AND source_name='4FGL J1249.8+3707' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 06:47:11 PDT 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0179>
Subject: Job 937357: <4FGL_J1249.8+3707_daily_bin635> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1249.8+3707_daily_bin635 192.46 37.1306 403920001 404179201 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 :                                   563.00 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             318.64 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   685 sec.
    Turnaround time :                            687 sec.

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

