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


Performing analysis on: 4FGL_J0358.6+0634_weekly_bin785
RA = 59.6656, Dec = 6.5759
tmin = 713750401, tmax = 714355201
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='28613247', job_status='RUN', time_executed='2023-09-19 21:50:51.529828', time_epoch_executed='1695185451.53' WHERE source_name='4FGL J0358.6+0634' and cadence='weekly' and bin_id='785'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/28613247

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

Retrieving the FT1 file...

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

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

Retrieving 108 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/28613247/ft1_4FGL_J0358.6+0634_weekly_bin785.fits


Retrieving the FT1 file...

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

Retrieving 108 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/28613247/ft2_4FGL_J0358.6+0634_weekly_bin785.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/28613247/ft1_4FGL_J0358.6+0634_weekly_bin785.fits outfile=/lscratch/kocevski/28613247/ft1_filteredMKT_4FGL_J0358.6+0634_weekly_bin785.fits ra=59.6656 dec=6.5759 rad=12.0 tmin=713750401.0 tmax=714355201.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.99
user 4.68
sys 0.24

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/28613247/ft2_4FGL_J0358.6+0634_weekly_bin785.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/28613247/ft2_4FGL_J0358.6+0634_weekly_bin785.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/28613247/ft1_filteredMKT_4FGL_J0358.6+0634_weekly_bin785.fits evtable="EVENTS" outfile="/lscratch/kocevski/28613247/ft1_filtered_4FGL_J0358.6+0634_weekly_bin785.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.47
user 0.24
sys 0.14

Number of photons that the gtmktime cut: 2604

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/28613247/ft1_filtered_4FGL_J0358.6+0634_weekly_bin785.fits" evtable="EVENTS" scfile=/lscratch/kocevski/28613247/ft2_4FGL_J0358.6+0634_weekly_bin785.fits sctable="SC_DATA" outfile=/lscratch/kocevski/28613247/ltcube_713750401_714355201_4FGL_J0358.6+0634_weekly_bin785.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/28613247/ft2_4FGL_J0358.6+0634_weekly_bin785.fits
.....................!
real 19.00
user 18.51
sys 0.24

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/28613247/ft1_filtered_4FGL_J0358.6+0634_weekly_bin785.fits evtable="EVENTS" scfile=/lscratch/kocevski/28613247/ft2_4FGL_J0358.6+0634_weekly_bin785.fits sctable="SC_DATA" expcube=/lscratch/kocevski/28613247/ltcube_713750401_714355201_4FGL_J0358.6+0634_weekly_bin785.fits outfile=/lscratch/kocevski/28613247/expmap_713750401_714355201_4FGL_J0358.6+0634_weekly_bin785.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/28613247/ltcube_713750401_714355201_4FGL_J0358.6+0634_weekly_bin785.fits
.....................!
real 65.07
user 60.85
sys 3.60

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

Setting source of interest to:
4FGL J0358.6+0634 @ 59.6656 6.5759

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/28613247/ft1_filtered_4FGL_J0358.6+0634_weekly_bin785.fits scfile=/lscratch/kocevski/28613247/ft2_4FGL_J0358.6+0634_weekly_bin785.fits outfile=/lscratch/kocevski/28613247/cmap_713750401_714355201_4FGL_J0358.6+0634_weekly_bin785.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=59.6656 yref=6.5759 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.42
user 0.25
sys 0.12

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/28613247/ft1_filtered_4FGL_J0358.6+0634_weekly_bin785.fits scfile=/lscratch/kocevski/28613247/ft2_4FGL_J0358.6+0634_weekly_bin785.fits outfile=/lscratch/kocevski/28613247/cmap_HighResolution_713750401_714355201_4FGL_J0358.6+0634_weekly_bin785.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=59.6656 yref=6.5759 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.42
user 0.22
sys 0.15

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/28613247/ft1_filtered_4FGL_J0358.6+0634_weekly_bin785.fits evtable="EVENTS" scfile=/lscratch/kocevski/28613247/ft2_4FGL_J0358.6+0634_weekly_bin785.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/28613247/Model_4FGL_J0358.6+0634_weekly_bin785.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/28613247/ft1_filtered_4FGL_J0358.6+0634_weekly_bin785.fits.....................!
real 117.55
user 115.53
sys 1.23

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/28613247/ft1_filtered_4FGL_J0358.6+0634_weekly_bin785.fits', '/lscratch/kocevski/28613247/ft2_4FGL_J0358.6+0634_weekly_bin785.fits', expMap='/lscratch/kocevski/28613247/expmap_713750401_714355201_4FGL_J0358.6+0634_weekly_bin785.fits', expCube='/lscratch/kocevski/28613247/ltcube_713750401_714355201_4FGL_J0358.6+0634_weekly_bin785.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/28613247/Model_4FGL_J0358.6+0634_weekly_bin785.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J0358.6+0634'

