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


Performing analysis on: 4FGL_J0238.6+1637_weekly_bin853
RA = 39.668, Dec = 16.6179
tmin = 754876801, tmax = 755481601
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='59976444', job_status='RUN', time_executed='2024-12-10 00:02:19.477896', time_epoch_executed='1733817739.48' WHERE source_name='4FGL J0238.6+1637' and cadence='weekly' and bin_id='853'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/59976444

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

Retrieving the FT1 file...

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

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

Retrieving 107 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/59976444/ft1_4FGL_J0238.6+1637_weekly_bin853.fits


Retrieving the FT1 file...

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

Retrieving 107 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/59976444/ft2_4FGL_J0238.6+1637_weekly_bin853.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/59976444/ft1_4FGL_J0238.6+1637_weekly_bin853.fits outfile=/lscratch/kocevski/59976444/ft1_filteredMKT_4FGL_J0238.6+1637_weekly_bin853.fits ra=39.668 dec=16.6179 rad=12.0 tmin=754876801.0 tmax=755481601.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.32
user 3.22
sys 0.29

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/59976444/ft2_4FGL_J0238.6+1637_weekly_bin853.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/59976444/ft2_4FGL_J0238.6+1637_weekly_bin853.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/59976444/ft1_filteredMKT_4FGL_J0238.6+1637_weekly_bin853.fits evtable="EVENTS" outfile="/lscratch/kocevski/59976444/ft1_filtered_4FGL_J0238.6+1637_weekly_bin853.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.92
user 0.23
sys 0.19

Number of photons that the gtmktime cut: 504

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/59976444/ft1_filtered_4FGL_J0238.6+1637_weekly_bin853.fits" evtable="EVENTS" scfile=/lscratch/kocevski/59976444/ft2_4FGL_J0238.6+1637_weekly_bin853.fits sctable="SC_DATA" outfile=/lscratch/kocevski/59976444/ltcube_754876801_755481601_4FGL_J0238.6+1637_weekly_bin853.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/59976444/ft2_4FGL_J0238.6+1637_weekly_bin853.fits
.....................!
real 37.28
user 36.26
sys 0.43

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/59976444/ft1_filtered_4FGL_J0238.6+1637_weekly_bin853.fits evtable="EVENTS" scfile=/lscratch/kocevski/59976444/ft2_4FGL_J0238.6+1637_weekly_bin853.fits sctable="SC_DATA" expcube=/lscratch/kocevski/59976444/ltcube_754876801_755481601_4FGL_J0238.6+1637_weekly_bin853.fits outfile=/lscratch/kocevski/59976444/expmap_754876801_755481601_4FGL_J0238.6+1637_weekly_bin853.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/59976444/ltcube_754876801_755481601_4FGL_J0238.6+1637_weekly_bin853.fits
.....................!
real 72.61
user 68.06
sys 3.66

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

Setting source of interest to:
4FGL J0238.6+1637 @ 39.668 16.6179

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/59976444/ft1_filtered_4FGL_J0238.6+1637_weekly_bin853.fits scfile=/lscratch/kocevski/59976444/ft2_4FGL_J0238.6+1637_weekly_bin853.fits outfile=/lscratch/kocevski/59976444/cmap_754876801_755481601_4FGL_J0238.6+1637_weekly_bin853.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=39.668 yref=16.6179 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 1.00
user 0.26
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/59976444/ft1_filtered_4FGL_J0238.6+1637_weekly_bin853.fits scfile=/lscratch/kocevski/59976444/ft2_4FGL_J0238.6+1637_weekly_bin853.fits outfile=/lscratch/kocevski/59976444/cmap_HighResolution_754876801_755481601_4FGL_J0238.6+1637_weekly_bin853.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=39.668 yref=16.6179 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.76
user 0.25
sys 0.17

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/59976444/ft1_filtered_4FGL_J0238.6+1637_weekly_bin853.fits evtable="EVENTS" scfile=/lscratch/kocevski/59976444/ft2_4FGL_J0238.6+1637_weekly_bin853.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/59976444/Model_4FGL_J0238.6+1637_weekly_bin853.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/59976444/ft1_filtered_4FGL_J0238.6+1637_weekly_bin853.fits.....................!
real 36.07
user 33.71
sys 1.02

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/59976444/ft1_filtered_4FGL_J0238.6+1637_weekly_bin853.fits', '/lscratch/kocevski/59976444/ft2_4FGL_J0238.6+1637_weekly_bin853.fits', expMap='/lscratch/kocevski/59976444/expmap_754876801_755481601_4FGL_J0238.6+1637_weekly_bin853.fits', expCube='/lscratch/kocevski/59976444/ltcube_754876801_755481601_4FGL_J0238.6+1637_weekly_bin853.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/59976444/Model_4FGL_J0238.6+1637_weekly_bin853.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J0238.6+1637'

