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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin1597
RA = 160.15, Dec = 6.2848
tmin = 653270401, tmax = 653529601
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='544995', job_status='RUN', time_executed='2021-09-17 00:57:29.419928', time_epoch_executed='1631865449.42' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='1597'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/544995

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/544995/ft1_4FGL_J1040.5+0617_daily_bin1597.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/544995/ft2_4FGL_J1040.5+0617_daily_bin1597.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/544995/ft1_4FGL_J1040.5+0617_daily_bin1597.fits outfile=/scratch/kocevski/544995/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin1597.fits ra=160.15 dec=6.2848 rad=12.0 tmin=653270401.0 tmax=653529601.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.30
user 3.08
sys 0.20

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/544995/ft1_filtered_4FGL_J1040.5+0617_daily_bin1597.fits evtable="EVENTS" scfile=/scratch/kocevski/544995/ft2_4FGL_J1040.5+0617_daily_bin1597.fits sctable="SC_DATA" expcube=/scratch/kocevski/544995/ltcube_653270401_653529601_4FGL_J1040.5+0617_daily_bin1597.fits outfile=/scratch/kocevski/544995/expmap_653270401_653529601_4FGL_J1040.5+0617_daily_bin1597.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/544995/ltcube_653270401_653529601_4FGL_J1040.5+0617_daily_bin1597.fits
.....................!
real 189.75
user 185.14
sys 3.97

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/544995/ft1_filtered_4FGL_J1040.5+0617_daily_bin1597.fits scfile=/scratch/kocevski/544995/ft2_4FGL_J1040.5+0617_daily_bin1597.fits outfile=/scratch/kocevski/544995/cmap_653270401_653529601_4FGL_J1040.5+0617_daily_bin1597.fits algorithm="CMAP" ebinalg="LOG" emin=30.0 emax=200000.0 ebinfile=NONE tbinalg="LIN" tbinfile=NONE nxpix=160 nypix=160 binsz=0.25 coordsys="CEL" xref=160.15 yref=6.2848 axisrot=0.0 rafield="RA" decfield="DEC" proj="AIT" hpx_ordering_scheme="RING" hpx_order=3 hpx_ebin=yes hpx_region="" evtable="EVENTS" sctable="SC_DATA" efield="ENERGY" tfield="TIME" chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

This is gtbin version HEAD
real 0.53
user 0.38
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/544995/ft1_filtered_4FGL_J1040.5+0617_daily_bin1597.fits scfile=/scratch/kocevski/544995/ft2_4FGL_J1040.5+0617_daily_bin1597.fits outfile=/scratch/kocevski/544995/cmap_HighResolution_653270401_653529601_4FGL_J1040.5+0617_daily_bin1597.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.54
user 0.38
sys 0.15

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    62.239       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .25807E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    .11245E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10107E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .11525E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    95.724       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10039E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    3.3106       1.0000         .10000E-03   10000.    
     9 'Prefactor '    15.165       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10068E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .11304E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .11522E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .10011E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10062E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    18.612       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .11803E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    14.254       1.0000         .10000E-03   10000.    
    18 'Normalizat'    .35957       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.5310       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=   1587.489     FROM MIGRAD    STATUS=CONVERGED    376 CALLS     1842 TOTAL
                     EDM=   .18E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .3%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     62.198        37.129       -.25032E-04   -.56971E-03
   2  Prefactor     .10000E-03    298.60       -.71370E-04** at limit **
   3  norm          .10002E-03    75.479        .86932E-04** at limit **
   4  Prefactor     .10000E-03    10.750       -.13201E-05** at limit **
   5  Prefactor     .10000E-03    49.649       -.32926E-04** at limit **
   6  Prefactor     95.833        97.470        .99423E-04   -.27829E-04
   7  Prefactor     .10000E-03    18.942        .56226E-05** at limit **
   8  norm          3.3058        4.3090       -.26051E-05   -.87881E-04
   9  Prefactor     15.160        14.275       -.14508E-05    .13516E-03
  10  Prefactor     .10000E-03    13.812        .22509E-05** at limit **
  11  Prefactor     .10000E-03    54.386        .13256E-04** at limit **
  12  Prefactor     .10000E-03    113.39       -.56545E-04** at limit **
  13  norm          .10000E-03    .60593        .99644E-07** at limit **
  14  Prefactor     .10000E-03    15.738       -.66057E-05** at limit **
  15  norm          18.614        9.2674        .50149E-05    .81165E-05
  16  Prefactor     .10000E-03    52.277       -.87823E-05** at limit **
  17  norm          14.170        68.528       -.16674E-03    .76339E-05
  18  Normalizat    .35928        .52566        .20446E-04    .19347E-03
  19  Prefactor     1.5313        .41411       -.13638E-05    .16254E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 62.1982
  Prefactor  = 0.0001
  norm       = 0.000100017
  Prefactor  = 0.000100001
  Prefactor  = 0.0001
  Prefactor  = 95.8327
  Prefactor  = 0.000100001
  norm       = 3.30583
  Prefactor  = 15.1596
  Prefactor  = 0.000100001
  Prefactor  = 0.000100003
  Prefactor  = 0.000100002
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 18.6138
  Prefactor  = 0.0001
  norm       = 14.1701
  Normalizat = 0.359284
  Prefactor  = 1.53131
 **********
 **   18 **HESSE 
 **********

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

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     62.198        37.013        .50863E-04   -1.4129    
   2  Prefactor     .10000E-03    301.04        .21452E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .10002E-03    76.257        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    10.755        .12760E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    49.642        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     95.833        96.969        .20541E-03   -1.3747    
   7  Prefactor     .10000E-03    18.936        .16938E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          3.3058        4.2579        .84122E-04   -1.5344    
   9  Prefactor     15.160        14.199        .10285E-03   -1.4929    
  10  Prefactor     .10000E-03    14.016        .14447E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    55.133        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    116.40        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .10000E-03    .61223        .30250E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10000E-03    15.763        .15440E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          18.614        9.2195        .78820E-04   -1.4845    
  16  Prefactor     .10000E-03    52.293        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          14.170        68.601        .10609E-03   -1.4955    
  18  Normalizat    .35928        .51633        .49186E-03   -1.1946    
  19  Prefactor     1.5313        .42042        .21033E-03   -.76667    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.31948e-09
