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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin859
RA = 160.15, Dec = 6.2848
tmin = 461980801, tmax = 462240001
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='66844', job_status='RUN', time_executed='2021-09-02 08:28:58.576364', time_epoch_executed='1630596538.58' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='859'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/66844

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/66844/ft1_4FGL_J1040.5+0617_daily_bin859.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/66844/ft2_4FGL_J1040.5+0617_daily_bin859.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/66844/ft1_4FGL_J1040.5+0617_daily_bin859.fits outfile=/scratch/kocevski/66844/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin859.fits ra=160.15 dec=6.2848 rad=12.0 tmin=461980801.0 tmax=462240001.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.58
user 3.35
sys 0.20

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/66844/ft1_filtered_4FGL_J1040.5+0617_daily_bin859.fits" evtable="EVENTS" scfile=/scratch/kocevski/66844/ft2_4FGL_J1040.5+0617_daily_bin859.fits sctable="SC_DATA" outfile=/scratch/kocevski/66844/ltcube_461980801_462240001_4FGL_J1040.5+0617_daily_bin859.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/66844/ft2_4FGL_J1040.5+0617_daily_bin859.fits
.....................!
real 13.06
user 12.67
sys 0.34

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/66844/ft1_filtered_4FGL_J1040.5+0617_daily_bin859.fits evtable="EVENTS" scfile=/scratch/kocevski/66844/ft2_4FGL_J1040.5+0617_daily_bin859.fits sctable="SC_DATA" expcube=/scratch/kocevski/66844/ltcube_461980801_462240001_4FGL_J1040.5+0617_daily_bin859.fits outfile=/scratch/kocevski/66844/expmap_461980801_462240001_4FGL_J1040.5+0617_daily_bin859.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/66844/ltcube_461980801_462240001_4FGL_J1040.5+0617_daily_bin859.fits
.....................!
real 191.90
user 186.54
sys 4.78

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/66844/ft1_filtered_4FGL_J1040.5+0617_daily_bin859.fits scfile=/scratch/kocevski/66844/ft2_4FGL_J1040.5+0617_daily_bin859.fits outfile=/scratch/kocevski/66844/cmap_461980801_462240001_4FGL_J1040.5+0617_daily_bin859.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.56
user 0.38
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/66844/ft1_filtered_4FGL_J1040.5+0617_daily_bin859.fits scfile=/scratch/kocevski/66844/ft2_4FGL_J1040.5+0617_daily_bin859.fits outfile=/scratch/kocevski/66844/cmap_HighResolution_461980801_462240001_4FGL_J1040.5+0617_daily_bin859.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.62
user 0.39
sys 0.16

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10067E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    20.487       1.0000         .10000E-03   10000.    
     4 'Prefactor '    3.6890       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10018E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10166E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10181E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    1.2588       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10107E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .88902       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .22486E-02   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10009E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .86767       1.0000         .10000E-03   10000.    
    14 'Prefactor '    5.9277       1.0000         .10000E-03   10000.    
    15 'norm      '    1.4959       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .98674       1.0000         .10000E-03   10000.    
    17 'norm      '    11.809       1.0000         .10000E-03   10000.    
    18 'Normalizat'    .70382       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.4879       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.
 MIGRAD TERMINATED WITHOUT CONVERGENCE.

 FCN=   5634.598     FROM MIGRAD    STATUS=FAILED       687 CALLS     2206 TOTAL
                     EDM=   .20E-07    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    8.6583        .18142E-02** at limit **
   2  Prefactor     .10000E-03    21.022        .18142E-02** at limit **
   3  norm          20.490        16.345        .88490E-04    .61411E-04
   4  Prefactor     3.6878        6.5771        .21028E-03   -.95479E-04
   5  Prefactor     .10000E-03    17.244        .18142E-02** at limit **
   6  Prefactor     .10000E-03    20.595        .18142E-02** at limit **
   7  Prefactor     .10000E-03    10.206        .18142E-02** at limit **
   8  norm          1.2586        1.2154        .79387E-04   -.97380E-05
   9  Prefactor     .10002E-03    52.132        .36638E-02** at limit **
  10  Prefactor     .88883        2.1674        .17588E-02    .73335E-03
  11  Prefactor     .10000E-03    92.155        .26601E-02** at limit **
  12  Prefactor     .10000E-03    2.9497        .12559E-02** at limit **
  13  norm          .86746        1.0227        .58244E-04    .20007E-03
  14  Prefactor     5.9286        13.032        .82467E-03   -.16648E-03
  15  norm          1.4956        1.1456        .67442E-04   -.31843E-03
  16  Prefactor     .91835        92.706        .50474E-02    .68678E-03
  17  norm          11.809        14.939        .11658E-03   -.25453E-04
  18  Normalizat    .70383        .24084        .32538E-03   -.24046E-03
  19  Prefactor     1.4878        .21665        .21291E-03   -.68228E-03
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   5634.598     FROM SIMPLEX   STATUS=UNCHANGED    906 CALLS     3112 TOTAL
                     EDM=   .19E-04    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    8.6583        .30932E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    21.022        .59790E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          20.490        16.345        .22407E-06   -1.4802    
   4  Prefactor     3.6878        6.5771        .23383E-06   -1.5324    
   5  Prefactor     .10000E-03    17.244        .49923E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    20.595        .52898E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    10.206        .39231E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          1.2586        1.2154        .21435E-06   -1.5484    
   9  Prefactor     .10002E-03    52.132        .53431E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .88883        2.1674        .22015E-06   -1.5519    
  11  Prefactor     .10000E-03    92.155        .65608E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    2.9497        .20102E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .86746        1.0227        .21773E-06   -1.5522    
  14  Prefactor     5.9286        13.032        .18921E-06   -1.5221    
  15  norm          1.4956        1.1456        .21677E-06   -1.5463    
  16  Prefactor     .91835        92.706        .79637E-07   -1.5516    
  17  norm          11.809        14.939        .20328E-06   -1.5021    
  18  Normalizat    .70383        .24084        .13482E-06   -1.0374    
  19  Prefactor     1.4878        .21665        .10875E-06   -.77881    
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   5634.598     FROM MIGRAD    STATUS=CONVERGED    259 CALLS     3371 TOTAL
                     EDM=   .27E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    8.6599        .36285E-03** at limit **
   2  Prefactor     .10000E-03    21.023        .36285E-03** at limit **
   3  norm          20.490        16.343        .17698E-04    .19271E-05
   4  Prefactor     3.6879        6.5766        .84111E-05    .40549E-05
   5  Prefactor     .10000E-03    17.245        .36285E-03** at limit **
   6  Prefactor     .10000E-03    20.596        .36285E-03** at limit **
   7  Prefactor     .10000E-03    10.209        .36285E-03** at limit **
   8  norm          1.2586        1.2150        .31755E-05    .40814E-04
   9  Prefactor     .10000E-03    53.445        .14655E-03** at limit **
  10  Prefactor     .88879        2.1648        .70351E-04   -.14544E-05
  11  Prefactor     .10000E-03    95.834        .10640E-02** at limit **
  12  Prefactor     .10000E-03    2.9499        .25118E-03** at limit **
  13  norm          .86745        1.0202        .23297E-05    .68317E-05
  14  Prefactor     5.9287        12.997        .32987E-04    .17232E-05
  15  norm          1.4956        1.1454        .26977E-05    .84285E-05
  16  Prefactor     .91846        92.880        .10095E-02    .27583E-04
  17  norm          11.809        14.940        .46630E-05    .48761E-06
  18  Normalizat    .70382        .24030        .13015E-04    .21139E-04
  19  Prefactor     1.4878        .21678        .42583E-04    .26271E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 20.4903
  Prefactor  = 3.68786
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 1.25858
  Prefactor  = 0.0001
  Prefactor  = 0.888794
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.867445
  Prefactor  = 5.92873
  norm       = 1.49561
  Prefactor  = 0.918455
  norm       = 11.8086
  Normalizat = 0.703825
  Prefactor  = 1.48784
 **********
 **   18 **HESSE 
 **********

 FCN=   5634.598     FROM HESSE     STATUS=OK           250 CALLS     3621 TOTAL
                     EDM=   .13E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    8.6600        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    21.023        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          20.490        16.342        .35396E-05   -1.4802    
   4  Prefactor     3.6879        6.5784        .16822E-05   -1.5324    
   5  Prefactor     .10000E-03    17.245        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    20.596        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    10.209        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          1.2586        1.2152        .63510E-06   -1.5484    
   9  Prefactor     .10000E-03    53.450        .29310E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .88879        2.1648        .28140E-05   -1.5519    
  11  Prefactor     .10000E-03    96.540        .21280E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    2.9499        .50235E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .86745        1.0195        .46595E-06   -1.5522    
  14  Prefactor     5.9287        12.995        .13195E-05   -1.5221    
  15  norm          1.4956        1.1455        .53954E-06   -1.5463    
  16  Prefactor     .91846        92.721        .20190E-03   -1.5516    
  17  norm          11.809        14.932        .93261E-06   -1.5021    
  18  Normalizat    .70382        .24045        .26030E-05   -1.0374    
  19  Prefactor     1.4878        .21696        .85165E-05   -.77881    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.33385e-12
