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


Performing analysis on: 4FGL_J1608.0+4949_weekly_bin853
RA = 242.014, Dec = 49.829
tmin = 754876801, tmax = 755481601
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='59978176', job_status='RUN', time_executed='2024-12-10 00:51:32.448577', time_epoch_executed='1733820692.45' WHERE source_name='4FGL J1608.0+4949' and cadence='weekly' and bin_id='853'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/59978176

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

Retrieving the FT1 file...

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

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

Retrieving 107 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/59978176/ft1_4FGL_J1608.0+4949_weekly_bin853.fits


Retrieving the FT1 file...

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

Retrieving 107 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/59978176/ft2_4FGL_J1608.0+4949_weekly_bin853.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/59978176/ft1_4FGL_J1608.0+4949_weekly_bin853.fits outfile=/lscratch/kocevski/59978176/ft1_filteredMKT_4FGL_J1608.0+4949_weekly_bin853.fits ra=242.014 dec=49.829 rad=12.0 tmin=754876801.0 tmax=755481601.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 3.64
user 3.26
sys 0.29

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/59978176/ft2_4FGL_J1608.0+4949_weekly_bin853.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/59978176/ft2_4FGL_J1608.0+4949_weekly_bin853.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/59978176/ft1_filteredMKT_4FGL_J1608.0+4949_weekly_bin853.fits evtable="EVENTS" outfile="/lscratch/kocevski/59978176/ft1_filtered_4FGL_J1608.0+4949_weekly_bin853.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.46
user 0.23
sys 0.13

Number of photons that the gtmktime cut: 2433

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/59978176/ft1_filtered_4FGL_J1608.0+4949_weekly_bin853.fits" evtable="EVENTS" scfile=/lscratch/kocevski/59978176/ft2_4FGL_J1608.0+4949_weekly_bin853.fits sctable="SC_DATA" outfile=/lscratch/kocevski/59978176/ltcube_754876801_755481601_4FGL_J1608.0+4949_weekly_bin853.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/59978176/ft2_4FGL_J1608.0+4949_weekly_bin853.fits
.....................!
real 23.56
user 22.95
sys 0.40

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/59978176/ft1_filtered_4FGL_J1608.0+4949_weekly_bin853.fits evtable="EVENTS" scfile=/lscratch/kocevski/59978176/ft2_4FGL_J1608.0+4949_weekly_bin853.fits sctable="SC_DATA" expcube=/lscratch/kocevski/59978176/ltcube_754876801_755481601_4FGL_J1608.0+4949_weekly_bin853.fits outfile=/lscratch/kocevski/59978176/expmap_754876801_755481601_4FGL_J1608.0+4949_weekly_bin853.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/59978176/ltcube_754876801_755481601_4FGL_J1608.0+4949_weekly_bin853.fits
.....................!
real 71.29
user 66.57
sys 4.34

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

Setting source of interest to:
4FGL J1608.0+4949 @ 242.014 49.829

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/59978176/ft1_filtered_4FGL_J1608.0+4949_weekly_bin853.fits scfile=/lscratch/kocevski/59978176/ft2_4FGL_J1608.0+4949_weekly_bin853.fits outfile=/lscratch/kocevski/59978176/cmap_754876801_755481601_4FGL_J1608.0+4949_weekly_bin853.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=242.014 yref=49.829 axisrot=0.0 rafield="RA" decfield="DEC" proj="AIT" hpx_ordering_scheme="RING" hpx_order=3 hpx_ebin=yes hpx_region="" evtable="EVENTS" sctable="SC_DATA" efield="ENERGY" tfield="TIME" chatter=2 clobber=yes debug=no gui=no mode="ql"

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

