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

 FCN=   19704.60     FROM HESSE     STATUS=OK           316 CALLS     1430 TOTAL
                     EDM=   .34E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          2.6734        1.1956        .62507E-03   -1.5675    
   2  Prefactor     64.979        34.100        .12143E-03   -1.5547    
   3  Prefactor      .0000        6.2183        .17221E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  norm          17.490        1.9384        .23931E-03   -1.5624    
   5  Prefactor     13.917        11.164        .26822E-03   -1.5633    
   6  Prefactor     6.5597        2.2708        .39156E-03   -1.5657    
   7  norm           .0000        2.2849        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor      .0000        1.5392        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     6.7981        5.1804        .38485E-03   -1.5656    
  10  Prefactor     15.053        17.104        .25680E-03   -1.5630    
  11  norm          .41004        2.2223        .91868E-02   -1.5695    
  12  norm          .50425        1.1950        .77938E-03   -1.5694    
  13  norm          .55511E-10    18.439        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          5.6899        2.3385        .42085E-03   -1.5660    
  15  Prefactor     13.976        10.500        .26725E-03   -1.5633    
  16  norm          .72195        .50239        .58899E-04   -1.5691    
  17  norm           .0000        2.4070        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    1.1247        .12385        .70367E-01   -.88961    
  19  Prefactor     .91084        .76109E-01    .45131E-01   -.95763    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.41211e-08
Minuit parameter uncertainties:
  1  1.19558
  2  34.1002
  3  4.68451e-06
  4  1.93844
  5  11.1636
  6  2.27082
  7  9.42054e-06
  8  1.83791e-06
  9  5.1804
  10  17.1045
  11  1.90918
  12  1.195
  13  6.86868e-05
  14  2.33848
  15  10.4996
  16  0.502389
  17  2.71014e-06
  18  0.123885
  19  0.0761184

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).

/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) = 19704.6022789

Extracting fit parameters...

4FGL J0804.5+0414
   Spectrum: PowerLaw
281    Prefactor:  1.505e+01  1.710e+01  0.000e+00  1.000e+06 ( 1.000e-13)
282        Index:  2.491e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
283        Scale:  8.390e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
550    Prefactor:  9.108e-01  7.612e-02  0.000e+00  1.000e+01 ( 1.000e+00)
551        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
552        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
549   Normalization:  1.125e+00  1.239e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.98
Ra Dec: 121.133 4.239
Photon Flux Upper Limit: 6.81599640321e-08 ph cm-2 s-1
Energy Flux Upper Limit: 0.00529843367738 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/19653082/likelihoodResults_710726401_711331201_4FGL_J0804.5+0414_weekly_bin780.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) = 19704.5949536
delta logL = 0.00732530933965

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 19704.5922484
delta logL = 0.0100305531705

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   19704.59     FROM MIGRAD    STATUS=CONVERGED     65 CALLS      232 TOTAL
                     EDM=   .13E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     16.403        177.36        .24717E-03    .43948E-02
   2  Index         2.3484        1.3218        .46474        .53405E-05
   3  Normalizat    1.1282        .20080E-01    .70271E-01   -.55548E-04
   4  Prefactor     .90932        .12478E-01    .45124E-01   -.18729E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 16.4032
  Index      = 2.34842
  Normalizat = 1.12819
  Prefactor  = 0.909318
 **********
 **   18 **HESSE 
 **********

 FCN=   19704.59     FROM HESSE     STATUS=OK            33 CALLS      265 TOTAL
                     EDM=   .46E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     16.403        20.219        .49434E-04   -1.5627    
   2  Index         2.3484        .95826        .73434E-02   -.55897    
   3  Normalizat    1.1282        .13544        .31093E-03   -.88852    
   4  Prefactor     .90932        .84649E-01    .21633E-03   -.95816    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.5762e-11
Minuit parameter uncertainties:
  1  20.2191
  2  0.966615
  3  0.13548
  4  0.0846609
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) = 19704.5922475
delta logL = 0.010031445403

Extracting fit parameters...

4FGL J0804.5+0414
   Spectrum: PowerLaw
