number of points = 17392
number of fields = 31
RA_SUN column already exists. File will not be modified.
/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/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).


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

Done.


Performing analysis on: 4FGL_J1640.4+3945_weekly_bin936
RA = 250.119, Dec = 39.7626
tmin = 805075201, tmax = 805680001
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='31669711', job_status='RUN', time_executed='2026-07-14 13:53:28.210844', time_epoch_executed='1784062408.21' WHERE source_name='4FGL J1640.4+3945' and cadence='weekly' and bin_id='936'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/31669711

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

Retrieving the FT1 file...

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

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

Retrieving 108 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/31669711/ft1_4FGL_J1640.4+3945_weekly_bin936.fits


Retrieving the FT1 file...

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

Retrieving 108 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/31669711/ft2_4FGL_J1640.4+3945_weekly_bin936.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/31669711/ft1_4FGL_J1640.4+3945_weekly_bin936.fits outfile=/lscratch/kocevski/31669711/ft1_filteredMKT_4FGL_J1640.4+3945_weekly_bin936.fits ra=250.119 dec=39.7626 rad=12.0 tmin=805075201.0 tmax=805680001.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.55
user 3.79
sys 0.19

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/31669711/ft2_4FGL_J1640.4+3945_weekly_bin936.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/31669711/ft2_4FGL_J1640.4+3945_weekly_bin936.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/31669711/ft1_filteredMKT_4FGL_J1640.4+3945_weekly_bin936.fits evtable="EVENTS" outfile="/lscratch/kocevski/31669711/ft1_filtered_4FGL_J1640.4+3945_weekly_bin936.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.83
user 0.18
sys 0.13

Number of photons that the gtmktime cut: 1530

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/31669711/ft1_filtered_4FGL_J1640.4+3945_weekly_bin936.fits" evtable="EVENTS" scfile=/lscratch/kocevski/31669711/ft2_4FGL_J1640.4+3945_weekly_bin936.fits sctable="SC_DATA"/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)
/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 = 17392
number of fields = 31
RA_SUN column already exists. File will not be modified.
number of points = 17392
number of fields = 31
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J1640.4+3945_weekly_bin936
RA = 250.119, Dec = 39.7626
tmin = 805075201, tmax = 805680001
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='31669789', job_status='RUN', time_executed='2026-07-14 13:54:29.374556', time_epoch_executed='1784062469.37' WHERE source_name='4FGL J1640.4+3945' and cadence='weekly' and bin_id='936'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/31669789

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

Retrieving the FT1 file...

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

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

Retrieving 108 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/31669789/ft1_4FGL_J1640.4+3945_weekly_bin936.fits


Retrieving the FT1 file...

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

Retrieving 108 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/31669789/ft2_4FGL_J1640.4+3945_weekly_bin936.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/31669789/ft1_4FGL_J1640.4+3945_weekly_bin936.fits outfile=/lscratch/kocevski/31669789/ft1_filteredMKT_4FGL_J1640.4+3945_weekly_bin936.fits ra=250.119 dec=39.7626 rad=12.0 tmin=805075201.0 tmax=805680001.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.94
user 4.31
sys 0.22

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/31669789/ft2_4FGL_J1640.4+3945_weekly_bin936.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/31669789/ft2_4FGL_J1640.4+3945_weekly_bin936.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/31669789/ft1_filteredMKT_4FGL_J1640.4+3945_weekly_bin936.fits evtable="EVENTS" outfile="/lscratch/kocevski/31669789/ft1_filtered_4FGL_J1640.4+3945_weekly_bin936.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.77
user 0.20
sys 0.14

Number of photons that the gtmktime cut: 1530

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/31669789/ft1_filtered_4FGL_J1640.4+3945_weekly_bin936.fits" evtable="EVENTS" scfile=/lscratch/kocevski/31669789/ft2_4FGL_J1640.4+3945_weekly_bin936.fits sctable="SC_DATA"Done.


Performing analysis on: 4FGL_J1640.4+3945_weekly_bin936
RA = 250.119, Dec = 39.7626
tmin = 805075201, tmax = 805680001
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='31669790', job_status='RUN', time_executed='2026-07-14 13:54:29.349295', time_epoch_executed='1784062469.35' WHERE source_name='4FGL J1640.4+3945' and cadence='weekly' and bin_id='936'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/31669790

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

Retrieving the FT1 file...

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

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

Retrieving 108 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/31669790/ft1_4FGL_J1640.4+3945_weekly_bin936.fits


Retrieving the FT1 file...

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

Retrieving 108 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/31669790/ft2_4FGL_J1640.4+3945_weekly_bin936.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/31669790/ft1_4FGL_J1640.4+3945_weekly_bin936.fits outfile=/lscratch/kocevski/31669790/ft1_filteredMKT_4FGL_J1640.4+3945_weekly_bin936.fits ra=250.119 dec=39.7626 rad=12.0 tmin=805075201.0 tmax=805680001.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 5.07
user 4.32
sys 0.24

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/31669790/ft2_4FGL_J1640.4+3945_weekly_bin936.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/31669790/ft2_4FGL_J1640.4+3945_weekly_bin936.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/31669790/ft1_filteredMKT_4FGL_J1640.4+3945_weekly_bin936.fits evtable="EVENTS" outfile="/lscratch/kocevski/31669790/ft1_filtered_4FGL_J1640.4+3945_weekly_bin936.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.72
user 0.21
sys 0.12

Number of photons that the gtmktime cut: 1530

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/31669790/ft1_filtered_4FGL_J1640.4+3945_weekly_bin936.fits" evtable="EVENTS" scfile=/lscratch/kocevski/31669790/ft2_4FGL_J1640.4+3945_weekly_bin936.fits sctable="SC_DATA" outfile=/lscratch/kocevski/31669711/ltcube_805075201_805680001_4FGL_J1640.4+3945_weekly_bin936.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/31669711/ft2_4FGL_J1640.4+3945_weekly_bin936.fits
.....................!
real 16.02
user 15.35
sys 0.18

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/31669711/ft1_filtered_4FGL_J1640.4+3945_weekly_bin936.fits evtable="EVENTS" scfile=/lscratch/kocevski/31669711/ft2_4FGL_J1640.4+3945_weekly_bin936.fits sctable="SC_DATA" expcube=/lscratch/kocevski/31669711/ltcube_805075201_805680001_4FGL_J1640.4+3945_weekly_bin936.fits outfile=/lscratch/kocevski/31669711/expmap_805075201_805680001_4FGL_J1640.4+3945_weekly_bin936.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/31669711/ltcube_805075201_805680001_4FGL_J1640.4+3945_weekly_bin936.fits
.....................!
real 60.00
user 55.84
sys 3.44

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
Added 205 point sources and 0 extended sources

Setting source of interest to:
4FGL J1640.4+3945 @ 250.119 39.7626

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/31669711/ft1_filtered_4FGL_J1640.4+3945_weekly_bin936.fits scfile=/lscratch/kocevski/31669711/ft2_4FGL_J1640.4+3945_weekly_bin936.fits outfile=/lscratch/kocevski/31669711/cmap_805075201_805680001_4FGL_J1640.4+3945_weekly_bin936.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=250.119 yref=39.7626 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 1.13
user 0.21
sys 0.12

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/31669711/ft1_filtered_4FGL_J1640.4+3945_weekly_bin936.fits scfile=/lscratch/kocevski/31669711/ft2_4FGL_J1640.4+3945_weekly_bin936.fits outfile=/lscratch/kocevski/31669711/cmap_HighResolution_805075201_805680001_4FGL_J1640.4+3945_weekly_bin936.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=250.119 yref=39.7626 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.91
user 0.21
sys 0.12

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/31669711/ft1_filtered_4FGL_J1640.4+3945_weekly_bin936.fits evtable="EVENTS" scfile=/lscratch/kocevski/31669711/ft2_4FGL_J1640.4+3945_weekly_bin936.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/31669711/Model_4FGL_J1640.4+3945_weekly_bin936.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 sourc outfile=/lscratch/kocevski/31669789/ltcube_805075201_805680001_4FGL_J1640.4+3945_weekly_bin936.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/31669789/ft2_4FGL_J1640.4+3945_weekly_bin936.fits
.....................!
real 18.48
user 17.72
sys 0.26

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/31669789/ft1_filtered_4FGL_J1640.4+3945_weekly_bin936.fits evtable="EVENTS" scfile=/lscratch/kocevski/31669789/ft2_4FGL_J1640.4+3945_weekly_bin936.fits sctable="SC_DATA" expcube=/lscratch/kocevski/31669789/ltcube_805075201_805680001_4FGL_J1640.4+3945_weekly_bin936.fits outfile=/lscratch/kocevski/31669789/expmap_805075201_805680001_4FGL_J1640.4+3945_weekly_bin936.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/31669789/ltcube_805075201_805680001_4FGL_J1640.4+3945_weekly_bin936.fits
.....................!
real 67.71
user 63.05
sys 3.97

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
Added 205 point sources and 0 extended sources

Setting source of interest to:
4FGL J1640.4+3945 @ 250.119 39.7626

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/31669789/ft1_filtered_4FGL_J1640.4+3945_weekly_bin936.fits scfile=/lscratch/kocevski/31669789/ft2_4FGL_J1640.4+3945_weekly_bin936.fits outfile=/lscratch/kocevski/31669789/cmap_805075201_805680001_4FGL_J1640.4+3945_weekly_bin936.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=250.119 yref=39.7626 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.23
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/31669789/ft1_filtered_4FGL_J1640.4+3945_weekly_bin936.fits scfile=/lscratch/kocevski/31669789/ft2_4FGL_J1640.4+3945_weekly_bin936.fits outfile=/lscratch/kocevski/31669789/cmap_HighResolution_805075201_805680001_4FGL_J1640.4+3945_weekly_bin936.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=250.119 yref=39.7626 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.75
user 0.24
sys 0.12

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/31669789/ft1_filtered_4FGL_J1640.4+3945_weekly_bin936.fits evtable="EVENTS" scfile=/lscratch/kocevski/31669789/ft2_4FGL_J1640.4+3945_weekly_bin936.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/31669789/Model_4FGL_J1640.4+3945_weekly_bin936.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 sourc outfile=/lscratch/kocevski/31669790/ltcube_805075201_805680001_4FGL_J1640.4+3945_weekly_bin936.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/31669790/ft2_4FGL_J1640.4+3945_weekly_bin936.fits
.....................!
real 18.43
user 17.75
sys 0.24

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/31669790/ft1_filtered_4FGL_J1640.4+3945_weekly_bin936.fits evtable="EVENTS" scfile=/lscratch/kocevski/31669790/ft2_4FGL_J1640.4+3945_weekly_bin936.fits sctable="SC_DATA" expcube=/lscratch/kocevski/31669790/ltcube_805075201_805680001_4FGL_J1640.4+3945_weekly_bin936.fits outfile=/lscratch/kocevski/31669790/expmap_805075201_805680001_4FGL_J1640.4+3945_weekly_bin936.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/31669790/ltcube_805075201_805680001_4FGL_J1640.4+3945_weekly_bin936.fits
.....................!
real 67.38
user 62.72
sys 3.92

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
Added 205 point sources and 0 extended sources

