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


Performing analysis on: 4FGL_J0239.7+0415_weekly_bin906
RA = 39.9403, Dec = 4.2643
tmin = 786931201, tmax = 787536001
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='17373001', job_status='RUN', time_executed='2025-12-16 01:06:47.019891', time_epoch_executed='1765876007.02' WHERE source_name='4FGL J0239.7+0415' and cadence='weekly' and bin_id='906'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/17373001

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

Retrieving the FT1 file...

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

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

Retrieving 107 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/17373001/ft1_4FGL_J0239.7+0415_weekly_bin906.fits


Retrieving the FT1 file...

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

Retrieving 107 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/17373001/ft2_4FGL_J0239.7+0415_weekly_bin906.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/17373001/ft1_4FGL_J0239.7+0415_weekly_bin906.fits outfile=/lscratch/kocevski/17373001/ft1_filteredMKT_4FGL_J0239.7+0415_weekly_bin906.fits ra=39.9403 dec=4.2643 rad=12.0 tmin=786931201.0 tmax=787536001.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.49
user 4.45
sys 0.25

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/17373001/ft2_4FGL_J0239.7+0415_weekly_bin906.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/17373001/ft2_4FGL_J0239.7+0415_weekly_bin906.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/17373001/ft1_filteredMKT_4FGL_J0239.7+0415_weekly_bin906.fits evtable="EVENTS" outfile="/lscratch/kocevski/17373001/ft1_filtered_4FGL_J0239.7+0415_weekly_bin906.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.99
user 0.19
sys 0.12

Number of photons that the gtmktime cut: 1346

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/17373001/ft1_filtered_4FGL_J0239.7+0415_weekly_bin906.fits" evtable="EVENTS" scfile=/lscratch/kocevski/17373001/ft2_4FGL_J0239.7+0415_weekly_bin906.fits sctable="SC_DATA" outfile=/lscratch/kocevski/17373001/ltcube_786931201_787536001_4FGL_J0239.7+0415_weekly_bin906.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/17373001/ft2_4FGL_J0239.7+0415_weekly_bin906.fits
.....................!
real 16.07
user 15.06
sys 0.23

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/17373001/ft1_filtered_4FGL_J0239.7+0415_weekly_bin906.fits evtable="EVENTS" scfile=/lscratch/kocevski/17373001/ft2_4FGL_J0239.7+0415_weekly_bin906.fits sctable="SC_DATA" expcube=/lscratch/kocevski/17373001/ltcube_786931201_787536001_4FGL_J0239.7+0415_weekly_bin906.fits outfile=/lscratch/kocevski/17373001/expmap_786931201_787536001_4FGL_J0239.7+0415_weekly_bin906.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/17373001/ltcube_786931201_787536001_4FGL_J0239.7+0415_weekly_bin906.fits
.....................!
real 59.99
user 55.41
sys 3.38

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

Setting source of interest to:
4FGL J0239.7+0415 @ 39.9403 4.2643

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/17373001/ft1_filtered_4FGL_J0239.7+0415_weekly_bin906.fits scfile=/lscratch/kocevski/17373001/ft2_4FGL_J0239.7+0415_weekly_bin906.fits outfile=/lscratch/kocevski/17373001/cmap_786931201_787536001_4FGL_J0239.7+0415_weekly_bin906.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.9403 yref=4.2643 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.03
user 0.20
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/17373001/ft1_filtered_4FGL_J0239.7+0415_weekly_bin906.fits scfile=/lscratch/kocevski/17373001/ft2_4FGL_J0239.7+0415_weekly_bin906.fits outfile=/lscratch/kocevski/17373001/cmap_HighResolution_786931201_787536001_4FGL_J0239.7+0415_weekly_bin906.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.9403 yref=4.2643 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.96
user 0.20
sys 0.13

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/17373001/ft1_filtered_4FGL_J0239.7+0415_weekly_bin906.fits evtable="EVENTS" scfile=/lscratch/kocevski/17373001/ft2_4FGL_J0239.7+0415_weekly_bin906.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/17373001/Model_4FGL_J0239.7+0415_weekly_bin906.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/17373001/ft1_filtered_4FGL_J0239.7+0415_weekly_bin906.fits.....................!
real 58.74
user 56.62
sys 0.83

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/17373001/ft1_filtered_4FGL_J0239.7+0415_weekly_bin906.fits', '/lscratch/kocevski/17373001/ft2_4FGL_J0239.7+0415_weekly_bin906.fits', expMap='/lscratch/kocevski/17373001/expmap_786931201_787536001_4FGL_J0239.7+0415_weekly_bin906.fits', expCube='/lscratch/kocevski/17373001/ltcube_786931201_787536001_4FGL_J0239.7+0415_weekly_bin906.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/17373001/Model_4FGL_J0239.7+0415_weekly_bin906.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J0239.7+0415'

