/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 36 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 = 7667
number of fields = 27
No RA_SUN column yet. Adding RA_SUN/DEC_SUN columns.
Done.


Performing analysis on: 4FGL_J1040.5+0617_daily_bin191
RA = 160.15, Dec = 6.2848
tmin = 288835201, tmax = 289094401
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='60977', job_status='RUN', time_executed='2021-09-02 08:09:10.653784', time_epoch_executed='1630595350.65' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='191'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/60977

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

Retrieving the FT1 file...

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

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

Retrieving 48 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/60977/ft1_4FGL_J1040.5+0617_daily_bin191.fits


Retrieving the FT1 file...

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

Retrieving 48 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/60977/ft2_4FGL_J1040.5+0617_daily_bin191.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/60977/ft1_4FGL_J1040.5+0617_daily_bin191.fits outfile=/scratch/kocevski/60977/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin191.fits ra=160.15 dec=6.2848 rad=12.0 tmin=288835201.0 tmax=289094401.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.63
user 3.38
sys 0.23

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/60977/ft2_4FGL_J1040.5+0617_daily_bin191.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/60977/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin191.fits evtable="EVENTS" outfile="/scratch/kocevski/60977/ft1_filtered_4FGL_J1040.5+0617_daily_bin191.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.51
user 0.32
sys 0.16

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/60977/ft1_filtered_4FGL_J1040.5+0617_daily_bin191.fits" evtable="EVENTS" scfile=/scratch/kocevski/60977/ft2_4FGL_J1040.5+0617_daily_bin191.fits sctable="SC_DATA" outfile=/scratch/kocevski/60977/ltcube_288835201_289094401_4FGL_J1040.5+0617_daily_bin191.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/60977/ft2_4FGL_J1040.5+0617_daily_bin191.fits
.....................!
real 12.22
user 11.82
sys 0.36

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/60977/ft1_filtered_4FGL_J1040.5+0617_daily_bin191.fits evtable="EVENTS" scfile=/scratch/kocevski/60977/ft2_4FGL_J1040.5+0617_daily_bin191.fits sctable="SC_DATA" expcube=/scratch/kocevski/60977/ltcube_288835201_289094401_4FGL_J1040.5+0617_daily_bin191.fits outfile=/scratch/kocevski/60977/expmap_288835201_289094401_4FGL_J1040.5+0617_daily_bin191.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/60977/ltcube_288835201_289094401_4FGL_J1040.5+0617_daily_bin191.fits
.....................!
real 191.91
user 185.68
sys 5.69

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/60977/ft1_filtered_4FGL_J1040.5+0617_daily_bin191.fits scfile=/scratch/kocevski/60977/ft2_4FGL_J1040.5+0617_daily_bin191.fits outfile=/scratch/kocevski/60977/cmap_288835201_289094401_4FGL_J1040.5+0617_daily_bin191.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.54
user 0.36
sys 0.17

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/60977/ft1_filtered_4FGL_J1040.5+0617_daily_bin191.fits scfile=/scratch/kocevski/60977/ft2_4FGL_J1040.5+0617_daily_bin191.fits outfile=/scratch/kocevski/60977/cmap_HighResolution_288835201_289094401_4FGL_J1040.5+0617_daily_bin191.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.57
user 0.39
sys 0.17

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    17.518       1.0000         .10000E-03   10000.    
     2 'Prefactor '    13.501       1.0000         .10000E-03   10000.    
     3 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10006E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    137.31       1.0000         .10000E-03   10000.    
     6 'Prefactor '    28.862       1.0000         .10000E-03   10000.    
     7 'Prefactor '    2.4698       1.0000         .10000E-03   10000.    
     8 'norm      '    .10039E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    3.2546       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10008E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    5.8339       1.0000         .10000E-03   10000.    
    13 'norm      '    .83664       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10006E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    23.348       1.0000         .10000E-03   10000.    
    17 'norm      '    .15615E-02   1.0000         .10000E-03   10000.    
    18 'Normalizat'    .89494       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.3641       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=   7348.870     FROM MIGRAD    STATUS=CONVERGED    390 CALLS     1891 TOTAL
                     EDM=   .41E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.9%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     17.527        13.724        .32456E-06    .44357E-04
   2  Prefactor     13.521        33.082        .35151E-05    .41279E-04
   3  norm          .10000E-03    6.1925       -.43748E-06** at limit **
   4  Prefactor     .10000E-03    3.6883       -.13798E-05** at limit **
   5  Prefactor     137.27        74.150       -.55434E-05   -.65138E-04
   6  Prefactor     28.721        71.906        .94148E-05   -.67884E-04
   7  Prefactor     2.5296        55.348       -.26698E-04   -.10353E-03
   8  norm          .10000E-03    .78760        .37115E-07** at limit **
   9  Prefactor     .10000E-03    2.9763        .18416E-06** at limit **
  10  Prefactor     3.2570        5.1781        .52823E-06    .96121E-04
  11  Prefactor     .10000E-03    2.3821        .64849E-07** at limit **
  12  Prefactor     5.8307        11.793       -.62141E-06    .15923E-04
  13  norm          .83671        .51805       -.44884E-07   -.47738E-04
  14  Prefactor     .10000E-03    5.9405       -.12712E-06** at limit **
  15  norm          .10000E-03    .35530        .51283E-07** at limit **
  16  Prefactor     23.363        21.606       -.85764E-06    .27827E-04
  17  norm          .10002E-03    5.8119       -.12599E-05** at limit **
  18  Normalizat    .89488        .19900        .46828E-05    .31385E-04
  19  Prefactor     1.3641        .16065       -.17893E-05    .40854E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 17.5268
  Prefactor  = 13.5215
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 137.271
  Prefactor  = 28.7214
  Prefactor  = 2.52964
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 3.257
  Prefactor  = 0.0001
  Prefactor  = 5.83069
  norm       = 0.836705
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 23.3632
  norm       = 0.000100024
  Normalizat = 0.894879
  Prefactor  = 1.36409
 **********
 **   18 **HESSE 
 **********

 FCN=   7348.870     FROM HESSE     STATUS=OK           270 CALLS     2161 TOTAL
                     EDM=   .16E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     17.527        13.728        .95693E-04   -1.4870    
   2  Prefactor     13.521        33.102        .10901E-03   -1.4972    
   3  norm          .10000E-03    6.1948        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    3.6784        .16029E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     137.27        74.148        .17186E-03   -1.3359    
   6  Prefactor     28.721        72.242        .74574E-04   -1.4636    
   7  Prefactor     2.5296        56.093        .26019E-03   -1.5390    
   8  norm          .10000E-03    1.5754        .14609E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .10000E-03    3.0126        .14433E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     3.2570        5.0751        .20140E-03   -1.5347    
  11  Prefactor     .10000E-03    2.3979        .12918E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     5.8307        11.518        .16627E-03   -1.5225    
  13  norm          .83671        .51018        .45133E-04   -1.5525    
  14  Prefactor     .10000E-03    5.9716        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          .10000E-03    .36166        .49854E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     23.363        21.613        .82898E-04   -1.4741    
  17  norm          .10002E-03    26.236        .39880E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    .89488        .22957        .30801E-03   -.96640    
  19  Prefactor     1.3641        .18766        .22464E-03   -.81421    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.58231e-09
