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

 FCN=   7660.925     FROM HESSE     STATUS=OK           157 CALLS      948 TOTAL
                     EDM=   .96E-04    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     1.2770        3.2480        .98100E-03   -1.5685    
   2  norm          7.0540        6.9056        .37733E-03   -1.5655    
   3  norm          4.2499        1.2043        .48856E-03   -1.5667    
   4  Prefactor      .0000        66.556        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          88.460        131.10        .10563E-03   -1.5520    
   6  Prefactor      .0000        36.590        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     8.5071        7.0696        .34383E-03   -1.5650    
   8  Prefactor     3626.7        872.13        .16636E-04   -1.4503    
   9  norm          2.3800        35.798        .72284E-03   -1.5677    
  10  Prefactor     7.3655        25.580        .36553E-03   -1.5654    
  11  Normalizat    .10000E-01    .15817        .47014       -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .95490        .48110E-01    .25857E-01   -.94248    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 9.64695e-05
Minuit parameter uncertainties:
  1  3.24799
  2  6.90565
  3  1.20425
  4  8.51081e-05
  5  131.107
  6  3.04549e-05
  7  7.06963
  8  872.157
  9  18.4609
  10  25.5801
  11  3.87979e-08
  12  0.0481122
/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) = 7660.92461546

Extracting fit parameters...

4FGL J0359.6+5057
   Spectrum: LogParabola
320         norm:  2.380e+00  1.846e+01  0.000e+00  1.000e+06 ( 1.000e-12)
321        alpha:  2.635e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
322         beta:  1.244e-01  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
323           Eb:  7.364e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
569    Prefactor:  9.549e-01  4.811e-02  0.000e+00  1.000e+01 ( 1.000e+00)
570        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
571        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
564   Normalization:  1.000e-02  3.880e-08  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.02
Ra Dec: 59.916 50.959
Photon Flux Upper Limit: 4.59734503167e-07 ph cm-2 s-1
Energy Flux Upper Limit: 0.000122749109657 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/18864374/likelihoodResults_709257601_709516801_4FGL_J0359.6+5057_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) = 7660.9222729
delta logL = 0.00234255900523

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 7660.91364803
delta logL = 0.0109674370815

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    3.7249       1.0000          .0000       .10000E+07
     2 'alpha     '    2.0204       1.0000          .0000       5.0000    
     3 'Normalizat'    .10000E-01   1.0000         .10000E-01   10.000    
     4 'Prefactor '    .95495       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5840E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   7660.914     FROM MIGRAD    STATUS=CONVERGED     63 CALLS      270 TOTAL
                     EDM=   .76E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          3.6846        94.156        .52296E-03    .69957E-03
   2  alpha         2.0220        3.3218        .42151       -.38888E-04
   3  Normalizat    .10000E-01    .14374        .47197    ** at limit **
   4  Prefactor     .95496        .45559E-01    .25856E-01   -.15848E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 3.6846
  alpha      = 2.02204
  Normalizat = 0.01
  Prefactor  = 0.95496
 **********
 **   18 **HESSE 
 **********

 FCN=   7660.914     FROM HESSE     STATUS=OK            33 CALLS      303 TOTAL
                     EDM=   .44E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          3.6846        26.267        .20918E-04   -1.5670    
   2  alpha         2.0220        3.5002        .86915E-01   -.19237    
   3  Normalizat    .10000E-01    .22903        .17812E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .95496        .39647E-01    .11429E-03   -.94246    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.40826e-08
Minuit parameter uncertainties:
  1  19.676
  2  3.05903
  3  1.26123e-06
  4  0.0396481
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) = 7660.91364558
delta logL = 0.0109698832257

Extracting fit parameters...

4FGL J0359.6+5057
   Spectrum: LogParabola
320         norm:  3.685e+00  1.968e+01  0.000e+00  1.000e+06 ( 1.000e-12)
321        alpha:  2.022e+00  3.059e+00  0.000e+00  5.000e+00 ( 1.000e+00)
322         beta:  1.244e-01  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
323           Eb:  7.364e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
569    Prefactor:  9.550e-01  3.965e-02  0.000e+00  1.000e+01 ( 1.000e+00)
570        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
571        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
564   Normalization:  1.000e-02  1.261e-06  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.02
Ra Dec: 59.916 50.959

