/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 8 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 = 7555
number of fields = 27
No RA_SUN column yet. Adding RA_SUN/DEC_SUN columns.
Done.


Performing analysis on: 4FGL_J1249.8+3707_daily_bin366
RA = 192.46, Dec = 37.1306
tmin = 334195201, tmax = 334454401
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='935843', job_status='RUN', time_executed='2021-09-06 06:31:15.516632', time_epoch_executed='1630935075.52' WHERE source_name='4FGL J1249.8+3707' and cadence='daily' and bin_id='366'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/935843

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/935843/ft1_4FGL_J1249.8+3707_daily_bin366.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/935843/ft2_4FGL_J1249.8+3707_daily_bin366.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/935843/ft1_4FGL_J1249.8+3707_daily_bin366.fits outfile=/scratch/kocevski/935843/ft1_filteredMKT_4FGL_J1249.8+3707_daily_bin366.fits ra=192.46 dec=37.1306 rad=12.0 tmin=334195201.0 tmax=334454401.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 4.08
user 3.77
sys 0.18

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/935843/ft2_4FGL_J1249.8+3707_daily_bin366.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/935843/ft1_filteredMKT_4FGL_J1249.8+3707_daily_bin366.fits evtable="EVENTS" outfile="/scratch/kocevski/935843/ft1_filtered_4FGL_J1249.8+3707_daily_bin366.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.82
user 0.35
sys 0.13

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/935843/ft1_filtered_4FGL_J1249.8+3707_daily_bin366.fits evtable="EVENTS" scfile=/scratch/kocevski/935843/ft2_4FGL_J1249.8+3707_daily_bin366.fits sctable="SC_DATA" expcube=/scratch/kocevski/935843/ltcube_334195201_334454401_4FGL_J1249.8+3707_daily_bin366.fits outfile=/scratch/kocevski/935843/expmap_334195201_334454401_4FGL_J1249.8+3707_daily_bin366.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/935843/ltcube_334195201_334454401_4FGL_J1249.8+3707_daily_bin366.fits
.....................!
real 190.27
user 185.06
sys 4.05

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/935843/ft1_filtered_4FGL_J1249.8+3707_daily_bin366.fits scfile=/scratch/kocevski/935843/ft2_4FGL_J1249.8+3707_daily_bin366.fits outfile=/scratch/kocevski/935843/cmap_334195201_334454401_4FGL_J1249.8+3707_daily_bin366.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.53
user 0.39
sys 0.12

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/935843/ft1_filtered_4FGL_J1249.8+3707_daily_bin366.fits scfile=/scratch/kocevski/935843/ft2_4FGL_J1249.8+3707_daily_bin366.fits outfile=/scratch/kocevski/935843/cmap_HighResolution_334195201_334454401_4FGL_J1249.8+3707_daily_bin366.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.56
user 0.40
sys 0.15

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    116.58       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .21981       1.0000         .10000E-03   10000.    
     3 'norm      '    8.3366       1.0000         .10000E-03   10000.    
     4 'Prefactor '    7.5512       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    1.9082       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10033E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10131E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10163E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10081E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10007E-03   1.0000         .10000E-03   10000.    
    12 'norm      '    4.8600       1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10062E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10129E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10230E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    .10726E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    33.288       1.0000         .10000E-03   10000.    
    18 'norm      '    8.4984       1.0000         .10000E-03   10000.    
    19 'norm      '    .18617E-01   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .68138E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    24.923       1.0000         .10000E-03   10000.    
    23 'Prefactor '    10.704       1.0000         .10000E-03   10000.    
    24 'Prefactor '    24.140       1.0000         .10000E-03   10000.    
    25 'Normalizat'    1.2310       1.0000         .10000E-01   10.000    
    26 'Prefactor '    .96780       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6280E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   5957.868     FROM MIGRAD    STATUS=CONVERGED    154 CALLS     2648 TOTAL
                     EDM=   .27E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  4.4%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     116.57        1.6321        .17165E-06   -.11707E-02
   2  Prefactor     .59323        718.46       -.65577E-04    .20023E-03
   3  norm          8.3342        3.5000        .46275E-06   -.66483E-04
   4  Prefactor     7.5377        1.9510        .13269E-06    .36733E-03
   5  Prefactor     .10000E-03    .65479       -.11539E-05** at limit **
   6  Prefactor     1.9080        2.3331       -.51112E-06    .24193E-04
   7  Prefactor     .10001E-03    15.937        .29151E-05** at limit **
   8  Prefactor     .10000E-03    15.147        .14878E-05** at limit **
   9  Prefactor     .10000E-03    11.819        .14755E-05** at limit **
  10  Prefactor     .10004E-03    17.616       -.32354E-05** at limit **
  11  Prefactor     .10000E-03    3.3985        .14064E-05** at limit **
  12  norm          4.8612        4.3306        .53822E-06    .31091E-05
  13  Prefactor     .10001E-03    12.475       -.15264E-05** at limit **
  14  Prefactor     .10001E-03    16.528       -.56613E-05** at limit **
  15  Prefactor     .10013E-03    8.9679        .18390E-05** at limit **
  16  norm          .10000E-03    22.248        .13190E-05** at limit **
  17  norm          33.290        3.1985       -.60286E-06    .69496E-04
  18  norm          8.5020        4.8596       -.17463E-05    .61499E-05
  19  norm          .10056E-03    219.10       -.76448E-05** at limit **
  20  Prefactor     .10000E-03    13.370       -.55025E-06** at limit **
  21  Prefactor     .10006E-03    27.828        .75510E-05** at limit **
  22  Prefactor     24.844        7.9093        .19583E-05   -.58852E-02
  23  Prefactor     10.691        19.756       -.57968E-05   -.18813E-02
  24  Prefactor     24.277        13.659       -.22634E-05   -.63698E-02
  25  Normalizat    1.2303        .22753        .30224E-06    .99094E-05
  26  Prefactor     .96843        .27133       -.18652E-05    .78221E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 116.568
  Prefactor  = 0.593234
  norm       = 8.33422
  Prefactor  = 7.53771
  Prefactor  = 0.0001
  Prefactor  = 1.90802
  Prefactor  = 0.000100008
  Prefactor  = 0.000100001
  Prefactor  = 0.0001
  Prefactor  = 0.000100042
  Prefactor  = 0.0001
  norm       = 4.86117
  Prefactor  = 0.000100005
  Prefactor  = 0.000100006
  Prefactor  = 0.000100135
  norm       = 0.000100001
  norm       = 33.2901
  norm       = 8.50203
  norm       = 0.000100556
  Prefactor  = 0.0001
  Prefactor  = 0.000100059
  Prefactor  = 24.8445
  Prefactor  = 10.6909
  Prefactor  = 24.2767
  Normalizat = 1.23032
  Prefactor  = 0.968427
 **********
 **   18 **HESSE 
 **********

 FCN=   5957.868     FROM HESSE     STATUS=OK           534 CALLS     3182 TOTAL
                     EDM=   .17E-05    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     116.57        68.591        .93161E-03   -1.3544    
   2  Prefactor     .59323        46.959        .13234       -1.5554    
   3  norm          8.3342        3.5096        .34712E-02   -1.5131    
   4  Prefactor     7.5377        9.5131        .36485E-02   -1.5159    
   5  Prefactor     .10000E-03    .65238        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     1.9080        2.3554        .75245E-02   -1.5432    
   7  Prefactor     .10001E-03    15.775        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    15.126        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .10000E-03    11.785        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10004E-03    34.539        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    3.3901        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm          4.8612        4.3317        .45617E-02   -1.5267    
  13  Prefactor     .10001E-03    34.130        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10001E-03    16.612        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .10013E-03    32.995        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          .10000E-03    5.0636        .57843E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          33.290        20.167        .17363E-02   -1.4553    
  18  norm          8.5020        6.0481        .34377E-02   -1.5125    
  19  norm          .10056E-03    8.0109        .63138E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10000E-03    2.2524        .66759E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .10006E-03    31.181        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     24.844        44.588        .20060E-02   -1.4711    
  23  Prefactor     10.691        20.237        .30615E-02   -1.5054    
  24  Prefactor     24.277        93.143        .20382E-02   -1.4722    
  25  Normalizat    1.2303        .19327        .53948E-01   -.85671    
  26  Prefactor     .96843        .22745        .72464E-01   -.93789    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.73797e-06