Minuit parameter uncertainties:
  1  13.7302
  2  33.1466
  3  2.62323e-05
  4  3.79736e-05
  5  74.198
  6  72.4635
  7  23.8489
  8  2.82176e-05
  9  1.35742e-05
  10  5.07575
  11  6.43414e-06
  12  11.5221
  13  0.510186
  14  1.55656e-05
  15  1.42038e-06
  16  21.6203
  17  0.00159427
  18  0.229825
  19  0.187757
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  3.257e+00  5.076e+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:  1.364e+00  1.878e-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:  8.949e-01  2.298e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.56
Ra Dec: 160.150 6.285
Photon Flux Upper Limit: 1.48e-07 ph cm-2 s-1
Energy Flux Upper Limit: 1.14e-02 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/60977/likelihoodResults_288835201_289094401_4FGL_J1040.5+0617_daily_bin191.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) = 7347.63679938
delta logL = 1.23353645404

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 7347.61684398
delta logL = 1.25349185662

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    1.4810       1.0000         .10000E-03   10000.    
     2 'Index     '    3.5098       1.0000          .0000       10.000    
     3 'Normalizat'    .80681       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.4094       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=   7347.617     FROM MIGRAD    STATUS=CONVERGED     56 CALLS      254 TOTAL
                     EDM=   .90E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     1.4787        12.882        .88168E-02    .68973E-03
   2  Index         3.5107        2.5057        .12890        .14368E-03
   3  Normalizat    .80686        .52641E-01    .72829E-01   -.33524E-05
   4  Prefactor     1.4094        .46466E-01    .50082E-01   -.24282E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 1.47871
  Index      = 3.5107
  Normalizat = 0.806856
  Prefactor  = 1.4094
 **********
 **   18 **HESSE 
 **********

 FCN=   7347.617     FROM HESSE     STATUS=OK            33 CALLS      287 TOTAL
                     EDM=   .51E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     1.4787        4.5092        .61481E-04   -1.5465    
   2  Index         3.5107        1.6208        .47316E-02   -.30245    
   3  Normalizat    .80686        .22228        .32230E-03   -.99815    
   4  Prefactor     1.4094        .19111        .22140E-03   -.80110    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 5.09297e-08
