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


Performing analysis on: 4FGL_J2339.6+0242_weekly_bin945
RA = 354.904, Dec = 2.7102
tmin = 810518401, tmax = 811123201
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='38340348', job_status='RUN', time_executed='2026-09-15 19:28:59.899312', time_epoch_executed='1789525739.9' WHERE source_name='4FGL J2339.6+0242' and cadence='weekly' and bin_id='945'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/38340348

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

Retrieving the FT1 file...

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

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

Retrieving 108 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/38340348/ft1_4FGL_J2339.6+0242_weekly_bin945.fits


Retrieving the FT1 file...

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

Retrieving 108 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/38340348/ft2_4FGL_J2339.6+0242_weekly_bin945.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/38340348/ft1_4FGL_J2339.6+0242_weekly_bin945.fits outfile=/lscratch/kocevski/38340348/ft1_filteredMKT_4FGL_J2339.6+0242_weekly_bin945.fits ra=354.904 dec=2.7102 rad=12.0 tmin=810518401.0 tmax=811123201.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 6.60
user 5.82
sys 0.28

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/38340348/ft2_4FGL_J2339.6+0242_weekly_bin945.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/38340348/ft2_4FGL_J2339.6+0242_weekly_bin945.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/38340348/ft1_filteredMKT_4FGL_J2339.6+0242_weekly_bin945.fits evtable="EVENTS" outfile="/lscratch/kocevski/38340348/ft1_filtered_4FGL_J2339.6+0242_weekly_bin945.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 1.14
user 0.25
sys 0.13

Number of photons that the gtmktime cut: 1265

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/38340348/ft1_filtered_4FGL_J2339.6+0242_weekly_bin945.fits" evtable="EVENTS" scfile=/lscratch/kocevski/38340348/ft2_4FGL_J2339.6+0242_weekly_bin945.fits sctable="SC_DATA" outfile=/lscratch/kocevski/38340348/ltcube_810518401_811123201_4FGL_J2339.6+0242_weekly_bin945.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/38340348/ft2_4FGL_J2339.6+0242_weekly_bin945.fits
.....................!
real 20.51
user 19.46
sys 0.27

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/38340348/ft1_filtered_4FGL_J2339.6+0242_weekly_bin945.fits evtable="EVENTS" scfile=/lscratch/kocevski/38340348/ft2_4FGL_J2339.6+0242_weekly_bin945.fits sctable="SC_DATA" expcube=/lscratch/kocevski/38340348/ltcube_810518401_811123201_4FGL_J2339.6+0242_weekly_bin945.fits outfile=/lscratch/kocevski/38340348/expmap_810518401_811123201_4FGL_J2339.6+0242_weekly_bin945.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/38340348/ltcube_810518401_811123201_4FGL_J2339.6+0242_weekly_bin945.fits
.....................!
real 75.95
user 71.01
sys 4.21

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 J2339.6+0242 @ 354.904 2.7102

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/38340348/ft1_filtered_4FGL_J2339.6+0242_weekly_bin945.fits scfile=/lscratch/kocevski/38340348/ft2_4FGL_J2339.6+0242_weekly_bin945.fits outfile=/lscratch/kocevski/38340348/cmap_810518401_811123201_4FGL_J2339.6+0242_weekly_bin945.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=354.904 yref=2.7102 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.67
user 0.27
sys 0.11

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/38340348/ft1_filtered_4FGL_J2339.6+0242_weekly_bin945.fits scfile=/lscratch/kocevski/38340348/ft2_4FGL_J2339.6+0242_weekly_bin945.fits outfile=/lscratch/kocevski/38340348/cmap_HighResolution_810518401_811123201_4FGL_J2339.6+0242_weekly_bin945.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=354.904 yref=2.7102 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.66
user 0.26
sys 0.14

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/38340348/ft1_filtered_4FGL_J2339.6+0242_weekly_bin945.fits evtable="EVENTS" scfile=/lscratch/kocevski/38340348/ft2_4FGL_J2339.6+0242_weekly_bin945.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/38340348/Model_4FGL_J2339.6+0242_weekly_bin945.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/38340348/ft1_filtered_4FGL_J2339.6+0242_weekly_bin945.fits.....................!
real 57.60
user 55.27
sys 1.32

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/38340348/ft1_filtered_4FGL_J2339.6+0242_weekly_bin945.fits', '/lscratch/kocevski/38340348/ft2_4FGL_J2339.6+0242_weekly_bin945.fits', expMap='/lscratch/kocevski/38340348/expmap_810518401_811123201_4FGL_J2339.6+0242_weekly_bin945.fits', expCube='/lscratch/kocevski/38340348/ltcube_810518401_811123201_4FGL_J2339.6+0242_weekly_bin945.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/38340348/Model_4FGL_J2339.6+0242_weekly_bin945.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J2339.6+0242'