4FGL J0358.6+0634
   Spectrum: PowerLaw
232    Prefactor:  8.019e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-13)
233        Index:  2.567e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
234        Scale:  7.663e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/28613247/ft1_filtered_4FGL_J0358.6+0634_weekly_bin785.fits
Spacecraft file(s): /lscratch/kocevski/28613247/ft2_4FGL_J0358.6+0634_weekly_bin785.fits
Exposure map: /lscratch/kocevski/28613247/expmap_713750401_714355201_4FGL_J0358.6+0634_weekly_bin785.fits
Exposure cube: /lscratch/kocevski/28613247/ltcube_713750401_714355201_4FGL_J0358.6+0634_weekly_bin785.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/28613247/Model_4FGL_J0358.6+0634_weekly_bin785.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) = 27170.5361498

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    2.1052       1.0000          .0000       .10000E+07
     2 'Prefactor '    .52872E-03   1.0000          .0000       .10000E+07
     3 'norm      '    .65471       1.0000          .0000       .10000E+07
     4 'norm      '    .36456       1.0000          .0000       .10000E+07
     5 'Prefactor '    28.022       1.0000          .0000       .10000E+07
     6 'Prefactor '    34.121       1.0000          .0000       .10000E+07
     7 'norm      '    7.4724       1.0000          .0000       .10000E+07
     8 'Prefactor '    .58288E-03   1.0000          .0000       .10000E+07
     9 'norm      '    .81629E-06   1.0000          .0000       .10000E+07
    10 'Prefactor '    .17640E-02   1.0000          .0000       .10000E+07
    11 'norm      '    7.1932       1.0000          .0000       .10000E+07
    12 'Prefactor '    1.3911       1.0000          .0000       .10000E+07
    13 'Prefactor '    21.653       1.0000          .0000       .10000E+07
    14 'Prefactor '    .12711E-05   1.0000          .0000       .10000E+07
    15 'norm      '    1.2590       1.0000          .0000       .10000E+07
    16 'Prefactor '    .11860E-02   1.0000          .0000       .10000E+07
    17 'Normalizat'    .94849       1.0000         .10000E-01   10.000    
    18 'Prefactor '    1.0539       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .4630E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   27170.48     FROM MIGRAD    STATUS=CONVERGED    112 CALLS     1042 TOTAL
                     EDM=   .82E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .5%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     2.0974        2.0617       -.53179E-07    .39344E-03
   2  Prefactor      .0000        3.2054       -.53134E-07** at limit **
   3  norm          .65836        2.1940       -.24672E-06    .53011E-03
   4  norm          .36571        .57304        .19925E-08   -.34172E-03
   5  Prefactor     30.339        25.428        .65525E-07    .52319E-02
   6  Prefactor     33.896        2.5855       -.15072E-07    .64423E-01
   7  norm          7.4897        8.9569        .70459E-07    .29665E-02
   8  Prefactor      .0000        2.7585       -.52413E-06** at limit **
   9  norm           .0000        2.5409        .39209E-07** at limit **
  10  Prefactor     .55511E-10    6.3973       -.44922E-06** at limit **
  11  norm          7.1944        1.0811        .47663E-07   -.44557E-03
  12  Prefactor     1.3914        .81978       -.42695E-07    .15274E-02
  13  Prefactor     21.628        1.0838       -.80913E-08   -.24930E-01
  14  Prefactor     .55511E-10    7.1247       -.77924E-08** at limit **
  15  norm          1.2638        1.6583        .46546E-07   -.43322E-03
  16  Prefactor     .16653E-09    17.089        .81389E-06** at limit **
  17  Normalizat    .94699        .16261        .17402E-05   -.11858E-04
  18  Prefactor     1.0539        .48204E-01    .70143E-06   -.46657E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 2.09744
  Prefactor  = 0
  norm       = 0.658362
  norm       = 0.365707
  Prefactor  = 30.339
  Prefactor  = 33.8962
  norm       = 7.48974
  Prefactor  = 0
  norm       = 0
  Prefactor  = 5.55112e-11
  norm       = 7.19439
  Prefactor  = 1.39144
  Prefactor  = 21.6276
  Prefactor  = 5.55112e-11
  norm       = 1.26377
  Prefactor  = 1.66533e-10
  Normalizat = 0.946989
  Prefactor  = 1.0539
 **********
 **   18 **HESSE 
 **********

 FCN=   27170.48     FROM HESSE     STATUS=OK           282 CALLS     1324 TOTAL
                     EDM=   .43E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     2.0974        2.0600        .71087E-03   -1.5679    
   2  Prefactor      .0000        3.1973        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .65836        2.1979        .64464E-03   -1.5692    
   4  norm          .36571        .57194        .93713E-04   -1.5696    
   5  Prefactor     30.339        25.418        .18894E-03   -1.5598    
   6  Prefactor     33.896        11.165        .17122E-03   -1.5592    
   7  norm          7.4897        8.9907        .36665E-03   -1.5653    
   8  Prefactor      .0000        2.7643        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm           .0000        2.4802        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .55511E-10    6.3909        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  norm          7.1944        1.0835        .37376E-03   -1.5654    
  12  Prefactor     1.3914        .81665        .92095E-03   -1.5684    
  13  Prefactor     21.628        14.479        .21496E-03   -1.5615    
  14  Prefactor     .55511E-10    7.1128        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          1.2638        1.9011        .99409E-03   -1.5685    
  16  Prefactor     .16653E-09    17.068        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Normalizat    .94699        .15148        .11378       -.94828    
  18  Prefactor     1.0539        .43944E-01    .39688E-01   -.90954    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.3091e-08
