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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin1593
RA = 160.15, Dec = 6.2848
tmin = 652233601, tmax = 652492801
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='330249', job_status='RUN', time_executed='2021-09-05 00:19:08.271269', time_epoch_executed='1630826348.27' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='1593'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/330249

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/330249/ft1_4FGL_J1040.5+0617_daily_bin1593.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/330249/ft2_4FGL_J1040.5+0617_daily_bin1593.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/330249/ft1_4FGL_J1040.5+0617_daily_bin1593.fits outfile=/scratch/kocevski/330249/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin1593.fits ra=160.15 dec=6.2848 rad=12.0 tmin=652233601.0 tmax=652492801.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.44
user 4.19
sys 0.21

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/330249/ft1_filtered_4FGL_J1040.5+0617_daily_bin1593.fits" evtable="EVENTS" scfile=/scratch/kocevski/330249/ft2_4FGL_J1040.5+0617_daily_bin1593.fits sctable="SC_DATA" outfile=/scratch/kocevski/330249/ltcube_652233601_652492801_4FGL_J1040.5+0617_daily_bin1593.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/330249/ft2_4FGL_J1040.5+0617_daily_bin1593.fits
.....................!
real 11.65
user 11.32
sys 0.30

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/330249/ft1_filtered_4FGL_J1040.5+0617_daily_bin1593.fits evtable="EVENTS" scfile=/scratch/kocevski/330249/ft2_4FGL_J1040.5+0617_daily_bin1593.fits sctable="SC_DATA" expcube=/scratch/kocevski/330249/ltcube_652233601_652492801_4FGL_J1040.5+0617_daily_bin1593.fits outfile=/scratch/kocevski/330249/expmap_652233601_652492801_4FGL_J1040.5+0617_daily_bin1593.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/330249/ltcube_652233601_652492801_4FGL_J1040.5+0617_daily_bin1593.fits
.....................!
real 191.47
user 186.73
sys 4.34

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/330249/ft1_filtered_4FGL_J1040.5+0617_daily_bin1593.fits scfile=/scratch/kocevski/330249/ft2_4FGL_J1040.5+0617_daily_bin1593.fits outfile=/scratch/kocevski/330249/cmap_652233601_652492801_4FGL_J1040.5+0617_daily_bin1593.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.55
user 0.37
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/330249/ft1_filtered_4FGL_J1040.5+0617_daily_bin1593.fits scfile=/scratch/kocevski/330249/ft2_4FGL_J1040.5+0617_daily_bin1593.fits outfile=/scratch/kocevski/330249/cmap_HighResolution_652233601_652492801_4FGL_J1040.5+0617_daily_bin1593.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.60
user 0.39
sys 0.14

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

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 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    10.544       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .61183E-02   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10059E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .17629E-02   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10405E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    2.9981       1.0000         .10000E-03   10000.    
     9 'Prefactor '    2.0288       1.0000         .10000E-03   10000.    
    10 'Prefactor '    14.004       1.0000         .10000E-03   10000.    
    11 'Prefactor '    19.261       1.0000         .10000E-03   10000.    
    12 'Prefactor '    11.272       1.0000         .10000E-03   10000.    
    13 'norm      '    1.7244       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    2.0058       1.0000         .10000E-03   10000.    
    16 'Prefactor '    35.354       1.0000         .10000E-03   10000.    
    17 'norm      '    .10019E-03   1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.0356       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.4569       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=   6195.109     FROM MIGRAD    STATUS=CONVERGED    388 CALLS     1883 TOTAL
                     EDM=   .54E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  8.6%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    4.5901       -.37121E-07** at limit **
   2  Prefactor     .10000E-03    12.724       -.22664E-06** at limit **
   3  norm          10.520        15.233       -.69071E-06   -.29467E-03
   4  Prefactor     .10046E-03    9.7040        .20150E-05** at limit **
   5  Prefactor     .10000E-03    34.012        .43432E-06** at limit **
   6  Prefactor     .10000E-03    387.28        .51313E-04** at limit **
   7  Prefactor     .10000E-03    12.341       -.76946E-07** at limit **
   8  norm          2.9977        1.9738       -.86161E-07   -.25241E-03
   9  Prefactor     2.0305        9.6348        .81053E-05    .91646E-04
  10  Prefactor     14.002        6.7459        .27934E-06   -.20027E-03
  11  Prefactor     19.263        9.8077        .49951E-07   -.16769E-04
  12  Prefactor     11.273        13.496        .18225E-06   -.34433E-04
  13  norm          1.7243        .78270        .19700E-07   -.57995E-04
  14  Prefactor     .10000E-03    5.9976       -.49770E-07** at limit **
  15  norm          2.0065        1.7937        .10168E-06    .46397E-05
  16  Prefactor     35.360        29.737       -.89180E-07   -.95851E-05
  17  norm          .10000E-03    12.927       -.72632E-07** at limit **
  18  Normalizat    1.0354        .25374       -.11987E-05   -.21312E-03
  19  Prefactor     1.4569        .20581       -.24949E-06   -.21551E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 10.5199
  Prefactor  = 0.000100456
  Prefactor  = 0.0001
  Prefactor  = 0.000100001
  Prefactor  = 0.0001
  norm       = 2.99766
  Prefactor  = 2.03046
  Prefactor  = 14.0019
  Prefactor  = 19.2632
  Prefactor  = 11.2728
  norm       = 1.72426
  Prefactor  = 0.0001
  norm       = 2.00646
  Prefactor  = 35.3599
  norm       = 0.0001
  Normalizat = 1.03543
  Prefactor  = 1.45686
 **********
 **   18 **HESSE 
 **********

 FCN=   6195.109     FROM HESSE     STATUS=OK           270 CALLS     2153 TOTAL
                     EDM=   .65E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    4.5925        .16467E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    12.725        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          10.520        14.924        .12339E-03   -1.5059    
   4  Prefactor     .10046E-03    69.206        .43762E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    34.032        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    387.23        .40678E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    12.359        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          2.9977        1.9706        .85221E-04   -1.5362    
   9  Prefactor     2.0305        9.7112        .14523E-02   -1.5423    
  10  Prefactor     14.002        6.7503        .10703E-03   -1.4959    
  11  Prefactor     19.263        9.8454        .91262E-04   -1.4830    
  12  Prefactor     11.273        13.458        .11933E-03   -1.5036    
  13  norm          1.7243        .77899        .44579E-04   -1.5445    
  14  Prefactor     .10000E-03    6.0131        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          2.0065        1.7816        .93851E-04   -1.5425    
  16  Prefactor     35.360        29.758        .67399E-04   -1.4518    
  17  norm          .10000E-03    13.039        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    1.0354        .29963        .34169E-03   -.91853    
  19  Prefactor     1.4569        .24592        .25478E-03   -.78755    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.51402e-09
