/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_J1849.2+6705_weekly_bin853
RA = 282.319, Dec = 67.0909
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='59978603', job_status='RUN', time_executed='2024-12-10 01:01:50.061470', time_epoch_executed='1733821310.06' WHERE source_name='4FGL J1849.2+6705' and cadence='weekly' and bin_id='853'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/59978603

Creating custom pfile directory:
/lscratch/kocevski/59978603/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/59978603/ft1_4FGL_J1849.2+6705_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/59978603/ft2_4FGL_J1849.2+6705_weekly_bin853.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/59978603/ft1_4FGL_J1849.2+6705_weekly_bin853.fits outfile=/lscratch/kocevski/59978603/ft1_filteredMKT_4FGL_J1849.2+6705_weekly_bin853.fits ra=282.319 dec=67.0909 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.75
user 3.27
sys 0.29

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/59978603/ft2_4FGL_J1849.2+6705_weekly_bin853.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/59978603/ft2_4FGL_J1849.2+6705_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/59978603/ft1_filteredMKT_4FGL_J1849.2+6705_weekly_bin853.fits evtable="EVENTS" outfile="/lscratch/kocevski/59978603/ft1_filtered_4FGL_J1849.2+6705_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.76
user 0.22
sys 0.14

Number of photons that the gtmktime cut: 4774

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/59978603/ft1_filtered_4FGL_J1849.2+6705_weekly_bin853.fits" evtable="EVENTS" scfile=/lscratch/kocevski/59978603/ft2_4FGL_J1849.2+6705_weekly_bin853.fits sctable="SC_DATA" outfile=/lscratch/kocevski/59978603/ltcube_754876801_755481601_4FGL_J1849.2+6705_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/59978603/ft2_4FGL_J1849.2+6705_weekly_bin853.fits
.....................!
real 21.12
user 20.36
sys 0.38

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/59978603/ft1_filtered_4FGL_J1849.2+6705_weekly_bin853.fits evtable="EVENTS" scfile=/lscratch/kocevski/59978603/ft2_4FGL_J1849.2+6705_weekly_bin853.fits sctable="SC_DATA" expcube=/lscratch/kocevski/59978603/ltcube_754876801_755481601_4FGL_J1849.2+6705_weekly_bin853.fits outfile=/lscratch/kocevski/59978603/expmap_754876801_755481601_4FGL_J1849.2+6705_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/59978603/ltcube_754876801_755481601_4FGL_J1849.2+6705_weekly_bin853.fits
.....................!
real 74.23
user 69.36
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
Extended source FHES J2129.9+5833 in ROI with RadialGaussian spatial model.
Extended source FHES J2208.4+6443 in ROI with RadialGaussian spatial model.
Added 184 point sources and 2 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 J1849.2+6705 @ 282.319 67.0909

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/59978603/ft1_filtered_4FGL_J1849.2+6705_weekly_bin853.fits scfile=/lscratch/kocevski/59978603/ft2_4FGL_J1849.2+6705_weekly_bin853.fits outfile=/lscratch/kocevski/59978603/cmap_754876801_755481601_4FGL_J1849.2+6705_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=282.319 yref=67.0909 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.45
user 0.24
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/59978603/ft1_filtered_4FGL_J1849.2+6705_weekly_bin853.fits scfile=/lscratch/kocevski/59978603/ft2_4FGL_J1849.2+6705_weekly_bin853.fits outfile=/lscratch/kocevski/59978603/cmap_HighResolution_754876801_755481601_4FGL_J1849.2+6705_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=282.319 yref=67.0909 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.44
user 0.23
sys 0.16

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/59978603/ft1_filtered_4FGL_J1849.2+6705_weekly_bin853.fits evtable="EVENTS" scfile=/lscratch/kocevski/59978603/ft2_4FGL_J1849.2+6705_weekly_bin853.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/59978603/Model_4FGL_J1849.2+6705_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 FHES J2129.9+5833
adding source FHES J2208.4+6443
adding source GAL_V02
Working on...
/lscratch/kocevski/59978603/ft1_filtered_4FGL_J1849.2+6705_weekly_bin853.fits.....................!
real 213.63
user 211.66
sys 0.68

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/59978603/ft1_filtered_4FGL_J1849.2+6705_weekly_bin853.fits', '/lscratch/kocevski/59978603/ft2_4FGL_J1849.2+6705_weekly_bin853.fits', expMap='/lscratch/kocevski/59978603/expmap_754876801_755481601_4FGL_J1849.2+6705_weekly_bin853.fits', expCube='/lscratch/kocevski/59978603/ltcube_754876801_755481601_4FGL_J1849.2+6705_weekly_bin853.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/59978603/Model_4FGL_J1849.2+6705_weekly_bin853.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1849.2+6705'

4FGL J1849.2+6705
   Spectrum: LogParabola
