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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin256
RA = 160.15, Dec = 6.2848
tmin = 305683201, tmax = 305942401
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='62819', job_status='RUN', time_executed='2021-09-02 08:12:31.880612', time_epoch_executed='1630595551.88' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='256'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/62819

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/62819/ft1_4FGL_J1040.5+0617_daily_bin256.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/62819/ft2_4FGL_J1040.5+0617_daily_bin256.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/62819/ft1_4FGL_J1040.5+0617_daily_bin256.fits outfile=/scratch/kocevski/62819/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin256.fits ra=160.15 dec=6.2848 rad=12.0 tmin=305683201.0 tmax=305942401.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 4.74
user 4.50
sys 0.21

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/62819/ft1_filtered_4FGL_J1040.5+0617_daily_bin256.fits" evtable="EVENTS" scfile=/scratch/kocevski/62819/ft2_4FGL_J1040.5+0617_daily_bin256.fits sctable="SC_DATA" outfile=/scratch/kocevski/62819/ltcube_305683201_305942401_4FGL_J1040.5+0617_daily_bin256.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/62819/ft2_4FGL_J1040.5+0617_daily_bin256.fits
.....................!
real 15.63
user 15.24
sys 0.31

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/62819/ft1_filtered_4FGL_J1040.5+0617_daily_bin256.fits evtable="EVENTS" scfile=/scratch/kocevski/62819/ft2_4FGL_J1040.5+0617_daily_bin256.fits sctable="SC_DATA" expcube=/scratch/kocevski/62819/ltcube_305683201_305942401_4FGL_J1040.5+0617_daily_bin256.fits outfile=/scratch/kocevski/62819/expmap_305683201_305942401_4FGL_J1040.5+0617_daily_bin256.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/62819/ltcube_305683201_305942401_4FGL_J1040.5+0617_daily_bin256.fits
.....................!
real 192.03
user 186.65
sys 4.80

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/62819/ft1_filtered_4FGL_J1040.5+0617_daily_bin256.fits scfile=/scratch/kocevski/62819/ft2_4FGL_J1040.5+0617_daily_bin256.fits outfile=/scratch/kocevski/62819/cmap_305683201_305942401_4FGL_J1040.5+0617_daily_bin256.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.56
user 0.37
sys 0.17

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/62819/ft1_filtered_4FGL_J1040.5+0617_daily_bin256.fits scfile=/scratch/kocevski/62819/ft2_4FGL_J1040.5+0617_daily_bin256.fits outfile=/scratch/kocevski/62819/cmap_HighResolution_305683201_305942401_4FGL_J1040.5+0617_daily_bin256.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.40
sys 0.15

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    40.498       1.0000         .10000E-03   10000.    
     2 'Prefactor '    85.599       1.0000         .10000E-03   10000.    
     3 'norm      '    .10025E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .28971       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10020E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .12729E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    20.703       1.0000         .10000E-03   10000.    
     8 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    4.6042       1.0000         .10000E-03   10000.    
    12 'Prefactor '    3.7301       1.0000         .10000E-03   10000.    
    13 'norm      '    1.0859       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .22222E-02   1.0000         .10000E-03   10000.    
    15 'norm      '    3.6792       1.0000         .10000E-03   10000.    
    16 'Prefactor '    6.2130       1.0000         .10000E-03   10000.    
    17 'norm      '    1.2163       1.0000         .10000E-03   10000.    
    18 'Normalizat'    .90994       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.7043       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=   6308.332     FROM MIGRAD    STATUS=CONVERGED    398 CALLS     1919 TOTAL
                     EDM=   .57E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  8.0%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     40.492        19.660       -.39036E-06   -.37373E-04
   2  Prefactor     85.579        53.880       -.21414E-06    .84443E-04
   3  norm          .10000E-03    7.9878        .55206E-07** at limit **
   4  Prefactor     .35792        22.007        .43739E-05    .50595E-04
   5  Prefactor     .10000E-03    36.032        .21174E-06** at limit **
   6  Prefactor     .10000E-03    88.637        .31944E-05** at limit **
   7  Prefactor     20.672        21.760       -.10846E-05   -.24800E-05
   8  norm          .10000E-03    .34690        .74457E-07** at limit **
   9  Prefactor     .10000E-03    2.9312        .94455E-07** at limit **
  10  Prefactor     .10000E-03    1.1597        .94998E-07** at limit **
  11  Prefactor     4.6048        7.8874       -.70476E-06   -.78134E-04
  12  Prefactor     3.7294        6.5936       -.58790E-06    .72163E-04
  13  norm          1.0858        .70997        .14481E-06    .18239E-04
  14  Prefactor     .10000E-03    66.146        .79666E-05** at limit **
  15  norm          3.6793        1.9691        .87646E-07    .40841E-03
  16  Prefactor     6.2065        35.577        .12562E-06    .26055E-04
  17  norm          1.2162        48.626       -.82237E-05    .11706E-04
  18  Normalizat    .90986        .23483        .92764E-06    .48372E-04
  19  Prefactor     1.7043        .19659        .99642E-07    .85266E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 40.4921
  Prefactor  = 85.5794
  norm       = 0.0001
  Prefactor  = 0.357922
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 20.6715
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 4.60479
  Prefactor  = 3.72941
  norm       = 1.08584
  Prefactor  = 0.000100003
  norm       = 3.67931
  Prefactor  = 6.20648
  norm       = 1.21622
  Normalizat = 0.909858
  Prefactor  = 1.70434
 **********
 **   18 **HESSE 
 **********

 FCN=   6308.332     FROM HESSE     STATUS=OK           272 CALLS     2191 TOTAL
                     EDM=   .36E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     40.492        19.656        .62988E-04   -1.4434    
   2  Prefactor     85.579        53.648        .21710E-03   -1.3855    
   3  norm          .10000E-03    7.9912        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .35792        69.745        .39932E-02   -1.5588    
   5  Prefactor     .10000E-03    36.058        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    89.157        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     20.672        21.832        .88029E-04   -1.4798    
   8  norm          .10000E-03    .34834        .45663E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .10000E-03    2.9421        .13277E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    1.1654        .83502E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     4.6048        7.8816        .18758E-03   -1.5279    
  12  Prefactor     3.7294        6.5582        .20907E-03   -1.5322    
  13  norm          1.0858        .71138        .52520E-04   -1.5500    
  14  Prefactor     .10000E-03    82.446        .42382E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          3.6793        1.9666        .76412E-04   -1.5324    
  16  Prefactor     6.2065        35.485        .16105E-03   -1.5210    
  17  norm          1.2162        48.301        .40952E-03   -1.5487    
  18  Normalizat    .90986        .26817        .34831E-03   -.96115    
  19  Prefactor     1.7043        .22774        .24012E-03   -.71966    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.57734e-10