Minuit parameter uncertainties:
  1  2.05996
  2  2.20517e-06
  3  2.19787
  4  0.571941
  5  25.4182
  6  11.1652
  7  8.99067
  8  3.00286e-06
  9  1.59607e-07
  10  2.89231e-05
  11  1.08353
  12  0.816648
  13  14.4787
  14  4.11352e-05
  15  1.90114
  16  9.91034e-05
  17  0.151549
  18  0.0439459
Done.

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

Extracting fit parameters...

4FGL J0358.6+0634
   Spectrum: PowerLaw
232    Prefactor:  3.034e+01  2.542e+01  0.000e+00  1.000e+06 ( 1.000e-13)
233        Index:  2.567e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
234        Scale:  7.663e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
460    Prefactor:  1.054e+00  4.395e-02  0.000e+00  1.000e+01 ( 1.000e+00)
461        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
462        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
459   Normalization:  9.470e-01  1.515e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 2.37
Ra Dec: 59.666 6.576
Photon Index (Fixed Index): 2.57 +/- 0.00
Photon Flux (Fixed Index): 3.61e-08 +/- 3.02e-08
Energy Flux (Fixed Index): 9.77e-06 +/- 8.18e-06

TS (Fixed Index): 2.37
Ra Dec: 59.666 6.576
Photon Flux Upper Limit: 9.86904334771e-08 ph cm-2 s-1
Energy Flux Upper Limit: 0.00770787902045 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/28613247/likelihoodResults_713750401_714355201_4FGL_J0358.6+0634_weekly_bin785.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) = 27170.3938067
delta logL = 0.0832200477998

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 27170.3796737
delta logL = 0.0973530611191

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    34.944       1.0000          .0000       .10000E+07
     2 'Index     '    2.3076       1.0000          .0000       10.000    
     3 'Normalizat'    .95422       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0528       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .4630E+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=   27170.38     FROM MIGRAD    STATUS=CONVERGED     95 CALLS      291 TOTAL
                     EDM=   .43E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     34.946        29.973        .67675E-05   -.26878E-05
   2  Index         2.3076        .57604        .15069E-01   -.19869E-04
   3  Normalizat    .95436        .15906        .50279E-03   -.15801E-03
   4  Prefactor     1.0527        .48018E-01    .14512E-03   -.67443E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 34.9464
  Index      = 2.30763
  Normalizat = 0.954357
  Prefactor  = 1.05274
 **********
 **   18 **HESSE 
 **********

 FCN=   27170.38     FROM HESSE     STATUS=OK            25 CALLS      316 TOTAL
                     EDM=   .56E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     34.946        29.604        .13535E-05   -1.5590    
   2  Index         2.3076        .56900        .60276E-03   -.56862    
   3  Normalizat    .95436        .15907        .20112E-04   -.94576    
   4  Prefactor     1.0527        .48023E-01    .29023E-04   -.90992    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 5.5871e-11