347         norm:  6.898e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-12)
348        alpha:  2.257e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
349         beta:  9.598e-02  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
350           Eb:  9.504e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/59978603/ft1_filtered_4FGL_J1849.2+6705_weekly_bin853.fits
Spacecraft file(s): /lscratch/kocevski/59978603/ft2_4FGL_J1849.2+6705_weekly_bin853.fits
Exposure map: /lscratch/kocevski/59978603/expmap_754876801_755481601_4FGL_J1849.2+6705_weekly_bin853.fits
Exposure cube: /lscratch/kocevski/59978603/ltcube_754876801_755481601_4FGL_J1849.2+6705_weekly_bin853.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/59978603/Model_4FGL_J1849.2+6705_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) = 48415.5616626

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .66282       1.0000          .0000       .10000E+07
     2 'Prefactor '    2.7574       1.0000          .0000       .10000E+07
     3 'Prefactor '    17.662       1.0000          .0000       .10000E+07
     4 'Prefactor '    1.1991       1.0000          .0000       .10000E+07
     5 'Prefactor '    19.736       1.0000          .0000       .10000E+07
     6 'Prefactor '    .16574E-04   1.0000          .0000       .10000E+07
     7 'norm      '    14.410       1.0000          .0000       .10000E+07
     8 'norm      '    3.0661       1.0000          .0000       .10000E+07
     9 'norm      '    4.8877       1.0000          .0000       .10000E+07
    10 'Prefactor '    10.414       1.0000          .0000       .10000E+07
    11 'Prefactor '    .29288E-03   1.0000          .0000       .10000E+07
    12 'Prefactor '    .34101E-06   1.0000          .0000       .10000E+07
    13 'norm      '    22.255       1.0000          .0000       .10000E+07
    14 'Prefactor '    .20354       1.0000          .0000       .10000E+07
    15 'Prefactor '    .29944E-05   1.0000          .0000       .10000E+07
    16 'Prefactor '    5.2379       1.0000          .0000       .10000E+07
    17 'norm      '    1.3032       1.0000          .0000       .10000E+07
    18 'norm      '    3.5380       1.0000          .0000       .10000E+07
    19 'norm      '    1.6752       1.0000          .0000       .10000E+07
    20 'norm      '    2.4588       1.0000          .0000       .10000E+07
    21 'Prefactor '    .18722E-03   1.0000          .0000       .10000E+07
    22 'Prefactor '    1.2913       1.0000          .0000       .10000E+07
    23 'norm      '    3.5750       1.0000          .0000       .10000E+07
    24 'norm      '    4.6306       1.0000          .0000       .10000E+07
    25 'norm      '    3.3521       1.0000          .0000       .10000E+07
    26 'Prefactor '    21.348       1.0000          .0000       .10000E+07
    27 'norm      '    2.8951       1.0000          .0000       .10000E+07
    28 'Prefactor '    29.775       1.0000          .0000       .10000E+07
    29 'norm      '    .27296E-04   1.0000          .0000       .10000E+07
    30 'Normalizat'    .95774       1.0000         .10000E-01   10.000    
    31 'Prefactor '    1.0306       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6180E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   48413.84     FROM MIGRAD    STATUS=CONVERGED    150 CALLS     1709 TOTAL
                     EDM=   .52E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.6%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .66248        .37858        .20030E-06    .18013E-01
   2  Prefactor     2.7640        3.2427        .18841E-07    .16251E-02
   3  Prefactor     17.692        7.4359       -.50824E-06   -.17821E-01
   4  Prefactor     1.2038        1.8416        .23529E-06   -.29146E-02
   5  Prefactor     19.782        1.5794        .12878E-06    .84785E-02
   6  Prefactor     .66613E-09    5.6732       -.49931E-06** at limit **
   7  norm          14.412        1.9372        .73010E-07    .73771E-02
   8  norm          3.0661        .59563       -.76382E-07    .38280E-02
   9  norm          4.8882        2.1491       -.66433E-07    .75387E-02
  10  Prefactor     10.410        1.6857       -.58121E-07   -.98556E-02
  11  Prefactor     .71609E-08    12.128       -.53219E-07** at limit **
  12  Prefactor      .0000        .93460       -.53600E-06** at limit **
  13  norm          22.265        4.4806       -.24272E-07    .22871E-02
  14  Prefactor     .35585        3.4611        .84471E-06    .10375E-01
  15  Prefactor     .38858E-09    2.6608       -.70247E-07** at limit **
  16  Prefactor     5.7882        19.044        .30943E-05    .19843E-01
  17  norm          1.3016        1.0906        .30180E-06   -.34403E-03
  18  norm          3.5384        1.0894       -.61219E-07    .44247E-02
  19  norm          1.6745        1.9798        .17988E-06    .23175E-03
  20  norm          2.4599        3.8827       -.14712E-06    .12616E-02
  21  Prefactor     .24758E-07    18.483        .34528E-05** at limit **
  22  Prefactor     1.2930        2.0249       -.51245E-06    .47713E-03
  23  norm          3.5782        .87126       -.59861E-07   -.11167E-01
  24  norm          4.6323        1.3588        .16129E-06    .85274E-02
  25  norm          3.2590        7.6899        .22824E-05    .11340E-01
  26  Prefactor     21.374        10.655       -.45473E-06    .24220E-01
  27  norm          2.8978        1.7731        .22417E-06   -.18413E-02
  28  Prefactor     29.793        3.1707        .19874E-06   -.92147E-01
  29  norm          .27176E-05    19.685       -.33211E-05** at limit **
  30  Normalizat    .95708        .10196       -.15111E-05    .15363E-04
  31  Prefactor     1.0307        .45828E-01   -.80571E-06   -.50351E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 0.66248
  Prefactor  = 2.764
  Prefactor  = 17.6923
  Prefactor  = 1.20379
  Prefactor  = 19.782
  Prefactor  = 6.66134e-10
  norm       = 14.4124
  norm       = 3.06607
  norm       = 4.88824
  Prefactor  = 10.4102
  Prefactor  = 7.16094e-09
  Prefactor  = 0
  norm       = 22.2652
  Prefactor  = 0.355846
  Prefactor  = 3.88578e-10
  Prefactor  = 5.78825
  norm       = 1.30163
  norm       = 3.5384
  norm       = 1.67451
  norm       = 2.45995
  Prefactor  = 2.4758e-08
  Prefactor  = 1.29296
  norm       = 3.57825
  norm       = 4.63233
  norm       = 3.25901
  Prefactor  = 21.3744
  norm       = 2.89784
  Prefactor  = 29.7926
  norm       = 2.7176e-06
  Normalizat = 0.957083
  Prefactor  = 1.03071
 **********
 **   18 **HESSE 
 **********

 FCN=   48413.84     FROM HESSE     STATUS=OK           710 CALLS     2419 TOTAL
                     EDM=   .13E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .66248        .38930        .63779E-03   -1.5692    
   2  Prefactor     2.7640        3.2754        .61274E-03   -1.5675    
   3  Prefactor     17.692        7.7031        .23804E-03   -1.5624    
   4  Prefactor     1.2038        1.8796        .10367E-02   -1.5686    
   5  Prefactor     19.782        17.710        .22517E-03   -1.5619    
   6  Prefactor     .66613E-09    5.7164        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  norm          14.412        1.9394        .26359E-03   -1.5632    
   8  norm          3.0661        .61646        .57906E-03   -1.5673    
   9  norm          4.8882        2.1566        .45473E-03   -1.5664    
  10  Prefactor     10.410        7.9703        .31025E-03   -1.5643    
  11  Prefactor     .71609E-08    12.299        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor      .0000        .92996        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          22.265        4.4800        .21203E-03   -1.5614    
  14  Prefactor     .35585        2.3697        .11713E-01   -1.5696    
  15  Prefactor     .38858E-09    2.6597        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     5.7882        29.788        .43896E-03   -1.5660    
  17  norm          1.3016        1.1106        .96702E-03   -1.5685    
  18  norm          3.5384        1.0894        .53715E-03   -1.5670    
  19  norm          1.6745        2.0185        .81389E-03   -1.5682    
  20  norm          2.4599        3.9373        .65197E-03   -1.5677    
  21  Prefactor     .24758E-07    18.409        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     1.2930        2.0605        .97399E-03   -1.5685    
  23  norm          3.5782        .88318        .53424E-03   -1.5670    
  24  norm          4.6323        16.159        .46748E-03   -1.5665    
  25  norm          3.2590        7.9926        .55252E-03   -1.5672    
  26  Prefactor     21.374        11.206        .21649E-03   -1.5615    
  27  norm          2.8978        1.7852        .59698E-03   -1.5674    
  28  Prefactor     29.793        8.6180        .18329E-03   -1.5599    
  29  norm          .27176E-05    1.3094        .82272E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  30  Normalizat    .95708        .98194E-01    .93937E-01   -.94482    
  31  Prefactor     1.0307        .42102E-01    .41211E-01   -.91713    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.34001e-07