This is gtbin version HEAD
real 0.41
user 0.24
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/59978176/ft1_filtered_4FGL_J1608.0+4949_weekly_bin853.fits scfile=/lscratch/kocevski/59978176/ft2_4FGL_J1608.0+4949_weekly_bin853.fits outfile=/lscratch/kocevski/59978176/cmap_HighResolution_754876801_755481601_4FGL_J1608.0+4949_weekly_bin853.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=242.014 yref=49.829 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.43
user 0.24
sys 0.15

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/59978176/ft1_filtered_4FGL_J1608.0+4949_weekly_bin853.fits evtable="EVENTS" scfile=/lscratch/kocevski/59978176/ft2_4FGL_J1608.0+4949_weekly_bin853.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/59978176/Model_4FGL_J1608.0+4949_weekly_bin853.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/59978176/ft1_filtered_4FGL_J1608.0+4949_weekly_bin853.fits.....................!
real 70.94
user 69.74
sys 0.81

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/59978176/ft1_filtered_4FGL_J1608.0+4949_weekly_bin853.fits', '/lscratch/kocevski/59978176/ft2_4FGL_J1608.0+4949_weekly_bin853.fits', expMap='/lscratch/kocevski/59978176/expmap_754876801_755481601_4FGL_J1608.0+4949_weekly_bin853.fits', expCube='/lscratch/kocevski/59978176/ltcube_754876801_755481601_4FGL_J1608.0+4949_weekly_bin853.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/59978176/Model_4FGL_J1608.0+4949_weekly_bin853.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1608.0+4949'

4FGL J1608.0+4949
   Spectrum: PowerLaw
