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


Performing analysis on: 4FGL_J1249.8+3707_daily_bin598
RA = 192.46, Dec = 37.1306
tmin = 394329601, tmax = 394588801
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='937302', job_status='RUN', time_executed='2021-09-06 06:37:51.355887', time_epoch_executed='1630935471.36' WHERE source_name='4FGL J1249.8+3707' and cadence='daily' and bin_id='598'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/937302

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

Retrieving the FT1 file...

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

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

Retrieving 53 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/937302/ft1_4FGL_J1249.8+3707_daily_bin598.fits


Retrieving the FT1 file...

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

Retrieving 53 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/937302/ft2_4FGL_J1249.8+3707_daily_bin598.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/937302/ft1_4FGL_J1249.8+3707_daily_bin598.fits outfile=/scratch/kocevski/937302/ft1_filteredMKT_4FGL_J1249.8+3707_daily_bin598.fits ra=192.46 dec=37.1306 rad=12.0 tmin=394329601.0 tmax=394588801.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 7.43
user 7.10
sys 0.28

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/937302/ft1_filtered_4FGL_J1249.8+3707_daily_bin598.fits" evtable="EVENTS" scfile=/scratch/kocevski/937302/ft2_4FGL_J1249.8+3707_daily_bin598.fits sctable="SC_DATA" outfile=/scratch/kocevski/937302/ltcube_394329601_394588801_4FGL_J1249.8+3707_daily_bin598.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/937302/ft2_4FGL_J1249.8+3707_daily_bin598.fits
.....................!
real 12.78
user 11.77
sys 0.36

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/937302/ft1_filtered_4FGL_J1249.8+3707_daily_bin598.fits evtable="EVENTS" scfile=/scratch/kocevski/937302/ft2_4FGL_J1249.8+3707_daily_bin598.fits sctable="SC_DATA" expcube=/scratch/kocevski/937302/ltcube_394329601_394588801_4FGL_J1249.8+3707_daily_bin598.fits outfile=/scratch/kocevski/937302/expmap_394329601_394588801_4FGL_J1249.8+3707_daily_bin598.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/937302/ltcube_394329601_394588801_4FGL_J1249.8+3707_daily_bin598.fits
.....................!
real 190.96
user 185.25
sys 5.15

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/937302/ft1_filtered_4FGL_J1249.8+3707_daily_bin598.fits scfile=/scratch/kocevski/937302/ft2_4FGL_J1249.8+3707_daily_bin598.fits outfile=/scratch/kocevski/937302/cmap_394329601_394588801_4FGL_J1249.8+3707_daily_bin598.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.35
sys 0.17

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

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

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 'Prefactor '    .10007E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    8.8746       1.0000         .10000E-03   10000.    
     4 'Prefactor '    23.093       1.0000         .10000E-03   10000.    
     5 'Prefactor '    2.1481       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10626E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    34.896       1.0000         .10000E-03   10000.    
     8 'Prefactor '    2.4381       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10006E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10104E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10464E-03   1.0000         .10000E-03   10000.    
    12 'norm      '    .10282E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10007E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    27.176       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10820E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    .11027E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    18 'norm      '    14.184       1.0000         .10000E-03   10000.    
    19 'norm      '    .13022E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10100E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10008E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .70860E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    25 'Normalizat'    1.0834       1.0000         .10000E-01   10.000    
    26 'Prefactor '    1.0473       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=   5499.659     FROM MIGRAD    STATUS=CONVERGED    605 CALLS     3066 TOTAL
                     EDM=   .34E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  5.9%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    46.699       -.82998E-06** at limit **
   2  Prefactor     .10000E-03    27.434       -.10489E-06** at limit **
   3  norm          8.8742        4.3228       -.35965E-06   -.47136E-03
   4  Prefactor     23.095        13.513        .34299E-07   -.65436E-04
   5  Prefactor     2.1481        2.1746        .64269E-07   -.22208E-03
   6  Prefactor     .10000E-03    2.0866        .65255E-06** at limit **
   7  Prefactor     34.895        16.305       -.47141E-06   -.27505E-03
   8  Prefactor     2.4380        59.238       -.63560E-05   -.27032E-04
   9  Prefactor     .10000E-03    6.3745        .15872E-06** at limit **
  10  Prefactor     .10000E-03    52.239        .91272E-06** at limit **
  11  Prefactor     .10000E-03    5.7974        .10445E-05** at limit **
  12  norm          .10000E-03    1.6304        .13320E-05** at limit **
  13  Prefactor     .10000E-03    27.509       -.35583E-06** at limit **
  14  Prefactor     27.155        31.635        .31487E-06   -.98799E-05
  15  Prefactor     .10000E-03    20.401        .26696E-05** at limit **
  16  norm          .10000E-03    4.9151        .24628E-05** at limit **
  17  norm          .10000E-03    4.6457       -.10404E-06** at limit **
  18  norm          14.187        6.1888       -.10185E-05   -.21225E-04
  19  norm          .10000E-03    19.634       -.53283E-05** at limit **
  20  Prefactor     .10000E-03    1.5147        .74417E-06** at limit **
  21  Prefactor     .10000E-03    7.4565        .61989E-07** at limit **
  22  Prefactor     .10000E-03    25.573       -.43942E-07** at limit **
  23  Prefactor     .10000E-03    146.54       -.16156E-04** at limit **
  24  Prefactor     .10000E-03    27.856       -.24827E-06** at limit **
  25  Normalizat    1.0830        .19826       -.30529E-05   -.95684E-04
  26  Prefactor     1.0479        .23455        .40690E-05   -.27858E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100001
  Prefactor  = 0.0001
  norm       = 8.87418
  Prefactor  = 23.0952
  Prefactor  = 2.14809
  Prefactor  = 0.0001
  Prefactor  = 34.8953
  Prefactor  = 2.43797
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 27.1547
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 0.0001
  norm       = 14.1871
  norm       = 0.000100001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.000100001
  Prefactor  = 0.0001
  Normalizat = 1.08295
  Prefactor  = 1.04788
 **********
 **   18 **HESSE 
 **********

 FCN=   5499.659     FROM HESSE     STATUS=OK           450 CALLS     3516 TOTAL
                     EDM=   .67E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    46.810        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    27.464        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          8.8742        4.2881        .10034E-03   -1.5112    
   4  Prefactor     23.095        13.535        .83354E-04   -1.4746    
   5  Prefactor     2.1481        2.1727        .10398E-03   -1.5415    
   6  Prefactor     .10000E-03    3.4954        .20120E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     34.895        16.163        .67838E-04   -1.4526    
   8  Prefactor     2.4380        59.816        .26204E-03   -1.5396    
   9  Prefactor     .10000E-03    6.3764        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    52.311        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    5.9441        .34860E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm          .10000E-03    1.6564        .93115E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .10000E-03    27.523        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     27.155        31.649        .76848E-04   -1.4665    
  15  Prefactor     .10000E-03    20.589        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          .10000E-03    5.0264        .16132E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .10000E-03    4.6477        .15612E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  norm          14.187        6.0266        .10635E-03   -1.4954    
  19  norm          .10000E-03    18.894        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10000E-03    1.5382        .89437E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .10000E-03    7.4762        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     .10000E-03    25.583        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10000E-03    141.80        .59436E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     .10000E-03    27.866        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Normalizat    1.0830        .23043        .25146E-03   -.90301    
  26  Prefactor     1.0479        .26882        .30669E-03   -.91150    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.65106e-10