Minuit parameter uncertainties:
  1  29.6042
  2  0.570747
  3  0.159152
  4  0.0480251
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) = 27170.3796731
delta logL = 0.0973537275604

Extracting fit parameters...

4FGL J0358.6+0634
   Spectrum: PowerLaw
232    Prefactor:  3.495e+01  2.960e+01  0.000e+00  1.000e+06 ( 1.000e-13)
233        Index:  2.308e+00  5.707e-01  0.000e+00  1.000e+01 (-1.000e+00)
234        Scale:  7.663e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
460    Prefactor:  1.053e+00  4.803e-02  0.000e+00  1.000e+01 ( 1.000e+00)
461        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
462        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
459   Normalization:  9.544e-01  1.592e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 2.56
Ra Dec: 59.666 6.576
Photon Index (Free Index): 2.31 +/- 0.57
Photon Flux (Free Index): 2.94e-08 +/- 3.05e-08
Energy Flux (Free Index): 1.10e-05 +/- 9.70e-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/28613247/cmap_HighResolution_713750401_714355201_4FGL_J0358.6+0634_weekly_bin785.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='7.71e-03', comment='SUCCESS', photon_flux='3.61e-08', energy_flux2='1.10e-05', photon_flux_error='3.02e-08', dlogl='9.74e-02', energy_flux='9.77e-06', photon_flux2='2.94e-08', job_status='DONE', time_completed='2023-09-19 22:00:06.152489', photon_index_error2='0.57', photon_index2='2.31', ts='2.37', fit_tolerance='1e-08', GAL='1.05', photon_index_error='0.00', photon_flux_upper_limit='9.87e-08', energy_flux_error2='9.70e-06', EG='0.95', time_epoch_completed='1695186006.15', return_code='0', job_id='28613247', GAL2='1.05', EG2='0.95', return_code2='0', energy_flux_error='8.18e-06', photon_flux_error2='3.05e-08', ts2='2.56', photon_index='2.57' WHERE bin_id='785' AND source_name='4FGL J0358.6+0634' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Sep 19 22:00:06 PDT 2023

