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


Performing analysis on: 4FGL_J1249.8+3707_daily_bin856
RA = 192.46, Dec = 37.1306
tmin = 461203201, tmax = 461462401
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='938808', job_status='RUN', time_executed='2021-09-06 06:43:47.343842', time_epoch_executed='1630935827.34' WHERE source_name='4FGL J1249.8+3707' and cadence='daily' and bin_id='856'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/938808

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/938808/ft1_4FGL_J1249.8+3707_daily_bin856.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/938808/ft2_4FGL_J1249.8+3707_daily_bin856.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/938808/ft1_4FGL_J1249.8+3707_daily_bin856.fits outfile=/scratch/kocevski/938808/ft1_filteredMKT_4FGL_J1249.8+3707_daily_bin856.fits ra=192.46 dec=37.1306 rad=12.0 tmin=461203201.0 tmax=461462401.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.42
user 3.21
sys 0.19

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/938808/ft2_4FGL_J1249.8+3707_daily_bin856.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/938808/ft1_filteredMKT_4FGL_J1249.8+3707_daily_bin856.fits evtable="EVENTS" outfile="/scratch/kocevski/938808/ft1_filtered_4FGL_J1249.8+3707_daily_bin856.fits" apply_filter=yes overwrite=yes header_obstimes=yes tstart=0.0 tstop=0.0 gtifile="default" chatter=3 clobber=yes debug=no gui=no mode="ql"

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

