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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin707
RA = 160.15, Dec = 6.2848
tmin = 422582401, tmax = 422841601
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='65653', job_status='RUN', time_executed='2021-09-02 08:26:55.039500', time_epoch_executed='1630596415.04' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='707'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/65653

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/65653/ft1_4FGL_J1040.5+0617_daily_bin707.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/65653/ft2_4FGL_J1040.5+0617_daily_bin707.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/65653/ft1_4FGL_J1040.5+0617_daily_bin707.fits outfile=/scratch/kocevski/65653/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin707.fits ra=160.15 dec=6.2848 rad=12.0 tmin=422582401.0 tmax=422841601.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.65
user 3.29
sys 0.21

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/65653/ft1_filtered_4FGL_J1040.5+0617_daily_bin707.fits" evtable="EVENTS" scfile=/scratch/kocevski/65653/ft2_4FGL_J1040.5+0617_daily_bin707.fits sctable="SC_DATA" outfile=/scratch/kocevski/65653/ltcube_422582401_422841601_4FGL_J1040.5+0617_daily_bin707.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/65653/ft2_4FGL_J1040.5+0617_daily_bin707.fits
.....................!
real 15.46
user 14.69
sys 0.35

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/65653/ft1_filtered_4FGL_J1040.5+0617_daily_bin707.fits evtable="EVENTS" scfile=/scratch/kocevski/65653/ft2_4FGL_J1040.5+0617_daily_bin707.fits sctable="SC_DATA" expcube=/scratch/kocevski/65653/ltcube_422582401_422841601_4FGL_J1040.5+0617_daily_bin707.fits outfile=/scratch/kocevski/65653/expmap_422582401_422841601_4FGL_J1040.5+0617_daily_bin707.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/65653/ltcube_422582401_422841601_4FGL_J1040.5+0617_daily_bin707.fits
.....................!
real 194.04
user 188.95
sys 4.65

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/65653/ft1_filtered_4FGL_J1040.5+0617_daily_bin707.fits scfile=/scratch/kocevski/65653/ft2_4FGL_J1040.5+0617_daily_bin707.fits outfile=/scratch/kocevski/65653/cmap_422582401_422841601_4FGL_J1040.5+0617_daily_bin707.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.67
user 0.38
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/65653/ft1_filtered_4FGL_J1040.5+0617_daily_bin707.fits scfile=/scratch/kocevski/65653/ft2_4FGL_J1040.5+0617_daily_bin707.fits outfile=/scratch/kocevski/65653/cmap_HighResolution_422582401_422841601_4FGL_J1040.5+0617_daily_bin707.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.56
user 0.41
sys 0.14

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10145E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    33.816       1.0000         .10000E-03   10000.    
     3 'norm      '    16.491       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .12160E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    60.553       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .12451E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10608E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    1.5068       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10024E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    4.0955       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10007E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .19322E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .26427       1.0000         .10000E-03   10000.    
    14 'Prefactor '    11.801       1.0000         .10000E-03   10000.    
    15 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    .76567E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    5.4895       1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.0604       1.0000         .10000E-01   10.000    
    19 'Prefactor '    .96286       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=   6503.386     FROM MIGRAD    STATUS=CONVERGED    395 CALLS     1883 TOTAL
                     EDM=   .11E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  8.6%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    16.525       -.15534E-06** at limit **
   2  Prefactor     33.848        31.203        .11254E-05    .81844E-04
   3  norm          16.473        19.000       -.15314E-05   -.12120E-03
   4  Prefactor     .10000E-03    6.2674        .39583E-07** at limit **
   5  Prefactor     60.681        77.390        .27279E-05    .48718E-04
   6  Prefactor     .10000E-03    27.060        .65105E-06** at limit **
   7  Prefactor     .10000E-03    6.6235       -.20083E-06** at limit **
   8  norm          1.5071        .95179       -.15913E-07   -.21257E-03
   9  Prefactor     .10000E-03    4.7583       -.58418E-08** at limit **
  10  Prefactor     4.0899        2.6041       -.86326E-07   -.52498E-04
  11  Prefactor     .10000E-03    1.9261        .19464E-07** at limit **
  12  Prefactor     .10000E-03    10.654        .23670E-07** at limit **
  13  norm          .26459        .48496        .18779E-07   -.10196E-03
  14  Prefactor     11.782        9.5161       -.64284E-07   -.12530E-05
  15  norm          .10000E-03    .32821        .57056E-07** at limit **
  16  Prefactor     .10000E-03    65.300       -.89954E-05** at limit **
  17  norm          5.4881        9.6199        .45878E-06   -.96146E-04
  18  Normalizat    1.0608        .21412        .41295E-05   -.32914E-04
  19  Prefactor     .96236        .17675       -.39418E-05    .41869E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 33.8483
  norm       = 16.4734
  Prefactor  = 0.0001
  Prefactor  = 60.6807
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 1.50712
  Prefactor  = 0.0001
  Prefactor  = 4.08994
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.264587
  Prefactor  = 11.7821
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 5.48813
  Normalizat = 1.06076
  Prefactor  = 0.962356
 **********
 **   18 **HESSE 
 **********

 FCN=   6503.386     FROM HESSE     STATUS=OK           274 CALLS     2157 TOTAL
                     EDM=   .44E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    16.693        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     33.848        31.373        .68910E-04   -1.4544    
   3  norm          16.473        19.271        .98627E-04   -1.4896    
   4  Prefactor     .10000E-03    6.2870        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     60.681        78.768        .25781E-03   -1.4148    
   6  Prefactor     .10000E-03    27.002        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    6.6396        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          1.5071        .95160        .60501E-04   -1.5462    
   9  Prefactor     .10000E-03    4.8581        .17161E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     4.0899        2.6038        .99824E-04   -1.5303    
  11  Prefactor     .10000E-03    1.9330        .10928E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    11.070        .36285E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .26459        .44518        .59559E-03   -1.5605    
  14  Prefactor     11.782        9.3663        .11662E-03   -1.5021    
  15  norm          .10000E-03    .43066        .89646E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     .10000E-03    64.155        .53500E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          5.4881        9.6911        .85745E-03   -1.5239    
  18  Normalizat    1.0608        .21519        .25559E-03   -.91022    
  19  Prefactor     .96236        .17795        .22901E-03   -.93995    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.43618e-09
