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


Performing analysis on: 4FGL_J0227.8+2246_weekly_bin787
RA = 36.9544, Dec = 22.7775
tmin = 714960001, tmax = 715564801
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='28599948', job_status='RUN', time_executed='2023-09-19 17:21:05.308753', time_epoch_executed='1695169265.31' WHERE source_name='4FGL J0227.8+2246' and cadence='weekly' and bin_id='787'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/28599948

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

Retrieving the FT1 file...

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

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

Retrieving 107 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/28599948/ft1_4FGL_J0227.8+2246_weekly_bin787.fits


Retrieving the FT1 file...

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

Retrieving 107 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/28599948/ft2_4FGL_J0227.8+2246_weekly_bin787.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/28599948/ft1_4FGL_J0227.8+2246_weekly_bin787.fits outfile=/lscratch/kocevski/28599948/ft1_filteredMKT_4FGL_J0227.8+2246_weekly_bin787.fits ra=36.9544 dec=22.7775 rad=12.0 tmin=714960001.0 tmax=715564801.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 5.08
user 4.76
sys 0.25

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/28599948/ft2_4FGL_J0227.8+2246_weekly_bin787.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/28599948/ft2_4FGL_J0227.8+2246_weekly_bin787.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/28599948/ft1_filteredMKT_4FGL_J0227.8+2246_weekly_bin787.fits evtable="EVENTS" outfile="/lscratch/kocevski/28599948/ft1_filtered_4FGL_J0227.8+2246_weekly_bin787.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.36
user 0.19
sys 0.13

Number of photons that the gtmktime cut: 2223

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/28599948/ft1_filtered_4FGL_J0227.8+2246_weekly_bin787.fits" evtable="EVENTS" scfile=/lscratch/kocevski/28599948/ft2_4FGL_J0227.8+2246_weekly_bin787.fits sctable="SC_DATA" outfile=/lscratch/kocevski/28599948/ltcube_714960001_715564801_4FGL_J0227.8+2246_weekly_bin787.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/28599948/ft2_4FGL_J0227.8+2246_weekly_bin787.fits
.....................!
real 16.27
user 15.95
sys 0.20

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/28599948/ft1_filtered_4FGL_J0227.8+2246_weekly_bin787.fits evtable="EVENTS" scfile=/lscratch/kocevski/28599948/ft2_4FGL_J0227.8+2246_weekly_bin787.fits sctable="SC_DATA" expcube=/lscratch/kocevski/28599948/ltcube_714960001_715564801_4FGL_J0227.8+2246_weekly_bin787.fits outfile=/lscratch/kocevski/28599948/expmap_714960001_715564801_4FGL_J0227.8+2246_weekly_bin787.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/28599948/ltcube_714960001_715564801_4FGL_J0227.8+2246_weekly_bin787.fits
.....................!
real 60.06
user 56.06
sys 3.54

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

Setting source of interest to:
4FGL J0227.8+2246 @ 36.9544 22.7775

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/28599948/ft1_filtered_4FGL_J0227.8+2246_weekly_bin787.fits scfile=/lscratch/kocevski/28599948/ft2_4FGL_J0227.8+2246_weekly_bin787.fits outfile=/lscratch/kocevski/28599948/cmap_714960001_715564801_4FGL_J0227.8+2246_weekly_bin787.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=36.9544 yref=22.7775 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.36
user 0.22
sys 0.12

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/28599948/ft1_filtered_4FGL_J0227.8+2246_weekly_bin787.fits scfile=/lscratch/kocevski/28599948/ft2_4FGL_J0227.8+2246_weekly_bin787.fits outfile=/lscratch/kocevski/28599948/cmap_HighResolution_714960001_715564801_4FGL_J0227.8+2246_weekly_bin787.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=36.9544 yref=22.7775 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.36
user 0.20
sys 0.13

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/28599948/ft1_filtered_4FGL_J0227.8+2246_weekly_bin787.fits evtable="EVENTS" scfile=/lscratch/kocevski/28599948/ft2_4FGL_J0227.8+2246_weekly_bin787.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/28599948/Model_4FGL_J0227.8+2246_weekly_bin787.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/28599948/ft1_filtered_4FGL_J0227.8+2246_weekly_bin787.fits.....................!
real 99.90
user 98.51
sys 0.90

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/28599948/ft1_filtered_4FGL_J0227.8+2246_weekly_bin787.fits', '/lscratch/kocevski/28599948/ft2_4FGL_J0227.8+2246_weekly_bin787.fits', expMap='/lscratch/kocevski/28599948/expmap_714960001_715564801_4FGL_J0227.8+2246_weekly_bin787.fits', expCube='/lscratch/kocevski/28599948/ltcube_714960001_715564801_4FGL_J0227.8+2246_weekly_bin787.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/28599948/Model_4FGL_J0227.8+2246_weekly_bin787.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J0227.8+2246'

