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


Performing analysis on: 4FGL_J1606.9+5919_weekly_bin906
RA = 241.734, Dec = 59.3201
tmin = 786931201, tmax = 787536001
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='17379808', job_status='RUN', time_executed='2025-12-16 02:46:29.243915', time_epoch_executed='1765881989.24' WHERE source_name='4FGL J1606.9+5919' and cadence='weekly' and bin_id='906'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/17379808

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

Retrieving the FT1 file...

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

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

Retrieving 107 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/17379808/ft1_4FGL_J1606.9+5919_weekly_bin906.fits


Retrieving the FT1 file...

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

Retrieving 107 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/17379808/ft2_4FGL_J1606.9+5919_weekly_bin906.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/17379808/ft1_4FGL_J1606.9+5919_weekly_bin906.fits outfile=/lscratch/kocevski/17379808/ft1_filteredMKT_4FGL_J1606.9+5919_weekly_bin906.fits ra=241.734 dec=59.3201 rad=12.0 tmin=786931201.0 tmax=787536001.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.16
user 4.39
sys 0.25

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/17379808/ft2_4FGL_J1606.9+5919_weekly_bin906.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/17379808/ft2_4FGL_J1606.9+5919_weekly_bin906.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/17379808/ft1_filteredMKT_4FGL_J1606.9+5919_weekly_bin906.fits evtable="EVENTS" outfile="/lscratch/kocevski/17379808/ft1_filtered_4FGL_J1606.9+5919_weekly_bin906.fits" apply_filter=yes overwrite=yes header_obstimes=yes tstart=0.0 tstop=0.0 gtifile="default" chatter=3 clobber=yes debug=no gui=no mode="ql"

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

This is gtmktime version HEAD
Applying GTI filter:
IN_SAA!=T && LIVETIME>0 && gtifilter('/sdf/group/fermi/g/LCRepository/Likelihood/GTIs/nogrb.gti',(START+STOP)/2) && (angsep(RA_SUN,DEC_SUN,RA_ZENITH,DEC_ZENITH)>115 || gtifilter('/sdf/group/fermi/g/LCRepository/Likelihood/GTIs/nosolarflares.gti',(START+STOP)/2))
real 0.74
user 0.18
sys 0.14

Number of photons that the gtmktime cut: 1687

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/17379808/ft1_filtered_4FGL_J1606.9+5919_weekly_bin906.fits" evtable="EVENTS" scfile=/lscratch/kocevski/17379808/ft2_4FGL_J1606.9+5919_weekly_bin906.fits sctable="SC_DATA" outfile=/lscratch/kocevski/17379808/ltcube_786931201_787536001_4FGL_J1606.9+5919_weekly_bin906.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/17379808/ft2_4FGL_J1606.9+5919_weekly_bin906.fits
.....................!
real 16.02
user 15.21
sys 0.23

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/17379808/ft1_filtered_4FGL_J1606.9+5919_weekly_bin906.fits evtable="EVENTS" scfile=/lscratch/kocevski/17379808/ft2_4FGL_J1606.9+5919_weekly_bin906.fits sctable="SC_DATA" expcube=/lscratch/kocevski/17379808/ltcube_786931201_787536001_4FGL_J1606.9+5919_weekly_bin906.fits outfile=/lscratch/kocevski/17379808/expmap_786931201_787536001_4FGL_J1606.9+5919_weekly_bin906.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/17379808/ltcube_786931201_787536001_4FGL_J1606.9+5919_weekly_bin906.fits
.....................!
real 59.67
user 55.64
sys 3.43

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

Setting source of interest to:
4FGL J1606.9+5919 @ 241.734 59.3201

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/17379808/ft1_filtered_4FGL_J1606.9+5919_weekly_bin906.fits scfile=/lscratch/kocevski/17379808/ft2_4FGL_J1606.9+5919_weekly_bin906.fits outfile=/lscratch/kocevski/17379808/cmap_786931201_787536001_4FGL_J1606.9+5919_weekly_bin906.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=241.734 yref=59.3201 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.72
user 0.21
sys 0.12

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/17379808/ft1_filtered_4FGL_J1606.9+5919_weekly_bin906.fits scfile=/lscratch/kocevski/17379808/ft2_4FGL_J1606.9+5919_weekly_bin906.fits outfile=/lscratch/kocevski/17379808/cmap_HighResolution_786931201_787536001_4FGL_J1606.9+5919_weekly_bin906.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=241.734 yref=59.3201 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.86
user 0.20
sys 0.13

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/17379808/ft1_filtered_4FGL_J1606.9+5919_weekly_bin906.fits evtable="EVENTS" scfile=/lscratch/kocevski/17379808/ft2_4FGL_J1606.9+5919_weekly_bin906.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/17379808/Model_4FGL_J1606.9+5919_weekly_bin906.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/17379808/ft1_filtered_4FGL_J1606.9+5919_weekly_bin906.fits.....................!
real 46.46
user 44.66
sys 1.07

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/17379808/ft1_filtered_4FGL_J1606.9+5919_weekly_bin906.fits', '/lscratch/kocevski/17379808/ft2_4FGL_J1606.9+5919_weekly_bin906.fits', expMap='/lscratch/kocevski/17379808/expmap_786931201_787536001_4FGL_J1606.9+5919_weekly_bin906.fits', expCube='/lscratch/kocevski/17379808/ltcube_786931201_787536001_4FGL_J1606.9+5919_weekly_bin906.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/17379808/Model_4FGL_J1606.9+5919_weekly_bin906.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1606.9+5919'