308    Prefactor:  4.577e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-14)
309        Index:  2.267e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
310        Scale:  1.615e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/59978176/ft1_filtered_4FGL_J1608.0+4949_weekly_bin853.fits
Spacecraft file(s): /lscratch/kocevski/59978176/ft2_4FGL_J1608.0+4949_weekly_bin853.fits
Exposure map: /lscratch/kocevski/59978176/expmap_754876801_755481601_4FGL_J1608.0+4949_weekly_bin853.fits
Exposure cube: /lscratch/kocevski/59978176/ltcube_754876801_755481601_4FGL_J1608.0+4949_weekly_bin853.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/59978176/Model_4FGL_J1608.0+4949_weekly_bin853.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) = 26205.2724126

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    2.5009       1.0000          .0000       .10000E+07
     2 'Prefactor '    .30205E-03   1.0000          .0000       .10000E+07
     3 'Prefactor '    .92622E-04   1.0000          .0000       .10000E+07
     4 'Prefactor '    .26068E-06   1.0000          .0000       .10000E+07
     5 'norm      '    .27700E-07   1.0000          .0000       .10000E+07
     6 'Prefactor '    .38536E-06   1.0000          .0000       .10000E+07
     7 'Prefactor '    .20546E-02   1.0000          .0000       .10000E+07
     8 'Prefactor '    .13162E-03   1.0000          .0000       .10000E+07
     9 'Prefactor '    .15124E-03   1.0000          .0000       .10000E+07
    10 'Prefactor '    .33862E-08   1.0000          .0000       .10000E+07
    11 'norm      '    39.886       1.0000          .0000       .10000E+07
    12 'Prefactor '    26.096       1.0000          .0000       .10000E+07
    13 'Prefactor '    19.523       1.0000          .0000       .10000E+07
    14 'Prefactor '    8.4587       1.0000          .0000       .10000E+07
    15 'Prefactor '    .85582E-05   1.0000          .0000       .10000E+07
    16 'Prefactor '    .98155E-06   1.0000          .0000       .10000E+07
    17 'Prefactor '    .49590       1.0000          .0000       .10000E+07
    18 'norm      '    .86886E-05   1.0000          .0000       .10000E+07
    19 'norm      '    4.6327       1.0000          .0000       .10000E+07
    20 'Prefactor '    .14094E-04   1.0000          .0000       .10000E+07
    21 'Prefactor '    8.0589       1.0000          .0000       .10000E+07
    22 'norm      '    .14149E-02   1.0000          .0000       .10000E+07
    23 'Prefactor '    .27756E-08   1.0000          .0000       .10000E+07
    24 'Prefactor '    2.0592       1.0000          .0000       .10000E+07
    25 'Prefactor '    2.1733       1.0000          .0000       .10000E+07
    26 'Prefactor '    .33518E-04   1.0000          .0000       .10000E+07
    27 'Prefactor '    4.4026       1.0000          .0000       .10000E+07
    28 'norm      '    .17494       1.0000          .0000       .10000E+07
    29 'Prefactor '    .88389       1.0000          .0000       .10000E+07
    30 'Normalizat'    1.0081       1.0000         .10000E-01   10.000    
    31 'Prefactor '    .90275       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6800E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   26202.93     FROM MIGRAD    STATUS=CONVERGED    204 CALLS     1800 TOTAL
                     EDM=   .24E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.8%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          2.5004        .83512       -.85570E-08   -.19313E-02
   2  Prefactor     .28366E-07    2.1692        .22094E-07** at limit **
   3  Prefactor     .16310E-01    102.19        .10089E-05** at limit **
   4  Prefactor      .0000        .72714        .36840E-07** at limit **
   5  norm           .0000        .49792        .36809E-07** at limit **
   6  Prefactor     .55511E-10    2.9513        .34511E-06** at limit **
   7  Prefactor     .11324E-07    11.296        .20663E-06** at limit **
   8  Prefactor     .44409E-09    3.3007       -.19243E-06** at limit **
   9  Prefactor     .23814E-07    2.7515        .81335E-07** at limit **
  10  Prefactor      .0000        2.5726        .33086E-07** at limit **
  11  norm          39.899        5.3139        .24290E-07    .67229E-02
  12  Prefactor     25.651        2.9205        .37839E-07   -.64259E-01
  13  Prefactor     19.605        1.4807        .12136E-07   -.20205E-01
  14  Prefactor     8.4482        2.8422        .80287E-07    .29933E-02
  15  Prefactor      .0000        6.9346       -.10480E-06** at limit **
  16  Prefactor      .0000        1.1567       -.13415E-06** at limit **
  17  Prefactor     .49735        .92003        .91083E-08    .77554E-04
  18  norm          .55511E-10    3.7223        .38737E-07** at limit **
  19  norm          4.6452        4.5306        .68499E-08   -.23928E-04
  20  Prefactor      .0000        .67102        .16791E-07** at limit **
  21  Prefactor     8.0505        3.4009        .56333E-08    .68149E-03
  22  norm          .16653E-09    18.020       -.25609E-06** at limit **
  23  Prefactor      .0000        .16932        .21823E-08** at limit **
  24  Prefactor     2.0593        .59835       -.15106E-07   -.33866E-02
  25  Prefactor     2.1709        1.3822       -.50888E-07   -.18190E-02
  26  Prefactor      .0000        1.3046       -.50873E-07** at limit **
  27  Prefactor     4.4078        3.9371        .12625E-08   -.24648E-03
  28  norm          .17515        .25056        .16286E-07** at limit **
  29  Prefactor     .88225        2.6146       -.98023E-07   -.54148E-03
  30  Normalizat    1.0082        .10267        .93092E-06   -.16067E-04
  31  Prefactor     .90266        .10127       -.11183E-05   -.59372E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 2.50044
  Prefactor  = 2.83662e-08
  Prefactor  = 0.0163096
  Prefactor  = 0
  norm       = 0
  Prefactor  = 5.55112e-11
  Prefactor  = 1.13243e-08
  Prefactor  = 4.44089e-10
  Prefactor  = 2.38143e-08
  Prefactor  = 0
  norm       = 39.8994
  Prefactor  = 25.6515
  Prefactor  = 19.6054
  Prefactor  = 8.44821
  Prefactor  = 0
  Prefactor  = 0
  Prefactor  = 0.497345
  norm       = 5.55112e-11
  norm       = 4.64519
  Prefactor  = 0
  Prefactor  = 8.05047
  norm       = 1.66533e-10
  Prefactor  = 0
  Prefactor  = 2.05932
  Prefactor  = 2.17093
  Prefactor  = 0
  Prefactor  = 4.4078
  norm       = 0.175151
  Prefactor  = 0.882246
  Normalizat = 1.00824
  Prefactor  = 0.902661
 **********
 **   18 **HESSE 
 **********

 FCN=   26202.93     FROM HESSE     STATUS=OK           692 CALLS     2492 TOTAL
                     EDM=   .74E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          2.5004        .83647        .64596E-03   -1.5676    
   2  Prefactor     .28366E-07    4.9219        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .16310E-01    1.4236        .57048E-02   -1.5705    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor      .0000        .72642        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm           .0000        .49664        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .55511E-10    2.9209        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .11324E-07    11.544        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .44409E-09    3.3128        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .23814E-07    4.7715        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor      .0000        2.5687        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  norm          39.899        5.4189        .15836E-03   -1.5582    
  12  Prefactor     25.651        15.128        .19579E-03   -1.5607    
  13  Prefactor     19.605        18.701        .22640E-03   -1.5619    
  14  Prefactor     8.4482        2.8562        .34444E-03   -1.5650    
  15  Prefactor      .0000        6.9573        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor      .0000        1.1550        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     .49735        .94011        .79123E-03   -1.5694    
  18  norm          .55511E-10    3.7335        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  norm          4.6452        4.5382        .46737E-03   -1.5665    
  20  Prefactor      .0000        .66776        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     8.0505        3.3977        .35294E-03   -1.5651    
  22  norm          .16653E-09    18.095        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor      .0000        .16807        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     2.0593        .60642        .71989E-03   -1.5679    
  25  Prefactor     2.1709        1.4204        .69818E-03   -1.5678    
  26  Prefactor      .0000        .29192        .42118E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  27  Prefactor     4.4078        3.9479        .47974E-03   -1.5666    
  28  norm          .17515        .25837        .22841E-02   -1.5700    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  29  Prefactor     .88225        2.6545        .46880E-03   -1.5689    
  30  Normalizat    1.0082        .87064E-01    .46268E-01   -.92755    
  31  Prefactor     .90266        .85378E-01    .45040E-01   -.96048    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 7.4301e-07
