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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin240
RA = 160.15, Dec = 6.2848
tmin = 301536001, tmax = 301795201
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='62799', job_status='RUN', time_executed='2021-09-02 08:15:36.065984', time_epoch_executed='1630595736.07' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='240'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/62799

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/62799/ft1_4FGL_J1040.5+0617_daily_bin240.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/62799/ft2_4FGL_J1040.5+0617_daily_bin240.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/62799/ft1_4FGL_J1040.5+0617_daily_bin240.fits outfile=/scratch/kocevski/62799/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin240.fits ra=160.15 dec=6.2848 rad=12.0 tmin=301536001.0 tmax=301795201.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 4.62
user 4.37
sys 0.21

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/62799/ft1_filtered_4FGL_J1040.5+0617_daily_bin240.fits" evtable="EVENTS" scfile=/scratch/kocevski/62799/ft2_4FGL_J1040.5+0617_daily_bin240.fits sctable="SC_DATA" outfile=/scratch/kocevski/62799/ltcube_301536001_301795201_4FGL_J1040.5+0617_daily_bin240.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/62799/ft2_4FGL_J1040.5+0617_daily_bin240.fits
.....................!
real 16.08
user 12.00
sys 0.35

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/62799/ft1_filtered_4FGL_J1040.5+0617_daily_bin240.fits evtable="EVENTS" scfile=/scratch/kocevski/62799/ft2_4FGL_J1040.5+0617_daily_bin240.fits sctable="SC_DATA" expcube=/scratch/kocevski/62799/ltcube_301536001_301795201_4FGL_J1040.5+0617_daily_bin240.fits outfile=/scratch/kocevski/62799/expmap_301536001_301795201_4FGL_J1040.5+0617_daily_bin240.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/62799/ltcube_301536001_301795201_4FGL_J1040.5+0617_daily_bin240.fits
.....................!
real 191.97
user 186.56
sys 4.75

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/62799/ft1_filtered_4FGL_J1040.5+0617_daily_bin240.fits scfile=/scratch/kocevski/62799/ft2_4FGL_J1040.5+0617_daily_bin240.fits outfile=/scratch/kocevski/62799/cmap_301536001_301795201_4FGL_J1040.5+0617_daily_bin240.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.36
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/62799/ft1_filtered_4FGL_J1040.5+0617_daily_bin240.fits scfile=/scratch/kocevski/62799/ft2_4FGL_J1040.5+0617_daily_bin240.fits outfile=/scratch/kocevski/62799/cmap_HighResolution_301536001_301795201_4FGL_J1040.5+0617_daily_bin240.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/62799/ft1_filtered_4FGL_J1040.5+0617_daily_bin240.fits evtable="EVENTS" scfile=/scratch/kocevski/62799/ft2_4FGL_J1040.5+0617_daily_bin240.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/62799/Model_4FGL_J1040.5+0617_daily_bin240.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/62799/ft1_filtered_4FGL_J1040.5+0617_daily_bin240.fits.....................!
real 57.51
user 56.01
sys 1.20

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10008E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    20.585       1.0000         .10000E-03   10000.    
     3 'norm      '    .10035E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .60559E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    62.367       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10198E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10017E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    1.6416       1.0000         .10000E-03   10000.    
    10 'Prefactor '    4.8347       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    14.705       1.0000         .10000E-03   10000.    
    13 'norm      '    .10005E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    12.445       1.0000         .10000E-03   10000.    
    15 'norm      '    .10434       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    7.5058       1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.2086       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.0276       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=   5923.319     FROM MIGRAD    STATUS=CONVERGED    385 CALLS     1907 TOTAL
                     EDM=   .13E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  3.8%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    4.0069       -.11110E-06** at limit **
   2  Prefactor     20.582        61.137       -.11669E-06    .98586E-05
   3  norm          .10000E-03    5.7395       -.24201E-06** at limit **
   4  Prefactor     .10013E-03    15.799        .47373E-05** at limit **
   5  Prefactor     62.275        56.670        .52110E-05    .27114E-03
   6  Prefactor     .10000E-03    36.787       -.32983E-06** at limit **
   7  Prefactor     .10000E-03    8.2317       -.31448E-06** at limit **
   8  norm          .10000E-03    .29185        .28113E-07** at limit **
   9  Prefactor     1.6429        7.6321        .39273E-06    .97765E-04
  10  Prefactor     4.8349        4.7859        .65540E-06    .12538E-02
  11  Prefactor     .10000E-03    4.4130        .12422E-06** at limit **
  12  Prefactor     14.709        11.712       -.26617E-06    .10290E-03
  13  norm          .10000E-03    .22558        .40866E-08** at limit **
  14  Prefactor     12.447        8.7528        .76483E-07    .74570E-04
  15  norm          .10611        .91668       -.64894E-06    .66922E-03
  16  Prefactor     .10000E-03    10.165        .20751E-06** at limit **
  17  norm          7.5065        9.6928       -.40078E-07   -.48376E-06
  18  Normalizat    1.2083        .21838        .28115E-05    .36051E-03
  19  Prefactor     1.0278        .17415       -.26535E-05    .43931E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 20.5823
  norm       = 0.0001
  Prefactor  = 0.000100131
  Prefactor  = 62.2754
  Prefactor  = 0.000100001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 1.64289
  Prefactor  = 4.83489
  Prefactor  = 0.0001
  Prefactor  = 14.7086
  norm       = 0.0001
  Prefactor  = 12.4465
  norm       = 0.106109
  Prefactor  = 0.0001
  norm       = 7.50646
  Normalizat = 1.20832
  Prefactor  = 1.02775
 **********
 **   18 **HESSE 
 **********

 FCN=   5923.319     FROM HESSE     STATUS=OK           272 CALLS     2179 TOTAL
                     EDM=   .69E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    4.0121        .15050E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     20.582        61.155        .88279E-04   -1.4800    
   3  norm          .10000E-03    5.7539        .18021E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10013E-03    30.161        .38815E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     62.275        58.683        .25405E-03   -1.4128    
   6  Prefactor     .10000E-03    36.888        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    8.2640        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .10000E-03    .29236        .40588E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     1.6429        7.6128        .32976E-03   -1.5452    
  10  Prefactor     4.8349        5.0231        .78877E-03   -1.5268    
  11  Prefactor     .10000E-03    4.4620        .15781E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     14.709        11.737        .10445E-03   -1.4941    
  13  norm          .10000E-03    .44726        .67897E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     12.447        8.4186        .11355E-03   -1.5002    
  15  norm          .10611        5.5168        .12705E-02   -1.5643    
  16  Prefactor     .10000E-03    10.185        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          7.5065        9.6850        .14639E-03   -1.5160    
  18  Normalizat    1.2083        .24821        .26894E-03   -.86346    
  19  Prefactor     1.0278        .19678        .24361E-03   -.91810    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.93913e-09