4FGL J0227.8+2246
   Spectrum: PowerLaw
242    Prefactor:  5.054e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-14)
243        Index:  2.144e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
244        Scale:  2.284e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/28599948/ft1_filtered_4FGL_J0227.8+2246_weekly_bin787.fits
Spacecraft file(s): /lscratch/kocevski/28599948/ft2_4FGL_J0227.8+2246_weekly_bin787.fits
Exposure map: /lscratch/kocevski/28599948/expmap_714960001_715564801_4FGL_J0227.8+2246_weekly_bin787.fits
Exposure cube: /lscratch/kocevski/28599948/ltcube_714960001_715564801_4FGL_J0227.8+2246_weekly_bin787.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/28599948/Model_4FGL_J0227.8+2246_weekly_bin787.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) = 23862.3836789

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .32684E-05   1.0000          .0000       .10000E+07
     2 'norm      '    .74720       1.0000          .0000       .10000E+07
     3 'Prefactor '    2.6256       1.0000          .0000       .10000E+07
     4 'norm      '    3.7296       1.0000          .0000       .10000E+07
     5 'Prefactor '    8.2011       1.0000          .0000       .10000E+07
     6 'Prefactor '    1.3410       1.0000          .0000       .10000E+07
     7 'Prefactor '    .14722       1.0000          .0000       .10000E+07
     8 'norm      '    .27000E-05   1.0000          .0000       .10000E+07
     9 'Prefactor '    .41230E-03   1.0000          .0000       .10000E+07
    10 'Prefactor '    21.957       1.0000          .0000       .10000E+07
    11 'Prefactor '    .10773E-05   1.0000          .0000       .10000E+07
    12 'norm      '    .89541       1.0000          .0000       .10000E+07
    13 'Prefactor '    7.8959       1.0000          .0000       .10000E+07
    14 'norm      '    .73036       1.0000          .0000       .10000E+07
    15 'Prefactor '    5.9944       1.0000          .0000       .10000E+07
    16 'Prefactor '    8.1911       1.0000          .0000       .10000E+07
    17 'Prefactor '    .35431E-03   1.0000          .0000       .10000E+07
    18 'Prefactor '    7.1628       1.0000          .0000       .10000E+07
    19 'Prefactor '    12.332       1.0000          .0000       .10000E+07
    20 'Prefactor '    2.9232       1.0000          .0000       .10000E+07
    21 'norm      '    6.5052       1.0000          .0000       .10000E+07
    22 'Prefactor '    8.6317       1.0000          .0000       .10000E+07
    23 'Normalizat'    1.3272       1.0000         .10000E-01   10.000    
    24 'Prefactor '    .84627       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5300E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   23862.33     FROM MIGRAD    STATUS=CONVERGED    142 CALLS     2008 TOTAL
                     EDM=   .24E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.4%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .55511E-10    9.7418        .53614E-06** at limit **
   2  norm          .74710        .38361       -.24456E-07    .24558E-02
   3  Prefactor     2.6267        3.9976        .48645E-06   -.12127E-02
   4  norm          3.7252        2.5639       -.89509E-07   -.27877E-03
   5  Prefactor     8.2006        2.1601       -.13431E-07    .56913E-03
   6  Prefactor     1.3505        4.0015        .41076E-06   -.30879E-03
   7  Prefactor     .14298        3.6326       -.11103E-06** at limit **
   8  norm          .55511E-10    12.204       -.50016E-07** at limit **
   9  Prefactor     .55511E-09    26.631       -.67931E-06** at limit **
  10  Prefactor     22.024        1.0189        .13237E-08    .56201E-03
  11  Prefactor      .0000        4.5671       -.22813E-06** at limit **
  12  norm          .89547        .76001       -.43740E-07    .46646E-03
  13  Prefactor     7.9086        6.4645        .24381E-06   -.11895E-02
  14  norm          .73132        .32515       -.95834E-08   -.24951E-02
  15  Prefactor     6.0481        2.6072        .77443E-07    .71719E-02
  16  Prefactor     8.0705        9.4520        .31558E-07    .26324E-02
  17  Prefactor     .22204E-09    19.665       -.32748E-06** at limit **
  18  Prefactor     7.1677        4.7305        .67308E-07   -.15366E-04
  19  Prefactor     12.278        2.7652        .33083E-08   -.12166E-01
  20  Prefactor     2.8273        1.3627       -.39487E-07   -.30769E-03
  21  norm          6.5082        4.7587        .68305E-08   -.68467E-04
  22  Prefactor     8.6312        4.4985        .94365E-07   -.51523E-03
  23  Normalizat    1.3273        .14670       -.23819E-05    .39543E-04
  24  Prefactor     .84631        .61613E-01    .14732E-05    .34164E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 5.55112e-11
  norm       = 0.7471
  Prefactor  = 2.6267
  norm       = 3.72525
  Prefactor  = 8.20057
  Prefactor  = 1.35051
  Prefactor  = 0.142984
  norm       = 5.55112e-11
  Prefactor  = 5.55112e-10
  Prefactor  = 22.024
  Prefactor  = 0
  norm       = 0.895471
  Prefactor  = 7.90863
  norm       = 0.73132
  Prefactor  = 6.04812
  Prefactor  = 8.07052
  Prefactor  = 2.22045e-10
  Prefactor  = 7.16769
  Prefactor  = 12.2775
  Prefactor  = 2.8273
  norm       = 6.50817
  Prefactor  = 8.63115
  Normalizat = 1.3273
  Prefactor  = 0.846313
 **********
 **   18 **HESSE 
 **********

 FCN=   23862.33     FROM HESSE     STATUS=OK           461 CALLS     2469 TOTAL
                     EDM=   .50E-05    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .55511E-10    9.7411        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  norm          .74710        .38449        .56957E-03   -1.5691    
   3  Prefactor     2.6267        4.0097        .62911E-03   -1.5676    
   4  norm          3.7252        2.6236        .52262E-03   -1.5669    
   5  Prefactor     8.2006        2.1556        .34985E-03   -1.5651    
   6  Prefactor     1.3505        4.0964        .94609E-03   -1.5685    
   7  Prefactor     .14298        .96372        .49780E-02   -1.5700    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .55511E-10    12.251        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .55511E-09    26.706        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     22.024        18.753        .21347E-03   -1.5614    
  11  Prefactor      .0000        4.5821        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm          .89547        .76876        .46078E-03   -1.5689    
  13  Prefactor     7.9086        6.6250        .35660E-03   -1.5652    
  14  norm          .73132        .32887        .58277E-03   -1.5691    
  15  Prefactor     6.0481        20.775        .40988E-03   -1.5659    
  16  Prefactor     8.0705        10.150        .35006E-03   -1.5651    
  17  Prefactor     .22204E-09    19.770        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     7.1677        4.7473        .37456E-03   -1.5654    
  19  Prefactor     12.278        13.380        .28500E-03   -1.5638    
  20  Prefactor     2.8273        49.766        .59392E-03   -1.5674    
  21  norm          6.5082        4.7453        .39325E-03   -1.5657    
  22  Prefactor     8.6312        4.5003        .34095E-03   -1.5649    
  23  Normalizat    1.3273        .12789        .75435E-01   -.82755    
  24  Prefactor     .84631        .53584E-01    .44317E-01   -.98043    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.95106e-06
