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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin1581
RA = 160.15, Dec = 6.2848
tmin = 649123201, tmax = 649382401
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='70547', job_status='RUN', time_executed='2021-09-02 08:45:09.132305', time_epoch_executed='1630597509.13' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='1581'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/70547

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/70547/ft1_4FGL_J1040.5+0617_daily_bin1581.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/70547/ft2_4FGL_J1040.5+0617_daily_bin1581.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/70547/ft1_4FGL_J1040.5+0617_daily_bin1581.fits outfile=/scratch/kocevski/70547/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin1581.fits ra=160.15 dec=6.2848 rad=12.0 tmin=649123201.0 tmax=649382401.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.01
user 2.78
sys 0.19

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/70547/ft1_filtered_4FGL_J1040.5+0617_daily_bin1581.fits evtable="EVENTS" scfile=/scratch/kocevski/70547/ft2_4FGL_J1040.5+0617_daily_bin1581.fits sctable="SC_DATA" expcube=/scratch/kocevski/70547/ltcube_649123201_649382401_4FGL_J1040.5+0617_daily_bin1581.fits outfile=/scratch/kocevski/70547/expmap_649123201_649382401_4FGL_J1040.5+0617_daily_bin1581.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/70547/ltcube_649123201_649382401_4FGL_J1040.5+0617_daily_bin1581.fits
.....................!
real 190.52
user 185.26
sys 4.69

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/70547/ft1_filtered_4FGL_J1040.5+0617_daily_bin1581.fits scfile=/scratch/kocevski/70547/ft2_4FGL_J1040.5+0617_daily_bin1581.fits outfile=/scratch/kocevski/70547/cmap_649123201_649382401_4FGL_J1040.5+0617_daily_bin1581.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.39
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/70547/ft1_filtered_4FGL_J1040.5+0617_daily_bin1581.fits scfile=/scratch/kocevski/70547/ft2_4FGL_J1040.5+0617_daily_bin1581.fits outfile=/scratch/kocevski/70547/cmap_HighResolution_649123201_649382401_4FGL_J1040.5+0617_daily_bin1581.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.16

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    24.373       1.0000         .10000E-03   10000.    
     2 'Prefactor '    24.521       1.0000         .10000E-03   10000.    
     3 'norm      '    .10058E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    7.6944       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .11693E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .67371E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .39090E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    2.1337       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    7.4136       1.0000         .10000E-03   10000.    
    11 'Prefactor '    7.9688       1.0000         .10000E-03   10000.    
    12 'Prefactor '    2.0908       1.0000         .10000E-03   10000.    
    13 'norm      '    .65088       1.0000         .10000E-03   10000.    
    14 'Prefactor '    4.3350       1.0000         .10000E-03   10000.    
    15 'norm      '    1.1051       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .11064E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    10.475       1.0000         .10000E-03   10000.    
    18 'Normalizat'    .61871       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.3031       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=   4356.100     FROM MIGRAD    STATUS=CONVERGED    391 CALLS     1674 TOTAL
                     EDM=   .82E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.8%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     24.364        22.489        .24874E-06    .40994E-04
   2  Prefactor     24.530        67.134        .18616E-05    .25307E-04
   3  norm          .10000E-03    11.838        .22722E-07** at limit **
   4  Prefactor     7.6926        17.915        .86693E-06   -.35557E-04
   5  Prefactor     .10000E-03    212.17       -.29857E-05** at limit **
   6  Prefactor     .10002E-03    177.89        .77929E-05** at limit **
   7  Prefactor     .10000E-03    73.335       -.20972E-05** at limit **
   8  norm          2.1334        1.6315        .12395E-07   -.35530E-04
   9  Prefactor     .10000E-03    2.7574        .20244E-07** at limit **
  10  Prefactor     7.4137        4.8853        .98962E-06   -.18627E-03
  11  Prefactor     7.9675        9.8716        .49096E-06    .67343E-04
  12  Prefactor     2.0900        10.349        .13675E-06   -.61057E-04
  13  norm          .65107        .88081       -.89372E-08   -.48290E-04
  14  Prefactor     4.3309        15.377        .28954E-06   -.24703E-04
  15  norm          1.1052        1.4048        .11714E-06   -.24281E-04
  16  Prefactor     .10000E-03    37.230       -.49812E-07** at limit **
  17  norm          10.475        13.258        .10954E-06   -.24703E-04
  18  Normalizat    .61861        .24126       -.14685E-05   -.53535E-05
  19  Prefactor     1.3032        .19294        .12415E-07   -.24847E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 24.3643
  Prefactor  = 24.5303
  norm       = 0.0001
  Prefactor  = 7.69255
  Prefactor  = 0.000100003
  Prefactor  = 0.000100017
  Prefactor  = 0.000100001
  norm       = 2.13339
  Prefactor  = 0.0001
  Prefactor  = 7.41374
  Prefactor  = 7.96752
  Prefactor  = 2.08996
  norm       = 0.651074
  Prefactor  = 4.33086
  norm       = 1.10516
  Prefactor  = 0.0001
  norm       = 10.4753
  Normalizat = 0.618609
  Prefactor  = 1.30317
 **********
 **   18 **HESSE 
 **********

 FCN=   4356.100     FROM HESSE     STATUS=OK           276 CALLS     1950 TOTAL
                     EDM=   .86E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     24.364        22.503        .81138E-04   -1.4720    
   2  Prefactor     24.530        67.344        .80894E-04   -1.4717    
   3  norm          .10000E-03    11.840        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     7.6926        17.719        .14457E-03   -1.5153    
   5  Prefactor     .10000E-03    215.36        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10002E-03    192.09        .21001E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    75.000        .42548E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          2.1334        1.6253        .70812E-04   -1.5416    
   9  Prefactor     .10000E-03    2.7637        .10702E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     7.4137        4.9520        .55507E-03   -1.5163    
  11  Prefactor     7.9675        9.8906        .14204E-03   -1.5143    
  12  Prefactor     2.0900        10.060        .28550E-03   -1.5419    
  13  norm          .65107        .84472        .47505E-03   -1.5547    
  14  Prefactor     4.3309        15.249        .19347E-03   -1.5292    
  15  norm          1.1052        1.3624        .82697E-04   -1.5498    
  16  Prefactor     .10000E-03    37.718        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          10.475        13.260        .12380E-03   -1.5061    
  18  Normalizat    .61861        .27217        .33848E-03   -1.0720    
  19  Prefactor     1.3032        .22161        .20947E-03   -.83213    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 8.61123e-10
