/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/pyfits/__init__.py:22: PyFITSDeprecationWarning: PyFITS is deprecated, please use astropy.io.fits
  PyFITSDeprecationWarning)  # noqa
/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)

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


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

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


Performing analysis on: 4FGL_J0331.9+6307_daily_bin1801
RA = 52.9909, Dec = 63.1309
tmin = 706147201, tmax = 706406401
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='17768006', job_status='RUN', time_executed='2023-05-22 00:06:20.750866', time_epoch_executed='1684739180.75' WHERE source_name='4FGL J0331.9+6307' and cadence='daily' and bin_id='1801'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/17768006

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/17768006/ft1_4FGL_J0331.9+6307_daily_bin1801.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/17768006/ft2_4FGL_J0331.9+6307_daily_bin1801.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/17768006/ft1_4FGL_J0331.9+6307_daily_bin1801.fits outfile=/lscratch/kocevski/17768006/ft1_filteredMKT_4FGL_J0331.9+6307_daily_bin1801.fits ra=52.9909 dec=63.1309 rad=12.0 tmin=706147201.0 tmax=706406401.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 2.19
user 1.94
sys 0.16

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/17768006/ft2_4FGL_J0331.9+6307_daily_bin1801.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/17768006/ft2_4FGL_J0331.9+6307_daily_bin1801.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/17768006/ft1_filteredMKT_4FGL_J0331.9+6307_daily_bin1801.fits evtable="EVENTS" outfile="/lscratch/kocevski/17768006/ft1_filtered_4FGL_J0331.9+6307_daily_bin1801.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.36
user 0.19
sys 0.13

Number of photons that the gtmktime cut: 4187

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/17768006/ft1_filtered_4FGL_J0331.9+6307_daily_bin1801.fits" evtable="EVENTS" scfile=/lscratch/kocevski/17768006/ft2_4FGL_J0331.9+6307_daily_bin1801.fits sctable="SC_DATA" outfile=/lscratch/kocevski/17768006/ltcube_706147201_706406401_4FGL_J0331.9+6307_daily_bin1801.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/17768006/ft2_4FGL_J0331.9+6307_daily_bin1801.fits
.....................!
real 11.66
user 11.14
sys 0.28

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/17768006/ft1_filtered_4FGL_J0331.9+6307_daily_bin1801.fits evtable="EVENTS" scfile=/lscratch/kocevski/17768006/ft2_4FGL_J0331.9+6307_daily_bin1801.fits sctable="SC_DATA" expcube=/lscratch/kocevski/17768006/ltcube_706147201_706406401_4FGL_J0331.9+6307_daily_bin1801.fits outfile=/lscratch/kocevski/17768006/expmap_706147201_706406401_4FGL_J0331.9+6307_daily_bin1801.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/17768006/ltcube_706147201_706406401_4FGL_J0331.9+6307_daily_bin1801.fits
.....................!
real 65.19
user 61.09
sys 3.65

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