Minuit parameter uncertainties:
  1  3.70441e-05
  2  0.384489
  3  4.00973
  4  2.6236
  5  2.15557
  6  4.09638
  7  0.74242
  8  6.08335e-05
  9  0.000239556
  10  18.7529
  11  7.0811e-06
  12  0.768762
  13  6.62505
  14  0.328869
  15  20.7749
  16  10.1504
  17  0.000132215
  18  4.74731
  19  13.38
  20  23.724
  21  4.74531
  22  4.50032
  23  0.127924
  24  0.0535874
Done.

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

Extracting fit parameters...

4FGL J0227.8+2246
   Spectrum: PowerLaw
242    Prefactor:  2.202e+01  1.875e+01  0.000e+00  1.000e+06 ( 1.000e-14)
243        Index:  2.144e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
244        Scale:  2.284e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
527    Prefactor:  8.463e-01  5.359e-02  0.000e+00  1.000e+01 ( 1.000e+00)
528        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
529        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
526   Normalization:  1.327e+00  1.279e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 6.07
Ra Dec: 36.954 22.777
Photon Index (Fixed Index): 2.14 +/- 0.00
Photon Flux (Fixed Index): 1.57e-08 +/- 1.34e-08
Energy Flux (Fixed Index): 7.89e-06 +/- 6.71e-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) = 23861.3543507
delta logL = 0.978021777286

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 23861.3101732
delta logL = 1.02219921558

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    34.786       1.0000          .0000       .10000E+07
     2 'Index     '    1.4778       1.0000          .0000       10.000    
     3 'Normalizat'    1.3349       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .84519       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5300E+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=   23861.31     FROM MIGRAD    STATUS=CONVERGED     86 CALLS      282 TOTAL
                     EDM=   .23E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     34.812        30.972        .33914E-04   -.21052E-03
   2  Index         1.4779        .45926        .13552E-01    .18523E-04
   3  Normalizat    1.3350        .13733        .33300E-03   -.20744E-03
   4  Prefactor     .84517        .60334E-01    .17779E-03    .33512E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 34.8118
  Index      = 1.47788
  Normalizat = 1.335
  Prefactor  = 0.845165
 **********
 **   18 **HESSE 
 **********

 FCN=   23861.31     FROM HESSE     STATUS=OK            23 CALLS      305 TOTAL
                     EDM=   .23E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     34.812        31.396        .13566E-05   -1.5590    
   2  Index         1.4779        .46572        .54207E-03   -.78161    
   3  Normalizat    1.3350        .13741        .13320E-04   -.82527    
   4  Prefactor     .84517        .60375E-01    .35558E-04   -.98084    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.32452e-10
