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


Performing analysis on: 4FGL_J1613.6+3411_weekly_bin803
RA = 243.421, Dec = 34.1982
tmin = 724636801, tmax = 725241601
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='36902638', job_status='RUN', time_executed='2023-12-26 01:00:53.709825', time_epoch_executed='1703581253.71' WHERE source_name='4FGL J1613.6+3411' and cadence='weekly' and bin_id='803'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/36902638

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

Retrieving the FT1 file...

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

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

Retrieving 107 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/36902638/ft1_4FGL_J1613.6+3411_weekly_bin803.fits


Retrieving the FT1 file...

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

Retrieving 107 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/36902638/ft2_4FGL_J1613.6+3411_weekly_bin803.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/36902638/ft1_4FGL_J1613.6+3411_weekly_bin803.fits outfile=/lscratch/kocevski/36902638/ft1_filteredMKT_4FGL_J1613.6+3411_weekly_bin803.fits ra=243.421 dec=34.1982 rad=12.0 tmin=724636801.0 tmax=725241601.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.02
user 4.62
sys 0.21

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/36902638/ft2_4FGL_J1613.6+3411_weekly_bin803.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/36902638/ft2_4FGL_J1613.6+3411_weekly_bin803.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/36902638/ft1_filteredMKT_4FGL_J1613.6+3411_weekly_bin803.fits evtable="EVENTS" outfile="/lscratch/kocevski/36902638/ft1_filtered_4FGL_J1613.6+3411_weekly_bin803.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.11

Number of photons that the gtmktime cut: 1456

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/36902638/ft1_filtered_4FGL_J1613.6+3411_weekly_bin803.fits" evtable="EVENTS" scfile=/lscratch/kocevski/36902638/ft2_4FGL_J1613.6+3411_weekly_bin803.fits sctable="SC_DATA" outfile=/lscratch/kocevski/36902638/ltcube_724636801_725241601_4FGL_J1613.6+3411_weekly_bin803.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/36902638/ft2_4FGL_J1613.6+3411_weekly_bin803.fits
.....................!
real 20.87
user 19.88
sys 0.23

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/36902638/ft1_filtered_4FGL_J1613.6+3411_weekly_bin803.fits evtable="EVENTS" scfile=/lscratch/kocevski/36902638/ft2_4FGL_J1613.6+3411_weekly_bin803.fits sctable="SC_DATA" expcube=/lscratch/kocevski/36902638/ltcube_724636801_725241601_4FGL_J1613.6+3411_weekly_bin803.fits outfile=/lscratch/kocevski/36902638/expmap_724636801_725241601_4FGL_J1613.6+3411_weekly_bin803.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/36902638/ltcube_724636801_725241601_4FGL_J1613.6+3411_weekly_bin803.fits
.....................!
real 77.08
user 72.18
sys 4.52

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

Setting source of interest to:
4FGL J1613.6+3411 @ 243.421 34.1982

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/36902638/ft1_filtered_4FGL_J1613.6+3411_weekly_bin803.fits scfile=/lscratch/kocevski/36902638/ft2_4FGL_J1613.6+3411_weekly_bin803.fits outfile=/lscratch/kocevski/36902638/cmap_724636801_725241601_4FGL_J1613.6+3411_weekly_bin803.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=243.421 yref=34.1982 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.14

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/36902638/ft1_filtered_4FGL_J1613.6+3411_weekly_bin803.fits scfile=/lscratch/kocevski/36902638/ft2_4FGL_J1613.6+3411_weekly_bin803.fits outfile=/lscratch/kocevski/36902638/cmap_HighResolution_724636801_725241601_4FGL_J1613.6+3411_weekly_bin803.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=243.421 yref=34.1982 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.47
user 0.26
sys 0.12

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/36902638/ft1_filtered_4FGL_J1613.6+3411_weekly_bin803.fits evtable="EVENTS" scfile=/lscratch/kocevski/36902638/ft2_4FGL_J1613.6+3411_weekly_bin803.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/36902638/Model_4FGL_J1613.6+3411_weekly_bin803.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/36902638/ft1_filtered_4FGL_J1613.6+3411_weekly_bin803.fits.....................!
real 46.26
user 44.93
sys 1.01

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/36902638/ft1_filtered_4FGL_J1613.6+3411_weekly_bin803.fits', '/lscratch/kocevski/36902638/ft2_4FGL_J1613.6+3411_weekly_bin803.fits', expMap='/lscratch/kocevski/36902638/expmap_724636801_725241601_4FGL_J1613.6+3411_weekly_bin803.fits', expCube='/lscratch/kocevski/36902638/ltcube_724636801_725241601_4FGL_J1613.6+3411_weekly_bin803.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/36902638/Model_4FGL_J1613.6+3411_weekly_bin803.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1613.6+3411'

