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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin439
RA = 160.15, Dec = 6.2848
tmin = 353116801, tmax = 353376001
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='64327', job_status='RUN', time_executed='2021-09-02 08:21:01.443032', time_epoch_executed='1630596061.44' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='439'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/64327

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/64327/ft1_4FGL_J1040.5+0617_daily_bin439.fits


Retrieving the FT1 file...

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

Retrieving 48 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/64327/ft2_4FGL_J1040.5+0617_daily_bin439.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/64327/ft1_4FGL_J1040.5+0617_daily_bin439.fits outfile=/scratch/kocevski/64327/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin439.fits ra=160.15 dec=6.2848 rad=12.0 tmin=353116801.0 tmax=353376001.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.46
user 3.20
sys 0.23

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/64327/ft2_4FGL_J1040.5+0617_daily_bin439.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/64327/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin439.fits evtable="EVENTS" outfile="/scratch/kocevski/64327/ft1_filtered_4FGL_J1040.5+0617_daily_bin439.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.56
user 0.34
sys 0.17

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/64327/ft1_filtered_4FGL_J1040.5+0617_daily_bin439.fits evtable="EVENTS" scfile=/scratch/kocevski/64327/ft2_4FGL_J1040.5+0617_daily_bin439.fits sctable="SC_DATA" expcube=/scratch/kocevski/64327/ltcube_353116801_353376001_4FGL_J1040.5+0617_daily_bin439.fits outfile=/scratch/kocevski/64327/expmap_353116801_353376001_4FGL_J1040.5+0617_daily_bin439.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/64327/ltcube_353116801_353376001_4FGL_J1040.5+0617_daily_bin439.fits
.....................!
real 191.13
user 185.94
sys 4.72

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/64327/ft1_filtered_4FGL_J1040.5+0617_daily_bin439.fits scfile=/scratch/kocevski/64327/ft2_4FGL_J1040.5+0617_daily_bin439.fits outfile=/scratch/kocevski/64327/cmap_353116801_353376001_4FGL_J1040.5+0617_daily_bin439.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/64327/ft1_filtered_4FGL_J1040.5+0617_daily_bin439.fits scfile=/scratch/kocevski/64327/ft2_4FGL_J1040.5+0617_daily_bin439.fits outfile=/scratch/kocevski/64327/cmap_HighResolution_353116801_353376001_4FGL_J1040.5+0617_daily_bin439.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.57
user 0.39
sys 0.16

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    34.892       1.0000         .10000E-03   10000.    
     2 'Prefactor '    8.0470       1.0000         .10000E-03   10000.    
     3 'norm      '    .10133E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10723E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10041E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10158E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10576E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .14832       1.0000         .10000E-03   10000.    
    10 'Prefactor '    5.8162       1.0000         .10000E-03   10000.    
    11 'Prefactor '    15.498       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .31155       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .20931E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    3.9429       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .13823E-02   1.0000         .10000E-03   10000.    
    17 'norm      '    .11418E-03   1.0000         .10000E-03   10000.    
    18 'Normalizat'    .83862       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.1614       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=   6621.720     FROM MIGRAD    STATUS=CONVERGED    392 CALLS     1657 TOTAL
                     EDM=   .31E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .1%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     34.914        14.046       -.39793E-05   -.16511E-04
   2  Prefactor     8.0921        30.042        .67465E-04    .14639E-05
   3  norm          .10000E-03    4.6910        .47195E-06** at limit **
   4  Prefactor     .10000E-03    7.2394       -.29717E-06** at limit **
   5  Prefactor     .10000E-03    14.274        .58910E-05** at limit **
   6  Prefactor     .10000E-03    16.520       -.86849E-05** at limit **
   7  Prefactor     .10000E-03    4.8122       -.37232E-06** at limit **
   8  norm          .10000E-03    .21847       -.48901E-07** at limit **
   9  Prefactor     .13123        2.1428       -.40290E-06   -.71165E-03
  10  Prefactor     5.8163        3.0597        .18038E-06   -.23164E-03
  11  Prefactor     15.467        9.8532        .18223E-05   -.13073E-03
  12  Prefactor     .10000E-03    2.1874        .39720E-07** at limit **
  13  norm          .31151        .38722        .62258E-07   -.10364E-02
  14  Prefactor     .10000E-03    6.0361        .62780E-06** at limit **
  15  norm          3.9439        1.9954        .44216E-07   -.89309E-03
  16  Prefactor     .10000E-03    83.668        .19729E-04** at limit **
  17  norm          .10000E-03    6.1268       -.79107E-08** at limit **
  18  Normalizat    .83884        .19005       -.26847E-05   -.20420E-03
  19  Prefactor     1.1613        .15746       -.98634E-06   -.24722E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 34.9137
  Prefactor  = 8.09207
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.131232
  Prefactor  = 5.81626
  Prefactor  = 15.4675
  Prefactor  = 0.0001
  norm       = 0.311508
  Prefactor  = 0.0001
  norm       = 3.9439
  Prefactor  = 0.0001
  norm       = 0.0001
  Normalizat = 0.838838
  Prefactor  = 1.16131
 **********
 **   18 **HESSE 
 **********

 FCN=   6621.720     FROM HESSE     STATUS=OK           270 CALLS     1927 TOTAL
                     EDM=   .42E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     34.914        14.048        .67842E-04   -1.4526    
   2  Prefactor     8.0921        30.006        .14134E-03   -1.5139    
   3  norm          .10000E-03    4.6939        .17213E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    7.4676        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    14.286        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    16.527        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    4.8172        .17433E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .10000E-03    .21970        .37135E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .13123        24.078        .22908E-02   -1.5636    
  10  Prefactor     5.8163        3.0635        .98842E-04   -1.5226    
  11  Prefactor     15.467        9.8921        .10174E-03   -1.4921    
  12  Prefactor     .10000E-03    2.1933        .11750E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .31151        .35660        .53532E-03   -1.5596    
  14  Prefactor     .10000E-03    6.1207        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          3.9439        1.9935        .75788E-04   -1.5311    
  16  Prefactor     .10000E-03    86.959        .41068E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .10000E-03    6.1417        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    .83884        .22063        .28918E-03   -.98644    
  19  Prefactor     1.1613        .18383        .21737E-03   -.87530    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.19402e-09