4FGL J0239.7+0415
   Spectrum: PowerLaw
277    Prefactor:  7.975e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-12)
278        Index:  2.775e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
279        Scale:  4.112e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/17373001/ft1_filtered_4FGL_J0239.7+0415_weekly_bin906.fits
Spacecraft file(s): /lscratch/kocevski/17373001/ft2_4FGL_J0239.7+0415_weekly_bin906.fits
Exposure map: /lscratch/kocevski/17373001/expmap_786931201_787536001_4FGL_J0239.7+0415_weekly_bin906.fits
Exposure cube: /lscratch/kocevski/17373001/ltcube_786931201_787536001_4FGL_J0239.7+0415_weekly_bin906.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/17373001/Model_4FGL_J0239.7+0415_weekly_bin906.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) = 15050.8932387

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .88946E-04   1.0000          .0000       .10000E+07
     2 'norm      '    4.9449       1.0000          .0000       .10000E+07
     3 'Prefactor '    3.8632       1.0000          .0000       .10000E+07
     4 'norm      '    1.2926       1.0000          .0000       .10000E+07
     5 'Prefactor '    .36116E-02   1.0000          .0000       .10000E+07
     6 'Prefactor '    .86921E-02   1.0000          .0000       .10000E+07
     7 'Prefactor '    .23193E-01   1.0000          .0000       .10000E+07
     8 'Prefactor '    2.3593       1.0000          .0000       .10000E+07
     9 'Prefactor '    .39276E-04   1.0000          .0000       .10000E+07
    10 'Prefactor '    .54342E-02   1.0000          .0000       .10000E+07
    11 'Prefactor '    .44375E-03   1.0000          .0000       .10000E+07
    12 'norm      '    18.487       1.0000          .0000       .10000E+07
    13 'Prefactor '    2.9914       1.0000          .0000       .10000E+07
    14 'Prefactor '    30.597       1.0000          .0000       .10000E+07
    15 'Prefactor '    12.037       1.0000          .0000       .10000E+07
    16 'Prefactor '    .24374       1.0000          .0000       .10000E+07
    17 'norm      '    3.5017       1.0000          .0000       .10000E+07
    18 'norm      '    .11113E-06   1.0000          .0000       .10000E+07
    19 'Prefactor '    .21621E-03   1.0000          .0000       .10000E+07
    20 'norm      '    .25434E-04   1.0000          .0000       .10000E+07
    21 'Prefactor '    19.504       1.0000          .0000       .10000E+07
    22 'Prefactor '    3.8774       1.0000          .0000       .10000E+07
    23 'Normalizat'    .80605       1.0000         .10000E-01   10.000    
    24 'Prefactor '    1.0208       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5190E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   15050.88     FROM MIGRAD    STATUS=CONVERGED    146 CALLS     2004 TOTAL
                     EDM=   .81E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  4.3%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .11102E-09    3.7430        .39916E-06** at limit **
   2  norm          4.9456        2.9676        .25172E-07    .26370E-03
   3  Prefactor     3.8630        1.7193        .79698E-08    .14364E-02
   4  norm          1.2930        .59356        .33229E-07    .13702E-02
   5  Prefactor     .66613E-09    5.7034       -.44725E-06** at limit **
   6  Prefactor     .82712E-08    12.867       -.44987E-06** at limit **
   7  Prefactor     .23864E-06    .93080       -.85086E-07** at limit **
   8  Prefactor     2.3545        1.2904        .24306E-07   -.24850E-02
   9  Prefactor     .44409E-09    2.6158       -.10467E-06** at limit **
  10  Prefactor     .72164E-09    17.121        .12090E-06** at limit **
  11  Prefactor     .11102E-09    3.0351        .67696E-07** at limit **
  12  norm          18.498        7.0247       -.22821E-06   -.64917E-01
  13  Prefactor     2.9886        5.4444        .85502E-07    .21489E-01
  14  Prefactor     30.563        8.4499       -.99240E-07    .14786    
  15  Prefactor     12.034        1.4872        .42796E-07   -.60395E-02
  16  Prefactor     .24883        13.561        .14439E-05** at limit **
  17  norm          3.5140        6.7876        .11942E-06   -.13735E-01
  18  norm           .0000        1.0233       -.10816E-07** at limit **
  19  Prefactor     .55511E-10    2.3925        .41090E-08** at limit **
  20  norm          .25812E-05    117.35       -.30440E-05** at limit **
  21  Prefactor     19.508        2.0338        .69444E-07    .58037E-03
  22  Prefactor     3.8783        2.6878        .99204E-07    .30636E-03
  23  Normalizat    .80610        .13735       -.51376E-05    .77324E-05
  24  Prefactor     1.0208        .75482E-01    .23685E-05    .86064E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 1.11022e-10
  norm       = 4.9456
  Prefactor  = 3.86297
  norm       = 1.29298
  Prefactor  = 6.66134e-10
  Prefactor  = 8.27116e-09
  Prefactor  = 2.38642e-07
  Prefactor  = 2.35452
  Prefactor  = 4.44089e-10
  Prefactor  = 7.21645e-10
  Prefactor  = 1.11022e-10
  norm       = 18.4976
  Prefactor  = 2.98857
  Prefactor  = 30.5628
  Prefactor  = 12.0345
  Prefactor  = 0.248826
  norm       = 3.51403
  norm       = 0
  Prefactor  = 5.55112e-11
  norm       = 2.58121e-06
  Prefactor  = 19.508
  Prefactor  = 3.87831
  Normalizat = 0.806098
  Prefactor  = 1.02084
 **********
 **   18 **HESSE 
 **********

 FCN=   15050.88     FROM HESSE     STATUS=OK           469 CALLS     2473 TOTAL
                     EDM=   .87E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .11102E-09    3.7476        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  norm          4.9456        2.9790        .45204E-03   -1.5663    
   3  Prefactor     3.8630        1.7299        .51317E-03   -1.5669    
   4  norm          1.2930        .60053        .97324E-03   -1.5685    
   5  Prefactor     .66613E-09    5.7136        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .82712E-08    12.901        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .23864E-06    1.6657        .11278E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     2.3545        9.1471        .66695E-03   -1.5677    
   9  Prefactor     .44409E-09    2.6347        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .72164E-09    17.188        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .11102E-09    3.0404        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm          18.498        10.136        .23266E-03   -1.5622    
  13  Prefactor     2.9886        8.5987        .58668E-03   -1.5673    
  14  Prefactor     30.563        28.626        .18081E-03   -1.5597    
  15  Prefactor     12.034        14.530        .28848E-03   -1.5639    
  16  Prefactor     .24883        1.6792        .84914E-02   -1.5698    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          3.5140        6.8938        .54005E-03   -1.5670    
  18  norm           .0000        1.0247        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .55511E-10    2.3869        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  norm          .25812E-05    2.1526        .60504E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     19.508        12.028        .22651E-03   -1.5620    
  22  Prefactor     3.8783        2.6872        .51219E-03   -1.5669    
  23  Normalizat    .80610        .13240        .79244E-01   -.99843    
  24  Prefactor     1.0208        .69191E-01    .42060E-01   -.92038    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 8.67988e-07
