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

 FCN=   6064.909     FROM HESSE     STATUS=OK           384 CALLS     1480 TOTAL
                     EDM=   .85E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .13878E-07    58.199        .11404E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor      .0000        1.0974        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor      .0000        4.9544        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     32.878        19.434        .17351E-03   -1.5593    
   5  Prefactor     81.128        47.071        .11120E-03   -1.5528    
   6  Prefactor      .0000        .92225        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .30187E-06    7.8100        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     1.2973        4.0726        .96707E-03   -1.5685    
   9  norm          .69091        .83302        .61296E-03   -1.5691    
  10  Prefactor     34.622        29.923        .17097E-03   -1.5590    
  11  norm          3.4172        1.6346        .54669E-03   -1.5671    
  12  Prefactor     .22538E-07    15.263        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor      .0000        1.1580        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          .21039E-07    7.0632        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .12923E-06    7.9882        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     .99920E-09    5.0807        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     4.6086        3.3630        .46839E-03   -1.5665    
  18  Prefactor     19.744        21.198        .22653E-03   -1.5619    
  19  Prefactor     13.706        25.977        .26171E-03   -1.5634    
  20  Prefactor     31.845        40.711        .17282E-03   -1.5595    
  21  Normalizat    .85013        .18380        .63652E-01   -.98235    
  22  Prefactor     1.1240        .15488        .36771E-01   -.88702    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 8.47916e-07
Minuit parameter uncertainties:
  1  0.00179566
  2  2.02967e-06
  3  8.87302e-06
  4  19.4337
  5  47.0709
  6  2.52508e-06
  7  0.0030708
  8  4.0726
  9  0.833022
  10  29.9229
  11  1.63459
  12  0.00117358
  13  3.45277e-06
  14  0.000770742
  15  0.00203217
  16  0.000143351
  17  3.36296
  18  21.1983
  19  25.9773
  20  40.7114
  21  0.183935
  22  0.154944
/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) = 6064.90949761

Extracting fit parameters...

4FGL J0401.9-2034
   Spectrum: PowerLaw
250    Prefactor:  0.000e+00  3.453e-06  0.000e+00  1.000e+06 ( 1.000e-12)
251        Index:  2.309e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
252        Scale:  9.282e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
468    Prefactor:  1.124e+00  1.549e-01  0.000e+00  1.000e+01 ( 1.000e+00)
469        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
470        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
464   Normalization:  8.501e-01  1.839e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.00
Ra Dec: 60.487 -20.580
Photon Flux Upper Limit: 6.20711958788e-08 ph cm-2 s-1
Energy Flux Upper Limit: 0.00476676214259 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/18864456/likelihoodResults_709516801_709776001_4FGL_J0401.9-2034_daily_bin1814.txt

Performing a free index iterative likelihood fit...

Freezing all point sources, except source of interest...

Done.

Freeing candidate source...
Done.

Fit tolerance = 1

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6064.91292277
delta logL = -0.00342516274395

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 6064.90949768
delta logL = -7.05031197867e-08

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

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

 FCN=   6064.909     FROM MIGRAD    STATUS=CONVERGED     43 CALLS      250 TOTAL
                     EDM=   .21E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=100.0%

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor      .0000        .41696        .27536E-02** at limit **
   2  Index         3.1788        1.3782        .55827E-04     .0000    
   3  Normalizat    .85013        1.1875        .13040E-04    .14455E-03
   4  Prefactor     1.1240        1.1345       -.17279E-05    .18894E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0
  Index      = 3.17879
  Normalizat = 0.85013
  Prefactor  = 1.12404
 **********
 **   18 **HESSE 
 **********
  MNHESS FAILS AND WILL RETURN DIAGONAL MATRIX. 

 FCN=   6064.909     FROM HESSE     STATUS=FAILED         9 CALLS      259 TOTAL
                     EDM=   .21E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=100.0%

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor      .0000        .41696        .27536E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         1.1373        2.1230        .55827E-04   -.37282    
   3  Normalizat    .85013        1.1875        .13040E-04   -.98235    
   4  Prefactor     1.1240        1.1345       -.17279E-05   -.88702    
                               ERR DEF=  .500    
Minuit fit quality: 1   estimated distance: 2.13175e-11
Minuit parameter uncertainties:
  1  1.54011e-06
  2  1.39921
  3  1.22718
  4  1.16041
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) = 6064.90949761
delta logL = -1.54614099301e-11

Extracting fit parameters...