Minuit parameter uncertainties:
  1  22.5106
  2  67.5542
  3  6.76138e-06
  4  17.7309
  5  0.00155357
  6  0.00358573
  7  0.00061107
  8  1.62533
  9  4.59961e-07
  10  4.95227
  11  9.89263
  12  9.17307
  13  0.844734
  14  15.2629
  15  1.36247
  16  2.46133e-05
  17  13.2633
  18  0.272763
  19  0.221768
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  7.414e+00  4.952e+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.303e+00  2.218e-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:  6.186e-01  2.728e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 3.82
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 8.96e-08 +/- 5.98e-08
Energy Flux (Fixed Index): 3.07e-05 +/- 2.05e-05

TS (Fixed Index): 3.82
Ra Dec: 160.150 6.285
Photon Flux Upper Limit: 2.10e-07 ph cm-2 s-1
Energy Flux Upper Limit: 1.62e-02 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/70547/likelihoodResults_649123201_649382401_4FGL_J1040.5+0617_daily_bin1581.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) = 4355.71919366
delta logL = 0.380783854474

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 4355.71557828
delta logL = 0.384399234811

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    3.8667       1.0000         .10000E-03   10000.    
     2 'Index     '    3.0443       1.0000          .0000       10.000    
     3 'Normalizat'    .55734       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.3421       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=   4355.716     FROM MIGRAD    STATUS=CONVERGED     55 CALLS      269 TOTAL
                     EDM=   .33E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     3.8691        41.277        .51303E-02    .51816E-03
   2  Index         3.0439        3.3679        .11586        .15247E-03
   3  Normalizat    .55722        .94955E-01    .80220E-01    .49690E-04
   4  Prefactor     1.3423        .74717E-01    .46799E-01   -.11613E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 3.86913
  Index      = 3.0439
  Normalizat = 0.55722
  Prefactor  = 1.34231
 **********
 **   18 **HESSE 
 **********

 FCN=   4355.716     FROM HESSE     STATUS=OK            31 CALLS      300 TOTAL
                     EDM=   .13E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     3.8691        7.2523        .70713E-04   -1.5315    
   2  Index         3.0439        1.2440        .45001E-02   -.40196    
   3  Normalizat    .55722        .26956        .35528E-03   -1.0983    
   4  Prefactor     1.3423        .22979        .20686E-03   -.82058    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.3295e-10
Minuit parameter uncertainties:
  1  7.25396
  2  1.25966
  3  0.270197
  4  0.229966
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/70547': 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) = 4355.71557775
delta logL = 0.384399765603

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  3.869e+00  7.254e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  3.044e+00  1.260e+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.342e+00  2.300e-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:  5.572e-01  2.702e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 4.73
Ra Dec: 160.150 6.285
Photon Index (Free Index): 3.04 +/- 1.26
Photon Flux (Free Index): 1.35e-07 +/- 8.95e-08
Energy Flux (Free Index): 2.63e-05 +/- 1.69e-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/70547/cmap_HighResolution_649123201_649382401_4FGL_J1040.5+0617_daily_bin1581.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.62e-02', comment='SUCCESS', photon_flux='8.96e-08', energy_flux2='2.63e-05', photon_flux_error='5.98e-08', dlogl='3.84e-01', energy_flux='3.07e-05', photon_flux2='1.35e-07', job_status='DONE', time_completed='2021-09-02 08:53:25.060833', photon_index_error2='1.26', photon_index2='3.04', ts='3.82', fit_tolerance='1e-08', GAL='1.30', photon_index_error='0.00', photon_flux_upper_limit='2.10e-07', energy_flux_error2='1.69e-05', EG='0.62', time_epoch_completed='1630598005.06', return_code='0', job_id='70547', GAL2='1.34', EG2='0.56', return_code2='0', energy_flux_error='2.05e-05', photon_flux_error2='8.95e-08', ts2='4.73', photon_index='2.37' WHERE bin_id='1581' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:53:25 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0215>
Subject: Job 70547: <4FGL_J1040.5+0617_daily_bin1581> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin1581> was submitted from host <rhel6-64k> by user <kocevski> in cluster <slac> at Thu Sep  2 08:41:12 2021
Job was executed on host(s) <bullet0215>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:41:47 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:41:47 2021
Terminated at Thu Sep  2 08:53:25 2021
Results reported at Thu Sep  2 08:53:25 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin1581 160.15 6.2848 649123201 649382401 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 :                                   482.14 sec.
    Max Memory :                                 1093 MB
    Average Memory :                             238.39 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   698 sec.
    Turnaround time :                            733 sec.

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