Minuit parameter uncertainties:
  1  4.21967e-05
  2  2.979
  3  1.72989
  4  0.60053
  5  0.000123151
  6  0.000653558
  7  0.00126101
  8  9.14715
  9  6.72695e-05
  10  0.000222065
  11  3.49608e-05
  12  10.1364
  13  8.59871
  14  28.6261
  15  14.5303
  16  1.29281
  17  6.89379
  18  3.58953e-07
  19  2.28135e-05
  20  0.00471433
  21  12.0276
  22  2.68715
  23  0.132454
  24  0.0691974
Done.

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

Extracting fit parameters...

4FGL J0239.7+0415
   Spectrum: PowerLaw
277    Prefactor:  1.110e-10  3.496e-05  0.000e+00  1.000e+06 ( 1.000e-12)
278        Index:  2.775e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
279        Scale:  4.112e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
516    Prefactor:  1.021e+00  6.920e-02  0.000e+00  1.000e+01 ( 1.000e+00)
517        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
518        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
515   Normalization:  8.061e-01  1.325e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 39.940 4.264
Photon Flux Upper Limit: 4.24741403366e-08 ph cm-2 s-1
Energy Flux Upper Limit: 0.00335795539803 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/17373001/likelihoodResults_786931201_787536001_4FGL_J0239.7+0415_weekly_bin906.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): 102
logL (Free Index) = 15050.8795789
delta logL = -6.34749922028e-05

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 15050.8795157
delta logL = -2.86379872705e-07

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
  MNHESS FAILS AND WILL RETURN DIAGONAL MATRIX. 

 FCN=   15050.88     FROM MIGRAD    STATUS=CONVERGED     40 CALLS      248 TOTAL
                     EDM=   .15E-11  STRATEGY=1  ERROR MATRIX UNCERTAINTY=100.0%

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor      .0000        2.7561        .42118E-03** at limit **
   2  Index         3.1819        1.9901        .60782E-04     .0000    
   3  Normalizat    .80610        1.1447        .31462E-05   -.32625E-04
   4  Prefactor     1.0208        1.2361       -.18878E-07   -.79592E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0
  Index      = 3.18186
  Normalizat = 0.806098
  Prefactor  = 1.02084
 **********
 **   18 **HESSE 
 **********
  MNHESS FAILS AND WILL RETURN DIAGONAL MATRIX. 

 FCN=   15050.88     FROM HESSE     STATUS=FAILED         9 CALLS      257 TOTAL
                     EDM=   .15E-11  STRATEGY=1  ERROR MATRIX UNCERTAINTY=100.0%

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor      .0000        2.7561        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         1.1394        2.2167        .60782E-04   -.37216    
   3  Normalizat    .80610        1.1447        .31462E-05   -.99843    
   4  Prefactor     1.0208        1.2361       -.18878E-07   -.92038    
                               ERR DEF=  .500    