4FGL J0401.9-2034
   Spectrum: PowerLaw
250    Prefactor:  0.000e+00  1.540e-06  0.000e+00  1.000e+06 ( 1.000e-12)
251        Index:  3.179e+00  1.399e+00  0.000e+00  1.000e+01 (-1.000e+00)
252        Scale:  9.282e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
468    Prefactor:  1.124e+00  1.160e+00  0.000e+00  1.000e+01 ( 1.000e+00)
469        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
470        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
464   Normalization:  8.501e-01  1.227e+00  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.00
Ra Dec: 60.487 -20.580

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/18864456/cmap_HighResolution_709516801_709776001_4FGL_J0401.9-2034_daily_bin1814.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='4.77e-03', job_status='DONE', photon_flux_upper_limit='6.21e-08', time_completed='2023-07-10 08:53:42.513774', job_id='18864456', GAL2='1.12', fit_tolerance='1e-08', EG2='0.85', EG='0.85', time_epoch_completed='1689004422.51', return_code2='101', ts='0.00', comment='SUCCESS', return_code='0', GAL='1.12', dlogl='-1.55e-11', ts2='0.00', photon_index_error='0.00', photon_index='2.31' WHERE bin_id='1814' AND source_name='4FGL J0401.9-2034' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Jul 10 08:53:42 PDT 2023

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


Performing analysis on: 4FGL_J0401.9-2034_daily_bin1814
RA = 60.4867, Dec = -20.5804
tmin = 709516801, tmax = 709776001
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='18865916', job_status='RUN', time_executed='2023-07-10 08:53:33.629534', time_epoch_executed='1689004413.63' WHERE source_name='4FGL J0401.9-2034' and cadence='daily' and bin_id='1814'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/18865916

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/18865916/ft1_4FGL_J0401.9-2034_daily_bin1814.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/18865916/ft2_4FGL_J0401.9-2034_daily_bin1814.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/18865916/ft1_4FGL_J0401.9-2034_daily_bin1814.fits outfile=/lscratch/kocevski/18865916/ft1_filteredMKT_4FGL_J0401.9-2034_daily_bin1814.fits ra=60.4867 dec=-20.5804 rad=12.0 tmin=709516801.0 tmax=709776001.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.55
user 1.11
sys 0.18

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/18865916/ft2_4FGL_J0401.9-2034_daily_bin1814.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/18865916/ft2_4FGL_J0401.9-2034_daily_bin1814.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/18865916/ft1_filteredMKT_4FGL_J0401.9-2034_daily_bin1814.fits evtable="EVENTS" outfile="/lscratch/kocevski/18865916/ft1_filtered_4FGL_J0401.9-2034_daily_bin1814.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.63
user 0.18
sys 0.14

Number of photons that the gtmktime cut: 548

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/18865916/ft1_filtered_4FGL_J0401.9-2034_daily_bin1814.fits" evtable="EVENTS" scfile=/lscratch/kocevski/18865916/ft2_4FGL_J0401.9-2034_daily_bin1814.fits sctable="SC_DATA" outfile=/lscratch/kocevski/18865916/ltcube_709516801_709776001_4FGL_J0401.9-2034_daily_bin1814.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/18865916/ft2_4FGL_J0401.9-2034_daily_bin1814.fits
.....................!
real 8.31
user 7.77
sys 0.23

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/18865916/ft1_filtered_4FGL_J0401.9-2034_daily_bin1814.fits evtable="EVENTS" scfile=/lscratch/kocevski/18865916/ft2_4FGL_J0401.9-2034_daily_bin1814.fits sctable="SC_DATA" expcube=/lscratch/kocevski/18865916/ltcube_709516801_709776001_4FGL_J0401.9-2034_daily_bin1814.fits outfile=/lscratch/kocevski/18865916/expmap_709516801_709776001_4FGL_J0401.9-2034_daily_bin1814.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/18865916/ltcube_709516801_709776001_4FGL_J0401.9-2034_daily_bin1814.fits
.....................!
real 67.20
user 63.00
sys 3.67

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 Fornax A in ROI, make sure /sdf/group/fermi/g/LCRepository/Likelihood/ExtendedSources/Extended_8years/Templates/FornaxA.fits is the correct path to the extended template.
Added 146 point sources and 1 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 J0401.9-2034 @ 60.4867 -20.5804

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/18865916/ft1_filtered_4FGL_J0401.9-2034_daily_bin1814.fits scfile=/lscratch/kocevski/18865916/ft2_4FGL_J0401.9-2034_daily_bin1814.fits outfile=/lscratch/kocevski/18865916/cmap_709516801_709776001_4FGL_J0401.9-2034_daily_bin1814.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=60.4867 yref=-20.5804 axisrot=0.0 rafield="RA" decfield="DEC" proj="AIT" hpx_ordering_scheme="RING" hpx_order=3 hpx_ebin=yes hpx_region="" evtable="EVENTS" sctable="SC_DATA" efield="ENERGY" tfield="TIME" chatter=2 clobber=yes debug=no gui=no mode="ql"

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