Minuit parameter uncertainties:
  1  0.000345543
  2  1.91287e-06
  3  4.28823
  4  13.5365
  5  2.1728
  6  2.69055e-05
  7  16.1648
  8  24.1785
  9  3.11033e-05
  10  0.00018304
  11  1.14222e-05
  12  2.16661e-05
  13  2.09814e-05
  14  31.6686
  15  0.000189317
  16  6.25244e-05
  17  3.606e-06
  18  6.02689
  19  0.000257225
  20  1.6798e-05
  21  1.58483e-05
  22  7.99068e-05
  23  0.000660327
  24  3.52376e-05
  25  0.230643
  26  0.269166
Done.

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

Extracting fit parameters...

4FGL J1249.8+3707
   Spectrum: PowerLaw
313    Prefactor:  1.000e-04  3.110e-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:  1.048e+00  2.692e-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.083e+00  2.306e-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.32e-08 ph cm-2 s-1
Energy Flux Upper Limit: 2.44e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/937302/likelihoodResults_394329601_394588801_4FGL_J1249.8+3707_daily_bin598.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) = 5499.6595049
delta logL = -0.000716517256478

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 5499.65878841
delta logL = -2.45045157499e-08

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10258E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    1.7566       1.0000          .0000       10.000    
     3 'Normalizat'    1.0829       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0479       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.
 MIGRAD TERMINATED WITHOUT CONVERGENCE.

 FCN=   5499.659     FROM MIGRAD    STATUS=FAILED        91 CALLS      243 TOTAL
                     EDM=   .13E-03    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    341.72        .18142E-02** at limit **
   2  Index         1.7319        6.0587        .20000        .26535E-04
   3  Normalizat    1.0830        .36596E-01    .25146E-03   -.45211E-06
   4  Prefactor     1.0479        .44174E-01    .30669E-03    .10750E-05
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   5499.659     FROM SIMPLEX   STATUS=UNCHANGED    160 CALLS      403 TOTAL
                     EDM=   .17E-04    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    341.72        .52151E-03** at limit **
   2  Index         1.7319        6.0587        .37472E-05    .26535E-04
   3  Normalizat    1.0830        .36596E-01    .61384E-07   -.45211E-06
   4  Prefactor     1.0479        .44174E-01    .48914E-07    .10750E-05
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   5499.659     FROM MIGRAD    STATUS=CONVERGED     42 CALLS      445 TOTAL
                     EDM=   .17E-10    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    1089.2        .36285E-02** at limit **
   2  Index         1.2455        9.2636        .80000E-01    .33822E-07
   3  Normalizat    1.0830        .67530E-01    .10058E-04    .11077E-04
   4  Prefactor     1.0479        .81511E-01    .12268E-04    .10750E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 1.24547
  Normalizat = 1.08295
  Prefactor  = 1.04788
 **********
 **   18 **HESSE 
 **********

 FCN=   5499.659     FROM HESSE     STATUS=OK            23 CALLS      468 TOTAL
                     EDM=   .13E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    8.5798        .72569E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         1.2455        6.2837        .32000E-02   -.84943    
   3  Normalizat    1.0830        .22219        .20117E-05   -.90301    
   4  Prefactor     1.0479        .26815        .24535E-05   -.91150    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.29337e-11
