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


Performing analysis on: 4FGL_J1228.7+4858_weekly_bin771
RA = 187.179, Dec = 48.9827
tmin = 705283201, tmax = 705888001
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='17489777', job_status='RUN', time_executed='2023-05-16 02:20:55.788268', time_epoch_executed='1684228855.79' WHERE source_name='4FGL J1228.7+4858' and cadence='weekly' and bin_id='771'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/17489777

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

Retrieving the FT1 file...

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

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

Retrieving 107 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/17489777/ft1_4FGL_J1228.7+4858_weekly_bin771.fits


Retrieving the FT1 file...

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

Retrieving 107 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/17489777/ft2_4FGL_J1228.7+4858_weekly_bin771.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/17489777/ft1_4FGL_J1228.7+4858_weekly_bin771.fits outfile=/lscratch/kocevski/17489777/ft1_filteredMKT_4FGL_J1228.7+4858_weekly_bin771.fits ra=187.179 dec=48.9827 rad=12.0 tmin=705283201.0 tmax=705888001.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.59
user 3.31
sys 0.22

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/17489777/ft2_4FGL_J1228.7+4858_weekly_bin771.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/17489777/ft2_4FGL_J1228.7+4858_weekly_bin771.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/17489777/ft1_filteredMKT_4FGL_J1228.7+4858_weekly_bin771.fits evtable="EVENTS" outfile="/lscratch/kocevski/17489777/ft1_filtered_4FGL_J1228.7+4858_weekly_bin771.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.44
user 0.22
sys 0.13

Number of photons that the gtmktime cut: 1942

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/17489777/ft1_filtered_4FGL_J1228.7+4858_weekly_bin771.fits" evtable="EVENTS" scfile=/lscratch/kocevski/17489777/ft2_4FGL_J1228.7+4858_weekly_bin771.fits sctable="SC_DATA" outfile=/lscratch/kocevski/17489777/ltcube_705283201_705888001_4FGL_J1228.7+4858_weekly_bin771.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/17489777/ft2_4FGL_J1228.7+4858_weekly_bin771.fits
.....................!
real 18.00
user 17.57
sys 0.22

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/17489777/ft1_filtered_4FGL_J1228.7+4858_weekly_bin771.fits evtable="EVENTS" scfile=/lscratch/kocevski/17489777/ft2_4FGL_J1228.7+4858_weekly_bin771.fits sctable="SC_DATA" expcube=/lscratch/kocevski/17489777/ltcube_705283201_705888001_4FGL_J1228.7+4858_weekly_bin771.fits outfile=/lscratch/kocevski/17489777/expmap_705283201_705888001_4FGL_J1228.7+4858_weekly_bin771.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/17489777/ltcube_705283201_705888001_4FGL_J1228.7+4858_weekly_bin771.fits
.....................!
real 61.88
user 57.82
sys 3.55

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

Setting source of interest to:
4FGL J1228.7+4858 @ 187.179 48.9827

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/17489777/ft1_filtered_4FGL_J1228.7+4858_weekly_bin771.fits scfile=/lscratch/kocevski/17489777/ft2_4FGL_J1228.7+4858_weekly_bin771.fits outfile=/lscratch/kocevski/17489777/cmap_705283201_705888001_4FGL_J1228.7+4858_weekly_bin771.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=187.179 yref=48.9827 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.38
user 0.22
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/17489777/ft1_filtered_4FGL_J1228.7+4858_weekly_bin771.fits scfile=/lscratch/kocevski/17489777/ft2_4FGL_J1228.7+4858_weekly_bin771.fits outfile=/lscratch/kocevski/17489777/cmap_HighResolution_705283201_705888001_4FGL_J1228.7+4858_weekly_bin771.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=187.179 yref=48.9827 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.22
sys 0.14

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/17489777/ft1_filtered_4FGL_J1228.7+4858_weekly_bin771.fits evtable="EVENTS" scfile=/lscratch/kocevski/17489777/ft2_4FGL_J1228.7+4858_weekly_bin771.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/17489777/Model_4FGL_J1228.7+4858_weekly_bin771.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/17489777/ft1_filtered_4FGL_J1228.7+4858_weekly_bin771.fits.....................!
real 53.70
user 52.20
sys 1.02

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/17489777/ft1_filtered_4FGL_J1228.7+4858_weekly_bin771.fits', '/lscratch/kocevski/17489777/ft2_4FGL_J1228.7+4858_weekly_bin771.fits', expMap='/lscratch/kocevski/17489777/expmap_705283201_705888001_4FGL_J1228.7+4858_weekly_bin771.fits', expCube='/lscratch/kocevski/17489777/ltcube_705283201_705888001_4FGL_J1228.7+4858_weekly_bin771.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/17489777/Model_4FGL_J1228.7+4858_weekly_bin771.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1228.7+4858'