This is gtbin version HEAD
real 0.62
user 0.21
sys 0.12

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/18865916/ft1_filtered_4FGL_J0401.9-2034_daily_bin1814.fits scfile=/lscratch/kocevski/18865916/ft2_4FGL_J0401.9-2034_daily_bin1814.fits outfile=/lscratch/kocevski/18865916/cmap_HighResolution_709516801_709776001_4FGL_J0401.9-2034_daily_bin1814.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=60.4867 yref=-20.5804 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.61
user 0.21
sys 0.14

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/18865916/ft1_filtered_4FGL_J0401.9-2034_daily_bin1814.fits evtable="EVENTS" scfile=/lscratch/kocevski/18865916/ft2_4FGL_J0401.9-2034_daily_bin1814.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/18865916/Model_4FGL_J0401.9-2034_daily_bin1814.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 Fornax A
adding source GAL_V02
Working on...
/lscratch/kocevski/18865916/ft1_filtered_4FGL_J0401.9-2034_daily_bin1814.fits.....................!
real 53.32
user 51.77
sys 1.06

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/18865916/ft1_filtered_4FGL_J0401.9-2034_daily_bin1814.fits', '/lscratch/kocevski/18865916/ft2_4FGL_J0401.9-2034_daily_bin1814.fits', expMap='/lscratch/kocevski/18865916/expmap_709516801_709776001_4FGL_J0401.9-2034_daily_bin1814.fits', expCube='/lscratch/kocevski/18865916/ltcube_709516801_709776001_4FGL_J0401.9-2034_daily_bin1814.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/18865916/Model_4FGL_J0401.9-2034_daily_bin1814.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J0401.9-2034'

4FGL J0401.9-2034
   Spectrum: PowerLaw
250    Prefactor:  1.016e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-12)
251        Index:  2.309e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
252        Scale:  9.282e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/18865916/ft1_filtered_4FGL_J0401.9-2034_daily_bin1814.fits
Spacecraft file(s): /lscratch/kocevski/18865916/ft2_4FGL_J0401.9-2034_daily_bin1814.fits
Exposure map: /lscratch/kocevski/18865916/expmap_709516801_709776001_4FGL_J0401.9-2034_daily_bin1814.fits
Exposure cube: /lscratch/kocevski/18865916/ltcube_709516801_709776001_4FGL_J0401.9-2034_daily_bin1814.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/18865916/Model_4FGL_J0401.9-2034_daily_bin1814.xml
Optimizer: MINUIT
Statistic: UNBINNED

Performing an iterative likelihood fit...

Fit tolerance = 1

Performing likelihood fit...
Done.

