***
 **   17 **MINIMIZE    .6430E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   83569.82     FROM MIGRAD    STATUS=CONVERGED    118 CALLS      995 TOTAL
                     EDM=   .56E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.7%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     2.3290        2.6044       -.14677E-06    .46293E-01
   2  Prefactor     .55511E-10    11.294       -.47335E-06** at limit **
   3  Prefactor     1.0631        .49999        .40644E-06    .18819E-03
   4  norm          .10270E-07    3.2197        .54632E-07** at limit **
   5  Prefactor      .0000        1.5560        .14693E-06** at limit **
   6  norm          3.9280        .36101       -.21942E-08    .23229E-03
   7  norm          8.0290        4.6784        .29791E-07    .49201E-03
   8  norm          .63008        1.7193        .21854E-07    .86659E-03
   9  Prefactor     .10547E-08    15.909        .51553E-06** at limit **
  10  Prefactor     .44409E-09    5.2696       -.29296E-06** at limit **
  11  Prefactor     2.0995        1.4836        .70465E-07   -.65907E-04
  12  Prefactor     .55511E-09    25.931       -.18175E-05** at limit **
  13  Prefactor     1.3685        1.2522       -.36037E-07    .12588E-02
  14  norm          14.389        7.1288        .15968E-07    .21087E-02
  15  Prefactor     .73830E-08    2.8716        .50349E-06** at limit **
  16  Normalizat    1.0522        .15147        .10540E-06    .37826E-04
  17  Prefactor     1.0320        .19715E-01    .69178E-07    .15070E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 2.32899
  Prefactor  = 5.55112e-11
  Prefactor  = 1.06309
  norm       = 1.02696e-08
  Prefactor  = 0
  norm       = 3.92804
  norm       = 8.02898
  norm       = 0.630083
  Prefactor  = 1.05471e-09
  Prefactor  = 4.44089e-10
  Prefactor  = 2.09954
  Prefactor  = 5.55112e-10
  Prefactor  = 1.36849
  norm       = 14.3895
  Prefactor  = 7.38298e-09
  Normalizat = 1.05217
  Prefactor  = 1.03203
/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).

 outfile=/lscratch/kocevski/19650828/ltcube_710726401_711331201_4FGL_J0304.5+6821_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/19650828/ft2_4FGL_J0304.5+6821_weekly_bin780.fits
.....................!
real 17.57
user 16.92
sys 0.24

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/19650828/ft1_filtered_4FGL_J0304.5+6821_weekly_bin780.fits evtable="EVENTS" scfile=/lscratch/kocevski/19650828/ft2_4FGL_J0304.5+6821_weekly_bin780.fits sctable="SC_DATA" expcube=/lscratch/kocevski/19650828/ltcube_710726401_711331201_4FGL_J0304.5+6821_weekly_bin780.fits outfile=/lscratch/kocevski/19650828/expmap_710726401_711331201_4FGL_J0304.5+6821_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/19650828/ltcube_710726401_711331201_4FGL_J0304.5+6821_weekly_bin780.fits
.....................!
real 64.19
user 60.06
sys 3.52

Generating the xml model:
radLim = 0.001
maxRad = 12
normsOnly = True
freeVariableSources = True
Fixing all sources to their catalog values, except variable sources
Creating file and adding sources from 4FGL
Extended source HB 3 in ROI with RadialDisk spatial model.
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 G150.3+4.5 in ROI with RadialDisk spatial model.
Added 187 point sources and 3 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 J0304.5+6821 @ 46.1411 68.3539

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/19650828/ft1_filtered_4FGL_J0304.5+6821_weekly_bin780.fits scfile=/lscratch/kocevski/19650828/ft2_4FGL_J0304.5+6821_weekly_bin780.fits outfile=/lscratch/kocevski/19650828/cmap_710726401_711331201_4FGL_J0304.5+6821_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=46.1411 yref=68.3539 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.66
user 0.25
sys 0.11

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/19650828/ft1_filtered_4FGL_J0304.5+6821_weekly_bin780.fits scfile=/lscratch/kocevski/19650828/ft2_4FGL_J0304.5+6821_weekly_bin780.fits outfile=/lscratch/kocevski/19650828/cmap_HighResolution_710726401_711331201_4FGL_J0304.5+6821_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=46.1411 yref=68.3539 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.68
user 0.25
sys 0.14

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/19650828/ft1_filtered_4FGL_J0304.5+ **********
 **   18 **HESSE 
 **********

 FCN=   83569.82     FROM HESSE     STATUS=OK           263 CALLS     1258 TOTAL
                     EDM=   .97E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     2.3290        8.5720        .65880E-03   -1.5677    
   2  Prefactor     .55511E-10    11.293        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     1.0631        .51071        .11855E-01   -1.5502    
   4  norm          .10270E-07    3.3458        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor      .0000        1.5231        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  norm          3.9280        .36299        .50877E-03   -1.5668    
   7  norm          8.0290        4.6766        .35366E-03   -1.5651    
   8  norm          .63008        1.7277        .66601E-03   -1.5692    
   9  Prefactor     .10547E-08    15.951        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .44409E-09    5.1921        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     2.0995        1.4883        .71240E-03   -1.5679    
  12  Prefactor     .55511E-09    25.896        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     1.3685        22.912        .10202E-02   -1.5685    
  14  norm          14.389        7.1373        .26391E-03   -1.5632    
  15  Prefactor     .73830E-08    2.9783        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Normalizat    1.0522        .15532        .21407       -.91303    
  17  Prefactor     1.0320        .19796E-01    .27391E-01   -.91669    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 9.73801e-08
Minuit parameter uncertainties:
  1  8.572
  2  5.73659e-05
  3  0.510717
  4  0.000370333
  5  5.78529e-06
  6  0.36299
  7  4.67661
  8  1.72773
  9  0.00025612
  10  9.5462e-05
  11  1.48827
  12  0.000239217
  13  11.1991
  14  7.13734
  15  0.000296751
  16  0.155391
  17  0.0197965
number of points = 17189
number of fields = 31
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J0304.5+6821_weekly_bin780
RA = 46.1411, Dec = 68.3539
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='19651537', job_status='RUN', time_executed='2023-07-18 00:35:21.837505', time_epoch_executed='1689665721.84' WHERE source_name='4FGL J0304.5+6821' and cadence='weekly' and bin_id='780'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/19651537

Creating custom pfile directory:
/lscratch/kocevski/19651537/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/19651537/ft1_4FGL_J0304.5+6821_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/19651537/ft2_4FGL_J0304.5+6821_weekly_bin780.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/19651537/ft1_4FGL_J0304.5+6821_weekly_bin780.fits outfile=/lscratch/kocevski/19651537/ft1_filteredMKT_4FGL_J0304.5+6821_weekly_bin780.fits ra=46.1411 dec=68.3539 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.48
user 3.89
sys 0.26

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/19651537/ft2_4FGL_J0304.5+6821_weekly_bin780.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/19651537/ft2_4FGL_J0304.5+6821_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/19651537/ft1_filteredMKT_4FGL_J0304.5+6821_weekly_bin780.fits evtable="EVENTS" outfile="/lscratch/kocevski/19651537/ft1_filtered_4FGL_J0304.5+6821_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.66
user 0.22
sys 0.13