Setting source of interest to:
4FGL J0331.9+6307 @ 52.9909 63.1309

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/17768006/ft1_filtered_4FGL_J0331.9+6307_daily_bin1801.fits scfile=/lscratch/kocevski/17768006/ft2_4FGL_J0331.9+6307_daily_bin1801.fits outfile=/lscratch/kocevski/17768006/cmap_706147201_706406401_4FGL_J0331.9+6307_daily_bin1801.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=52.9909 yref=63.1309 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.38
user 0.23
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/17768006/ft1_filtered_4FGL_J0331.9+6307_daily_bin1801.fits scfile=/lscratch/kocevski/17768006/ft2_4FGL_J0331.9+6307_daily_bin1801.fits outfile=/lscratch/kocevski/17768006/cmap_HighResolution_706147201_706406401_4FGL_J0331.9+6307_daily_bin1801.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=52.9909 yref=63.1309 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 (Done.


Performing analysis on: 4FGL_J0331.9+6307_daily_bin1801
RA = 52.9909, Dec = 63.1309
tmin = 706147201, tmax = 706406401
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='17768005', job_status='RUN', time_executed='2023-05-22 00:06:20.013154', time_epoch_executed='1684739180.01' WHERE source_name='4FGL J0331.9+6307' and cadence='daily' and bin_id='1801'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/17768005

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/17768005/ft1_4FGL_J0331.9+6307_daily_bin1801.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/17768005/ft2_4FGL_J0331.9+6307_daily_bin1801.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/17768005/ft1_4FGL_J0331.9+6307_daily_bin1801.fits outfile=/lscratch/kocevski/17768005/ft1_filteredMKT_4FGL_J0331.9+6307_daily_bin1801.fits ra=52.9909 dec=63.1309 rad=12.0 tmin=706147201.0 tmax=706406401.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 2.18
user 1.94
sys 0.19

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/17768005/ft2_4FGL_J0331.9+6307_daily_bin1801.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/17768005/ft2_4FGL_J0331.9+6307_daily_bin1801.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/17768005/ft1_filteredMKT_4FGL_J0331.9+6307_daily_bin1801.fits evtable="EVENTS" outfile="/lscratch/kocevski/17768005/ft1_filtered_4FGL_J0331.9+6307_daily_bin1801.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.35
user 0.17
sys 0.15

Number of photons that the gtmktime cut: 4187

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/17768005/ft1_filtered_4FGL_J0331.9+6307_daily_bin1801.fits" evtable="EVENTS" scfile=/lscratch/kocevski/17768005/ft2_4FGL_J0331.9+6307_daily_bin1801.fits sctable="SC_DATA" outfile=/lscratch/kocevski/17768005/ltcube_706147201_706406401_4FGL_J0331.9+6307_daily_bin1801.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/17768005/ft2_4FGL_J0331.9+6307_daily_bin1801.fits
.....................!
real 13.84
user 13.31
sys 0.24

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/17768005/ft1_filtered_4FGL_J0331.9+6307_daily_bin1801.fits evtable="EVENTS" scfile=/lscratch/kocevski/17768005/ft2_4FGL_J0331.9+6307_daily_bin1801.fits sctable="SC_DATA" expcube=/lscratch/kocevski/17768005/ltcube_706147201_706406401_4FGL_J0331.9+6307_daily_bin1801.fits outfile=/lscratch/kocevski/17768005/expmap_706147201_706406401_4FGL_J0331.9+6307_daily_bin1801.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/17768005/ltcube_706147201_706406401_4FGL_J0331.9+6307_daily_bin1801.fits
.....................!
real 64.98
user 60.71
sys 3.77

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

Setting source of interest to:
4FGL J0331.9+6307 @ 52.9909 63.1309

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/17768005/ft1_filtered_4FGL_J0331.9+6307_daily_bin1801.fits scfile=/lscratch/kocevski/17768005/ft2_4FGL_J0331.9+6307_daily_bin1801.fits outfile=/lscratch/kocevski/17768005/cmap_706147201_706406401_4FGL_J0331.9+6307_daily_bin1801.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=52.9909 yref=63.1309 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.41
user 0.25
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/17768005/ft1_filtered_4FGL_J0331.9+6307_daily_bin1801.fits scfile=/lscratch/kocevski/17768005/ft2_4FGL_J0331.9+6307_daily_bin1801.fits outfile=/lscratch/kocevski/17768005/cmap_HighResolution_706147201_706406401_4FGL_J0331.9+6307_daily_bin1801.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=52.9909 yref=63.1309 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.38
user 0.22
sys 0.14

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/17768006/ft1_filtered_4FGL_J0331.9+6307_daily_bin1801.fits evtable="EVENTS" scfile=/lscratch/kocevski/17768006/ft2_4FGL_J0331.9+6307_daily_bin1801.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/17768006/Model_4FGL_J0331.9+6307_daily_bin1801.xml irfs="P8R3_SOURCE_V2" evclsmin=0 evclass="INDEF" evtype="INDEF" convert=yes chatter=2 clobber=yes debug=no gui=no mode="ql"

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

adding source EG_v02
adding source G150.3+4.5
adding source GAL_V02
adding source HB 3
adding source HB 9
adding source W 3
Working on...
/lscratch/kocevski/17768006/ft1_filtered_4FGL_J0331.9+6307_daily_bin1801.fits.....................!
real 238.67
user 236.04
sys 0.98

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/17768006/ft1_filtered_4FGL_J0331.9+6307_daily_bin1801.fits', '/lscratch/kocevski/17768006/ft2_4FGL_J0331.9+6307_daily_bin1801.fits', expMap='/lscratch/kocevski/17768006/expmap_706147201_706406401_4FGL_J0331.9+6307_daily_bin1801.fits', expCube='/lscratch/kocevski/17768006/ltcube_706147201_706406401_4FGL_J0331.9+6307_daily_bin1801.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/17768006/Model_4FGL_J0331.9+6307_daily_bin1801.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J0331.9+6307'

4FGL J0331.9+6307
   Spectrum: PowerLaw
358    Prefactor:  1.283e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-13)
359        Index:  2.090e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
360        Scale:  2.866e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/17768006/ft1_filtered_4FGL_J0331.9+6307_daily_bin1801.fits
Spacecraft file(s): /lscratch/kocevski/17768006/ft2_4FGL_J0331.9+6307_daily_bin1801.fits
Exposure map: /lscratch/kocevski/17768006/expmap_706147201_706406401_4FGL_J0331.9+6307_daily_bin1801.fits
Exposure cube: /lscratch/kocevski/17768006/ltcube_706147201_706406401_4FGL_J0331.9+6307_daily_bin1801.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/17768006/Model_4FGL_J0331.9+6307_daily_bin1801.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) = 38529.1394236

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    1.3809       1.0000         .10000E-03   10000.    
     2 'norm      '    5.5676       1.0000          .0000       .10000E+07
     3 'norm      '    .23003E-04   1.0000          .0000       .10000E+07
     4 'norm      '    1.6672       1.0000          .0000       .10000E+07
     5 'Prefactor '    .82139E-05   1.0000          .0000       .10000E+07
     6 'Prefactor '    .90483E-08   1.0000          .0000       .10000E+07
     7 'Prefactor '    1.2616       1.0000          .0000       .10000E+07
     8 'Prefactor '    .25850E-03   1.0000          .0000       .10000E+07
     9 'Prefactor '    3.4928       1.0000          .0000       .10000E+07
    10 'norm      '    3.5627       1.0000          .0000       .10000E+07
    11 'norm      '    .22204E-08   1.0000          .0000       .10000E+07
    12 'Prefactor '    12.857       1.0000          .0000       .10000E+07
    13 'Normalizat'    1.5322       1.0000         .10000E-01   10.000    
    14 'Prefactor '    .98224       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6410E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   38529.13     FROM MIGRAD    STATUS=CONVERGED     95 CALLS      746 TOTAL
                     EDM=   .16E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .9%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     1.3794        .85596       -.44173E-07    .21608E-03
   2  norm          5.5664        .59947       -.41147E-08    .18251E-02
   3  norm           .0000        3.6345       -.15122E-06** at limit **
   4  norm          1.6663        3.5780       -.30239E-06    .84042E-03
   5  Prefactor      .0000        8.2957       -.56931E-07** at limit **
   6  Prefactor      .0000        1.5735       -.19865E-07** at limit **
   7  Prefactor     1.2604        2.0598        .13550E-06    .35132E-02
   8  Prefactor     .55511E-10    6.7345       -.73279E-06** at limit **
   9  Prefactor     1.5755        146.32        .81323E-05   -.15867E-03
  10  norm          3.5741        5.1646        .14155E-06    .10960E-02
  11  norm          .33307E-09    6.3549       -.12245E-06** at limit **
  12  Prefactor     12.859        1.2019        .59549E-08   -.34578E-01
  13  Normalizat    1.5340        .27400        .77514E-05    .19581E-03
  14  Prefactor     .98234        .29862E-01   -.10582E-06    .11201E-02
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 1.37938
  norm       = 5.56637
  norm       = 0
  norm       = 1.6663
  Prefactor  = 0
  Prefactor  = 0
  Prefactor  = 1.26038
  Prefactor  = 5.55112e-11
  Prefactor  = 1.57548
  norm       = 3.5741
  norm       = 3.33067e-10
  Prefactor  = 12.8593
  Normalizat = 1.53402
  Prefactor  = 0.982341
