 **********
 **   18 **HESSE 
 **********

 FCN=   6765.665     FROM HESSE     STATUS=OK           345 CALLS     2249 TOTAL
                     EDM=   .44E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     15.211        19.502        .25657E-03   -1.5630    
   2  Prefactor      .0000        1.0583        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .34861E-07    31.143        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .52403E-07    16.934        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm           .0000        1.5876        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .69722E-07    12.809        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .20423E-06    23.256        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .75495E-08    12.007        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .58564E-07    10.006        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     3.1963        3.8402        .56659E-03   -1.5672    
  11  Prefactor     .27756E-09    9.3604        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .13312E-06    14.863        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .52569E-07    10.129        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .69889E-07    21.714        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .13489E-07    84.741        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor      .0000        8.1590        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     31.146        35.365        .17917E-03   -1.5596    
  18  Prefactor     .18430E-07    53.252        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     55.504        32.266        .13423E-03   -1.5559    
  20  Normalizat    .72447        .13783        .42618E-01   -1.0293    
  21  Prefactor     1.1349        .14814        .36389E-01   -.88359    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.35982e-08
Minuit parameter uncertainties:
  1  19.5017
  2  4.70183e-07
  3  0.00208431
  4  0.00188388
  5  2.13365e-08
  6  0.00188991
  7  0.00435878
  8  0.000601312
  9  0.00153109
  10  3.84025
  11  0.000105087
  12  0.00281331
  13  0.00145963
  14  0.00246342
  15  0.00213935
  16  1.67996e-05
  17  35.3651
  18  0.00198184
  19  32.2663
  20  0.137893
  21  0.148192
/sdf/group/fermi/u/kocevski/software/conda/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)

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 make4FGLDR3xml version 01r09.
The default diffuse model files and names are for P8R3, 4FGL DRs, and the default fermitools directory locations.

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

/sdf/group/fermi/u/kocevski/software/conda/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).

Done.

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

Extracting fit parameters...

4FGL J1340.4+6926
   Spectrum: PowerLaw
377    Prefactor:  2.776e-10  1.051e-04  0.000e+00  1.000e+06 ( 1.000e-13)
378        Index:  2.535e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
379        Scale:  9.421e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
725    Prefactor:  1.135e+00  1.482e-01  0.000e+00  1.000e+01 ( 1.000e+00)
726        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
727        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
724   Normalization:  7.245e-01  1.379e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 205.110 69.445
Photon Flux Upper Limit: 4.54459321327e-08 ph cm-2 s-1
Energy Flux Upper Limit: 0.00354244690382 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/19657558/likelihoodResults_711072001_711331201_4FGL_J1340.4+6926_daily_bin1820.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) = 6765.7189433
delta logL = -0.0540533643907

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 6765.66489545
delta logL = -5.5094160416e-06

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .13118E-03   1.0000          .0000       .10000E+07
     2 'Index     '    1.5976       1.0000          .0000       10.000    
     3 'Normalizat'    .72439       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1349       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .7280E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
  MNHESS FAILS AND WILL RETURN DIAGONAL MATRIX. 

 FCN=   6765.665     FROM MIGRAD    STATUS=CONVERGED     41 CALLS      204 TOTAL
                     EDM=   .82E-11  STRATEGY=1  ERROR MATRIX UNCERTAINTY=100.0%

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor      .0000        13.034        .42118E-03** at limit **
   2  Index         2.3329        1.2006        .16076E-04     .0000    
   3  Normalizat    .72447        1.0641        .68984E-05    .10876E-03
   4  Prefactor     1.1349        1.1289       -.20294E-05    .77065E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0
  Index      = 2.33289
  Normalizat = 0.724472
  Prefactor  = 1.13488
 **********
 **   18 **HESSE 
 **********
  MNHESS FAILS AND WILL RETURN DIAGONAL MATRIX. 

 FCN=   6765.665     FROM HESSE     STATUS=FAILED         9 CALLS      213 TOTAL
                     EDM=   .82E-11  STRATEGY=1  ERROR MATRIX UNCERTAINTY=100.0%

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor      .0000        13.034        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         .60767        1.8349        .16076E-04   -.56264    
   3  Normalizat    .72447        1.0641        .68984E-05   -1.0293    
   4  Prefactor     1.1349        1.1289       -.20294E-05   -.88359    
                               ERR DEF=  .500    
Minuit fit quality: 1   estimated distance: 8.20009e-12
Minuit parameter uncertainties:
  1  2.49274e-05
  2  1.21732
  3  1.09705
  4  1.15424
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Done.

MINUIT Return Code (Free Index): 101
logL (Free Index) = 6765.66488994
delta logL = 9.09494701773e-12