Creating a high resolution counts map...
INFO: Auto-setting vmin to -1.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  1.110e+00 [aplpy.core]
Saving /lscratch/kocevski/18864374/cmap_HighResolution_709257601_709516801_4FGL_J0359.6+5057_daily_bin1813.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.23e-04', job_status='DONE', photon_flux_upper_limit='4.60e-07', time_completed='2023-07-10 08:53:38.212172', job_id='18864374', GAL2='0.95', fit_tolerance='1e-08', EG2='0.01', EG='0.01', time_epoch_completed='1689004418.21', return_code2='0', ts='0.02', comment='SUCCESS', return_code='0', GAL='0.95', dlogl='1.10e-02', ts2='0.04', photon_index_error='0.00', photon_index='2.64' WHERE bin_id='1813' AND source_name='4FGL J0359.6+5057' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Jul 10 08:53:38 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_J0359.6+5057_daily_bin1813
RA = 59.9158, Dec = 50.959
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='18865889', job_status='RUN', time_executed='2023-07-10 08:53:23.582081', time_epoch_executed='1689004403.58' WHERE source_name='4FGL J0359.6+5057' and cadence='daily' and bin_id='1813'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/18865889

Creating custom pfile directory:
/lscratch/kocevski/18865889/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/18865889/ft1_4FGL_J0359.6+5057_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/18865889/ft2_4FGL_J0359.6+5057_daily_bin1813.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/18865889/ft1_4FGL_J0359.6+5057_daily_bin1813.fits outfile=/lscratch/kocevski/18865889/ft1_filteredMKT_4FGL_J0359.6+5057_daily_bin1813.fits ra=59.9158 dec=50.959 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.75
user 1.28
sys 0.17

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/18865889/ft2_4FGL_J0359.6+5057_daily_bin1813.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/18865889/ft2_4FGL_J0359.6+5057_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/18865889/ft1_filteredMKT_4FGL_J0359.6+5057_daily_bin1813.fits evtable="EVENTS" outfile="/lscratch/kocevski/18865889/ft1_filtered_4FGL_J0359.6+5057_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.58
user 0.17
sys 0.14

Number of photons that the gtmktime cut: 795

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/18865889/ft1_filtered_4FGL_J0359.6+5057_daily_bin1813.fits" evtable="EVENTS" scfile=/lscratch/kocevski/18865889/ft2_4FGL_J0359.6+5057_daily_bin1813.fits sctable="SC_DATA" outfile=/lscratch/kocevski/18865889/ltcube_709257601_709516801_4FGL_J0359.6+5057_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/18865889/ft2_4FGL_J0359.6+5057_daily_bin1813.fits
.....................!
real 8.26
user 7.73
sys 0.21

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/18865889/ft1_filtered_4FGL_J0359.6+5057_daily_bin1813.fits evtable="EVENTS" scfile=/lscratch/kocevski/18865889/ft2_4FGL_J0359.6+5057_daily_bin1813.fits sctable="SC_DATA" expcube=/lscratch/kocevski/18865889/ltcube_709257601_709516801_4FGL_J0359.6+5057_daily_bin1813.fits outfile=/lscratch/kocevski/18865889/expmap_709257601_709516801_4FGL_J0359.6+5057_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/18865889/ltcube_709257601_709516801_4FGL_J0359.6+5057_daily_bin1813.fits
.....................!
real 65.59
user 61.09
sys 3.89

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 G150.3+4.5 in ROI with RadialDisk spatial model.
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 W 3 in ROI, make sure /sdf/group/fermi/g/LCRepository/Likelihood/ExtendedSources/Extended_8years/Templates/W3.fits is the correct path to the extended template.
Extended source HB 3 in ROI with RadialDisk spatial model.
Added 166 point sources and 4 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 J0359.6+5057 @ 59.9158 50.959

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/18865889/ft1_filtered_4FGL_J0359.6+5057_daily_bin1813.fits scfile=/lscratch/kocevski/18865889/ft2_4FGL_J0359.6+5057_daily_bin1813.fits outfile=/lscratch/kocevski/18865889/cmap_709257601_709516801_4FGL_J0359.6+5057_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=59.9158 yref=50.959 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.20
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/18865889/ft1_filtered_4FGL_J0359.6+5057_daily_bin1813.fits scfile=/lscratch/kocevski/18865889/ft2_4FGL_J0359.6+5057_daily_bin1813.fits outfile=/lscratch/kocevski/18865889/cmap_HighResolution_709257601_709516801_4FGL_J0359.6+5057_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=59.9158 yref=50.959 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.60
user 0.22
sys 0.12

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/18865889/ft1_filtered_4FGL_J0359.6+5057_daily_bin1813.fits evtable="EVENTS" scfile=/lscratch/kocevski/18865889/ft2_4FGL_J0359.6+5057_daily_bin1813.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/18865889/Model_4FGL_J0359.6+5057_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 3
adding source HB 9
adding source W 3
Working on...
/lscratch/kocevski/18865889/ft1_filtered_4FGL_J0359.6+5057_daily_bin1813.fits.....................!
real 52.64
user 51.17
sys 0.93

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/18865889/ft1_filtered_4FGL_J0359.6+5057_daily_bin1813.fits', '/lscratch/kocevski/18865889/ft2_4FGL_J0359.6+5057_daily_bin1813.fits', expMap='/lscratch/kocevski/18865889/expmap_709257601_709516801_4FGL_J0359.6+5057_daily_bin1813.fits', expCube='/lscratch/kocevski/18865889/ltcube_709257601_709516801_4FGL_J0359.6+5057_daily_bin1813.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/18865889/Model_4FGL_J0359.6+5057_daily_bin1813.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J0359.6+5057'