v3.41).

This is gtbin version HEAD
real 0.50
user 0.20
sys 0.14

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/17768005/ft1_filtered_4FGL_J0331.9+6307_daily_bin1801.fits evtable="EVENTS" scfile=/lscratch/kocevski/17768005/ft2_4FGL_J0331.9+6307_daily_bin1801.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/17768005/Model_4FGL_J0331.9+6307_daily_bin1801.xml irfs="P8R3_SOURCE_V2" evclsmin=0 evclass="INDEF" evtype="INDEF" convert=yes chatter=2 clobber=yes debug=no gui=no mode="ql"

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

adding source EG_v02
adding source G150.3+4.5
adding source GAL_V02
adding source HB 3
adding source HB 9
adding source W 3
Working on...
/lscratch/kocevski/17768005/ft1_filtered_4FGL_J0331.9+6307_daily_bin1801.fits.....................!
real 240.05
user 235.57
sys 2.75

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/17768005/ft1_filtered_4FGL_J0331.9+6307_daily_bin1801.fits', '/lscratch/kocevski/17768005/ft2_4FGL_J0331.9+6307_daily_bin1801.fits', expMap='/lscratch/kocevski/17768005/expmap_706147201_706406401_4FGL_J0331.9+6307_daily_bin1801.fits', expCube='/lscratch/kocevski/17768005/ltcube_706147201_706406401_4FGL_J0331.9+6307_daily_bin1801.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/17768005/Model_4FGL_J0331.9+6307_daily_bin1801.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J0331.9+6307'