Number of photons that the gtmktime cut: 8934

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/19651537/ft1_filtered_4FGL_J0304.5+6821_weekly_bin780.fits" evtable="EVENTS" scfile=/lscratch/kocevski/19651537/ft2_4FGL_J0304.5+6821_weekly_bin780.fits sctable="SC_DATA" outfile=/lscratch/kocevski/19651537/ltcube_710726401_711331201_4FGL_J0304.5+6821_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/19651537/ft2_4FGL_J0304.5+6821_weekly_bin780.fits
.....................!
real 17.41
user 16.79
sys 0.24

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/19651537/ft1_filtered_4FGL_J0304.5+6821_weekly_bin780.fits evtable="EVENTS" scfile=/lscratch/kocevski/19651537/ft2_4FGL_J0304.5+6821_weekly_bin780.fits sctable="SC_DATA" expcube=/lscratch/kocevski/19651537/ltcube_710726401_711331201_4FGL_J0304.5+6821_weekly_bin780.fits outfile=/lscratch/kocevski/19651537/expmap_710726401_711331201_4FGL_J0304.5+6821_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/19651537/ltcube_710726401_711331201_4FGL_J0304.5+6821_weekly_bin780.fits
.....................!
real 67.63
user 62.91
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 HB 3 in ROI with RadialDisk spatial model.
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 G150.3+4.5 in ROI with RadialDisk spatial model.
Added 187 point sources and 3 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 J0304.5+6821 @ 46.1411 68.3539

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/19651537/ft1_filtered_4FGL_J0304.5+6821_weekly_bin780.fits scfile=/lscratch/kocevski/19651537/ft2_4FGL_J0304.5+6821_weekly_bin780.fits outfile=/lscratch/kocevski/19651537/cmap_710726401_711331201_4FGL_J0304.5+6821_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=46.1411 yref=68.3539 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.68
user 0.24
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/19651537/ft1_filtered_4FGL_J0304.5+6821_weekly_bin780.fits scfile=/lscratch/kocevski/19651537/ft2_4FGL_J0304.5+6821_weekly_bin780.fits outfile=/lscratch/kocevski/19651537/cmap_HighResolution_710726401_711331201_4FGL_J0304.5+6821_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=46.1411 yref=68.3539 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.25
sys 0.13

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/19651537/ft1_filtered_4FGL_J0304.5+Done.

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

Extracting fit parameters...

4FGL J0304.5+6821
   Spectrum: LogParabola
306         norm:  6.301e-01  1.728e+00  0.000e+00  1.000e+06 ( 1.000e-12)
307        alpha:  2.670e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
308         beta:  2.132e-01  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
309           Eb:  9.365e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
632    Prefactor:  1.032e+00  1.980e-02  0.000e+00  1.000e+01 ( 1.000e+00)
633        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
634        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
627   Normalization:  1.052e+00  1.554e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.15
Ra Dec: 46.141 68.354
Photon Flux Upper Limit: 6.09490805056e-08 ph cm-2 s-1
Energy Flux Upper Limit: 1.79837808795e-05 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/19647676/likelihoodResults_710726401_711331201_4FGL_J0304.5+6821_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) = 83569.6440454
delta logL = 0.175415226637

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 83569.5637453
delta logL = 0.255715323336

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
 MIGRAD TERMINATED WITHOUT CONVERGENCE.

 FCN=   83569.56     FROM MIGRAD    STATUS=FAILED        93 CALLS      262 TOTAL
                     EDM=   .64E-07    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          1.3847        1.9990        .36959E-04    .36567E-02
   2  alpha         1.8254        .96715        .10166       -.61138E-03
   3  Normalizat    1.0554        .15112        .95420E-03    .33551E-04
   4  Prefactor     1.0317        .19298E-01    .12107E-03    .40566E-03
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   83569.56     FROM SIMPLEX   STATUS=UNCHANGED     73 CALLS      335 TOTAL
                     EDM=   .16E-04    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          1.3847        1.9990        .95671E-05   -1.5684    
   2  alpha         1.8254        .96715        .19022E-02   -.27321    
   3  Normalizat    1.0554        .15112        .18656E-03   -.91197    
   4  Prefactor     1.0317        .19298E-01    .30122E-04   -.91680    
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   83569.56     FROM MIGRAD    STATUS=CONVERGED     38 CALLS      373 TOTAL
                     EDM=   .73E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          1.3846        2.0293        .14784E-05    .13620E-02
   2  alpha         1.8254        .98828        .20332E-01    .23887E-05
   3  Normalizat    1.0554        .15110        .38168E-04    .28595E-05
   4  Prefactor     1.0317        .19298E-01    .48428E-05    .22537E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 1.38464
  alpha      = 1.82543
  Normalizat = 1.05539
  Prefactor  = 1.03171
Done.

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

Extracting fit parameters...

4FGL J0304.5+6821
   Spectrum: LogParabola
306         norm:  6.301e-01  1.728e+00  0.000e+00  1.000e+06 ( 1.000e-12)
307        alpha:  2.670e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
308         beta:  2.132e-01  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
309           Eb:  9.365e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
632    Prefactor:  1.032e+00  1.980e-02  0.000e+00  1.000e+01 ( 1.000e+00)
633        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
634        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
627   Normalization:  1.052e+00  1.554e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.15
Ra Dec: 46.141 68.354
Photon Flux Upper Limit: 6.09490805056e-08 ph cm-2 s-1
Energy Flux Upper Limit: 1.79837808795e-05 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/19647675/likelihoodResults_710726401_711331201_4FGL_J0304.5+6821_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) = 83569.6440454
delta logL = 0.175415226637

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 83569.5637453
delta logL = 0.255715323336

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
 MIGRAD TERMINATED WITHOUT CONVERGENCE.

 FCN=   83569.56     FROM MIGRAD    STATUS=FAILED        93 CALLS      262 TOTAL
                     EDM=   .64E-07    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          1.3847        1.9990        .36959E-04    .36567E-02
   2  alpha         1.8254        .96715        .10166       -.61138E-03
   3  Normalizat    1.0554        .15112        .95420E-03    .33551E-04
   4  Prefactor     1.0317        .19298E-01    .12107E-03    .40566E-03
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   83569.56     FROM SIMPLEX   STATUS=UNCHANGED     73 CALLS      335 TOTAL
                     EDM=   .16E-04    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          1.3847        1.9990        .95671E-05   -1.5684    
   2  alpha         1.8254        .96715        .19022E-02   -.27321    
   3  Normalizat    1.0554        .15112        .18656E-03   -.91197    
   4  Prefactor     1.0317        .19298E-01    .30122E-04   -.91680    
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   83569.56     FROM MIGRAD    STATUS=CONVERGED     38 CALLS      373 TOTAL
                     EDM=   .73E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          1.3846        2.0293        .14784E-05    .13620E-02
   2  alpha         1.8254        .98828        .20332E-01    .23887E-05
   3  Normalizat    1.0554        .15110        .38168E-04    .28595E-05
   4  Prefactor     1.0317        .19298E-01    .48428E-05    .22537E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 1.38464
  alpha      = 1.82543
  Normalizat = 1.05539
  Prefactor  = 1.03171
 **********
 **   18 **HESSE 
 **********

 FCN=   83569.56     FROM HESSE     STATUS=OK            25 CALLS      398 TOTAL
                     EDM=   .90E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          1.3846        2.0452        .37395E-06   -1.5684    
   2  alpha         1.8254        .99581        .81329E-03   -.27321    
   3  Normalizat    1.0554        .15130        .76336E-05   -.91197    
   4  Prefactor     1.0317        .19324E-01    .96856E-06   -.91680    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 9.04963e-12