4FGL J1606.9+5919
   Spectrum: PowerLaw
329    Prefactor:  2.197e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-14)
330        Index:  2.114e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
331        Scale:  2.350e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/17379808/ft1_filtered_4FGL_J1606.9+5919_weekly_bin906.fits
Spacecraft file(s): /lscratch/kocevski/17379808/ft2_4FGL_J1606.9+5919_weekly_bin906.fits
Exposure map: /lscratch/kocevski/17379808/expmap_786931201_787536001_4FGL_J1606.9+5919_weekly_bin906.fits
Exposure cube: /lscratch/kocevski/17379808/ltcube_786931201_787536001_4FGL_J1606.9+5919_weekly_bin906.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/17379808/Model_4FGL_J1606.9+5919_weekly_bin906.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) = 17980.2191846

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    2.7765       1.0000          .0000       .10000E+07
     2 'Prefactor '    .25722E-05   1.0000          .0000       .10000E+07
     3 'Prefactor '    1.8324       1.0000          .0000       .10000E+07
     4 'Prefactor '    31.932       1.0000          .0000       .10000E+07
     5 'norm      '    4.4681       1.0000          .0000       .10000E+07
     6 'Prefactor '    7.7687       1.0000          .0000       .10000E+07
     7 'Prefactor '    .18975E-05   1.0000          .0000       .10000E+07
     8 'norm      '    1.6086       1.0000          .0000       .10000E+07
     9 'Prefactor '    14.175       1.0000          .0000       .10000E+07
    10 'Prefactor '    .97040E-02   1.0000          .0000       .10000E+07
    11 'Prefactor '    .29788E-04   1.0000          .0000       .10000E+07
    12 'norm      '    11.159       1.0000          .0000       .10000E+07
    13 'Prefactor '    4.7845       1.0000          .0000       .10000E+07
    14 'Prefactor '    17.964       1.0000          .0000       .10000E+07
    15 'norm      '    6.6541       1.0000          .0000       .10000E+07
    16 'Prefactor '    1.0019       1.0000          .0000       .10000E+07
    17 'Prefactor '    .15821E-07   1.0000          .0000       .10000E+07
    18 'Prefactor '    .23981E-06   1.0000          .0000       .10000E+07
    19 'norm      '    7.7803       1.0000          .0000       .10000E+07
    20 'Prefactor '    3.7445       1.0000          .0000       .10000E+07
    21 'Prefactor '    .42679E-05   1.0000          .0000       .10000E+07
    22 'Prefactor '    .24400E-05   1.0000          .0000       .10000E+07
    23 'Prefactor '    .58367E-04   1.0000          .0000       .10000E+07
    24 'Prefactor '    .35468E-02   1.0000          .0000       .10000E+07
    25 'Normalizat'    .97956       1.0000         .10000E-01   10.000    
    26 'Prefactor '    .92027       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .7060E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   17980.20     FROM MIGRAD    STATUS=CONVERGED    139 CALLS     1775 TOTAL
                     EDM=   .86E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .9%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     2.7788        3.8400       -.11628E-07   -.11661E-02
   2  Prefactor     .37748E-08    2.0507        .89750E-06** at limit **
   3  Prefactor     1.8124        4.1283       -.15678E-06    .33525E-02
   4  Prefactor     31.946        1.0342        .18008E-07   -.71974E-02
   5  norm          4.4666        1.6225       -.16635E-07   -.10920E-01
   6  Prefactor     7.8534        2.1519        .41637E-06   -.59129E-01
   7  Prefactor     .22204E-09    .66977       -.10244E-06** at limit **
   8  norm          1.6107        3.5105       -.23068E-07   -.72362E-03
   9  Prefactor     14.150        1.1624       -.22828E-07    .62621E-02
  10  Prefactor     .55511E-09    14.671       -.63117E-07** at limit **
  11  Prefactor     .19984E-08    1.8088       -.88766E-06** at limit **
  12  norm          11.162        1.1447       -.55983E-08   -.11856E-02
  13  Prefactor     4.7643        4.0431       -.41445E-07   -.33844E-02
  14  Prefactor     18.028        1.0086       -.10008E-07    .32549E-02
  15  norm          6.6526        4.9491       -.21354E-07    .15460E-02
  16  Prefactor     1.0014        1.1031        .17105E-08   -.60427E-02
  17  Prefactor     .17153E-07    1.5445       -.63280E-06** at limit **
  18  Prefactor     .66613E-09    5.2983       -.30909E-06** at limit **
  19  norm          7.7816        .84651        .18574E-07    .58781E-01
  20  Prefactor     3.6877        5.0615       -.48114E-06   -.19389E-02
  21  Prefactor     .14655E-07    1.9185        .69223E-06** at limit **
  22  Prefactor     .88818E-09    1.8037        .75651E-06** at limit **
  23  Prefactor     .92149E-08    2.2283       -.87867E-06** at limit **
  24  Prefactor      .0000        9.7991        .29501E-06** at limit **
  25  Normalizat    .97985        .12132        .53325E-06    .25236E-03
  26  Prefactor     .92018        .11594       -.47110E-06   -.68042E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 2.77885
  Prefactor  = 3.77476e-09
  Prefactor  = 1.81239
  Prefactor  = 31.9459
  norm       = 4.46658
  Prefactor  = 7.85342
  Prefactor  = 2.22045e-10
  norm       = 1.61071
  Prefactor  = 14.1502
  Prefactor  = 5.55112e-10
  Prefactor  = 1.9984e-09
  norm       = 11.162
  Prefactor  = 4.76425
  Prefactor  = 18.0276
  norm       = 6.65259
  Prefactor  = 1.00141
  Prefactor  = 1.71529e-08
  Prefactor  = 6.66134e-10
  norm       = 7.78163
  Prefactor  = 3.68768
  Prefactor  = 1.46549e-08
  Prefactor  = 8.88178e-10
  Prefactor  = 9.21485e-09
  Prefactor  = 0
  Normalizat = 0.979849
  Prefactor  = 0.920184
 **********
 **   18 **HESSE 
 **********

 FCN=   17980.20     FROM HESSE     STATUS=OK           510 CALLS     2285 TOTAL
                     EDM=   .42E-05    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     2.7788        3.8520        .61046E-03   -1.5675    
   2  Prefactor     .37748E-08    2.1393        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     1.8124        4.1180        .77060E-03   -1.5681    
   4  Prefactor     31.946        15.662        .17699E-03   -1.5595    
   5  norm          4.4666        1.6638        .47611E-03   -1.5666    
   6  Prefactor     7.8534        69.603        .35953E-03   -1.5652    
   7  Prefactor     .22204E-09    3.5206        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          1.6107        3.5778        .83500E-03   -1.5683    
   9  Prefactor     14.150        13.793        .26577E-03   -1.5633    
  10  Prefactor     .55511E-09    14.698        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .19984E-08    1.8369        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm          11.162        8.1664        .29966E-03   -1.5641    
  13  Prefactor     4.7643        4.0501        .45972E-03   -1.5664    
  14  Prefactor     18.028        17.821        .23603E-03   -1.5623    
  15  norm          6.6526        4.9627        .38877E-03   -1.5656    
  16  Prefactor     1.0014        1.1082        .43833E-03   -1.5688    
  17  Prefactor     .17153E-07    3.3141        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .66613E-09    5.3091        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  norm          7.7816        .85903        .35926E-03   -1.5652    
  20  Prefactor     3.6877        5.0908        .52153E-03   -1.5670    
  21  Prefactor     .14655E-07    3.3643        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     .88818E-09    1.8333        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .92149E-08    2.5041        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor      .0000        9.8299        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Normalizat    .97985        .10376        .45910E-01   -.93709    
  26  Prefactor     .92018        .98109E-01    .45263E-01   -.95439    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.21245e-06