281    Prefactor:  1.640e+01  2.022e+01  0.000e+00  1.000e+06 ( 1.000e-13)
282        Index:  2.348e+00  9.666e-01  0.000e+00  1.000e+01 (-1.000e+00)
283        Scale:  8.390e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
550    Prefactor:  9.093e-01  8.466e-02  0.000e+00  1.000e+01 ( 1.000e+00)
551        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
552        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
549   Normalization:  1.128e+00  1.355e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.98
Ra Dec: 121.133 4.239

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/19653082/cmap_HighResolution_710726401_711331201_4FGL_J0804.5+0414_weekly_bin780.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='5.30e-03', job_status='DONE', photon_flux_upper_limit='6.82e-08', time_completed='2023-07-18 00:56:46.261573', job_id='19653082', GAL2='0.91', fit_tolerance='1e-08', EG2='1.13', EG='1.12', time_epoch_completed='1689667006.26', return_code2='0', ts='0.98', comment='SUCCESS', return_code='0', GAL='0.91', dlogl='1.00e-02', ts2='0.99', photon_index_error='0.00', photon_index='2.49' WHERE bin_id='780' AND source_name='4FGL J0804.5+0414' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Jul 18 00:56:46 PDT 2023

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


Performing analysis on: 4FGL_J0804.5+0414_weekly_bin780
RA = 121.133, Dec = 4.2393
tmin = 710726401, tmax = 711331201
emin = 100.0, emax = 100000.0
irfs = P8R3_SOURCE_V2
ROI = 12
zmax = 90

Fitting strategies:
Fix sources to their catalog values = True
Leave variable source normalizations free = True
Perform pre-fit where ALL sources are frozen to catalog values = False
Perform secondary fit with a free spectral index = True
Remove all catalog sources = False
Remove weak (TS < 2) catalog sources = False
Freeze Galactic component = False

Likelihood fit parameters:
Statistic: UNBINNED
Optimizer: MINUIT

Catalog: 4FGL

Repository job = True

LAT data source:
Data catalog

Updating database...

UPDATE lightcurve_data_v2 SET job_id='19654791', job_status='RUN', time_executed='2023-07-18 00:55:53.108920', time_epoch_executed='1689666953.11' WHERE source_name='4FGL J0804.5+0414' and cadence='weekly' and bin_id='780'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/19654791

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

Retrieving the FT1 file...

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

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

Retrieving 106 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/19654791/ft1_4FGL_J0804.5+0414_weekly_bin780.fits


Retrieving the FT1 file...

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

Retrieving 106 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/19654791/ft2_4FGL_J0804.5+0414_weekly_bin780.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/19654791/ft1_4FGL_J0804.5+0414_weekly_bin780.fits outfile=/lscratch/kocevski/19654791/ft1_filteredMKT_4FGL_J0804.5+0414_weekly_bin780.fits ra=121.133 dec=4.2393 rad=12.0 tmin=710726401.0 tmax=711331201.0 emin=100.0 emax=100000.0 zmin=0.0 zmax=90.0 evclass=128 evtype="INDEF" convtype=-1 phasemin=0.0 phasemax=1.0 evtable="EVENTS" chatter=2 clobber=yes debug=no gui=no mode="ql"

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

Done.
real 4.47
user 3.79
sys 0.23

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/19654791/ft2_4FGL_J0804.5+0414_weekly_bin780.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/19654791/ft2_4FGL_J0804.5+0414_weekly_bin780.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/19654791/ft1_filteredMKT_4FGL_J0804.5+0414_weekly_bin780.fits evtable="EVENTS" outfile="/lscratch/kocevski/19654791/ft1_filtered_4FGL_J0804.5+0414_weekly_bin780.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.74
user 0.18
sys 0.15

Number of photons that the gtmktime cut: 1829

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/19654791/ft1_filtered_4FGL_J0804.5+0414_weekly_bin780.fits" evtable="EVENTS" scfile=/lscratch/kocevski/19654791/ft2_4FGL_J0804.5+0414_weekly_bin780.fits sctable="SC_DATA" onumber of points = 17189
number of fields = 31
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J0804.5+0414_weekly_bin780
RA = 121.133, Dec = 4.2393
tmin = 710726401, tmax = 711331201
emin = 100.0, emax = 100000.0
irfs = P8R3_SOURCE_V2
ROI = 12
zmax = 90

Fitting strategies:
Fix sources to their catalog values = True
Leave variable source normalizations free = True
Perform pre-fit where ALL sources are frozen to catalog values = False
Perform secondary fit with a free spectral index = True
Remove all catalog sources = False
Remove weak (TS < 2) catalog sources = False
Freeze Galactic component = False

Likelihood fit parameters:
Statistic: UNBINNED
Optimizer: MINUIT

Catalog: 4FGL

Repository job = True

LAT data source:
Data catalog

Updating database...

UPDATE lightcurve_data_v2 SET job_id='19654793', job_status='RUN', time_executed='2023-07-18 00:55:59.420522', time_epoch_executed='1689666959.42' WHERE source_name='4FGL J0804.5+0414' and cadence='weekly' and bin_id='780'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/19654793

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

Retrieving the FT1 file...

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

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

Retrieving 106 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/19654793/ft1_4FGL_J0804.5+0414_weekly_bin780.fits