This is gtmktime version HEAD
Applying GTI filter:
IN_SAA!=T && LIVETIME>0 && gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nogrb.gti',(START+STOP)/2) && (angsep(RA_SUN,DEC_SUN,RA_ZENITH,DEC_ZENITH)>115 || gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nosolarflares.gti',(START+STOP)/2))
real 0.49
user 0.33
sys 0.15

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/938808/ft1_filtered_4FGL_J1249.8+3707_daily_bin856.fits" evtable="EVENTS" scfile=/scratch/kocevski/938808/ft2_4FGL_J1249.8+3707_daily_bin856.fits sctable="SC_DATA" outfile=/scratch/kocevski/938808/ltcube_461203201_461462401_4FGL_J1249.8+3707_daily_bin856.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/938808/ft2_4FGL_J1249.8+3707_daily_bin856.fits
.....................!
real 12.05
user 11.68
sys 0.33

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/938808/ft1_filtered_4FGL_J1249.8+3707_daily_bin856.fits evtable="EVENTS" scfile=/scratch/kocevski/938808/ft2_4FGL_J1249.8+3707_daily_bin856.fits sctable="SC_DATA" expcube=/scratch/kocevski/938808/ltcube_461203201_461462401_4FGL_J1249.8+3707_daily_bin856.fits outfile=/scratch/kocevski/938808/expmap_461203201_461462401_4FGL_J1249.8+3707_daily_bin856.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/938808/ltcube_461203201_461462401_4FGL_J1249.8+3707_daily_bin856.fits
.....................!
real 189.85
user 185.15
sys 4.33

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/938808/ft1_filtered_4FGL_J1249.8+3707_daily_bin856.fits scfile=/scratch/kocevski/938808/ft2_4FGL_J1249.8+3707_daily_bin856.fits outfile=/scratch/kocevski/938808/cmap_461203201_461462401_4FGL_J1249.8+3707_daily_bin856.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.94
user 0.38
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/938808/ft1_filtered_4FGL_J1249.8+3707_daily_bin856.fits scfile=/scratch/kocevski/938808/ft2_4FGL_J1249.8+3707_daily_bin856.fits outfile=/scratch/kocevski/938808/cmap_HighResolution_461203201_461462401_4FGL_J1249.8+3707_daily_bin856.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.85
user 0.39
sys 0.16

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10049E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    3.9756       1.0000         .10000E-03   10000.    
     4 'Prefactor '    3.6112       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    1.7698       1.0000         .10000E-03   10000.    
     7 'Prefactor '    5.5856       1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10007E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    4.8935       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10020E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10388E-03   1.0000         .10000E-03   10000.    
    12 'norm      '    .10046E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    .13692E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    36.279       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10013E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    1.0685       1.0000         .10000E-03   10000.    
    17 'norm      '    9.6465       1.0000         .10000E-03   10000.    
    18 'norm      '    .10008E-03   1.0000         .10000E-03   10000.    
    19 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    8.9437       1.0000         .10000E-03   10000.    
    21 'Prefactor '    25.245       1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    10.275       1.0000         .10000E-03   10000.    
    25 'Normalizat'    .66212       1.0000         .10000E-01   10.000    
    26 'Prefactor '    1.2941       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=   5864.608     FROM MIGRAD    STATUS=CONVERGED    622 CALLS     3098 TOTAL
                     EDM=   .37E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .8%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    36.302       -.49506E-06** at limit **
   2  Prefactor     .10000E-03    11.301        .18080E-06** at limit **
   3  norm          3.9757        2.5788        .94294E-08   -.26354E-04
   4  Prefactor     3.6115        4.7785        .21616E-06    .54784E-04
   5  Prefactor     .10000E-03    .96602        .15374E-07** at limit **
   6  Prefactor     1.7700        1.9918        .11758E-06   -.20827E-04
   7  Prefactor     5.5856        8.0951        .18936E-06   -.11808E-04
   8  Prefactor     .10000E-03    11.862       -.40448E-07** at limit **
   9  Prefactor     4.8774        25.496        .46896E-06   -.22158E-05
  10  Prefactor     .10000E-03    51.992        .57709E-06** at limit **
  11  Prefactor     .10000E-03    3.3530        .45066E-07** at limit **
  12  norm          .10000E-03    1.8863        .38415E-07** at limit **
  13  Prefactor     .10000E-03    138.42        .12653E-07** at limit **
  14  Prefactor     36.279        22.965       -.32779E-06   -.29560E-04
  15  Prefactor     .10000E-03    6.2878       -.55487E-07** at limit **
  16  norm          1.0682        3.9479        .89231E-06   -.67021E-04
  17  norm          9.6403        9.5071       -.57901E-07    .43809E-05
  18  norm          .10000E-03    1.0663       -.16741E-07** at limit **
  19  norm          .10000E-03    1.9131       -.14843E-07** at limit **
  20  Prefactor     8.9446        4.8261        .92681E-06   -.18825E-03
  21  Prefactor     25.248        18.577       -.10188E-05   -.21311E-04
  22  Prefactor     .10000E-03    26.748        .20133E-07** at limit **
  23  Prefactor     .10000E-03    7.5898        .21264E-07** at limit **
  24  Prefactor     10.234        54.318       -.72199E-06   -.33712E-04
  25  Normalizat    .66183        .16284        .38342E-06   -.64268E-04
  26  Prefactor     1.2943        .20686       -.93685E-06    .90684E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 3.97572
  Prefactor  = 3.61155
  Prefactor  = 0.0001
  Prefactor  = 1.77004
  Prefactor  = 5.58563
  Prefactor  = 0.0001
  Prefactor  = 4.8774
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 36.279
  Prefactor  = 0.0001
  norm       = 1.06823
  norm       = 9.64033
  norm       = 0.0001
  norm       = 0.0001
  Prefactor  = 8.94458
  Prefactor  = 25.2479
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 10.2336
  Normalizat = 0.661833
  Prefactor  = 1.29435
 **********
 **   18 **HESSE 
 **********

 FCN=   5864.608     FROM HESSE     STATUS=OK           456 CALLS     3554 TOTAL
                     EDM=   .83E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    36.497        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    11.327        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          3.9757        2.5667        .94198E-04   -1.5309    
   4  Prefactor     3.6115        4.7704        .18683E-03   -1.5328    
   5  Prefactor     .10000E-03    .97552        .73265E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     1.7700        1.9698        .10811E-03   -1.5442    
   7  Prefactor     5.5856        8.0760        .16999E-03   -1.5235    
   8  Prefactor     .10000E-03    11.906        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     4.8774        25.358        .18183E-03   -1.5266    
  10  Prefactor     .10000E-03    52.142        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    3.3724        .13665E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm          .10000E-03    1.8989        .10255E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .10000E-03    139.51        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     36.279        22.933        .66537E-04   -1.4503    
  15  Prefactor     .10000E-03    6.3040        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          1.0682        3.8351        .27238E-03   -1.5501    
  17  norm          9.6403        9.5084        .12902E-03   -1.5087    
  18  norm          .10000E-03    1.0822        .77168E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  norm          .10000E-03    1.9234        .10343E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     8.9446        4.8080        .50327E-03   -1.5110    
  21  Prefactor     25.248        18.571        .79727E-04   -1.4703    
  22  Prefactor     .10000E-03    26.764        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10000E-03    7.6079        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     10.234        54.741        .12500E-03   -1.5068    
  25  Normalizat    .66183        .19208        .25675E-03   -1.0542    
  26  Prefactor     1.2943        .24338        .24673E-03   -.83475    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 8.3213e-11
