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


Performing analysis on: 4FGL_J1649.6+0411_weekly_bin806
RA = 252.406, Dec = 4.1926
tmin = 726451201, tmax = 727056001
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='38429869', job_status='RUN', time_executed='2024-01-18 20:50:48.690271', time_epoch_executed='1705639848.69' WHERE source_name='4FGL J1649.6+0411' and cadence='weekly' and bin_id='806'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/38429869

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

Retrieving the FT1 file...

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

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

Retrieving 107 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/38429869/ft1_4FGL_J1649.6+0411_weekly_bin806.fits


Retrieving the FT1 file...

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

Retrieving 107 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/38429869/ft2_4FGL_J1649.6+0411_weekly_bin806.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/38429869/ft1_4FGL_J1649.6+0411_weekly_bin806.fits outfile=/lscratch/kocevski/38429869/ft1_filteredMKT_4FGL_J1649.6+0411_weekly_bin806.fits ra=252.406 dec=4.1926 rad=12.0 tmin=726451201.0 tmax=727056001.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.68
user 3.43
sys 0.18

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/38429869/ft2_4FGL_J1649.6+0411_weekly_bin806.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/38429869/ft2_4FGL_J1649.6+0411_weekly_bin806.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/38429869/ft1_filteredMKT_4FGL_J1649.6+0411_weekly_bin806.fits evtable="EVENTS" outfile="/lscratch/kocevski/38429869/ft1_filtered_4FGL_J1649.6+0411_weekly_bin806.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.50
user 0.22
sys 0.13

Number of photons that the gtmktime cut: 3023

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/38429869/ft1_filtered_4FGL_J1649.6+0411_weekly_bin806.fits" evtable="EVENTS" scfile=/lscratch/kocevski/38429869/ft2_4FGL_J1649.6+0411_weekly_bin806.fits sctable="SC_DATA" outfile=/lscratch/kocevski/38429869/ltcube_726451201_727056001_4FGL_J1649.6+0411_weekly_bin806.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/38429869/ft2_4FGL_J1649.6+0411_weekly_bin806.fits
.....................!
real 21.26
user 20.83
sys 0.24

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/38429869/ft1_filtered_4FGL_J1649.6+0411_weekly_bin806.fits evtable="EVENTS" scfile=/lscratch/kocevski/38429869/ft2_4FGL_J1649.6+0411_weekly_bin806.fits sctable="SC_DATA" expcube=/lscratch/kocevski/38429869/ltcube_726451201_727056001_4FGL_J1649.6+0411_weekly_bin806.fits outfile=/lscratch/kocevski/38429869/expmap_726451201_727056001_4FGL_J1649.6+0411_weekly_bin806.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/38429869/ltcube_726451201_727056001_4FGL_J1649.6+0411_weekly_bin806.fits
.....................!
real 73.57
user 69.17
sys 4.08

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 FHES J1723.5-0501 in ROI with RadialGaussian spatial model.
Added 163 point sources and 1 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 J1649.6+0411 @ 252.406 4.1926

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/38429869/ft1_filtered_4FGL_J1649.6+0411_weekly_bin806.fits scfile=/lscratch/kocevski/38429869/ft2_4FGL_J1649.6+0411_weekly_bin806.fits outfile=/lscratch/kocevski/38429869/cmap_726451201_727056001_4FGL_J1649.6+0411_weekly_bin806.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=252.406 yref=4.1926 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.39
user 0.24
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/38429869/ft1_filtered_4FGL_J1649.6+0411_weekly_bin806.fits scfile=/lscratch/kocevski/38429869/ft2_4FGL_J1649.6+0411_weekly_bin806.fits outfile=/lscratch/kocevski/38429869/cmap_HighResolution_726451201_727056001_4FGL_J1649.6+0411_weekly_bin806.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=252.406 yref=4.1926 axisrot=0.0 rafield="RA" decfield="DEC" proj="AIT" hpx_ordering_scheme="RING" hpx_order=3 hpx_ebin=yes hpx_region="" evtable="EVENTS" sctable="SC_DATA" efield="ENERGY" tfield="TIME" chatter=2 clobber=yes debug=no gui=no mode="ql"

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