Retrieving the FT1 file...

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

Retrieving 106 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/19654793/ft2_4FGL_J0804.5+0414_weekly_bin780.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/19654793/ft1_4FGL_J0804.5+0414_weekly_bin780.fits outfile=/lscratch/kocevski/19654793/ft1_filteredMKT_4FGL_J0804.5+0414_weekly_bin780.fits ra=121.133 dec=4.2393 rad=12.0 tmin=710726401.0 tmax=711331201.0 emin=100.0 emax=100000.0 zmin=0.0 zmax=90.0 evclass=128 evtype="INDEF" convtype=-1 phasemin=0.0 phasemax=1.0 evtable="EVENTS" chatter=2 clobber=yes debug=no gui=no mode="ql"

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

Done.
real 4.25
user 3.52
sys 0.22

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/19654793/ft2_4FGL_J0804.5+0414_weekly_bin780.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/19654793/ft2_4FGL_J0804.5+0414_weekly_bin780.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/19654793/ft1_filteredMKT_4FGL_J0804.5+0414_weekly_bin780.fits evtable="EVENTS" outfile="/lscratch/kocevski/19654793/ft1_filtered_4FGL_J0804.5+0414_weekly_bin780.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.81
user 0.19
sys 0.13

Number of photons that the gtmktime cut: 1829

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/19654793/ft1_filtered_4FGL_J0804.5+0414_weekly_bin780.fits" evtable="EVENTS" scfile=/lscratch/kocevski/19654793/ft2_4FGL_J0804.5+0414_weekly_bin780.fits sctable="SC_DATA" outfile=/lscratch/kocevski/19654791/ltcube_710726401_711331201_4FGL_J0804.5+0414_weekly_bin780.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/19654791/ft2_4FGL_J0804.5+0414_weekly_bin780.fits
.....................!
real 17.20
user 16.33
sys 0.26

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/19654791/ft1_filtered_4FGL_J0804.5+0414_weekly_bin780.fits evtable="EVENTS" scfile=/lscratch/kocevski/19654791/ft2_4FGL_J0804.5+0414_weekly_bin780.fits sctable="SC_DATA" expcube=/lscratch/kocevski/19654791/ltcube_710726401_711331201_4FGL_J0804.5+0414_weekly_bin780.fits outfile=/lscratch/kocevski/19654791/expmap_710726401_711331201_4FGL_J0804.5+0414_weekly_bin780.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/19654791/ltcube_710726401_711331201_4FGL_J0804.5+0414_weekly_bin780.fits
.....................!
real 65.11
user 60.27
sys 3.95

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 Monoceros in ROI with RadialGaussian spatial model.
Added 167 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 J0804.5+0414 @ 121.133 4.2393

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/19654791/ft1_filtered_4FGL_J0804.5+0414_weekly_bin780.fits scfile=/lscratch/kocevski/19654791/ft2_4FGL_J0804.5+0414_weekly_bin780.fits outfile=/lscratch/kocevski/19654791/cmap_710726401_711331201_4FGL_J0804.5+0414_weekly_bin780.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=121.133 yref=4.2393 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.82
user 0.22
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/19654791/ft1_filtered_4FGL_J0804.5+0414_weekly_bin780.fits scfile=/lscratch/kocevski/19654791/ft2_4FGL_J0804.5+0414_weekly_bin780.fits outfile=/lscratch/kocevski/19654791/cmap_HighResolution_710726401_711331201_4FGL_J0804.5+0414_weekly_bin780.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=121.133 yref=4.2393 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.70
user 0.21
sys 0.14

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/19654791/ft1_filtered_4FGL_J0804.5+0414_weekly_bin780.fits evtable="EVENTS" scfile=/lscratch/kocevski/19654791/ft2_4FGL_J0804.5+0414_weekly_bin780.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/19654791/Model_4FGL_J0804.5+0414_weekly_bin780.xml irfs="P8R3_SOURCE_V2" evclutfile=/lscratch/kocevski/19654793/ltcube_710726401_711331201_4FGL_J0804.5+0414_weekly_bin780.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/19654793/ft2_4FGL_J0804.5+0414_weekly_bin780.fits
.....................!
real 15.78
user 15.16
sys 0.24

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/19654793/ft1_filtered_4FGL_J0804.5+0414_weekly_bin780.fits evtable="EVENTS" scfile=/lscratch/kocevski/19654793/ft2_4FGL_J0804.5+0414_weekly_bin780.fits sctable="SC_DATA" expcube=/lscratch/kocevski/19654793/ltcube_710726401_711331201_4FGL_J0804.5+0414_weekly_bin780.fits outfile=/lscratch/kocevski/19654793/expmap_710726401_711331201_4FGL_J0804.5+0414_weekly_bin780.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/19654793/ltcube_710726401_711331201_4FGL_J0804.5+0414_weekly_bin780.fits
.....................!
real 59.60
user 55.34
sys 3.53

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 Monoceros in ROI with RadialGaussian spatial model.
Added 167 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 J0804.5+0414 @ 121.133 4.2393

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/19654793/ft1_filtered_4FGL_J0804.5+0414_weekly_bin780.fits scfile=/lscratch/kocevski/19654793/ft2_4FGL_J0804.5+0414_weekly_bin780.fits outfile=/lscratch/kocevski/19654793/cmap_710726401_711331201_4FGL_J0804.5+0414_weekly_bin780.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=121.133 yref=4.2393 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.67
user 0.21
sys 0.12

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/19654793/ft1_filtered_4FGL_J0804.5+0414_weekly_bin780.fits scfile=/lscratch/kocevski/19654793/ft2_4FGL_J0804.5+0414_weekly_bin780.fits outfile=/lscratch/kocevski/19654793/cmap_HighResolution_710726401_711331201_4FGL_J0804.5+0414_weekly_bin780.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=121.133 yref=4.2393 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.76
user 0.22
sys 0.13

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/19654793/ft1_filtered_4FGL_J0804.5+0414_weekly_bin780.fits evtable="EVENTS" scfile=/lscratch/kocevski/19654793/ft2_4FGL_J0804.5+0414_weekly_bin780.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/19654793/Model_4FGL_J0804.5+0414_weekly_bin780.xml irfs="P8R3_SOURCE_V2" evclsmin=0 evclass="INDEF" evtype="INDEF" convert=yes chatter=2 clobber=yes debug=no gui=no mode="ql"

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

