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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin546
RA = 160.15, Dec = 6.2848
tmin = 380851201, tmax = 381110401
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='65426', job_status='RUN', time_executed='2021-09-02 08:24:58.598628', time_epoch_executed='1630596298.6' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='546'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/65426

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/65426/ft1_4FGL_J1040.5+0617_daily_bin546.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/65426/ft2_4FGL_J1040.5+0617_daily_bin546.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/65426/ft1_4FGL_J1040.5+0617_daily_bin546.fits outfile=/scratch/kocevski/65426/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin546.fits ra=160.15 dec=6.2848 rad=12.0 tmin=380851201.0 tmax=381110401.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.46
user 3.24
sys 0.21

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/65426/ft2_4FGL_J1040.5+0617_daily_bin546.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/65426/ft2_4FGL_J1040.5+0617_daily_bin546.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/65426/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin546.fits evtable="EVENTS" outfile="/scratch/kocevski/65426/ft1_filtered_4FGL_J1040.5+0617_daily_bin546.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.34
sys 0.14

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/65426/ft1_filtered_4FGL_J1040.5+0617_daily_bin546.fits" evtable="EVENTS" scfile=/scratch/kocevski/65426/ft2_4FGL_J1040.5+0617_daily_bin546.fits sctable="SC_DATA" outfile=/scratch/kocevski/65426/ltcube_380851201_381110401_4FGL_J1040.5+0617_daily_bin546.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/65426/ft2_4FGL_J1040.5+0617_daily_bin546.fits
.....................!
real 13.53
user 13.15
sys 0.32

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/65426/ft1_filtered_4FGL_J1040.5+0617_daily_bin546.fits evtable="EVENTS" scfile=/scratch/kocevski/65426/ft2_4FGL_J1040.5+0617_daily_bin546.fits sctable="SC_DATA" expcube=/scratch/kocevski/65426/ltcube_380851201_381110401_4FGL_J1040.5+0617_daily_bin546.fits outfile=/scratch/kocevski/65426/expmap_380851201_381110401_4FGL_J1040.5+0617_daily_bin546.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/65426/ltcube_380851201_381110401_4FGL_J1040.5+0617_daily_bin546.fits
.....................!
real 191.80
user 186.79
sys 4.58

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

