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


Performing analysis on: 4FGL_J1613.6+3411_weekly_bin855
RA = 243.421, Dec = 34.1982
tmin = 756086401, tmax = 756691201
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='60729995', job_status='RUN', time_executed='2024-12-24 03:55:56.884080', time_epoch_executed='1735041356.88' WHERE source_name='4FGL J1613.6+3411' and cadence='weekly' and bin_id='855'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/60729995

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

Retrieving the FT1 file...

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

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

Retrieving 65 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/60729995/ft1_4FGL_J1613.6+3411_weekly_bin855.fits


Retrieving the FT1 file...

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

Retrieving 65 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/60729995/ft2_4FGL_J1613.6+3411_weekly_bin855.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/60729995/ft1_4FGL_J1613.6+3411_weekly_bin855.fits outfile=/lscratch/kocevski/60729995/ft1_filteredMKT_4FGL_J1613.6+3411_weekly_bin855.fits ra=243.421 dec=34.1982 rad=12.0 tmin=756086401.0 tmax=756691201.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.12
user 2.62
sys 0.26

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

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/60729995/ft2_4FGL_J1613.6+3411_weekly_bin855.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/60729995/ft1_filteredMKT_4FGL_J1613.6+3411_weekly_bin855.fits evtable="EVENTS" outfile="/lscratch/kocevski/60729995/ft1_filtered_4FGL_J1613.6+3411_weekly_bin855.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.53
user 0.20
sys 0.17