adding source EG_v02
adding source GAL_V02
adding source Monoceros
Working on...
/lscratch/kocevski/19654793/ft1_filtered_4FGL_J0804.5+0414_weekly_bin780.fits.....................!
real 75.69
user 73.92
sys 0.92

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/19654793/ft1_filtered_4FGL_J0804.5+0414_weekly_bin780.fits', '/lscratch/kocevski/19654793/ft2_4FGL_J0804.5+0414_weekly_bin780.fits', expMap='/lscratch/kocevski/19654793/expmap_710726401_711331201_4FGL_J0804.5+0414_weekly_bin780.fits', expCube='/lscratch/kocevski/19654793/ltcube_710726401_711331201_4FGL_J0804.5+0414_weekly_bin780.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/19654793/Model_4FGL_J0804.5+0414_weekly_bin780.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J0804.5+0414'

4FGL J0804.5+0414
   Spectrum: PowerLaw
281    Prefactor:  7.193e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-13)
282        Index:  2.491e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
283        Scale:  8.390e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/19654793/ft1_filtered_4FGL_J0804.5+0414_weekly_bin780.fits
Spacecraft file(s): /lscratch/kocevski/19654793/ft2_4FGL_J0804.5+0414_weekly_bin780.fits
Exposure map: /lscratch/kocevski/19654793/expmap_710726401_711331201_4FGL_J0804.5+0414_weekly_bin780.fits
Exposure cube: /lscratch/kocevski/19654793/ltcube_710726401_711331201_4FGL_J0804.5+0414_weekly_bin780.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/19654793/Model_4FGL_J0804.5+0414_weekly_bin780.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) = 19704.7654756

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    2.6571       1.0000          .0000       .10000E+07
     2 'Prefactor '    67.827       1.0000          .0000       .10000E+07
     3 'Prefactor '    .17302E-01   1.0000          .0000       .10000E+07
     4 'norm      '    17.476       1.0000          .0000       .10000E+07
     5 'Prefactor '    13.918       1.0000          .0000       .10000E+07
     6 'Prefactor '    6.5609       1.0000          .0000       .10000E+07
     7 'norm      '    .13900E-03   1.0000          .0000       .10000E+07
     8 'Prefactor '    .16191E-04   1.0000          .0000       .10000E+07
     9 'Prefactor '    6.7887       1.0000          .0000       .10000E+07
    10 'Prefactor '    15.181       1.0000          .0000       .10000E+07
    11 'norm      '    .37977       1.0000          .0000       .10000E+07
    12 'norm      '    .50770       1.0000          .0000       .10000E+07
    13 'norm      '    .14425E-01   1.0000          .0000       .10000E+07
    14 'norm      '    5.6902       1.0000          .0000       .10000E+07
    15 'Prefactor '    14.019       1.0000          .0000       .10000E+07
    16 'norm      '    .72252       1.0000          .0000       .10000E+07
    17 'norm      '    .50122E-03   1.0000          .0000       .10000E+07
    18 'Normalizat'    1.1254       1.0000         .10000E-01   10.000    
    19 'Prefactor '    .90986       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5570E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   19704.60     FROM MIGRAD    STATUS=CONVERGED    113 CALLS     1114 TOTAL
                     EDM=   .34E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.8%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          2.6734        1.1887        .25900E-07    .30287E-03
   2  Prefactor     64.979        34.094       -.32976E-06    .16134E-02
   3  Prefactor      .0000        27.218       -.27578E-06** at limit **
   4  norm          17.490        1.9247       -.10534E-07    .65272E-03
   5  Prefactor     13.917        1.1964       -.35689E-07   -.51598E-01
   6  Prefactor     6.5597        2.2730        .37371E-08   -.64187E-03
   7  norm           .0000        2.2822       -.57714E-07** at limit **
   8  Prefactor      .0000        1.5375        .17901E-07** at limit **
   9  Prefactor     6.7981        4.9632       -.73185E-07    .76026E-02
  10  Prefactor     15.053        17.104       -.77787E-06    .21948E-02
  11  norm          .41004        .93226        .53772E-07   -.22098E-01
  12  norm          .50425        1.1836       -.44493E-07   -.11641E-03
  13  norm          .55511E-10    18.290       -.46179E-07** at limit **
  14  norm          5.6899        2.3287       -.21457E-07    .74860E-03
  15  Prefactor     13.976        10.491        .32444E-06    .42417E-02
  16  norm          .72195        .50266       -.37163E-08   -.86817E-04
  17  norm           .0000        2.4256       -.80508E-08** at limit **
  18  Normalizat    1.1247        .14146       -.40966E-05   -.12028E-05
  19  Prefactor     .91084        .87143E-01    .28888E-05    .36685E-05
                               ERR DEF=  .500    