Setting source of interest to:
4FGL J1040.5+0617 @ 160.15 6.2848

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/65426/ft1_filtered_4FGL_J1040.5+0617_daily_bin546.fits scfile=/scratch/kocevski/65426/ft2_4FGL_J1040.5+0617_daily_bin546.fits outfile=/scratch/kocevski/65426/cmap_380851201_381110401_4FGL_J1040.5+0617_daily_bin546.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=160.15 yref=6.2848 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.37
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/65426/ft1_filtered_4FGL_J1040.5+0617_daily_bin546.fits scfile=/scratch/kocevski/65426/ft2_4FGL_J1040.5+0617_daily_bin546.fits outfile=/scratch/kocevski/65426/cmap_HighResolution_380851201_381110401_4FGL_J1040.5+0617_daily_bin546.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=160.15 yref=6.2848 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.55
user 0.38
sys 0.15

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/65426/ft1_filtered_4FGL_J1040.5+0617_daily_bin546.fits evtable="EVENTS" scfile=/scratch/kocevski/65426/ft2_4FGL_J1040.5+0617_daily_bin546.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/65426/Model_4FGL_J1040.5+0617_daily_bin546.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/65426/ft1_filtered_4FGL_J1040.5+0617_daily_bin546.fits....................!
real 61.99
user 60.54
sys 1.18

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/65426/ft1_filtered_4FGL_J1040.5+0617_daily_bin546.fits', '/scratch/kocevski/65426/ft2_4FGL_J1040.5+0617_daily_bin546.fits', expMap='/scratch/kocevski/65426/expmap_380851201_381110401_4FGL_J1040.5+0617_daily_bin546.fits', expCube='/scratch/kocevski/65426/ltcube_380851201_381110401_4FGL_J1040.5+0617_daily_bin546.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/65426/Model_4FGL_J1040.5+0617_daily_bin546.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1040.5+0617'

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  2.877e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.368e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
218        Scale:  8.643e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/65426/ft1_filtered_4FGL_J1040.5+0617_daily_bin546.fits
Spacecraft file(s): /scratch/kocevski/65426/ft2_4FGL_J1040.5+0617_daily_bin546.fits
Exposure map: /scratch/kocevski/65426/expmap_380851201_381110401_4FGL_J1040.5+0617_daily_bin546.fits
Exposure cube: /scratch/kocevski/65426/ltcube_380851201_381110401_4FGL_J1040.5+0617_daily_bin546.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/65426/Model_4FGL_J1040.5+0617_daily_bin546.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) = 6688.29087701

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10024E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    .10117E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10067E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    33.839       1.0000         .10000E-03   10000.    
     6 'Prefactor '    3.9403       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10530E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    .75731       1.0000         .10000E-03   10000.    
     9 'Prefactor '    3.7458       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .11833E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .63896E-02   1.0000         .10000E-03   10000.    
    12 'Prefactor '    5.0434       1.0000         .10000E-03   10000.    
    13 'norm      '    .60548       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .63388E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    .10727E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    .10006E-03   1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.0508       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.1056       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5360E+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=   6688.266     FROM MIGRAD    STATUS=CONVERGED    716 CALLS     2533 TOTAL
                     EDM=   .63E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    5.7674        .18142E-02** at limit **
   2  Prefactor     .10000E-03    17.457        .18142E-02** at limit **
   3  norm          .10000E-03    9.0098        .18142E-02** at limit **
   4  Prefactor     .10000E-03    6.7679        .18142E-02** at limit **
   5  Prefactor     33.800        58.045        .68887E-04   -.18154E-05
   6  Prefactor     3.9642        85.003        .20322E-03   -.21818E-05
   7  Prefactor     .10000E-03    32.362        .36285E-03** at limit **
   8  norm          .75726        .85729        .86733E-03    .41304E-03
   9  Prefactor     3.7456        3.9392        .80501E-03    .49725E-04
  10  Prefactor     .10000E-03    18.929        .18023E-02** at limit **
  11  Prefactor     .10006E-03    8.8640        .53396E-01** at limit **
  12  Prefactor     5.0420        8.3083        .89526E-03    .12046E-03
  13  norm          .60550        .47743        .47675E-04   -.71562E-03
  14  Prefactor     .10001E-03    71.588        .40228E-02** at limit **
  15  norm          .10000E-03    6.8170        .12201E-02** at limit **
  16  Prefactor     .10000E-03    11.181        .18142E-02** at limit **
  17  norm          .10000E-03    6.5808        .18142E-02** at limit **
  18  Normalizat    1.0508        .22771        .26171E-03   -.87662E-04
  19  Prefactor     1.1055        .18852        .22299E-03   -.16824E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 33.8004
  Prefactor  = 3.96415
  Prefactor  = 0.000100002
  norm       = 0.757258
  Prefactor  = 3.74564
  Prefactor  = 0.000100005
  Prefactor  = 0.000100062
  Prefactor  = 5.04198
  norm       = 0.605499
  Prefactor  = 0.000100005
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Normalizat = 1.05085
  Prefactor  = 1.10549
 **********
 **   18 **HESSE 
 **********

 FCN=   6688.266     FROM HESSE     STATUS=OK           266 CALLS     2799 TOTAL
                     EDM=   .62E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    5.7684        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    17.458        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .10000E-03    9.0105        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    6.7684        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     33.800        58.003        .27555E-05   -1.4545    
   6  Prefactor     3.9642        84.823        .81288E-05   -1.5310    
   7  Prefactor     .10000E-03    32.362        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .75726        .85700        .34693E-04   -1.5534    
   9  Prefactor     3.7456        3.9386        .32200E-04   -1.5321    
  10  Prefactor     .10000E-03    19.338        .36046E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10006E-03    7.6897        .58296E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     5.0420        8.2949        .35810E-04   -1.5259    
  13  norm          .60550        .47523        .19070E-05   -1.5552    
  14  Prefactor     .10001E-03    73.623        .16091E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          .10000E-03    6.8864        .24402E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     .10000E-03    11.182        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .10000E-03    6.5827        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    1.0508        .22779        .10468E-04   -.91346    
  19  Prefactor     1.1055        .18874        .89196E-05   -.89291    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.18686e-10