Minuit parameter uncertainties:
  1  2.04525
  2  1.02665
  3  0.151362
  4  0.0193245
6821_weekly_bin780.fits evtable="EVENTS" scfile=/lscratch/kocevski/19649958/ft2_4FGL_J0304.5+6821_weekly_bin780.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/19649958/Model_4FGL_J0304.5+6821_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 G150.3+4.5
adding source GAL_V02
adding source HB 3
adding source W 3
Working on...
/lscratch/kocevski/19649958/ft1_filtered_4FGL_J0304.5+6821_weekly_bin780.fits.....................!
real 404.60
user 400.65
sys 1.15

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/19649958/ft1_filtered_4FGL_J0304.5+6821_weekly_bin780.fits', '/lscratch/kocevski/19649958/ft2_4FGL_J0304.5+6821_weekly_bin780.fits', expMap='/lscratch/kocevski/19649958/expmap_710726401_711331201_4FGL_J0304.5+6821_weekly_bin780.fits', expCube='/lscratch/kocevski/19649958/ltcube_710726401_711331201_4FGL_J0304.5+6821_weekly_bin780.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/19649958/Model_4FGL_J0304.5+6821_weekly_bin780.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J0304.5+6821'

4FGL J0304.5+6821
   Spectrum: LogParabola
306         norm:  2.775e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-12)
307        alpha:  2.670e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
308         beta:  2.132e-01  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
309           Eb:  9.365e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/19649958/ft1_filtered_4FGL_J0304.5+6821_weekly_bin780.fits
Spacecraft file(s): /lscratch/kocevski/19649958/ft2_4FGL_J0304.5+6821_weekly_bin780.fits
Exposure map: /lscratch/kocevski/19649958/expmap_710726401_711331201_4FGL_J0304.5+6821_weekly_bin780.fits
Exposure cube: /lscratch/kocevski/19649958/ltcube_710726401_711331201_4FGL_J0304.5+6821_weekly_bin780.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/19649958/Model_4FGL_J0304.5+6821_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) = 83570.9371022

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    2.4126       1.0000          .0000       .10000E+07
     2 'Prefactor '    .29344E-03   1.0000          .0000       .10000E+07
     3 'Prefactor '    1.0630       1.0000         .10000E-03   10000.    
     4 'norm      '    .78532E-06   1.0000          .0000       .10000E+07
     5 'Prefactor '    .30805E-05   1.0000          .0000       .10000E+07
     6 'norm      '    3.9280       1.0000          .0000       .10000E+07
     7 'norm      '    8.0265       1.0000          .0000       .10000E+07
     8 'norm      '    .62979       1.0000          .0000       .10000E+07
     9 'Prefactor '    .55739E-03   1.0000          .0000       .10000E+07
    10 'Prefactor '    .16439E-05   1.0000          .0000       .10000E+07
    11 'Prefactor '    2.0973       1.0000          .0000       .10000E+07
    12 'Prefactor '    .31048E-03   1.0000          .0000       .10000E+07
    13 'Prefactor '    1.2210       1.0000          .0000       .10000E+07
    14 'norm      '    14.375       1.0000          .0000       .10000E+07
    15 'Prefactor '    .11707E-04   1.0000          .0000       .10000E+07
    16 'Normalizat'    1.0524       1.0000         .10000E-01   10.000    
    17 'Prefactor '    1.0320       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 *******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) = 83569.5637452
delta logL = 0.255715415042

Extracting fit parameters...

4FGL J0304.5+6821
   Spectrum: LogParabola
306         norm:  1.385e+00  2.045e+00  0.000e+00  1.000e+06 ( 1.000e-12)
307        alpha:  1.825e+00  1.027e+00  0.000e+00  5.000e+00 ( 1.000e+00)
308         beta:  2.132e-01  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
309           Eb:  9.365e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
632    Prefactor:  1.032e+00  1.932e-02  0.000e+00  1.000e+01 ( 1.000e+00)
633        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
634        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
627   Normalization:  1.055e+00  1.514e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.15
Ra Dec: 46.141 68.354

Creating a high resolution counts map...
INFO: Auto-setting vmin to -2.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  2.220e+00 [aplpy.core]
Saving /lscratch/kocevski/19647676/cmap_HighResolution_710726401_711331201_4FGL_J0304.5+6821_weekly_bin780.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.80e-05', job_status='DONE', photon_flux_upper_limit='6.09e-08', time_completed='2023-07-18 00:42:16.842138', job_id='19647676', GAL2='1.03', fit_tolerance='1e-08', EG2='1.06', EG='1.05', time_epoch_completed='1689666136.84', return_code2='0', ts='0.15', comment='SUCCESS', return_code='0', GAL='1.03', dlogl='2.56e-01', ts2='0.66', photon_index_error='0.00', photon_index='2.67' WHERE bin_id='780' AND source_name='4FGL J0304.5+6821' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Jul 18 00:42:17 PDT 2023

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

 FCN=   83569.56     FROM HESSE     STATUS=OK            25 CALLS      398 TOTAL
                     EDM=   .90E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          1.3846        2.0452        .37395E-06   -1.5684    
   2  alpha         1.8254        .99581        .81329E-03   -.27321    
   3  Normalizat    1.0554        .15130        .76336E-05   -.91197    
   4  Prefactor     1.0317        .19324E-01    .96856E-06   -.91680    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 9.04963e-12
Minuit parameter uncertainties:
  1  2.04525
  2  1.02665
  3  0.151362
  4  0.0193245
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) = 83569.5637452
delta logL = 0.255715415042

Extracting fit parameters...

4FGL J0304.5+6821
   Spectrum: LogParabola
306         norm:  1.385e+00  2.045e+00  0.000e+00  1.000e+06 ( 1.000e-12)
307        alpha:  1.825e+00  1.027e+00  0.000e+00  5.000e+00 ( 1.000e+00)
308         beta:  2.132e-01  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
309           Eb:  9.365e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
632    Prefactor:  1.032e+00  1.932e-02  0.000e+00  1.000e+01 ( 1.000e+00)
633        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
634        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
627   Normalization:  1.055e+00  1.514e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.15
Ra Dec: 46.141 68.354

Creating a high resolution counts map...
INFO: Auto-setting vmin to -2.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  2.220e+00 [aplpy.core]
Saving /lscratch/kocevski/19647675/cmap_HighResolution_710726401_711331201_4FGL_J0304.5+6821_weekly_bin780.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.80e-05', job_status='DONE', photon_flux_upper_limit='6.09e-08', time_completed='2023-07-18 00:42:25.667311', job_id='19647675', GAL2='1.03', fit_tolerance='1e-08', EG2='1.06', EG='1.05', time_epoch_completed='1689666145.67', return_code2='0', ts='0.15', comment='SUCCESS', return_code='0', GAL='1.03', dlogl='2.56e-01', ts2='0.66', photon_index_error='0.00', photon_index='2.67' WHERE bin_id='780' AND source_name='4FGL J0304.5+6821' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Jul 18 00:42:26 PDT 2023