4FGL J1228.7+4858
   Spectrum: PowerLaw
359    Prefactor:  7.350e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-13)
360        Index:  2.556e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
361        Scale:  8.802e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/17489777/ft1_filtered_4FGL_J1228.7+4858_weekly_bin771.fits
Spacecraft file(s): /lscratch/kocevski/17489777/ft2_4FGL_J1228.7+4858_weekly_bin771.fits
Exposure map: /lscratch/kocevski/17489777/expmap_705283201_705888001_4FGL_J1228.7+4858_weekly_bin771.fits
Exposure cube: /lscratch/kocevski/17489777/ltcube_705283201_705888001_4FGL_J1228.7+4858_weekly_bin771.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/17489777/Model_4FGL_J1228.7+4858_weekly_bin771.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) = 21258.4796332

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .17717E-04   1.0000          .0000       .10000E+07
     2 'norm      '    .81153       1.0000          .0000       .10000E+07
     3 'norm      '    10.115       1.0000          .0000       .10000E+07
     4 'Prefactor '    1.3993       1.0000          .0000       .10000E+07
     5 'Prefactor '    .44204E-05   1.0000          .0000       .10000E+07
     6 'Prefactor '    9.4196       1.0000          .0000       .10000E+07
     7 'norm      '    .49571E-07   1.0000          .0000       .10000E+07
     8 'norm      '    4.4993       1.0000          .0000       .10000E+07
     9 'Prefactor '    21.846       1.0000          .0000       .10000E+07
    10 'Prefactor '    2.3061       1.0000          .0000       .10000E+07
    11 'norm      '    2.8357       1.0000          .0000       .10000E+07
    12 'Prefactor '    2.6105       1.0000          .0000       .10000E+07
    13 'norm      '    2.6469       1.0000          .0000       .10000E+07
    14 'Prefactor '    3.5240       1.0000          .0000       .10000E+07
    15 'norm      '    11.500       1.0000          .0000       .10000E+07
    16 'norm      '    .23925       1.0000          .0000       .10000E+07
    17 'Prefactor '    .23737E-05   1.0000          .0000       .10000E+07
    18 'Prefactor '    3.7021       1.0000          .0000       .10000E+07
    19 'norm      '    1.2477       1.0000          .0000       .10000E+07
    20 'Normalizat'    1.1893       1.0000         .10000E-01   10.000    
    21 'Prefactor '    .84067       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6900E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   21258.44     FROM MIGRAD    STATUS=CONVERGED    101 CALLS     1260 TOTAL
                     EDM=   .67E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.1%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm           .0000        14.468       -.65597E-06** at limit **
   2  norm          .81237        .50985        .16781E-07    .19537E-03
   3  norm          10.082        4.3155        .90659E-08   -.14996E-03
   4  Prefactor     1.3923        1.3475       -.29162E-07   -.64181E-03
   5  Prefactor      .0000        5.0068       -.36240E-06** at limit **
   6  Prefactor     9.4471        1.8076        .10261E-07    .32131E-02
   7  norm           .0000        .70380       -.22262E-07** at limit **
   8  norm          4.5077        3.3443       -.13802E-07    .20122E-02
   9  Prefactor     21.761        7.5087        .36463E-07   -.37744E-01
  10  Prefactor     2.3016        2.2916        .33270E-09   -.19311E-03
  11  norm          2.8357        1.0441        .62936E-08   -.62339E-04
  12  Prefactor     2.6269        1.4923       -.10551E-07   -.32296E-02
  13  norm          2.6452        .98740        .94011E-08   -.19782E-03
  14  Prefactor     3.5342        2.6148       -.34261E-07   -.12102E-03
  15  norm          11.497        6.5842       -.51975E-07   -.11074E-02
  16  norm          .23911        .78368        .58904E-07** at limit **
  17  Prefactor     .55511E-10    3.5502        .88317E-07** at limit **
  18  Prefactor     3.6760        8.0447       -.75709E-07   -.13738E-01
  19  norm          1.2493        1.1806        .23958E-08    .27651E-03
  20  Normalizat    1.1894        .10100        .80168E-06    .68298E-05
  21  Prefactor     .84057        .12220       -.96494E-06    .49685E-05
                               ERR DEF=  .500    