Final values: 
  norm       = 2.67339
  Prefactor  = 64.9793
  Prefactor  = 0
  norm       = 17.4904
  Prefactor  = 13.9166
  Prefactor  = 6.55973
  norm       = 0
  Prefactor  = 0
  Prefactor  = 6.79814
  Prefactor  = 15.0526
  norm       = 0.410037
  norm       = 0.504254
  norm       = 5.55112e-11
  norm       = 5.68994
  Prefactor  = 13.9759
  norm       = 0.721947
  norm       = 0
  Normalizat = 1.12474
  Prefactor  = 0.910844
smin=0 evclass="INDEF" evtype="INDEF" convert=yes chatter=2 clobber=yes debug=no gui=no mode="ql"

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

adding source EG_v02
adding source GAL_V02
adding source Monoceros
Working on...
/lscratch/kocevski/19654791/ft1_filtered_4FGL_J0804.5+0414_weekly_bin780.fits.....................!
real 82.23
user 80.52
sys 0.75

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/19654791/ft1_filtered_4FGL_J0804.5+0414_weekly_bin780.fits', '/lscratch/kocevski/19654791/ft2_4FGL_J0804.5+0414_weekly_bin780.fits', expMap='/lscratch/kocevski/19654791/expmap_710726401_711331201_4FGL_J0804.5+0414_weekly_bin780.fits', expCube='/lscratch/kocevski/19654791/ltcube_710726401_711331201_4FGL_J0804.5+0414_weekly_bin780.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/19654791/Model_4FGL_J0804.5+0414_weekly_bin780.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J0804.5+0414'

4FGL J0804.5+0414
   Spectrum: PowerLaw
