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


Performing analysis on: 4FGL_J1040.5+0617_daily_bin420
RA = 160.15, Dec = 6.2848
tmin = 348192001, tmax = 348451201
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='64298', job_status='RUN', time_executed='2021-09-02 08:21:16.632514', time_epoch_executed='1630596076.63' WHERE source_name='4FGL J1040.5+0617' and cadence='daily' and bin_id='420'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/64298

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/64298/ft1_4FGL_J1040.5+0617_daily_bin420.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/64298/ft2_4FGL_J1040.5+0617_daily_bin420.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/64298/ft1_4FGL_J1040.5+0617_daily_bin420.fits outfile=/scratch/kocevski/64298/ft1_filteredMKT_4FGL_J1040.5+0617_daily_bin420.fits ra=160.15 dec=6.2848 rad=12.0 tmin=348192001.0 tmax=348451201.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.43
user 3.22
sys 0.19

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/64298/ft1_filtered_4FGL_J1040.5+0617_daily_bin420.fits evtable="EVENTS" scfile=/scratch/kocevski/64298/ft2_4FGL_J1040.5+0617_daily_bin420.fits sctable="SC_DATA" expcube=/scratch/kocevski/64298/ltcube_348192001_348451201_4FGL_J1040.5+0617_daily_bin420.fits outfile=/scratch/kocevski/64298/expmap_348192001_348451201_4FGL_J1040.5+0617_daily_bin420.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/64298/ltcube_348192001_348451201_4FGL_J1040.5+0617_daily_bin420.fits
.....................!
real 193.53
user 187.81
sys 4.64

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/64298/ft1_filtered_4FGL_J1040.5+0617_daily_bin420.fits scfile=/scratch/kocevski/64298/ft2_4FGL_J1040.5+0617_daily_bin420.fits outfile=/scratch/kocevski/64298/cmap_348192001_348451201_4FGL_J1040.5+0617_daily_bin420.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.40
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/64298/ft1_filtered_4FGL_J1040.5+0617_daily_bin420.fits scfile=/scratch/kocevski/64298/ft2_4FGL_J1040.5+0617_daily_bin420.fits outfile=/scratch/kocevski/64298/cmap_HighResolution_348192001_348451201_4FGL_J1040.5+0617_daily_bin420.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.55
user 0.39
sys 0.15

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .17096E-02   1.0000         .10000E-03   10000.    
     3 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    5.8212       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10061E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10009E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    .10276E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10276E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    9.4910       1.0000         .10000E-03   10000.    
    13 'norm      '    .96260       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    1.3666       1.0000         .10000E-03   10000.    
    16 'Prefactor '    9.3051       1.0000         .10000E-03   10000.    
    17 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.0549       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.1681       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=   7031.209     FROM MIGRAD    STATUS=CONVERGED    397 CALLS     1654 TOTAL
                     EDM=   .90E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    3.2674        .90712E-02** at limit **
   2  Prefactor     .10002E-03    142.67        .10182E-01** at limit **
   3  norm          .10000E-03    5.6928        .90712E-02** at limit **
   4  Prefactor     5.8231        7.1571        .41614E-02    .15262E-02
   5  Prefactor     .10000E-03    20.645        .90712E-02** at limit **
   6  Prefactor     .10000E-03    25.274        .90712E-02** at limit **
   7  Prefactor     .10000E-03    5.8417        .90712E-02** at limit **
   8  norm          .10000E-03    .66939        .36000E-01** at limit **
   9  Prefactor     .10000E-03    6.9685        .90712E-02** at limit **
  10  Prefactor     .10000E-03    .90083        .90712E-02** at limit **
  11  Prefactor     .10000E-03    6.5886        .90712E-02** at limit **
  12  Prefactor     9.4936        7.1426        .32521E-02    .12498E-02
  13  norm          .96285        .50245        .92400E-02    .34380E-03
  14  Prefactor     .10000E-03    4.4189        .90712E-02** at limit **
  15  norm          1.3672        1.4536        .93303E-02    .94755E-03
  16  Prefactor     9.2951        19.207        .32845E-02   -.10998E-02
  17  norm          .10000E-03    4.7768        .90712E-02** at limit **
  18  Normalizat    1.0548        .18372        .61880E-01    .80785E-05
  19  Prefactor     1.1681        .15440        .51224E-01   -.48414E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.000100022
  norm       = 0.000100002
  Prefactor  = 5.8231
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.000100003
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 9.49358
  norm       = 0.962852
  Prefactor  = 0.0001
  norm       = 1.36717
  Prefactor  = 9.29513
  norm       = 0.0001
  Normalizat = 1.0548
  Prefactor  = 1.16811
 **********
 **   18 **HESSE 
 **********

 FCN=   7031.209     FROM HESSE     STATUS=OK           262 CALLS     1916 TOTAL
                     EDM=   .85E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    3.2697        .14802E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10002E-03    145.13        .20365E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .10000E-03    5.7113        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     5.8231        7.1456        .16646E-03   -1.5225    
   5  Prefactor     .10000E-03    20.659        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    25.298        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    5.8462        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .10000E-03    2.2488        .13134E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .10000E-03    7.2964        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    .90589        .77684E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    6.7273        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     9.4936        7.1389        .13008E-03   -1.5092    
  13  norm          .96285        .50036        .40846E-04   -1.5512    
  14  Prefactor     .10000E-03    4.4401        .17188E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          1.3672        1.4390        .97554E-04   -1.5474    
  16  Prefactor     9.2951        19.184        .13138E-03   -1.5098    
  17  norm          .10000E-03    4.8040        .17898E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    1.0548        .22035        .27369E-03   -.91217    
  19  Prefactor     1.1681        .18558        .22646E-03   -.87318    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 8.52675e-09