Final values: 
  norm       = 0
  norm       = 0.81237
  norm       = 10.0816
  Prefactor  = 1.3923
  Prefactor  = 0
  Prefactor  = 9.44712
  norm       = 0
  norm       = 4.5077
  Prefactor  = 21.7605
  Prefactor  = 2.30163
  norm       = 2.83572
  Prefactor  = 2.62688
  norm       = 2.64518
  Prefactor  = 3.53417
  norm       = 11.4971
  norm       = 0.239109
  Prefactor  = 5.55112e-11
  Prefactor  = 3.67598
  norm       = 1.2493
  Normalizat = 1.18945
  Prefactor  = 0.840573
 **********
 **   18 **HESSE 
 **********

 FCN=   21258.44     FROM HESSE     STATUS=OK           371 CALLS     1631 TOTAL
                     EDM=   .20E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm           .0000        14.458        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  norm          .81237        .51319        .52079E-03   -1.5690    
   3  norm          10.082        4.3205        .31482E-03   -1.5644    
   4  Prefactor     1.3923        1.5114        .91708E-03   -1.5684    
   5  Prefactor      .0000        5.0096        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     9.4471        11.832        .32629E-03   -1.5646    
   7  norm           .0000        .68886        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          4.5077        3.5413        .47442E-03   -1.5666    
   9  Prefactor     21.761        12.227        .21401E-03   -1.5615    
  10  Prefactor     2.3016        2.3058        .67542E-03   -1.5678    
  11  norm          2.8357        1.0458        .60361E-04   -1.5674    
  12  Prefactor     2.6269        7.6793        .63107E-03   -1.5676    
  13  norm          2.6452        .98846        .62637E-03   -1.5675    
  14  Prefactor     3.5342        2.6172        .53826E-03   -1.5670    
  15  norm          11.497        6.5905        .29516E-03   -1.5640    
  16  norm          .23911        .68319        .40423E-02   -1.5698    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     .55511E-10    3.5668        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     3.6760        10.525        .52463E-03   -1.5670    
  19  norm          1.2493        1.1721        .10016E-02   -1.5686    
  20  Normalizat    1.1894        .88426E-01    .35160E-01   -.86929    
  21  Prefactor     .84057        .10566        .67926E-01   -.98250    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.98518e-07
Minuit parameter uncertainties:
  1  3.08869e-06
  2  0.513193
  3  4.32051
  4  1.51136
  5  1.18014e-05
  6  11.8323
  7  4.37621e-07
  8  3.5413
  9  12.2267
  10  2.30577
  11  1.04583
  12  7.67935
  13  0.98846
  14  2.6172
  15  6.59046
  16  0.68319
  17  2.41355e-05
  18  10.5253
  19  1.17205
  20  0.0884368
  21  0.105688
Done.

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

Extracting fit parameters...

4FGL J1228.7+4858
   Spectrum: PowerLaw