Setting source of interest to:
4FGL J1640.4+3945 @ 250.119 39.7626

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/31669790/ft1_filtered_4FGL_J1640.4+3945_weekly_bin936.fits scfile=/lscratch/kocevski/31669790/ft2_4FGL_J1640.4+3945_weekly_bin936.fits outfile=/lscratch/kocevski/31669790/cmap_805075201_805680001_4FGL_J1640.4+3945_weekly_bin936.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=250.119 yref=39.7626 axisrot=0.0 rafield="RA" decfield="DEC" proj="AIT" hpx_ordering_scheme="RING" hpx_order=3 hpx_ebin=yes hpx_region="" evtable="EVENTS" sctable="SC_DATA" efield="ENERGY" tfield="TIME" chatter=2 clobber=yes debug=no gui=no mode="ql"

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

This is gtbin version HEAD
real 0.76
user 0.22
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/31669790/ft1_filtered_4FGL_J1640.4+3945_weekly_bin936.fits scfile=/lscratch/kocevski/31669790/ft2_4FGL_J1640.4+3945_weekly_bin936.fits outfile=/lscratch/kocevski/31669790/cmap_HighResolution_805075201_805680001_4FGL_J1640.4+3945_weekly_bin936.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=250.119 yref=39.7626 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.81
user 0.23
sys 0.13

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/31669790/ft1_filtered_4FGL_J1640.4+3945_weekly_bin936.fits evtable="EVENTS" scfile=/lscratch/kocevski/31669790/ft2_4FGL_J1640.4+3945_weekly_bin936.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/31669790/Model_4FGL_J1640.4+3945_weekly_bin936.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 sourcnumber of points = 17392
number of fields = 31
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J1640.4+3945_weekly_bin936
RA = 250.119, Dec = 39.7626
tmin = 805075201, tmax = 805680001
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='31670010', job_status='RUN', time_executed='2026-07-14 13:59:25.964620', time_epoch_executed='1784062765.96' WHERE source_name='4FGL J1640.4+3945' and cadence='weekly' and bin_id='936'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/31670010

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

Retrieving the FT1 file...

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

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

Retrieving 108 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/31670010/ft1_4FGL_J1640.4+3945_weekly_bin936.fits


Retrieving the FT1 file...

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

Retrieving 108 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/31670010/ft2_4FGL_J1640.4+3945_weekly_bin936.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/31670010/ft1_4FGL_J1640.4+3945_weekly_bin936.fits outfile=/lscratch/kocevski/31670010/ft1_filteredMKT_4FGL_J1640.4+3945_weekly_bin936.fits ra=250.119 dec=39.7626 rad=12.0 tmin=805075201.0 tmax=805680001.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.45
user 3.82
sys 0.24

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/31670010/ft2_4FGL_J1640.4+3945_weekly_bin936.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/31670010/ft2_4FGL_J1640.4+3945_weekly_bin936.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/31670010/ft1_filteredMKT_4FGL_J1640.4+3945_weekly_bin936.fits evtable="EVENTS" outfile="/lscratch/kocevski/31670010/ft1_filtered_4FGL_J1640.4+3945_weekly_bin936.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.65
user 0.20
sys 0.13

Number of photons that the gtmktime cut: 1530

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/31670010/ft1_filtered_4FGL_J1640.4+3945_weekly_bin936.fits" evtable="EVENTS" scfile=/lscratch/kocevski/31670010/ft2_4FGL_J1640.4+3945_weekly_bin936.fits sctable="SC_DATA"number of points = 17392
number of fields = 31
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J1640.4+3945_weekly_bin936
RA = 250.119, Dec = 39.7626
tmin = 805075201, tmax = 805680001
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='31669995', job_status='RUN', time_executed='2026-07-14 13:59:26.422366', time_epoch_executed='1784062766.42' WHERE source_name='4FGL J1640.4+3945' and cadence='weekly' and bin_id='936'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/31669995

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

Retrieving the FT1 file...

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

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

Retrieving 108 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/31669995/ft1_4FGL_J1640.4+3945_weekly_bin936.fits


Retrieving the FT1 file...

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

Retrieving 108 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/31669995/ft2_4FGL_J1640.4+3945_weekly_bin936.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/31669995/ft1_4FGL_J1640.4+3945_weekly_bin936.fits outfile=/lscratch/kocevski/31669995/ft1_filteredMKT_4FGL_J1640.4+3945_weekly_bin936.fits ra=250.119 dec=39.7626 rad=12.0 tmin=805075201.0 tmax=805680001.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.81
sys 0.22

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/31669995/ft2_4FGL_J1640.4+3945_weekly_bin936.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/31669995/ft2_4FGL_J1640.4+3945_weekly_bin936.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/31669995/ft1_filteredMKT_4FGL_J1640.4+3945_weekly_bin936.fits evtable="EVENTS" outfile="/lscratch/kocevski/31669995/ft1_filtered_4FGL_J1640.4+3945_weekly_bin936.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.76
user 0.18
sys 0.13

Number of photons that the gtmktime cut: 1530

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/31669995/ft1_filtered_4FGL_J1640.4+3945_weekly_bin936.fits" evtable="EVENTS" scfile=/lscratch/kocevski/31669995/ft2_4FGL_J1640.4+3945_weekly_bin936.fits sctable="SC_DATA" outfile=/lscratch/kocevski/31670010/ltcube_805075201_805680001_4FGL_J1640.4+3945_weekly_bin936.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/31670010/ft2_4FGL_J1640.4+3945_weekly_bin936.fits
.....................!
real 15.60
user 14.99
sys 0.21

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/31670010/ft1_filtered_4FGL_J1640.4+3945_weekly_bin936.fits evtable="EVENTS" scfile=/lscratch/kocevski/31670010/ft2_4FGL_J1640.4+3945_weekly_bin936.fits sctable="SC_DATA" expcube=/lscratch/kocevski/31670010/ltcube_805075201_805680001_4FGL_J1640.4+3945_weekly_bin936.fits outfile=/lscratch/kocevski/31670010/expmap_805075201_805680001_4FGL_J1640.4+3945_weekly_bin936.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/31670010/ltcube_805075201_805680001_4FGL_J1640.4+3945_weekly_bin936.fits
.....................!
real 59.85
user 55.57
sys 3.56

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
Added 205 point sources and 0 extended sources

Setting source of interest to:
4FGL J1640.4+3945 @ 250.119 39.7626

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/31670010/ft1_filtered_4FGL_J1640.4+3945_weekly_bin936.fits scfile=/lscratch/kocevski/31670010/ft2_4FGL_J1640.4+3945_weekly_bin936.fits outfile=/lscratch/kocevski/31670010/cmap_805075201_805680001_4FGL_J1640.4+3945_weekly_bin936.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=250.119 yref=39.7626 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.79
user 0.21
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/31670010/ft1_filtered_4FGL_J1640.4+3945_weekly_bin936.fits scfile=/lscratch/kocevski/31670010/ft2_4FGL_J1640.4+3945_weekly_bin936.fits outfile=/lscratch/kocevski/31670010/cmap_HighResolution_805075201_805680001_4FGL_J1640.4+3945_weekly_bin936.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=250.119 yref=39.7626 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.78
user 0.22
sys 0.13

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/31670010/ft1_filtered_4FGL_J1640.4+3945_weekly_bin936.fits evtable="EVENTS" scfile=/lscratch/kocevski/31670010/ft2_4FGL_J1640.4+3945_weekly_bin936.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/31670010/Model_4FGL_J1640.4+3945_weekly_bin936.xml irfs="P8R3_SOURCE_V2" evclsmin=0 evclass="INDEF" evtype="INDEF" convert=yes chatter=2 clobber=yes debug=no gui=no mode="ql"

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

adding source EG_v02
adding source GAL_V02
Working on...
/lscratch/kocevski/31669711/ft1_filtered_4FGL_J1640.4+3945_weekly_bin936.fits.....................!
real 37.36
user 36.06
sys 0.51

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/31669711/ft1_filtered_4FGL_J1640.4+3945_weekly_bin936.fits', '/lscratch/kocevski/31669711/ft2_4FGL_J1640.4+3945_weekly_bin936.fits', expMap='/lscratch/kocevski/31669711/expmap_805075201_805680001_4FGL_J1640.4+3945_weekly_bin936.fits', expCube='/lscratch/kocevski/31669711/ltcube_805075201_805680001_4FGL_J1640.4+3945_weekly_bin936.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/31669711/Model_4FGL_J1640.4+3945_weekly_bin936.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1640.4+3945'

4FGL J1640.4+3945
   Spectrum: PowerLaw