***
 **   17 **MINIMIZE    .6430E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   83569.82     FROM MIGRAD    STATUS=CONVERGED    118 CALLS      995 TOTAL
                     EDM=   .56E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.7%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     2.3290        2.6044       -.14677E-06    .46293E-01
   2  Prefactor     .55511E-10    11.294       -.47335E-06** at limit **
   3  Prefactor     1.0631        .49999        .40644E-06    .18819E-03
   4  norm          .10270E-07    3.2197        .54632E-07** at limit **
   5  Prefactor      .0000        1.5560        .14693E-06** at limit **
   6  norm          3.9280        .36101       -.21942E-08    .23229E-03
   7  norm          8.0290        4.6784        .29791E-07    .49201E-03
   8  norm          .63008        1.7193        .21854E-07    .86659E-03
   9  Prefactor     .10547E-08    15.909        .51553E-06** at limit **
  10  Prefactor     .44409E-09    5.2696       -.29296E-06** at limit **
  11  Prefactor     2.0995        1.4836        .70465E-07   -.65907E-04
  12  Prefactor     .55511E-09    25.931       -.18175E-05** at limit **
  13  Prefactor     1.3685        1.2522       -.36037E-07    .12588E-02
  14  norm          14.389        7.1288        .15968E-07    .21087E-02
  15  Prefactor     .73830E-08    2.8716        .50349E-06** at limit **
  16  Normalizat    1.0522        .15147        .10540E-06    .37826E-04
  17  Prefactor     1.0320        .19715E-01    .69178E-07    .15070E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 2.32899
  Prefactor  = 5.55112e-11
  Prefactor  = 1.06309
  norm       = 1.02696e-08
  Prefactor  = 0
  norm       = 3.92804
  norm       = 8.02898
  norm       = 0.630083
  Prefactor  = 1.05471e-09
  Prefactor  = 4.44089e-10
  Prefactor  = 2.09954
  Prefactor  = 5.55112e-10
  Prefactor  = 1.36849
  norm       = 14.3895
  Prefactor  = 7.38298e-09
  Normalizat = 1.05217
  Prefactor  = 1.03203
Done.

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

Extracting fit parameters...

4FGL J0304.5+6821
   Spectrum: LogParabola
306         norm:  6.301e-01  1.728e+00  0.000e+00  1.000e+06 ( 1.000e-12)
307        alpha:  2.670e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
308         beta:  2.132e-01  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
309           Eb:  9.365e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
632    Prefactor:  1.032e+00  1.980e-02  0.000e+00  1.000e+01 ( 1.000e+00)
633        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
634        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
627   Normalization:  1.052e+00  1.554e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.15
Ra Dec: 46.141 68.354
Photon Flux Upper Limit: 6.09490805056e-08 ph cm-2 s-1
Energy Flux Upper Limit: 1.79837808795e-05 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/19649001/likelihoodResults_710726401_711331201_4FGL_J0304.5+6821_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) = 83569.6440454
delta logL = 0.175415226637

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 83569.5637453
delta logL = 0.255715323336

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
 MIGRAD TERMINATED WITHOUT CONVERGENCE.

 FCN=   83569.56     FROM MIGRAD    STATUS=FAILED        93 CALLS      262 TOTAL
                     EDM=   .64E-07    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          1.3847        1.9990        .36959E-04    .36567E-02
   2  alpha         1.8254        .96715        .10166       -.61138E-03
   3  Normalizat    1.0554        .15112        .95420E-03    .33551E-04
   4  Prefactor     1.0317        .19298E-01    .12107E-03    .40566E-03
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   83569.56     FROM SIMPLEX   STATUS=UNCHANGED     73 CALLS      335 TOTAL
                     EDM=   .16E-04    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          1.3847        1.9990        .95671E-05   -1.5684    
   2  alpha         1.8254        .96715        .19022E-02   -.27321    
   3  Normalizat    1.0554        .15112        .18656E-03   -.91197    
   4  Prefactor     1.0317        .19298E-01    .30122E-04   -.91680    
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   83569.56     FROM MIGRAD    STATUS=CONVERGED     38 CALLS      373 TOTAL
                     EDM=   .73E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          1.3846        2.0293        .14784E-05    .13620E-02
   2  alpha         1.8254        .98828        .20332E-01    .23887E-05
   3  Normalizat    1.0554        .15110        .38168E-04    .28595E-05
   4  Prefactor     1.0317        .19298E-01    .48428E-05    .22537E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 1.38464
  alpha      = 1.82543
  Normalizat = 1.05539
  Prefactor  = 1.03171
 **********
 **   18 **HESSE 
 **********

 FCN=   83569.56     FROM HESSE     STATUS=OK            25 CALLS      398 TOTAL
                     EDM=   .90E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          1.3846        2.0452        .37395E-06   -1.5684    
   2  alpha         1.8254        .99581        .81329E-03   -.27321    
   3  Normalizat    1.0554        .15130        .76336E-05   -.91197    
   4  Prefactor     1.0317        .19324E-01    .96856E-06   -.91680    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 9.04963e-12
Minuit parameter uncertainties:
  1  2.04525
  2  1.02665
  3  0.151362
  4  0.0193245
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) = 83569.5637452
delta logL = 0.255715415042

Extracting fit parameters...

4FGL J0304.5+6821
   Spectrum: LogParabola
306         norm:  1.385e+00  2.045e+00  0.000e+00  1.000e+06 ( 1.000e-12)
307        alpha:  1.825e+00  1.027e+00  0.000e+00  5.000e+00 ( 1.000e+00)
308         beta:  2.132e-01  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
309           Eb:  9.365e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
632    Prefactor:  1.032e+00  1.932e-02  0.000e+00  1.000e+01 ( 1.000e+00)
633        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
634        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
627   Normalization:  1.055e+00  1.514e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.15
Ra Dec: 46.141 68.354

Creating a high resolution counts map...
INFO: Auto-setting vmin to -2.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  2.220e+00 [aplpy.core]
Saving /lscratch/kocevski/19649001/cmap_HighResolution_710726401_711331201_4FGL_J0304.5+6821_weekly_bin780.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.80e-05', job_status='DONE', photon_flux_upper_limit='6.09e-08', time_completed='2023-07-18 00:44:30.823964', job_id='19649001', GAL2='1.03', fit_tolerance='1e-08', EG2='1.06', EG='1.05', time_epoch_completed='1689666270.82', return_code2='0', ts='0.15', comment='SUCCESS', return_code='0', GAL='1.03', dlogl='2.56e-01', ts2='0.66', photon_index_error='0.00', photon_index='2.67' WHERE bin_id='780' AND source_name='4FGL J0304.5+6821' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Jul 18 00:44:31 PDT 2023

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

 FCN=   83569.82     FROM HESSE     STATUS=OK           263 CALLS     1258 TOTAL
                     EDM=   .97E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     2.3290        8.5720        .65880E-03   -1.5677    
   2  Prefactor     .55511E-10    11.293        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     1.0631        .51071        .11855E-01   -1.5502    
   4  norm          .10270E-07    3.3458        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor      .0000        1.5231        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  norm          3.9280        .36299        .50877E-03   -1.5668    
   7  norm          8.0290        4.6766        .35366E-03   -1.5651    
   8  norm          .63008        1.7277        .66601E-03   -1.5692    
   9  Prefactor     .10547E-08    15.951        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .44409E-09    5.1921        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     2.0995        1.4883        .71240E-03   -1.5679    
  12  Prefactor     .55511E-09    25.896        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     1.3685        22.912        .10202E-02   -1.5685    
  14  norm          14.389        7.1373        .26391E-03   -1.5632    
  15  Prefactor     .73830E-08    2.9783        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Normalizat    1.0522        .15532        .21407       -.91303    
  17  Prefactor     1.0320        .19796E-01    .27391E-01   -.91669    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 9.73801e-08
