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

 FCN=   5064.387     FROM HESSE     STATUS=OK           153 CALLS      943 TOTAL
                     EDM=   .32E-01    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10547E-07    23.326        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  norm          4.1672        .99576        .49358E-03   -1.5667    
   3  Prefactor     .55923E-03    662.55        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .16709E-07    30.844        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          92.798        124.43        .11213E-03   -1.5515    
   6  Prefactor     3.6293        4.5073        .52165E-03   -1.5670    
   7  norm          .33029E-07    15.332        .89025E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .11102E-09    5.1039        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          .11102E-09    1.6859        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .20780E+06    27965.        .29762E-05   -.62414    
  11  Normalizat    .10000E-01    .14059        .32094       -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .89783        .60854E-01    .29468E-01   -.96217    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 0.032371
Minuit parameter uncertainties:
  1  0.000990741
  2  0.995764
  3  1.21753
  4  0.00143624
  5  124.438
  6  4.50728
  7  0.00142369
  8  4.57419e-05
  9  2.84267e-05
  10  27986.7
  11  4.65438e-07
  12  0.0608589
/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) = 5064.38702401

Extracting fit parameters...

4FGL J0410.9+4216
   Spectrum: PowerLaw
313    Prefactor:  1.110e-10  4.574e-05  0.000e+00  1.000e+06 ( 1.000e-13)
314        Index:  2.187e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
315        Scale:  2.029e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
567    Prefactor:  8.978e-01  6.086e-02  0.000e+00  1.000e+01 ( 1.000e+00)
568        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
569        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
562   Normalization:  1.000e-02  4.654e-07  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 62.736 42.278
Photon Flux Upper Limit: 1.63760736357e-07 ph cm-2 s-1
Energy Flux Upper Limit: 0.0124646502524 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/18864713/likelihoodResults_709257601_709516801_4FGL_J0410.9+4216_daily_bin1813.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) = 5064.38718602
delta logL = -0.000162018734045

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 5064.38702416
delta logL = -1.50687810674e-07

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .29515E-06   1.0000          .0000       .10000E+07
     2 'Index     '    .33591       1.0000          .0000       10.000    
     3 'Normalizat'    .10000E-01   1.0000         .10000E-01   10.000    
     4 'Prefactor '    .89784       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5740E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   5064.387     FROM MIGRAD    STATUS=CONVERGED     28 CALLS      247 TOTAL
                     EDM=   .91E-12  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.6%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor      .0000        10.338       -.79782E-06** at limit **
   2  Index         1.5028        2.5130        .27642E-05     .0000    
   3  Normalizat    .10000E-01    .16060       -.21869E-04** at limit **
   4  Prefactor     .89783        .53507E-01   -.16188E-05   -.34746E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0
  Index      = 1.50281
  Normalizat = 0.01
  Prefactor  = 0.897826
 **********
 **   18 **HESSE 
 **********
  MNHESS FAILS AND WILL RETURN DIAGONAL MATRIX. 

 FCN=   5064.387     FROM HESSE     STATUS=FAILED        11 CALLS      258 TOTAL
                     EDM=   .91E-12  STRATEGY=1  ERROR MATRIX UNCERTAINTY=100.0%

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor      .0000        10.326        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         .20336        1.5402        .27642E-05   -.77461    
   3  Normalizat    .10000E-01    .25505       -.21869E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .89783        1.2429       -.16188E-05   -.96217    
                               ERR DEF=  .500    
Minuit fit quality: 1   estimated distance: 9.1198e-13
Minuit parameter uncertainties:
  1  2.27495e-05
  2  1.3336
  3  7.83692e-08
  4  1.28577
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) = 5064.38702401
delta logL = 5.27506927028e-11

Extracting fit parameters...

4FGL J0410.9+4216
   Spectrum: PowerLaw
313    Prefactor:  0.000e+00  2.275e-05  0.000e+00  1.000e+06 ( 1.000e-13)
314        Index:  1.503e+00  1.334e+00  0.000e+00  1.000e+01 (-1.000e+00)
315        Scale:  2.029e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
567    Prefactor:  8.978e-01  1.286e+00  0.000e+00  1.000e+01 ( 1.000e+00)
568        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
569        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
562   Normalization:  1.000e-02  7.837e-08  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 62.736 42.278

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 /lscratch/kocevski/18864713/cmap_HighResolution_709257601_709516801_4FGL_J0410.9+4216_daily_bin1813.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.25e-02', job_status='DONE', photon_flux_upper_limit='1.64e-07', time_completed='2023-07-10 08:54:27.698264', job_id='18864713', GAL2='0.90', fit_tolerance='1e-08', EG2='0.01', EG='0.01', time_epoch_completed='1689004467.7', return_code2='101', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.90', dlogl='5.28e-11', ts2='0.00', photon_index_error='0.00', photon_index='2.19' WHERE bin_id='1813' AND source_name='4FGL J0410.9+4216' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Jul 10 08:54:27 PDT 2023

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