Extracting fit parameters...

4FGL J1340.4+6926
   Spectrum: PowerLaw
377    Prefactor:  0.000e+00  2.493e-05  0.000e+00  1.000e+06 ( 1.000e-13)
378        Index:  2.333e+00  1.217e+00  0.000e+00  1.000e+01 (-1.000e+00)
379        Scale:  9.421e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
725    Prefactor:  1.135e+00  1.154e+00  0.000e+00  1.000e+01 ( 1.000e+00)
726        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
727        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
724   Normalization:  7.245e-01  1.097e+00  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 205.110 69.445

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 /lscratch/kocevski/19657558/cmap_HighResolution_711072001_711331201_4FGL_J1340.4+6926_daily_bin1820.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='3.54e-03', job_status='DONE', photon_flux_upper_limit='4.54e-08', time_completed='2023-07-18 01:17:39.511031', job_id='19657558', GAL2='1.13', fit_tolerance='1e-08', EG2='0.72', EG='0.72', time_epoch_completed='1689668259.51', return_code2='101', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.13', dlogl='9.09e-12', ts2='0.00', photon_index_error='0.00', photon_index='2.53' WHERE bin_id='1820' AND source_name='4FGL J1340.4+6926' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Tue Jul 18 01:17:40 PDT 2023

number of points = 7459
number of fields = 31
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J1340.4+6926_daily_bin1820
RA = 205.11, Dec = 69.4446
tmin = 711072001, tmax = 711331201
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='19658427', job_status='RUN', time_executed='2023-07-18 01:17:25.365358', time_epoch_executed='1689668245.37' WHERE source_name='4FGL J1340.4+6926' and cadence='daily' and bin_id='1820'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/19658427

Creating custom pfile directory:
/lscratch/kocevski/19658427/pfiles/

Retrieving the FT1 file...

Issuing command:
datacat find --group FT1 --filter 'nMetStop>=711072001.0 && nMetStart<711331201.0' /Data/Flight/Reprocess/P305

Issuing command:
datacat find --group FT1 --filter 'nMetStart>564945418 && nMetStop>=711072001.0 && nMetStart<711331201.0' /Data/Flight/Level1/LPA

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/19658427/ft1_4FGL_J1340.4+6926_daily_bin1820.fits


Retrieving the FT1 file...

Issuing command:
datacat find --group FT2 --filter 'nMetStop>=711072001.0 && nMetStart<711331201.0' /Data/Flight/Level1/LPA

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/19658427/ft2_4FGL_J1340.4+6926_daily_bin1820.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/19658427/ft1_4FGL_J1340.4+6926_daily_bin1820.fits outfile=/lscratch/kocevski/19658427/ft1_filteredMKT_4FGL_J1340.4+6926_daily_bin1820.fits ra=205.11 dec=69.4446 rad=12.0 tmin=711072001.0 tmax=711331201.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 2.53
user 1.84
sys 0.17

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/19658427/ft2_4FGL_J1340.4+6926_daily_bin1820.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/19658427/ft2_4FGL_J1340.4+6926_daily_bin1820.fits sctable="SC_DATA" filter="IN_SAA!=T && LIVETIME>0 && gtifilter('/sdf/group/fermi/g/LCRepository/Likelihood/GTIs/nogrb.gti',(START+STOP)/2) && (angsep(RA_SUN,DEC_SUN,RA_ZENITH,DEC_ZENITH)>115 || gtifilter('/sdf/group/fermi/g/LCRepository/Likelihood/GTIs/nosolarflares.gti',(START+STOP)/2))" roicut=no evfile=/lscratch/kocevski/19658427/ft1_filteredMKT_4FGL_J1340.4+6926_daily_bin1820.fits evtable="EVENTS" outfile="/lscratch/kocevski/19658427/ft1_filtered_4FGL_J1340.4+6926_daily_bin1820.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('/sdf/group/fermi/g/LCRepository/Likelihood/GTIs/nogrb.gti',(START+STOP)/2) && (angsep(RA_SUN,DEC_SUN,RA_ZENITH,DEC_ZENITH)>115 || gtifilter('/sdf/group/fermi/g/LCRepository/Likelihood/GTIs/nosolarflares.gti',(START+STOP)/2))
real 0.99
user 0.19
sys 0.12