4FGL J0359.6+5057
   Spectrum: LogParabola
320         norm:  8.547e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-12)
321        alpha:  2.635e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
322         beta:  1.244e-01  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
323           Eb:  7.364e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/18865889/ft1_filtered_4FGL_J0359.6+5057_daily_bin1813.fits
Spacecraft file(s): /lscratch/kocevski/18865889/ft2_4FGL_J0359.6+5057_daily_bin1813.fits
Exposure map: /lscratch/kocevski/18865889/expmap_709257601_709516801_4FGL_J0359.6+5057_daily_bin1813.fits
Exposure cube: /lscratch/kocevski/18865889/ltcube_709257601_709516801_4FGL_J0359.6+5057_daily_bin1813.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/18865889/Model_4FGL_J0359.6+5057_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) = 7661.07352042

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    1.2797       1.0000          .0000       .10000E+07
     2 'norm      '    7.0591       1.0000          .0000       .10000E+07
     3 'norm      '    4.2492       1.0000          .0000       .10000E+07
     4 'Prefactor '    .12493E-03   1.0000          .0000       .10000E+07
     5 'norm      '    89.628       1.0000          .0000       .10000E+07
     6 'Prefactor '    .11061E-02   1.0000          .0000       .10000E+07
     7 'Prefactor '    8.4883       1.0000          .0000       .10000E+07
     8 'Prefactor '    3626.4       1.0000          .0000       .10000E+07
     9 'norm      '    2.0445       1.0000          .0000       .10000E+07
    10 'Prefactor '    7.5177       1.0000          .0000       .10000E+07
    11 'Normalizat'    .10000E-01   1.0000         .10000E-01   10.000    
    12 'Prefactor '    .95496       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5840E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   7660.925     FROM MIGRAD    STATUS=CONVERGED     99 CALLS      791 TOTAL
                     EDM=   .67E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .2%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     1.2770        3.1805        .25008E-08    .23596E-04
   2  norm          7.0540        6.8279        .20099E-07    .36544E-04
   3  norm          4.2499        1.1936        .65449E-09    .42609E-04
   4  Prefactor      .0000        66.476       -.15725E-06** at limit **
   5  norm          88.460        130.65       -.20062E-06   -.23550E-01
   6  Prefactor      .0000        36.518       -.12394E-07** at limit **
   7  Prefactor     8.5071        7.0491        .13823E-07    .31063E-03
   8  Prefactor     3626.7        29.166        .71584E-08   -.67618    
   9  norm          2.3800        35.875        .71869E-06    .16257E-04
  10  Prefactor     7.3655        25.472       -.29928E-07    .43073E-03
  11  Normalizat    .10000E-01    .22803       -.37258E-05** at limit **
  12  Prefactor     .95490        .43497E-01   -.51761E-07    .28497E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 1.27698
  norm       = 7.05397
  norm       = 4.24986
  Prefactor  = 0
  norm       = 88.4604
  Prefactor  = 0
  Prefactor  = 8.50711
  Prefactor  = 3626.65
  norm       = 2.38004
  Prefactor  = 7.36553
  Normalizat = 0.01
  Prefactor  = 0.954896
 **********
 **   18 **HESSE 
 **********

 FCN=   7660.925     FROM HESSE     STATUS=OK           157 CALLS      948 TOTAL
                     EDM=   .96E-04    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     1.2770        3.2480        .98100E-03   -1.5685    
   2  norm          7.0540        6.9056        .37733E-03   -1.5655    
   3  norm          4.2499        1.2043        .48856E-03   -1.5667    
   4  Prefactor      .0000        66.556        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          88.460        131.10        .10563E-03   -1.5520    
   6  Prefactor      .0000        36.590        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     8.5071        7.0696        .34383E-03   -1.5650    
   8  Prefactor     3626.7        872.13        .16636E-04   -1.4503    
   9  norm          2.3800        35.798        .72284E-03   -1.5677    
  10  Prefactor     7.3655        25.580        .36553E-03   -1.5654    
  11  Normalizat    .10000E-01    .15817        .47014       -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .95490        .48110E-01    .25857E-01   -.94248    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 9.64695e-05
