/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 234 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 = 7424
number of fields = 22
No RA_SUN column yet. Adding RA_SUN/DEC_SUN columns.
Done.


Performing analysis on: 4FGL_J0949.0+4038_daily_bin1
RA = 147.262, Dec = 40.6367
tmin = 239587201, tmax = 239846401
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='520183', job_status='RUN', time_executed='2021-09-01 03:00:01.642664', time_epoch_executed='1630490401.64' WHERE source_name='4FGL J0949.0+4038' and cadence='daily' and bin_id='1'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/520183

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

Retrieving the FT1 file...

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

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

Retrieving 41 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/520183/ft1_4FGL_J0949.0+4038_daily_bin1.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/520183/ft2_4FGL_J0949.0+4038_daily_bin1.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/520183/ft1_4FGL_J0949.0+4038_daily_bin1.fits outfile=/scratch/kocevski/520183/ft1_filteredMKT_4FGL_J0949.0+4038_daily_bin1.fits ra=147.262 dec=40.6367 rad=12.0 tmin=239587201.0 tmax=239846401.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 1.41
user 1.13
sys 0.17

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/520183/ft2_4FGL_J0949.0+4038_daily_bin1.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/520183/ft2_4FGL_J0949.0+4038_daily_bin1.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/520183/ft1_filteredMKT_4FGL_J0949.0+4038_daily_bin1.fits evtable="EVENTS" outfile="/scratch/kocevski/520183/ft1_filtered_4FGL_J0949.0+4038_daily_bin1.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.61
user 0.31
sys 0.18

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/520183/ft1_filtered_4FGL_J0949.0+4038_daily_bin1.fits" evtable="EVENTS" scfile=/scratch/kocevski/520183/ft2_4FGL_J0949.0+4038_daily_bin1.fits sctable="SC_DATA" outfile=/scratch/kocevski/520183/ltcube_239587201_239846401_4FGL_J0949.0+4038_daily_bin1.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/520183/ft2_4FGL_J0949.0+4038_daily_bin1.fits
.....................!
real 13.15
user 12.63
sys 0.32

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/520183/ft1_filtered_4FGL_J0949.0+4038_daily_bin1.fits evtable="EVENTS" scfile=/scratch/kocevski/520183/ft2_4FGL_J0949.0+4038_daily_bin1.fits sctable="SC_DATA" expcube=/scratch/kocevski/520183/ltcube_239587201_239846401_4FGL_J0949.0+4038_daily_bin1.fits outfile=/scratch/kocevski/520183/expmap_239587201_239846401_4FGL_J0949.0+4038_daily_bin1.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/520183/ltcube_239587201_239846401_4FGL_J0949.0+4038_daily_bin1.fits
.....................!
real 191.11
user 185.36
sys 5.13

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 210 point sources and 0 extended sources

Setting source of interest to:
4FGL J0949.0+4038 @ 147.262 40.6367

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/520183/ft1_filtered_4FGL_J0949.0+4038_daily_bin1.fits scfile=/scratch/kocevski/520183/ft2_4FGL_J0949.0+4038_daily_bin1.fits outfile=/scratch/kocevski/520183/cmap_239587201_239846401_4FGL_J0949.0+4038_daily_bin1.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=147.262 yref=40.6367 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.88
user 0.37
sys 0.17

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/520183/ft1_filtered_4FGL_J0949.0+4038_daily_bin1.fits scfile=/scratch/kocevski/520183/ft2_4FGL_J0949.0+4038_daily_bin1.fits outfile=/scratch/kocevski/520183/cmap_HighResolution_239587201_239846401_4FGL_J0949.0+4038_daily_bin1.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=147.262 yref=40.6367 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.68
user 0.36
sys 0.16

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/520183/ft1_filtered_4FGL_J0949.0+4038_daily_bin1.fits evtable="EVENTS" scfile=/scratch/kocevski/520183/ft2_4FGL_J0949.0+4038_daily_bin1.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/520183/Model_4FGL_J0949.0+4038_daily_bin1.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/520183/ft1_filtered_4FGL_J0949.0+4038_daily_bin1.fits.....................!
real 42.40
user 38.83
sys 1.37

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/520183/ft1_filtered_4FGL_J0949.0+4038_daily_bin1.fits', '/scratch/kocevski/520183/ft2_4FGL_J0949.0+4038_daily_bin1.fits', expMap='/scratch/kocevski/520183/expmap_239587201_239846401_4FGL_J0949.0+4038_daily_bin1.fits', expCube='/scratch/kocevski/520183/ltcube_239587201_239846401_4FGL_J0949.0+4038_daily_bin1.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/520183/Model_4FGL_J0949.0+4038_daily_bin1.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J0949.0+4038'