308    Prefactor:  1.345e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-12)
309        Index:  2.421e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
310        Scale:  1.366e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/31669711/ft1_filtered_4FGL_J1640.4+3945_weekly_bin936.fits
Spacecraft file(s): /lscratch/kocevski/31669711/ft2_4FGL_J1640.4+3945_weekly_bin936.fits
Exposure map: /lscratch/kocevski/31669711/expmap_805075201_805680001_4FGL_J1640.4+3945_weekly_bin936.fits
Exposure cube: /lscratch/kocevski/31669711/ltcube_805075201_805680001_4FGL_J1640.4+3945_weekly_bin936.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/31669711/Model_4FGL_J1640.4+3945_weekly_bin936.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) = 16393.277327

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    3.9574       1.0000          .0000       .10000E+07
     2 'Prefactor '    14.257       1.0000          .0000       .10000E+07
     3 'Prefactor '    1.5382       1.0000          .0000       .10000E+07
     4 'Prefactor '    .31347E-04   1.0000          .0000       .10000E+07
     5 'Prefactor '    .75870E-02   1.0000          .0000       .10000E+07
     6 'Prefactor '    .16176E-03   1.0000          .0000       .10000E+07
     7 'norm      '    .12490E-07   1.0000          .0000       .10000E+07
     8 'norm      '    .59607E-04   1.0000          .0000       .10000E+07
     9 'Prefactor '    .28196E-01   1.0000          .0000       .10000E+07
    10 'Prefactor '    .55235E-02   1.0000          .0000       .10000E+07
    11 'norm      '    .66908E-02   1.0000          .0000       .10000E+07
    12 'Prefactor '    3.7800       1.0000          .0000       .10000E+07
    13 'Prefactor '    .21715       1.0000          .0000       .10000E+07
    14 'Prefactor '    2.9149       1.0000          .0000       .10000E+07
    15 'Prefactor '    .31550       1.0000          .0000       .10000E+07
    16 'norm      '    3.5028       1.0000          .0000       .10000E+07
    17 'norm      '    .35826       1.0000          .0000       .10000E+07
    18 'Prefactor '    .19983E-03   1.0000          .0000       .10000E+07
    19 'norm      '    .60187E-01   1.0000          .0000       .10000E+07
    20 'norm      '    .37719       1.0000          .0000       .10000E+07
    21 'norm      '    .80253       1.0000          .0000       .10000E+07
    22 'norm      '    2.6833       1.0000          .0000       .10000E+07
    23 'Prefactor '    5.5719       1.0000          .0000       .10000E+07
    24 'Normalizat'    .94392       1.0000         .10000E-01   10.000    
    25 'Prefactor '    .95898       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
  outfile=/lscratch/kocevski/31669995/ltcube_805075201_805680001_4FGL_J1640.4+3945_weekly_bin936.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/31669995/ft2_4FGL_J1640.4+3945_weekly_bin936.fits
.....................!
real 15.74
user 15.12
sys 0.20

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/31669995/ft1_filtered_4FGL_J1640.4+3945_weekly_bin936.fits evtable="EVENTS" scfile=/lscratch/kocevski/31669995/ft2_4FGL_J1640.4+3945_weekly_bin936.fits sctable="SC_DATA" expcube=/lscratch/kocevski/31669995/ltcube_805075201_805680001_4FGL_J1640.4+3945_weekly_bin936.fits outfile=/lscratch/kocevski/31669995/expmap_805075201_805680001_4FGL_J1640.4+3945_weekly_bin936.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/31669995/ltcube_805075201_805680001_4FGL_J1640.4+3945_weekly_bin936.fits
.....................!
real 59.64
user 55.61
sys 3.42

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
Added 205 point sources and 0 extended sources

Setting source of interest to:
4FGL J1640.4+3945 @ 250.119 39.7626

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/31669995/ft1_filtered_4FGL_J1640.4+3945_weekly_bin936.fits scfile=/lscratch/kocevski/31669995/ft2_4FGL_J1640.4+3945_weekly_bin936.fits outfile=/lscratch/kocevski/31669995/cmap_805075201_805680001_4FGL_J1640.4+3945_weekly_bin936.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=250.119 yref=39.7626 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.83
user 0.20
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/31669995/ft1_filtered_4FGL_J1640.4+3945_weekly_bin936.fits scfile=/lscratch/kocevski/31669995/ft2_4FGL_J1640.4+3945_weekly_bin936.fits outfile=/lscratch/kocevski/31669995/cmap_HighResolution_805075201_805680001_4FGL_J1640.4+3945_weekly_bin936.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=250.119 yref=39.7626 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.84
user 0.20
sys 0.13

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/31669995/ft1_filtered_4FGL_J1640.4+3945_weekly_bin936.fits evtable="EVENTS" scfile=/lscratch/kocevski/31669995/ft2_4FGL_J1640.4+3945_weekly_bin936.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/31669995/Model_4FGL_J1640.4+3945_weekly_bin936.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 sourc**   17 **MINIMIZE    .6620E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   16393.28     FROM MIGRAD    STATUS=CONVERGED    149 CALLS     3210 TOTAL
                     EDM=   .12E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.0%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     3.9544        1.0384        .48069E-08   -.89150E-02
   2  Prefactor     14.207        1.7042       -.98317E-08    .89665E-01
   3  Prefactor     1.5402        1.2052        .34762E-07   -.20583E-03
   4  Prefactor     .55511E-10    1.0873       -.85875E-09** at limit **
   5  Prefactor     .36970E-07    7.8612        .66450E-07** at limit **
   6  Prefactor     .55511E-10    2.2100        .13279E-06** at limit **
   7  norm           .0000        .21402E-01    .90775E-08** at limit **
   8  norm          .55511E-10    2.5823        .36430E-06** at limit **
   9  Prefactor     .44187E-07    8.0264       -.36975E-06** at limit **
  10  Prefactor     .52791E-07    7.5516        .56992E-07** at limit **
  11  norm          .28588E-07    11.879        .50765E-07** at limit **
  12  Prefactor     3.7805        1.1918       -.34752E-07    .12891E-02
  13  Prefactor     .21659        1.2608        .49585E-07** at limit **
  14  Prefactor     2.9141        1.5817       -.62306E-07    .23930E-02
  15  Prefactor     .31551        1.2310       -.29341E-06    .19224E-02
  16  norm          3.5028        1.0109       -.85534E-08    .44567E-04
  17  norm          .35826        .40458        .10686E-07   -.20351E-02
  18  Prefactor      .0000        2.0385        .18634E-06** at limit **
  19  norm          .60286E-01    .24121       -.79324E-07** at limit **
  20  norm          .38348        3.5363       -.25687E-06    .90320E-02
  21  norm          .80167        .78800       -.17727E-08   -.52099E-03
  22  norm          2.6836        2.7426       -.14604E-07    .19768E-02
  23  Prefactor     5.6748        2.6844        .24286E-07   -.84777E-01
  24  Normalizat    .94417        .13092        .21900E-05   -.66300E-04
  25  Prefactor     .95889        .11007       -.44341E-06   -.36946E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 3.9544
  Prefactor  = 14.2073
  Prefactor  = 1.54019
  Prefactor  = 5.55112e-11
  Prefactor  = 3.69704e-08
  Prefactor  = 5.55112e-11
  norm       = 0
  norm       = 5.55112e-11
  Prefactor  = 4.41869e-08
  Prefactor  = 5.27911e-08
  norm       = 2.85882e-08
  Prefactor  = 3.78045
  Prefactor  = 0.216586
  Prefactor  = 2.91405
  Prefactor  = 0.315515
  norm       = 3.50281
  norm       = 0.35826
  Prefactor  = 0
  norm       = 0.0602862
  norm       = 0.383484
  norm       = 0.801674
  norm       = 2.68362
  Prefactor  = 5.6748
  Normalizat = 0.944171
  Prefactor  = 0.95889
e GAL_V02
Working on...
/lscratch/kocevski/31669789/ft1_filtered_4FGL_J1640.4+3945_weekly_bin936.fits.....................!
real 43.13
user 41.35
sys 1.26

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/31669789/ft1_filtered_4FGL_J1640.4+3945_weekly_bin936.fits', '/lscratch/kocevski/31669789/ft2_4FGL_J1640.4+3945_weekly_bin936.fits', expMap='/lscratch/kocevski/31669789/expmap_805075201_805680001_4FGL_J1640.4+3945_weekly_bin936.fits', expCube='/lscratch/kocevski/31669789/ltcube_805075201_805680001_4FGL_J1640.4+3945_weekly_bin936.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/31669789/Model_4FGL_J1640.4+3945_weekly_bin936.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1640.4+3945'

4FGL J1640.4+3945
   Spectrum: PowerLaw
308    Prefactor:  1.345e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-12)
309        Index:  2.421e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
310        Scale:  1.366e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/31669789/ft1_filtered_4FGL_J1640.4+3945_weekly_bin936.fits
Spacecraft file(s): /lscratch/kocevski/31669789/ft2_4FGL_J1640.4+3945_weekly_bin936.fits
Exposure map: /lscratch/kocevski/31669789/expmap_805075201_805680001_4FGL_J1640.4+3945_weekly_bin936.fits
Exposure cube: /lscratch/kocevski/31669789/ltcube_805075201_805680001_4FGL_J1640.4+3945_weekly_bin936.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/31669789/Model_4FGL_J1640.4+3945_weekly_bin936.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) = 16393.277327

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    3.9574       1.0000          .0000       .10000E+07
     2 'Prefactor '    14.257       1.0000          .0000       .10000E+07
     3 'Prefactor '    1.5382       1.0000          .0000       .10000E+07
     4 'Prefactor '    .31347E-04   1.0000          .0000       .10000E+07
     5 'Prefactor '    .75870E-02   1.0000          .0000       .10000E+07
     6 'Prefactor '    .16176E-03   1.0000          .0000       .10000E+07
     7 'norm      '    .12490E-07   1.0000          .0000       .10000E+07
     8 'norm      '    .59607E-04   1.0000          .0000       .10000E+07
     9 'Prefactor '    .28196E-01   1.0000          .0000       .10000E+07
    10 'Prefactor '    .55235E-02   1.0000          .0000       .10000E+07
    11 'norm      '    .66908E-02   1.0000          .0000       .10000E+07
    12 'Prefactor '    3.7800       1.0000          .0000       .10000E+07
    13 'Prefactor '    .21715       1.0000          .0000       .10000E+07
    14 'Prefactor '    2.9149       1.0000          .0000       .10000E+07
    15 'Prefactor '    .31550       1.0000          .0000       .10000E+07
    16 'norm      '    3.5028       1.0000          .0000       .10000E+07
    17 'norm      '    .35826       1.0000          .0000       .10000E+07
    18 'Prefactor '    .19983E-03   1.0000          .0000       .10000E+07
    19 'norm      '    .60187E-01   1.0000          .0000       .10000E+07
    20 'norm      '    .37719       1.0000          .0000       .10000E+07
    21 'norm      '    .80253       1.0000          .0000       .10000E+07
    22 'norm      '    2.6833       1.0000          .0000       .10000E+07
    23 'Prefactor '    5.5719       1.0000          .0000       .10000E+07
    24 'Normalizat'    .94392       1.0000         .10000E-01   10.000    
    25 'Prefactor '    .95898       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
  **********
 **   18 **HESSE 
 **********

 FCN=   16393.28     FROM HESSE     STATUS=OK           513 CALLS     3723 TOTAL
                     EDM=   .24E-05    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     3.9544        6.7867        .50681E-03   -1.5668    
   2  Prefactor     14.207        46.065        .26501E-03   -1.5633    
   3  Prefactor     1.5402        1.2082        .85956E-03   -1.5683    
   4  Prefactor     .55511E-10    1.0849        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .36970E-07    7.8614        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .55511E-10    .54060        .42118E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  norm           .0000        .16090E-01    .77471E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .55511E-10    2.5829        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .44187E-07    2.6078        .11179E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .52791E-07    1.0679        .42118E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  norm          .28588E-07    11.882        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     3.7805        1.4488        .51899E-03   -1.5669    
  13  Prefactor     .21659        1.1153        .23230E-02   -1.5699    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     2.9141        1.6093        .59481E-03   -1.5674    
  15  Prefactor     .31551        .92887        .33948E-02   -1.5697    
  16  norm          3.5028        1.0349        .53996E-04   -1.5671    
  17  norm          .35826        .44254        .19318E-02   -1.5696    
  18  Prefactor      .0000        2.0314        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  norm          .60286E-01    .16970        .22502E-02   -1.5703    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  norm          .38348        1.9049        .62571E-02   -1.5696    
  21  norm          .80167        .79666        .52746E-03   -1.5690    
  22  norm          2.6836        2.9729        .62177E-03   -1.5675    
  23  Prefactor     5.6748        40.043        .42537E-03   -1.5660    
  24  Normalizat    .94417        .11379        .45460E-01   -.94925    
  25  Prefactor     .95889        .91899E-01    .45752E-01   -.94113    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.38706e-06