Minuit parameter uncertainties:
  1  3.24799
  2  6.90565
  3  1.20425
  4  8.51081e-05
  5  131.107
  6  3.04549e-05
  7  7.06963
  8  872.157
  9  18.4609
  10  25.5801
  11  3.87979e-08
  12  0.0481122
Done.

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

Extracting fit parameters...

4FGL J0359.6+5057
   Spectrum: LogParabola
320         norm:  2.380e+00  1.846e+01  0.000e+00  1.000e+06 ( 1.000e-12)
321        alpha:  2.635e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
322         beta:  1.244e-01  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
323           Eb:  7.364e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
569    Prefactor:  9.549e-01  4.811e-02  0.000e+00  1.000e+01 ( 1.000e+00)
570        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
571        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
564   Normalization:  1.000e-02  3.880e-08  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.02
Ra Dec: 59.916 50.959
Photon Flux Upper Limit: 4.59734503167e-07 ph cm-2 s-1
Energy Flux Upper Limit: 0.000122749109657 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/18865889/likelihoodResults_709257601_709516801_4FGL_J0359.6+5057_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) = 7660.9222729
delta logL = 0.00234255900523

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 7660.91364803
delta logL = 0.0109674370815

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    3.7249       1.0000          .0000       .10000E+07
     2 'alpha     '    2.0204       1.0000          .0000       5.0000    
     3 'Normalizat'    .10000E-01   1.0000         .10000E-01   10.000    
     4 'Prefactor '    .95495       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5840E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   7660.914     FROM MIGRAD    STATUS=CONVERGED     63 CALLS      270 TOTAL
                     EDM=   .76E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          3.6846        94.156        .52296E-03    .69957E-03
   2  alpha         2.0220        3.3218        .42151       -.38888E-04
   3  Normalizat    .10000E-01    .14374        .47197    ** at limit **
   4  Prefactor     .95496        .45559E-01    .25856E-01   -.15848E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 3.6846
  alpha      = 2.02204
  Normalizat = 0.01
  Prefactor  = 0.95496
 **********
 **   18 **HESSE 
 **********

 FCN=   7660.914     FROM HESSE     STATUS=OK            33 CALLS      303 TOTAL
                     EDM=   .44E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          3.6846        26.267        .20918E-04   -1.5670    
   2  alpha         2.0220        3.5002        .86915E-01   -.19237    
   3  Normalizat    .10000E-01    .22903        .17812E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .95496        .39647E-01    .11429E-03   -.94246    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.40826e-08
Minuit parameter uncertainties:
  1  19.676
  2  3.05903
  3  1.26123e-06
  4  0.0396481
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) = 7660.91364558
delta logL = 0.0109698832257

Extracting fit parameters...

4FGL J0359.6+5057
   Spectrum: LogParabola
320         norm:  3.685e+00  1.968e+01  0.000e+00  1.000e+06 ( 1.000e-12)
321        alpha:  2.022e+00  3.059e+00  0.000e+00  5.000e+00 ( 1.000e+00)
322         beta:  1.244e-01  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
323           Eb:  7.364e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
569    Prefactor:  9.550e-01  3.965e-02  0.000e+00  1.000e+01 ( 1.000e+00)
570        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
571        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
564   Normalization:  1.000e-02  1.261e-06  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.02
Ra Dec: 59.916 50.959

Creating a high resolution counts map...
INFO: Auto-setting vmin to -1.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  1.110e+00 [aplpy.core]
Saving /lscratch/kocevski/18865889/cmap_HighResolution_709257601_709516801_4FGL_J0359.6+5057_daily_bin1813.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.23e-04', job_status='DONE', photon_flux_upper_limit='4.60e-07', time_completed='2023-07-10 08:58:50.996912', job_id='18865889', GAL2='0.95', fit_tolerance='1e-08', EG2='0.01', EG='0.01', time_epoch_completed='1689004731.0', return_code2='0', ts='0.02', comment='SUCCESS', return_code='0', GAL='0.95', dlogl='1.10e-02', ts2='0.04', photon_index_error='0.00', photon_index='2.64' WHERE bin_id='1813' AND source_name='4FGL J0359.6+5057' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Jul 10 08:58:51 PDT 2023

