/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_J2049.9+1002_weekly_bin806
RA = 312.478, Dec = 10.0407
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='38431426', job_status='RUN', time_executed='2024-01-18 21:55:51.013662', time_epoch_executed='1705643751.01' WHERE source_name='4FGL J2049.9+1002' and cadence='weekly' and bin_id='806'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/38431426

Creating custom pfile directory:
/lscratch/kocevski/38431426/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/38431426/ft1_4FGL_J2049.9+1002_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/38431426/ft2_4FGL_J2049.9+1002_weekly_bin806.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/38431426/ft1_4FGL_J2049.9+1002_weekly_bin806.fits outfile=/lscratch/kocevski/38431426/ft1_filteredMKT_4FGL_J2049.9+1002_weekly_bin806.fits ra=312.478 dec=10.0407 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.60
user 3.33
sys 0.21

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/38431426/ft2_4FGL_J2049.9+1002_weekly_bin806.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/38431426/ft2_4FGL_J2049.9+1002_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/38431426/ft1_filteredMKT_4FGL_J2049.9+1002_weekly_bin806.fits evtable="EVENTS" outfile="/lscratch/kocevski/38431426/ft1_filtered_4FGL_J2049.9+1002_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.40
user 0.24
sys 0.11

Number of photons that the gtmktime cut: 1958

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/38431426/ft1_filtered_4FGL_J2049.9+1002_weekly_bin806.fits" evtable="EVENTS" scfile=/lscratch/kocevski/38431426/ft2_4FGL_J2049.9+1002_weekly_bin806.fits sctable="SC_DATA" outfile=/lscratch/kocevski/38431426/ltcube_726451201_727056001_4FGL_J2049.9+1002_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/38431426/ft2_4FGL_J2049.9+1002_weekly_bin806.fits
.....................!
real 20.36
user 19.91
sys 0.25

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/38431426/ft1_filtered_4FGL_J2049.9+1002_weekly_bin806.fits evtable="EVENTS" scfile=/lscratch/kocevski/38431426/ft2_4FGL_J2049.9+1002_weekly_bin806.fits sctable="SC_DATA" expcube=/lscratch/kocevski/38431426/ltcube_726451201_727056001_4FGL_J2049.9+1002_weekly_bin806.fits outfile=/lscratch/kocevski/38431426/expmap_726451201_727056001_4FGL_J2049.9+1002_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/38431426/ltcube_726451201_727056001_4FGL_J2049.9+1002_weekly_bin806.fits
.....................!
real 71.76
user 67.28
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 W 51C in ROI, make sure /sdf/group/fermi/g/LCRepository/Likelihood/ExtendedSources/Extended_8years/Templates/W51C.fits is the correct path to the extended template.
Extended source Cygnus Loop in ROI, make sure /sdf/group/fermi/g/LCRepository/Likelihood/ExtendedSources/Extended_8years/Templates/CygnusLoop.fits is the correct path to the extended template.
Added 201 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 J2049.9+1002 @ 312.478 10.0407

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/38431426/ft1_filtered_4FGL_J2049.9+1002_weekly_bin806.fits scfile=/lscratch/kocevski/38431426/ft2_4FGL_J2049.9+1002_weekly_bin806.fits outfile=/lscratch/kocevski/38431426/cmap_726451201_727056001_4FGL_J2049.9+1002_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=312.478 yref=10.0407 axisrot=0.0 rafield="RA" decfield="DEC" proj="AIT" hpx_ordering_scheme="RING" hpx_order=3 hpx_ebin=yes hpx_region="" evtable="EVENTS" sctable="SC_DATA" efield="ENERGY" tfield="TIME" chatter=2 clobber=yes debug=no gui=no mode="ql"

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

This is gtbin version HEAD
real 0.41
user 0.24
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/38431426/ft1_filtered_4FGL_J2049.9+1002_weekly_bin806.fits scfile=/lscratch/kocevski/38431426/ft2_4FGL_J2049.9+1002_weekly_bin806.fits outfile=/lscratch/kocevski/38431426/cmap_HighResolution_726451201_727056001_4FGL_J2049.9+1002_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=312.478 yref=10.0407 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/38431426/ft1_filtered_4FGL_J2049.9+1002_weekly_bin806.fits evtable="EVENTS" scfile=/lscratch/kocevski/38431426/ft2_4FGL_J2049.9+1002_weekly_bin806.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/38431426/Model_4FGL_J2049.9+1002_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 Cygnus Loop
adding source EG_v02
adding source GAL_V02
adding source W 51C
Working on...
/lscratch/kocevski/38431426/ft1_filtered_4FGL_J2049.9+1002_weekly_bin806.fits.....................!
real 170.68
user 167.93
sys 0.77

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/38431426/ft1_filtered_4FGL_J2049.9+1002_weekly_bin806.fits', '/lscratch/kocevski/38431426/ft2_4FGL_J2049.9+1002_weekly_bin806.fits', expMap='/lscratch/kocevski/38431426/expmap_726451201_727056001_4FGL_J2049.9+1002_weekly_bin806.fits', expCube='/lscratch/kocevski/38431426/ltcube_726451201_727056001_4FGL_J2049.9+1002_weekly_bin806.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/38431426/Model_4FGL_J2049.9+1002_weekly_bin806.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J2049.9+1002'