4FGL J0238.6+1637
   Spectrum: LogParabola
253         norm:  1.740e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-11)
254        alpha:  2.090e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
255         beta:  9.194e-02  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
256           Eb:  8.889e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/59976444/ft1_filtered_4FGL_J0238.6+1637_weekly_bin853.fits
Spacecraft file(s): /lscratch/kocevski/59976444/ft2_4FGL_J0238.6+1637_weekly_bin853.fits
Exposure map: /lscratch/kocevski/59976444/expmap_754876801_755481601_4FGL_J0238.6+1637_weekly_bin853.fits
Exposure cube: /lscratch/kocevski/59976444/ltcube_754876801_755481601_4FGL_J0238.6+1637_weekly_bin853.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/59976444/Model_4FGL_J0238.6+1637_weekly_bin853.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) = 5585.0511092

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .14090E-05   1.0000          .0000       .10000E+07
     2 'Prefactor '    9.5621       1.0000          .0000       .10000E+07
     3 'norm      '    26.912       1.0000          .0000       .10000E+07
     4 'Prefactor '    .11905E-04   1.0000          .0000       .10000E+07
     5 'Prefactor '    7.4496       1.0000          .0000       .10000E+07
     6 'norm      '    .26916E-02   1.0000          .0000       .10000E+07
     7 'Prefactor '    .68423E-01   1.0000          .0000       .10000E+07
     8 'Prefactor '    40.244       1.0000          .0000       .10000E+07
     9 'Prefactor '    .25512E-01   1.0000          .0000       .10000E+07
    10 'Prefactor '    103.05       1.0000          .0000       .10000E+07
    11 'Prefactor '    .14096E-01   1.0000          .0000       .10000E+07
    12 'Prefactor '    .70990E-03   1.0000          .0000       .10000E+07
    13 'Prefactor '    .72512E-03   1.0000          .0000       .10000E+07
    14 'norm      '    1.1133       1.0000          .0000       .10000E+07
    15 'Prefactor '    .18408E-01   1.0000          .0000       .10000E+07
    16 'norm      '    19.253       1.0000          .0000       .10000E+07
    17 'Prefactor '    .67895E-02   1.0000          .0000       .10000E+07
    18 'Prefactor '    .66340E-02   1.0000          .0000       .10000E+07
    19 'Prefactor '    .17010E-02   1.0000          .0000       .10000E+07
    20 'Prefactor '    13.981       1.0000          .0000       .10000E+07
    21 'norm      '    .12163       1.0000          .0000       .10000E+07
    22 'norm      '    .29931E-02   1.0000          .0000       .10000E+07
    23 'norm      '    11.415       1.0000          .0000       .10000E+07
    24 'norm      '    18.072       1.0000          .0000       .10000E+07
    25 'Prefactor '    .61036E-04   1.0000          .0000       .10000E+07
    26 'Prefactor '    7.0620       1.0000          .0000       .10000E+07
    27 'Prefactor '    .21043E-02   1.0000          .0000       .10000E+07
    28 'Normalizat'    1.1439       1.0000         .10000E-01   10.000    
    29 'Prefactor '    .82268       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5150E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   5585.038     FROM MIGRAD    STATUS=CONVERGED    187 CALLS     2656 TOTAL
                     EDM=   .92E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  3.3%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor      .0000        2.4265        .59893E-08** at limit **
   2  Prefactor     9.5669        3.9299        .13359E-06    .13626E-02
   3  norm          26.924        8.1933        .11651E-06   -.20631E-02
   4  Prefactor      .0000        3.1231       -.87723E-06** at limit **
   5  Prefactor     7.4537        3.6995        .39623E-06    .94513E-03
   6  norm          .15140E-04    80.208       -.57441E-05** at limit **
   7  Prefactor     .29921        9.1325        .15060E-05   -.32850E-02
   8  Prefactor     41.821        38.371        .53098E-05   -.41119E-01
   9  Prefactor     .26146E-06    1.4279        .84619E-06** at limit **
  10  Prefactor     103.57        15.527        .14602E-05   -.52116E-01
  11  Prefactor     .14988E-08    8.6422       -.12235E-05** at limit **
  12  Prefactor     .54512E-07    36.569       -.53187E-05** at limit **
  13  Prefactor     .35194E-07    6.6829       -.25119E-05** at limit **
  14  norm          1.1113        .80461       -.13940E-06    .70204E-02
  15  Prefactor     .49960E-09    33.323       -.67937E-07** at limit **
  16  norm          19.169        16.103        .35757E-05   -.40314E-01
  17  Prefactor     .26539E-05    88.483        .13848E-04** at limit **
  18  Prefactor     .89317E-07    28.936        .54574E-05** at limit **
  19  Prefactor     .61012E-06    11.329       -.11822E-05** at limit **
  20  Prefactor     13.999        2.0623        .15429E-06    .99291E-02
  21  norm          .62539E-06    61.436       -.12280E-04** at limit **
  22  norm          .24591E-07    6.4021        .23525E-05** at limit **
  23  norm          11.496        7.0849        .41110E-06    .41584E-02
  24  norm          18.080        7.4301       -.99397E-06   -.12347    
  25  Prefactor     .13656E-07    7.0304        .73007E-06** at limit **
  26  Prefactor     7.0849        1.4784       -.78136E-07   -.50118E-02
  27  Prefactor     .31863E-06    14.088       -.28460E-05** at limit **
  28  Normalizat    1.1406        .30693       -.19727E-04    .27111E-04
  29  Prefactor     .82319        .12337        .44740E-05   -.10957E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0
  Prefactor  = 9.56686
  norm       = 26.924
  Prefactor  = 0
  Prefactor  = 7.45374
  norm       = 1.51401e-05
  Prefactor  = 0.299209
  Prefactor  = 41.8206
  Prefactor  = 2.61458e-07
  Prefactor  = 103.571
  Prefactor  = 1.4988e-09
  Prefactor  = 5.4512e-08
  Prefactor  = 3.51941e-08
  norm       = 1.11126
  Prefactor  = 4.996e-10
  norm       = 19.1691
  Prefactor  = 2.65393e-06
  Prefactor  = 8.93174e-08
  Prefactor  = 6.10123e-07
  Prefactor  = 13.9994
  norm       = 6.25389e-07
  norm       = 2.45914e-08
  norm       = 11.4959
  norm       = 18.0797
  Prefactor  = 1.36557e-08
  Prefactor  = 7.08491
  Prefactor  = 3.18634e-07
  Normalizat = 1.14063
  Prefactor  = 0.823186
 **********
 **   18 **HESSE 
 **********

 FCN=   5585.038     FROM HESSE     STATUS=OK           613 CALLS     3269 TOTAL
                     EDM=   .70E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor      .0000        2.4223        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     9.5669        3.9297        .32383E-03   -1.5646    
   3  norm          26.924        8.1992        .19280E-03   -1.5604    
   4  Prefactor      .0000        3.1201        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     7.4537        3.7767        .36721E-03   -1.5653    
   6  norm          .15140E-04    123.23        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .29921        23.922        .14871E-01   -1.5697    
   8  Prefactor     41.821        60.589        .15765E-03   -1.5579    
   9  Prefactor     .26146E-06    406.98        .16698E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     103.57        69.044        .98517E-04   -1.5504    
  11  Prefactor     .14988E-08    8.6429        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .54512E-07    37.257        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .35194E-07    6.8120        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          1.1113        .83539        .11171E-02   -1.5687    
  15  Prefactor     .49960E-09    33.264        .17144E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          19.169        17.577        .22798E-03   -1.5620    
  17  Prefactor     .26539E-05    103.17        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .89317E-07    30.132        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .61012E-06    24.748        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     13.999        23.883        .26761E-03   -1.5633    
  21  norm          .62539E-06    9.9836        .13381E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  norm          .24591E-07    6.5078        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  norm          11.496        7.1188        .29627E-03   -1.5640    
  24  norm          18.080        14.478        .23533E-03   -1.5623    
  25  Prefactor     .13656E-07    7.1020        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  Prefactor     7.0849        12.470        .37726E-03   -1.5655    
  27  Prefactor     .31863E-06    24.128        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  Normalizat    1.1406        .28379        .85834E-01   -.88458    
  29  Prefactor     .82319        .11201        .44012E-01   -.98879    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.99483e-07