4FGL J0331.9+6307
   Spectrum: PowerLaw
358    Prefactor:  1.283e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-13)
359        Index:  2.090e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
360        Scale:  2.866e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/17768005/ft1_filtered_4FGL_J0331.9+6307_daily_bin1801.fits
Spacecraft file(s): /lscratch/kocevski/17768005/ft2_4FGL_J0331.9+6307_daily_bin1801.fits
Exposure map: /lscratch/kocevski/17768005/expmap_706147201_706406401_4FGL_J0331.9+6307_daily_bin1801.fits
Exposure cube: /lscratch/kocevski/17768005/ltcube_706147201_706406401_4FGL_J0331.9+6307_daily_bin1801.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/17768005/Model_4FGL_J0331.9+6307_daily_bin1801.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) = 38529.1394236

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    1.3809       1.0000         .10000E-03   10000.    
     2 'norm      '    5.5676       1.0000          .0000       .10000E+07
     3 'norm      '    .23003E-04   1.0000          .0000       .10000E+07
     4 'norm      '    1.6672       1.0000          .0000       .10000E+07
     5 'Prefactor '    .82139E-05   1.0000          .0000       .10000E+07
     6 'Prefactor '    .90483E-08   1.0000          .0000       .10000E+07
     7 'Prefactor '    1.2616       1.0000          .0000       .10000E+07
     8 'Prefactor '    .25850E-03   1.0000          .0000       .10000E+07
     9 'Prefactor '    3.4928       1.0000          .0000       .10000E+07
    10 'norm      '    3.5627       1.0000          .0000       .10000E+07
    11 'norm      '    .22204E-08   1.0000          .0000       .10000E+07
    12 'Prefactor '    12.857       1.0000          .0000       .10000E+07
    13 'Normalizat'    1.5322       1.0000         .10000E-01   10.000    
    14 'Prefactor '    .98224       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6410E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   38529.13     FROM MIGRAD    STATUS=CONVERGED     95 CALLS      746 TOTAL
                     EDM=   .16E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .9%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     1.3794        .85596       -.44173E-07    .21608E-03
   2  norm          5.5664        .59947       -.41147E-08    .18251E-02
   3  norm           .0000        3.6345       -.15122E-06** at limit **
   4  norm          1.6663        3.5780       -.30239E-06    .84042E-03
   5  Prefactor      .0000        8.2957       -.56931E-07** at limit **
   6  Prefactor      .0000        1.5735       -.19865E-07** at limit **
   7  Prefactor     1.2604        2.0598        .13550E-06    .35132E-02
   8  Prefactor     .55511E-10    6.7345       -.73279E-06** at limit **
   9  Prefactor     1.5755        146.32        .81323E-05   -.15867E-03
  10  norm          3.5741        5.1646        .14155E-06    .10960E-02
  11  norm          .33307E-09    6.3549       -.12245E-06** at limit **
  12  Prefactor     12.859        1.2019        .59549E-08   -.34578E-01
  13  Normalizat    1.5340        .27400        .77514E-05    .19581E-03
  14  Prefactor     .98234        .29862E-01   -.10582E-06    .11201E-02
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 1.37938
  norm       = 5.56637
  norm       = 0
  norm       = 1.6663
  Prefactor  = 0
  Prefactor  = 0
  Prefactor  = 1.26038
  Prefactor  = 5.55112e-11
  Prefactor  = 1.57548
  norm       = 3.5741
  norm       = 3.33067e-10
  Prefactor  = 12.8593
  Normalizat = 1.53402
  Prefactor  = 0.982341
 **********
 **   18 **HESSE 
 **********

 FCN=   38529.13     FROM HESSE     STATUS=OK           194 CALLS      940 TOTAL
                     EDM=   .34E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     1.3794        .86659        .92597E-02   -1.5473    
   2  norm          5.5664        .60143        .42554E-03   -1.5661    
   3  norm           .0000        3.6406        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  norm          1.6663        3.5965        .81632E-03   -1.5682    
   5  Prefactor      .0000        8.4061        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor      .0000        1.5818        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     1.2604        2.0958        .99239E-03   -1.5686    
   8  Prefactor     .55511E-10    6.7644        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     1.5755        147.38        .54076E-03   -1.5683    
  10  norm          3.5741        5.1886        .53520E-03   -1.5670    
  11  norm          .33307E-09    6.4239        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     12.859        10.588        .27910E-03   -1.5636    
  13  Normalizat    1.5340        .27233        .21096       -.76827    
  14  Prefactor     .98234        .28891E-01    .27534E-01   -.93320    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.38775e-08