281    Prefactor:  7.193e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-13)
282        Index:  2.491e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
283        Scale:  8.390e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/19654791/ft1_filtered_4FGL_J0804.5+0414_weekly_bin780.fits
Spacecraft file(s): /lscratch/kocevski/19654791/ft2_4FGL_J0804.5+0414_weekly_bin780.fits
Exposure map: /lscratch/kocevski/19654791/expmap_710726401_711331201_4FGL_J0804.5+0414_weekly_bin780.fits
Exposure cube: /lscratch/kocevski/19654791/ltcube_710726401_711331201_4FGL_J0804.5+0414_weekly_bin780.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/19654791/Model_4FGL_J0804.5+0414_weekly_bin780.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) = 19704.7654756

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    2.6571       1.0000          .0000       .10000E+07
     2 'Prefactor '    67.827       1.0000          .0000       .10000E+07
     3 'Prefactor '    .17302E-01   1.0000          .0000       .10000E+07
     4 'norm      '    17.476       1.0000          .0000       .10000E+07
     5 'Prefactor '    13.918       1.0000          .0000       .10000E+07
     6 'Prefactor '    6.5609       1.0000          .0000       .10000E+07
     7 'norm      '    .13900E-03   1.0000          .0000       .10000E+07
     8 'Prefactor '    .16191E-04   1.0000          .0000       .10000E+07
     9 'Prefactor '    6.7887       1.0000          .0000       .10000E+07
    10 'Prefactor '    15.181       1.0000          .0000       .10000E+07
    11 'norm      '    .37977       1.0000          .0000       .10000E+07
    12 'norm      '    .50770       1.0000          .0000       .10000E+07
    13 'norm      '    .14425E-01   1.0000          .0000       .10000E+07
    14 'norm      '    5.6902       1.0000          .0000       .10000E+07
    15 'Prefactor '    14.019       1.0000          .0000       .10000E+07
    16 'norm      '    .72252       1.0000          .0000       .10000E+07
    17 'norm      '    .50122E-03   1.0000          .0000       .10000E+07
    18 'Normalizat'    1.1254       1.0000         .10000E-01   10.000    
    19 'Prefactor '    .90986       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5570E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   19704.60     FROM MIGRAD    STATUS=CONVERGED    113 CALLS     1114 TOTAL
                     EDM=   .34E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.8%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          2.6734        1.1887        .25900E-07    .30287E-03
   2  Prefactor     64.979        34.094       -.32976E-06    .16134E-02
   3  Prefactor      .0000        27.218       -.27578E-06** at limit **
   4  norm          17.490        1.9247       -.10534E-07    .65272E-03
   5  Prefactor     13.917        1.1964       -.35689E-07   -.51598E-01
   6  Prefactor     6.5597        2.2730        .37371E-08   -.64187E-03
   7  norm           .0000        2.2822       -.57714E-07** at limit **
   8  Prefactor      .0000        1.5375        .17901E-07** at limit **
   9  Prefactor     6.7981        4.9632       -.73185E-07    .76026E-02
  10  Prefactor     15.053        17.104       -.77787E-06    .21948E-02
  11  norm          .41004        .93226        .53772E-07   -.22098E-01
  12  norm          .50425        1.1836       -.44493E-07   -.11641E-03
  13  norm          .55511E-10    18.290       -.46179E-07** at limit **
  14  norm          5.6899        2.3287       -.21457E-07    .74860E-03
  15  Prefactor     13.976        10.491        .32444E-06    .42417E-02
  16  norm          .72195        .50266       -.37163E-08   -.86817E-04
  17  norm           .0000        2.4256       -.80508E-08** at limit **
  18  Normalizat    1.1247        .14146       -.40966E-05   -.12028E-05
  19  Prefactor     .91084        .87143E-01    .28888E-05    .36685E-05
                               ERR DEF=  .500    
Final values: 
  norm       = 2.67339
  Prefactor  = 64.9793
  Prefactor  = 0
  norm       = 17.4904
  Prefactor  = 13.9166
  Prefactor  = 6.55973
  norm       = 0
  Prefactor  = 0
  Prefactor  = 6.79814
  Prefactor  = 15.0526
  norm       = 0.410037
  norm       = 0.504254
  norm       = 5.55112e-11
  norm       = 5.68994
  Prefactor  = 13.9759
  norm       = 0.721947
  norm       = 0
  Normalizat = 1.12474
  Prefactor  = 0.910844
 **********
 **   18 **HESSE 
 **********

 FCN=   19704.60     FROM HESSE     STATUS=OK           316 CALLS     1430 TOTAL
                     EDM=   .34E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          2.6734        1.1956        .62507E-03   -1.5675    
   2  Prefactor     64.979        34.100        .12143E-03   -1.5547    
   3  Prefactor      .0000        6.2183        .17221E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  norm          17.490        1.9384        .23931E-03   -1.5624    
   5  Prefactor     13.917        11.164        .26822E-03   -1.5633    
   6  Prefactor     6.5597        2.2708        .39156E-03   -1.5657    
   7  norm           .0000        2.2849        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor      .0000        1.5392        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     6.7981        5.1804        .38485E-03   -1.5656    
  10  Prefactor     15.053        17.104        .25680E-03   -1.5630    
  11  norm          .41004        2.2223        .91868E-02   -1.5695    
  12  norm          .50425        1.1950        .77938E-03   -1.5694    
  13  norm          .55511E-10    18.439        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          5.6899        2.3385        .42085E-03   -1.5660    
  15  Prefactor     13.976        10.500        .26725E-03   -1.5633    
  16  norm          .72195        .50239        .58899E-04   -1.5691    
  17  norm           .0000        2.4070        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    1.1247        .12385        .70367E-01   -.88961    
  19  Prefactor     .91084        .76109E-01    .45131E-01   -.95763    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.41211e-08