MINUIT Return Code (Fixed Index): 102
logL (Fixed Index) = 6067.9583476

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .22158       1.0000          .0000       .10000E+07
     2 'Prefactor '    .63571E-06   1.0000          .0000       .10000E+07
     3 'Prefactor '    .15334E-05   1.0000          .0000       .10000E+07
     4 'Prefactor '    33.224       1.0000          .0000       .10000E+07
     5 'Prefactor '    80.875       1.0000          .0000       .10000E+07
     6 'Prefactor '    .64615E-07   1.0000          .0000       .10000E+07
     7 'Prefactor '    .73134E-04   1.0000          .0000       .10000E+07
     8 'Prefactor '    1.3031       1.0000          .0000       .10000E+07
     9 'norm      '    .69279       1.0000          .0000       .10000E+07
    10 'Prefactor '    34.218       1.0000          .0000       .10000E+07
    11 'norm      '    3.4207       1.0000          .0000       .10000E+07
    12 'Prefactor '    .21927E-03   1.0000          .0000       .10000E+07
    13 'Prefactor '    .69389E-08   1.0000          .0000       .10000E+07
    14 'norm      '    .57295E-04   1.0000          .0000       .10000E+07
    15 'Prefactor '    .61107E-06   1.0000          .0000       .10000E+07
    16 'Prefactor '    .41550E-06   1.0000          .0000       .10000E+07
    17 'Prefactor '    4.6129       1.0000          .0000       .10000E+07
    18 'Prefactor '    19.501       1.0000          .0000       .10000E+07
    19 'Prefactor '    14.618       1.0000          .0000       .10000E+07
    20 'Prefactor '    33.490       1.0000          .0000       .10000E+07
    21 'Normalizat'    .85027       1.0000         .10000E-01   10.000    
    22 'Prefactor '    1.1230       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .4710E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   6064.909     FROM MIGRAD    STATUS=CONVERGED    144 CALLS     1096 TOTAL
                     EDM=   .75E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .4%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .13878E-07    1.8007        .15702E-06** at limit **
   2  Prefactor      .0000        1.0984       -.37038E-07** at limit **
   3  Prefactor      .0000        4.9546        .20671E-06** at limit **
   4  Prefactor     32.878        4.8391       -.13299E-06    .80624E-01
   5  Prefactor     81.128        7.4108        .12528E-06   -.77314E-01
   6  Prefactor      .0000        .92477       -.46155E-06** at limit **
   7  Prefactor     .30187E-06    7.3697       -.88457E-06** at limit **
   8  Prefactor     1.2973        4.0162        .12652E-06    .11101E-02
   9  norm          .69091        .81037       -.20919E-06   -.16922E-02
  10  Prefactor     34.622        14.270        .25077E-06    .10184    
  11  norm          3.4172        1.6209        .16775E-06    .20011E-02
  12  Prefactor     .22538E-07    15.190        .82747E-06** at limit **
  13  Prefactor      .0000        1.1622        .74978E-07** at limit **
  14  norm          .21039E-07    7.0375       -.51710E-06** at limit **
  15  Prefactor     .12923E-06    7.5817        .51343E-06** at limit **
  16  Prefactor     .99920E-09    5.0985        .28872E-06** at limit **
  17  Prefactor     4.6086        3.3629       -.12779E-07    .17332E-03
  18  Prefactor     19.744        7.8050       -.73261E-07    .99139E-01
  19  Prefactor     13.706        22.216       -.70675E-06    .23920E-01
  20  Prefactor     31.845        39.666       -.10670E-05    .14632E-01
  21  Normalizat    .85013        .20216        .17600E-05   -.19890E-04
  22  Prefactor     1.1240        .17352       -.32833E-06   -.17544E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 1.38778e-08
  Prefactor  = 0
  Prefactor  = 0
  Prefactor  = 32.878
  Prefactor  = 81.1277
  Prefactor  = 0
  Prefactor  = 3.0187e-07
  Prefactor  = 1.2973
  norm       = 0.690913
  Prefactor  = 34.6225
  norm       = 3.41716
  Prefactor  = 2.25375e-08
  Prefactor  = 0
  norm       = 2.10387e-08
  Prefactor  = 1.2923e-07
  Prefactor  = 9.99201e-10
  Prefactor  = 4.60864
  Prefactor  = 19.744
  Prefactor  = 13.7055
  Prefactor  = 31.845
  Normalizat = 0.850129
  Prefactor  = 1.12404
 **********
 **   18 **HESSE 
 **********

 FCN=   6064.909     FROM HESSE     STATUS=OK           384 CALLS     1480 TOTAL
                     EDM=   .85E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .13878E-07    58.199        .11404E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor      .0000        1.0974        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor      .0000        4.9544        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     32.878        19.434        .17351E-03   -1.5593    
   5  Prefactor     81.128        47.071        .11120E-03   -1.5528    
   6  Prefactor      .0000        .92225        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .30187E-06    7.8100        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     1.2973        4.0726        .96707E-03   -1.5685    
   9  norm          .69091        .83302        .61296E-03   -1.5691    
  10  Prefactor     34.622        29.923        .17097E-03   -1.5590    
  11  norm          3.4172        1.6346        .54669E-03   -1.5671    
  12  Prefactor     .22538E-07    15.263        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor      .0000        1.1580        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          .21039E-07    7.0632        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .12923E-06    7.9882        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     .99920E-09    5.0807        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     4.6086        3.3630        .46839E-03   -1.5665    
  18  Prefactor     19.744        21.198        .22653E-03   -1.5619    
  19  Prefactor     13.706        25.977        .26171E-03   -1.5634    
  20  Prefactor     31.845        40.711        .17282E-03   -1.5595    
  21  Normalizat    .85013        .18380        .63652E-01   -.98235    
  22  Prefactor     1.1240        .15488        .36771E-01   -.88702    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 8.47916e-07