Number of photons that the gtmktime cut: 617

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/19658427/ft1_filtered_4FGL_J1340.4+6926_daily_bin1820.fits" evtable="EVENTS" scfile=/lscratch/kocevski/19658427/ft2_4FGL_J1340.4+6926_daily_bin1820.fits sctable="SC_DATA" outfile=/lscratch/kocevski/19658427/ltcube_711072001_711331201_4FGL_J1340.4+6926_daily_bin1820.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 /lscratch/kocevski/19658427/ft2_4FGL_J1340.4+6926_daily_bin1820.fits
.....................!
real 8.32
user 7.52
sys 0.24

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/19658427/ft1_filtered_4FGL_J1340.4+6926_daily_bin1820.fits evtable="EVENTS" scfile=/lscratch/kocevski/19658427/ft2_4FGL_J1340.4+6926_daily_bin1820.fits sctable="SC_DATA" expcube=/lscratch/kocevski/19658427/ltcube_711072001_711331201_4FGL_J1340.4+6926_daily_bin1820.fits outfile=/lscratch/kocevski/19658427/expmap_711072001_711331201_4FGL_J1340.4+6926_daily_bin1820.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 /lscratch/kocevski/19658427/ltcube_711072001_711331201_4FGL_J1340.4+6926_daily_bin1820.fits
.....................!
real 67.32
user 62.60
sys 3.81

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 227 point sources and 0 extended sources

Setting source of interest to:
4FGL J1340.4+6926 @ 205.11 69.4446

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/19658427/ft1_filtered_4FGL_J1340.4+6926_daily_bin1820.fits scfile=/lscratch/kocevski/19658427/ft2_4FGL_J1340.4+6926_daily_bin1820.fits outfile=/lscratch/kocevski/19658427/cmap_711072001_711331201_4FGL_J1340.4+6926_daily_bin1820.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=205.11 yref=69.4446 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 1.07
user 0.21
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/19658427/ft1_filtered_4FGL_J1340.4+6926_daily_bin1820.fits scfile=/lscratch/kocevski/19658427/ft2_4FGL_J1340.4+6926_daily_bin1820.fits outfile=/lscratch/kocevski/19658427/cmap_HighResolution_711072001_711331201_4FGL_J1340.4+6926_daily_bin1820.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=205.11 yref=69.4446 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.92
user 0.21
sys 0.14

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/19658427/ft1_filtered_4FGL_J1340.4+6926_daily_bin1820.fits evtable="EVENTS" scfile=/lscratch/kocevski/19658427/ft2_4FGL_J1340.4+6926_daily_bin1820.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/19658427/Model_4FGL_J1340.4+6926_daily_bin1820.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...
/lscratch/kocevski/19658427/ft1_filtered_4FGL_J1340.4+6926_daily_bin1820.fits.....................!
real 26.03
user 24.23
sys 1.01

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/19658427/ft1_filtered_4FGL_J1340.4+6926_daily_bin1820.fits', '/lscratch/kocevski/19658427/ft2_4FGL_J1340.4+6926_daily_bin1820.fits', expMap='/lscratch/kocevski/19658427/expmap_711072001_711331201_4FGL_J1340.4+6926_daily_bin1820.fits', expCube='/lscratch/kocevski/19658427/ltcube_711072001_711331201_4FGL_J1340.4+6926_daily_bin1820.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/19658427/Model_4FGL_J1340.4+6926_daily_bin1820.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1340.4+6926'

4FGL J1340.4+6926
   Spectrum: PowerLaw