4FGL J2339.6+0242
   Spectrum: PowerLaw
463    Prefactor:  8.280e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-13)
464        Index:  2.549e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
465        Scale:  7.790e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/38340348/ft1_filtered_4FGL_J2339.6+0242_weekly_bin945.fits
Spacecraft file(s): /lscratch/kocevski/38340348/ft2_4FGL_J2339.6+0242_weekly_bin945.fits
Exposure map: /lscratch/kocevski/38340348/expmap_810518401_811123201_4FGL_J2339.6+0242_weekly_bin945.fits
Exposure cube: /lscratch/kocevski/38340348/ltcube_810518401_811123201_4FGL_J2339.6+0242_weekly_bin945.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/38340348/Model_4FGL_J2339.6+0242_weekly_bin945.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) = 14264.1730328

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    14.686       1.0000          .0000       .10000E+07
     2 'Prefactor '    17.207       1.0000          .0000       .10000E+07
     3 'Prefactor '    .12057E-06   1.0000          .0000       .10000E+07
     4 'norm      '    1.5463       1.0000          .0000       .10000E+07
     5 'norm      '    6.9754       1.0000          .0000       .10000E+07
     6 'Prefactor '    4.1624       1.0000          .0000       .10000E+07
     7 'norm      '    67.081       1.0000          .0000       .10000E+07
     8 'Prefactor '    .18877E-03   1.0000          .0000       .10000E+07
     9 'Prefactor '    .60502E-06   1.0000          .0000       .10000E+07
    10 'Prefactor '    .60846E-04   1.0000          .0000       .10000E+07
    11 'norm      '    .18596E-07   1.0000          .0000       .10000E+07
    12 'norm      '    1.7854       1.0000          .0000       .10000E+07
    13 'Prefactor '    7.8727       1.0000          .0000       .10000E+07
    14 'Prefactor '    .55983E-04   1.0000          .0000       .10000E+07
    15 'norm      '    6.0607       1.0000          .0000       .10000E+07
    16 'Prefactor '    9.0300       1.0000          .0000       .10000E+07
    17 'Prefactor '    .82960E-05   1.0000          .0000       .10000E+07
    18 'norm      '    .35009E-03   1.0000          .0000       .10000E+07
    19 'norm      '    19.639       1.0000          .0000       .10000E+07
    20 'Prefactor '    .38622       1.0000          .0000       .10000E+07
    21 'Prefactor '    .15722E-05   1.0000          .0000       .10000E+07
    22 'Prefactor '    3.5067       1.0000          .0000       .10000E+07
    23 'Normalizat'    .75115       1.0000         .10000E-01   10.000    
    24 'Prefactor '    1.0500       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5260E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   14264.14     FROM MIGRAD    STATUS=CONVERGED    603 CALLS     2412 TOTAL
                     EDM=   .73E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .7%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     14.645        7.6082       -.47251E-07   -.10007E-02
   2  Prefactor     17.190        10.199       -.16228E-06   -.31658E-02
   3  Prefactor      .0000        1.0944        .15554E-08** at limit **
   4  norm          1.5463        1.5036        .27074E-07   -.14239E-02
   5  norm          6.9713        3.0947        .10769E-08   -.68900E-03
   6  Prefactor     4.1967        4.0847        .35866E-08    .46415E-03
   7  norm          67.090        13.145        .68364E-08    .67212E-03
   8  Prefactor     .22204E-09    10.003       -.26528E-06** at limit **
   9  Prefactor     .22204E-09    6.9449        .27722E-06** at limit **
  10  Prefactor      .0000        3.0830       -.42559E-08** at limit **
  11  norm           .0000        .13545        .30831E-09** at limit **
  12  norm          1.7874        2.8190        .48961E-08   -.37553E-02
  13  Prefactor     7.9613        7.4144       -.35093E-07   -.83964E-03
  14  Prefactor     .16653E-09    11.065        .22558E-06** at limit **
  15  norm          6.0830        7.6017        .95514E-07    .35929E-03
  16  Prefactor     8.9850        6.2429       -.54792E-07   -.15424E-02
  17  Prefactor      .0000        5.6545        .26979E-08** at limit **
  18  norm          .16653E-09    6.5108       -.21470E-06** at limit **
  19  norm          20.146        19.885        .13250E-06    .40986E-02
  20  Prefactor     .32393        1.5946       -.62178E-07    .61378E-02
  21  Prefactor      .0000        20.454        .27056E-07** at limit **
  22  Prefactor     3.5136        7.3029        .18305E-06   -.89073E-02
  23  Normalizat    .75170        .13439        .35817E-06    .20735E-03
  24  Prefactor     1.0495        .91347E-01   -.23025E-06    .35772E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 14.6447
  Prefactor  = 17.1904
  Prefactor  = 0
  norm       = 1.54634
  norm       = 6.97133
  Prefactor  = 4.19668
  norm       = 67.0898
  Prefactor  = 2.22045e-10
  Prefactor  = 2.22045e-10
  Prefactor  = 0
  norm       = 0
  norm       = 1.78737
  Prefactor  = 7.96128
  Prefactor  = 1.66533e-10
  norm       = 6.08297
  Prefactor  = 8.98499
  Prefactor  = 0
  norm       = 1.66533e-10
  norm       = 20.1456
  Prefactor  = 0.323932
  Prefactor  = 0
  Prefactor  = 3.51357
  Normalizat = 0.751697
  Prefactor  = 1.04946
 **********
 **   18 **HESSE 
 **********

 FCN=   14264.14     FROM HESSE     STATUS=OK           401 CALLS     2813 TOTAL
                     EDM=   .56E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     14.645        7.6268        .10444E-04   -1.5631    
   2  Prefactor     17.190        10.213        .96472E-05   -1.5625    
   3  Prefactor      .0000        1.0953        .84235E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  norm          1.5463        1.4839        .13161E-04   -1.5683    
   5  norm          6.9713        3.0944        .13532E-04   -1.5655    
   6  Prefactor     4.1967        4.0872        .19751E-04   -1.5667    
   7  norm          67.090        13.157        .48841E-05   -1.5544    
   8  Prefactor     .22204E-09    10.032        .84235E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .22204E-09    6.9733        .84235E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor      .0000        3.0879        .84235E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  norm           .0000        .13641        .42903E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm          1.7874        2.8359        .24530E-04   -1.5681    
  13  Prefactor     7.9613        7.3930        .14285E-04   -1.5652    
  14  Prefactor     .16653E-09    11.078        .84235E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          6.0830        7.5103        .16304E-04   -1.5659    
  16  Prefactor     8.9850        6.2012        .13332E-04   -1.5648    
  17  Prefactor      .0000        5.6564        .84235E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  norm          .16653E-09    6.5316        .84235E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  norm          20.146        23.442        .90291E-05   -1.5618    
  20  Prefactor     .32393        14.196        .22794E-03   -1.5697    
  21  Prefactor      .0000        20.488        .84235E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     3.5136        12.569        .10793E-03   -1.5670    
  23  Normalizat    .75170        .15587        .32121E-03   -1.0189    
  24  Prefactor     1.0495        .10561        .19729E-03   -.91099    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 5.62378e-09
