/sdf/group/fermi/u/kocevski/software/conda/envs/fermitools_v1.0.5/lib/python2.7/site-packages/pyfits/__init__.py:22: PyFITSDeprecationWarning: PyFITS is deprecated, please use astropy.io.fits
  PyFITSDeprecationWarning)  # noqa

Likelihood Analysis Tool
Support Contact: Daniel Kocevski (daniel.kocevski@nasa.gov)

Importing modules...
This is make3FGLxml version 01r0.
The default diffuse model files and names are for pass 8 and assume you have v10r00p05 of the Fermi Science Tools or higher.
This is make4FGLDR3xml version 01r09.
The default diffuse model files and names are for P8R3, 4FGL DRs, and the default fermitools directory locations.

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

/sdf/group/fermi/u/kocevski/software/conda/envs/fermitools_v1.0.5/lib/python2.7/site-packages/matplotlib/cbook/deprecation.py:106: MatplotlibDeprecationWarning: The mpl_toolkits.axes_grid module was deprecated in version 2.1. Use mpl_toolkits.axes_grid1 and mpl_toolkits.axisartist provies the same functionality instead.
  warnings.warn(message, mplDeprecation, stacklevel=1)

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

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


Performing analysis on: 4FGL_J0507.9+6737_weekly_bin907
RA = 76.9956, Dec = 67.6223
tmin = 787536001, tmax = 788140801
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='17771401', job_status='RUN', time_executed='2025-12-23 00:53:02.292079', time_epoch_executed='1766479982.29' WHERE source_name='4FGL J0507.9+6737' and cadence='weekly' and bin_id='907'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/17771401

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

Retrieving the FT1 file...

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

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

Retrieving 108 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/17771401/ft1_4FGL_J0507.9+6737_weekly_bin907.fits


Retrieving the FT1 file...

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

Retrieving 108 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/17771401/ft2_4FGL_J0507.9+6737_weekly_bin907.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/17771401/ft1_4FGL_J0507.9+6737_weekly_bin907.fits outfile=/lscratch/kocevski/17771401/ft1_filteredMKT_4FGL_J0507.9+6737_weekly_bin907.fits ra=76.9956 dec=67.6223 rad=12.0 tmin=787536001.0 tmax=788140801.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.96
user 4.21
sys 0.24

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/17771401/ft2_4FGL_J0507.9+6737_weekly_bin907.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/17771401/ft2_4FGL_J0507.9+6737_weekly_bin907.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/17771401/ft1_filteredMKT_4FGL_J0507.9+6737_weekly_bin907.fits evtable="EVENTS" outfile="/lscratch/kocevski/17771401/ft1_filtered_4FGL_J0507.9+6737_weekly_bin907.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.80
user 0.23
sys 0.13

Number of photons that the gtmktime cut: 4479

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/17771401/ft1_filtered_4FGL_J0507.9+6737_weekly_bin907.fits" evtable="EVENTS" scfile=/lscratch/kocevski/17771401/ft2_4FGL_J0507.9+6737_weekly_bin907.fits sctable="SC_DATA" outfile=/lscratch/kocevski/17771401/ltcube_787536001_788140801_4FGL_J0507.9+6737_weekly_bin907.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/17771401/ft2_4FGL_J0507.9+6737_weekly_bin907.fits
.....................!
real 18.18
user 17.45
sys 0.25

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/17771401/ft1_filtered_4FGL_J0507.9+6737_weekly_bin907.fits evtable="EVENTS" scfile=/lscratch/kocevski/17771401/ft2_4FGL_J0507.9+6737_weekly_bin907.fits sctable="SC_DATA" expcube=/lscratch/kocevski/17771401/ltcube_787536001_788140801_4FGL_J0507.9+6737_weekly_bin907.fits outfile=/lscratch/kocevski/17771401/expmap_787536001_788140801_4FGL_J0507.9+6737_weekly_bin907.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/17771401/ltcube_787536001_788140801_4FGL_J0507.9+6737_weekly_bin907.fits
.....................!
real 68.51
user 63.66
sys 4.11