Minuit parameter uncertainties:
  1  4.51019
  2  1.65373
  3  0.222532
  4  0.191209
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/60977': 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) = 7347.6168434
delta logL = 1.25349243547

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.479e+00  4.510e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  3.511e+00  1.654e+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.409e+00  1.912e-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:  8.069e-01  2.225e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 3.31
Ra Dec: 160.150 6.285
Photon Index (Free Index): 3.51 +/- 1.65
Photon Flux (Free Index): 1.15e-07 +/- 7.44e-08
Energy Flux (Free Index): 1.90e-05 +/- 1.56e-05

Creating a high resolution counts map...
INFO: Auto-setting vmin to -1.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  1.110e+00 [aplpy.core]
Saving /scratch/kocevski/60977/cmap_HighResolution_288835201_289094401_4FGL_J1040.5+0617_daily_bin191.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.14e-02', comment='SUCCESS', energy_flux2='1.90e-05', dlogl='1.25e+00', photon_flux2='1.15e-07', job_status='DONE', time_completed='2021-09-02 08:19:43.130759', photon_index_error2='1.65', photon_index2='3.51', ts='0.56', fit_tolerance='1e-08', GAL='1.36', photon_index_error='0.00', photon_flux_upper_limit='1.48e-07', energy_flux_error2='1.56e-05', EG='0.89', time_epoch_completed='1630595983.13', return_code='0', job_id='60977', GAL2='1.41', EG2='0.81', return_code2='0', photon_flux_error2='7.44e-08', ts2='3.31', photon_index='2.37' WHERE bin_id='191' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:19:43 PDT 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0284>
Subject: Job 60977: <4FGL_J1040.5+0617_daily_bin191> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin191> was submitted from host <rhel6-64k> by user <kocevski> in cluster <slac> at Thu Sep  2 08:06:23 2021
Job was executed on host(s) <bullet0284>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:08:25 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:08:25 2021
Terminated at Thu Sep  2 08:19:43 2021
Results reported at Thu Sep  2 08:19:43 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin191 160.15 6.2848 288835201 289094401 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 :                                   629.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             299.46 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   679 sec.
    Turnaround time :                            800 sec.

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