Minuit parameter uncertainties:
  1  0.389296
  2  3.27545
  3  7.70311
  4  1.8796
  5  17.71
  6  0.000124004
  7  1.93938
  8  0.616458
  9  2.15663
  10  7.97036
  11  0.000593881
  12  2.23801e-06
  13  4.48
  14  1.83658
  15  6.44816e-05
  16  26.2618
  17  1.11058
  18  1.08937
  19  2.01851
  20  3.93729
  21  0.00135052
  22  2.06054
  23  0.883184
  24  16.1596
  25  7.99268
  26  11.2058
  27  1.78519
  28  8.61803
  29  0.00377281
  30  0.0982123
  31  0.0421029
Done.

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

Extracting fit parameters...

4FGL J1849.2+6705
   Spectrum: LogParabola
347         norm:  1.302e+00  1.111e+00  0.000e+00  1.000e+06 ( 1.000e-12)
348        alpha:  2.257e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
349         beta:  9.598e-02  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
350           Eb:  9.504e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
615    Prefactor:  1.031e+00  4.210e-02  0.000e+00  1.000e+01 ( 1.000e+00)
616        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
617        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
607   Normalization:  9.571e-01  9.821e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 2.34
Ra Dec: 282.319 67.091
Photon Index (Fixed Index): 2.26 +/- 0.00
Photon Flux (Fixed Index): 1.30e-08 +/- 1.11e-08
Energy Flux (Fixed Index): 5.20e-06 +/- 4.44e-06