Minuit parameter uncertainties:
  1  1.60555e-05
  2  3.92969
  3  8.19919
  4  9.23854e-06
  5  3.77675
  6  0.0863903
  7  5.35083
  8  60.5901
  9  0.0206331
  10  69.0443
  11  0.000228065
  12  0.00284963
  13  0.000979309
  14  0.835388
  15  0.000262134
  16  17.5766
  17  0.0330942
  18  0.00328124
  19  0.00777154
  20  23.883
  21  0.00499755
  22  0.00080038
  23  7.11885
  24  14.4782
  25  0.000622502
  26  12.47
  27  0.00554554
  28  0.284171
  29  0.112038
Done.

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

Extracting fit parameters...

4FGL J0238.6+1637
   Spectrum: LogParabola
253         norm:  1.111e+00  8.354e-01  0.000e+00  1.000e+06 ( 1.000e-11)
254        alpha:  2.090e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
255         beta:  9.194e-02  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
256           Eb:  8.889e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
512    Prefactor:  8.232e-01  1.120e-01  0.000e+00  1.000e+01 ( 1.000e+00)
513        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
514        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
511   Normalization:  1.141e+00  2.842e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 3.04
Ra Dec: 39.668 16.618
Photon Index (Fixed Index): 2.09 +/- 0.00
Photon Flux (Fixed Index): 7.92e-08 +/- 5.95e-08
Energy Flux (Fixed Index): 3.96e-05 +/- 2.97e-05