Minuit parameter uncertainties:
  1  3.85196
  2  0.000179624
  3  4.11803
  4  15.662
  5  1.6638
  6  46.7605
  7  5.26755e-05
  8  3.57776
  9  13.7932
  10  0.000184809
  11  0.000121829
  12  8.16643
  13  4.05014
  14  17.8207
  15  4.96269
  16  1.10825
  17  0.000476931
  18  0.00011749
  19  0.859031
  20  5.0908
  21  0.000443957
  22  8.03725e-05
  23  0.000304235
  24  9.25949e-08
  25  0.103781
  26  0.0981275
Done.

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

Extracting fit parameters...

4FGL J1606.9+5919
   Spectrum: PowerLaw
329    Prefactor:  1.415e+01  1.379e+01  0.000e+00  1.000e+06 ( 1.000e-14)
330        Index:  2.114e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
331        Scale:  2.350e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
703    Prefactor:  9.202e-01  9.813e-02  0.000e+00  1.000e+01 ( 1.000e+00)
704        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
705        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
702   Normalization:  9.798e-01  1.038e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 1.80
Ra Dec: 241.734 59.320
Photon Index (Fixed Index): 2.11 +/- 0.00
Photon Flux (Fixed Index): 1.00e-08 +/- 9.79e-09
Energy Flux (Fixed Index): 5.35e-06 +/- 5.22e-06