Minuit parameter uncertainties:
  1  6.78668
  2  46.0659
  3  1.20818
  4  1.62754e-05
  5  0.00107862
  6  1.10091e-05
  7  1.15938e-08
  8  2.92941e-05
  9  0.000678937
  10  0.000474976
  11  0.00116511
  12  1.44877
  13  0.982967
  14  1.60928
  15  0.92887
  16  1.03495
  17  0.442536
  18  5.89594e-07
  19  0.169698
  20  1.70938
  21  0.796662
  22  2.97287
  23  30.1489
  24  0.113815
  25  0.0919142
e GAL_V02
Working on...
/lscratch/kocevski/31669790/ft1_filtered_4FGL_J1640.4+3945_weekly_bin936.fits.....................!
real 43.31
user 41.51
sys 1.16

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/31669790/ft1_filtered_4FGL_J1640.4+3945_weekly_bin936.fits', '/lscratch/kocevski/31669790/ft2_4FGL_J1640.4+3945_weekly_bin936.fits', expMap='/lscratch/kocevski/31669790/expmap_805075201_805680001_4FGL_J1640.4+3945_weekly_bin936.fits', expCube='/lscratch/kocevski/31669790/ltcube_805075201_805680001_4FGL_J1640.4+3945_weekly_bin936.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/31669790/Model_4FGL_J1640.4+3945_weekly_bin936.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1640.4+3945'

4FGL J1640.4+3945
   Spectrum: PowerLaw
308    Prefactor:  1.345e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-12)
309        Index:  2.421e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
310        Scale:  1.366e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/31669790/ft1_filtered_4FGL_J1640.4+3945_weekly_bin936.fits
Spacecraft file(s): /lscratch/kocevski/31669790/ft2_4FGL_J1640.4+3945_weekly_bin936.fits
Exposure map: /lscratch/kocevski/31669790/expmap_805075201_805680001_4FGL_J1640.4+3945_weekly_bin936.fits
Exposure cube: /lscratch/kocevski/31669790/ltcube_805075201_805680001_4FGL_J1640.4+3945_weekly_bin936.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/31669790/Model_4FGL_J1640.4+3945_weekly_bin936.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) = 16393.277327

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    3.9574       1.0000          .0000       .10000E+07
     2 'Prefactor '    14.257       1.0000          .0000       .10000E+07
     3 'Prefactor '    1.5382       1.0000          .0000       .10000E+07
     4 'Prefactor '    .31347E-04   1.0000          .0000       .10000E+07
     5 'Prefactor '    .75870E-02   1.0000          .0000       .10000E+07
     6 'Prefactor '    .16176E-03   1.0000          .0000       .10000E+07
     7 'norm      '    .12490E-07   1.0000          .0000       .10000E+07
     8 'norm      '    .59607E-04   1.0000          .0000       .10000E+07
     9 'Prefactor '    .28196E-01   1.0000          .0000       .10000E+07
    10 'Prefactor '    .55235E-02   1.0000          .0000       .10000E+07
    11 'norm      '    .66908E-02   1.0000          .0000       .10000E+07
    12 'Prefactor '    3.7800       1.0000          .0000       .10000E+07
    13 'Prefactor '    .21715       1.0000          .0000       .10000E+07
    14 'Prefactor '    2.9149       1.0000          .0000       .10000E+07
    15 'Prefactor '    .31550       1.0000          .0000       .10000E+07
    16 'norm      '    3.5028       1.0000          .0000       .10000E+07
    17 'norm      '    .35826       1.0000          .0000       .10000E+07
    18 'Prefactor '    .19983E-03   1.0000          .0000       .10000E+07
    19 'norm      '    .60187E-01   1.0000          .0000       .10000E+07
    20 'norm      '    .37719       1.0000          .0000       .10000E+07
    21 'norm      '    .80253       1.0000          .0000       .10000E+07
    22 'norm      '    2.6833       1.0000          .0000       .10000E+07
    23 'Prefactor '    5.5719       1.0000          .0000       .10000E+07
    24 'Normalizat'    .94392       1.0000         .10000E-01   10.000    
    25 'Prefactor '    .95898       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6620E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   16393.28     FROM MIGRAD    STATUS=CONVERGED    149 CALLS     3210 TOTAL
                     EDM=   .12E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.0%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     3.9544        1.0384        .48069E-08   -.89150E-02
   2  Prefactor     14.207        1.7042       -.98317E-08    .89665E-01
   3  Prefactor     1.5402        1.2052        .34762E-07   -.20583E-03
   4  Prefactor     .55511E-10    1.0873       -.85875E-09** at limit **
   5  Prefactor     .36970E-07    7.8612        .66450E-07** at limit **
   6  Prefactor     .55511E-10    2.2100        .13279E-06** at limit **
   7  norm           .0000        .21402E-01    .90775E-08** at limit **
   8  norm          .55511E-10    2.5823        .36430E-06** at limit **
   9  Prefactor     .44187E-07    8.0264       -.36975E-06** at limit **
  10  Prefactor     .52791E-07    7.5516        .56992E-07** at limit **
  11  norm          .28588E-07    11.879        .50765E-07** at limit **
  12  Prefactor     3.7805        1.1918       -.34752E-07    .12891E-02
  13  Prefactor     .21659        1.2608        .49585E-07** at limit **
  14  Prefactor     2.9141        1.5817       -.62306E-07    .23930E-02
  15  Prefactor     .31551        1.2310       -.29341E-06    .19224E-02
  16  norm          3.5028        1.0109       -.85534E-08    .44567E-04
  17  norm          .35826        .40458        .10686E-07   -.20351E-02
  18  Prefactor      .0000        2.0385        .18634E-06** at limit **
  19  norm          .60286E-01    .24121       -.79324E-07** at limit **
  20  norm          .38348        3.5363       -.25687E-06    .90320E-02
  21  norm          .80167        .78800       -.17727E-08   -.52099E-03
  22  norm          2.6836        2.7426       -.14604E-07    .19768E-02
  23  Prefactor     5.6748        2.6844        .24286E-07   -.84777E-01
  24  Normalizat    .94417        .13092        .21900E-05   -.66300E-04
  25  Prefactor     .95889        .11007       -.44341E-06   -.36946E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 3.9544
  Prefactor  = 14.2073
  Prefactor  = 1.54019
  Prefactor  = 5.55112e-11
  Prefactor  = 3.69704e-08
  Prefactor  = 5.55112e-11
  norm       = 0
  norm       = 5.55112e-11
  Prefactor  = 4.41869e-08
  Prefactor  = 5.27911e-08
  norm       = 2.85882e-08
  Prefactor  = 3.78045
  Prefactor  = 0.216586
  Prefactor  = 2.91405
  Prefactor  = 0.315515
  norm       = 3.50281
  norm       = 0.35826
  Prefactor  = 0
  norm       = 0.0602862
  norm       = 0.383484
  norm       = 0.801674
  norm       = 2.68362
  Prefactor  = 5.6748
  Normalizat = 0.944171
  Prefactor  = 0.95889
Done.

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

Extracting fit parameters...

4FGL J1640.4+3945
   Spectrum: PowerLaw
308    Prefactor:  3.780e+00  1.449e+00  0.000e+00  1.000e+06 ( 1.000e-12)
309        Index:  2.421e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
310        Scale:  1.366e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
659    Prefactor:  9.589e-01  9.191e-02  0.000e+00  1.000e+01 ( 1.000e+00)
660        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
661        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
658   Normalization:  9.442e-01  1.138e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 64.94
Ra Dec: 250.119 39.763
Photon Index (Fixed Index): 2.42 +/- 0.00
Photon Flux (Fixed Index): 1.49e-07 +/- 5.72e-08
Energy Flux (Fixed Index): 4.76e-05 +/- 1.82e-05

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) = 16391.656719
delta logL = 1.61989154678

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 16391.656683
delta logL = 1.61992748253

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   16391.66     FROM MIGRAD    STATUS=CONVERGED     51 CALLS      233 TOTAL
                     EDM=   .13E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     5.5079        14.694        .42789E-03    .20222E-02
   2  Index         2.1259        1.5241        .81194E-01    .32941E-03
   3  Normalizat    .97374        .81765E-01    .45837E-01    .36453E-04
   4  Prefactor     .94144        .55010E-01    .45531E-01    .24317E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 5.50794
  Index      = 2.12593
  Normalizat = 0.973737
  Prefactor  = 0.941438
 **********
 **   18 **HESSE 
 **********

 FCN=   16391.66     FROM HESSE     STATUS=OK            33 CALLS      266 TOTAL
                     EDM=   .44E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     5.5079        1.4195        .56345E-05   -1.5661    
   2  Index         2.1259        .16003        .34068E-02   -.61238    
   3  Normalizat    .97374        .12921        .24860E-03   -.93916    
   4  Prefactor     .94144        .10935        .21491E-03   -.94708    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.41683e-12
Minuit parameter uncertainties:
  1  1.4195
  2  0.160069
  3  0.129251
  4  0.109377
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) = 16391.6566826
delta logL = 1.61992785766

Extracting fit parameters...

4FGL J1640.4+3945
   Spectrum: PowerLaw