Performing analysis on: 4FGL_J0410.9+4216_daily_bin1813
RA = 62.736, Dec = 42.2777
tmin = 709257601, tmax = 709516801
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='18866161', job_status='RUN', time_executed='2023-07-10 08:54:22.648879', time_epoch_executed='1689004462.65' WHERE source_name='4FGL J0410.9+4216' and cadence='daily' and bin_id='1813'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/18866161

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/18866161/ft1_4FGL_J0410.9+4216_daily_bin1813.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/18866161/ft2_4FGL_J0410.9+4216_daily_bin1813.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/18866161/ft1_4FGL_J0410.9+4216_daily_bin1813.fits outfile=/lscratch/kocevski/18866161/ft1_filteredMKT_4FGL_J0410.9+4216_daily_bin1813.fits ra=62.736 dec=42.2777 rad=12.0 tmin=709257601.0 tmax=709516801.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 1.84
user 1.38
sys 0.15

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/18866161/ft2_4FGL_J0410.9+4216_daily_bin1813.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/18866161/ft2_4FGL_J0410.9+4216_daily_bin1813.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/18866161/ft1_filteredMKT_4FGL_J0410.9+4216_daily_bin1813.fits evtable="EVENTS" outfile="/lscratch/kocevski/18866161/ft1_filtered_4FGL_J0410.9+4216_daily_bin1813.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.60
user 0.19
sys 0.13

Number of photons that the gtmktime cut: 515

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/18866161/ft1_filtered_4FGL_J0410.9+4216_daily_bin1813.fits" evtable="EVENTS" scfile=/lscratch/kocevski/18866161/ft2_4FGL_J0410.9+4216_daily_bin1813.fits sctable="SC_DATA" outfile=/lscratch/kocevski/18866161/ltcube_709257601_709516801_4FGL_J0410.9+4216_daily_bin1813.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/18866161/ft2_4FGL_J0410.9+4216_daily_bin1813.fits
.....................!
real 9.02
user 8.48
sys 0.23

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/18866161/ft1_filtered_4FGL_J0410.9+4216_daily_bin1813.fits evtable="EVENTS" scfile=/lscratch/kocevski/18866161/ft2_4FGL_J0410.9+4216_daily_bin1813.fits sctable="SC_DATA" expcube=/lscratch/kocevski/18866161/ltcube_709257601_709516801_4FGL_J0410.9+4216_daily_bin1813.fits outfile=/lscratch/kocevski/18866161/expmap_709257601_709516801_4FGL_J0410.9+4216_daily_bin1813.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/18866161/ltcube_709257601_709516801_4FGL_J0410.9+4216_daily_bin1813.fits
.....................!
real 70.71
user 65.78
sys 4.20

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
Extended source HB 9 in ROI, make sure /sdf/group/fermi/g/LCRepository/Likelihood/ExtendedSources/Extended_8years/Templates/HB9.fits is the correct path to the extended template.
Extended source G150.3+4.5 in ROI with RadialDisk spatial model.
Added 167 point sources and 2 extended sources
If using unbinned likelihood you will need to rerun gtdiffrsp for the extended sources or rerun the makeModel function with optional argument psForce=True

Setting source of interest to:
4FGL J0410.9+4216 @ 62.736 42.2777

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/18866161/ft1_filtered_4FGL_J0410.9+4216_daily_bin1813.fits scfile=/lscratch/kocevski/18866161/ft2_4FGL_J0410.9+4216_daily_bin1813.fits outfile=/lscratch/kocevski/18866161/cmap_709257601_709516801_4FGL_J0410.9+4216_daily_bin1813.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=62.736 yref=42.2777 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.23
sys 0.11

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/18866161/ft1_filtered_4FGL_J0410.9+4216_daily_bin1813.fits scfile=/lscratch/kocevski/18866161/ft2_4FGL_J0410.9+4216_daily_bin1813.fits outfile=/lscratch/kocevski/18866161/cmap_HighResolution_709257601_709516801_4FGL_J0410.9+4216_daily_bin1813.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=62.736 yref=42.2777 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.59
user 0.20
sys 0.14

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/18866161/ft1_filtered_4FGL_J0410.9+4216_daily_bin1813.fits evtable="EVENTS" scfile=/lscratch/kocevski/18866161/ft2_4FGL_J0410.9+4216_daily_bin1813.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/18866161/Model_4FGL_J0410.9+4216_daily_bin1813.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 G150.3+4.5
adding source GAL_V02
adding source HB 9
Working on...
/lscratch/kocevski/18866161/ft1_filtered_4FGL_J0410.9+4216_daily_bin1813.fits.....................!
real 42.38
user 40.85
sys 0.93

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/18866161/ft1_filtered_4FGL_J0410.9+4216_daily_bin1813.fits', '/lscratch/kocevski/18866161/ft2_4FGL_J0410.9+4216_daily_bin1813.fits', expMap='/lscratch/kocevski/18866161/expmap_709257601_709516801_4FGL_J0410.9+4216_daily_bin1813.fits', expCube='/lscratch/kocevski/18866161/ltcube_709257601_709516801_4FGL_J0410.9+4216_daily_bin1813.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/18866161/Model_4FGL_J0410.9+4216_daily_bin1813.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J0410.9+4216'