Minuit parameter uncertainties:
  1  0.00179566
  2  2.02967e-06
  3  8.87302e-06
  4  19.4337
  5  47.0709
  6  2.52508e-06
  7  0.0030708
  8  4.0726
  9  0.833022
  10  29.9229
  11  1.63459
  12  0.00117358
  13  3.45277e-06
  14  0.000770742
  15  0.00203217
  16  0.000143351
  17  3.36296
  18  21.1983
  19  25.9773
  20  40.7114
  21  0.183935
  22  0.154944
Done.

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

Extracting fit parameters...

4FGL J0401.9-2034
   Spectrum: PowerLaw
250    Prefactor:  0.000e+00  3.453e-06  0.000e+00  1.000e+06 ( 1.000e-12)
251        Index:  2.309e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
252        Scale:  9.282e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
468    Prefactor:  1.124e+00  1.549e-01  0.000e+00  1.000e+01 ( 1.000e+00)
469        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
470        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
464   Normalization:  8.501e-01  1.839e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.00
Ra Dec: 60.487 -20.580
Photon Flux Upper Limit: 6.20711958788e-08 ph cm-2 s-1
Energy Flux Upper Limit: 0.00476676214259 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/18865916/likelihoodResults_709516801_709776001_4FGL_J0401.9-2034_daily_bin1814.txt

Performing a free index iterative likelihood fit...

Freezing all point sources, except source of interest...

Done.

Freeing candidate source...
Done.

Fit tolerance = 1

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6064.91292277
delta logL = -0.00342516274395

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 6064.90949768
delta logL = -7.05031197867e-08

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

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

 FCN=   6064.909     FROM MIGRAD    STATUS=CONVERGED     43 CALLS      250 TOTAL
                     EDM=   .21E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=100.0%

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor      .0000        .41696        .27536E-02** at limit **
   2  Index         3.1788        1.3782        .55827E-04     .0000    
   3  Normalizat    .85013        1.1875        .13040E-04    .14455E-03
   4  Prefactor     1.1240        1.1345       -.17279E-05    .18894E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0
  Index      = 3.17879
  Normalizat = 0.85013
  Prefactor  = 1.12404
 **********
 **   18 **HESSE 
 **********
  MNHESS FAILS AND WILL RETURN DIAGONAL MATRIX. 

 FCN=   6064.909     FROM HESSE     STATUS=FAILED         9 CALLS      259 TOTAL
                     EDM=   .21E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=100.0%

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor      .0000        .41696        .27536E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         1.1373        2.1230        .55827E-04   -.37282    
   3  Normalizat    .85013        1.1875        .13040E-04   -.98235    
   4  Prefactor     1.1240        1.1345       -.17279E-05   -.88702    
                               ERR DEF=  .500    
Minuit fit quality: 1   estimated distance: 2.13175e-11
Minuit parameter uncertainties:
  1  1.54011e-06
  2  1.39921
  3  1.22718
  4  1.16041
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) = 6064.90949761
delta logL = -1.54614099301e-11

Extracting fit parameters...

4FGL J0401.9-2034
   Spectrum: PowerLaw
250    Prefactor:  0.000e+00  1.540e-06  0.000e+00  1.000e+06 ( 1.000e-12)
251        Index:  3.179e+00  1.399e+00  0.000e+00  1.000e+01 (-1.000e+00)
252        Scale:  9.282e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
468    Prefactor:  1.124e+00  1.160e+00  0.000e+00  1.000e+01 ( 1.000e+00)
469        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
470        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
464   Normalization:  8.501e-01  1.227e+00  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.00
Ra Dec: 60.487 -20.580

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/18865916/cmap_HighResolution_709516801_709776001_4FGL_J0401.9-2034_daily_bin1814.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='4.77e-03', job_status='DONE', photon_flux_upper_limit='6.21e-08', time_completed='2023-07-10 08:59:04.680261', job_id='18865916', GAL2='1.12', fit_tolerance='1e-08', EG2='0.85', EG='0.85', time_epoch_completed='1689004744.68', return_code2='101', ts='0.00', comment='SUCCESS', return_code='0', GAL='1.12', dlogl='-1.55e-11', ts2='0.00', photon_index_error='0.00', photon_index='2.31' WHERE bin_id='1814' AND source_name='4FGL J0401.9-2034' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Jul 10 08:59:04 PDT 2023