308    Prefactor:  5.508e+00  1.420e+00  0.000e+00  1.000e+06 ( 1.000e-12)
309        Index:  2.126e+00  1.601e-01  0.000e+00  1.000e+01 (-1.000e+00)
310        Scale:  1.366e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
659    Prefactor:  9.414e-01  1.094e-01  0.000e+00  1.000e+01 ( 1.000e+00)
660        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
661        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
658   Normalization:  9.737e-01  1.293e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 68.70
Ra Dec: 250.119 39.763
Photon Index (Free Index): 2.13 +/- 0.16
Photon Flux (Free Index): 1.27e-07 +/- 2.83e-08
Energy Flux (Free Index): 6.59e-05 +/- 1.95e-05

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/31669711/cmap_HighResolution_805075201_805680001_4FGL_J1640.4+3945_weekly_bin936.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='1.49e-07', energy_flux2='6.59e-05', photon_flux_error='5.72e-08', dlogl='1.62e+00', energy_flux='4.76e-05', photon_flux2='1.27e-07', job_status='DONE', time_completed='2026-07-14 14:07:57.388941', photon_index_error2='0.16', photon_index2='2.13', ts='64.94', fit_tolerance='1e-08', GAL='0.96', photon_index_error='0.00', energy_flux_error2='1.95e-05', EG='0.94', time_epoch_completed='1784063277.39', return_code='0', job_id='31669711', GAL2='0.94', EG2='0.97', return_code2='0', energy_flux_error='1.82e-05', photon_flux_error2='2.83e-08', ts2='68.70', photon_index='2.42' WHERE bin_id='936' AND source_name='4FGL J1640.4+3945' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Jul 14 14:07:57 PDT 2026

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   16393.28     FROM MIGRAD    STATUS=CONVERGED    149 CALLS     3210 TOTAL
                     EDM=   .12E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.0%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     3.9544        1.0384        .48069E-08   -.89150E-02
   2  Prefactor     14.207        1.7042       -.98317E-08    .89665E-01
   3  Prefactor     1.5402        1.2052        .34762E-07   -.20583E-03
   4  Prefactor     .55511E-10    1.0873       -.85875E-09** at limit **
   5  Prefactor     .36970E-07    7.8612        .66450E-07** at limit **
   6  Prefactor     .55511E-10    2.2100        .13279E-06** at limit **
   7  norm           .0000        .21402E-01    .90775E-08** at limit **
   8  norm          .55511E-10    2.5823        .36430E-06** at limit **
   9  Prefactor     .44187E-07    8.0264       -.36975E-06** at limit **
  10  Prefactor     .52791E-07    7.5516        .56992E-07** at limit **
  11  norm          .28588E-07    11.879        .50765E-07** at limit **
  12  Prefactor     3.7805        1.1918       -.34752E-07    .12891E-02
  13  Prefactor     .21659        1.2608        .49585E-07** at limit **
  14  Prefactor     2.9141        1.5817       -.62306E-07    .23930E-02
  15  Prefactor     .31551        1.2310       -.29341E-06    .19224E-02
  16  norm          3.5028        1.0109       -.85534E-08    .44567E-04
  17  norm          .35826        .40458        .10686E-07   -.20351E-02
  18  Prefactor      .0000        2.0385        .18634E-06** at limit **
  19  norm          .60286E-01    .24121       -.79324E-07** at limit **
  20  norm          .38348        3.5363       -.25687E-06    .90320E-02
  21  norm          .80167        .78800       -.17727E-08   -.52099E-03
  22  norm          2.6836        2.7426       -.14604E-07    .19768E-02
  23  Prefactor     5.6748        2.6844        .24286E-07   -.84777E-01
  24  Normalizat    .94417        .13092        .21900E-05   -.66300E-04
  25  Prefactor     .95889        .11007       -.44341E-06   -.36946E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 3.9544
  Prefactor  = 14.2073
  Prefactor  = 1.54019
  Prefactor  = 5.55112e-11
  Prefactor  = 3.69704e-08
  Prefactor  = 5.55112e-11
  norm       = 0
  norm       = 5.55112e-11
  Prefactor  = 4.41869e-08
  Prefactor  = 5.27911e-08
  norm       = 2.85882e-08
  Prefactor  = 3.78045
  Prefactor  = 0.216586
  Prefactor  = 2.91405
  Prefactor  = 0.315515
  norm       = 3.50281
  norm       = 0.35826
  Prefactor  = 0
  norm       = 0.0602862
  norm       = 0.383484
  norm       = 0.801674
  norm       = 2.68362
  Prefactor  = 5.6748
  Normalizat = 0.944171
  Prefactor  = 0.95889
 **********
 **   18 **HESSE 
 **********

 FCN=   16393.28     FROM HESSE     STATUS=OK           513 CALLS     3723 TOTAL
                     EDM=   .24E-05    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     3.9544        6.7867        .50681E-03   -1.5668    
   2  Prefactor     14.207        46.065        .26501E-03   -1.5633    
   3  Prefactor     1.5402        1.2082        .85956E-03   -1.5683    
   4  Prefactor     .55511E-10    1.0849        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .36970E-07    7.8614        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .55511E-10    .54060        .42118E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  norm           .0000        .16090E-01    .77471E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .55511E-10    2.5829        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .44187E-07    2.6078        .11179E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .52791E-07    1.0679        .42118E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  norm          .28588E-07    11.882        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     3.7805        1.4488        .51899E-03   -1.5669    
  13  Prefactor     .21659        1.1153        .23230E-02   -1.5699    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     2.9141        1.6093        .59481E-03   -1.5674    
  15  Prefactor     .31551        .92887        .33948E-02   -1.5697    
  16  norm          3.5028        1.0349        .53996E-04   -1.5671    
  17  norm          .35826        .44254        .19318E-02   -1.5696    
  18  Prefactor      .0000        2.0314        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  norm          .60286E-01    .16970        .22502E-02   -1.5703    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  norm          .38348        1.9049        .62571E-02   -1.5696    
  21  norm          .80167        .79666        .52746E-03   -1.5690    
  22  norm          2.6836        2.9729        .62177E-03   -1.5675    
  23  Prefactor     5.6748        40.043        .42537E-03   -1.5660    
  24  Normalizat    .94417        .11379        .45460E-01   -.94925    
  25  Prefactor     .95889        .91899E-01    .45752E-01   -.94113    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.38706e-06
Minuit parameter uncertainties:
  1  6.78668
  2  46.0659
  3  1.20818
  4  1.62754e-05
  5  0.00107862
  6  1.10091e-05
  7  1.15938e-08
  8  2.92941e-05
  9  0.000678937
  10  0.000474976
  11  0.00116511
  12  1.44877
  13  0.982967
  14  1.60928
  15  0.92887
  16  1.03495
  17  0.442536
  18  5.89594e-07
  19  0.169698
  20  1.70938
  21  0.796662
  22  2.97287
  23  30.1489
  24  0.113815
  25  0.0919142
 **********
 **   18 **HESSE 
 **********

 FCN=   16393.28     FROM HESSE     STATUS=OK           513 CALLS     3723 TOTAL
                     EDM=   .24E-05    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     3.9544        6.7867        .50681E-03   -1.5668    
   2  Prefactor     14.207        46.065        .26501E-03   -1.5633    
   3  Prefactor     1.5402        1.2082        .85956E-03   -1.5683    
   4  Prefactor     .55511E-10    1.0849        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .36970E-07    7.8614        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .55511E-10    .54060        .42118E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  norm           .0000        .16090E-01    .77471E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .55511E-10    2.5829        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .44187E-07    2.6078        .11179E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .52791E-07    1.0679        .42118E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  norm          .28588E-07    11.882        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     3.7805        1.4488        .51899E-03   -1.5669    
  13  Prefactor     .21659        1.1153        .23230E-02   -1.5699    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     2.9141        1.6093        .59481E-03   -1.5674    
  15  Prefactor     .31551        .92887        .33948E-02   -1.5697    
  16  norm          3.5028        1.0349        .53996E-04   -1.5671    
  17  norm          .35826        .44254        .19318E-02   -1.5696    
  18  Prefactor      .0000        2.0314        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  norm          .60286E-01    .16970        .22502E-02   -1.5703    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  norm          .38348        1.9049        .62571E-02   -1.5696    
  21  norm          .80167        .79666        .52746E-03   -1.5690    
  22  norm          2.6836        2.9729        .62177E-03   -1.5675    
  23  Prefactor     5.6748        40.043        .42537E-03   -1.5660    
  24  Normalizat    .94417        .11379        .45460E-01   -.94925    
  25  Prefactor     .95889        .91899E-01    .45752E-01   -.94113    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.38706e-06
Minuit parameter uncertainties:
  1  6.78668
  2  46.0659
  3  1.20818
  4  1.62754e-05
  5  0.00107862
  6  1.10091e-05
  7  1.15938e-08
  8  2.92941e-05
  9  0.000678937
  10  0.000474976
  11  0.00116511
  12  1.44877
  13  0.982967
  14  1.60928
  15  0.92887
  16  1.03495
  17  0.442536
  18  5.89594e-07
  19  0.169698
  20  1.70938
  21  0.796662
  22  2.97287
  23  30.1489
  24  0.113815
  25  0.0919142
Done.

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

Extracting fit parameters...

4FGL J1640.4+3945
   Spectrum: PowerLaw
308    Prefactor:  3.780e+00  1.449e+00  0.000e+00  1.000e+06 ( 1.000e-12)
309        Index:  2.421e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
310        Scale:  1.366e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
659    Prefactor:  9.589e-01  9.191e-02  0.000e+00  1.000e+01 ( 1.000e+00)
660        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
661        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
658   Normalization:  9.442e-01  1.138e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 64.94
Ra Dec: 250.119 39.763
Photon Index (Fixed Index): 2.42 +/- 0.00
Photon Flux (Fixed Index): 1.49e-07 +/- 5.72e-08
Energy Flux (Fixed Index): 4.76e-05 +/- 1.82e-05

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) = 16391.656719
delta logL = 1.61989154678

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 16391.656683
delta logL = 1.61992748253

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   16391.66     FROM MIGRAD    STATUS=CONVERGED     51 CALLS      233 TOTAL
                     EDM=   .13E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     5.5079        14.694        .42789E-03    .20222E-02
   2  Index         2.1259        1.5241        .81194E-01    .32941E-03
   3  Normalizat    .97374        .81765E-01    .45837E-01    .36453E-04
   4  Prefactor     .94144        .55010E-01    .45531E-01    .24317E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 5.50794
  Index      = 2.12593
  Normalizat = 0.973737
  Prefactor  = 0.941438
 **********
 **   18 **HESSE 
 **********

 FCN=   16391.66     FROM HESSE     STATUS=OK            33 CALLS      266 TOTAL
                     EDM=   .44E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     5.5079        1.4195        .56345E-05   -1.5661    
   2  Index         2.1259        .16003        .34068E-02   -.61238    
   3  Normalizat    .97374        .12921        .24860E-03   -.93916    
   4  Prefactor     .94144        .10935        .21491E-03   -.94708    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.41683e-12
