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


Performing analysis on: 4FGL_J2005.8+6424_weekly_bin802
RA = 301.464, Dec = 64.4002
tmin = 724032001, tmax = 724636801
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='36607671', job_status='RUN', time_executed='2023-12-19 01:15:57.498840', time_epoch_executed='1702977357.5' WHERE source_name='4FGL J2005.8+6424' and cadence='weekly' and bin_id='802'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/36607671

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

Retrieving the FT1 file...

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

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

Retrieving 107 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/36607671/ft1_4FGL_J2005.8+6424_weekly_bin802.fits


Retrieving the FT1 file...

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

Retrieving 107 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/36607671/ft2_4FGL_J2005.8+6424_weekly_bin802.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/36607671/ft1_4FGL_J2005.8+6424_weekly_bin802.fits outfile=/lscratch/kocevski/36607671/ft1_filteredMKT_4FGL_J2005.8+6424_weekly_bin802.fits ra=301.464 dec=64.4002 rad=12.0 tmin=724032001.0 tmax=724636801.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 4.93
user 4.58
sys 0.23

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/36607671/ft2_4FGL_J2005.8+6424_weekly_bin802.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/36607671/ft2_4FGL_J2005.8+6424_weekly_bin802.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/36607671/ft1_filteredMKT_4FGL_J2005.8+6424_weekly_bin802.fits evtable="EVENTS" outfile="/lscratch/kocevski/36607671/ft1_filtered_4FGL_J2005.8+6424_weekly_bin802.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.67
user 0.23
sys 0.16

Number of photons that the gtmktime cut: 4312

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/36607671/ft1_filtered_4FGL_J2005.8+6424_weekly_bin802.fits" evtable="EVENTS" scfile=/lscratch/kocevski/36607671/ft2_4FGL_J2005.8+6424_weekly_bin802.fits sctable="SC_DATA" outfile=/lscratch/kocevski/36607671/ltcube_724032001_724636801_4FGL_J2005.8+6424_weekly_bin802.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/36607671/ft2_4FGL_J2005.8+6424_weekly_bin802.fits
.....................!
real 23.55
user 22.83
sys 0.26

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/36607671/ft1_filtered_4FGL_J2005.8+6424_weekly_bin802.fits evtable="EVENTS" scfile=/lscratch/kocevski/36607671/ft2_4FGL_J2005.8+6424_weekly_bin802.fits sctable="SC_DATA" expcube=/lscratch/kocevski/36607671/ltcube_724032001_724636801_4FGL_J2005.8+6424_weekly_bin802.fits outfile=/lscratch/kocevski/36607671/expmap_724032001_724636801_4FGL_J2005.8+6424_weekly_bin802.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/36607671/ltcube_724032001_724636801_4FGL_J2005.8+6424_weekly_bin802.fits
.....................!
real 75.96
user 71.27
sys 4.16

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.
Extended source HB 21 in ROI with RadialDisk spatial model.
Extended source CTB 109 in ROI with RadialDisk spatial model.
Added 183 point sources and 4 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 J2005.8+6424 @ 301.464 64.4002

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/36607671/ft1_filtered_4FGL_J2005.8+6424_weekly_bin802.fits scfile=/lscratch/kocevski/36607671/ft2_4FGL_J2005.8+6424_weekly_bin802.fits outfile=/lscratch/kocevski/36607671/cmap_724032001_724636801_4FGL_J2005.8+6424_weekly_bin802.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=301.464 yref=64.4002 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.75
user 0.24
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/36607671/ft1_filtered_4FGL_J2005.8+6424_weekly_bin802.fits scfile=/lscratch/kocevski/36607671/ft2_4FGL_J2005.8+6424_weekly_bin802.fits outfile=/lscratch/kocevski/36607671/cmap_HighResolution_724032001_724636801_4FGL_J2005.8+6424_weekly_bin802.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=301.464 yref=64.4002 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.27
sys 0.13

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/36607671/ft1_filtered_4FGL_J2005.8+6424_weekly_bin802.fits evtable="EVENTS" scfile=/lscratch/kocevski/36607671/ft2_4FGL_J2005.8+6424_weekly_bin802.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/36607671/Model_4FGL_J2005.8+6424_weekly_bin802.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 CTB 109
adding source EG_v02
adding source FHES J2129.9+5833
adding source FHES J2208.4+6443
adding source GAL_V02
adding source HB 21
Working on...
/lscratch/kocevski/36607671/ft1_filtered_4FGL_J2005.8+6424_weekly_bin802.fits.....................!
real 240.13
user 237.34
sys 1.30

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/36607671/ft1_filtered_4FGL_J2005.8+6424_weekly_bin802.fits', '/lscratch/kocevski/36607671/ft2_4FGL_J2005.8+6424_weekly_bin802.fits', expMap='/lscratch/kocevski/36607671/expmap_724032001_724636801_4FGL_J2005.8+6424_weekly_bin802.fits', expCube='/lscratch/kocevski/36607671/ltcube_724032001_724636801_4FGL_J2005.8+6424_weekly_bin802.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/36607671/Model_4FGL_J2005.8+6424_weekly_bin802.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J2005.8+6424'