Minuit parameter uncertainties:
  1  7.62685
  2  10.2134
  3  3.69941e-07
  4  1.48395
  5  3.09439
  6  4.08722
  7  13.157
  8  9.62234e-05
  9  8.05611e-05
  10  5.03101e-07
  11  3.10031e-09
  12  2.83588
  13  7.39299
  14  8.41827e-05
  15  7.51032
  16  6.20121
  17  2.24089e-07
  18  6.0865e-05
  19  23.4422
  20  4.28886
  21  1.1465e-05
  22  12.5687
  23  0.155965
  24  0.105628
Done.

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

Extracting fit parameters...

4FGL J2339.6+0242
   Spectrum: PowerLaw
463    Prefactor:  0.000e+00  1.146e-05  0.000e+00  1.000e+06 ( 1.000e-13)
464        Index:  2.549e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
465        Scale:  7.790e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
523    Prefactor:  1.049e+00  1.056e-01  0.000e+00  1.000e+01 ( 1.000e+00)
524        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
525        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
522   Normalization:  7.517e-01  1.560e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.00
Ra Dec: 354.904 2.710
Photon Flux Upper Limit: 5.10375398345e-08 ph cm-2 s-1
Energy Flux Upper Limit: 0.00398180322877 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/38340348/likelihoodResults_810518401_811123201_4FGL_J2339.6+0242_weekly_bin945.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) = 14264.1647818
delta logL = -0.0241766484596

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 14263.2833714
delta logL = 0.857233842127

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

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

 FCN=   14264.14     FROM MIGRAD    STATUS=CONVERGED    101 CALLS      429 TOTAL
                     EDM=   .26E-11  STRATEGY=1  ERROR MATRIX UNCERTAINTY=100.0%

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor      .0000        2.7700        .42118E-03** at limit **
   2  Index         1.0907        1.1207       -.12437E-04     .0000    
   3  Normalizat    .75170        1.0738       -.11251E-04   -.57746E-04
   4  Prefactor     1.0495        1.1539        .55920E-05   -.43196E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0
  Index      = 1.09066
  Normalizat = 0.751697
  Prefactor  = 1.04946
 **********
 **   18 **HESSE 
 **********
  MNHESS FAILS AND WILL RETURN DIAGONAL MATRIX. 

 FCN=   14264.14     FROM HESSE     STATUS=FAILED         9 CALLS      438 TOTAL
                     EDM=   .26E-11  STRATEGY=1  ERROR MATRIX UNCERTAINTY=100.0%

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor      .0000        2.7700        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         .66389E-01    1.2857       -.12437E-04   -1622.0    
   3  Normalizat    .75170        1.0738       -.11251E-04    61.813    
   4  Prefactor     1.0495        1.1539        .55920E-05    61.921    
                               ERR DEF=  .500    