Generating the xml model:
radLim = 0.001
maxRad = 12
normsOnly = True
freeVariableSources = True
Fixing all sources to their catalog values, except variable sources
Creating file and adding sources from 4FGL
Extended source G150.3+4.5 in ROI with RadialDisk spatial model.
Extended source HB 3 in ROI with RadialDisk spatial model.
Extended source W 3 in ROI, make sure /sdf/group/fermi/g/LCRepository/Likelihood/ExtendedSources/Extended_8years/Templates/W3.fits is the correct path to the extended template.
Extended source HB 9 in ROI, make sure /sdf/group/fermi/g/LCRepository/Likelihood/ExtendedSources/Extended_8years/Templates/HB9.fits is the correct path to the extended template.
Added 180 point sources and 4 extended sources
If using unbinned likelihood you will need to rerun gtdiffrsp for the extended sources or rerun the makeModel function with optional argument psForce=True

Setting source of interest to:
4FGL J0507.9+6737 @ 76.9956 67.6223

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/17771401/ft1_filtered_4FGL_J0507.9+6737_weekly_bin907.fits scfile=/lscratch/kocevski/17771401/ft2_4FGL_J0507.9+6737_weekly_bin907.fits outfile=/lscratch/kocevski/17771401/cmap_787536001_788140801_4FGL_J0507.9+6737_weekly_bin907.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=76.9956 yref=67.6223 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.26
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/17771401/ft1_filtered_4FGL_J0507.9+6737_weekly_bin907.fits scfile=/lscratch/kocevski/17771401/ft2_4FGL_J0507.9+6737_weekly_bin907.fits outfile=/lscratch/kocevski/17771401/cmap_HighResolution_787536001_788140801_4FGL_J0507.9+6737_weekly_bin907.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=76.9956 yref=67.6223 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.25
sys 0.14

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/17771401/ft1_filtered_4FGL_J0507.9+6737_weekly_bin907.fits evtable="EVENTS" scfile=/lscratch/kocevski/17771401/ft2_4FGL_J0507.9+6737_weekly_bin907.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/17771401/Model_4FGL_J0507.9+6737_weekly_bin907.xml irfs="P8R3_SOURCE_V2" evclsmin=0 evclass="INDEF" evtype="INDEF" convert=yes chatter=2 clobber=yes debug=no gui=no mode="ql"

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

adding source EG_v02
adding source G150.3+4.5
adding source GAL_V02
adding source HB 3
adding source HB 9
adding source W 3
Working on...
/lscratch/kocevski/17771401/ft1_filtered_4FGL_J0507.9+6737_weekly_bin907.fits.....................!
real 267.14
user 263.80
sys 1.30

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/17771401/ft1_filtered_4FGL_J0507.9+6737_weekly_bin907.fits', '/lscratch/kocevski/17771401/ft2_4FGL_J0507.9+6737_weekly_bin907.fits', expMap='/lscratch/kocevski/17771401/expmap_787536001_788140801_4FGL_J0507.9+6737_weekly_bin907.fits', expCube='/lscratch/kocevski/17771401/ltcube_787536001_788140801_4FGL_J0507.9+6737_weekly_bin907.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/17771401/Model_4FGL_J0507.9+6737_weekly_bin907.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J0507.9+6737'

4FGL J0507.9+6737
   Spectrum: PowerLaw