4FGL J0949.0+4038
   Spectrum: PowerLaw
323    Prefactor:  7.192e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-13)
324        Index:  2.608e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
325        Scale:  7.143e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/520183/ft1_filtered_4FGL_J0949.0+4038_daily_bin1.fits
Spacecraft file(s): /scratch/kocevski/520183/ft2_4FGL_J0949.0+4038_daily_bin1.fits
Exposure map: /scratch/kocevski/520183/expmap_239587201_239846401_4FGL_J0949.0+4038_daily_bin1.fits
Exposure cube: /scratch/kocevski/520183/ltcube_239587201_239846401_4FGL_J0949.0+4038_daily_bin1.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/520183/Model_4FGL_J0949.0+4038_daily_bin1.xml
Optimizer: MINUIT
Statistic: UNBINNED

Performing an iterative likelihood fit...

Fit tolerance = 1

Performing likelihood fit...
Done.

MINUIT Return Code (Fixed Index): 102
logL (Fixed Index) = 4204.07906727

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    1.2238       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10076E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    .21377E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    16.424       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .14846E-03   1.0000         .10000E-03   10000.    
     7 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .13377       1.0000         .10000E-03   10000.    
     9 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10453E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    5.6659       1.0000         .10000E-03   10000.    
    12 'Prefactor '    3.1831       1.0000         .10000E-03   10000.    
    13 'norm      '    .10019E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10124E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    6.7321       1.0000         .10000E-03   10000.    
    16 'Prefactor '    13.972       1.0000         .10000E-03   10000.    
    17 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    18 'norm      '    10.404       1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .24709       1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    .13064E-03   1.0000         .10000E-03   10000.    
    23 'norm      '    10.233       1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    25 'norm      '    .10438E-03   1.0000         .10000E-03   10000.    
    26 'Prefactor '    .10010E-03   1.0000         .10000E-03   10000.    
    27 'Prefactor '    .14274E-03   1.0000         .10000E-03   10000.    
    28 'Prefactor '    .10025E-03   1.0000         .10000E-03   10000.    
    29 'Prefactor '    .89973E-01   1.0000         .10000E-03   10000.    
    30 'Normalizat'    1.1523       1.0000         .10000E-01   10.000    
    31 'Prefactor '    .67084       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6650E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   4203.904     FROM MIGRAD    STATUS=CONVERGED    162 CALLS     3012 TOTAL
                     EDM=   .17E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  4.5%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     1.2238        2.7243       -.24032E-05    .82506E-04
   2  Prefactor     .10214E-03    28.124       -.51653E-05** at limit **
   3  Prefactor     .10000E-03    5.1441        .31455E-05** at limit **
   4  Prefactor     16.334        27.631        .40255E-04   -.70281E-02
   5  Prefactor     .10000E-03    3.8811       -.33631E-05** at limit **
   6  Prefactor     .10186E-03    14.423        .42749E-05** at limit **
   7  norm          .10000E-03    .30630       -.18954E-06** at limit **
   8  Prefactor     .13370        1.1498        .97334E-06   -.32366E-02
   9  norm          .10000E-03    3.9214       -.32193E-05** at limit **
  10  Prefactor     .10000E-03    10.074        .12182E-04** at limit **
  11  Prefactor     5.6625        5.4911        .10529E-04    .32671E-02
  12  Prefactor     3.1801        1.8495        .41344E-05    .94246E-03
  13  norm          .10001E-03    7.7398       -.37462E-05** at limit **
  14  Prefactor     .10000E-03    16.838        .26975E-05** at limit **
  15  Prefactor     6.7339        1.2351        .11544E-05   -.13705E-02
  16  Prefactor     13.968        20.267        .28291E-04    .50934E-02
  17  Prefactor     .10000E-03    8.1878       -.35277E-05** at limit **
  18  norm          10.410        1.6283       -.11038E-05   -.28236E-02
  19  Prefactor     .10000E-03    2.3187       -.43193E-05** at limit **
  20  Prefactor     .24794        3.3268       -.47127E-05   -.11030E-03
  21  Prefactor     .10000E-03    2.0082        .39675E-05** at limit **
  22  Prefactor     .10190E-03    15.704       -.13686E-04** at limit **
  23  norm          10.233        3.9903       -.11071E-05   -.24287E-03
  24  Prefactor     .10000E-03    4.1102        .27891E-05** at limit **
  25  norm          .10162E-03    25.016        .28443E-04** at limit **
  26  Prefactor     .10000E-03    11.254       -.57971E-05** at limit **
  27  Prefactor     .10000E-03    6.7480        .69954E-06** at limit **
  28  Prefactor     .10000E-03    1.6768       -.15617E-05** at limit **
  29  Prefactor     .21642E-03    1541.2        .13494E-03** at limit **
  30  Normalizat    1.1522        .19938        .18436E-05   -.17782E-03
  31  Prefactor     .67094        .24062       -.34246E-05   -.10423E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 1.22376
  Prefactor  = 0.000102141
  Prefactor  = 0.0001
  Prefactor  = 16.3335
  Prefactor  = 0.0001
  Prefactor  = 0.000101861
  norm       = 0.0001
  Prefactor  = 0.133705
  norm       = 0.0001
  Prefactor  = 0.000100001
  Prefactor  = 5.66246
  Prefactor  = 3.18014
  norm       = 0.000100011
  Prefactor  = 0.000100001
  Prefactor  = 6.73391
  Prefactor  = 13.9675
  Prefactor  = 0.000100002
  norm       = 10.4096
  Prefactor  = 0.0001
  Prefactor  = 0.247937
  Prefactor  = 0.0001
  Prefactor  = 0.000101902
  norm       = 10.2332
  Prefactor  = 0.0001
  norm       = 0.000101622
  Prefactor  = 0.000100001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.00021642
  Normalizat = 1.15218
  Prefactor  = 0.670939
 **********
 **   18 **HESSE 
 **********

 FCN=   4203.904     FROM HESSE     STATUS=OK           722 CALLS     3734 TOTAL
                     EDM=   .88E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     1.2238        2.8037        .10183E-01   -1.5487    
   2  Prefactor     .10214E-03    42.227        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .10000E-03    2.7844        .38760E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     16.334        43.776        .24707E-02   -1.4899    
   5  Prefactor     .10000E-03    3.7609        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10186E-03    37.928        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  norm          .10000E-03    .25093        .14655E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .13370        1.6813        .56433E-01   -1.5635    
   9  norm          .10000E-03    3.9081        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    1.4636        .46652E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     5.6625        5.6977        .42189E-02   -1.5232    
  12  Prefactor     3.1801        17.755        .56783E-02   -1.5351    
  13  norm          .10001E-03    15.618        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10000E-03    16.900        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     6.7339        8.1618        .38662E-02   -1.5189    
  16  Prefactor     13.968        27.541        .26789E-02   -1.4960    
  17  Prefactor     .10000E-03    15.322        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  norm          10.410        12.767        .31055E-02   -1.5063    
  19  Prefactor     .10000E-03    2.3131        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .24794        1.8014        .31282E-01   -1.5608    
  21  Prefactor     .10000E-03    1.9760        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     .10190E-03    40.689        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  norm          10.233        4.0073        .31315E-02   -1.5068    
  24  Prefactor     .10000E-03    3.9877        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  norm          .10162E-03    7.7278        .90712E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  Prefactor     .10000E-03    11.270        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  27  Prefactor     .10000E-03    6.4972        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  Prefactor     .10000E-03    1.6730        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  29  Prefactor     .21642E-03    56.516        .12469       -1.5706    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  30  Normalizat    1.1522        .18040        .36182E-01   -.88094    
  31  Prefactor     .67094        .20963        .66246E-01   -1.0468    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 8.79826e-07