Minuit parameter uncertainties:
  1  1.19558
  2  34.1002
  3  4.68451e-06
  4  1.93844
  5  11.1636
  6  2.27082
  7  9.42054e-06
  8  1.83791e-06
  9  5.1804
  10  17.1045
  11  1.90918
  12  1.195
  13  6.86868e-05
  14  2.33848
  15  10.4996
  16  0.502389
  17  2.71014e-06
  18  0.123885
  19  0.0761184
 **********
 **   18 **HESSE 
 **********

 FCN=   19704.60     FROM HESSE     STATUS=OK           316 CALLS     1430 TOTAL
                     EDM=   .34E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          2.6734        1.1956        .62507E-03   -1.5675    
   2  Prefactor     64.979        34.100        .12143E-03   -1.5547    
   3  Prefactor      .0000        6.2183        .17221E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  norm          17.490        1.9384        .23931E-03   -1.5624    
   5  Prefactor     13.917        11.164        .26822E-03   -1.5633    
   6  Prefactor     6.5597        2.2708        .39156E-03   -1.5657    
   7  norm           .0000        2.2849        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor      .0000        1.5392        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     6.7981        5.1804        .38485E-03   -1.5656    
  10  Prefactor     15.053        17.104        .25680E-03   -1.5630    
  11  norm          .41004        2.2223        .91868E-02   -1.5695    
  12  norm          .50425        1.1950        .77938E-03   -1.5694    
  13  norm          .55511E-10    18.439        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          5.6899        2.3385        .42085E-03   -1.5660    
  15  Prefactor     13.976        10.500        .26725E-03   -1.5633    
  16  norm          .72195        .50239        .58899E-04   -1.5691    
  17  norm           .0000        2.4070        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    1.1247        .12385        .70367E-01   -.88961    
  19  Prefactor     .91084        .76109E-01    .45131E-01   -.95763    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.41211e-08
Minuit parameter uncertainties:
  1  1.19558
  2  34.1002
  3  4.68451e-06
  4  1.93844
  5  11.1636
  6  2.27082
  7  9.42054e-06
  8  1.83791e-06
  9  5.1804
  10  17.1045
  11  1.90918
  12  1.195
  13  6.86868e-05
  14  2.33848
  15  10.4996
  16  0.502389
  17  2.71014e-06
  18  0.123885
  19  0.0761184
Done.

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

Extracting fit parameters...

4FGL J0804.5+0414
   Spectrum: PowerLaw
281    Prefactor:  1.505e+01  1.710e+01  0.000e+00  1.000e+06 ( 1.000e-13)
282        Index:  2.491e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
283        Scale:  8.390e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
550    Prefactor:  9.108e-01  7.612e-02  0.000e+00  1.000e+01 ( 1.000e+00)
551        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
552        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
549   Normalization:  1.125e+00  1.239e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.98
Ra Dec: 121.133 4.239
Photon Flux Upper Limit: 6.81599640321e-08 ph cm-2 s-1
Energy Flux Upper Limit: 0.00529843367738 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/19654793/likelihoodResults_710726401_711331201_4FGL_J0804.5+0414_weekly_bin780.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) = 19704.5949536
delta logL = 0.00732530933965

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 19704.5922484
delta logL = 0.0100305531705

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   19704.59     FROM MIGRAD    STATUS=CONVERGED     65 CALLS      232 TOTAL
                     EDM=   .13E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     16.403        177.36        .24717E-03    .43948E-02
   2  Index         2.3484        1.3218        .46474        .53405E-05
   3  Normalizat    1.1282        .20080E-01    .70271E-01   -.55548E-04
   4  Prefactor     .90932        .12478E-01    .45124E-01   -.18729E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 16.4032
  Index      = 2.34842
  Normalizat = 1.12819
  Prefactor  = 0.909318
 **********
 **   18 **HESSE 
 **********

 FCN=   19704.59     FROM HESSE     STATUS=OK            33 CALLS      265 TOTAL
                     EDM=   .46E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     16.403        20.219        .49434E-04   -1.5627    
   2  Index         2.3484        .95826        .73434E-02   -.55897    
   3  Normalizat    1.1282        .13544        .31093E-03   -.88852    
   4  Prefactor     .90932        .84649E-01    .21633E-03   -.95816    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.5762e-11
Minuit parameter uncertainties:
  1  20.2191
  2  0.966615
  3  0.13548
  4  0.0846609
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) = 19704.5922475
delta logL = 0.010031445403

Extracting fit parameters...

4FGL J0804.5+0414
   Spectrum: PowerLaw