Minuit parameter uncertainties:
  1  0.866594
  2  0.601433
  3  2.00095e-05
  4  3.59655
  5  2.75498e-05
  6  9.05199e-07
  7  2.09581
  8  3.19289e-05
  9  30.4768
  10  5.18862
  11  9.2051e-05
  12  10.5882
  13  0.272596
  14  0.0288914
 **********
 **   18 **HESSE 
 **********

 FCN=   38529.13     FROM HESSE     STATUS=OK           194 CALLS      940 TOTAL
                     EDM=   .34E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     1.3794        .86659        .92597E-02   -1.5473    
   2  norm          5.5664        .60143        .42554E-03   -1.5661    
   3  norm           .0000        3.6406        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  norm          1.6663        3.5965        .81632E-03   -1.5682    
   5  Prefactor      .0000        8.4061        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor      .0000        1.5818        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     1.2604        2.0958        .99239E-03   -1.5686    
   8  Prefactor     .55511E-10    6.7644        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     1.5755        147.38        .54076E-03   -1.5683    
  10  norm          3.5741        5.1886        .53520E-03   -1.5670    
  11  norm          .33307E-09    6.4239        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     12.859        10.588        .27910E-03   -1.5636    
  13  Normalizat    1.5340        .27233        .21096       -.76827    
  14  Prefactor     .98234        .28891E-01    .27534E-01   -.93320    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.38775e-08