Number of photons that the gtmktime cut: 814

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/60729995/ft1_filtered_4FGL_J1613.6+3411_weekly_bin855.fits" evtable="EVENTS" scfile=/lscratch/kocevski/60729995/ft2_4FGL_J1613.6+3411_weekly_bin855.fits sctable="SC_DATA" outfile=/lscratch/kocevski/60729995/ltcube_756086401_756691201_4FGL_J1613.6+3411_weekly_bin855.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/60729995/ft2_4FGL_J1613.6+3411_weekly_bin855.fits
.....................!
real 12.88
user 11.78
sys 0.36

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/60729995/ft1_filtered_4FGL_J1613.6+3411_weekly_bin855.fits evtable="EVENTS" scfile=/lscratch/kocevski/60729995/ft2_4FGL_J1613.6+3411_weekly_bin855.fits sctable="SC_DATA" expcube=/lscratch/kocevski/60729995/ltcube_756086401_756691201_4FGL_J1613.6+3411_weekly_bin855.fits outfile=/lscratch/kocevski/60729995/expmap_756086401_756691201_4FGL_J1613.6+3411_weekly_bin855.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/60729995/ltcube_756086401_756691201_4FGL_J1613.6+3411_weekly_bin855.fits
.....................!
real 69.91
user 65.21
sys 4.01

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/60729995/ft1_filtered_4FGL_J1613.6+3411_weekly_bin855.fits scfile=/lscratch/kocevski/60729995/ft2_4FGL_J1613.6+3411_weekly_bin855.fits outfile=/lscratch/kocevski/60729995/cmap_756086401_756691201_4FGL_J1613.6+3411_weekly_bin855.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.54
user 0.24
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/60729995/ft1_filtered_4FGL_J1613.6+3411_weekly_bin855.fits scfile=/lscratch/kocevski/60729995/ft2_4FGL_J1613.6+3411_weekly_bin855.fits outfile=/lscratch/kocevski/60729995/cmap_HighResolution_756086401_756691201_4FGL_J1613.6+3411_weekly_bin855.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.48
user 0.24
sys 0.15

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

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/60729995/ft1_filtered_4FGL_J1613.6+3411_weekly_bin855.fits', '/lscratch/kocevski/60729995/ft2_4FGL_J1613.6+3411_weekly_bin855.fits', expMap='/lscratch/kocevski/60729995/expmap_756086401_756691201_4FGL_J1613.6+3411_weekly_bin855.fits', expCube='/lscratch/kocevski/60729995/ltcube_756086401_756691201_4FGL_J1613.6+3411_weekly_bin855.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/60729995/Model_4FGL_J1613.6+3411_weekly_bin855.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/60729995/ft1_filtered_4FGL_J1613.6+3411_weekly_bin855.fits
Spacecraft file(s): /lscratch/kocevski/60729995/ft2_4FGL_J1613.6+3411_weekly_bin855.fits
Exposure map: /lscratch/kocevski/60729995/expmap_756086401_756691201_4FGL_J1613.6+3411_weekly_bin855.fits
Exposure cube: /lscratch/kocevski/60729995/ltcube_756086401_756691201_4FGL_J1613.6+3411_weekly_bin855.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/60729995/Model_4FGL_J1613.6+3411_weekly_bin855.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) = 8694.41056552

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    17.841       1.0000          .0000       .10000E+07
     2 'norm      '    2.3544       1.0000          .0000       .10000E+07
     3 'Prefactor '    .39397E-03   1.0000          .0000       .10000E+07
     4 'Prefactor '    .12067E-02   1.0000          .0000       .10000E+07
     5 'norm      '    3.6113       1.0000          .0000       .10000E+07
     6 'Prefactor '    .23944E-04   1.0000          .0000       .10000E+07
     7 'Prefactor '    8.0186       1.0000          .0000       .10000E+07
     8 'Prefactor '    1.6571       1.0000          .0000       .10000E+07
     9 'Prefactor '    2.5197       1.0000          .0000       .10000E+07
    10 'Prefactor '    .51070E-08   1.0000          .0000       .10000E+07
    11 'norm      '    .30180E-01   1.0000          .0000       .10000E+07
    12 'norm      '    .79597E-05   1.0000          .0000       .10000E+07
    13 'Prefactor '    .12584E-02   1.0000          .0000       .10000E+07
    14 'norm      '    .54175E-02   1.0000          .0000       .10000E+07
    15 'Prefactor '    .32779       1.0000          .0000       .10000E+07
    16 'Prefactor '    4.2665       1.0000          .0000       .10000E+07
    17 'Prefactor '    .14139E-02   1.0000          .0000       .10000E+07
    18 'Prefactor '    1.9844       1.0000          .0000       .10000E+07
    19 'norm      '    .86599       1.0000          .0000       .10000E+07
    20 'Normalizat'    1.0389       1.0000         .10000E-01   10.000    
    21 'Prefactor '    .83420       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=   8694.403     FROM MIGRAD    STATUS=CONVERGED    164 CALLS     1692 TOTAL
                     EDM=   .94E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.2%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     18.634        70.753        .14394E-04    .63695E-03
   2  norm          2.3542        .96818        .23773E-06   -.27537E-01
   3  Prefactor     .24425E-08    20.933        .41903E-05** at limit **
   4  Prefactor      .0000        7.0857       -.42265E-05** at limit **
   5  norm          3.6004        7.1358       -.41685E-06   -.46909E-03
   6  Prefactor     .55511E-10    8.4354        .67126E-05** at limit **
   7  Prefactor     8.0142        9.3993       -.16186E-05   -.78010E-03
   8  Prefactor     1.6567        6.3548        .46833E-07   -.27665E-03
   9  Prefactor     2.5211        2.5194        .47541E-06    .49689E-02
  10  Prefactor     .11102E-09    .59491       -.47868E-06** at limit **
  11  norm          .30221E-01    .51678E-01   -.53798E-07** at limit **
  12  norm          .22204E-09    2.7067       -.50715E-06** at limit **
  13  Prefactor     .55511E-10    4.8861       -.23132E-05** at limit **
  14  norm          .27200E-08    14.726       -.76856E-06** at limit **
  15  Prefactor     .32170        2.4180        .71559E-07   -.29843E-02
  16  Prefactor     4.2723        2.1014        .14431E-06   -.14836E-01
  17  Prefactor     .11102E-09    7.6025        .73705E-05** at limit **
  18  Prefactor     1.9855        2.1797       -.45965E-06   -.15783E-01
  19  norm          .86651        1.1869       -.41536E-06   -.30264E-02
  20  Normalizat    1.0388        .17543       -.14801E-04   -.38702E-03
  21  Prefactor     .83425        .13365        .53414E-05   -.29802E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 18.6339
  norm       = 2.3542
  Prefactor  = 2.44249e-09
  Prefactor  = 0
  norm       = 3.60041
  Prefactor  = 5.55112e-11
  Prefactor  = 8.01424
  Prefactor  = 1.65669
  Prefactor  = 2.52108
  Prefactor  = 1.11022e-10
  norm       = 0.0302211
  norm       = 2.22045e-10
  Prefactor  = 5.55112e-11
  norm       = 2.72005e-09
  Prefactor  = 0.321704
  Prefactor  = 4.27232
  Prefactor  = 1.11022e-10
  Prefactor  = 1.9855
  norm       = 0.866505
  Normalizat = 1.03877
  Prefactor  = 0.83425
 **********
 **   18 **HESSE 
 **********

 FCN=   8694.403     FROM HESSE     STATUS=OK           367 CALLS     2059 TOTAL
                     EDM=   .77E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     18.634        70.187        .23685E-03   -1.5622    
   2  norm          2.3542        .97057        .66772E-03   -1.5677    
   3  Prefactor     .24425E-08    20.576        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor      .0000        7.0864        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          3.6004        7.1468        .53144E-03   -1.5670    
   6  Prefactor     .55511E-10    .80159        .42118E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     8.0142        9.3923        .35383E-03   -1.5651    
   8  Prefactor     1.6567        6.3703        .81943E-03   -1.5682    
   9  Prefactor     2.5211        2.5236        .64333E-03   -1.5676    
  10  Prefactor     .11102E-09    .59487        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  norm          .30221E-01    .70348E-01    .61498E-03   -1.5704    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm          .22204E-09    2.7119        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .55511E-10    4.9231        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          .27200E-08    14.716        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .32170        5.1951        .24449E-02   -1.5697    
  16  Prefactor     4.2723        3.5931        .48754E-03   -1.5667    
  17  Prefactor     .11102E-09    7.5886        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     1.9855        2.2107        .73537E-03   -1.5680    
  19  norm          .86651        1.1929        .48140E-03   -1.5689    
  20  Normalizat    1.0388        .15189        .41365E-01   -.91743    
  21  Prefactor     .83425        .11407        .44161E-01   -.98478    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 7.66422e-07