4FGL J2005.8+6424
   Spectrum: LogParabola
296         norm:  2.670e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-13)
297        alpha:  2.316e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
298         beta:  2.449e-01  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
299           Eb:  1.478e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/36607671/ft1_filtered_4FGL_J2005.8+6424_weekly_bin802.fits
Spacecraft file(s): /lscratch/kocevski/36607671/ft2_4FGL_J2005.8+6424_weekly_bin802.fits
Exposure map: /lscratch/kocevski/36607671/expmap_724032001_724636801_4FGL_J2005.8+6424_weekly_bin802.fits
Exposure cube: /lscratch/kocevski/36607671/ltcube_724032001_724636801_4FGL_J2005.8+6424_weekly_bin802.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/36607671/Model_4FGL_J2005.8+6424_weekly_bin802.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) = 42189.1497066

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .39762E-03   1.0000          .0000       .10000E+07
     2 'Prefactor '    .12102E-03   1.0000          .0000       .10000E+07
     3 'Prefactor '    .34760E-03   1.0000          .0000       .10000E+07
     4 'Prefactor '    .32916E-02   1.0000          .0000       .10000E+07
     5 'Prefactor '    .19385E-03   1.0000          .0000       .10000E+07
     6 'norm      '    1.6148       1.0000          .0000       .10000E+07
     7 'norm      '    3.1768       1.0000          .0000       .10000E+07
     8 'norm      '    .85298       1.0000          .0000       .10000E+07
     9 'norm      '    8.9530       1.0000          .0000       .10000E+07
    10 'Prefactor '    .20373E-07   1.0000          .0000       .10000E+07
    11 'Prefactor '    4.3712       1.0000          .0000       .10000E+07
    12 'norm      '    1.7135       1.0000          .0000       .10000E+07
    13 'norm      '    .18974E-06   1.0000          .0000       .10000E+07
    14 'norm      '    17.428       1.0000          .0000       .10000E+07
    15 'Prefactor '    6.5637       1.0000          .0000       .10000E+07
    16 'norm      '    .45669E-03   1.0000          .0000       .10000E+07
    17 'Prefactor '    .36153E-03   1.0000          .0000       .10000E+07
    18 'norm      '    .85617       1.0000          .0000       .10000E+07
    19 'Prefactor '    .11081E-04   1.0000          .0000       .10000E+07
    20 'Prefactor '    .38858E-07   1.0000          .0000       .10000E+07
    21 'Normalizat'    1.1354       1.0000         .10000E-01   10.000    
    22 'Prefactor '    .99965       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6480E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   42189.08     FROM MIGRAD    STATUS=CONVERGED    168 CALLS     1850 TOTAL
                     EDM=   .38E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  4.6%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .93814E-08    31.143        .24374E-06** at limit **
   2  Prefactor     .10397E-06    7.0601        .47683E-06** at limit **
   3  Prefactor     .33307E-09    4.6280       -.78086E-07** at limit **
   4  Prefactor     .11935E-07    55.718       -.68771E-06** at limit **
   5  Prefactor     .47740E-08    20.522       -.19962E-06** at limit **
   6  norm          1.6148        1.7918       -.19790E-06   -.15724E-02
   7  norm          3.1768        1.5821        .18960E-07    .17309E-02
   8  norm          .85228        1.6196       -.25238E-06   -.15009E-02
   9  norm          8.9537        5.7016        .33492E-07   -.49574E-03
  10  Prefactor     .37192E-08    4.8113       -.10142E-06** at limit **
  11  Prefactor     4.3717        3.1638       -.16237E-07    .21155E-03
  12  norm          1.7134        .78970        .14170E-07    .13674E-02
  13  norm           .0000        9.0490        .31162E-06** at limit **
  14  norm          17.438        2.4367       -.48097E-07   -.48575E-01
  15  Prefactor     6.5588        4.8190       -.16737E-06   -.47936E-01
  16  norm          .22038E-07    15.733       -.17293E-06** at limit **
  17  Prefactor     .14544E-07    6.2730        .54198E-08** at limit **
  18  norm          .85751        2.5512        .44990E-07    .38959E-03
  19  Prefactor     .55511E-10    3.3679        .56843E-06** at limit **
  20  Prefactor      .0000        1.2123        .72560E-07** at limit **
  21  Normalizat    1.1354        .13670       -.66366E-05    .21424E-04
  22  Prefactor     .99966        .29041E-01    .80943E-06    .24769E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 9.38138e-09
  Prefactor  = 1.03972e-07
  Prefactor  = 3.33067e-10
  Prefactor  = 1.19349e-08
  Prefactor  = 4.77396e-09
  norm       = 1.61477
  norm       = 3.17685
  norm       = 0.852281
  norm       = 8.95373
  Prefactor  = 3.71925e-09
  Prefactor  = 4.37169
  norm       = 1.71336
  norm       = 0
  norm       = 17.4375
  Prefactor  = 6.55877
  norm       = 2.20379e-08
  Prefactor  = 1.45439e-08
  norm       = 0.857507
  Prefactor  = 5.55112e-11
  Prefactor  = 0
  Normalizat = 1.1354
  Prefactor  = 0.999655
 **********
 **   18 **HESSE 
 **********

 FCN=   42189.08     FROM HESSE     STATUS=OK           396 CALLS     2246 TOTAL
                     EDM=   .35E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .93814E-08    31.252        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10397E-06    8.2255        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .33307E-09    4.6325        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .11935E-07    54.801        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .47740E-08    20.610        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  norm          1.6148        1.8122        .83295E-03   -1.5683    
   7  norm          3.1768        1.5857        .56833E-03   -1.5672    
   8  norm          .85228        1.6309        .49067E-03   -1.5689    
   9  norm          8.9537        5.7090        .33473E-03   -1.5648    
  10  Prefactor     .37192E-08    4.8611        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     4.3717        3.2311        .48150E-03   -1.5666    
  12  norm          1.7134        .83125        .80257E-03   -1.5682    
  13  norm           .0000        9.0705        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          17.438        11.954        .23964E-03   -1.5624    
  15  Prefactor     6.5588        11.243        .39147E-03   -1.5657    
  16  norm          .22038E-07    .65643        .58948E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     .14544E-07    6.4674        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  norm          .85751        2.5725        .48839E-03   -1.5689    
  19  Prefactor     .55511E-10    3.3726        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor      .0000        1.2060        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Normalizat    1.1354        .13277        .12653       -.88623    
  22  Prefactor     .99966        .27780E-01    .29802E-01   -.92741    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.5285e-07