Minuit parameter uncertainties:
  1  14.0493
  2  30.0622
  3  2.85639e-05
  4  9.37111e-05
  5  3.47035e-05
  6  4.34161e-05
  7  1.26604e-05
  8  2.08966e-06
  9  3.55527
  10  3.06356
  11  9.89315
  12  4.25667e-06
  13  0.356604
  14  2.28393e-05
  15  1.99357
  16  7.06888e-05
  17  9.08991e-06
  18  0.220864
  19  0.183931
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  5.816e+00  3.064e+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.161e+00  1.839e-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:  8.388e-01  2.209e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 9.98
Ra Dec: 160.150 6.285
Photon Index (Fixed Index): 2.37 +/- 0.00
Photon Flux (Fixed Index): 7.03e-08 +/- 3.70e-08
Energy Flux (Fixed Index): 2.41e-05 +/- 1.27e-05

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) = 6621.69189125
delta logL = 0.0277619446151

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6621.68540148
delta logL = 0.0342517187382

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    6.1851       1.0000         .10000E-03   10000.    
     2 'Index     '    2.2515       1.0000          .0000       10.000    
     3 'Normalizat'    .84660       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1574       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.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   6621.685     FROM MIGRAD    STATUS=CONVERGED     81 CALLS      232 TOTAL
                     EDM=   .15E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     6.1853        3.5553        .10441E-03   -.19049E-02
   2  Index         2.2516        .44705        .63921E-02   -.33732E-03
   3  Normalizat    .84663        .21135        .28799E-03    .13201E-03
   4  Prefactor     1.1574        .18264        .21770E-03    .20681E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 6.18534
  Index      = 2.25161
  Normalizat = 0.846625
  Prefactor  = 1.15739
 **********
 **   18 **HESSE 
 **********

 FCN=   6621.685     FROM HESSE     STATUS=OK            23 CALLS      255 TOTAL
                     EDM=   .15E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     6.1853        3.5132        .20883E-04   -1.5211    
   2  Index         2.2516        .44150        .25569E-03   -.58198    
   3  Normalizat    .84663        .21148        .11520E-04   -.98362    
   4  Prefactor     1.1574        .18277        .43540E-04   -.87653    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.53905e-09
Minuit parameter uncertainties:
  1  3.5133
  2  0.44233
  3  0.211691
  4  0.182868
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/64327': 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) = 6621.6854014
delta logL = 0.0342517960644

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  6.185e+00  3.513e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.252e+00  4.423e-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.157e+00  1.829e-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:  8.466e-01  2.117e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 10.03
Ra Dec: 160.150 6.285
Photon Index (Free Index): 2.25 +/- 0.44
Photon Flux (Free Index): 6.35e-08 +/- 4.32e-08
Energy Flux (Free Index): 2.60e-05 +/- 1.65e-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/64327/cmap_HighResolution_353116801_353376001_4FGL_J1040.5+0617_daily_bin439.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='7.03e-08', energy_flux2='2.60e-05', photon_flux_error='3.70e-08', dlogl='3.43e-02', energy_flux='2.41e-05', photon_flux2='6.35e-08', job_status='DONE', time_completed='2021-09-02 08:29:55.279203', photon_index_error2='0.44', photon_index2='2.25', ts='9.98', fit_tolerance='1e-08', GAL='1.16', photon_index_error='0.00', energy_flux_error2='1.65e-05', EG='0.84', time_epoch_completed='1630596595.28', return_code='0', job_id='64327', GAL2='1.16', EG2='0.85', return_code2='0', energy_flux_error='1.27e-05', photon_flux_error2='4.32e-08', ts2='10.03', photon_index='2.37' WHERE bin_id='439' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:29:55 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0006>
Subject: Job 64327: <4FGL_J1040.5+0617_daily_bin439> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin439> was submitted from host <rhel6-64p> by user <kocevski> in cluster <slac> at Thu Sep  2 08:16:23 2021
Job was executed on host(s) <bullet0006>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:17:44 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:17:44 2021
Terminated at Thu Sep  2 08:29:55 2021
Results reported at Thu Sep  2 08:29:55 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin439 160.15 6.2848 353116801 353376001 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1040.5+0617 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   532.00 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             250.38 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   731 sec.
    Turnaround time :                            812 sec.

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