Minuit parameter uncertainties:
  1  31.3958
  2  0.467065
  3  0.137445
  4  0.0603801
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) = 23861.3101728
delta logL = 1.02219969463

Extracting fit parameters...

4FGL J0227.8+2246
   Spectrum: PowerLaw
242    Prefactor:  3.481e+01  3.140e+01  0.000e+00  1.000e+06 ( 1.000e-14)
243        Index:  1.478e+00  4.671e-01  0.000e+00  1.000e+01 (-1.000e+00)
244        Scale:  2.284e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
527    Prefactor:  8.452e-01  6.038e-02  0.000e+00  1.000e+01 ( 1.000e+00)
528        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
529        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
526   Normalization:  1.335e+00  1.374e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 8.11
Ra Dec: 36.954 22.777
Photon Index (Free Index): 1.48 +/- 0.47
Photon Flux (Free Index): 7.15e-09 +/- 8.75e-09
Energy Flux (Free Index): 2.43e-05 +/- 2.70e-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/28599948/cmap_HighResolution_714960001_715564801_4FGL_J0227.8+2246_weekly_bin787.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='1.57e-08', energy_flux2='2.43e-05', photon_flux_error='1.34e-08', dlogl='1.02e+00', energy_flux='7.89e-06', photon_flux2='7.15e-09', job_status='DONE', time_completed='2023-09-19 17:30:44.960591', photon_index_error2='0.47', photon_index2='1.48', ts='6.07', fit_tolerance='1e-08', GAL='0.85', photon_index_error='0.00', energy_flux_error2='2.70e-05', EG='1.33', time_epoch_completed='1695169844.96', return_code='0', job_id='28599948', GAL2='0.85', EG2='1.34', return_code2='0', energy_flux_error='6.71e-06', photon_flux_error2='8.75e-09', ts2='8.11', photon_index='2.14' WHERE bin_id='787' AND source_name='4FGL J0227.8+2246' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Sep 19 17:30:45 PDT 2023