Minuit parameter uncertainties:
  1  0.00108328
  2  0.00184963
  3  8.04257e-05
  4  0.00161579
  5  0.000627347
  6  1.81216
  7  1.58574
  8  1.63095
  9  5.70896
  10  0.00026951
  11  3.23105
  12  0.831255
  13  2.16648e-05
  14  11.954
  15  11.2426
  16  0.000240667
  17  0.000613219
  18  2.57248
  19  2.48469e-05
  20  5.8623e-06
  21  0.132807
  22  0.0277799
Done.

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

Extracting fit parameters...

4FGL J2005.8+6424
   Spectrum: LogParabola
296         norm:  1.744e+01  1.195e+01  0.000e+00  1.000e+06 ( 1.000e-13)
297        alpha:  2.316e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
298         beta:  2.449e-01  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
299           Eb:  1.478e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
641    Prefactor:  9.997e-01  2.778e-02  0.000e+00  1.000e+01 ( 1.000e+00)
642        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
643        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
633   Normalization:  1.135e+00  1.328e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 3.84
Ra Dec: 301.464 64.400
Photon Index (Fixed Index): 2.32 +/- 0.00
Photon Flux (Fixed Index): 2.71e-08 +/- 1.86e-08
Energy Flux (Fixed Index): 1.39e-05 +/- 9.56e-06