Minuit parameter uncertainties:
  1  2.33799e-05
  2  61.3423
  3  5.57249e-05
  4  0.00397126
  5  58.7375
  6  0.000329732
  7  6.86558e-05
  8  3.85332e-07
  9  7.07431
  10  5.02357
  11  1.67323e-05
  12  11.7386
  13  5.0494e-07
  14  8.41936
  15  1.52964
  16  1.88336e-05
  17  9.687
  18  0.248454
  19  0.196918
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  4.835e+00  5.024e+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.028e+00  1.969e-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.208e+00  2.485e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 1.20
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 5.84e-08 +/- 6.06e-08
Energy Flux (Fixed Index): 2.00e-05 +/- 2.08e-05

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

Saving results to:
/scratch/kocevski/62799/likelihoodResults_301536001_301795201_4FGL_J1040.5+0617_daily_bin240.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) = 5923.29914949
delta logL = 0.0200871541247

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5923.29287601
delta logL = 0.0263606409862

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    4.2798       1.0000         .10000E-03   10000.    
     2 'Index     '    2.5307       1.0000          .0000       10.000    
     3 'Normalizat'    1.1995       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0330       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=   5923.293     FROM MIGRAD    STATUS=CONVERGED     57 CALLS      218 TOTAL
                     EDM=   .11E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     4.2787        120.47        .48687E-02    .47805E-03
   2  Index         2.5312        6.2249        .14927        .92313E-04
   3  Normalizat    1.1996        .77726E-01    .60987E-01   -.28913E-05
   4  Prefactor     1.0330        .67557E-01    .41026E-01   -.89799E-06
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 4.27875
  Index      = 2.53121
  Normalizat = 1.19961
  Prefactor  = 1.03296
 **********
 **   18 **HESSE 
 **********

 FCN=   5923.293     FROM HESSE     STATUS=OK            33 CALLS      251 TOTAL
                     EDM=   .98E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     4.2787        5.5243        .14403E-03   -1.5294    
   2  Index         2.5312        .78448        .80841E-02   -.51641    
   3  Normalizat    1.1996        .23672        .26974E-03   -.86615    
   4  Prefactor     1.0330        .19747        .24307E-03   -.91639    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 9.79608e-12
Minuit parameter uncertainties:
  1  5.525
  2  0.788802
  3  0.236932
  4  0.197608
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/62799': 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) = 5923.29287556
delta logL = 0.0263610849388

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  4.279e+00  5.525e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.531e+00  7.888e-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:  1.033e+00  1.976e-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.200e+00  2.369e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.27
Ra Dec: 160.150 6.285
Photon Index (Free Index): 2.53 +/- 0.79
Photon Flux (Free Index): 6.57e-08 +/- 6.73e-08
Energy Flux (Free Index): 1.84e-05 +/- 2.01e-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/62799/cmap_HighResolution_301536001_301795201_4FGL_J1040.5+0617_daily_bin240.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.34e-02', comment='SUCCESS', photon_flux='5.84e-08', energy_flux2='1.84e-05', photon_flux_error='6.06e-08', dlogl='2.64e-02', energy_flux='2.00e-05', photon_flux2='6.57e-08', job_status='DONE', time_completed='2021-09-02 08:25:08.856300', photon_index_error2='0.79', photon_index2='2.53', ts='1.20', fit_tolerance='1e-08', GAL='1.03', photon_index_error='0.00', photon_flux_upper_limit='1.74e-07', energy_flux_error2='2.01e-05', EG='1.21', time_epoch_completed='1630596308.86', return_code='0', job_id='62799', GAL2='1.03', EG2='1.20', return_code2='0', energy_flux_error='2.08e-05', photon_flux_error2='6.73e-08', ts2='1.27', photon_index='2.37' WHERE bin_id='240' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:25:08 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0199>
Subject: Job 62799: <4FGL_J1040.5+0617_daily_bin240> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin240 160.15 6.2848 301536001 301795201 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 :                                   565.25 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             280.67 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   788 sec.
    Turnaround time :                            835 sec.

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