Minuit fit quality: 1   estimated distance: 2.56265e-12
Minuit parameter uncertainties:
  1  1.40876e-06
  2  1.14637
  3  1.1064
  4  1.1831
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) = 14264.1406052
delta logL = 1.63709046319e-11

Extracting fit parameters...

4FGL J2339.6+0242
   Spectrum: PowerLaw
463    Prefactor:  0.000e+00  1.409e-06  0.000e+00  1.000e+06 ( 1.000e-13)
464        Index:  1.091e+00  1.146e+00  0.000e+00  1.000e+01 (-1.000e+00)
465        Scale:  7.790e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
523    Prefactor:  1.049e+00  1.183e+00  0.000e+00  1.000e+01 ( 1.000e+00)
524        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
525        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
522   Normalization:  7.517e-01  1.106e+00  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.00
Ra Dec: 354.904 2.710

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/38340348/cmap_HighResolution_810518401_811123201_4FGL_J2339.6+0242_weekly_bin945.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='3.98e-03', job_status='DONE', photon_flux_upper_limit='5.10e-08', time_completed='2026-09-15 19:38:38.054509', job_id='38340348', GAL2='1.05', fit_tolerance='1e-08', EG2='0.75', EG='0.75', time_epoch_completed='1789526318.05', return_code2='101', ts='0.00', comment='SUCCESS', return_code='0', GAL='1.05', dlogl='1.64e-11', ts2='0.00', photon_index_error='0.00', photon_index='2.55' WHERE bin_id='945' AND source_name='4FGL J2339.6+0242' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Sep 15 19:38:38 PDT 2026