This is gtbin version HEAD
real 0.41
user 0.25
sys 0.13

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/38429869/ft1_filtered_4FGL_J1649.6+0411_weekly_bin806.fits evtable="EVENTS" scfile=/lscratch/kocevski/38429869/ft2_4FGL_J1649.6+0411_weekly_bin806.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/38429869/Model_4FGL_J1649.6+0411_weekly_bin806.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 FHES J1723.5-0501
adding source GAL_V02
Working on...
/lscratch/kocevski/38429869/ft1_filtered_4FGL_J1649.6+0411_weekly_bin806.fits.....................!
real 102.92
user 101.24
sys 1.23

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/38429869/ft1_filtered_4FGL_J1649.6+0411_weekly_bin806.fits', '/lscratch/kocevski/38429869/ft2_4FGL_J1649.6+0411_weekly_bin806.fits', expMap='/lscratch/kocevski/38429869/expmap_726451201_727056001_4FGL_J1649.6+0411_weekly_bin806.fits', expCube='/lscratch/kocevski/38429869/ltcube_726451201_727056001_4FGL_J1649.6+0411_weekly_bin806.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/38429869/Model_4FGL_J1649.6+0411_weekly_bin806.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1649.6+0411'

4FGL J1649.6+0411
   Spectrum: PowerLaw
267    Prefactor:  1.027e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-12)
268        Index:  2.594e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
269        Scale:  7.155e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/38429869/ft1_filtered_4FGL_J1649.6+0411_weekly_bin806.fits
Spacecraft file(s): /lscratch/kocevski/38429869/ft2_4FGL_J1649.6+0411_weekly_bin806.fits
Exposure map: /lscratch/kocevski/38429869/expmap_726451201_727056001_4FGL_J1649.6+0411_weekly_bin806.fits
Exposure cube: /lscratch/kocevski/38429869/ltcube_726451201_727056001_4FGL_J1649.6+0411_weekly_bin806.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/38429869/Model_4FGL_J1649.6+0411_weekly_bin806.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) = 32178.1245089

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    11.124       1.0000          .0000       .10000E+07
     2 'Prefactor '    .35002E-02   1.0000          .0000       .10000E+07
     3 'Prefactor '    .48884E-04   1.0000          .0000       .10000E+07
     4 'Prefactor '    4.7197       1.0000          .0000       .10000E+07
     5 'Prefactor '    .83972       1.0000          .0000       .10000E+07
     6 'Prefactor '    .20900E-02   1.0000          .0000       .10000E+07
     7 'Prefactor '    .97832E-04   1.0000          .0000       .10000E+07
     8 'Prefactor '    .68834E-08   1.0000          .0000       .10000E+07
     9 'Prefactor '    2.5044       1.0000          .0000       .10000E+07
    10 'Prefactor '    101.28       1.0000          .0000       .10000E+07
    11 'Prefactor '    .15926E-01   1.0000          .0000       .10000E+07
    12 'Prefactor '    6.5383       1.0000          .0000       .10000E+07
    13 'Prefactor '    .59413       1.0000          .0000       .10000E+07
    14 'Prefactor '    .20916E-03   1.0000          .0000       .10000E+07
    15 'norm      '    3.0801       1.0000          .0000       .10000E+07
    16 'Prefactor '    51.997       1.0000          .0000       .10000E+07
    17 'norm      '    .54413E-03   1.0000          .0000       .10000E+07
    18 'norm      '    1.4538       1.0000          .0000       .10000E+07
    19 'Normalizat'    1.2681       1.0000         .10000E-01   10.000    
    20 'Prefactor '    1.0031       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5570E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   32178.12     FROM MIGRAD    STATUS=CONVERGED    149 CALLS     1634 TOTAL
                     EDM=   .15E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.3%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          11.109        9.1421       -.43843E-06   -.18755E-03
   2  Prefactor      .0000        10.655        .68566E-06** at limit **
   3  Prefactor     .59952E-08    235.01        .24510E-04** at limit **
   4  Prefactor     4.7239        5.9832       -.45368E-06   -.11726E-01
   5  Prefactor     .84862        2.7797       -.36584E-06   -.81333E-02
   6  Prefactor     .28311E-08    11.943       -.17138E-05** at limit **
   7  Prefactor      .0000        5.3841        .13354E-06** at limit **
   8  Prefactor      .0000        .67631       -.17661E-07** at limit **
   9  Prefactor     2.5056        3.0961        .45206E-07   -.41812E-03
  10  Prefactor     101.17        3.1715        .22862E-06   -.37245E-01
  11  Prefactor     .99920E-09    19.448       -.74304E-06** at limit **
  12  Prefactor     6.5247        4.5604       -.24314E-08   -.32088E-02
  13  Prefactor     .12768E-08    120.47        .25851E-05** at limit **
  14  Prefactor     .38858E-09    3.8000        .12970E-07** at limit **
  15  norm          3.0543        4.1666        .59888E-07    .99597E-03
  16  Prefactor     51.882        2.0262        .16096E-06    .44462E-01
  17  norm           .0000        4.6533        .11300E-06** at limit **
  18  norm          1.4556        2.4294       -.20505E-06   -.91853E-02
  19  Normalizat    1.2682        .17686       -.69131E-05   -.10288E-02
  20  Prefactor     1.0032        .47932E-01    .12191E-05   -.21136E-02
                               ERR DEF=  .500    