4FGL J2049.9+1002
   Spectrum: LogParabola
407         norm:  4.360e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-12)
408        alpha:  2.394e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
409         beta:  1.463e-01  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
410           Eb:  6.403e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/38431426/ft1_filtered_4FGL_J2049.9+1002_weekly_bin806.fits
Spacecraft file(s): /lscratch/kocevski/38431426/ft2_4FGL_J2049.9+1002_weekly_bin806.fits
Exposure map: /lscratch/kocevski/38431426/expmap_726451201_727056001_4FGL_J2049.9+1002_weekly_bin806.fits
Exposure cube: /lscratch/kocevski/38431426/ltcube_726451201_727056001_4FGL_J2049.9+1002_weekly_bin806.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/38431426/Model_4FGL_J2049.9+1002_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) = 22002.9851858

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    21.348       1.0000          .0000       .10000E+07
     2 'Prefactor '    .14794E-03   1.0000          .0000       .10000E+07
     3 'Prefactor '    .43079E-02   1.0000          .0000       .10000E+07
     4 'norm      '    .37660       1.0000          .0000       .10000E+07
     5 'Prefactor '    30.627       1.0000          .0000       .10000E+07
     6 'norm      '    7.5454       1.0000          .0000       .10000E+07
     7 'Prefactor '    19.548       1.0000          .0000       .10000E+07
     8 'Prefactor '    11.166       1.0000          .0000       .10000E+07
     9 'Prefactor '    9.7410       1.0000          .0000       .10000E+07
    10 'Prefactor '    .19158E-01   1.0000          .0000       .10000E+07
    11 'Prefactor '    .62205E-03   1.0000          .0000       .10000E+07
    12 'norm      '    .33862E-07   1.0000          .0000       .10000E+07
    13 'Prefactor '    .24326E-02   1.0000          .0000       .10000E+07
    14 'Prefactor '    .62096E-02   1.0000          .0000       .10000E+07
    15 'Normalizat'    .72624       1.0000         .10000E-01   10.000    
    16 'Prefactor '    1.0756       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6980E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   22002.92     FROM MIGRAD    STATUS=CONVERGED    109 CALLS     1143 TOTAL
                     EDM=   .86E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.6%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     21.332        1.6979       -.86807E-09    .66204E-01
   2  Prefactor     .55511E-10    3.1781       -.20179E-07** at limit **
   3  Prefactor     .66613E-08    10.662       -.14770E-07** at limit **
   4  norm          .37518        .43735       -.19904E-07   -.59057E-02
   5  Prefactor     30.959        3.3627       -.60521E-08    .27588E-01
   6  norm          7.6012        7.2975        .81111E-08   -.10942E-02
   7  Prefactor     19.481        3.4417        .15996E-07   -.11521    
   8  Prefactor     11.111        9.5974       -.35327E-07    .14029E-01
   9  Prefactor     9.7637        1.4076        .77444E-08   -.38805E-01
  10  Prefactor     .99204E-06    83.410       -.18928E-06** at limit **
  11  Prefactor     .16098E-08    20.250        .15818E-06** at limit **
  12  norm           .0000        .95637        .11425E-07** at limit **
  13  Prefactor     .48461E-07    45.938        .13433E-06** at limit **
  14  Prefactor     .18319E-08    8.3708       -.13629E-06** at limit **
  15  Normalizat    .72652        .19878        .13365E-05    .43612E-03
  16  Prefactor     1.0755        .65569E-01    .36679E-06    .15252E-02
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 21.3324
  Prefactor  = 5.55112e-11
  Prefactor  = 6.66134e-09
  norm       = 0.375177
  Prefactor  = 30.9586
  norm       = 7.60115
  Prefactor  = 19.4807
  Prefactor  = 11.1112
  Prefactor  = 9.76365
  Prefactor  = 9.9204e-07
  Prefactor  = 1.60982e-09
  norm       = 0
  Prefactor  = 4.84612e-08
  Prefactor  = 1.83187e-09
  Normalizat = 0.726518
  Prefactor  = 1.07552
 **********
 **   18 **HESSE 
 **********

 FCN=   22002.92     FROM HESSE     STATUS=OK           243 CALLS     1386 TOTAL
                     EDM=   .22E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     21.332        16.737        .21650E-03   -1.5616    
   2  Prefactor     .55511E-10    3.2123        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .66613E-08    10.732        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  norm          .37518        .47898        .23764E-02   -1.5696    
   5  Prefactor     30.959        30.317        .18072E-03   -1.5597    
   6  norm          7.6012        7.6539        .36486E-03   -1.5653    
   7  Prefactor     19.481        13.036        .22625E-03   -1.5620    
   8  Prefactor     11.111        9.6593        .29957E-03   -1.5641    
   9  Prefactor     9.7637        13.837        .32083E-03   -1.5645    
  10  Prefactor     .99204E-06    5.4474        .12551E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .16098E-08    20.294        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm           .0000        .95698        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .48461E-07    45.532        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .18319E-08    8.1855        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Normalizat    .72652        .18662        .11980       -1.0286    
  16  Prefactor     1.0755        .59298E-01    .38597E-01   -.90253    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.24682e-07
