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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin693
RA = 160.15, Dec = 6.2848
tmin = 418953601, tmax = 419212801
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='65635', job_status='RUN', time_executed='2021-09-02 08:26:49.879908', time_epoch_executed='1630596409.88' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='693'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/65635

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/65635/ft1_4FGL_J1040.5+0617_daily_bin693.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/65635/ft2_4FGL_J1040.5+0617_daily_bin693.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/65635/ft1_4FGL_J1040.5+0617_daily_bin693.fits outfile=/scratch/kocevski/65635/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin693.fits ra=160.15 dec=6.2848 rad=12.0 tmin=418953601.0 tmax=419212801.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 5.60
user 5.28
sys 0.27

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/65635/ft1_filtered_4FGL_J1040.5+0617_daily_bin693.fits" evtable="EVENTS" scfile=/scratch/kocevski/65635/ft2_4FGL_J1040.5+0617_daily_bin693.fits sctable="SC_DATA" outfile=/scratch/kocevski/65635/ltcube_418953601_419212801_4FGL_J1040.5+0617_daily_bin693.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/65635/ft2_4FGL_J1040.5+0617_daily_bin693.fits
.....................!
real 13.77
user 12.97
sys 0.34

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/65635/ft1_filtered_4FGL_J1040.5+0617_daily_bin693.fits evtable="EVENTS" scfile=/scratch/kocevski/65635/ft2_4FGL_J1040.5+0617_daily_bin693.fits sctable="SC_DATA" expcube=/scratch/kocevski/65635/ltcube_418953601_419212801_4FGL_J1040.5+0617_daily_bin693.fits outfile=/scratch/kocevski/65635/expmap_418953601_419212801_4FGL_J1040.5+0617_daily_bin693.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/65635/ltcube_418953601_419212801_4FGL_J1040.5+0617_daily_bin693.fits
.....................!
real 191.41
user 185.70
sys 4.92

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/65635/ft1_filtered_4FGL_J1040.5+0617_daily_bin693.fits scfile=/scratch/kocevski/65635/ft2_4FGL_J1040.5+0617_daily_bin693.fits outfile=/scratch/kocevski/65635/cmap_418953601_419212801_4FGL_J1040.5+0617_daily_bin693.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.37
sys 0.16

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

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    6.7824       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .49591E-02   1.0000         .10000E-03   10000.    
     3 'norm      '    17.208       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .61862E-01   1.0000         .10000E-03   10000.    
     5 'Prefactor '    54.691       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .36778E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10498E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    5.3292       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .30840E-02   1.0000         .10000E-03   10000.    
    10 'Prefactor '    1.4481       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10051E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    21.288       1.0000         .10000E-03   10000.    
    13 'norm      '    1.7330       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    1.2730       1.0000         .10000E-03   10000.    
    16 'Prefactor '    9.6331       1.0000         .10000E-03   10000.    
    17 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.0033       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.1693       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=   5099.126     FROM MIGRAD    STATUS=CONVERGED    719 CALLS     2280 TOTAL
                     EDM=   .32E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     6.7954        22.711        .15407E-03    .30084E-03
   2  Prefactor     .10002E-03    57.655        .15235    ** at limit **
   3  norm          17.217        30.809        .96551E-04    .28304E-03
   4  Prefactor     .16146E-03    18.562        .66785E-01** at limit **
   5  Prefactor     54.694        77.653        .54239E-04    .22788E-03
   6  Prefactor     .10000E-03    142.23        .21302E-02** at limit **
   7  Prefactor     .10000E-03    26.403        .18142E-02** at limit **
   8  norm          5.3276        2.3375        .67889E-04    .12625E-02
   9  Prefactor     .10003E-03    7.2777        .54236E-01** at limit **
  10  Prefactor     1.4499        3.4962        .19381E-03   -.64467E-04
  11  Prefactor     .10000E-03    5.5343        .32222E-03** at limit **
  12  Prefactor     21.281        13.672        .86812E-04   -.12716E-03
  13  norm          1.7337        .89437        .45513E-04   -.16421E-02
  14  Prefactor     .10001E-03    46.890        .41783E-02** at limit **
  15  norm          1.2729        1.1399        .19706E-03    .57750E-04
  16  Prefactor     9.6378        15.132        .12911E-03   -.12239E-04
  17  norm          .10000E-03    6.7190        .18047E-02** at limit **
  18  Normalizat    1.0037        .27529        .29685E-03    .27638E-03
  19  Prefactor     1.1688        .22394        .23959E-03    .86264E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 6.79543
  Prefactor  = 0.00010002
  norm       = 17.2167
  Prefactor  = 0.00016146
  Prefactor  = 54.6939
  Prefactor  = 0.000100002
  Prefactor  = 0.0001
  norm       = 5.32763
  Prefactor  = 0.000100026
  Prefactor  = 1.44987
  Prefactor  = 0.0001
  Prefactor  = 21.2812
  norm       = 1.73371
  Prefactor  = 0.000100008
  norm       = 1.27291
  Prefactor  = 9.63776
  norm       = 0.0001
  Normalizat = 1.00367
  Prefactor  = 1.16877
 **********
 **   18 **HESSE 
 **********

 FCN=   5099.126     FROM HESSE     STATUS=OK           278 CALLS     2558 TOTAL
                     EDM=   .31E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     6.7954        22.704        .61627E-05   -1.5187    
   2  Prefactor     .10002E-03    58.479        .15083       -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          17.217        30.786        .19310E-04   -1.4878    
   4  Prefactor     .16146E-03    15.671        .74439E-01   -1.5706    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     54.694        77.669        .10848E-04   -1.4228    
   6  Prefactor     .10000E-03    142.25        .42603E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    26.408        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          5.3276        2.3376        .27156E-05   -1.5246    
   9  Prefactor     .10003E-03    7.1193        .55133E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     1.4499        3.4952        .77523E-05   -1.5467    
  11  Prefactor     .10000E-03    5.5345        .64445E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     21.281        13.668        .34725E-05   -1.4785    
  13  norm          1.7337        .89256        .18205E-05   -1.5445    
  14  Prefactor     .10001E-03    47.137        .83566E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          1.2729        1.1398        .78822E-05   -1.5482    
  16  Prefactor     9.6378        15.132        .51646E-05   -1.5087    
  17  norm          .10000E-03    6.7199        .36094E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    1.0037        .27552        .59369E-04   -.92908    
  19  Prefactor     1.1688        .22412        .47919E-04   -.87298    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.08527e-09