4FGL J1613.6+3411
   Spectrum: PowerLaw
276    Prefactor:  2.261e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-12)
277        Index:  2.437e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
278        Scale:  7.801e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/36902638/ft1_filtered_4FGL_J1613.6+3411_weekly_bin803.fits
Spacecraft file(s): /lscratch/kocevski/36902638/ft2_4FGL_J1613.6+3411_weekly_bin803.fits
Exposure map: /lscratch/kocevski/36902638/expmap_724636801_725241601_4FGL_J1613.6+3411_weekly_bin803.fits
Exposure cube: /lscratch/kocevski/36902638/ltcube_724636801_725241601_4FGL_J1613.6+3411_weekly_bin803.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/36902638/Model_4FGL_J1613.6+3411_weekly_bin803.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) = 15427.9152238

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    67.486       1.0000          .0000       .10000E+07
     2 'norm      '    .94127       1.0000          .0000       .10000E+07
     3 'Prefactor '    .26808E-01   1.0000          .0000       .10000E+07
     4 'Prefactor '    .39150E-03   1.0000          .0000       .10000E+07
     5 'norm      '    .90445E-03   1.0000          .0000       .10000E+07
     6 'Prefactor '    .79603E-07   1.0000          .0000       .10000E+07
     7 'Prefactor '    .39108E-05   1.0000          .0000       .10000E+07
     8 'Prefactor '    .21280E-03   1.0000          .0000       .10000E+07
     9 'Prefactor '    2.1630       1.0000          .0000       .10000E+07
    10 'Prefactor '    .55274E-04   1.0000          .0000       .10000E+07
    11 'norm      '    .39228       1.0000          .0000       .10000E+07
    12 'norm      '    1.5047       1.0000          .0000       .10000E+07
    13 'Prefactor '    1.5475       1.0000          .0000       .10000E+07
    14 'norm      '    .18823E-03   1.0000          .0000       .10000E+07
    15 'Prefactor '    .41324E-05   1.0000          .0000       .10000E+07
    16 'Prefactor '    4.9010       1.0000          .0000       .10000E+07
    17 'Prefactor '    26.761       1.0000          .0000       .10000E+07
    18 'Prefactor '    1.4144       1.0000          .0000       .10000E+07
    19 'norm      '    3.6132       1.0000          .0000       .10000E+07
    20 'Normalizat'    1.0919       1.0000         .10000E-01   10.000    
    21 'Prefactor '    .88087       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6140E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   15427.91     FROM MIGRAD    STATUS=CONVERGED    139 CALLS     1757 TOTAL
                     EDM=   .13E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.2%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     67.098        55.693       -.20578E-06   -.76286E-04
   2  norm          .94349        .59490        .14581E-07   -.33565E-02
   3  Prefactor     .11102E-09    19.043       -.36700E-06** at limit **
   4  Prefactor      .0000        6.7042        .68962E-07** at limit **
   5  norm          .55511E-10    5.0567        .18015E-06** at limit **
   6  Prefactor      .0000        .46646       -.51036E-07** at limit **
   7  Prefactor     .55511E-10    3.6071       -.33599E-06** at limit **
   8  Prefactor     .11102E-09    3.2416       -.43453E-06** at limit **
   9  Prefactor     2.1616        2.2036       -.29155E-08    .40841E-03
  10  Prefactor      .0000        2.6883        .18820E-06** at limit **
  11  norm          .39233        .10108        .29055E-07   -.39181E-01
  12  norm          1.5280        4.4910        .29663E-06   -.90761E-03
  13  Prefactor     1.5513        1.3200        .24042E-07    .19394E-02
  14  norm          .33307E-09    6.9065        .59237E-06** at limit **
  15  Prefactor     .55511E-10    1.0635       -.40116E-06** at limit **
  16  Prefactor     4.9019        .96525       -.88239E-07    .84228E-02
  17  Prefactor     26.766        1.2255        .16577E-07    .30410E-01
  18  Prefactor     1.4152        1.3059       -.12150E-06    .21147E-02
  19  norm          3.6167        1.2384        .82682E-07   -.50339E-02
  20  Normalizat    1.0922        .14063        .79356E-05   -.17868E-03
  21  Prefactor     .88073        .10744       -.49472E-05   -.77249E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 67.0977
  norm       = 0.94349
  Prefactor  = 1.11022e-10
  Prefactor  = 0
  norm       = 5.55112e-11
  Prefactor  = 0
  Prefactor  = 5.55112e-11
  Prefactor  = 1.11022e-10
  Prefactor  = 2.16161
  Prefactor  = 0
  norm       = 0.392329
  norm       = 1.528
  Prefactor  = 1.5513
  norm       = 3.33067e-10
  Prefactor  = 5.55112e-11
  Prefactor  = 4.90187
  Prefactor  = 26.7656
  Prefactor  = 1.41515
  norm       = 3.61672
  Normalizat = 1.09222
  Prefactor  = 0.880728
 **********
 **   18 **HESSE 
 **********

 FCN=   15427.91     FROM HESSE     STATUS=OK           375 CALLS     2132 TOTAL
                     EDM=   .92E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     67.098        55.664        .12174E-03   -1.5544    
   2  norm          .94349        .63671        .42948E-03   -1.5689    
   3  Prefactor     .11102E-09    1.5349        .95960E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor      .0000        6.7080        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          .55511E-10    5.0570        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor      .0000        .46252        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .55511E-10    3.6215        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .11102E-09    3.2465        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     2.1616        2.2188        .70005E-03   -1.5679    
  10  Prefactor      .0000        2.6228        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  norm          .39233        .10947        .42235E-03   -1.5695    
  12  norm          1.5280        4.5516        .87222E-03   -1.5683    
  13  Prefactor     1.5513        14.470        .85614E-03   -1.5683    
  14  norm          .33307E-09    6.9188        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .55511E-10    .47531        .23339E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     4.9019        1.0907        .45410E-03   -1.5664    
  17  Prefactor     26.766        9.8919        .19334E-03   -1.5604    
  18  Prefactor     1.4152        1.3218        .91011E-03   -1.5684    
  19  norm          3.6167        1.2386        .53129E-03   -1.5670    
  20  Normalizat    1.0922        .11911        .58065E-01   -.90002    
  21  Prefactor     .88073        .90433E-01    .44761E-01   -.96818    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 9.2235e-07