377    Prefactor:  1.968e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-13)
378        Index:  2.535e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
379        Scale:  9.421e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/19658427/ft1_filtered_4FGL_J1340.4+6926_daily_bin1820.fits
Spacecraft file(s): /lscratch/kocevski/19658427/ft2_4FGL_J1340.4+6926_daily_bin1820.fits
Exposure map: /lscratch/kocevski/19658427/expmap_711072001_711331201_4FGL_J1340.4+6926_daily_bin1820.fits
Exposure cube: /lscratch/kocevski/19658427/ltcube_711072001_711331201_4FGL_J1340.4+6926_daily_bin1820.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/19658427/Model_4FGL_J1340.4+6926_daily_bin1820.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) = 6765.66659739

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    15.207       1.0000          .0000       .10000E+07
     2 'Prefactor '     .0000       1.0000          .0000       .10000E+07
     3 'Prefactor '    .52847E-07   1.0000          .0000       .10000E+07
     4 'Prefactor '    .98255E-08   1.0000          .0000       .10000E+07
     5 'norm      '    .27756E-09   1.0000          .0000       .10000E+07
     6 'Prefactor '    .18319E-08   1.0000          .0000       .10000E+07
     7 'Prefactor '    .64948E-08   1.0000          .0000       .10000E+07
     8 'Prefactor '    .22204E-09   1.0000          .0000       .10000E+07
     9 'Prefactor '     .0000       1.0000          .0000       .10000E+07
    10 'Prefactor '    3.1953       1.0000          .0000       .10000E+07
    11 'Prefactor '    .79936E-08   1.0000          .0000       .10000E+07
    12 'Prefactor '    .38081E-07   1.0000          .0000       .10000E+07
    13 'Prefactor '    .55511E-10   1.0000          .0000       .10000E+07
    14 'Prefactor '    .27756E-09   1.0000          .0000       .10000E+07
    15 'Prefactor '    .83466E-02   1.0000          .0000       .10000E+07
    16 'Prefactor '    .44409E-09   1.0000          .0000       .10000E+07
    17 'Prefactor '    31.160       1.0000          .0000       .10000E+07
    18 'Prefactor '    .63838E-05   1.0000          .0000       .10000E+07
    19 'Prefactor '    55.508       1.0000          .0000       .10000E+07
    20 'Normalizat'    .72457       1.0000         .10000E-01   10.000    
    21 'Prefactor '    1.1349       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .7280E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   6765.665     FROM MIGRAD    STATUS=CONVERGED    144 CALLS     1904 TOTAL
                     EDM=   .83E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  4.9%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     15.211        1.0595       -.59772E-08    .50372E-03
   2  Prefactor      .0000        1.0587        .27800E-06** at limit **
   3  Prefactor     .34861E-07    30.169        .27275E-06** at limit **
   4  Prefactor     .52403E-07    13.610       -.25352E-06** at limit **
   5  norm           .0000        1.5938       -.74132E-07** at limit **
   6  Prefactor     .69722E-07    8.2217        .88963E-06** at limit **
   7  Prefactor     .20423E-06    11.654        .40278E-07** at limit **
   8  Prefactor     .75495E-08    10.167        .28020E-06** at limit **
   9  Prefactor     .58564E-07    5.7594       -.74814E-07** at limit **
  10  Prefactor     3.1963        3.8450        .15562E-06    .63901E-04
  11  Prefactor     .27756E-09    9.3490        .74434E-08** at limit **
  12  Prefactor     .13312E-06    9.1055        .56256E-06** at limit **
  13  Prefactor     .52569E-07    5.4663       -.27417E-06** at limit **
  14  Prefactor     .69889E-07    11.520       -.12736E-06** at limit **
  15  Prefactor     .13489E-07    85.468       -.11035E-05** at limit **
  16  Prefactor      .0000        8.1398       -.14593E-07** at limit **
  17  Prefactor     31.146        1.0571       -.16498E-08   -.98188E-03
  18  Prefactor     .18430E-07    52.795        .58701E-06** at limit **
  19  Prefactor     55.504        1.5502        .65370E-08    .57177E-02
  20  Normalizat    .72447        .15860       -.76379E-05    .37924E-06
  21  Prefactor     1.1349        .17047        .56166E-05    .52329E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 15.2108
  Prefactor  = 0
  Prefactor  = 3.4861e-08
  Prefactor  = 5.24025e-08
  norm       = 0
  Prefactor  = 6.9722e-08
  Prefactor  = 2.04226e-07
  Prefactor  = 7.54952e-09
  Prefactor  = 5.85643e-08
  Prefactor  = 3.19631
  Prefactor  = 2.77556e-10
  Prefactor  = 1.33116e-07
  Prefactor  = 5.25691e-08
  Prefactor  = 6.98885e-08
  Prefactor  = 1.34892e-08
  Prefactor  = 0
  Prefactor  = 31.1462
  Prefactor  = 1.84297e-08
  Prefactor  = 55.5039
  Normalizat = 0.724472
  Prefactor  = 1.13488
 **********
 **   18 **HESSE 
 **********

 FCN=   6765.665     FROM HESSE     STATUS=OK           345 CALLS     2249 TOTAL
                     EDM=   .44E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     15.211        19.502        .25657E-03   -1.5630    
   2  Prefactor      .0000        1.0583        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .34861E-07    31.143        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .52403E-07    16.934        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm           .0000        1.5876        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .69722E-07    12.809        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .20423E-06    23.256        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .75495E-08    12.007        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .58564E-07    10.006        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     3.1963        3.8402        .56659E-03   -1.5672    
  11  Prefactor     .27756E-09    9.3604        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .13312E-06    14.863        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .52569E-07    10.129        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .69889E-07    21.714        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .13489E-07    84.741        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor      .0000        8.1590        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     31.146        35.365        .17917E-03   -1.5596    
  18  Prefactor     .18430E-07    53.252        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     55.504        32.266        .13423E-03   -1.5559    
  20  Normalizat    .72447        .13783        .42618E-01   -1.0293    
  21  Prefactor     1.1349        .14814        .36389E-01   -.88359    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.35982e-08