Minuit parameter uncertainties:
  1  8.572
  2  5.73659e-05
  3  0.510717
  4  0.000370333
  5  5.78529e-06
  6  0.36299
  7  4.67661
  8  1.72773
  9  0.00025612
  10  9.5462e-05
  11  1.48827
  12  0.000239217
  13  11.1991
  14  7.13734
  15  0.000296751
  16  0.155391
  17  0.0197965
6821_weekly_bin780.fits evtable="EVENTS" scfile=/lscratch/kocevski/19650828/ft2_4FGL_J0304.5+6821_weekly_bin780.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/19650828/Model_4FGL_J0304.5+6821_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 G150.3+4.5
adding source GAL_V02
adding source HB 3
adding source W 3
Working on...
/lscratch/kocevski/19650828/ft1_filtered_4FGL_J0304.5+6821_weekly_bin780.fits.....................!
real 410.09
user 406.34
sys 1.05

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/19650828/ft1_filtered_4FGL_J0304.5+6821_weekly_bin780.fits', '/lscratch/kocevski/19650828/ft2_4FGL_J0304.5+6821_weekly_bin780.fits', expMap='/lscratch/kocevski/19650828/expmap_710726401_711331201_4FGL_J0304.5+6821_weekly_bin780.fits', expCube='/lscratch/kocevski/19650828/ltcube_710726401_711331201_4FGL_J0304.5+6821_weekly_bin780.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/19650828/Model_4FGL_J0304.5+6821_weekly_bin780.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J0304.5+6821'

4FGL J0304.5+6821
   Spectrum: LogParabola
306         norm:  2.775e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-12)
307        alpha:  2.670e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
308         beta:  2.132e-01  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
309           Eb:  9.365e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/19650828/ft1_filtered_4FGL_J0304.5+6821_weekly_bin780.fits
Spacecraft file(s): /lscratch/kocevski/19650828/ft2_4FGL_J0304.5+6821_weekly_bin780.fits
Exposure map: /lscratch/kocevski/19650828/expmap_710726401_711331201_4FGL_J0304.5+6821_weekly_bin780.fits
Exposure cube: /lscratch/kocevski/19650828/ltcube_710726401_711331201_4FGL_J0304.5+6821_weekly_bin780.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/19650828/Model_4FGL_J0304.5+6821_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) = 83570.9371022

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    2.4126       1.0000          .0000       .10000E+07
     2 'Prefactor '    .29344E-03   1.0000          .0000       .10000E+07
     3 'Prefactor '    1.0630       1.0000         .10000E-03   10000.    
     4 'norm      '    .78532E-06   1.0000          .0000       .10000E+07
     5 'Prefactor '    .30805E-05   1.0000          .0000       .10000E+07
     6 'norm      '    3.9280       1.0000          .0000       .10000E+07
     7 'norm      '    8.0265       1.0000          .0000       .10000E+07
     8 'norm      '    .62979       1.0000          .0000       .10000E+07
     9 'Prefactor '    .55739E-03   1.0000          .0000       .10000E+07
    10 'Prefactor '    .16439E-05   1.0000          .0000       .10000E+07
    11 'Prefactor '    2.0973       1.0000          .0000       .10000E+07
    12 'Prefactor '    .31048E-03   1.0000          .0000       .10000E+07
    13 'Prefactor '    1.2210       1.0000          .0000       .10000E+07
    14 'norm      '    14.375       1.0000          .0000       .10000E+07
    15 'Prefactor '    .11707E-04   1.0000          .0000       .10000E+07
    16 'Normalizat'    1.0524       1.0000         .10000E-01   10.000    
    17 'Prefactor '    1.0320       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6430E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   83569.82     FROM MIGRAD    STATUS=CONVERGED    118 CALLS      995 TOTAL
                     EDM=   .56E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.7%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     2.3290        2.6044       -.14677E-06    .46293E-01
   2  Prefactor     .55511E-10    11.294       -.47335E-06** at limit **
   3  Prefactor     1.0631        .49999        .40644E-06    .18819E-03
   4  norm          .10270E-07    3.2197        .54632E-07** at limit **
   5  Prefactor      .0000        1.5560        .14693E-06** at limit **
   6  norm          3.9280        .36101       -.21942E-08    .23229E-03
   7  norm          8.0290        4.6784        .29791E-07    .49201E-03
   8  norm          .63008        1.7193        .21854E-07    .86659E-03
   9  Prefactor     .10547E-08    15.909        .51553E-06** at limit **
  10  Prefactor     .44409E-09    5.2696       -.29296E-06** at limit **
  11  Prefactor     2.0995        1.4836        .70465E-07   -.65907E-04
  12  Prefactor     .55511E-09    25.931       -.18175E-05** at limit **
  13  Prefactor     1.3685        1.2522       -.36037E-07    .12588E-02
  14  norm          14.389        7.1288        .15968E-07    .21087E-02
  15  Prefactor     .73830E-08    2.8716        .50349E-06** at limit **
  16  Normalizat    1.0522        .15147        .10540E-06    .37826E-04
  17  Prefactor     1.0320        .19715E-01    .69178E-07    .15070E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 2.32899
  Prefactor  = 5.55112e-11
  Prefactor  = 1.06309
  norm       = 1.02696e-08
  Prefactor  = 0
  norm       = 3.92804
  norm       = 8.02898
  norm       = 0.630083
  Prefactor  = 1.05471e-09
  Prefactor  = 4.44089e-10
  Prefactor  = 2.09954
  Prefactor  = 5.55112e-10
  Prefactor  = 1.36849
  norm       = 14.3895
  Prefactor  = 7.38298e-09
  Normalizat = 1.05217
  Prefactor  = 1.03203
Done.

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

Extracting fit parameters...

4FGL J0304.5+6821
   Spectrum: LogParabola