Minuit parameter uncertainties:
  1  1.31625e-07
  2  7.54618e-07
  3  16.3459
  4  6.57967
  5  1.01894e-07
  6  5.23487e-07
  7  6.42065e-07
  8  1.21519
  9  1.20562e-06
  10  2.16503
  11  1.64792e-05
  12  1.18217e-08
  13  1.01953
  14  13.0009
  15  1.14548
  16  18.485
  17  14.9364
  18  0.24081
  19  0.217094
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  8.888e-01  2.165e+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.488e+00  2.171e-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:  7.038e-01  2.408e-01  1.000e-02  1.000e+01 ( 1.000e+00)


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

Saving results to:
/scratch/kocevski/66844/likelihoodResults_461980801_462240001_4FGL_J1040.5+0617_daily_bin859.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) = 5633.14304639
delta logL = 1.4550550977

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5633.13619419
delta logL = 1.46190729606

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    2.9253       1.0000         .10000E-03   10000.    
     2 'Index     '    1.3460       1.0000          .0000       10.000    
     3 'Normalizat'    .72268       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.4639       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=   5633.136     FROM MIGRAD    STATUS=CONVERGED     47 CALLS      225 TOTAL
                     EDM=   .17E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     2.9253        2.5625        .59379E-02   -.47279E-03
   2  Index         1.3460        .33924        .18076       -.11038E-03
   3  Normalizat    .72271        .19957        .72562E-01    .27621E-04
   4  Prefactor     1.4639        .18305        .48408E-01   -.74401E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 2.92525
  Index      = 1.34602
  Normalizat = 0.722713
  Prefactor  = 1.46389
 **********
 **   18 **HESSE 
 **********

 FCN=   5633.136     FROM HESSE     STATUS=OK            33 CALLS      258 TOTAL
                     EDM=   .20E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     2.9253        2.9289        .10955E-03   -1.5366    
   2  Index         1.3460        .42590        .72928E-02   -.81949    
   3  Normalizat    .72271        .23411        .32116E-03   -1.0300    
   4  Prefactor     1.4639        .21525        .21399E-03   -.78556    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.00497e-10
