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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin955
RA = 160.15, Dec = 6.2848
tmin = 486864001, tmax = 487123201
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='66972', job_status='RUN', time_executed='2021-09-02 08:29:23.199947', time_epoch_executed='1630596563.2' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='955'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/66972

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/66972/ft1_4FGL_J1040.5+0617_daily_bin955.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/66972/ft2_4FGL_J1040.5+0617_daily_bin955.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/66972/ft1_4FGL_J1040.5+0617_daily_bin955.fits outfile=/scratch/kocevski/66972/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin955.fits ra=160.15 dec=6.2848 rad=12.0 tmin=486864001.0 tmax=487123201.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.48
user 3.28
sys 0.18

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/66972/ft2_4FGL_J1040.5+0617_daily_bin955.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/66972/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin955.fits evtable="EVENTS" outfile="/scratch/kocevski/66972/ft1_filtered_4FGL_J1040.5+0617_daily_bin955.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.50
user 0.34
sys 0.15

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/66972/ft1_filtered_4FGL_J1040.5+0617_daily_bin955.fits" evtable="EVENTS" scfile=/scratch/kocevski/66972/ft2_4FGL_J1040.5+0617_daily_bin955.fits sctable="SC_DATA" outfile=/scratch/kocevski/66972/ltcube_486864001_487123201_4FGL_J1040.5+0617_daily_bin955.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/66972/ft2_4FGL_J1040.5+0617_daily_bin955.fits
.....................!
real 12.73
user 12.34
sys 0.33

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/66972/ft1_filtered_4FGL_J1040.5+0617_daily_bin955.fits evtable="EVENTS" scfile=/scratch/kocevski/66972/ft2_4FGL_J1040.5+0617_daily_bin955.fits sctable="SC_DATA" expcube=/scratch/kocevski/66972/ltcube_486864001_487123201_4FGL_J1040.5+0617_daily_bin955.fits outfile=/scratch/kocevski/66972/expmap_486864001_487123201_4FGL_J1040.5+0617_daily_bin955.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/66972/ltcube_486864001_487123201_4FGL_J1040.5+0617_daily_bin955.fits
.....................!
real 190.87
user 185.93
sys 4.37

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/66972/ft1_filtered_4FGL_J1040.5+0617_daily_bin955.fits scfile=/scratch/kocevski/66972/ft2_4FGL_J1040.5+0617_daily_bin955.fits outfile=/scratch/kocevski/66972/cmap_486864001_487123201_4FGL_J1040.5+0617_daily_bin955.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.61
user 0.38
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/66972/ft1_filtered_4FGL_J1040.5+0617_daily_bin955.fits scfile=/scratch/kocevski/66972/ft2_4FGL_J1040.5+0617_daily_bin955.fits outfile=/scratch/kocevski/66972/cmap_HighResolution_486864001_487123201_4FGL_J1040.5+0617_daily_bin955.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.62
user 0.41
sys 0.13

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

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/66972/ft1_filtered_4FGL_J1040.5+0617_daily_bin955.fits', '/scratch/kocevski/66972/ft2_4FGL_J1040.5+0617_daily_bin955.fits', expMap='/scratch/kocevski/66972/expmap_486864001_487123201_4FGL_J1040.5+0617_daily_bin955.fits', expCube='/scratch/kocevski/66972/ltcube_486864001_487123201_4FGL_J1040.5+0617_daily_bin955.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/66972/Model_4FGL_J1040.5+0617_daily_bin955.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/66972/ft1_filtered_4FGL_J1040.5+0617_daily_bin955.fits
Spacecraft file(s): /scratch/kocevski/66972/ft2_4FGL_J1040.5+0617_daily_bin955.fits
Exposure map: /scratch/kocevski/66972/expmap_486864001_487123201_4FGL_J1040.5+0617_daily_bin955.fits
Exposure cube: /scratch/kocevski/66972/ltcube_486864001_487123201_4FGL_J1040.5+0617_daily_bin955.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/66972/Model_4FGL_J1040.5+0617_daily_bin955.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) = 6334.45205374

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

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 '    36.176       1.0000         .10000E-03   10000.    
     3 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    23.823       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    5.3964       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    10.838       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10268E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .85726       1.0000         .10000E-03   10000.    
    14 'Prefactor '    3.4577       1.0000         .10000E-03   10000.    
    15 'norm      '    1.7959       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .12516E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    6.4109       1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.2290       1.0000         .10000E-01   10.000    
    19 'Prefactor '    .78231       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.

 FCN=   6334.450     FROM MIGRAD    STATUS=CONVERGED    376 CALLS     1836 TOTAL
                     EDM=   .16E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.1%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    4.4170        .15913E-06** at limit **
   2  Prefactor     36.178        38.394        .16783E-05   -.42324E-04
   3  norm          .10000E-03    4.3200       -.21150E-06** at limit **
   4  Prefactor     .10000E-03    4.3720       -.59089E-06** at limit **
   5  Prefactor     .10000E-03    25.730        .90327E-06** at limit **
   6  Prefactor     23.833        36.684        .14325E-04   -.29535E-03
   7  Prefactor     .10000E-03    10.624       -.74841E-06** at limit **
   8  norm          5.3969        1.7544       -.41740E-07   -.12271E-03
   9  Prefactor     .10000E-03    4.9295        .18787E-06** at limit **
  10  Prefactor     .10000E-03    .70905        .42611E-06** at limit **
  11  Prefactor     10.841        8.2687        .25737E-06   -.90983E-04
  12  Prefactor     .10000E-03    6.9725        .10015E-06** at limit **
  13  norm          .85719        .61316        .66729E-07   -.26356E-03
  14  Prefactor     3.4552        10.477       -.50945E-06   -.21387E-03
  15  norm          1.7958        1.1917        .12032E-06   -.11902E-03
  16  Prefactor     .10000E-03    31.553        .22678E-05** at limit **
  17  norm          6.4110        8.3812       -.15921E-05   -.13805E-02
  18  Normalizat    1.2287        .18318       -.34491E-06   -.31294E-04
  19  Prefactor     .78250        .14881       -.15134E-05    .41908E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 36.178
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 23.8332
  Prefactor  = 0.000100001
  norm       = 5.39693
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 10.8407
  Prefactor  = 0.0001
  norm       = 0.857192
  Prefactor  = 3.45523
  norm       = 1.79585
  Prefactor  = 0.0001
  norm       = 6.41099
  Normalizat = 1.22867
  Prefactor  = 0.782501
 **********
 **   18 **HESSE 
 **********

 FCN=   6334.450     FROM HESSE     STATUS=OK           266 CALLS     2102 TOTAL
                     EDM=   .33E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    4.4266        .16334E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     36.178        38.357        .66631E-04   -1.4504    
   3  norm          .10000E-03    4.3233        .16157E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    4.4044        .16282E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    25.735        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     23.833        35.099        .82068E-04   -1.4731    
   7  Prefactor     .10000E-03    10.694        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          5.3969        1.7543        .57209E-04   -1.5243    
   9  Prefactor     .10000E-03    5.0343        .17244E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    .71186        .65378E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     10.841        8.2925        .12170E-03   -1.5049    
  12  Prefactor     .10000E-03    7.0852        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .85719        .60675        .42898E-04   -1.5523    
  14  Prefactor     3.4552        10.403        .21749E-03   -1.5336    
  15  norm          1.7958        1.1951        .67832E-04   -1.5440    
  16  Prefactor     .10000E-03    31.956        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          6.4110        9.0399        .79258E-03   -1.5202    
  18  Normalizat    1.2287        .21452        .24359E-03   -.85721    
  19  Prefactor     .78250        .17329        .24883E-03   -1.0038    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.25219e-09