Minuit parameter uncertainties:
  1  4.76548e-07
  2  0.00357409
  3  0.000223131
  4  7.1466
  5  7.37289e-05
  6  4.98119e-05
  7  0.000242874
  8  2.05004e-06
  9  2.12579e-05
  10  5.91428e-07
  11  1.11772e-05
  12  7.13958
  13  0.500362
  14  3.47392e-06
  15  1.43901
  16  19.1969
  17  1.55711e-05
  18  0.220543
  19  0.185687
Done.

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

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.000e-04  5.914e-07  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.168e+00  1.857e-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.055e+00  2.205e-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: 5.44e-08 ph cm-2 s-1
Energy Flux Upper Limit: 4.20e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/64298/likelihoodResults_348192001_348451201_4FGL_J1040.5+0617_daily_bin420.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) = 7031.21456017
delta logL = -0.00514992519038

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 7031.20941024
delta logL = 3.63252183888e-09

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10019E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.3583       1.0000          .0000       10.000    
     3 'Normalizat'    1.0548       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1682       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=   7031.209     FROM MIGRAD    STATUS=CONVERGED    101 CALLS      255 TOTAL
                     EDM=   .47E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    5.5280        .77992E-02** at limit **
   2  Index         2.0621        8.6824        .50000       -.21781E-05
   3  Normalizat    1.0548        .10982E-01    .27369E-03    .10202E-03
   4  Prefactor     1.1681        .95539E-02    .22646E-03    .14241E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 2.06206
  Normalizat = 1.0548
  Prefactor  = 1.16811
 **********
 **   18 **HESSE 
 **********

 FCN=   7031.209     FROM HESSE     STATUS=NOT POSDEF    27 CALLS      282 TOTAL
                     EDM=   .55E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    64.277        .80411E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.0621        5.0257        .50000       -.62808    
   3  Normalizat    1.0548        .40342E-01    .10948E-04   -.91216    
   4  Prefactor     1.1681        .35093E-01    .45293E-04   -.87318    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 5.47003e-08
Minuit parameter uncertainties:
  1  5.06052e-05
  2  482.938
  3  0.0403427
  4  0.0350939
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/64298': 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) = 7031.20940677
delta logL = 3.46962769981e-06

Extracting fit parameters...

4FGL J1040.5+0617
   Spectrum: PowerLaw
216    Prefactor:  1.000e-04  5.061e-05  1.000e-04  1.000e+04 ( 1.000e-12)
217        Index:  2.062e+00  4.829e+02  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.168e+00  3.509e-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.055e+00  4.034e-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 -2.500e-04 [aplpy.core]
INFO: Auto-setting vmax to  2.775e-03 [aplpy.core]
Saving /scratch/kocevski/64298/cmap_HighResolution_348192001_348451201_4FGL_J1040.5+0617_daily_bin420.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='4.20e-03', job_status='DONE', photon_flux_upper_limit='5.44e-08', time_completed='2021-09-02 08:31:23.121165', job_id='64298', GAL2='1.17', fit_tolerance='1e-08', EG2='1.05', EG='1.05', time_epoch_completed='1630596683.12', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.17', dlogl='3.47e-06', ts2='-0.00', photon_index_error='0.00', photon_index='2.37' WHERE bin_id='420' AND source_name='4FGL J1040.5+0617' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  2 08:31:23 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0222>
Subject: Job 64298: <4FGL_J1040.5+0617_daily_bin420> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1040.5+0617_daily_bin420 160.15 6.2848 348192001 348451201 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 :                                   596.18 sec.
    Max Memory :                                 1093 MB
    Average Memory :                             234.76 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   834 sec.
    Turnaround time :                            903 sec.

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