TS (Fixed Index): 1.80
Ra Dec: 241.734 59.320
Photon Flux Upper Limit: 3.38790869153e-08 ph cm-2 s-1
Energy Flux Upper Limit: 0.00256433140938 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/17379808/likelihoodResults_786931201_787536001_4FGL_J1606.9+5919_weekly_bin906.txt

Performing a free index iterative likelihood fit...

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

Done.

Freeing candidate source...
Done.

Fit tolerance = 1

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 17980.1302418
delta logL = 0.0662500731014

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 17980.1290097
delta logL = 0.0674821644025

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   17980.13     FROM MIGRAD    STATUS=CONVERGED     58 CALLS      256 TOTAL
                     EDM=   .21E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     18.309        361.17        .23394E-03    .17395E-02
   2  Index         1.8572        2.7218        .26696        .67206E-04
   3  Normalizat    .98360        .33432E-01    .45962E-01    .27756E-04
   4  Prefactor     .91789        .26662E-01    .45235E-01    .10327E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 18.3086
  Index      = 1.85717
  Normalizat = 0.983598
  Prefactor  = 0.917894
 **********
 **   18 **HESSE 
 **********

 FCN=   17980.13     FROM HESSE     STATUS=OK            33 CALLS      289 TOTAL
                     EDM=   .23E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     18.309        20.112        .46789E-04   -1.5622    
   2  Index         1.8572        .67347        .10892E-01   -.67971    
   3  Normalizat    .98360        .11448        .23802E-03   -.93582    
   4  Prefactor     .91789        .11408        .24394E-03   -.95519    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.29386e-09
Minuit parameter uncertainties:
  1  20.1123
  2  0.676879
  3  0.114505
  4  0.114106
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) = 17980.1289959
delta logL = 0.0674959879179

Extracting fit parameters...

4FGL J1606.9+5919
   Spectrum: PowerLaw
329    Prefactor:  1.831e+01  2.011e+01  0.000e+00  1.000e+06 ( 1.000e-14)
330        Index:  1.857e+00  6.769e-01  0.000e+00  1.000e+01 (-1.000e+00)
331        Scale:  2.350e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
703    Prefactor:  9.179e-01  1.141e-01  0.000e+00  1.000e+01 ( 1.000e+00)
704        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
705        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
702   Normalization:  9.836e-01  1.145e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.94
Ra Dec: 241.734 59.320
Photon Index (Free Index): 1.86 +/- 0.68
Photon Flux (Free Index): 7.50e-09 +/- 9.48e-09
Energy Flux (Free Index): 7.59e-06 +/- 1.12e-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/17379808/cmap_HighResolution_786931201_787536001_4FGL_J1606.9+5919_weekly_bin906.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='2.56e-03', comment='SUCCESS', photon_flux='1.00e-08', energy_flux2='7.59e-06', photon_flux_error='9.79e-09', dlogl='6.75e-02', energy_flux='5.35e-06', photon_flux2='7.50e-09', job_status='DONE', time_completed='2025-12-16 03:00:53.534525', photon_index_error2='0.68', photon_index2='1.86', ts='1.80', fit_tolerance='1e-08', GAL='0.92', photon_index_error='0.00', photon_flux_upper_limit='3.39e-08', energy_flux_error2='1.12e-05', EG='0.98', time_epoch_completed='1765882853.53', return_code='0', job_id='17379808', GAL2='0.92', EG2='0.98', return_code2='0', energy_flux_error='5.22e-06', photon_flux_error2='9.48e-09', ts2='1.94', photon_index='2.11' WHERE bin_id='906' AND source_name='4FGL J1606.9+5919' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Dec 16 03:00:53 PST 2025