Minuit parameter uncertainties:
  1  0.000242861
  2  2.85751e-05
  3  2.56679
  4  4.77086
  5  4.16504e-07
  6  1.96982
  7  8.0776
  8  2.86113e-05
  9  22.2571
  10  0.000302779
  11  4.21173e-06
  12  9.87795e-08
  13  0.000248857
  14  22.9382
  15  1.08666e-05
  16  3.83599
  17  9.50988
  18  1.21615e-06
  19  9.62506e-07
  20  4.8082
  21  18.5748
  22  5.83937e-05
  23  1.47578e-07
  24  47.4043
  25  0.192276
  26  0.243598
Done.

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

Extracting fit parameters...

4FGL J1249.8+3707
   Spectrum: PowerLaw
313    Prefactor:  4.877e+00  2.226e+01  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.294e+00  2.436e-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:  6.618e-01  1.923e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.05
Ra Dec: 192.460 37.131
Photon Flux Upper Limit: 5.68e-08 ph cm-2 s-1
Energy Flux Upper Limit: 4.18e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/938808/likelihoodResults_461203201_461462401_4FGL_J1249.8+3707_daily_bin856.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) = 5863.12269951
delta logL = 1.48544135525

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 5863.10796273
delta logL = 1.50017814169

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .56022       1.0000         .10000E-03   10000.    
     2 'Index     '    3.4125       1.0000          .0000       10.000    
     3 'Normalizat'    .57850       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.3511       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=   5863.108     FROM MIGRAD    STATUS=CONVERGED     53 CALLS      243 TOTAL
                     EDM=   .13E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .55933        5.2679        .81313E-02    .79467E-03
   2  Index         3.4130        1.5482        .70162E-01    .21925E-03
   3  Normalizat    .57844        .40538E-01    .61803E-01    .21013E-04
   4  Prefactor     1.3511        .52198E-01    .54731E-01   -.58031E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.559329
  Index      = 3.41302
  Normalizat = 0.578439
  Prefactor  = 1.35109
 **********
 **   18 **HESSE 
 **********

 FCN=   5863.108     FROM HESSE     STATUS=NOT POSDEF    33 CALLS      276 TOTAL
                     EDM=   .32E-06    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .55933        11.609        .36766E-04   -1.5558    
   2  Index         3.4130        2.6804        .26618E-02   -.32298    
   3  Normalizat    .57844        .17557        .27344E-03   -1.0891    
   4  Prefactor     1.3511        .22411        .24198E-03   -.81800    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 3.2259e-07
Minuit parameter uncertainties:
  1  5.09699
  2  2.84875
  3  0.175737
  4  0.224274
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/938808': 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) = 5863.10796242
delta logL = 1.50017844645

Extracting fit parameters...

4FGL J1249.8+3707
   Spectrum: PowerLaw
313    Prefactor:  5.593e-01  5.097e+00  1.000e-04  1.000e+04 ( 1.000e-14)
314        Index:  3.413e+00  2.849e+00  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.351e+00  2.243e-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:  5.784e-01  1.757e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 3.29
Ra Dec: 192.460 37.131
Photon Index (Free Index): 3.41 +/- 2.85
Photon Flux (Free Index): 6.89e-08 +/- 4.87e-08
Energy Flux (Free Index): 1.17e-05 +/- 1.04e-05

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/938808/cmap_HighResolution_461203201_461462401_4FGL_J1249.8+3707_daily_bin856.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='4.18e-03', comment='SUCCESS', energy_flux2='1.17e-05', dlogl='1.50e+00', photon_flux2='6.89e-08', job_status='DONE', time_completed='2021-09-06 06:56:22.660931', photon_index_error2='2.85', photon_index2='3.41', ts='0.05', fit_tolerance='1e-08', GAL='1.29', photon_index_error='0.00', photon_flux_upper_limit='5.68e-08', energy_flux_error2='1.04e-05', EG='0.66', time_epoch_completed='1630936582.66', return_code='0', job_id='938808', GAL2='1.35', EG2='0.58', return_code2='102', photon_flux_error2='4.87e-08', ts2='3.29', photon_index='1.78' WHERE bin_id='856' AND source_name='4FGL J1249.8+3707' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 06:56:22 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0080>
Subject: Job 938808: <4FGL_J1249.8+3707_daily_bin856> in cluster <slac> Done

Job <4FGL_J1249.8+3707_daily_bin856> was submitted from host <rhel6-64k> by user <kocevski> in cluster <slac> at Mon Sep  6 06:40:36 2021
Job was executed on host(s) <bullet0080>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep  6 06:40:37 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Mon Sep  6 06:40:37 2021
Terminated at Mon Sep  6 06:56:23 2021
Results reported at Mon Sep  6 06:56:23 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1249.8+3707_daily_bin856 192.46 37.1306 461203201 461462401 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 :                                   748.00 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             278.62 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   945 sec.
    Turnaround time :                            947 sec.

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