359    Prefactor:  2.176e+01  1.223e+01  0.000e+00  1.000e+06 ( 1.000e-13)
360        Index:  2.556e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
361        Scale:  8.802e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
687    Prefactor:  8.406e-01  1.057e-01  0.000e+00  1.000e+01 ( 1.000e+00)
688        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
689        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
686   Normalization:  1.189e+00  8.844e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 6.21
Ra Dec: 187.179 48.983
Photon Index (Fixed Index): 2.56 +/- 0.00
Photon Flux (Fixed Index): 3.63e-08 +/- 2.04e-08
Energy Flux (Fixed Index): 9.94e-06 +/- 5.59e-06

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) = 21258.4416052
delta logL = 0.00126218974037

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 21258.4409323
delta logL = 0.00193511959878

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    21.294       1.0000          .0000       .10000E+07
     2 'Index     '    2.5827       1.0000          .0000       10.000    
     3 'Normalizat'    1.1885       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .84140       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6900E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   21258.44     FROM MIGRAD    STATUS=CONVERGED     61 CALLS      244 TOTAL
                     EDM=   .21E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     21.303        187.07        .21677E-03    .98751E-02
   2  Index         2.5823        2.9480        .16018        .43405E-03
   3  Normalizat    1.1885        .40038E-01    .35181E-01    .21226E-02
   4  Prefactor     .84132        .40071E-01    .67899E-01    .16233E-02
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 21.3033
  Index      = 2.58234
  Normalizat = 1.18852
  Prefactor  = 0.84132
 **********
 **   18 **HESSE 
 **********

 FCN=   21258.44     FROM HESSE     STATUS=OK            27 CALLS      271 TOTAL
                     EDM=   .14E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     21.303        14.098        .86708E-05   -1.5616    
   2  Index         2.5823        .45744        .88320E-02   -.50469    
   3  Normalizat    1.1885        .10179        .21189E-03   -.86958    
   4  Prefactor     .84132        .12221        .30039E-03   -.98223    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.37888e-09
Minuit parameter uncertainties:
  1  14.0984
  2  0.458274
  3  0.101809
  4  0.122251
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) = 21258.4409317
delta logL = 0.00193570204283

Extracting fit parameters...

4FGL J1228.7+4858
   Spectrum: PowerLaw
359    Prefactor:  2.130e+01  1.410e+01  0.000e+00  1.000e+06 ( 1.000e-13)
360        Index:  2.582e+00  4.583e-01  0.000e+00  1.000e+01 (-1.000e+00)
361        Scale:  8.802e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
687    Prefactor:  8.413e-01  1.223e-01  0.000e+00  1.000e+01 ( 1.000e+00)
688        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
689        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
686   Normalization:  1.189e+00  1.018e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 6.23
Ra Dec: 187.179 48.983
Photon Index (Free Index): 2.58 +/- 0.46
Photon Flux (Free Index): 3.71e-08 +/- 2.17e-08
Energy Flux (Free Index): 9.88e-06 +/- 5.28e-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/17489777/cmap_HighResolution_705283201_705888001_4FGL_J1228.7+4858_weekly_bin771.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='3.63e-08', energy_flux2='9.88e-06', photon_flux_error='2.04e-08', dlogl='1.94e-03', energy_flux='9.94e-06', photon_flux2='3.71e-08', job_status='DONE', time_completed='2023-05-16 02:28:31.617583', photon_index_error2='0.46', photon_index2='2.58', ts='6.21', fit_tolerance='1e-08', GAL='0.84', photon_index_error='0.00', energy_flux_error2='5.28e-06', EG='1.19', time_epoch_completed='1684229311.62', return_code='0', job_id='17489777', GAL2='0.84', EG2='1.19', return_code2='0', energy_flux_error='5.59e-06', photon_flux_error2='2.17e-08', ts2='6.23', photon_index='2.56' WHERE bin_id='771' AND source_name='4FGL J1228.7+4858' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue May 16 02:28:31 PDT 2023