306         norm:  6.301e-01  1.728e+00  0.000e+00  1.000e+06 ( 1.000e-12)
307        alpha:  2.670e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
308         beta:  2.132e-01  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
309           Eb:  9.365e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
632    Prefactor:  1.032e+00  1.980e-02  0.000e+00  1.000e+01 ( 1.000e+00)
633        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
634        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
627   Normalization:  1.052e+00  1.554e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.15
Ra Dec: 46.141 68.354
Photon Flux Upper Limit: 6.09490805056e-08 ph cm-2 s-1
Energy Flux Upper Limit: 1.79837808795e-05 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/19649958/likelihoodResults_710726401_711331201_4FGL_J0304.5+6821_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) = 83569.6440454
delta logL = 0.175415226637

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 83569.5637453
delta logL = 0.255715323336

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
 MIGRAD TERMINATED WITHOUT CONVERGENCE.

 FCN=   83569.56     FROM MIGRAD    STATUS=FAILED        93 CALLS      262 TOTAL
                     EDM=   .64E-07    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          1.3847        1.9990        .36959E-04    .36567E-02
   2  alpha         1.8254        .96715        .10166       -.61138E-03
   3  Normalizat    1.0554        .15112        .95420E-03    .33551E-04
   4  Prefactor     1.0317        .19298E-01    .12107E-03    .40566E-03
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   83569.56     FROM SIMPLEX   STATUS=UNCHANGED     73 CALLS      335 TOTAL
                     EDM=   .16E-04    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          1.3847        1.9990        .95671E-05   -1.5684    
   2  alpha         1.8254        .96715        .19022E-02   -.27321    
   3  Normalizat    1.0554        .15112        .18656E-03   -.91197    
   4  Prefactor     1.0317        .19298E-01    .30122E-04   -.91680    
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   83569.56     FROM MIGRAD    STATUS=CONVERGED     38 CALLS      373 TOTAL
                     EDM=   .73E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          1.3846        2.0293        .14784E-05    .13620E-02
   2  alpha         1.8254        .98828        .20332E-01    .23887E-05
   3  Normalizat    1.0554        .15110        .38168E-04    .28595E-05
   4  Prefactor     1.0317        .19298E-01    .48428E-05    .22537E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 1.38464
  alpha      = 1.82543
  Normalizat = 1.05539
  Prefactor  = 1.03171
 **********
 **   18 **HESSE 
 **********

 FCN=   83569.56     FROM HESSE     STATUS=OK            25 CALLS      398 TOTAL
                     EDM=   .90E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          1.3846        2.0452        .37395E-06   -1.5684    
   2  alpha         1.8254        .99581        .81329E-03   -.27321    
   3  Normalizat    1.0554        .15130        .76336E-05   -.91197    
   4  Prefactor     1.0317        .19324E-01    .96856E-06   -.91680    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 9.04963e-12
Minuit parameter uncertainties:
  1  2.04525
  2  1.02665
  3  0.151362
  4  0.0193245
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) = 83569.5637452
delta logL = 0.255715415042

Extracting fit parameters...

4FGL J0304.5+6821
   Spectrum: LogParabola
306         norm:  1.385e+00  2.045e+00  0.000e+00  1.000e+06 ( 1.000e-12)
307        alpha:  1.825e+00  1.027e+00  0.000e+00  5.000e+00 ( 1.000e+00)
308         beta:  2.132e-01  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
309           Eb:  9.365e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
632    Prefactor:  1.032e+00  1.932e-02  0.000e+00  1.000e+01 ( 1.000e+00)
633        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
634        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
627   Normalization:  1.055e+00  1.514e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.15
Ra Dec: 46.141 68.354

Creating a high resolution counts map...
INFO: Auto-setting vmin to -2.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  2.220e+00 [aplpy.core]
Saving /lscratch/kocevski/19649958/cmap_HighResolution_710726401_711331201_4FGL_J0304.5+6821_weekly_bin780.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.80e-05', job_status='DONE', photon_flux_upper_limit='6.09e-08', time_completed='2023-07-18 00:53:41.307821', job_id='19649958', GAL2='1.03', fit_tolerance='1e-08', EG2='1.06', EG='1.05', time_epoch_completed='1689666821.31', return_code2='0', ts='0.15', comment='SUCCESS', return_code='0', GAL='1.03', dlogl='2.56e-01', ts2='0.66', photon_index_error='0.00', photon_index='2.67' WHERE bin_id='780' AND source_name='4FGL J0304.5+6821' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Jul 18 00:53:41 PDT 2023

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

 FCN=   83569.82     FROM HESSE     STATUS=OK           263 CALLS     1258 TOTAL
                     EDM=   .97E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     2.3290        8.5720        .65880E-03   -1.5677    
   2  Prefactor     .55511E-10    11.293        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     1.0631        .51071        .11855E-01   -1.5502    
   4  norm          .10270E-07    3.3458        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor      .0000        1.5231        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  norm          3.9280        .36299        .50877E-03   -1.5668    
   7  norm          8.0290        4.6766        .35366E-03   -1.5651    
   8  norm          .63008        1.7277        .66601E-03   -1.5692    
   9  Prefactor     .10547E-08    15.951        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .44409E-09    5.1921        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     2.0995        1.4883        .71240E-03   -1.5679    
  12  Prefactor     .55511E-09    25.896        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     1.3685        22.912        .10202E-02   -1.5685    
  14  norm          14.389        7.1373        .26391E-03   -1.5632    
  15  Prefactor     .73830E-08    2.9783        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Normalizat    1.0522        .15532        .21407       -.91303    
  17  Prefactor     1.0320        .19796E-01    .27391E-01   -.91669    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 9.73801e-08
Minuit parameter uncertainties:
  1  8.572
  2  5.73659e-05
  3  0.510717
  4  0.000370333
  5  5.78529e-06
  6  0.36299
  7  4.67661
  8  1.72773
  9  0.00025612
  10  9.5462e-05
  11  1.48827
  12  0.000239217
  13  11.1991
  14  7.13734
  15  0.000296751
  16  0.155391
  17  0.0197965
6821_weekly_bin780.fits evtable="EVENTS" scfile=/lscratch/kocevski/19651537/ft2_4FGL_J0304.5+6821_weekly_bin780.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/19651537/Model_4FGL_J0304.5+6821_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 G150.3+4.5
adding source GAL_V02
adding source HB 3
adding source W 3
Working on...
/lscratch/kocevski/19651537/ft1_filtered_4FGL_J0304.5+6821_weekly_bin780.fits.....................!
real 445.49
user 440.90
sys 1.27

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/19651537/ft1_filtered_4FGL_J0304.5+6821_weekly_bin780.fits', '/lscratch/kocevski/19651537/ft2_4FGL_J0304.5+6821_weekly_bin780.fits', expMap='/lscratch/kocevski/19651537/expmap_710726401_711331201_4FGL_J0304.5+6821_weekly_bin780.fits', expCube='/lscratch/kocevski/19651537/ltcube_710726401_711331201_4FGL_J0304.5+6821_weekly_bin780.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/19651537/Model_4FGL_J0304.5+6821_weekly_bin780.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J0304.5+6821'

4FGL J0304.5+6821
   Spectrum: LogParabola
