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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin180
RA = 160.15, Dec = 6.2848
tmin = 285984001, tmax = 286243201
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='60916', job_status='RUN', time_executed='2021-09-02 08:10:19.699039', time_epoch_executed='1630595419.7' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='180'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/60916

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/60916/ft1_4FGL_J1040.5+0617_daily_bin180.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/60916/ft2_4FGL_J1040.5+0617_daily_bin180.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/60916/ft1_4FGL_J1040.5+0617_daily_bin180.fits outfile=/scratch/kocevski/60916/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin180.fits ra=160.15 dec=6.2848 rad=12.0 tmin=285984001.0 tmax=286243201.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.37
user 3.17
sys 0.18

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/60916/ft1_filtered_4FGL_J1040.5+0617_daily_bin180.fits evtable="EVENTS" scfile=/scratch/kocevski/60916/ft2_4FGL_J1040.5+0617_daily_bin180.fits sctable="SC_DATA" expcube=/scratch/kocevski/60916/ltcube_285984001_286243201_4FGL_J1040.5+0617_daily_bin180.fits outfile=/scratch/kocevski/60916/expmap_285984001_286243201_4FGL_J1040.5+0617_daily_bin180.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/60916/ltcube_285984001_286243201_4FGL_J1040.5+0617_daily_bin180.fits
.....................!
real 191.46
user 185.23
sys 5.55

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/60916/ft1_filtered_4FGL_J1040.5+0617_daily_bin180.fits scfile=/scratch/kocevski/60916/ft2_4FGL_J1040.5+0617_daily_bin180.fits outfile=/scratch/kocevski/60916/cmap_285984001_286243201_4FGL_J1040.5+0617_daily_bin180.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.36
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/60916/ft1_filtered_4FGL_J1040.5+0617_daily_bin180.fits scfile=/scratch/kocevski/60916/ft2_4FGL_J1040.5+0617_daily_bin180.fits outfile=/scratch/kocevski/60916/cmap_HighResolution_285984001_286243201_4FGL_J1040.5+0617_daily_bin180.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.56
user 0.39
sys 0.15

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10018E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    .10034E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    7.0745       1.0000         .10000E-03   10000.    
     5 'Prefactor '    43.311       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .25909E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10492E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    1.3932       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    1.8635       1.0000         .10000E-03   10000.    
    13 'norm      '    .37383       1.0000         .10000E-03   10000.    
    14 'Prefactor '    10.953       1.0000         .10000E-03   10000.    
    15 'norm      '    2.6683       1.0000         .10000E-03   10000.    
    16 'Prefactor '    21.896       1.0000         .10000E-03   10000.    
    17 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.1400       1.0000         .10000E-01   10.000    
    19 'Prefactor '    .96616       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=   5277.363     FROM MIGRAD    STATUS=CONVERGED    375 CALLS     1848 TOTAL
                     EDM=   .14E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .8%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    6.2990        .27475E-06** at limit **
   2  Prefactor     .10000E-03    45.208        .30004E-05** at limit **
   3  norm          .10000E-03    5.5498        .32730E-07** at limit **
   4  Prefactor     7.0742        9.3813        .17221E-05    .12735E-02
   5  Prefactor     43.301        53.563       -.13155E-04    .18211E-03
   6  Prefactor     .10000E-03    130.54       -.85523E-04** at limit **
   7  Prefactor     .10000E-03    13.035       -.43076E-08** at limit **
   8  norm          .10000E-03    .61355       -.64492E-08** at limit **
   9  Prefactor     .10000E-03    2.1648       -.13104E-07** at limit **
  10  Prefactor     1.3930        1.7171        .81336E-07    .14972E-03
  11  Prefactor     .10000E-03    1.8504       -.13681E-07** at limit **
  12  Prefactor     1.8631        7.5732       -.20400E-05   -.50858E-03
  13  norm          .37383        .48049       -.16433E-07   -.28931E-03
  14  Prefactor     10.953        10.375       -.11120E-06   -.12233E-04
  15  norm          2.6683        1.5160       -.11286E-06   -.20365E-03
  16  Prefactor     21.897        19.455        .54413E-06    .15909E-04
  17  norm          .10000E-03    3.6952       -.91202E-08** at limit **
  18  Normalizat    1.1399        .20219        .22503E-05    .15956E-03
  19  Prefactor     .96624        .16783       -.58001E-06    .29841E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 7.07419
  Prefactor  = 43.3011
  Prefactor  = 0.000100003
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 1.39302
  Prefactor  = 0.0001
  Prefactor  = 1.86313
  norm       = 0.37383
  Prefactor  = 10.9531
  norm       = 2.66835
  Prefactor  = 21.8975
  norm       = 0.0001
  Normalizat = 1.1399
  Prefactor  = 0.966241
 **********
 **   18 **HESSE 
 **********

 FCN=   5277.363     FROM HESSE     STATUS=OK           264 CALLS     2112 TOTAL
                     EDM=   .29E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    6.3107        .17804E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    45.277        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .10000E-03    5.5518        .16713E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     7.0742        9.4457        .15082E-03   -1.5176    
   5  Prefactor     43.301        53.607        .60916E-04   -1.4391    
   6  Prefactor     .10000E-03    129.68        .21451E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    13.069        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .10000E-03    .63282        .11104E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .10000E-03    2.1704        .10438E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     1.3930        1.7013        .10218E-03   -1.5472    
  11  Prefactor     .10000E-03    1.8551        .96492E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     1.8631        7.6198        .30521E-03   -1.5435    
  13  norm          .37383        .44484        .49565E-03   -1.5586    
  14  Prefactor     10.953        10.193        .12106E-03   -1.5046    
  15  norm          2.6683        1.5175        .64122E-04   -1.5381    
  16  Prefactor     21.897        19.458        .85599E-04   -1.4772    
  17  norm          .10000E-03    3.6999        .13638E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    1.1399        .23986        .25103E-03   -.88481    
  19  Prefactor     .96624        .19855        .23469E-03   -.93863    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.85473e-09