TS (Fixed Index): 3.84
Ra Dec: 301.464 64.400
Photon Flux Upper Limit: 6.32513084899e-08 ph cm-2 s-1
Energy Flux Upper Limit: 3.25242045181e-05 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/36607671/likelihoodResults_724032001_724636801_4FGL_J2005.8+6424_weekly_bin802.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) = 42187.9919243
delta logL = 1.08686640733

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 42187.9854452
delta logL = 1.09334541584

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    11.228       1.0000          .0000       .10000E+07
     2 'alpha     '    2.9580       1.0000          .0000       5.0000    
     3 'Normalizat'    1.1153       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0005       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6480E+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=   42187.99     FROM MIGRAD    STATUS=CONVERGED     90 CALLS      298 TOTAL
                     EDM=   .14E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          11.228        9.7764        .11949E-04    .50995E-03
   2  alpha         2.9580        .48087        .15276E-01    .65277E-04
   3  Normalizat    1.1153        .12982        .56568E-03    .75727E-04
   4  Prefactor     1.0005        .28759E-01    .13162E-03    .28814E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 11.2281
  alpha      = 2.95798
  Normalizat = 1.11531
  Prefactor  = 1.00051
 **********
 **   18 **HESSE 
 **********

 FCN=   42187.99     FROM HESSE     STATUS=OK            25 CALLS      323 TOTAL
                     EDM=   .83E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          11.228        8.4639        .47797E-06   -1.5641    
   2  alpha         2.9580        .41681        .61104E-03    .18423    
   3  Normalizat    1.1153        .12977        .22627E-04   -.89262    
   4  Prefactor     1.0005        .28759E-01    .52650E-05   -.92713    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 8.31047e-12
Minuit parameter uncertainties:
  1  8.46387
  2  0.418831
  3  0.129809
  4  0.0287591
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) = 42187.9854452
delta logL = 1.09334541923

Extracting fit parameters...

4FGL J2005.8+6424
   Spectrum: LogParabola
296         norm:  1.123e+01  8.464e+00  0.000e+00  1.000e+06 ( 1.000e-13)
297        alpha:  2.958e+00  4.188e-01  0.000e+00  5.000e+00 ( 1.000e+00)
298         beta:  2.449e-01  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
299           Eb:  1.478e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
641    Prefactor:  1.001e+00  2.876e-02  0.000e+00  1.000e+01 ( 1.000e+00)
642        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
643        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
633   Normalization:  1.115e+00  1.298e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 6.14
Ra Dec: 301.464 64.400
Photon Index (Free Index): 2.96 +/- 0.42
Photon Flux (Free Index): 5.38e-08 +/- 2.95e-08
Energy Flux (Free Index): 1.56e-05 +/- 7.78e-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/36607671/cmap_HighResolution_724032001_724636801_4FGL_J2005.8+6424_weekly_bin802.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='3.25e-05', comment='SUCCESS', photon_flux='2.71e-08', energy_flux2='1.56e-05', photon_flux_error='1.86e-08', dlogl='1.09e+00', energy_flux='1.39e-05', photon_flux2='5.38e-08', job_status='DONE', time_completed='2023-12-19 01:38:34.680698', photon_index_error2='0.42', photon_index2='2.96', ts='3.84', fit_tolerance='1e-08', GAL='1.00', photon_index_error='0.00', photon_flux_upper_limit='6.33e-08', energy_flux_error2='7.78e-06', EG='1.14', time_epoch_completed='1702978714.68', return_code='0', job_id='36607671', GAL2='1.00', EG2='1.12', return_code2='0', energy_flux_error='9.56e-06', photon_flux_error2='2.95e-08', ts2='6.14', photon_index='2.32' WHERE bin_id='802' AND source_name='4FGL J2005.8+6424' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Dec 19 01:38:34 PST 2023