TS (Fixed Index): 3.04
Ra Dec: 39.668 16.618
Photon Flux Upper Limit: 2.00977669783e-07 ph cm-2 s-1
Energy Flux Upper Limit: 0.000100354365193 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/59976444/likelihoodResults_754876801_755481601_4FGL_J0238.6+1637_weekly_bin853.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) = 5585.01757172
delta logL = 0.0200094923139

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5585.01425829
delta logL = 0.02332291323

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   5585.014     FROM MIGRAD    STATUS=CONVERGED     50 CALLS      208 TOTAL
                     EDM=   .15E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          1.0517        15.920        .11735E-02    .59891E-02
   2  alpha         2.2375        3.2609        .29816       -.33870E-04
   3  Normalizat    1.1300        .11465        .86176E-01    .21062E-04
   4  Prefactor     .82554        .41845E-01    .44049E-01    .37201E-05
                               ERR DEF=  .500    
Final values: 
  norm       = 1.05169
  alpha      = 2.23751
  Normalizat = 1.12998
  Prefactor  = 0.825542
 **********
 **   18 **HESSE 
 **********

 FCN=   5585.014     FROM HESSE     STATUS=OK            35 CALLS      243 TOTAL
                     EDM=   .32E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          1.0517        .87009        .53263E-04   -1.5687    
   2  alpha         2.2375        .71924        .14928E-01   -.10519    
   3  Normalizat    1.1300        .29183        .38160E-03   -.88795    
   4  Prefactor     .82554        .12273        .18495E-03   -.98794    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.18851e-10
Minuit parameter uncertainties:
  1  0.870088
  2  0.729669
  3  0.292245
  4  0.122768
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) = 5585.01425817
delta logL = 0.0233230332624

Extracting fit parameters...

4FGL J0238.6+1637
   Spectrum: LogParabola
253         norm:  1.052e+00  8.701e-01  0.000e+00  1.000e+06 ( 1.000e-11)
254        alpha:  2.238e+00  7.297e-01  0.000e+00  5.000e+00 ( 1.000e+00)
255         beta:  9.194e-02  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
256           Eb:  8.889e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
512    Prefactor:  8.255e-01  1.228e-01  0.000e+00  1.000e+01 ( 1.000e+00)
513        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
514        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
511   Normalization:  1.130e+00  2.922e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 3.06
Ra Dec: 39.668 16.618
Photon Index (Free Index): 2.24 +/- 0.73
Photon Flux (Free Index): 9.02e-08 +/- 7.96e-08
Energy Flux (Free Index): 3.65e-05 +/- 3.02e-05

Creating a high resolution counts map...
INFO: Auto-setting vmin to  0.000e+00 [aplpy.core]
INFO: Auto-setting vmax to  0.000e+00 [aplpy.core]
Saving /lscratch/kocevski/59976444/cmap_HighResolution_754876801_755481601_4FGL_J0238.6+1637_weekly_bin853.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.00e-04', comment='SUCCESS', photon_flux='7.92e-08', energy_flux2='3.65e-05', photon_flux_error='5.95e-08', dlogl='2.33e-02', energy_flux='3.96e-05', photon_flux2='9.02e-08', job_status='DONE', time_completed='2024-12-10 00:10:03.864041', photon_index_error2='0.73', photon_index2='2.24', ts='3.04', fit_tolerance='1e-08', GAL='0.82', photon_index_error='0.00', photon_flux_upper_limit='2.01e-07', energy_flux_error2='3.02e-05', EG='1.14', time_epoch_completed='1733818203.86', return_code='0', job_id='59976444', GAL2='0.83', EG2='1.13', return_code2='0', energy_flux_error='2.97e-05', photon_flux_error2='7.96e-08', ts2='3.06', photon_index='2.09' WHERE bin_id='853' AND source_name='4FGL J0238.6+1637' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Dec 10 00:10:03 PST 2024