Minuit parameter uncertainties:
  1  1.4195
  2  0.160069
  3  0.129251
  4  0.109377
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) = 16391.6566826
delta logL = 1.61992785766

Extracting fit parameters...

4FGL J1640.4+3945
   Spectrum: PowerLaw
308    Prefactor:  5.508e+00  1.420e+00  0.000e+00  1.000e+06 ( 1.000e-12)
309        Index:  2.126e+00  1.601e-01  0.000e+00  1.000e+01 (-1.000e+00)
310        Scale:  1.366e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
659    Prefactor:  9.414e-01  1.094e-01  0.000e+00  1.000e+01 ( 1.000e+00)
660        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
661        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
658   Normalization:  9.737e-01  1.293e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 68.70
Ra Dec: 250.119 39.763
Photon Index (Free Index): 2.13 +/- 0.16
Photon Flux (Free Index): 1.27e-07 +/- 2.83e-08
Energy Flux (Free Index): 6.59e-05 +/- 1.95e-05

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/31669789/cmap_HighResolution_805075201_805680001_4FGL_J1640.4+3945_weekly_bin936.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='1.49e-07', energy_flux2='6.59e-05', photon_flux_error='5.72e-08', dlogl='1.62e+00', energy_flux='4.76e-05', photon_flux2='1.27e-07', job_status='DONE', time_completed='2026-07-14 14:09:12.785635', photon_index_error2='0.16', photon_index2='2.13', ts='64.94', fit_tolerance='1e-08', GAL='0.96', photon_index_error='0.00', energy_flux_error2='1.95e-05', EG='0.94', time_epoch_completed='1784063352.79', return_code='0', job_id='31669789', GAL2='0.94', EG2='0.97', return_code2='0', energy_flux_error='1.82e-05', photon_flux_error2='2.83e-08', ts2='68.70', photon_index='2.42' WHERE bin_id='936' AND source_name='4FGL J1640.4+3945' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Jul 14 14:09:13 PDT 2026

Done.

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

Extracting fit parameters...

4FGL J1640.4+3945
   Spectrum: PowerLaw
308    Prefactor:  3.780e+00  1.449e+00  0.000e+00  1.000e+06 ( 1.000e-12)
309        Index:  2.421e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
310        Scale:  1.366e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
659    Prefactor:  9.589e-01  9.191e-02  0.000e+00  1.000e+01 ( 1.000e+00)
660        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
661        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
658   Normalization:  9.442e-01  1.138e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 64.94
Ra Dec: 250.119 39.763
Photon Index (Fixed Index): 2.42 +/- 0.00
Photon Flux (Fixed Index): 1.49e-07 +/- 5.72e-08
Energy Flux (Fixed Index): 4.76e-05 +/- 1.82e-05

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) = 16391.656719
delta logL = 1.61989154678

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 16391.656683
delta logL = 1.61992748253

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   16391.66     FROM MIGRAD    STATUS=CONVERGED     51 CALLS      233 TOTAL
                     EDM=   .13E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     5.5079        14.694        .42789E-03    .20222E-02
   2  Index         2.1259        1.5241        .81194E-01    .32941E-03
   3  Normalizat    .97374        .81765E-01    .45837E-01    .36453E-04
   4  Prefactor     .94144        .55010E-01    .45531E-01    .24317E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 5.50794
  Index      = 2.12593
  Normalizat = 0.973737
  Prefactor  = 0.941438
 **********
 **   18 **HESSE 
 **********

 FCN=   16391.66     FROM HESSE     STATUS=OK            33 CALLS      266 TOTAL
                     EDM=   .44E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     5.5079        1.4195        .56345E-05   -1.5661    
   2  Index         2.1259        .16003        .34068E-02   -.61238    
   3  Normalizat    .97374        .12921        .24860E-03   -.93916    
   4  Prefactor     .94144        .10935        .21491E-03   -.94708    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.41683e-12
Minuit parameter uncertainties:
  1  1.4195
  2  0.160069
  3  0.129251
  4  0.109377
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) = 16391.6566826
delta logL = 1.61992785766

Extracting fit parameters...

4FGL J1640.4+3945
   Spectrum: PowerLaw
308    Prefactor:  5.508e+00  1.420e+00  0.000e+00  1.000e+06 ( 1.000e-12)
309        Index:  2.126e+00  1.601e-01  0.000e+00  1.000e+01 (-1.000e+00)
310        Scale:  1.366e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
659    Prefactor:  9.414e-01  1.094e-01  0.000e+00  1.000e+01 ( 1.000e+00)
660        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
661        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
658   Normalization:  9.737e-01  1.293e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 68.70
Ra Dec: 250.119 39.763
Photon Index (Free Index): 2.13 +/- 0.16
Photon Flux (Free Index): 1.27e-07 +/- 2.83e-08
Energy Flux (Free Index): 6.59e-05 +/- 1.95e-05

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/31669790/cmap_HighResolution_805075201_805680001_4FGL_J1640.4+3945_weekly_bin936.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='1.49e-07', energy_flux2='6.59e-05', photon_flux_error='5.72e-08', dlogl='1.62e+00', energy_flux='4.76e-05', photon_flux2='1.27e-07', job_status='DONE', time_completed='2026-07-14 14:09:21.875061', photon_index_error2='0.16', photon_index2='2.13', ts='64.94', fit_tolerance='1e-08', GAL='0.96', photon_index_error='0.00', energy_flux_error2='1.95e-05', EG='0.94', time_epoch_completed='1784063361.88', return_code='0', job_id='31669790', GAL2='0.94', EG2='0.97', return_code2='0', energy_flux_error='1.82e-05', photon_flux_error2='2.83e-08', ts2='68.70', photon_index='2.42' WHERE bin_id='936' AND source_name='4FGL J1640.4+3945' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Jul 14 14:09:22 PDT 2026

e GAL_V02
Working on...
/lscratch/kocevski/31670010/ft1_filtered_4FGL_J1640.4+3945_weekly_bin936.fits.....................!
real 37.74
user 36.13
sys 0.99

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/31670010/ft1_filtered_4FGL_J1640.4+3945_weekly_bin936.fits', '/lscratch/kocevski/31670010/ft2_4FGL_J1640.4+3945_weekly_bin936.fits', expMap='/lscratch/kocevski/31670010/expmap_805075201_805680001_4FGL_J1640.4+3945_weekly_bin936.fits', expCube='/lscratch/kocevski/31670010/ltcube_805075201_805680001_4FGL_J1640.4+3945_weekly_bin936.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/31670010/Model_4FGL_J1640.4+3945_weekly_bin936.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1640.4+3945'

4FGL J1640.4+3945
   Spectrum: PowerLaw
308    Prefactor:  1.345e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-12)
309        Index:  2.421e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
310        Scale:  1.366e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/31670010/ft1_filtered_4FGL_J1640.4+3945_weekly_bin936.fits
Spacecraft file(s): /lscratch/kocevski/31670010/ft2_4FGL_J1640.4+3945_weekly_bin936.fits
Exposure map: /lscratch/kocevski/31670010/expmap_805075201_805680001_4FGL_J1640.4+3945_weekly_bin936.fits
Exposure cube: /lscratch/kocevski/31670010/ltcube_805075201_805680001_4FGL_J1640.4+3945_weekly_bin936.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/31670010/Model_4FGL_J1640.4+3945_weekly_bin936.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) = 16393.277327

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    3.9574       1.0000          .0000       .10000E+07
     2 'Prefactor '    14.257       1.0000          .0000       .10000E+07
     3 'Prefactor '    1.5382       1.0000          .0000       .10000E+07
     4 'Prefactor '    .31347E-04   1.0000          .0000       .10000E+07
     5 'Prefactor '    .75870E-02   1.0000          .0000       .10000E+07
     6 'Prefactor '    .16176E-03   1.0000          .0000       .10000E+07
     7 'norm      '    .12490E-07   1.0000          .0000       .10000E+07
     8 'norm      '    .59607E-04   1.0000          .0000       .10000E+07
     9 'Prefactor '    .28196E-01   1.0000          .0000       .10000E+07
    10 'Prefactor '    .55235E-02   1.0000          .0000       .10000E+07
    11 'norm      '    .66908E-02   1.0000          .0000       .10000E+07
    12 'Prefactor '    3.7800       1.0000          .0000       .10000E+07
    13 'Prefactor '    .21715       1.0000          .0000       .10000E+07
    14 'Prefactor '    2.9149       1.0000          .0000       .10000E+07
    15 'Prefactor '    .31550       1.0000          .0000       .10000E+07
    16 'norm      '    3.5028       1.0000          .0000       .10000E+07
    17 'norm      '    .35826       1.0000          .0000       .10000E+07
    18 'Prefactor '    .19983E-03   1.0000          .0000       .10000E+07
    19 'norm      '    .60187E-01   1.0000          .0000       .10000E+07
    20 'norm      '    .37719       1.0000          .0000       .10000E+07
    21 'norm      '    .80253       1.0000          .0000       .10000E+07
    22 'norm      '    2.6833       1.0000          .0000       .10000E+07
    23 'Prefactor '    5.5719       1.0000          .0000       .10000E+07
    24 'Normalizat'    .94392       1.0000         .10000E-01   10.000    
    25 'Prefactor '    .95898       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6620E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   16393.28     FROM MIGRAD    STATUS=CONVERGED    149 CALLS     3210 TOTAL
                     EDM=   .12E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.0%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     3.9544        1.0384        .48069E-08   -.89150E-02
   2  Prefactor     14.207        1.7042       -.98317E-08    .89665E-01
   3  Prefactor     1.5402        1.2052        .34762E-07   -.20583E-03
   4  Prefactor     .55511E-10    1.0873       -.85875E-09** at limit **
   5  Prefactor     .36970E-07    7.8612        .66450E-07** at limit **
   6  Prefactor     .55511E-10    2.2100        .13279E-06** at limit **
   7  norm           .0000        .21402E-01    .90775E-08** at limit **
   8  norm          .55511E-10    2.5823        .36430E-06** at limit **
   9  Prefactor     .44187E-07    8.0264       -.36975E-06** at limit **
  10  Prefactor     .52791E-07    7.5516        .56992E-07** at limit **
  11  norm          .28588E-07    11.879        .50765E-07** at limit **
  12  Prefactor     3.7805        1.1918       -.34752E-07    .12891E-02
  13  Prefactor     .21659        1.2608        .49585E-07** at limit **
  14  Prefactor     2.9141        1.5817       -.62306E-07    .23930E-02
  15  Prefactor     .31551        1.2310       -.29341E-06    .19224E-02
  16  norm          3.5028        1.0109       -.85534E-08    .44567E-04
  17  norm          .35826        .40458        .10686E-07   -.20351E-02
  18  Prefactor      .0000        2.0385        .18634E-06** at limit **
  19  norm          .60286E-01    .24121       -.79324E-07** at limit **
  20  norm          .38348        3.5363       -.25687E-06    .90320E-02
  21  norm          .80167        .78800       -.17727E-08   -.52099E-03
  22  norm          2.6836        2.7426       -.14604E-07    .19768E-02
  23  Prefactor     5.6748        2.6844        .24286E-07   -.84777E-01
  24  Normalizat    .94417        .13092        .21900E-05   -.66300E-04
  25  Prefactor     .95889        .11007       -.44341E-06   -.36946E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 3.9544
  Prefactor  = 14.2073
  Prefactor  = 1.54019
  Prefactor  = 5.55112e-11
  Prefactor  = 3.69704e-08
  Prefactor  = 5.55112e-11
  norm       = 0
  norm       = 5.55112e-11
  Prefactor  = 4.41869e-08
  Prefactor  = 5.27911e-08
  norm       = 2.85882e-08
  Prefactor  = 3.78045
  Prefactor  = 0.216586
  Prefactor  = 2.91405
  Prefactor  = 0.315515
  norm       = 3.50281
  norm       = 0.35826
  Prefactor  = 0
  norm       = 0.0602862
  norm       = 0.383484
  norm       = 0.801674
  norm       = 2.68362
  Prefactor  = 5.6748
  Normalizat = 0.944171
  Prefactor  = 0.95889