Minuit parameter uncertainties:
  1  4.34238e-05
  2  4.79113e-05
  3  0.000109059
  4  2.15761e-05
  5  58.1004
  6  36.7331
  7  0.000543861
  8  0.857016
  9  3.93885
  10  0.000598596
  11  0.00138372
  12  8.29675
  13  0.475236
  14  0.00126918
  15  7.57821e-05
  16  1.94488e-06
  17  7.86099e-06
  18  0.228001
  19  0.188851
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.000e-04  5.986e-04  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.368e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
218        Scale:  8.643e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
533    Prefactor:  1.105e+00  1.889e-01  0.000e+00  1.000e+01 ( 1.000e+00)
534        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
535        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
532   Normalization:  1.051e+00  2.280e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 160.150 6.285
Photon Flux Upper Limit: 8.00e-08 ph cm-2 s-1
Energy Flux Upper Limit: 6.17e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/65426/likelihoodResults_380851201_381110401_4FGL_J1040.5+0617_daily_bin546.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) = 6688.26609678
delta logL = -0.000252942249062

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 6688.26575183
delta logL = 9.20053462323e-05

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .34861E-02   1.0000         .10000E-03   10000.    
     2 'Index     '    2.5102       1.0000          .0000       10.000    
     3 'Normalizat'    1.0508       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1056       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5360E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   6688.245     FROM MIGRAD    STATUS=CONVERGED     90 CALLS      269 TOTAL
                     EDM=   .56E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .26020        4.7050        .27712E-01    .14827E-02
   2  Index         2.9622        .92404        .50000       -.51821E-04
   3  Normalizat    1.0427        .10293E-01    .59382E-01    .13961E-03
   4  Prefactor     1.1084        .90120E-02    .37378E-01    .42772E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.260197
  Index      = 2.96217
  Normalizat = 1.04267
  Prefactor  = 1.10841
 **********
 **   18 **HESSE 
 **********

 FCN=   6688.245     FROM HESSE     STATUS=OK            33 CALLS      302 TOTAL
                     EDM=   .74E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .26020        3.9381        .15126E-02   -1.5606    
   2  Index         2.9622        2.6042        .71045E-02   -.41979    
   3  Normalizat    1.0427        .21721        .26261E-03   -.91614    
   4  Prefactor     1.1084        .18705        .22272E-03   -.89198    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 7.44344e-08
Minuit parameter uncertainties:
  1  2.0243
  2  2.77124
  3  0.217393
  4  0.187163
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/65426': 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) = 6688.24536749
delta logL = 0.0204763497904

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  2.602e-01  2.024e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.962e+00  2.771e+00  0.000e+00  1.000e+01 (-1.000e+00)
218        Scale:  8.643e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
533    Prefactor:  1.108e+00  1.872e-01  0.000e+00  1.000e+01 ( 1.000e+00)
534        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
535        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
532   Normalization:  1.043e+00  2.174e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 160.150 6.285

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/65426/cmap_HighResolution_380851201_381110401_4FGL_J1040.5+0617_daily_bin546.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='6.17e-03', job_status='DONE', photon_flux_upper_limit='8.00e-08', time_completed='2021-09-02 08:35:48.212315', job_id='65426', GAL2='1.11', fit_tolerance='1e-08', EG2='1.04', EG='1.05', time_epoch_completed='1630596948.21', return_code2='0', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.11', dlogl='2.05e-02', ts2='0.04', photon_index_error='0.00', photon_index='2.37' WHERE bin_id='546' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:35:48 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0159>
Subject: Job 65426: <4FGL_J1040.5+0617_daily_bin546> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin546> was submitted from host <rhel6-64k> by user <kocevski> in cluster <slac> at Thu Sep  2 08:21:00 2021
Job was executed on host(s) <bullet0159>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:21:09 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Thu Sep  2 08:21:09 2021
Terminated at Thu Sep  2 08:35:48 2021
Results reported at Thu Sep  2 08:35:48 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin546 160.15 6.2848 380851201 381110401 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1040.5+0617 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   644.00 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             274.07 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   879 sec.
    Turnaround time :                            888 sec.

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