Minuit parameter uncertainties:
  1  22.7328
  2  0.00216058
  3  30.8139
  4  0.0620846
  5  77.8133
  6  0.000961802
  7  5.13207e-05
  8  2.33762
  9  0.000864888
  10  3.49566
  11  2.28056e-05
  12  13.6697
  13  0.892566
  14  0.00121894
  15  1.13986
  16  15.1381
  17  7.92343e-06
  18  0.275908
  19  0.224307
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.450e+00  3.496e+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.169e+00  2.243e-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.004e+00  2.759e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.23
Ra Dec: 160.150 6.285
Photon Flux Upper Limit: 1.25e-07 ph cm-2 s-1
Energy Flux Upper Limit: 9.66e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/65635/likelihoodResults_418953601_419212801_4FGL_J1040.5+0617_daily_bin693.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) = 5099.09857257
delta logL = 0.0272074268578

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5099.09081013
delta logL = 0.0349698613991

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    1.0577       1.0000         .10000E-03   10000.    
     2 'Index     '    2.7920       1.0000          .0000       10.000    
     3 'Normalizat'    .99569       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1733       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=   5099.091     FROM MIGRAD    STATUS=CONVERGED     53 CALLS      210 TOTAL
                     EDM=   .31E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     1.0563        64.526        .11944E-01    .76806E-03
   2  Index         2.7925        6.3089        .22628        .49403E-04
   3  Normalizat    .99592        .47381E-01    .67332E-01    .12070E-04
   4  Prefactor     1.1732        .40495E-01    .54098E-01    .23214E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 1.05629
  Index      = 2.79252
  Normalizat = 0.995919
  Prefactor  = 1.17317
 **********
 **   18 **HESSE 
 **********

 FCN=   5099.091     FROM HESSE     STATUS=OK            33 CALLS      243 TOTAL
                     EDM=   .97E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     1.0563        3.8119        .14664E-03   -1.5502    
   2  Index         2.7925        2.0843        .12566E-01   -.45727    
   3  Normalizat    .99592        .25777        .29783E-03   -.93167    
   4  Prefactor     1.1732        .22168        .23919E-03   -.87161    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 9.71979e-09
Minuit parameter uncertainties:
  1  3.81275
  2  2.16768
  3  0.258091
  4  0.221852
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/65635': 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) = 5099.09080961
delta logL = 0.03497038761

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.056e+00  3.813e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.793e+00  2.168e+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.173e+00  2.219e-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.959e-01  2.581e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.23
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/65635/cmap_HighResolution_418953601_419212801_4FGL_J1040.5+0617_daily_bin693.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='9.66e-03', job_status='DONE', photon_flux_upper_limit='1.25e-07', time_completed='2021-09-02 08:36:16.662683', job_id='65635', GAL2='1.17', fit_tolerance='1e-08', EG2='1.00', EG='1.00', time_epoch_completed='1630596976.66', return_code2='0', ts='0.23', comment='SUCCESS', return_code='0', GAL='1.17', dlogl='3.50e-02', ts2='0.30', photon_index_error='0.00', photon_index='2.37' WHERE bin_id='693' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:36:16 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0203>
Subject: Job 65635: <4FGL_J1040.5+0617_daily_bin693> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin693> was submitted from host <rhel6-64k> by user <kocevski> in cluster <slac> at Thu Sep  2 08:21:14 2021
Job was executed on host(s) <bullet0203>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:23:50 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Thu Sep  2 08:23:50 2021
Terminated at Thu Sep  2 08:36:17 2021
Results reported at Thu Sep  2 08:36:17 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin693 160.15 6.2848 418953601 419212801 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 :                                   562.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             289.64 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   747 sec.
    Turnaround time :                            903 sec.

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