e GAL_V02
Working on...
/lscratch/kocevski/31669995/ft1_filtered_4FGL_J1640.4+3945_weekly_bin936.fits.....................!
real 38.02
user 36.54
sys 0.82

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/31669995/ft1_filtered_4FGL_J1640.4+3945_weekly_bin936.fits', '/lscratch/kocevski/31669995/ft2_4FGL_J1640.4+3945_weekly_bin936.fits', expMap='/lscratch/kocevski/31669995/expmap_805075201_805680001_4FGL_J1640.4+3945_weekly_bin936.fits', expCube='/lscratch/kocevski/31669995/ltcube_805075201_805680001_4FGL_J1640.4+3945_weekly_bin936.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/31669995/Model_4FGL_J1640.4+3945_weekly_bin936.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1640.4+3945'

4FGL J1640.4+3945
   Spectrum: PowerLaw
308    Prefactor:  1.345e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-12)
309        Index:  2.421e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
310        Scale:  1.366e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/31669995/ft1_filtered_4FGL_J1640.4+3945_weekly_bin936.fits
Spacecraft file(s): /lscratch/kocevski/31669995/ft2_4FGL_J1640.4+3945_weekly_bin936.fits
Exposure map: /lscratch/kocevski/31669995/expmap_805075201_805680001_4FGL_J1640.4+3945_weekly_bin936.fits
Exposure cube: /lscratch/kocevski/31669995/ltcube_805075201_805680001_4FGL_J1640.4+3945_weekly_bin936.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/31669995/Model_4FGL_J1640.4+3945_weekly_bin936.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) = 16393.277327

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    3.9574       1.0000          .0000       .10000E+07
     2 'Prefactor '    14.257       1.0000          .0000       .10000E+07
     3 'Prefactor '    1.5382       1.0000          .0000       .10000E+07
     4 'Prefactor '    .31347E-04   1.0000          .0000       .10000E+07
     5 'Prefactor '    .75870E-02   1.0000          .0000       .10000E+07
     6 'Prefactor '    .16176E-03   1.0000          .0000       .10000E+07
     7 'norm      '    .12490E-07   1.0000          .0000       .10000E+07
     8 'norm      '    .59607E-04   1.0000          .0000       .10000E+07
     9 'Prefactor '    .28196E-01   1.0000          .0000       .10000E+07
    10 'Prefactor '    .55235E-02   1.0000          .0000       .10000E+07
    11 'norm      '    .66908E-02   1.0000          .0000       .10000E+07
    12 'Prefactor '    3.7800       1.0000          .0000       .10000E+07
    13 'Prefactor '    .21715       1.0000          .0000       .10000E+07
    14 'Prefactor '    2.9149       1.0000          .0000       .10000E+07
    15 'Prefactor '    .31550       1.0000          .0000       .10000E+07
    16 'norm      '    3.5028       1.0000          .0000       .10000E+07
    17 'norm      '    .35826       1.0000          .0000       .10000E+07
    18 'Prefactor '    .19983E-03   1.0000          .0000       .10000E+07
    19 'norm      '    .60187E-01   1.0000          .0000       .10000E+07
    20 'norm      '    .37719       1.0000          .0000       .10000E+07
    21 'norm      '    .80253       1.0000          .0000       .10000E+07
    22 'norm      '    2.6833       1.0000          .0000       .10000E+07
    23 'Prefactor '    5.5719       1.0000          .0000       .10000E+07
    24 'Normalizat'    .94392       1.0000         .10000E-01   10.000    
    25 'Prefactor '    .95898       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6620E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   16393.28     FROM MIGRAD    STATUS=CONVERGED    149 CALLS     3210 TOTAL
                     EDM=   .12E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.0%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     3.9544        1.0384        .48069E-08   -.89150E-02
   2  Prefactor     14.207        1.7042       -.98317E-08    .89665E-01
   3  Prefactor     1.5402        1.2052        .34762E-07   -.20583E-03
   4  Prefactor     .55511E-10    1.0873       -.85875E-09** at limit **
   5  Prefactor     .36970E-07    7.8612        .66450E-07** at limit **
   6  Prefactor     .55511E-10    2.2100        .13279E-06** at limit **
   7  norm           .0000        .21402E-01    .90775E-08** at limit **
   8  norm          .55511E-10    2.5823        .36430E-06** at limit **
   9  Prefactor     .44187E-07    8.0264       -.36975E-06** at limit **
  10  Prefactor     .52791E-07    7.5516        .56992E-07** at limit **
  11  norm          .28588E-07    11.879        .50765E-07** at limit **
  12  Prefactor     3.7805        1.1918       -.34752E-07    .12891E-02
  13  Prefactor     .21659        1.2608        .49585E-07** at limit **
  14  Prefactor     2.9141        1.5817       -.62306E-07    .23930E-02
  15  Prefactor     .31551        1.2310       -.29341E-06    .19224E-02
  16  norm          3.5028        1.0109       -.85534E-08    .44567E-04
  17  norm          .35826        .40458        .10686E-07   -.20351E-02
  18  Prefactor      .0000        2.0385        .18634E-06** at limit **
  19  norm          .60286E-01    .24121       -.79324E-07** at limit **
  20  norm          .38348        3.5363       -.25687E-06    .90320E-02
  21  norm          .80167        .78800       -.17727E-08   -.52099E-03
  22  norm          2.6836        2.7426       -.14604E-07    .19768E-02
  23  Prefactor     5.6748        2.6844        .24286E-07   -.84777E-01
  24  Normalizat    .94417        .13092        .21900E-05   -.66300E-04
  25  Prefactor     .95889        .11007       -.44341E-06   -.36946E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 3.9544
  Prefactor  = 14.2073
  Prefactor  = 1.54019
  Prefactor  = 5.55112e-11
  Prefactor  = 3.69704e-08
  Prefactor  = 5.55112e-11
  norm       = 0
  norm       = 5.55112e-11
  Prefactor  = 4.41869e-08
  Prefactor  = 5.27911e-08
  norm       = 2.85882e-08
  Prefactor  = 3.78045
  Prefactor  = 0.216586
  Prefactor  = 2.91405
  Prefactor  = 0.315515
  norm       = 3.50281
  norm       = 0.35826
  Prefactor  = 0
  norm       = 0.0602862
  norm       = 0.383484
  norm       = 0.801674
  norm       = 2.68362
  Prefactor  = 5.6748
  Normalizat = 0.944171
  Prefactor  = 0.95889
 **********
 **   18 **HESSE 
 **********

 FCN=   16393.28     FROM HESSE     STATUS=OK           513 CALLS     3723 TOTAL
                     EDM=   .24E-05    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     3.9544        6.7867        .50681E-03   -1.5668    
   2  Prefactor     14.207        46.065        .26501E-03   -1.5633    
   3  Prefactor     1.5402        1.2082        .85956E-03   -1.5683    
   4  Prefactor     .55511E-10    1.0849        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .36970E-07    7.8614        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .55511E-10    .54060        .42118E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  norm           .0000        .16090E-01    .77471E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .55511E-10    2.5829        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .44187E-07    2.6078        .11179E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .52791E-07    1.0679        .42118E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  norm          .28588E-07    11.882        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     3.7805        1.4488        .51899E-03   -1.5669    
  13  Prefactor     .21659        1.1153        .23230E-02   -1.5699    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     2.9141        1.6093        .59481E-03   -1.5674    
  15  Prefactor     .31551        .92887        .33948E-02   -1.5697    
  16  norm          3.5028        1.0349        .53996E-04   -1.5671    
  17  norm          .35826        .44254        .19318E-02   -1.5696    
  18  Prefactor      .0000        2.0314        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  norm          .60286E-01    .16970        .22502E-02   -1.5703    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  norm          .38348        1.9049        .62571E-02   -1.5696    
  21  norm          .80167        .79666        .52746E-03   -1.5690    
  22  norm          2.6836        2.9729        .62177E-03   -1.5675    
  23  Prefactor     5.6748        40.043        .42537E-03   -1.5660    
  24  Normalizat    .94417        .11379        .45460E-01   -.94925    
  25  Prefactor     .95889        .91899E-01    .45752E-01   -.94113    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.38706e-06