Minuit parameter uncertainties:
  1  2.92909
  2  0.427009
  3  0.234434
  4  0.215381
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/66844': 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) = 5633.13619418
delta logL = 1.46190730942

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  2.925e+00  2.929e+00  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  1.346e+00  4.270e-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.464e+00  2.154e-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:  7.227e-01  2.344e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 3.16
Ra Dec: 160.150 6.285
Photon Index (Free Index): 1.35 +/- 0.43
Photon Flux (Free Index): 1.40e-08 +/- 1.39e-08
Energy Flux (Free Index): 7.39e-05 +/- 9.39e-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/66844/cmap_HighResolution_461980801_462240001_4FGL_J1040.5+0617_daily_bin859.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='6.79e-03', comment='SUCCESS', energy_flux2='7.39e-05', dlogl='1.46e+00', photon_flux2='1.40e-08', job_status='DONE', time_completed='2021-09-02 08:39:48.156962', photon_index_error2='0.43', photon_index2='1.35', ts='0.22', fit_tolerance='1e-08', GAL='1.49', photon_index_error='0.00', photon_flux_upper_limit='8.81e-08', energy_flux_error2='9.39e-05', EG='0.70', time_epoch_completed='1630597188.16', return_code='0', job_id='66844', GAL2='1.46', EG2='0.72', return_code2='0', photon_flux_error2='1.39e-08', ts2='3.16', photon_index='2.37' WHERE bin_id='859' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:39:48 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0101>
Subject: Job 66844: <4FGL_J1040.5+0617_daily_bin859> in cluster <slac> Done

Job <4FGL_J1040.5+0617_daily_bin859> was submitted from host <rhel6-64l> by user <kocevski> in cluster <slac> at Thu Sep  2 08:26:30 2021
Job was executed on host(s) <bullet0101>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  2 08:26:35 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:26:35 2021
Terminated at Thu Sep  2 08:39:48 2021
Results reported at Thu Sep  2 08:39:48 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin859 160.15 6.2848 461980801 462240001 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 :                                   646.40 sec.
    Max Memory :                                 1255 MB
    Average Memory :                             266.81 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   793 sec.
    Turnaround time :                            798 sec.

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