288    Prefactor:  5.003e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-14)
289        Index:  1.578e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
290        Scale:  6.445e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/17771401/ft1_filtered_4FGL_J0507.9+6737_weekly_bin907.fits
Spacecraft file(s): /lscratch/kocevski/17771401/ft2_4FGL_J0507.9+6737_weekly_bin907.fits
Exposure map: /lscratch/kocevski/17771401/expmap_787536001_788140801_4FGL_J0507.9+6737_weekly_bin907.fits
Exposure cube: /lscratch/kocevski/17771401/ltcube_787536001_788140801_4FGL_J0507.9+6737_weekly_bin907.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/17771401/Model_4FGL_J0507.9+6737_weekly_bin907.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) = 44467.5212901

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .74718E-07   1.0000          .0000       .10000E+07
     2 'Prefactor '    5.9015       1.0000          .0000       .10000E+07
     3 'Prefactor '    .10325E-07   1.0000          .0000       .10000E+07
     4 'Prefactor '    .28033E-07   1.0000          .0000       .10000E+07
     5 'Prefactor '    2.4005       1.0000          .0000       .10000E+07
     6 'Prefactor '    .26673E-06   1.0000          .0000       .10000E+07
     7 'norm      '    4.7476       1.0000          .0000       .10000E+07
     8 'norm      '     .0000       1.0000          .0000       .10000E+07
     9 'Prefactor '    6.9793       1.0000          .0000       .10000E+07
    10 'Prefactor '    2.0483       1.0000          .0000       .10000E+07
    11 'Prefactor '    .66613E-09   1.0000          .0000       .10000E+07
    12 'Prefactor '    .10492E-07   1.0000          .0000       .10000E+07
    13 'Prefactor '    16.085       1.0000          .0000       .10000E+07
    14 'Normalizat'    .97757       1.0000         .10000E-01   10.000    
    15 'Prefactor '    .99421       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6120E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   44467.43     FROM MIGRAD    STATUS=CONVERGED     90 CALLS      982 TOTAL
                     EDM=   .13E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  7.3%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm           .0000        1.7899        .40779E-07** at limit **
   2  Prefactor     5.8894        5.3329        .17215E-05   -.35455E-01
   3  Prefactor      .0000        2.0021       -.46287E-06** at limit **
   4  Prefactor      .0000        .98786       -.49883E-07** at limit **
   5  Prefactor     2.3300        1.9631       -.87872E-06    .72754E-02
   6  Prefactor     .96034E-08    15.786        .23585E-07** at limit **
   7  norm          4.7470        4.9849        .72106E-07   -.22771E-02
   8  norm          .19573E-06    2.4285        .94187E-06** at limit **
   9  Prefactor     6.9794        5.6776        .63919E-06    .14941E-01
  10  Prefactor     2.0287        2.4194        .12861E-05   -.14514E-02
  11  Prefactor     .22332E-06    2.2657       -.14617E-05** at limit **
  12  Prefactor     .55511E-09    4.3467        .56321E-06** at limit **
  13  Prefactor     16.094        10.939       -.22933E-05    .45462E-01
  14  Normalizat    .97745        .11255        .13192E-04    .27545E-03
  15  Prefactor     .99424        .27034E-01   -.15755E-05    .81074E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 0
  Prefactor  = 5.88937
  Prefactor  = 0
  Prefactor  = 0
  Prefactor  = 2.33001
  Prefactor  = 9.60343e-09
  norm       = 4.74695
  norm       = 1.95732e-07
  Prefactor  = 6.97939
  Prefactor  = 2.02869
  Prefactor  = 2.23321e-07
  Prefactor  = 5.55112e-10
  Prefactor  = 16.0938
  Normalizat = 0.977448
  Prefactor  = 0.994244
 **********
 **   18 **HESSE 
 **********

 FCN=   44467.43     FROM HESSE     STATUS=OK           212 CALLS     1194 TOTAL
                     EDM=   .38E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm           .0000        1.7714        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     5.8894        19.159        .41314E-03   -1.5659    
   3  Prefactor      .0000        1.9770        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor      .0000        .98055        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     2.3300        41.459        .66061E-03   -1.5677    
   6  Prefactor     .96034E-08    15.907        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  norm          4.7470        4.9988        .46155E-03   -1.5664    
   8  norm          .19573E-06    3.4265        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     6.9794        5.6937        .37951E-03   -1.5655    
  10  Prefactor     2.0287        30.034        .72208E-03   -1.5679    
  11  Prefactor     .22332E-06    3.4808        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .55511E-09    4.3521        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     16.094        14.646        .24946E-03   -1.5628    
  14  Normalizat    .97745        .11394        .11988       -.93790    
  15  Prefactor     .99424        .27017E-01    .28535E-01   -.92922    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.83432e-07