Minuit parameter uncertainties:
  1  68.6378
  2  10.5638
  3  3.50967
  4  9.51501
  5  1.02321e-06
  6  2.35551
  7  0.00071932
  8  0.000185494
  9  1.27893e-05
  10  0.00240287
  11  5.42137e-07
  12  4.33199
  13  0.00083599
  14  0.000608415
  15  0.00421768
  16  0.000101706
  17  20.1709
  18  6.04855
  19  0.00422308
  20  5.13495e-06
  21  0.00272133
  22  44.6483
  23  20.2501
  24  93.7088
  25  0.193382
  26  0.22768
Done.

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

Extracting fit parameters...

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

GAL_V02
   Spectrum: PowerLaw
625    Prefactor:  9.684e-01  2.277e-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.230e+00  1.934e-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: 4.23e-08 ph cm-2 s-1
Energy Flux Upper Limit: 3.11e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/935843/likelihoodResults_334195201_334454401_4FGL_J1249.8+3707_daily_bin366.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) = 5957.86840556
delta logL = -0.000403000457482

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 5957.86800263
delta logL = -7.35735738999e-08

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 'Index     '    1.7804       1.0000          .0000       10.000    
     3 'Normalizat'    1.2302       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .96853       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=   5957.868     FROM MIGRAD    STATUS=CONVERGED     56 CALLS      210 TOTAL
                     EDM=   .14E-11    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    177.09        .90712E-02** at limit **
   2  Index         1.7808        9.0927        .50000       -.26162E-06
   3  Normalizat    1.2303        .18303E-01    .53949E-01    .48898E-05
   4  Prefactor     .96843        .22230E-01    .72464E-01    .15545E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 1.7808
  Normalizat = 1.23032
  Prefactor  = 0.968427
 **********
 **   18 **HESSE 
 **********

 FCN=   5957.868     FROM HESSE     STATUS=NOT POSDEF    33 CALLS      243 TOTAL
                     EDM=   .47E-11    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    1048.6        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         1.7808        8.5537        .50000       -.69951    
   3  Normalizat    1.2303        .50215E-01    .23854E-03   -.85671    
   4  Prefactor     .96843        .60924E-01    .32061E-03   -.93789    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 4.68006e-12