Minuit parameter uncertainties:
  1  2.80404
  2  0.0190304
  3  1.27985e-05
  4  43.8621
  5  7.60504e-06
  6  0.0168137
  7  1.09846e-07
  8  0.947929
  9  9.73397e-06
  10  6.48768e-05
  11  5.69827
  12  15.0349
  13  0.000831814
  14  0.00023733
  15  8.16317
  16  27.5665
  17  0.000314593
  18  12.7702
  19  5.54622e-06
  20  1.33641
  21  1.01729e-05
  22  0.0176083
  23  4.00743
  24  6.86263e-06
  25  0.00708077
  26  0.00024705
  27  7.2557e-06
  28  3.45803e-06
  29  0.162382
  30  0.180495
  31  0.209877
Done.

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

Extracting fit parameters...

4FGL J0949.0+4038
   Spectrum: PowerLaw
323    Prefactor:  1.397e+01  2.757e+01  1.000e-04  1.000e+04 ( 1.000e-13)
324        Index:  2.608e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
325        Scale:  7.143e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
662    Prefactor:  6.709e-01  2.099e-01  0.000e+00  1.000e+01 ( 1.000e+00)
663        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
664        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
661   Normalization:  1.152e+00  1.805e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.35
Ra Dec: 147.262 40.637
Photon Flux Upper Limit: 9.36e-08 ph cm-2 s-1
Energy Flux Upper Limit: 7.33e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/520183/likelihoodResults_239587201_239846401_4FGL_J0949.0+4038_daily_bin1.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): 0
logL (Free Index) = 4203.82259429
delta logL = 0.0815777165108

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 4203.81523569
delta logL = 0.0889363094284

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    20.438       1.0000         .10000E-03   10000.    
     2 'Index     '    2.0693       1.0000          .0000       10.000    
     3 'Normalizat'    1.1602       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .66229       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6650E+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.

 FCN=   4203.815     FROM MIGRAD    STATUS=CONVERGED     78 CALLS      295 TOTAL
                     EDM=   .23E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     20.439        34.671        .88596E-04   -.42528E-03
   2  Index         2.0693        1.0708        .13465E-01   -.14408E-03
   3  Normalizat    1.1602        .19769        .18860E-03    .57770E-04
   4  Prefactor     .66239        .23989        .29475E-03    .38031E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 20.4392
  Index      = 2.06929
  Normalizat = 1.16016
  Prefactor  = 0.662395
 **********
 **   18 **HESSE 
 **********

 FCN=   4203.815     FROM HESSE     STATUS=OK            23 CALLS      318 TOTAL
                     EDM=   .24E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     20.439        34.555        .17719E-04   -1.4803    
   2  Index         2.0693        1.0675        .53859E-03   -.62629    
   3  Normalizat    1.1602        .19781        .37721E-04   -.87843    
   4  Prefactor     .66239        .24003        .11790E-04   -1.0502    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.41286e-09