Final values: 
  norm       = 11.1088
  Prefactor  = 0
  Prefactor  = 5.9952e-09
  Prefactor  = 4.72388
  Prefactor  = 0.848619
  Prefactor  = 2.83107e-09
  Prefactor  = 0
  Prefactor  = 0
  Prefactor  = 2.50557
  Prefactor  = 101.166
  Prefactor  = 9.99201e-10
  Prefactor  = 6.52474
  Prefactor  = 1.27676e-09
  Prefactor  = 3.88578e-10
  norm       = 3.05426
  Prefactor  = 51.8822
  norm       = 0
  norm       = 1.45557
  Normalizat = 1.26823
  Prefactor  = 1.00318
 **********
 **   18 **HESSE 
 **********

 FCN=   32178.12     FROM HESSE     STATUS=OK           335 CALLS     1969 TOTAL
                     EDM=   .68E-05    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          11.109        9.1915        .30013E-03   -1.5641    
   2  Prefactor      .0000        10.680        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .59952E-08    229.88        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     4.7239        6.0469        .46294E-03   -1.5664    
   5  Prefactor     .84862        2.8182        .50020E-03   -1.5690    
   6  Prefactor     .28311E-08    11.952        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor      .0000        5.3898        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor      .0000        .67524        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     2.5056        3.1129        .64546E-03   -1.5676    
  10  Prefactor     101.17        49.039        .99372E-04   -1.5507    
  11  Prefactor     .99920E-09    19.237        .17321E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     6.5247        4.6736        .39224E-03   -1.5657    
  13  Prefactor     .12768E-08    120.98        .69755E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .38858E-09    3.8103        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          3.0543        4.1833        .57767E-03   -1.5673    
  16  Prefactor     51.882        52.874        .13869E-03   -1.5564    
  17  norm           .0000        4.6497        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  norm          1.4556        2.4459        .89279E-03   -1.5684    
  19  Normalizat    1.2682        .16011        .10883       -.84520    
  20  Prefactor     1.0032        .42574E-01    .33774E-01   -.92624    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.79795e-06
Minuit parameter uncertainties:
  1  9.19155
  2  2.06083e-05
  3  0.00234544
  4  6.04689
  5  2.81816
  6  0.000368532
  7  1.89359e-05
  8  4.86009e-06
  9  3.11286
  10  49.039
  11  0.000276139
  12  4.67357
  13  0.000779316
  14  7.47845e-05
  15  4.18329
  16  52.8741
  17  6.27849e-06
  18  2.44585
  19  0.160168
  20  0.042575