Minuit parameter uncertainties:
  1  19.5017
  2  4.70183e-07
  3  0.00208431
  4  0.00188388
  5  2.13365e-08
  6  0.00188991
  7  0.00435878
  8  0.000601312
  9  0.00153109
  10  3.84025
  11  0.000105087
  12  0.00281331
  13  0.00145963
  14  0.00246342
  15  0.00213935
  16  1.67996e-05
  17  35.3651
  18  0.00198184
  19  32.2663
  20  0.137893
  21  0.148192
Done.

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

Extracting fit parameters...

4FGL J1340.4+6926
   Spectrum: PowerLaw
377    Prefactor:  2.776e-10  1.051e-04  0.000e+00  1.000e+06 ( 1.000e-13)
378        Index:  2.535e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
379        Scale:  9.421e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
725    Prefactor:  1.135e+00  1.482e-01  0.000e+00  1.000e+01 ( 1.000e+00)
726        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
727        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
724   Normalization:  7.245e-01  1.379e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 205.110 69.445
Photon Flux Upper Limit: 4.54459321327e-08 ph cm-2 s-1
Energy Flux Upper Limit: 0.00354244690382 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/19658427/likelihoodResults_711072001_711331201_4FGL_J1340.4+6926_daily_bin1820.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) = 6765.7189433
delta logL = -0.0540533643907

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 6765.66489545
delta logL = -5.5094160416e-06

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .13118E-03   1.0000          .0000       .10000E+07
     2 'Index     '    1.5976       1.0000          .0000       10.000    
     3 'Normalizat'    .72439       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1349       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .7280E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
  MNHESS FAILS AND WILL RETURN DIAGONAL MATRIX. 

 FCN=   6765.665     FROM MIGRAD    STATUS=CONVERGED     41 CALLS      204 TOTAL
                     EDM=   .82E-11  STRATEGY=1  ERROR MATRIX UNCERTAINTY=100.0%

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor      .0000        13.034        .42118E-03** at limit **
   2  Index         2.3329        1.2006        .16076E-04     .0000    
   3  Normalizat    .72447        1.0641        .68984E-05    .10876E-03
   4  Prefactor     1.1349        1.1289       -.20294E-05    .77065E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0
  Index      = 2.33289
  Normalizat = 0.724472
  Prefactor  = 1.13488
 **********
 **   18 **HESSE 
 **********
  MNHESS FAILS AND WILL RETURN DIAGONAL MATRIX. 

 FCN=   6765.665     FROM HESSE     STATUS=FAILED         9 CALLS      213 TOTAL
                     EDM=   .82E-11  STRATEGY=1  ERROR MATRIX UNCERTAINTY=100.0%

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor      .0000        13.034        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         .60767        1.8349        .16076E-04   -.56264    
   3  Normalizat    .72447        1.0641        .68984E-05   -1.0293    
   4  Prefactor     1.1349        1.1289       -.20294E-05   -.88359    
                               ERR DEF=  .500    
Minuit fit quality: 1   estimated distance: 8.20009e-12
Minuit parameter uncertainties:
  1  2.49274e-05
  2  1.21732
  3  1.09705
  4  1.15424
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Done.

MINUIT Return Code (Free Index): 101
logL (Free Index) = 6765.66488994
delta logL = 9.09494701773e-12

Extracting fit parameters...

4FGL J1340.4+6926
   Spectrum: PowerLaw
377    Prefactor:  0.000e+00  2.493e-05  0.000e+00  1.000e+06 ( 1.000e-13)
378        Index:  2.333e+00  1.217e+00  0.000e+00  1.000e+01 (-1.000e+00)
379        Scale:  9.421e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
725    Prefactor:  1.135e+00  1.154e+00  0.000e+00  1.000e+01 ( 1.000e+00)
726        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
727        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
724   Normalization:  7.245e-01  1.097e+00  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 205.110 69.445

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 /lscratch/kocevski/19658427/cmap_HighResolution_711072001_711331201_4FGL_J1340.4+6926_daily_bin1820.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='3.54e-03', job_status='DONE', photon_flux_upper_limit='4.54e-08', time_completed='2023-07-18 01:25:23.856255', job_id='19658427', GAL2='1.13', fit_tolerance='1e-08', EG2='0.72', EG='0.72', time_epoch_completed='1689668723.86', return_code2='101', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.13', dlogl='9.09e-12', ts2='0.00', photon_index_error='0.00', photon_index='2.53' WHERE bin_id='1820' AND source_name='4FGL J1340.4+6926' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Tue Jul 18 01:25:24 PDT 2023