Minuit parameter uncertainties:
  1  37.0268
  2  0.00047494
  3  0.00228541
  4  0.000171251
  5  7.08087e-06
  6  97.1299
  7  0.00027982
  8  4.25832
  9  14.2019
  10  0.000257461
  11  0.000749752
  12  0.000881845
  13  4.87573e-06
  14  4.77317e-05
  15  9.22021
  16  4.83251e-05
  17  62.4723
  18  0.523397
  19  0.421384
Done.

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

Extracting fit parameters...

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

GAL_V02
   Spectrum: PowerLaw
533    Prefactor:  1.531e+00  4.214e-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:  3.593e-01  5.234e-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: 3.27e-07 ph cm-2 s-1
Energy Flux Upper Limit: 2.52e-02 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/544995/likelihoodResults_653270401_653529601_4FGL_J1040.5+0617_daily_bin1597.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) = 1587.48974291
delta logL = -0.000339278412639

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 1587.48940375
delta logL = -1.17419403978e-07

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   1587.489     FROM MIGRAD    STATUS=CONVERGED     90 CALLS      247 TOTAL
                     EDM=   .68E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10108E-03    190.35        .14601E-02** at limit **
   2  Index         2.4386        5.1947        .50000       -.85214E-05
   3  Normalizat    .35927        .37845E-01    .49185E-03    .58767E-05
   4  Prefactor     1.5313        .31841E-01    .21033E-03    .19837E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000101085
  Index      = 2.43857
  Normalizat = 0.359266
  Prefactor  = 1.53132
 **********
 **   18 **HESSE 
 **********

 FCN=   1587.489     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      276 TOTAL
                     EDM=   .36E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10108E-03    942.67        .29202E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.4386        5.3423        .50000       -.53785    
   3  Normalizat    .35927        .91167E-01    .19674E-04   -1.1946    
   4  Prefactor     1.5313        .76718E-01    .84132E-05   -.76666    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 3.58245e-08
Minuit parameter uncertainties:
  1  0.0649979
  2  1034.79
  3  0.0912049
  4  0.0767237
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/544995': 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) = 1587.48940351
delta logL = 1.23677864394e-07

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.011e-04  6.500e-02  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.439e+00  1.035e+03  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.531e+00  7.672e-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:  3.593e-01  9.120e-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/544995/cmap_HighResolution_653270401_653529601_4FGL_J1040.5+0617_daily_bin1597.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='2.52e-02', job_status='DONE', photon_flux_upper_limit='3.27e-07', time_completed='2021-09-17 01:03:44.302418', job_id='544995', GAL2='1.53', fit_tolerance='1e-08', EG2='0.36', EG='0.36', time_epoch_completed='1631865824.3', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.53', dlogl='1.24e-07', ts2='-0.00', photon_index_error='0.00', photon_index='2.37' WHERE bin_id='1597' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Fri Sep 17 01:03:44 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0234>
Subject: Job 544995: <4FGL_J1040.5+0617_daily_bin1597> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin1597> was submitted from host <rhel6-64p> by user <kocevski> in cluster <slac> at Fri Sep 17 00:55:21 2021
Job was executed on host(s) <bullet0234>, in queue <medium>, as user <kocevski> in cluster <slac> at Fri Sep 17 00:55:23 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Fri Sep 17 00:55:23 2021
Terminated at Fri Sep 17 01:03:45 2021
Results reported at Fri Sep 17 01:03:45 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin1597 160.15 6.2848 653270401 653529601 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 :                                   377.35 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             270.33 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   501 sec.
    Turnaround time :                            504 sec.

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