Minuit parameter uncertainties:
  1  1.37752e-05
  2  38.3831
  3  4.27277e-06
  4  7.95119e-05
  5  0.000164549
  6  35.129
  7  0.00019247
  8  1.75431
  9  9.11085e-06
  10  4.3199e-06
  11  8.29339
  12  1.9025e-05
  13  0.606751
  14  10.4089
  15  1.1951
  16  6.58644e-05
  17  9.04179
  18  0.214676
  19  0.173412
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.000e-04  4.320e-06  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:  7.825e-01  1.734e-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.229e+00  2.147e-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: 4.51e-08 ph cm-2 s-1
Energy Flux Upper Limit: 3.48e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/66972/likelihoodResults_486864001_487123201_4FGL_J1040.5+0617_daily_bin955.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) = 6334.45019989
delta logL = -0.000206268150578

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 6334.44999285
delta logL = 7.72767634771e-07

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.3445       1.0000          .0000       10.000    
     3 'Normalizat'    1.2286       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .78253       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=   6334.450     FROM MIGRAD    STATUS=CONVERGED     65 CALLS      220 TOTAL
                     EDM=   .13E-10    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    4.6607        .90712E-02** at limit **
   2  Index         1.9526        7.6697        .50000       -.25680E-06
   3  Normalizat    1.2287        .11167E-01    .55087E-01    .11554E-03
   4  Prefactor     .78250        .93703E-02    .43489E-01    .12041E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 1.95259
  Normalizat = 1.22867
  Prefactor  = 0.7825
 **********
 **   18 **HESSE 
 **********

 FCN=   6334.450     FROM HESSE     STATUS=NOT POSDEF    31 CALLS      251 TOTAL
                     EDM=   .19E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    67.782        .69220E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         1.9526        6.9869        .50000       -.65541    
   3  Normalizat    1.2287        .47200E-01    .24359E-03   -.85721    
   4  Prefactor     .78250        .39608E-01    .24883E-03   -1.0038    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 1.88805e-10
Minuit parameter uncertainties:
  1  7.49313e-05
  2  519.701
  3  0.0472017
  4  0.0396098
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/66972': 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) = 6334.4499863
delta logL = 7.3223891377e-06

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.000e-04  7.493e-05  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  1.953e+00  5.197e+02  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:  7.825e-01  3.961e-02  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.229e+00  4.720e-02  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/66972/cmap_HighResolution_486864001_487123201_4FGL_J1040.5+0617_daily_bin955.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='3.48e-03', job_status='DONE', photon_flux_upper_limit='4.51e-08', time_completed='2021-09-02 08:39:03.214292', job_id='66972', GAL2='0.78', fit_tolerance='1e-08', EG2='1.23', EG='1.23', time_epoch_completed='1630597143.21', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.78', dlogl='7.32e-06', ts2='-0.00', photon_index_error='0.00', photon_index='2.37' WHERE bin_id='955' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:39:03 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0114>
Subject: Job 66972: <4FGL_J1040.5+0617_daily_bin955> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin955> was submitted from host <rhel6-64l> by user <kocevski> in cluster <slac> at Thu Sep  2 08:26:39 2021
Job was executed on host(s) <bullet0114>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:26:48 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:26:48 2021
Terminated at Thu Sep  2 08:39:04 2021
Results reported at Thu Sep  2 08:39:04 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin955 160.15 6.2848 486864001 487123201 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 :                                   569.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             308.57 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   735 sec.
    Turnaround time :                            745 sec.

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