306         norm:  2.775e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-12)
307        alpha:  2.670e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
308         beta:  2.132e-01  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
309           Eb:  9.365e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/19651537/ft1_filtered_4FGL_J0304.5+6821_weekly_bin780.fits
Spacecraft file(s): /lscratch/kocevski/19651537/ft2_4FGL_J0304.5+6821_weekly_bin780.fits
Exposure map: /lscratch/kocevski/19651537/expmap_710726401_711331201_4FGL_J0304.5+6821_weekly_bin780.fits
Exposure cube: /lscratch/kocevski/19651537/ltcube_710726401_711331201_4FGL_J0304.5+6821_weekly_bin780.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/19651537/Model_4FGL_J0304.5+6821_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) = 83570.9371022

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    2.4126       1.0000          .0000       .10000E+07
     2 'Prefactor '    .29344E-03   1.0000          .0000       .10000E+07
     3 'Prefactor '    1.0630       1.0000         .10000E-03   10000.    
     4 'norm      '    .78532E-06   1.0000          .0000       .10000E+07
     5 'Prefactor '    .30805E-05   1.0000          .0000       .10000E+07
     6 'norm      '    3.9280       1.0000          .0000       .10000E+07
     7 'norm      '    8.0265       1.0000          .0000       .10000E+07
     8 'norm      '    .62979       1.0000          .0000       .10000E+07
     9 'Prefactor '    .55739E-03   1.0000          .0000       .10000E+07
    10 'Prefactor '    .16439E-05   1.0000          .0000       .10000E+07
    11 'Prefactor '    2.0973       1.0000          .0000       .10000E+07
    12 'Prefactor '    .31048E-03   1.0000          .0000       .10000E+07
    13 'Prefactor '    1.2210       1.0000          .0000       .10000E+07
    14 'norm      '    14.375       1.0000          .0000       .10000E+07
    15 'Prefactor '    .11707E-04   1.0000          .0000       .10000E+07
    16 'Normalizat'    1.0524       1.0000         .10000E-01   10.000    
    17 'Prefactor '    1.0320       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6430E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   83569.82     FROM MIGRAD    STATUS=CONVERGED    118 CALLS      995 TOTAL
                     EDM=   .56E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.7%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     2.3290        2.6044       -.14677E-06    .46293E-01
   2  Prefactor     .55511E-10    11.294       -.47335E-06** at limit **
   3  Prefactor     1.0631        .49999        .40644E-06    .18819E-03
   4  norm          .10270E-07    3.2197        .54632E-07** at limit **
   5  Prefactor      .0000        1.5560        .14693E-06** at limit **
   6  norm          3.9280        .36101       -.21942E-08    .23229E-03
   7  norm          8.0290        4.6784        .29791E-07    .49201E-03
   8  norm          .63008        1.7193        .21854E-07    .86659E-03
   9  Prefactor     .10547E-08    15.909        .51553E-06** at limit **
  10  Prefactor     .44409E-09    5.2696       -.29296E-06** at limit **
  11  Prefactor     2.0995        1.4836        .70465E-07   -.65907E-04
  12  Prefactor     .55511E-09    25.931       -.18175E-05** at limit **
  13  Prefactor     1.3685        1.2522       -.36037E-07    .12588E-02
  14  norm          14.389        7.1288        .15968E-07    .21087E-02
  15  Prefactor     .73830E-08    2.8716        .50349E-06** at limit **
  16  Normalizat    1.0522        .15147        .10540E-06    .37826E-04
  17  Prefactor     1.0320        .19715E-01    .69178E-07    .15070E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 2.32899
  Prefactor  = 5.55112e-11
  Prefactor  = 1.06309
  norm       = 1.02696e-08
  Prefactor  = 0
  norm       = 3.92804
  norm       = 8.02898
  norm       = 0.630083
  Prefactor  = 1.05471e-09
  Prefactor  = 4.44089e-10
  Prefactor  = 2.09954
  Prefactor  = 5.55112e-10
  Prefactor  = 1.36849
  norm       = 14.3895
  Prefactor  = 7.38298e-09
  Normalizat = 1.05217
  Prefactor  = 1.03203
 **********
 **   18 **HESSE 
 **********

 FCN=   83569.82     FROM HESSE     STATUS=OK           263 CALLS     1258 TOTAL
                     EDM=   .97E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     2.3290        8.5720        .65880E-03   -1.5677    
   2  Prefactor     .55511E-10    11.293        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     1.0631        .51071        .11855E-01   -1.5502    
   4  norm          .10270E-07    3.3458        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor      .0000        1.5231        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  norm          3.9280        .36299        .50877E-03   -1.5668    
   7  norm          8.0290        4.6766        .35366E-03   -1.5651    
   8  norm          .63008        1.7277        .66601E-03   -1.5692    
   9  Prefactor     .10547E-08    15.951        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .44409E-09    5.1921        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     2.0995        1.4883        .71240E-03   -1.5679    
  12  Prefactor     .55511E-09    25.896        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     1.3685        22.912        .10202E-02   -1.5685    
  14  norm          14.389        7.1373        .26391E-03   -1.5632    
  15  Prefactor     .73830E-08    2.9783        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Normalizat    1.0522        .15532        .21407       -.91303    
  17  Prefactor     1.0320        .19796E-01    .27391E-01   -.91669    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 9.73801e-08
Minuit parameter uncertainties:
  1  8.572
  2  5.73659e-05
  3  0.510717
  4  0.000370333
  5  5.78529e-06
  6  0.36299
  7  4.67661
  8  1.72773
  9  0.00025612
  10  9.5462e-05
  11  1.48827
  12  0.000239217
  13  11.1991
  14  7.13734
  15  0.000296751
  16  0.155391
  17  0.0197965
Done.

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

Extracting fit parameters...

4FGL J0304.5+6821
   Spectrum: LogParabola
306         norm:  6.301e-01  1.728e+00  0.000e+00  1.000e+06 ( 1.000e-12)
307        alpha:  2.670e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
308         beta:  2.132e-01  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
309           Eb:  9.365e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
632    Prefactor:  1.032e+00  1.980e-02  0.000e+00  1.000e+01 ( 1.000e+00)
633        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
634        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
627   Normalization:  1.052e+00  1.554e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.15
Ra Dec: 46.141 68.354
Photon Flux Upper Limit: 6.09490805056e-08 ph cm-2 s-1
Energy Flux Upper Limit: 1.79837808795e-05 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/19650828/likelihoodResults_710726401_711331201_4FGL_J0304.5+6821_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) = 83569.6440454
delta logL = 0.175415226637

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 83569.5637453
delta logL = 0.255715323336

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
 MIGRAD TERMINATED WITHOUT CONVERGENCE.

 FCN=   83569.56     FROM MIGRAD    STATUS=FAILED        93 CALLS      262 TOTAL
                     EDM=   .64E-07    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          1.3847        1.9990        .36959E-04    .36567E-02
   2  alpha         1.8254        .96715        .10166       -.61138E-03
   3  Normalizat    1.0554        .15112        .95420E-03    .33551E-04
   4  Prefactor     1.0317        .19298E-01    .12107E-03    .40566E-03
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   83569.56     FROM SIMPLEX   STATUS=UNCHANGED     73 CALLS      335 TOTAL
                     EDM=   .16E-04    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          1.3847        1.9990        .95671E-05   -1.5684    
   2  alpha         1.8254        .96715        .19022E-02   -.27321    
   3  Normalizat    1.0554        .15112        .18656E-03   -.91197    
   4  Prefactor     1.0317        .19298E-01    .30122E-04   -.91680    
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   83569.56     FROM MIGRAD    STATUS=CONVERGED     38 CALLS      373 TOTAL
                     EDM=   .73E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          1.3846        2.0293        .14784E-05    .13620E-02
   2  alpha         1.8254        .98828        .20332E-01    .23887E-05
   3  Normalizat    1.0554        .15110        .38168E-04    .28595E-05
   4  Prefactor     1.0317        .19298E-01    .48428E-05    .22537E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 1.38464
  alpha      = 1.82543
  Normalizat = 1.05539
  Prefactor  = 1.03171
 **********
 **   18 **HESSE 
 **********

 FCN=   83569.56     FROM HESSE     STATUS=OK            25 CALLS      398 TOTAL
                     EDM=   .90E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          1.3846        2.0452        .37395E-06   -1.5684    
   2  alpha         1.8254        .99581        .81329E-03   -.27321    
   3  Normalizat    1.0554        .15130        .76336E-05   -.91197    
   4  Prefactor     1.0317        .19324E-01    .96856E-06   -.91680    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 9.04963e-12