Minuit parameter uncertainties:
  1  70.1904
  2  0.970573
  3  0.000447733
  4  1.98708e-05
  5  7.14684
  6  1.02253e-05
  7  9.39227
  8  6.37035
  9  2.52365
  10  1.5655e-05
  11  0.0703481
  12  5.16225e-05
  13  3.36861e-05
  14  0.000398284
  15  2.58557
  16  3.59315
  17  5.21758e-05
  18  2.2107
  19  1.19286
  20  0.151951
  21  0.114106
Done.

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

Extracting fit parameters...

4FGL J1613.6+3411
   Spectrum: PowerLaw
276    Prefactor:  2.521e+00  2.524e+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.342e-01  1.141e-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.039e+00  1.520e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 1.78
Ra Dec: 243.421 34.198
Photon Index (Fixed Index): 2.44 +/- 0.00
Photon Flux (Fixed Index): 2.62e-08 +/- 2.62e-08
Energy Flux (Fixed Index): 8.20e-06 +/- 8.20e-06

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

Saving results to:
/lscratch/kocevski/60729995/likelihoodResults_756086401_756691201_4FGL_J1613.6+3411_weekly_bin855.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) = 8694.37149889
delta logL = 0.0314529909083

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 8694.36021334
delta logL = 0.0427385412349

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    2.1353       1.0000          .0000       .10000E+07
     2 'Index     '    2.7242       1.0000          .0000       10.000    
     3 'Normalizat'    1.0282       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .83955       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=   8694.360     FROM MIGRAD    STATUS=CONVERGED     53 CALLS      204 TOTAL
                     EDM=   .21E-10    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     2.1324        36.650        .70518E-03    .57424E-02
   2  Index         2.7254        3.5527        .22819        .78508E-04
   3  Normalizat    1.0283        .41604E-01    .42352E-01    .80662E-05
   4  Prefactor     .83943        .29614E-01    .44230E-01    .15257E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 2.13235
  Index      = 2.7254
  Normalizat = 1.02828
  Prefactor  = 0.839431
 **********
 **   18 **HESSE 
 **********

 FCN=   8694.360     FROM HESSE     STATUS=OK            33 CALLS      237 TOTAL
                     EDM=   .71E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     2.1324        2.9347        .12053E-04   -1.5679    
   2  Index         2.7254        1.1121        .91791E-02   -.47228    
   3  Normalizat    1.0283        .17330        .24445E-03   -.92089    
   4  Prefactor     .83943        .13351        .21079E-03   -.98291    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 7.08813e-09
Minuit parameter uncertainties:
  1  2.93466
  2  1.12402
  3  0.173393
  4  0.13356
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) = 8694.36021207
delta logL = 0.0427398159918

Extracting fit parameters...

4FGL J1613.6+3411
   Spectrum: PowerLaw
276    Prefactor:  2.132e+00  2.935e+00  0.000e+00  1.000e+06 ( 1.000e-12)
277        Index:  2.725e+00  1.124e+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:  8.394e-01  1.336e-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.028e+00  1.734e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.87
Ra Dec: 243.421 34.198
Photon Index (Free Index): 2.73 +/- 1.12
Photon Flux (Free Index): 3.34e-08 +/- 3.79e-08
Energy Flux (Free Index): 7.89e-06 +/- 7.53e-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/60729995/cmap_HighResolution_756086401_756691201_4FGL_J1613.6+3411_weekly_bin855.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='6.69e-03', comment='SUCCESS', photon_flux='2.62e-08', energy_flux2='7.89e-06', photon_flux_error='2.62e-08', dlogl='4.27e-02', energy_flux='8.20e-06', photon_flux2='3.34e-08', job_status='DONE', time_completed='2024-12-24 04:01:38.427519', photon_index_error2='1.12', photon_index2='2.73', ts='1.78', fit_tolerance='1e-08', GAL='0.83', photon_index_error='0.00', photon_flux_upper_limit='8.64e-08', energy_flux_error2='7.53e-06', EG='1.04', time_epoch_completed='1735041698.43', return_code='0', job_id='60729995', GAL2='0.84', EG2='1.03', return_code2='0', energy_flux_error='8.20e-06', photon_flux_error2='3.79e-08', ts2='1.87', photon_index='2.44' WHERE bin_id='855' AND source_name='4FGL J1613.6+3411' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Dec 24 04:01:38 PST 2024