Minuit parameter uncertainties:
  1  0.866594
  2  0.601433
  3  2.00095e-05
  4  3.59655
  5  2.75498e-05
  6  9.05199e-07
  7  2.09581
  8  3.19289e-05
  9  30.4768
  10  5.18862
  11  9.2051e-05
  12  10.5882
  13  0.272596
  14  0.0288914
Done.

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

Extracting fit parameters...

4FGL J0331.9+6307
   Spectrum: PowerLaw
358    Prefactor:  0.000e+00  9.052e-07  0.000e+00  1.000e+06 ( 1.000e-13)
359        Index:  2.090e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
360        Scale:  2.866e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
626    Prefactor:  9.823e-01  2.889e-02  0.000e+00  1.000e+01 ( 1.000e+00)
627        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
628        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
621   Normalization:  1.534e+00  2.726e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.00
Ra Dec: 52.991 63.131
Photon Flux Upper Limit: 6.96582634609e-08 ph cm-2 s-1
Energy Flux Upper Limit: 0.00526271114345 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/17768006/likelihoodResults_706147201_706406401_4FGL_J0331.9+6307_daily_bin1801.txt

Performing a free index iterative likelihood fit...

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

Done.

Freeing candidate source...
Done.

Fit tolerance = 1

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 38529.1256786
delta logL = -0.000548885844182

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 38529.1251327
delta logL = -3.0718074413e-06

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

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

 FCN=   38529.13     FROM MIGRAD    STATUS=CONVERGED     40 CALLS      244 TOTAL
                     EDM=   .51E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=100.0%

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor      .0000        1.3020        .42118E-03** at limit **
   2  Index         2.7456        1.8506       -.31369E-04     .0000    
   3  Normalizat    1.5340        1.0463       -.22076E-04   -.14811E-03
   4  Prefactor     .98234        1.3226        .21468E-05   -.38333E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0
  Index      = 2.74555
  Normalizat = 1.53402
  Prefactor  = 0.982341
 **********
 **   18 **HESSE 
 **********
  MNHESS FAILS AND WILL RETURN DIAGONAL MATRIX. 

 FCN=   38529.13     FROM HESSE     STATUS=FAILED         9 CALLS      253 TOTAL
                     EDM=   .51E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=100.0%

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor      .0000        1.3020        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         .85376        2.0947       -.31369E-04   -.46776    
   3  Normalizat    1.5340        1.0463       -.22076E-04   -.76827    
   4  Prefactor     .98234        1.3226        .21468E-05   -.93320    
                               ERR DEF=  .500    
Minuit fit quality: 1   estimated distance: 5.11781e-11
Minuit parameter uncertainties:
  1  5.48783e-06
  2  1.90817
  3  1.06171
  4  1.37049
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Done.

MINUIT Return Code (Free Index): 101
logL (Free Index) = 38529.1251297
delta logL = 1.45519152284e-11

Extracting fit parameters...

4FGL J0331.9+6307
   Spectrum: PowerLaw
358    Prefactor:  0.000e+00  5.488e-06  0.000e+00  1.000e+06 ( 1.000e-13)
359        Index:  2.746e+00  1.908e+00  0.000e+00  1.000e+01 (-1.000e+00)
360        Scale:  2.866e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
626    Prefactor:  9.823e-01  1.370e+00  0.000e+00  1.000e+01 ( 1.000e+00)
627        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
628        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
621   Normalization:  1.534e+00  1.062e+00  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.00
Ra Dec: 52.991 63.131

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/17768006/cmap_HighResolution_706147201_706406401_4FGL_J0331.9+6307_daily_bin1801.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='5.26e-03', job_status='DONE', photon_flux_upper_limit='6.97e-08', time_completed='2023-05-22 00:18:20.124717', job_id='17768006', GAL2='0.98', fit_tolerance='1e-08', EG2='1.53', EG='1.53', time_epoch_completed='1684739900.12', return_code2='101', ts='0.00', comment='SUCCESS', return_code='0', GAL='0.98', dlogl='1.46e-11', ts2='0.00', photon_index_error='0.00', photon_index='2.09' WHERE bin_id='1801' AND source_name='4FGL J0331.9+6307' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon May 22 00:18:20 PDT 2023