4FGL J0410.9+4216
   Spectrum: PowerLaw
313    Prefactor:  1.959e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-13)
314        Index:  2.187e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
315        Scale:  2.029e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/18866161/ft1_filtered_4FGL_J0410.9+4216_daily_bin1813.fits
Spacecraft file(s): /lscratch/kocevski/18866161/ft2_4FGL_J0410.9+4216_daily_bin1813.fits
Exposure map: /lscratch/kocevski/18866161/expmap_709257601_709516801_4FGL_J0410.9+4216_daily_bin1813.fits
Exposure cube: /lscratch/kocevski/18866161/ltcube_709257601_709516801_4FGL_J0410.9+4216_daily_bin1813.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/18866161/Model_4FGL_J0410.9+4216_daily_bin1813.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) = 5064.42596103

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .86450E-04   1.0000          .0000       .10000E+07
     2 'norm      '    4.1657       1.0000          .0000       .10000E+07
     3 'Prefactor '    .30735E-02   1.0000          .0000       .10000E+07
     4 'Prefactor '    .52008E-02   1.0000          .0000       .10000E+07
     5 'norm      '    79.540       1.0000          .0000       .10000E+07
     6 'Prefactor '    3.7429       1.0000          .0000       .10000E+07
     7 'norm      '    .43929E-01   1.0000          .0000       .10000E+07
     8 'Prefactor '    .46330E-05   1.0000          .0000       .10000E+07
     9 'norm      '    .82490E-07   1.0000          .0000       .10000E+07
    10 'Prefactor '    .20780E+06   1.0000          .0000       .10000E+07
    11 'Normalizat'    .10000E-01   1.0000         .10000E-01   10.000    
    12 'Prefactor '    .89860       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5740E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   5064.387     FROM MIGRAD    STATUS=CONVERGED     86 CALLS      790 TOTAL
                     EDM=   .92E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .3%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10547E-07    23.427        .26983E-05** at limit **
   2  norm          4.1672        .99195        .62393E-06    .17076E-01
   3  Prefactor     .55923E-03    74.677       -.45872E-05** at limit **
   4  Prefactor     .16709E-07    30.835        .43173E-05** at limit **
   5  norm          92.798        119.18        .32958E-05   -.24831E-01
   6  Prefactor     3.6293        4.4585       -.56521E-07    .47418E-03
   7  norm          .33029E-07    63.636        .17024E-05** at limit **
   8  Prefactor     .11102E-09    5.0934       -.18193E-06** at limit **
   9  norm          .11102E-09    1.6740       -.25882E-06** at limit **
  10  Prefactor     .20780E+06    1.3261       -.59170E-09    2.6084    
  11  Normalizat    .10000E-01    .15790        .31280E-04** at limit **
  12  Prefactor     .89783        .55096E-01   -.13604E-04    .48428E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 1.05471e-08
  norm       = 4.16722
  Prefactor  = 0.000559229
  Prefactor  = 1.67089e-08
  norm       = 92.7984
  Prefactor  = 3.62929
  norm       = 3.30291e-08
  Prefactor  = 1.11022e-10
  norm       = 1.11022e-10
  Prefactor  = 207798
  Normalizat = 0.01
  Prefactor  = 0.897826
 **********
 **   18 **HESSE 
 **********

 FCN=   5064.387     FROM HESSE     STATUS=OK           153 CALLS      943 TOTAL
                     EDM=   .32E-01    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10547E-07    23.326        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  norm          4.1672        .99576        .49358E-03   -1.5667    
   3  Prefactor     .55923E-03    662.55        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .16709E-07    30.844        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          92.798        124.43        .11213E-03   -1.5515    
   6  Prefactor     3.6293        4.5073        .52165E-03   -1.5670    
   7  norm          .33029E-07    15.332        .89025E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .11102E-09    5.1039        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          .11102E-09    1.6859        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .20780E+06    27965.        .29762E-05   -.62414    
  11  Normalizat    .10000E-01    .14059        .32094       -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .89783        .60854E-01    .29468E-01   -.96217    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 0.032371