Minuit parameter uncertainties:
  1  55.6641
  2  0.636715
  3  2.26706e-05
  4  1.13405e-05
  5  3.71532e-05
  6  1.60903e-06
  7  2.19703e-05
  8  3.48003e-05
  9  2.21879
  10  4.12717e-06
  11  0.109468
  12  4.5516
  13  9.47565
  14  9.39685e-05
  15  7.90772e-06
  16  1.09069
  17  9.89188
  18  1.32181
  19  1.23857
  20  0.119141
  21  0.090448
Done.

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

Extracting fit parameters...

4FGL J1613.6+3411
   Spectrum: PowerLaw
276    Prefactor:  2.162e+00  2.219e+00  0.000e+00  1.000e+06 ( 1.000e-12)
277        Index:  2.437e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
278        Scale:  7.801e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
611    Prefactor:  8.807e-01  9.045e-02  0.000e+00  1.000e+01 ( 1.000e+00)
612        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
613        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
610   Normalization:  1.092e+00  1.191e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 1.66
Ra Dec: 243.421 34.198
Photon Index (Fixed Index): 2.44 +/- 0.00
Photon Flux (Fixed Index): 2.25e-08 +/- 2.31e-08
Energy Flux (Fixed Index): 7.03e-06 +/- 7.21e-06