TS (Fixed Index): 2.34
Ra Dec: 282.319 67.091
Photon Flux Upper Limit: 3.66209734384e-08 ph cm-2 s-1
Energy Flux Upper Limit: 1.46850470637e-05 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/59978603/likelihoodResults_754876801_755481601_4FGL_J1849.2+6705_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) = 48413.805152
delta logL = 0.0396696560492

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 48413.8022617
delta logL = 0.0425599865557

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    1.2236       1.0000          .0000       .10000E+07
     2 'alpha     '    2.4645       1.0000          .0000       5.0000    
     3 'Normalizat'    .95298       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0315       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6180E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   48413.80     FROM MIGRAD    STATUS=CONVERGED     62 CALLS      222 TOTAL
                     EDM=   .52E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          1.2236        14.784        .10183E-02    .50633E-01
   2  alpha         2.4646        3.7283        .41157        .25517E-03
   3  Normalizat    .95299        .26888E-01    .94122E-01    .17087E-03
   4  Prefactor     1.0315        .11393E-01    .41142E-01   -.14251E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 1.22355
  alpha      = 2.46455
  Normalizat = 0.95299
  Prefactor  = 1.03149
 **********
 **   18 **HESSE 
 **********

 FCN=   48413.80     FROM HESSE     STATUS=OK            33 CALLS      255 TOTAL
                     EDM=   .22E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          1.2236        1.1844        .18644E-04   -1.5686    
   2  alpha         2.4646        .76782        .35765E-01   -.14180E-01
   3  Normalizat    .95299        .96101E-01    .41694E-03   -.94622    
   4  Prefactor     1.0315        .43447E-01    .18329E-03   -.91687    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.17604e-10
Minuit parameter uncertainties:
  1  1.18436
  2  0.780437
  3  0.0961187
  4  0.0434489
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) = 48413.8022617
delta logL = 0.0425600039162

Extracting fit parameters...

4FGL J1849.2+6705
   Spectrum: LogParabola
347         norm:  1.224e+00  1.184e+00  0.000e+00  1.000e+06 ( 1.000e-12)
348        alpha:  2.465e+00  7.804e-01  0.000e+00  5.000e+00 ( 1.000e+00)
349         beta:  9.598e-02  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
350           Eb:  9.504e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
615    Prefactor:  1.031e+00  4.345e-02  0.000e+00  1.000e+01 ( 1.000e+00)
616        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
617        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
607   Normalization:  9.530e-01  9.612e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 2.43
Ra Dec: 282.319 67.091
Photon Index (Free Index): 2.46 +/- 0.78
Photon Flux (Free Index): 1.64e-08 +/- 1.62e-08
Energy Flux (Free Index): 5.21e-06 +/- 4.19e-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/59978603/cmap_HighResolution_754876801_755481601_4FGL_J1849.2+6705_weekly_bin853.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.47e-05', comment='SUCCESS', photon_flux='1.30e-08', energy_flux2='5.21e-06', photon_flux_error='1.11e-08', dlogl='4.26e-02', energy_flux='5.20e-06', photon_flux2='1.64e-08', job_status='DONE', time_completed='2024-12-10 01:28:09.094604', photon_index_error2='0.78', photon_index2='2.46', ts='2.34', fit_tolerance='1e-08', GAL='1.03', photon_index_error='0.00', photon_flux_upper_limit='3.66e-08', energy_flux_error2='4.19e-06', EG='0.96', time_epoch_completed='1733822889.09', return_code='0', job_id='59978603', GAL2='1.03', EG2='0.95', return_code2='0', energy_flux_error='4.44e-06', photon_flux_error2='1.62e-08', ts2='2.43', photon_index='2.26' WHERE bin_id='853' AND source_name='4FGL J1849.2+6705' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Dec 10 01:28:09 PST 2024