Minuit parameter uncertainties:
  1  34.5887
  2  1.08026
  3  0.197934
  4  0.2404
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/520183': 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) = 4203.81523559
delta logL = 0.0889364127815

Extracting fit parameters...

4FGL J0949.0+4038
   Spectrum: PowerLaw
323    Prefactor:  2.044e+01  3.459e+01  1.000e-04  1.000e+04 ( 1.000e-13)
324        Index:  2.069e+00  1.080e+00  0.000e+00  1.000e+01 (-1.000e+00)
325        Scale:  7.143e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
662    Prefactor:  6.624e-01  2.404e-01  0.000e+00  1.000e+01 ( 1.000e+00)
663        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
664        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
661   Normalization:  1.160e+00  1.979e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.35
Ra Dec: 147.262 40.637

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/520183/cmap_HighResolution_239587201_239846401_4FGL_J0949.0+4038_daily_bin1.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='7.33e-03', job_status='DONE', photon_flux_upper_limit='9.36e-08', time_completed='2021-09-01 03:11:47.893738', job_id='520183', GAL2='0.66', fit_tolerance='1e-08', EG2='1.16', EG='1.15', time_epoch_completed='1630491107.89', return_code2='0', ts='0.35', comment='SUCCESS', return_code='0', GAL='0.67', dlogl='8.89e-02', ts2='0.52', photon_index_error='0.00', photon_index='2.61' WHERE bin_id='1' AND source_name='4FGL J0949.0+4038' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Wed Sep  1 03:11:47 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0035>
Subject: Job 520183: <4FGL_J0949.0+4038_daily_bin1> in cluster <slac> Done

Job <4FGL_J0949.0+4038_daily_bin1> was submitted from host <rhel6-64k> by user <kocevski> in cluster <slac> at Wed Sep  1 02:55:53 2021
Job was executed on host(s) <bullet0035>, in queue <medium>, as user <kocevski> in cluster <slac> at Wed Sep  1 02:55:54 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Wed Sep  1 02:55:54 2021
Terminated at Wed Sep  1 03:11:48 2021
Results reported at Wed Sep  1 03:11:48 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J0949.0+4038_daily_bin1 147.262 40.6367 239587201 239846401 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J0949.0+4038 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   699.06 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             282.11 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   954 sec.
    Turnaround time :                            955 sec.

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

