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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin1084
RA = 160.15, Dec = 6.2848
tmin = 520300801, tmax = 520560001
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='68000', job_status='RUN', time_executed='2021-09-02 08:35:14.395560', time_epoch_executed='1630596914.4' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='1084'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/68000

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/68000/ft1_4FGL_J1040.5+0617_daily_bin1084.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/68000/ft2_4FGL_J1040.5+0617_daily_bin1084.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/68000/ft1_4FGL_J1040.5+0617_daily_bin1084.fits outfile=/scratch/kocevski/68000/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin1084.fits ra=160.15 dec=6.2848 rad=12.0 tmin=520300801.0 tmax=520560001.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 6.07
user 5.81
sys 0.24

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/68000/ft1_filtered_4FGL_J1040.5+0617_daily_bin1084.fits evtable="EVENTS" scfile=/scratch/kocevski/68000/ft2_4FGL_J1040.5+0617_daily_bin1084.fits sctable="SC_DATA" expcube=/scratch/kocevski/68000/ltcube_520300801_520560001_4FGL_J1040.5+0617_daily_bin1084.fits outfile=/scratch/kocevski/68000/expmap_520300801_520560001_4FGL_J1040.5+0617_daily_bin1084.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/68000/ltcube_520300801_520560001_4FGL_J1040.5+0617_daily_bin1084.fits
.....................!
real 189.90
user 185.58
sys 3.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/68000/ft1_filtered_4FGL_J1040.5+0617_daily_bin1084.fits scfile=/scratch/kocevski/68000/ft2_4FGL_J1040.5+0617_daily_bin1084.fits outfile=/scratch/kocevski/68000/cmap_520300801_520560001_4FGL_J1040.5+0617_daily_bin1084.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.15

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

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10007E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    .10006E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .90330       1.0000         .10000E-03   10000.    
     5 'Prefactor '    67.713       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10007E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10010E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    1.8287       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10008E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    5.2289       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .21025       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    .36621E-01   1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.8097       1.0000         .10000E-01   10.000    
    19 'Prefactor '    .96591       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=   5203.509     FROM MIGRAD    STATUS=CONVERGED    393 CALLS     1965 TOTAL
                     EDM=   .32E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  5.9%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    3.1156       -.50243E-06** at limit **
   2  Prefactor     .10000E-03    48.725        .88637E-06** at limit **
   3  norm          .10000E-03    4.3849       -.52132E-06** at limit **
   4  Prefactor     .90116        14.683        .42575E-05   -.87404E-04
   5  Prefactor     67.784        61.146       -.47171E-05   -.15804E-03
   6  Prefactor     .10000E-03    32.064       -.36417E-05** at limit **
   7  Prefactor     .10000E-03    17.875       -.28224E-05** at limit **
   8  norm          1.8288        1.8495       -.66685E-08   -.86501E-04
   9  Prefactor     .10000E-03    2.6904        .18310E-06** at limit **
  10  Prefactor     .10000E-03    4.1920       -.50587E-06** at limit **
  11  Prefactor     5.2294        6.6174       -.31748E-06   -.20099E-04
  12  Prefactor     .10000E-03    6.3660        .14577E-06** at limit **
  13  norm          .21033        .55884        .38045E-06    .54441E-03
  14  Prefactor     .10000E-03    4.7608       -.85583E-07** at limit **
  15  norm          .39746E-01    .71503        .72626E-07   -.17481E-03
  16  Prefactor     .10000E-03    22.263        .18887E-05** at limit **
  17  norm          .10000E-03    6.5224        .36117E-06** at limit **
  18  Normalizat    1.8094        .27380        .42506E-05   -.30001E-03
  19  Prefactor     .96611        .23090       -.56782E-05   -.19458E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.901157
  Prefactor  = 67.7836
  Prefactor  = 0.000100001
  Prefactor  = 0.000100001
  norm       = 1.82881
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 5.22945
  Prefactor  = 0.0001
  norm       = 0.210334
  Prefactor  = 0.0001
  norm       = 0.0397464
  Prefactor  = 0.0001
  norm       = 0.0001
  Normalizat = 1.80944
  Prefactor  = 0.966107
 **********
 **   18 **HESSE 
 **********

 FCN=   5203.509     FROM HESSE     STATUS=OK           264 CALLS     2229 TOTAL
                     EDM=   .21E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    3.1229        .12448E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    48.832        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .10000E-03    4.3931        .14766E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .90116        14.795        .25639E-02   -1.5518    
   5  Prefactor     67.784        61.639        .24388E-03   -1.4059    
   6  Prefactor     .10000E-03    32.395        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    18.157        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          1.8288        1.8356        .94157E-04   -1.5437    
   9  Prefactor     .10000E-03    2.6968        .11558E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    4.3633        .28814E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     5.2294        6.6055        .17579E-03   -1.5251    
  12  Prefactor     .10000E-03    6.4163        .17769E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .21033        .55078        .84181E-04   -1.5616    
  14  Prefactor     .10000E-03    4.7698        .15352E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          .39746E-01    4.8661        .11687E-02   -1.5668    
  16  Prefactor     .10000E-03    22.482        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .10000E-03    6.5555        .17997E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    1.8094        .28425        .25146E-03   -.69417    
  19  Prefactor     .96611        .23978        .28251E-03   -.93868    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.10124e-08
