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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin181
RA = 160.15, Dec = 6.2848
tmin = 286243201, tmax = 286502401
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='60925', job_status='RUN', time_executed='2021-09-02 08:11:25.948188', time_epoch_executed='1630595485.95' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='181'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/60925

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/60925/ft1_4FGL_J1040.5+0617_daily_bin181.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/60925/ft2_4FGL_J1040.5+0617_daily_bin181.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/60925/ft1_4FGL_J1040.5+0617_daily_bin181.fits outfile=/scratch/kocevski/60925/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin181.fits ra=160.15 dec=6.2848 rad=12.0 tmin=286243201.0 tmax=286502401.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.50
user 3.24
sys 0.22

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/60925/ft1_filtered_4FGL_J1040.5+0617_daily_bin181.fits evtable="EVENTS" scfile=/scratch/kocevski/60925/ft2_4FGL_J1040.5+0617_daily_bin181.fits sctable="SC_DATA" expcube=/scratch/kocevski/60925/ltcube_286243201_286502401_4FGL_J1040.5+0617_daily_bin181.fits outfile=/scratch/kocevski/60925/expmap_286243201_286502401_4FGL_J1040.5+0617_daily_bin181.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/60925/ltcube_286243201_286502401_4FGL_J1040.5+0617_daily_bin181.fits
.....................!
real 157.84
user 153.06
sys 4.38

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/60925/ft1_filtered_4FGL_J1040.5+0617_daily_bin181.fits scfile=/scratch/kocevski/60925/ft2_4FGL_J1040.5+0617_daily_bin181.fits outfile=/scratch/kocevski/60925/cmap_286243201_286502401_4FGL_J1040.5+0617_daily_bin181.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.66
user 0.36
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/60925/ft1_filtered_4FGL_J1040.5+0617_daily_bin181.fits scfile=/scratch/kocevski/60925/ft2_4FGL_J1040.5+0617_daily_bin181.fits outfile=/scratch/kocevski/60925/cmap_HighResolution_286243201_286502401_4FGL_J1040.5+0617_daily_bin181.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.74
user 0.40
sys 0.16

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    7.1854       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    9.9516       1.0000         .10000E-03   10000.    
     5 'Prefactor '    39.650       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10168E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10180E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    .14824E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    8.5048       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .54315       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .12931E-01   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    1.3033       1.0000         .10000E-03   10000.    
    14 'Prefactor '    4.3509       1.0000         .10000E-03   10000.    
    15 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    .51458E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    22.263       1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.0832       1.0000         .10000E-01   10.000    
    19 'Prefactor '    .94763       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=   4829.200     FROM MIGRAD    STATUS=CONVERGED    404 CALLS     1946 TOTAL
                     EDM=   .20E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     7.1869        14.273        .37410E-02    .14412E-02
   2  Prefactor     .10000E-03    21.803        .90712E-02** at limit **
   3  norm          .10000E-03    8.9874        .90712E-02** at limit **
   4  Prefactor     9.9481        13.539        .31756E-02    .12748E-02
   5  Prefactor     39.649        49.288        .15914E-02    .63400E-03
   6  Prefactor     .10001E-03    45.708        .90712E-02** at limit **
   7  Prefactor     .10001E-03    27.898        .90712E-02** at limit **
   8  norm          .10000E-03    .79161        .44278E-01** at limit **
   9  Prefactor     8.5057        8.8449        .34364E-02   -.32448E-02
  10  Prefactor     .54355        2.3867        .11446E-01    .12830E-02
  11  Prefactor     .10000E-03    7.2247        .57705E-01** at limit **
  12  Prefactor     .10000E-03    2.0957        .90712E-02** at limit **
  13  norm          1.3035        .65909        .79600E-02   -.13234E-03
  14  Prefactor     4.3500        8.4989        .48276E-02    .78336E-03
  15  norm          .10000E-03    .49860        .90712E-02** at limit **
  16  Prefactor     .10000E-03    8.4596        .10572    ** at limit **
  17  norm          22.263        15.461        .21223E-02    .52471E-04
  18  Normalizat    1.0831        .20751        .55950E-01   -.15688E-03
  19  Prefactor     .94765        .17472        .45609E-01   -.15818E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 7.1869
  Prefactor  = 0.000100003
  norm       = 0.0001
  Prefactor  = 9.9481
  Prefactor  = 39.6485
  Prefactor  = 0.000100014
  Prefactor  = 0.000100008
  norm       = 0.0001
  Prefactor  = 8.50571
  Prefactor  = 0.543551
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 1.30347
  Prefactor  = 4.34999
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 22.2632
  Normalizat = 1.0831
  Prefactor  = 0.947652
 **********
 **   18 **HESSE 
 **********

 FCN=   4829.200     FROM HESSE     STATUS=OK           274 CALLS     2220 TOTAL
                     EDM=   .13E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     7.1869        14.232        .74821E-03   -1.5172    
   2  Prefactor     .10000E-03    21.823        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .10000E-03    8.9968        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     9.9481        13.462        .63511E-03   -1.5077    
   5  Prefactor     39.649        49.314        .63656E-04   -1.4448    
   6  Prefactor     .10001E-03    45.718        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10001E-03    27.970        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .10000E-03    14.529        .11743E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     8.5057        8.7770        .13746E-03   -1.5125    
  10  Prefactor     .54355        2.3627        .20483E-03   -1.5561    
  11  Prefactor     .10000E-03    9.1690        .49846E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    2.1037        .98235E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          1.3035        .66627        .35241E-04   -1.5480    
  14  Prefactor     4.3500        8.6001        .19311E-03   -1.5291    
  15  norm          .10000E-03    .51361        .95725E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     .10000E-03    36.606        .39172E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          22.263        15.490        .84890E-04   -1.4764    
  18  Normalizat    1.0831        .24684        .24740E-03   -.90296    
  19  Prefactor     .94765        .20741        .23156E-03   -.94495    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.3433e-08