Minuit parameter uncertainties:
  1  6.78668
  2  46.0659
  3  1.20818
  4  1.62754e-05
  5  0.00107862
  6  1.10091e-05
  7  1.15938e-08
  8  2.92941e-05
  9  0.000678937
  10  0.000474976
  11  0.00116511
  12  1.44877
  13  0.982967
  14  1.60928
  15  0.92887
  16  1.03495
  17  0.442536
  18  5.89594e-07
  19  0.169698
  20  1.70938
  21  0.796662
  22  2.97287
  23  30.1489
  24  0.113815
  25  0.0919142
Done.

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

Extracting fit parameters...

4FGL J1640.4+3945
   Spectrum: PowerLaw
308    Prefactor:  3.780e+00  1.449e+00  0.000e+00  1.000e+06 ( 1.000e-12)
309        Index:  2.421e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
310        Scale:  1.366e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
659    Prefactor:  9.589e-01  9.191e-02  0.000e+00  1.000e+01 ( 1.000e+00)
660        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
661        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
658   Normalization:  9.442e-01  1.138e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 64.94
Ra Dec: 250.119 39.763
Photon Index (Fixed Index): 2.42 +/- 0.00
Photon Flux (Fixed Index): 1.49e-07 +/- 5.72e-08
Energy Flux (Fixed Index): 4.76e-05 +/- 1.82e-05

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) = 16391.656719
delta logL = 1.61989154678

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 16391.656683
delta logL = 1.61992748253

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   16391.66     FROM MIGRAD    STATUS=CONVERGED     51 CALLS      233 TOTAL
                     EDM=   .13E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     5.5079        14.694        .42789E-03    .20222E-02
   2  Index         2.1259        1.5241        .81194E-01    .32941E-03
   3  Normalizat    .97374        .81765E-01    .45837E-01    .36453E-04
   4  Prefactor     .94144        .55010E-01    .45531E-01    .24317E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 5.50794
  Index      = 2.12593
  Normalizat = 0.973737
  Prefactor  = 0.941438
 **********
 **   18 **HESSE 
 **********

 FCN=   16391.66     FROM HESSE     STATUS=OK            33 CALLS      266 TOTAL
                     EDM=   .44E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     5.5079        1.4195        .56345E-05   -1.5661    
   2  Index         2.1259        .16003        .34068E-02   -.61238    
   3  Normalizat    .97374        .12921        .24860E-03   -.93916    
   4  Prefactor     .94144        .10935        .21491E-03   -.94708    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.41683e-12
Minuit parameter uncertainties:
  1  1.4195
  2  0.160069
  3  0.129251
  4  0.109377
 **********
 **   18 **HESSE 
 **********

 FCN=   16393.28     FROM HESSE     STATUS=OK           513 CALLS     3723 TOTAL
                     EDM=   .24E-05    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     3.9544        6.7867        .50681E-03   -1.5668    
   2  Prefactor     14.207        46.065        .26501E-03   -1.5633    
   3  Prefactor     1.5402        1.2082        .85956E-03   -1.5683    
   4  Prefactor     .55511E-10    1.0849        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .36970E-07    7.8614        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .55511E-10    .54060        .42118E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  norm           .0000        .16090E-01    .77471E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .55511E-10    2.5829        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .44187E-07    2.6078        .11179E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .52791E-07    1.0679        .42118E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  norm          .28588E-07    11.882        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     3.7805        1.4488        .51899E-03   -1.5669    
  13  Prefactor     .21659        1.1153        .23230E-02   -1.5699    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     2.9141        1.6093        .59481E-03   -1.5674    
  15  Prefactor     .31551        .92887        .33948E-02   -1.5697    
  16  norm          3.5028        1.0349        .53996E-04   -1.5671    
  17  norm          .35826        .44254        .19318E-02   -1.5696    
  18  Prefactor      .0000        2.0314        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  norm          .60286E-01    .16970        .22502E-02   -1.5703    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  norm          .38348        1.9049        .62571E-02   -1.5696    
  21  norm          .80167        .79666        .52746E-03   -1.5690    
  22  norm          2.6836        2.9729        .62177E-03   -1.5675    
  23  Prefactor     5.6748        40.043        .42537E-03   -1.5660    
  24  Normalizat    .94417        .11379        .45460E-01   -.94925    
  25  Prefactor     .95889        .91899E-01    .45752E-01   -.94113    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.38706e-06
Minuit parameter uncertainties:
  1  6.78668
  2  46.0659
  3  1.20818
  4  1.62754e-05
  5  0.00107862
  6  1.10091e-05
  7  1.15938e-08
  8  2.92941e-05
  9  0.000678937
  10  0.000474976
  11  0.00116511
  12  1.44877
  13  0.982967
  14  1.60928
  15  0.92887
  16  1.03495
  17  0.442536
  18  5.89594e-07
  19  0.169698
  20  1.70938
  21  0.796662
  22  2.97287
  23  30.1489
  24  0.113815
  25  0.0919142
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) = 16391.6566826
delta logL = 1.61992785766

Extracting fit parameters...

4FGL J1640.4+3945
   Spectrum: PowerLaw
308    Prefactor:  5.508e+00  1.420e+00  0.000e+00  1.000e+06 ( 1.000e-12)
309        Index:  2.126e+00  1.601e-01  0.000e+00  1.000e+01 (-1.000e+00)
310        Scale:  1.366e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
659    Prefactor:  9.414e-01  1.094e-01  0.000e+00  1.000e+01 ( 1.000e+00)
660        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
661        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
658   Normalization:  9.737e-01  1.293e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 68.70
Ra Dec: 250.119 39.763
Photon Index (Free Index): 2.13 +/- 0.16
Photon Flux (Free Index): 1.27e-07 +/- 2.83e-08
Energy Flux (Free Index): 6.59e-05 +/- 1.95e-05

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/31670010/cmap_HighResolution_805075201_805680001_4FGL_J1640.4+3945_weekly_bin936.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='1.49e-07', energy_flux2='6.59e-05', photon_flux_error='5.72e-08', dlogl='1.62e+00', energy_flux='4.76e-05', photon_flux2='1.27e-07', job_status='DONE', time_completed='2026-07-14 14:12:53.939415', photon_index_error2='0.16', photon_index2='2.13', ts='64.94', fit_tolerance='1e-08', GAL='0.96', photon_index_error='0.00', energy_flux_error2='1.95e-05', EG='0.94', time_epoch_completed='1784063573.94', return_code='0', job_id='31670010', GAL2='0.94', EG2='0.97', return_code2='0', energy_flux_error='1.82e-05', photon_flux_error2='2.83e-08', ts2='68.70', photon_index='2.42' WHERE bin_id='936' AND source_name='4FGL J1640.4+3945' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Jul 14 14:12:54 PDT 2026

Done.

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

Extracting fit parameters...

4FGL J1640.4+3945
   Spectrum: PowerLaw
308    Prefactor:  3.780e+00  1.449e+00  0.000e+00  1.000e+06 ( 1.000e-12)
309        Index:  2.421e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
310        Scale:  1.366e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
659    Prefactor:  9.589e-01  9.191e-02  0.000e+00  1.000e+01 ( 1.000e+00)
660        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
661        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
658   Normalization:  9.442e-01  1.138e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 64.94
Ra Dec: 250.119 39.763
Photon Index (Fixed Index): 2.42 +/- 0.00
Photon Flux (Fixed Index): 1.49e-07 +/- 5.72e-08
Energy Flux (Fixed Index): 4.76e-05 +/- 1.82e-05

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) = 16391.656719
delta logL = 1.61989154678

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 16391.656683
delta logL = 1.61992748253

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   16391.66     FROM MIGRAD    STATUS=CONVERGED     51 CALLS      233 TOTAL
                     EDM=   .13E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     5.5079        14.694        .42789E-03    .20222E-02
   2  Index         2.1259        1.5241        .81194E-01    .32941E-03
   3  Normalizat    .97374        .81765E-01    .45837E-01    .36453E-04
   4  Prefactor     .94144        .55010E-01    .45531E-01    .24317E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 5.50794
  Index      = 2.12593
  Normalizat = 0.973737
  Prefactor  = 0.941438
 **********
 **   18 **HESSE 
 **********

 FCN=   16391.66     FROM HESSE     STATUS=OK            33 CALLS      266 TOTAL
                     EDM=   .44E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     5.5079        1.4195        .56345E-05   -1.5661    
   2  Index         2.1259        .16003        .34068E-02   -.61238    
   3  Normalizat    .97374        .12921        .24860E-03   -.93916    
   4  Prefactor     .94144        .10935        .21491E-03   -.94708    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.41683e-12
Minuit parameter uncertainties:
  1  1.4195
  2  0.160069
  3  0.129251
  4  0.109377
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) = 16391.6566826
delta logL = 1.61992785766

Extracting fit parameters...

4FGL J1640.4+3945
   Spectrum: PowerLaw
308    Prefactor:  5.508e+00  1.420e+00  0.000e+00  1.000e+06 ( 1.000e-12)
309        Index:  2.126e+00  1.601e-01  0.000e+00  1.000e+01 (-1.000e+00)
310        Scale:  1.366e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
659    Prefactor:  9.414e-01  1.094e-01  0.000e+00  1.000e+01 ( 1.000e+00)
660        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
661        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
658   Normalization:  9.737e-01  1.293e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 68.70
Ra Dec: 250.119 39.763
Photon Index (Free Index): 2.13 +/- 0.16
Photon Flux (Free Index): 1.27e-07 +/- 2.83e-08
Energy Flux (Free Index): 6.59e-05 +/- 1.95e-05

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/31669995/cmap_HighResolution_805075201_805680001_4FGL_J1640.4+3945_weekly_bin936.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='1.49e-07', energy_flux2='6.59e-05', photon_flux_error='5.72e-08', dlogl='1.62e+00', energy_flux='4.76e-05', photon_flux2='1.27e-07', job_status='DONE', time_completed='2026-07-14 14:13:16.562067', photon_index_error2='0.16', photon_index2='2.13', ts='64.94', fit_tolerance='1e-08', GAL='0.96', photon_index_error='0.00', energy_flux_error2='1.95e-05', EG='0.94', time_epoch_completed='1784063596.56', return_code='0', job_id='31669995', GAL2='0.94', EG2='0.97', return_code2='0', energy_flux_error='1.82e-05', photon_flux_error2='2.83e-08', ts2='68.70', photon_index='2.42' WHERE bin_id='936' AND source_name='4FGL J1640.4+3945' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Jul 14 14:13:16 PDT 2026