Done.

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

Extracting fit parameters...

4FGL J0331.9+6307
   Spectrum: PowerLaw
358    Prefactor:  0.000e+00  9.052e-07  0.000e+00  1.000e+06 ( 1.000e-13)
359        Index:  2.090e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
360        Scale:  2.866e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
626    Prefactor:  9.823e-01  2.889e-02  0.000e+00  1.000e+01 ( 1.000e+00)
627        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
628        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
621   Normalization:  1.534e+00  2.726e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.00
Ra Dec: 52.991 63.131
Photon Flux Upper Limit: 6.96582634609e-08 ph cm-2 s-1
Energy Flux Upper Limit: 0.00526271114345 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/17768005/likelihoodResults_706147201_706406401_4FGL_J0331.9+6307_daily_bin1801.txt

Performing a free index iterative likelihood fit...

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

Done.

Freeing candidate source...
Done.

Fit tolerance = 1

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 38529.1256786
delta logL = -0.000548885844182

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 38529.1251327
delta logL = -3.0718074413e-06

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

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

 FCN=   38529.13     FROM MIGRAD    STATUS=CONVERGED     40 CALLS      244 TOTAL
                     EDM=   .51E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=100.0%

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor      .0000        1.3020        .42118E-03** at limit **
   2  Index         2.7456        1.8506       -.31369E-04     .0000    
   3  Normalizat    1.5340        1.0463       -.22076E-04   -.14811E-03
   4  Prefactor     .98234        1.3226        .21468E-05   -.38333E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0
  Index      = 2.74555
  Normalizat = 1.53402
  Prefactor  = 0.982341
 **********
 **   18 **HESSE 
 **********
  MNHESS FAILS AND WILL RETURN DIAGONAL MATRIX. 

 FCN=   38529.13     FROM HESSE     STATUS=FAILED         9 CALLS      253 TOTAL
                     EDM=   .51E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=100.0%

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor      .0000        1.3020        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         .85376        2.0947       -.31369E-04   -.46776    
   3  Normalizat    1.5340        1.0463       -.22076E-04   -.76827    
   4  Prefactor     .98234        1.3226        .21468E-05   -.93320    
                               ERR DEF=  .500    
Minuit fit quality: 1   estimated distance: 5.11781e-11
Minuit parameter uncertainties:
  1  5.48783e-06
  2  1.90817
  3  1.06171
  4  1.37049
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Done.

MINUIT Return Code (Free Index): 101
logL (Free Index) = 38529.1251297
delta logL = 1.45519152284e-11

Extracting fit parameters...

4FGL J0331.9+6307
   Spectrum: PowerLaw
358    Prefactor:  0.000e+00  5.488e-06  0.000e+00  1.000e+06 ( 1.000e-13)
359        Index:  2.746e+00  1.908e+00  0.000e+00  1.000e+01 (-1.000e+00)
360        Scale:  2.866e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
626    Prefactor:  9.823e-01  1.370e+00  0.000e+00  1.000e+01 ( 1.000e+00)
627        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
628        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
621   Normalization:  1.534e+00  1.062e+00  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.00
Ra Dec: 52.991 63.131

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/17768005/cmap_HighResolution_706147201_706406401_4FGL_J0331.9+6307_daily_bin1801.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='5.26e-03', job_status='DONE', photon_flux_upper_limit='6.97e-08', time_completed='2023-05-22 00:18:28.290648', job_id='17768005', GAL2='0.98', fit_tolerance='1e-08', EG2='1.53', EG='1.53', time_epoch_completed='1684739908.29', return_code2='101', ts='0.00', comment='SUCCESS', return_code='0', GAL='0.98', dlogl='1.46e-11', ts2='0.00', photon_index_error='0.00', photon_index='2.09' WHERE bin_id='1801' AND source_name='4FGL J0331.9+6307' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon May 22 00:18:28 PDT 2023