Minuit parameter uncertainties:
  1  0.836469
  2  0.00074718
  3  0.304755
  4  8.85097e-07
  5  9.43513e-07
  6  2.64102e-05
  7  0.000722561
  8  7.8538e-05
  9  0.000674111
  10  1.34736e-05
  11  5.4189
  12  15.1284
  13  18.7011
  14  2.85616
  15  2.17214e-06
  16  7.16182e-06
  17  0.940107
  18  3.20468e-05
  19  4.53821
  20  9.76932e-07
  21  3.39772
  22  0.000108437
  23  1.68555e-07
  24  0.606417
  25  1.42043
  26  9.69654e-07
  27  3.94794
  28  0.258368
  29  2.65446
  30  0.0870758
  31  0.0853903
Done.

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

Extracting fit parameters...

4FGL J1608.0+4949
   Spectrum: PowerLaw
308    Prefactor:  1.961e+01  1.870e+01  0.000e+00  1.000e+06 ( 1.000e-14)
309        Index:  2.267e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
310        Scale:  1.615e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
677    Prefactor:  9.027e-01  8.539e-02  0.000e+00  1.000e+01 ( 1.000e+00)
678        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
679        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
676   Normalization:  1.008e+00  8.708e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 2.47
Ra Dec: 242.014 49.829
Photon Index (Fixed Index): 2.27 +/- 0.00
Photon Flux (Fixed Index): 8.49e-09 +/- 8.09e-09
Energy Flux (Fixed Index): 3.39e-06 +/- 3.23e-06