Minuit parameter uncertainties:
  1  4.78527e-06
  2  5.6052e-06
  3  14.9293
  4  0.0112467
  5  4.92987e-05
  6  0.00152438
  7  4.98209e-05
  8  1.97068
  9  8.88316
  10  6.75071
  11  9.8462
  12  13.4614
  13  0.778991
  14  4.01772e-06
  15  1.78165
  16  29.77
  17  3.58623e-06
  18  0.300119
  19  0.246121
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.400e+01  6.751e+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.457e+00  2.461e-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.035e+00  3.001e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 9.28
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 1.69e-07 +/- 8.15e-08
Energy Flux (Fixed Index): 5.79e-05 +/- 2.79e-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) = 6194.91264438
delta logL = 0.196768038884

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6194.90275549
delta logL = 0.206656929666

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    11.661       1.0000         .10000E-03   10000.    
     2 'Index     '    2.6382       1.0000          .0000       10.000    
     3 'Normalizat'    .98423       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.4863       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=   6194.903     FROM MIGRAD    STATUS=CONVERGED     85 CALLS      275 TOTAL
                     EDM=   .95E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     11.661        7.2474        .10637E-03    .53120E-03
   2  Index         2.6382        .45669        .44456E-02    .11161E-03
   3  Normalizat    .98417        .29673        .34916E-03   -.46853E-04
   4  Prefactor     1.4863        .24878        .25263E-03   -.10333E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 11.6609
  Index      = 2.63824
  Normalizat = 0.984169
  Prefactor  = 1.48629
 **********
 **   18 **HESSE 
 **********

 FCN=   6194.903     FROM HESSE     STATUS=OK            25 CALLS      300 TOTAL
                     EDM=   .86E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     11.661        6.8811        .42547E-05   -1.5025    
   2  Index         2.6382        .43291        .17783E-03   -.49196    
   3  Normalizat    .98417        .29639        .13967E-04   -.93563    
   4  Prefactor     1.4863        .24851        .50525E-04   -.77925    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 8.62366e-11
Minuit parameter uncertainties:
  1  6.88158
  2  0.433606
  3  0.296885
  4  0.248712
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/330249': 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) = 6194.90275546
delta logL = 0.206656960461

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.166e+01  6.882e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.638e+00  4.336e-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:  1.486e+00  2.487e-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.842e-01  2.969e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 9.80
Ra Dec: 160.150 6.285
Photon Index (Free Index): 2.64 +/- 0.43
Photon Flux (Free Index): 2.11e-07 +/- 1.07e-07
Energy Flux (Free Index): 5.34e-05 +/- 2.37e-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/330249/cmap_HighResolution_652233601_652492801_4FGL_J1040.5+0617_daily_bin1593.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='1.69e-07', energy_flux2='5.34e-05', photon_flux_error='8.15e-08', dlogl='2.07e-01', energy_flux='5.79e-05', photon_flux2='2.11e-07', job_status='DONE', time_completed='2021-09-05 00:27:58.220872', photon_index_error2='0.43', photon_index2='2.64', ts='9.28', fit_tolerance='1e-08', GAL='1.46', photon_index_error='0.00', energy_flux_error2='2.37e-05', EG='1.04', time_epoch_completed='1630826878.22', return_code='0', job_id='330249', GAL2='1.49', EG2='0.98', return_code2='0', energy_flux_error='2.79e-05', photon_flux_error2='1.07e-07', ts2='9.80', photon_index='2.37' WHERE bin_id='1593' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sun Sep  5 00:27:58 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0105>
Subject: Job 330249: <4FGL_J1040.5+0617_daily_bin1593> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin1593> was submitted from host <rhel6-64h> by user <kocevski> in cluster <slac> at Sun Sep  5 00:15:34 2021
Job was executed on host(s) <bullet0105>, in queue <medium>, as user <kocevski> in cluster <slac> at Sun Sep  5 00:15:35 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Sun Sep  5 00:15:35 2021
Terminated at Sun Sep  5 00:27:59 2021
Results reported at Sun Sep  5 00:27:59 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin1593 160.15 6.2848 652233601 652492801 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 :                                   530.14 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             266.27 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   743 sec.
    Turnaround time :                            745 sec.

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