Minuit parameter uncertainties:
  1  19.6595
  2  53.6784
  3  5.12387e-06
  4  10.0031
  5  3.16893e-05
  6  0.000372522
  7  21.8404
  8  6.63702e-10
  9  1.50204e-06
  10  3.07385e-07
  11  7.88335
  12  6.55951
  13  0.711385
  14  0.00102678
  15  1.96667
  16  29.7074
  17  15.3417
  18  0.268562
  19  0.227877
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.000e-04  3.074e-07  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.704e+00  2.279e-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:  9.099e-01  2.686e-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: 6.97e-08 ph cm-2 s-1
Energy Flux Upper Limit: 5.37e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/62819/likelihoodResults_305683201_305942401_4FGL_J1040.5+0617_daily_bin256.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) = 6308.33552857
delta logL = -0.00393142241865

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6308.33159722
delta logL = -6.88760337653e-08

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.3664       1.0000          .0000       10.000    
     3 'Normalizat'    .90988       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.7044       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=   6308.332     FROM MIGRAD    STATUS=CONVERGED     52 CALLS      206 TOTAL
                     EDM=   .12E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    156.50        .90712E-02** at limit **
   2  Index         2.3648        7.1973        .50000        .11538E-04
   3  Normalizat    .90986        .82871E-01    .78689E-01    .38735E-04
   4  Prefactor     1.7043        .74555E-01    .54316E-01    .29839E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 2.36477
  Normalizat = 0.909858
  Prefactor  = 1.70434
 **********
 **   18 **HESSE 
 **********

 FCN=   6308.332     FROM HESSE     STATUS=OK            33 CALLS      239 TOTAL
                     EDM=   .29E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    1.9610        .83513E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.3648        6.0838        .50000       -.55512    
   3  Normalizat    .90986        .24745        .34830E-03   -.96115    
   4  Prefactor     1.7043        .22497        .24012E-03   -.71966    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.91695e-10
Minuit parameter uncertainties:
  1  7.02981e-06
  2  5.5128
  3  0.247764
  4  0.225105
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/62819': 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) = 6308.33159714
delta logL = 8.90577211976e-09

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.000e-04  7.030e-06  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.365e+00  5.513e+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.704e+00  2.251e-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:  9.099e-01  2.478e-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/62819/cmap_HighResolution_305683201_305942401_4FGL_J1040.5+0617_daily_bin256.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='5.37e-03', job_status='DONE', photon_flux_upper_limit='6.97e-08', time_completed='2021-09-02 08:22:29.912868', job_id='62819', GAL2='1.70', fit_tolerance='1e-08', EG2='0.91', EG='0.91', time_epoch_completed='1630596149.91', return_code2='0', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.70', dlogl='8.91e-09', ts2='-0.00', photon_index_error='0.00', photon_index='2.37' WHERE bin_id='256' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:22:29 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0076>
Subject: Job 62819: <4FGL_J1040.5+0617_daily_bin256> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin256 160.15 6.2848 305683201 305942401 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 :                                   593.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             337.70 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   609 sec.
    Turnaround time :                            674 sec.

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