Minuit parameter uncertainties:
  1  2.89005e-05
  2  2.98287e-05
  3  2.96857e-05
  4  9.44772
  5  53.6669
  6  0.00127626
  7  6.76246e-05
  8  4.5611e-07
  9  1.34896e-06
  10  1.70131
  11  2.00311e-06
  12  7.53717
  13  0.444845
  14  10.1949
  15  1.51748
  16  19.4632
  17  2.30052e-06
  18  0.24009
  19  0.198701
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.393e+00  1.701e+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:  9.662e-01  1.987e-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.140e+00  2.401e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 1.59
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 1.68e-08 +/- 2.05e-08
Energy Flux (Fixed Index): 5.76e-06 +/- 7.04e-06

TS (Fixed Index): 1.59
Ra Dec: 160.150 6.285
Photon Flux Upper Limit: 8.25e-08 ph cm-2 s-1
Energy Flux Upper Limit: 6.36e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/60916/likelihoodResults_285984001_286243201_4FGL_J1040.5+0617_daily_bin180.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) = 5277.12401312
delta logL = 0.239377494951

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5277.10969057
delta logL = 0.25370005144

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    1.7124       1.0000         .10000E-03   10000.    
     2 'Index     '    1.7593       1.0000          .0000       10.000    
     3 'Normalizat'    1.1481       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .96183       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=   5277.110     FROM MIGRAD    STATUS=CONVERGED     51 CALLS      205 TOTAL
                     EDM=   .16E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     1.7126        4.0452        .80299E-02   -.94620E-04
   2  Index         1.7593        1.2171        .27389       -.19389E-04
   3  Normalizat    1.1481        .19290        .56585E-01    .69531E-05
   4  Prefactor     .96184        .16771        .45788E-01    .76128E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 1.71263
  Index      = 1.75928
  Normalizat = 1.1481
  Prefactor  = 0.961841
 **********
 **   18 **HESSE 
 **********

 FCN=   5277.110     FROM HESSE     STATUS=OK            33 CALLS      238 TOTAL
                     EDM=   .25E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     1.7126        2.0152        .10788E-03   -1.5446    
   2  Index         1.7593        .76548        .11317E-01   -.70514    
   3  Normalizat    1.1481        .22503        .25023E-03   -.88222    
   4  Prefactor     .96184        .19637        .23512E-03   -.94013    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.4753e-10
Minuit parameter uncertainties:
  1  2.01532
  2  0.770734
  3  0.225217
  4  0.19652
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/60916': 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) = 5277.10969056
delta logL = 0.253700060411

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.713e+00  2.015e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  1.759e+00  7.707e-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:  9.618e-01  1.965e-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.148e+00  2.252e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 2.10
Ra Dec: 160.150 6.285
Photon Index (Free Index): 1.76 +/- 0.77
Photon Flux (Free Index): 9.97e-09 +/- 1.44e-08
Energy Flux (Free Index): 1.35e-05 +/- 2.59e-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/60916/cmap_HighResolution_285984001_286243201_4FGL_J1040.5+0617_daily_bin180.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='6.36e-03', comment='SUCCESS', photon_flux='1.68e-08', energy_flux2='1.35e-05', photon_flux_error='2.05e-08', dlogl='2.54e-01', energy_flux='5.76e-06', photon_flux2='9.97e-09', job_status='DONE', time_completed='2021-09-02 08:19:14.906040', photon_index_error2='0.77', photon_index2='1.76', ts='1.59', fit_tolerance='1e-08', GAL='0.97', photon_index_error='0.00', photon_flux_upper_limit='8.25e-08', energy_flux_error2='2.59e-05', EG='1.14', time_epoch_completed='1630595954.91', return_code='0', job_id='60916', GAL2='0.96', EG2='1.15', return_code2='0', energy_flux_error='7.04e-06', photon_flux_error2='1.44e-08', ts2='2.10', photon_index='2.37' WHERE bin_id='180' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:19:14 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0289>
Subject: Job 60916: <4FGL_J1040.5+0617_daily_bin180> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin180 160.15 6.2848 285984001 286243201 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 :                                   532.17 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             314.30 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   677 sec.
    Turnaround time :                            773 sec.

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