Minuit parameter uncertainties:
  1  16.7371
  2  2.88948e-05
  3  0.000535341
  4  0.478985
  5  30.3171
  6  7.65387
  7  13.0365
  8  9.6593
  9  13.837
  10  0.00464927
  11  0.000362189
  12  3.63088e-06
  13  0.00297063
  14  0.000245581
  15  0.186781
  16  0.0593016
Done.

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

Extracting fit parameters...

4FGL J2049.9+1002
   Spectrum: LogParabola
407         norm:  7.601e+00  7.654e+00  0.000e+00  1.000e+06 ( 1.000e-12)
408        alpha:  2.394e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
409         beta:  1.463e-01  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
410           Eb:  6.403e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
691    Prefactor:  1.076e+00  5.930e-02  0.000e+00  1.000e+01 ( 1.000e+00)
692        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
693        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
690   Normalization:  7.265e-01  1.868e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 1.41
Ra Dec: 312.478 10.041
Photon Index (Fixed Index): 2.39 +/- 0.00
Photon Flux (Fixed Index): 3.62e-08 +/- 3.64e-08
Energy Flux (Fixed Index): 1.15e-05 +/- 1.15e-05

TS (Fixed Index): 1.41
Ra Dec: 312.478 10.041
Photon Flux Upper Limit: 1.06671855412e-07 ph cm-2 s-1
Energy Flux Upper Limit: 3.37902304001e-05 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/38431426/likelihoodResults_726451201_727056001_4FGL_J2049.9+1002_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) = 22002.8974746
delta logL = 0.0203689313312

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 22002.8966383
delta logL = 0.0212051844064

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   22002.90     FROM MIGRAD    STATUS=CONVERGED     90 CALLS      282 TOTAL
                     EDM=   .28E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          7.4405        7.4108        .14698E-04    .36850E-02
   2  alpha         2.5432        .73233        .32493E-01    .55356E-04
   3  Normalizat    .72043        .19558        .53345E-03   -.60695E-04
   4  Prefactor     1.0766        .65441E-01    .14933E-03   -.24240E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 7.44045
  alpha      = 2.54317
  Normalizat = 0.720426
  Prefactor  = 1.07663
 **********
 **   18 **HESSE 
 **********

 FCN=   22002.90     FROM HESSE     STATUS=OK            25 CALLS      307 TOTAL
                     EDM=   .21E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          7.4405        7.1951        .58790E-06   -1.5653    
   2  alpha         2.5432        .71082        .12997E-02    .17269E-01
   3  Normalizat    .72043        .19563        .21338E-04   -1.0309    
   4  Prefactor     1.0766        .65426E-01    .59733E-05   -.90217    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.06054e-10
Minuit parameter uncertainties:
  1  7.19509
  2  0.720766
  3  0.195816
  4  0.0654308
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) = 22002.8966382
delta logL = 0.0212052873285

Extracting fit parameters...

4FGL J2049.9+1002
   Spectrum: LogParabola
407         norm:  7.440e+00  7.195e+00  0.000e+00  1.000e+06 ( 1.000e-12)
408        alpha:  2.543e+00  7.208e-01  0.000e+00  5.000e+00 ( 1.000e+00)
409         beta:  1.463e-01  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
410           Eb:  6.403e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
691    Prefactor:  1.077e+00  6.543e-02  0.000e+00  1.000e+01 ( 1.000e+00)
692        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
693        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
690   Normalization:  7.204e-01  1.958e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.46
Ra Dec: 312.478 10.041
Photon Index (Free Index): 2.54 +/- 0.72
Photon Flux (Free Index): 4.17e-08 +/- 4.59e-08
Energy Flux (Free Index): 1.17e-05 +/- 1.10e-05

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/38431426/cmap_HighResolution_726451201_727056001_4FGL_J2049.9+1002_weekly_bin806.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='3.38e-05', comment='SUCCESS', photon_flux='3.62e-08', energy_flux2='1.17e-05', photon_flux_error='3.64e-08', dlogl='2.12e-02', energy_flux='1.15e-05', photon_flux2='4.17e-08', job_status='DONE', time_completed='2024-01-18 22:06:46.133196', photon_index_error2='0.72', photon_index2='2.54', ts='1.41', fit_tolerance='1e-08', GAL='1.08', photon_index_error='0.00', photon_flux_upper_limit='1.07e-07', energy_flux_error2='1.10e-05', EG='0.73', time_epoch_completed='1705644406.13', return_code='0', job_id='38431426', GAL2='1.08', EG2='0.72', return_code2='0', energy_flux_error='1.15e-05', photon_flux_error2='4.59e-08', ts2='1.46', photon_index='2.39' WHERE bin_id='806' AND source_name='4FGL J2049.9+1002' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Thu Jan 18 22:06:46 PST 2024