Minuit parameter uncertainties:
  1  2.92197e-05
  2  31.3882
  3  19.278
  4  5.3681e-05
  5  78.9034
  6  6.07784e-05
  7  3.66542e-05
  8  0.951605
  9  1.12585e-05
  10  2.60391
  11  1.74292e-07
  12  9.65109e-07
  13  0.445187
  14  9.36747
  15  1.63952e-06
  16  0.000159022
  17  9.69384
  18  0.215364
  19  0.178059
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  4.090e+00  2.604e+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

GAL_V02
   Spectrum: PowerLaw
533    Prefactor:  9.624e-01  1.781e-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.061e+00  2.154e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 8.63
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 4.94e-08 +/- 3.14e-08
Energy Flux (Fixed Index): 1.69e-05 +/- 1.08e-05

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) = 6502.59180114
delta logL = 0.794572874218

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6502.58546692
delta logL = 0.800907087765

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    3.8525       1.0000         .10000E-03   10000.    
     2 'Index     '    1.6776       1.0000          .0000       10.000    
     3 'Normalizat'    1.0923       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .94867       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=   6502.585     FROM MIGRAD    STATUS=CONVERGED     53 CALLS      211 TOTAL
                     EDM=   .32E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     3.8538        2.6958        .51401E-02   -.14872E-03
   2  Index         1.6779        .39177        .21298       -.51616E-04
   3  Normalizat    1.0923        .17313        .57063E-01    .10135E-04
   4  Prefactor     .94865        .14874        .45622E-01    .94114E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 3.85381
  Index      = 1.67787
  Normalizat = 1.09232
  Prefactor  = 0.948654
 **********
 **   18 **HESSE 
 **********

 FCN=   6502.585     FROM HESSE     STATUS=OK            33 CALLS      244 TOTAL
                     EDM=   .81E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     3.8538        3.0778        .10715E-03   -1.5315    
   2  Index         1.6779        .51332        .81660E-02   -.72673    
   3  Normalizat    1.0923        .20476        .25234E-03   -.89999    
   4  Prefactor     .94865        .17605        .23048E-03   -.94461    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 8.13981e-10
Minuit parameter uncertainties:
  1  3.07797
  2  0.514952
  3  0.204906
  4  0.176157
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/65653': 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) = 6502.58546678
delta logL = 0.800907231622

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  3.854e+00  3.078e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  1.678e+00  5.150e-01  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:  9.487e-01  1.762e-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.092e+00  2.049e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 10.23
Ra Dec: 160.150 6.285
Photon Index (Free Index): 1.68 +/- 0.51
Photon Flux (Free Index): 2.10e-08 +/- 2.19e-08
Energy Flux (Free Index): 3.68e-05 +/- 4.15e-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/65653/cmap_HighResolution_422582401_422841601_4FGL_J1040.5+0617_daily_bin707.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='4.94e-08', energy_flux2='3.68e-05', photon_flux_error='3.14e-08', dlogl='8.01e-01', energy_flux='1.69e-05', photon_flux2='2.10e-08', job_status='DONE', time_completed='2021-09-02 08:36:10.443557', photon_index_error2='0.51', photon_index2='1.68', ts='8.63', fit_tolerance='1e-08', GAL='0.96', photon_index_error='0.00', energy_flux_error2='4.15e-05', EG='1.06', time_epoch_completed='1630596970.44', return_code='0', job_id='65653', GAL2='0.95', EG2='1.09', return_code2='0', energy_flux_error='1.08e-05', photon_flux_error2='2.19e-08', ts2='10.23', photon_index='2.37' WHERE bin_id='707' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:36:10 PDT 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0181>
Subject: Job 65653: <4FGL_J1040.5+0617_daily_bin707> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin707> was submitted from host <rhel6-64k> by user <kocevski> in cluster <slac> at Thu Sep  2 08:21:16 2021
Job was executed on host(s) <bullet0181>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:23:55 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:23:55 2021
Terminated at Thu Sep  2 08:36:11 2021
Results reported at Thu Sep  2 08:36:11 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin707 160.15 6.2848 422582401 422841601 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 :                                   549.12 sec.
    Max Memory :                                 1093 MB
    Average Memory :                             273.48 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   738 sec.
    Turnaround time :                            895 sec.

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