281    Prefactor:  1.640e+01  2.022e+01  0.000e+00  1.000e+06 ( 1.000e-13)
282        Index:  2.348e+00  9.666e-01  0.000e+00  1.000e+01 (-1.000e+00)
283        Scale:  8.390e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
550    Prefactor:  9.093e-01  8.466e-02  0.000e+00  1.000e+01 ( 1.000e+00)
551        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
552        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
549   Normalization:  1.128e+00  1.355e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.98
Ra Dec: 121.133 4.239

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/19654793/cmap_HighResolution_710726401_711331201_4FGL_J0804.5+0414_weekly_bin780.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='5.30e-03', job_status='DONE', photon_flux_upper_limit='6.82e-08', time_completed='2023-07-18 01:08:49.594785', job_id='19654793', GAL2='0.91', fit_tolerance='1e-08', EG2='1.13', EG='1.12', time_epoch_completed='1689667729.59', return_code2='0', ts='0.98', comment='SUCCESS', return_code='0', GAL='0.91', dlogl='1.00e-02', ts2='0.99', photon_index_error='0.00', photon_index='2.49' WHERE bin_id='780' AND source_name='4FGL J0804.5+0414' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Jul 18 01:08:50 PDT 2023

Done.

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

Extracting fit parameters...

4FGL J0804.5+0414
   Spectrum: PowerLaw
281    Prefactor:  1.505e+01  1.710e+01  0.000e+00  1.000e+06 ( 1.000e-13)
282        Index:  2.491e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
283        Scale:  8.390e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
550    Prefactor:  9.108e-01  7.612e-02  0.000e+00  1.000e+01 ( 1.000e+00)
551        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
552        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
549   Normalization:  1.125e+00  1.239e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.98
Ra Dec: 121.133 4.239
Photon Flux Upper Limit: 6.81599640321e-08 ph cm-2 s-1
Energy Flux Upper Limit: 0.00529843367738 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/19654791/likelihoodResults_710726401_711331201_4FGL_J0804.5+0414_weekly_bin780.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) = 19704.5949536
delta logL = 0.00732530933965

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 19704.5922484
delta logL = 0.0100305531705

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   19704.59     FROM MIGRAD    STATUS=CONVERGED     65 CALLS      232 TOTAL
                     EDM=   .13E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     16.403        177.36        .24717E-03    .43948E-02
   2  Index         2.3484        1.3218        .46474        .53405E-05
   3  Normalizat    1.1282        .20080E-01    .70271E-01   -.55548E-04
   4  Prefactor     .90932        .12478E-01    .45124E-01   -.18729E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 16.4032
  Index      = 2.34842
  Normalizat = 1.12819
  Prefactor  = 0.909318
 **********
 **   18 **HESSE 
 **********

 FCN=   19704.59     FROM HESSE     STATUS=OK            33 CALLS      265 TOTAL
                     EDM=   .46E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     16.403        20.219        .49434E-04   -1.5627    
   2  Index         2.3484        .95826        .73434E-02   -.55897    
   3  Normalizat    1.1282        .13544        .31093E-03   -.88852    
   4  Prefactor     .90932        .84649E-01    .21633E-03   -.95816    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.5762e-11
Minuit parameter uncertainties:
  1  20.2191
  2  0.966615
  3  0.13548
  4  0.0846609
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) = 19704.5922475
delta logL = 0.010031445403

Extracting fit parameters...

4FGL J0804.5+0414
   Spectrum: PowerLaw
281    Prefactor:  1.640e+01  2.022e+01  0.000e+00  1.000e+06 ( 1.000e-13)
282        Index:  2.348e+00  9.666e-01  0.000e+00  1.000e+01 (-1.000e+00)
283        Scale:  8.390e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
550    Prefactor:  9.093e-01  8.466e-02  0.000e+00  1.000e+01 ( 1.000e+00)
551        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
552        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
549   Normalization:  1.128e+00  1.355e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.98
Ra Dec: 121.133 4.239

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/19654791/cmap_HighResolution_710726401_711331201_4FGL_J0804.5+0414_weekly_bin780.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='5.30e-03', job_status='DONE', photon_flux_upper_limit='6.82e-08', time_completed='2023-07-18 01:09:07.298838', job_id='19654791', GAL2='0.91', fit_tolerance='1e-08', EG2='1.13', EG='1.12', time_epoch_completed='1689667747.3', return_code2='0', ts='0.98', comment='SUCCESS', return_code='0', GAL='0.91', dlogl='1.00e-02', ts2='0.99', photon_index_error='0.00', photon_index='2.49' WHERE bin_id='780' AND source_name='4FGL J0804.5+0414' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Jul 18 01:09:07 PDT 2023