Minuit parameter uncertainties:
  1  1.65348e-05
  2  0.000143916
  3  1.75318e-05
  4  7.30441
  5  61.6968
  6  0.000414926
  7  0.000200365
  8  1.83561
  9  7.56363e-06
  10  2.29549e-05
  11  6.60645
  12  1.12396e-06
  13  0.550796
  14  1.86398e-05
  15  0.878533
  16  0.000183224
  17  1.66385e-05
  18  0.284511
  19  0.240046
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.000e-04  2.295e-05  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.661e-01  2.400e-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.809e+00  2.845e-01  1.000e-02  1.000e+01 ( 1.000e+00)


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

Saving results to:
/scratch/kocevski/68000/likelihoodResults_520300801_520560001_4FGL_J1040.5+0617_daily_bin1084.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): 102
logL (Free Index) = 5203.5100823
delta logL = -0.00109346113368

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 5203.50899344
delta logL = -4.60435967398e-06

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10537E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.4169       1.0000          .0000       10.000    
     3 'Normalizat'    1.8086       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .96684       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=   5203.509     FROM MIGRAD    STATUS=CONVERGED     63 CALLS      225 TOTAL
                     EDM=   .13E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10001E-03    4.8628        .38434E-01** at limit **
   2  Index         2.4729        6.1138        .50000       -.11141E-03
   3  Normalizat    1.8094        .83114E-02    .56874E-01    .17684E-03
   4  Prefactor     .96610        .71839E-02    .45851E-01    .20276E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100008
  Index      = 2.47292
  Normalizat = 1.80945
  Prefactor  = 0.966104
 **********
 **   18 **HESSE 
 **********

 FCN=   5203.509     FROM HESSE     STATUS=NOT POSDEF    33 CALLS      258 TOTAL
                     EDM=   .12E-05    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10001E-03    293.66        .22937E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.4729        6.2361        .50000       -.52987    
   3  Normalizat    1.8094        .47592E-01    .25146E-03   -.69417    
   4  Prefactor     .96610        .41103E-01    .28251E-03   -.93868    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 1.1977e-06
Minuit parameter uncertainties:
  1  0.00313507
  2  31.5253
  3  0.0475933
  4  0.0411038
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/68000': 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): 102
logL (Free Index) = 5203.50898632
delta logL = 2.51886558544e-06

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.000e-04  3.135e-03  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.473e+00  3.153e+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.661e-01  4.110e-02  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.809e+00  4.759e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
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/68000/cmap_HighResolution_520300801_520560001_4FGL_J1040.5+0617_daily_bin1084.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='8.43e-03', job_status='DONE', photon_flux_upper_limit='1.09e-07', time_completed='2021-09-02 08:44:39.272804', job_id='68000', GAL2='0.97', fit_tolerance='1e-08', EG2='1.81', EG='1.81', time_epoch_completed='1630597479.27', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.97', dlogl='2.52e-06', ts2='-0.00', photon_index_error='0.00', photon_index='2.37' WHERE bin_id='1084' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:44:39 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0243>
Subject: Job 68000: <4FGL_J1040.5+0617_daily_bin1084> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin1084> was submitted from host <rhel6-64j> by user <kocevski> in cluster <slac> at Thu Sep  2 08:31:29 2021
Job was executed on host(s) <bullet0243>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:32:48 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:32:48 2021
Terminated at Thu Sep  2 08:44:40 2021
Results reported at Thu Sep  2 08:44:40 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin1084 160.15 6.2848 520300801 520560001 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 :                                   556.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             308.30 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   717 sec.
    Turnaround time :                            791 sec.

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