Minuit fit quality: 1   estimated distance: 1.47047e-12
Minuit parameter uncertainties:
  1  4.11157e-06
  2  2.05623
  3  1.18197
  4  1.27333
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Done.

MINUIT Return Code (Free Index): 101
logL (Free Index) = 15050.8795154
delta logL = 1.81898940355e-11

Extracting fit parameters...

4FGL J0239.7+0415
   Spectrum: PowerLaw
277    Prefactor:  0.000e+00  4.112e-06  0.000e+00  1.000e+06 ( 1.000e-12)
278        Index:  3.182e+00  2.056e+00  0.000e+00  1.000e+01 (-1.000e+00)
279        Scale:  4.112e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
516    Prefactor:  1.021e+00  1.273e+00  0.000e+00  1.000e+01 ( 1.000e+00)
517        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
518        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
515   Normalization:  8.061e-01  1.182e+00  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 39.940 4.264

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/17373001/cmap_HighResolution_786931201_787536001_4FGL_J0239.7+0415_weekly_bin906.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='3.36e-03', job_status='DONE', photon_flux_upper_limit='4.25e-08', time_completed='2025-12-16 01:20:40.604707', job_id='17373001', GAL2='1.02', fit_tolerance='1e-08', EG2='0.81', EG='0.81', time_epoch_completed='1765876840.6', return_code2='101', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.02', dlogl='1.82e-11', ts2='0.00', photon_index_error='0.00', photon_index='2.78' WHERE bin_id='906' AND source_name='4FGL J0239.7+0415' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Dec 16 01:20:41 PST 2025