TS (Fixed Index): 1.66
Ra Dec: 243.421 34.198
Photon Flux Upper Limit: 7.32997338872e-08 ph cm-2 s-1
Energy Flux Upper Limit: 0.00567814467756 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/36902638/likelihoodResults_724636801_725241601_4FGL_J1613.6+3411_weekly_bin803.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) = 15427.1768493
delta logL = 0.737480260688

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 15427.1543763
delta logL = 0.759953320479

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   15427.15     FROM MIGRAD    STATUS=CONVERGED     55 CALLS      247 TOTAL
                     EDM=   .35E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     1.1644        9.1084        .10645E-02    .26020E-01
   2  Index         3.4279        2.6012        .13513        .37125E-03
   3  Normalizat    1.0468        .30047E-01    .59157E-01   -.40223E-05
   4  Prefactor     .90263        .23540E-01    .45039E-01    .12023E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 1.16437
  Index      = 3.42786
  Normalizat = 1.04678
  Prefactor  = 0.902632
 **********
 **   18 **HESSE 
 **********

 FCN=   15427.15     FROM HESSE     STATUS=OK            33 CALLS      280 TOTAL
                     EDM=   .49E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     1.1644        3.3283        .80816E-05   -1.5686    
   2  Index         3.4279        1.7670        .77627E-02   -.31985    
   3  Normalizat    1.0468        .14416        .26161E-03   -.91479    
   4  Prefactor     .90263        .11037        .22005E-03   -.96049    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.92504e-10
Minuit parameter uncertainties:
  1  3.3283
  2  1.81062
  3  0.144214
  4  0.110395
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) = 15427.1543716
delta logL = 0.759958023111

Extracting fit parameters...

4FGL J1613.6+3411
   Spectrum: PowerLaw
276    Prefactor:  1.164e+00  3.328e+00  0.000e+00  1.000e+06 ( 1.000e-12)
277        Index:  3.428e+00  1.811e+00  0.000e+00  1.000e+01 (-1.000e+00)
278        Scale:  7.801e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
611    Prefactor:  9.026e-01  1.104e-01  0.000e+00  1.000e+01 ( 1.000e+00)
612        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
613        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
610   Normalization:  1.047e+00  1.442e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 3.33
Ra Dec: 243.421 34.198
Photon Index (Free Index): 3.43 +/- 1.81
Photon Flux (Free Index): 5.50e-08 +/- 3.73e-08
Energy Flux (Free Index): 9.33e-06 +/- 6.82e-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/36902638/cmap_HighResolution_724636801_725241601_4FGL_J1613.6+3411_weekly_bin803.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='5.68e-03', comment='SUCCESS', photon_flux='2.25e-08', energy_flux2='9.33e-06', photon_flux_error='2.31e-08', dlogl='7.60e-01', energy_flux='7.03e-06', photon_flux2='5.50e-08', job_status='DONE', time_completed='2023-12-26 01:09:42.258813', photon_index_error2='1.81', photon_index2='3.43', ts='1.66', fit_tolerance='1e-08', GAL='0.88', photon_index_error='0.00', photon_flux_upper_limit='7.33e-08', energy_flux_error2='6.82e-06', EG='1.09', time_epoch_completed='1703581782.26', return_code='0', job_id='36902638', GAL2='0.90', EG2='1.05', return_code2='0', energy_flux_error='7.21e-06', photon_flux_error2='3.73e-08', ts2='3.33', photon_index='2.44' WHERE bin_id='803' AND source_name='4FGL J1613.6+3411' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Dec 26 01:09:42 PST 2023