TS (Fixed Index): 2.47
Ra Dec: 242.014 49.829
Photon Flux Upper Limit: 2.91422948124e-08 ph cm-2 s-1
Energy Flux Upper Limit: 0.00223125390149 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/59978176/likelihoodResults_754876801_755481601_4FGL_J1608.0+4949_weekly_bin853.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) = 26202.924759
delta logL = 0.00257560597674

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 26202.9241869
delta logL = 0.00314771706689

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    20.257       1.0000          .0000       .10000E+07
     2 'Index     '    2.1980       1.0000          .0000       10.000    
     3 'Normalizat'    1.0094       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .90212       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6800E+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=   26202.92     FROM MIGRAD    STATUS=CONVERGED     96 CALLS      272 TOTAL
                     EDM=   .19E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     20.317        21.225        .88902E-05    .58313E-03
   2  Index         2.1892        .96852        .34431E-02    .11558E-03
   3  Normalizat    1.0095        .10063        .23968E-03   -.64509E-04
   4  Prefactor     .90204        .10080        .25357E-03   -.10710E-02
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 20.3167
  Index      = 2.18921
  Normalizat = 1.00945
  Prefactor  = 0.902042
 **********
 **   18 **HESSE 
 **********

 FCN=   26202.92     FROM HESSE     STATUS=OK            23 CALLS      295 TOTAL
                     EDM=   .18E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     20.317        21.065        .35561E-06   -1.5618    
   2  Index         2.1892        .96098        .13772E-03   -.59699    
   3  Normalizat    1.0095        .10069        .95872E-05   -.92714    
   4  Prefactor     .90204        .10089        .50713E-04   -.96070    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.84602e-09
Minuit parameter uncertainties:
  1  21.0654
  2  0.969851
  3  0.100713
  4  0.100912
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) = 26202.9241408
delta logL = 0.00319382500311

Extracting fit parameters...

4FGL J1608.0+4949
   Spectrum: PowerLaw
308    Prefactor:  2.032e+01  2.107e+01  0.000e+00  1.000e+06 ( 1.000e-14)
309        Index:  2.189e+00  9.699e-01  0.000e+00  1.000e+01 (-1.000e+00)
310        Scale:  1.615e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
677    Prefactor:  9.020e-01  1.009e-01  0.000e+00  1.000e+01 ( 1.000e+00)
678        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
679        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
676   Normalization:  1.009e+00  1.007e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 2.48
Ra Dec: 242.014 49.829
Photon Index (Free Index): 2.19 +/- 0.97
Photon Flux (Free Index): 7.55e-09 +/- 1.35e-08
Energy Flux (Free Index): 3.46e-06 +/- 3.52e-06

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/59978176/cmap_HighResolution_754876801_755481601_4FGL_J1608.0+4949_weekly_bin853.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='2.23e-03', comment='SUCCESS', photon_flux='8.49e-09', energy_flux2='3.46e-06', photon_flux_error='8.09e-09', dlogl='3.19e-03', energy_flux='3.39e-06', photon_flux2='7.55e-09', job_status='DONE', time_completed='2024-12-10 01:08:05.372334', photon_index_error2='0.97', photon_index2='2.19', ts='2.47', fit_tolerance='1e-08', GAL='0.90', photon_index_error='0.00', photon_flux_upper_limit='2.91e-08', energy_flux_error2='3.52e-06', EG='1.01', time_epoch_completed='1733821685.37', return_code='0', job_id='59978176', GAL2='0.90', EG2='1.01', return_code2='0', energy_flux_error='3.23e-06', photon_flux_error2='1.35e-08', ts2='2.48', photon_index='2.27' WHERE bin_id='853' AND source_name='4FGL J1608.0+4949' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Dec 10 01:08:05 PST 2024