Minuit parameter uncertainties:
  1  4.09167e-05
  2  267.703
  3  0.222378
  4  0.268493
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/937302': No such file or directory
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5499.65878637
delta logL = 2.01055172511e-06

Extracting fit parameters...

4FGL J1249.8+3707
   Spectrum: PowerLaw
313    Prefactor:  1.000e-04  4.092e-05  1.000e-04  1.000e+04 ( 1.000e-14)
314        Index:  1.245e+00  2.677e+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.048e+00  2.685e-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.083e+00  2.224e-01  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/937302/cmap_HighResolution_394329601_394588801_4FGL_J1249.8+3707_daily_bin598.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='2.44e-03', job_status='DONE', photon_flux_upper_limit='3.32e-08', time_completed='2021-09-06 06:50:09.749769', job_id='937302', GAL2='1.05', fit_tolerance='1e-08', EG2='1.08', EG='1.08', time_epoch_completed='1630936209.75', return_code2='0', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.05', dlogl='2.01e-06', ts2='-0.00', photon_index_error='0.00', photon_index='1.78' WHERE bin_id='598' AND source_name='4FGL J1249.8+3707' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 06:50:09 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0041>
Subject: Job 937302: <4FGL_J1249.8+3707_daily_bin598> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1249.8+3707_daily_bin598 192.46 37.1306 394329601 394588801 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 :                                   733.00 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             290.90 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   867 sec.
    Turnaround time :                            870 sec.

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