Minuit parameter uncertainties:
  1  2.04525
  2  1.02665
  3  0.151362
  4  0.0193245
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) = 83569.5637452
delta logL = 0.255715415042

Extracting fit parameters...

4FGL J0304.5+6821
   Spectrum: LogParabola
306         norm:  1.385e+00  2.045e+00  0.000e+00  1.000e+06 ( 1.000e-12)
307        alpha:  1.825e+00  1.027e+00  0.000e+00  5.000e+00 ( 1.000e+00)
308         beta:  2.132e-01  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
309           Eb:  9.365e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
632    Prefactor:  1.032e+00  1.932e-02  0.000e+00  1.000e+01 ( 1.000e+00)
633        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
634        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
627   Normalization:  1.055e+00  1.514e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.15
Ra Dec: 46.141 68.354

Creating a high resolution counts map...
INFO: Auto-setting vmin to -2.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  2.220e+00 [aplpy.core]
Saving /lscratch/kocevski/19650828/cmap_HighResolution_710726401_711331201_4FGL_J0304.5+6821_weekly_bin780.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.80e-05', job_status='DONE', photon_flux_upper_limit='6.09e-08', time_completed='2023-07-18 01:01:54.667233', job_id='19650828', GAL2='1.03', fit_tolerance='1e-08', EG2='1.06', EG='1.05', time_epoch_completed='1689667314.67', return_code2='0', ts='0.15', comment='SUCCESS', return_code='0', GAL='1.03', dlogl='2.56e-01', ts2='0.66', photon_index_error='0.00', photon_index='2.67' WHERE bin_id='780' AND source_name='4FGL J0304.5+6821' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Jul 18 01:01:55 PDT 2023

Done.

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

Extracting fit parameters...

4FGL J0304.5+6821
   Spectrum: LogParabola
306         norm:  6.301e-01  1.728e+00  0.000e+00  1.000e+06 ( 1.000e-12)
307        alpha:  2.670e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
308         beta:  2.132e-01  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
309           Eb:  9.365e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
632    Prefactor:  1.032e+00  1.980e-02  0.000e+00  1.000e+01 ( 1.000e+00)
633        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
634        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
627   Normalization:  1.052e+00  1.554e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.15
Ra Dec: 46.141 68.354
Photon Flux Upper Limit: 6.09490805056e-08 ph cm-2 s-1
Energy Flux Upper Limit: 1.79837808795e-05 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/19651537/likelihoodResults_710726401_711331201_4FGL_J0304.5+6821_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) = 83569.6440454
delta logL = 0.175415226637

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 83569.5637453
delta logL = 0.255715323336

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
 MIGRAD TERMINATED WITHOUT CONVERGENCE.

 FCN=   83569.56     FROM MIGRAD    STATUS=FAILED        93 CALLS      262 TOTAL
                     EDM=   .64E-07    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          1.3847        1.9990        .36959E-04    .36567E-02
   2  alpha         1.8254        .96715        .10166       -.61138E-03
   3  Normalizat    1.0554        .15112        .95420E-03    .33551E-04
   4  Prefactor     1.0317        .19298E-01    .12107E-03    .40566E-03
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   83569.56     FROM SIMPLEX   STATUS=UNCHANGED     73 CALLS      335 TOTAL
                     EDM=   .16E-04    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          1.3847        1.9990        .95671E-05   -1.5684    
   2  alpha         1.8254        .96715        .19022E-02   -.27321    
   3  Normalizat    1.0554        .15112        .18656E-03   -.91197    
   4  Prefactor     1.0317        .19298E-01    .30122E-04   -.91680    
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   83569.56     FROM MIGRAD    STATUS=CONVERGED     38 CALLS      373 TOTAL
                     EDM=   .73E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          1.3846        2.0293        .14784E-05    .13620E-02
   2  alpha         1.8254        .98828        .20332E-01    .23887E-05
   3  Normalizat    1.0554        .15110        .38168E-04    .28595E-05
   4  Prefactor     1.0317        .19298E-01    .48428E-05    .22537E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 1.38464
  alpha      = 1.82543
  Normalizat = 1.05539
  Prefactor  = 1.03171
 **********
 **   18 **HESSE 
 **********

 FCN=   83569.56     FROM HESSE     STATUS=OK            25 CALLS      398 TOTAL
                     EDM=   .90E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          1.3846        2.0452        .37395E-06   -1.5684    
   2  alpha         1.8254        .99581        .81329E-03   -.27321    
   3  Normalizat    1.0554        .15130        .76336E-05   -.91197    
   4  Prefactor     1.0317        .19324E-01    .96856E-06   -.91680    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 9.04963e-12
Minuit parameter uncertainties:
  1  2.04525
  2  1.02665
  3  0.151362
  4  0.0193245
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) = 83569.5637452
delta logL = 0.255715415042

Extracting fit parameters...

4FGL J0304.5+6821
   Spectrum: LogParabola
306         norm:  1.385e+00  2.045e+00  0.000e+00  1.000e+06 ( 1.000e-12)
307        alpha:  1.825e+00  1.027e+00  0.000e+00  5.000e+00 ( 1.000e+00)
308         beta:  2.132e-01  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
309           Eb:  9.365e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
632    Prefactor:  1.032e+00  1.932e-02  0.000e+00  1.000e+01 ( 1.000e+00)
633        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
634        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
627   Normalization:  1.055e+00  1.514e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.15
Ra Dec: 46.141 68.354

Creating a high resolution counts map...
INFO: Auto-setting vmin to -2.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  2.220e+00 [aplpy.core]
Saving /lscratch/kocevski/19651537/cmap_HighResolution_710726401_711331201_4FGL_J0304.5+6821_weekly_bin780.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.80e-05', job_status='DONE', photon_flux_upper_limit='6.09e-08', time_completed='2023-07-18 01:09:03.296584', job_id='19651537', GAL2='1.03', fit_tolerance='1e-08', EG2='1.06', EG='1.05', time_epoch_completed='1689667743.3', return_code2='0', ts='0.15', comment='SUCCESS', return_code='0', GAL='1.03', dlogl='2.56e-01', ts2='0.66', photon_index_error='0.00', photon_index='2.67' WHERE bin_id='780' AND source_name='4FGL J0304.5+6821' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Jul 18 01:09:03 PDT 2023