Minuit parameter uncertainties:
  1  1.12524e-05
  2  19.1589
  3  2.87673e-06
  4  7.79453e-07
  5  19.6572
  6  0.000782637
  7  4.99884
  8  0.00163789
  9  5.69375
  10  15.6115
  11  0.00176338
  12  9.82644e-05
  13  14.646
  14  0.113973
  15  0.0270177
Done.

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

Extracting fit parameters...

4FGL J0507.9+6737
   Spectrum: PowerLaw
288    Prefactor:  6.979e+00  5.694e+00  0.000e+00  1.000e+06 ( 1.000e-14)
289        Index:  1.578e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
290        Scale:  6.445e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
597    Prefactor:  9.942e-01  2.702e-02  0.000e+00  1.000e+01 ( 1.000e+00)
598        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
599        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
592   Normalization:  9.774e-01  1.140e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 6.34
Ra Dec: 76.996 67.622
Photon Index (Fixed Index): 1.58 +/- 0.00
Photon Flux (Fixed Index): 8.49e-09 +/- 6.92e-09
Energy Flux (Fixed Index): 2.07e-05 +/- 1.69e-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) = 44467.432101
delta logL = 0.000405269369367

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 44467.4320422
delta logL = 0.000464084820123

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   44467.43     FROM MIGRAD    STATUS=CONVERGED    103 CALLS      289 TOTAL
                     EDM=   .90E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     7.0563        6.8672        .15119E-04    .47486E-02
   2  Index         1.5601        .62415        .27381E-01    .20150E-03
   3  Normalizat    .97767        .11123        .53178E-03    .23876E-03
   4  Prefactor     .99424        .26735E-01    .12611E-03    .54524E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 7.05634
  Index      = 1.56007
  Normalizat = 0.977672
  Prefactor  = 0.994242
 **********
 **   18 **HESSE 
 **********

 FCN=   44467.43     FROM HESSE     STATUS=OK            25 CALLS      314 TOTAL
                     EDM=   .21E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     7.0563        6.2668        .30238E-05   -1.5655    
   2  Index         1.5601        .57348        .10952E-02   -.75871    
   3  Normalizat    .97767        .11110        .21271E-04   -.93782    
   4  Prefactor     .99424        .26739E-01    .50442E-05   -.92922    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.10265e-10
Minuit parameter uncertainties:
  1  6.2668
  2  0.575895
  3  0.111129
  4  0.0267398
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) = 44467.4320225
delta logL = 0.000483764306409

Extracting fit parameters...

4FGL J0507.9+6737
   Spectrum: PowerLaw
288    Prefactor:  7.056e+00  6.267e+00  0.000e+00  1.000e+06 ( 1.000e-14)
289        Index:  1.560e+00  5.759e-01  0.000e+00  1.000e+01 (-1.000e+00)
290        Scale:  6.445e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
597    Prefactor:  9.942e-01  2.674e-02  0.000e+00  1.000e+01 ( 1.000e+00)
598        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
599        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
592   Normalization:  9.777e-01  1.111e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 6.34
Ra Dec: 76.996 67.622
Photon Index (Free Index): 1.56 +/- 0.58
Photon Flux (Free Index): 8.20e-09 +/- 1.13e-08
Energy Flux (Free Index): 2.12e-05 +/- 2.45e-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/17771401/cmap_HighResolution_787536001_788140801_4FGL_J0507.9+6737_weekly_bin907.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='8.49e-09', energy_flux2='2.12e-05', photon_flux_error='6.92e-09', dlogl='4.84e-04', energy_flux='2.07e-05', photon_flux2='8.20e-09', job_status='DONE', time_completed='2025-12-23 01:09:11.256949', photon_index_error2='0.58', photon_index2='1.56', ts='6.34', fit_tolerance='1e-08', GAL='0.99', photon_index_error='0.00', energy_flux_error2='2.45e-05', EG='0.98', time_epoch_completed='1766480951.26', return_code='0', job_id='17771401', GAL2='0.99', EG2='0.98', return_code2='0', energy_flux_error='1.69e-05', photon_flux_error2='1.13e-08', ts2='6.34', photon_index='1.58' WHERE bin_id='907' AND source_name='4FGL J0507.9+6737' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Dec 23 01:09:11 PST 2025