Done.

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

Extracting fit parameters...

4FGL J1649.6+0411
   Spectrum: PowerLaw
267    Prefactor:  0.000e+00  4.860e-06  0.000e+00  1.000e+06 ( 1.000e-12)
268        Index:  2.594e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
269        Scale:  7.155e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
554    Prefactor:  1.003e+00  4.258e-02  0.000e+00  1.000e+01 ( 1.000e+00)
555        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
556        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
550   Normalization:  1.268e+00  1.602e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.00
Ra Dec: 252.406 4.193
Photon Flux Upper Limit: 3.51443540985e-08 ph cm-2 s-1
Energy Flux Upper Limit: 0.00274949981196 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/38429869/likelihoodResults_726451201_727056001_4FGL_J1649.6+0411_weekly_bin806.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) = 32178.1271808
delta logL = -0.00283545202183

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 32178.1243454
delta logL = -8.39172571432e-08

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

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

 FCN=   32178.12     FROM MIGRAD    STATUS=CONVERGED     34 CALLS      238 TOTAL
                     EDM=   .43E-12  STRATEGY=1  ERROR MATRIX UNCERTAINTY=100.0%

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor      .0000        .68323        .42118E-03** at limit **
   2  Index         2.5656        1.1437        .15179E-04     .0000    
   3  Normalizat    1.2682        1.0866       -.38774E-05    .15300E-04
   4  Prefactor     1.0032        1.2966        .13499E-05    .68950E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0
  Index      = 2.56556
  Normalizat = 1.26823
  Prefactor  = 1.00318
 **********
 **   18 **HESSE 
 **********
  MNHESS FAILS AND WILL RETURN DIAGONAL MATRIX. 

 FCN=   32178.12     FROM HESSE     STATUS=FAILED         9 CALLS      247 TOTAL
                     EDM=   .43E-12  STRATEGY=1  ERROR MATRIX UNCERTAINTY=100.0%

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor      .0000        .68323        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         .74333        1.9072        .15179E-04   -.50852    
   3  Normalizat    1.2682        1.0866       -.38774E-05   -.84520    
   4  Prefactor     1.0032        1.2966        .13499E-05   -.92624    
                               ERR DEF=  .500    
Minuit fit quality: 1   estimated distance: 4.28976e-13
Minuit parameter uncertainties:
  1  8.07228e-07
  2  1.15723
  3  1.10705
  4  1.3406
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Done.

MINUIT Return Code (Free Index): 101
logL (Free Index) = 32178.1243453
delta logL = 4.54747350886e-10

Extracting fit parameters...

4FGL J1649.6+0411
   Spectrum: PowerLaw
267    Prefactor:  0.000e+00  8.072e-07  0.000e+00  1.000e+06 ( 1.000e-12)
268        Index:  2.566e+00  1.157e+00  0.000e+00  1.000e+01 (-1.000e+00)
269        Scale:  7.155e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
554    Prefactor:  1.003e+00  1.341e+00  0.000e+00  1.000e+01 ( 1.000e+00)
555        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
556        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
550   Normalization:  1.268e+00  1.107e+00  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.00
Ra Dec: 252.406 4.193

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/38429869/cmap_HighResolution_726451201_727056001_4FGL_J1649.6+0411_weekly_bin806.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='2.75e-03', job_status='DONE', photon_flux_upper_limit='3.51e-08', time_completed='2024-01-18 21:03:17.136189', job_id='38429869', GAL2='1.00', fit_tolerance='1e-08', EG2='1.27', EG='1.27', time_epoch_completed='1705640597.14', return_code2='101', ts='0.00', comment='SUCCESS', return_code='0', GAL='1.00', dlogl='4.55e-10', ts2='0.00', photon_index_error='0.00', photon_index='2.59' WHERE bin_id='806' AND source_name='4FGL J1649.6+0411' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Thu Jan 18 21:03:17 PST 2024