Minuit parameter uncertainties:
  1  8.32253e-06
  2  36.7896
  3  0.0502171
  4  0.0609278
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/935843': 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) = 5957.86800256
delta logL = 4.27462509833e-11

Extracting fit parameters...

4FGL J1249.8+3707
   Spectrum: PowerLaw
313    Prefactor:  1.000e-04  8.323e-06  1.000e-04  1.000e+04 ( 1.000e-14)
314        Index:  1.781e+00  3.679e+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:  9.684e-01  6.093e-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.230e+00  5.022e-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/935843/cmap_HighResolution_334195201_334454401_4FGL_J1249.8+3707_daily_bin366.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='3.11e-03', job_status='DONE', photon_flux_upper_limit='4.23e-08', time_completed='2021-09-06 06:43:12.032461', job_id='935843', GAL2='0.97', fit_tolerance='1e-08', EG2='1.23', EG='1.23', time_epoch_completed='1630935792.03', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.97', dlogl='4.27e-11', ts2='-0.00', photon_index_error='0.00', photon_index='1.78' WHERE bin_id='366' AND source_name='4FGL J1249.8+3707' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 06:43:12 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0032>
Subject: Job 935843: <4FGL_J1249.8+3707_daily_bin366> in cluster <slac> Done

Job <4FGL_J1249.8+3707_daily_bin366> was submitted from host <rhel6-64h> by user <kocevski> in cluster <slac> at Mon Sep  6 06:30:57 2021
Job was executed on host(s) <bullet0032>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep  6 06:30:58 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:30:58 2021
Terminated at Mon Sep  6 06:43:12 2021
Results reported at Mon Sep  6 06:43:12 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1249.8+3707_daily_bin366 192.46 37.1306 334195201 334454401 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 :                                   711.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             361.25 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   734 sec.
    Turnaround time :                            735 sec.

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