Minuit parameter uncertainties:
  1  14.2386
  2  0.00051356
  3  3.63007e-05
  4  13.4657
  5  49.3647
  6  0.00157247
  7  0.000956567
  8  2.84734e-05
  9  8.77837
  10  2.26643
  11  0.000103935
  12  6.91248e-06
  13  0.666271
  14  8.60255
  15  4.98387e-07
  16  0.000263993
  17  15.4924
  18  0.247099
  19  0.207585
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  5.436e-01  2.266e+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.477e-01  2.076e-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.083e+00  2.471e-01  1.000e-02  1.000e+01 ( 1.000e+00)


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

Saving results to:
/scratch/kocevski/60925/likelihoodResults_286243201_286502401_4FGL_J1040.5+0617_daily_bin181.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) = 4827.3225814
delta logL = 1.87702503174

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 4827.30365186
delta logL = 1.89595456912

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .91679       1.0000         .10000E-03   10000.    
     2 'Index     '    .91971       1.0000          .0000       10.000    
     3 'Normalizat'    1.0743       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .95237       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=   4827.304     FROM MIGRAD    STATUS=CONVERGED     53 CALLS      212 TOTAL
                     EDM=   .93E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .91839        1.0883        .12868E-01   -.62736E-03
   2  Index         .92003        .37813        .17273       -.18849E-04
   3  Normalizat    1.0744        .19542        .56049E-01    .47355E-04
   4  Prefactor     .95225        .17348        .45669E-01    .10021E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.918392
  Index      = 0.920032
  Normalizat = 1.07445
  Prefactor  = 0.952249
 **********
 **   18 **HESSE 
 **********

 FCN=   4827.304     FROM HESSE     STATUS=OK            33 CALLS      245 TOTAL
                     EDM=   .39E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .91839        1.9170        .64532E-04   -1.5516    
   2  Index         .92003        .66359        .74573E-02   -.95445    
   3  Normalizat    1.0744        .23119        .24784E-03   -.90577    
   4  Prefactor     .95225        .20543        .23096E-03   -.94339    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.86277e-11
Minuit parameter uncertainties:
  1  1.91709
  2  0.66956
  3  0.23141
  4  0.205596
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/60925': 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) = 4827.30365121
delta logL = 1.89595521962

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  9.184e-01  1.917e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  9.200e-01  6.696e-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.522e-01  2.056e-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.074e+00  2.314e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 3.86
Ra Dec: 160.150 6.285
Photon Index (Free Index): 0.92 +/- 0.67
Photon Flux (Free Index): 6.16e-09 +/- 7.75e-09
Energy Flux (Free Index): 1.07e-04 +/- 1.35e-04

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/60925/cmap_HighResolution_286243201_286502401_4FGL_J1040.5+0617_daily_bin181.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='6.56e-03', comment='SUCCESS', energy_flux2='1.07e-04', dlogl='1.90e+00', photon_flux2='6.16e-09', job_status='DONE', time_completed='2021-09-02 08:18:56.276940', photon_index_error2='0.67', photon_index2='0.92', ts='0.07', fit_tolerance='1e-08', GAL='0.95', photon_index_error='0.00', photon_flux_upper_limit='8.51e-08', energy_flux_error2='1.35e-04', EG='1.08', time_epoch_completed='1630595936.28', return_code='0', job_id='60925', GAL2='0.95', EG2='1.07', return_code2='0', photon_flux_error2='7.75e-09', ts2='3.86', photon_index='2.37' WHERE bin_id='181' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:18:56 PDT 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0026>
Subject: Job 60925: <4FGL_J1040.5+0617_daily_bin181> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin181> 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) <bullet0026>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:08:02 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:08:02 2021
Terminated at Thu Sep  2 08:18:57 2021
Results reported at Thu Sep  2 08:18:57 2021

Your job looked like:

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

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