Minuit parameter uncertainties:
  1  0.000990741
  2  0.995764
  3  1.21753
  4  0.00143624
  5  124.438
  6  4.50728
  7  0.00142369
  8  4.57419e-05
  9  2.84267e-05
  10  27986.7
  11  4.65438e-07
  12  0.0608589
Done.

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

Extracting fit parameters...

4FGL J0410.9+4216
   Spectrum: PowerLaw
313    Prefactor:  1.110e-10  4.574e-05  0.000e+00  1.000e+06 ( 1.000e-13)
314        Index:  2.187e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
315        Scale:  2.029e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
567    Prefactor:  8.978e-01  6.086e-02  0.000e+00  1.000e+01 ( 1.000e+00)
568        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
569        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
562   Normalization:  1.000e-02  4.654e-07  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 62.736 42.278
Photon Flux Upper Limit: 1.63760736357e-07 ph cm-2 s-1
Energy Flux Upper Limit: 0.0124646502524 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/18866161/likelihoodResults_709257601_709516801_4FGL_J0410.9+4216_daily_bin1813.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) = 5064.38718602
delta logL = -0.000162018734045

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 5064.38702416
delta logL = -1.50687810674e-07

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .29515E-06   1.0000          .0000       .10000E+07
     2 'Index     '    .33591       1.0000          .0000       10.000    
     3 'Normalizat'    .10000E-01   1.0000         .10000E-01   10.000    
     4 'Prefactor '    .89784       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5740E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   5064.387     FROM MIGRAD    STATUS=CONVERGED     28 CALLS      247 TOTAL
                     EDM=   .91E-12  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.6%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor      .0000        10.338       -.79782E-06** at limit **
   2  Index         1.5028        2.5130        .27642E-05     .0000    
   3  Normalizat    .10000E-01    .16060       -.21869E-04** at limit **
   4  Prefactor     .89783        .53507E-01   -.16188E-05   -.34746E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0
  Index      = 1.50281
  Normalizat = 0.01
  Prefactor  = 0.897826
 **********
 **   18 **HESSE 
 **********
  MNHESS FAILS AND WILL RETURN DIAGONAL MATRIX. 

 FCN=   5064.387     FROM HESSE     STATUS=FAILED        11 CALLS      258 TOTAL
                     EDM=   .91E-12  STRATEGY=1  ERROR MATRIX UNCERTAINTY=100.0%

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor      .0000        10.326        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         .20336        1.5402        .27642E-05   -.77461    
   3  Normalizat    .10000E-01    .25505       -.21869E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .89783        1.2429       -.16188E-05   -.96217    
                               ERR DEF=  .500    
Minuit fit quality: 1   estimated distance: 9.1198e-13
Minuit parameter uncertainties:
  1  2.27495e-05
  2  1.3336
  3  7.83692e-08
  4  1.28577
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) = 5064.38702401
delta logL = 5.27506927028e-11

Extracting fit parameters...

4FGL J0410.9+4216
   Spectrum: PowerLaw
313    Prefactor:  0.000e+00  2.275e-05  0.000e+00  1.000e+06 ( 1.000e-13)
314        Index:  1.503e+00  1.334e+00  0.000e+00  1.000e+01 (-1.000e+00)
315        Scale:  2.029e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
567    Prefactor:  8.978e-01  1.286e+00  0.000e+00  1.000e+01 ( 1.000e+00)
568        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
569        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
562   Normalization:  1.000e-02  7.837e-08  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 62.736 42.278

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 /lscratch/kocevski/18866161/cmap_HighResolution_709257601_709516801_4FGL_J0410.9+4216_daily_bin1813.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.25e-02', job_status='DONE', photon_flux_upper_limit='1.64e-07', time_completed='2023-07-10 08:59:31.629879', job_id='18866161', GAL2='0.90', fit_tolerance='1e-08', EG2='0.01', EG='0.01', time_epoch_completed='1689004771.63', return_code2='101', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.90', dlogl='5.28e-11', ts2='0.00', photon_index_error='0.00', photon_index='2.19' WHERE bin_id='1813' AND source_name='4FGL J0410.9+4216' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Jul 10 08:59:31 PDT 2023

