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


Performing analysis on: 4FGL_J2339.6+0242_weekly_bin858
RA = 354.904, Dec = 2.7102
tmin = 757900801, tmax = 758505601
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='61728620', job_status='RUN', time_executed='2025-01-14 03:51:15.195848', time_epoch_executed='1736855475.2' WHERE source_name='4FGL J2339.6+0242' and cadence='weekly' and bin_id='858'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/61728620

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

Retrieving the FT1 file...

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

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

Retrieving 107 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/61728620/ft1_4FGL_J2339.6+0242_weekly_bin858.fits


Retrieving the FT1 file...

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

Retrieving 107 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/61728620/ft2_4FGL_J2339.6+0242_weekly_bin858.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/61728620/ft1_4FGL_J2339.6+0242_weekly_bin858.fits outfile=/lscratch/kocevski/61728620/ft1_filteredMKT_4FGL_J2339.6+0242_weekly_bin858.fits ra=354.904 dec=2.7102 rad=12.0 tmin=757900801.0 tmax=758505601.0 emin=100.0 emax=100000.0 zmin=0.0 zmax=90.0 evclass=128 evtype="INDEF" convtype=-1 phasemin=0.0 phasemax=1.0 evtable="EVENTS" chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

Done.
real 3.65
user 3.26
sys 0.30

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

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/61728620/ft2_4FGL_J2339.6+0242_weekly_bin858.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/61728620/ft1_filteredMKT_4FGL_J2339.6+0242_weekly_bin858.fits evtable="EVENTS" outfile="/lscratch/kocevski/61728620/ft1_filtered_4FGL_J2339.6+0242_weekly_bin858.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.42
user 0.20
sys 0.16

Number of photons that the gtmktime cut: 2029

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/61728620/ft1_filtered_4FGL_J2339.6+0242_weekly_bin858.fits" evtable="EVENTS" scfile=/lscratch/kocevski/61728620/ft2_4FGL_J2339.6+0242_weekly_bin858.fits sctable="SC_DATA" outfile=/lscratch/kocevski/61728620/ltcube_757900801_758505601_4FGL_J2339.6+0242_weekly_bin858.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/61728620/ft2_4FGL_J2339.6+0242_weekly_bin858.fits
.....................!
real 25.76
user 25.12
sys 0.34

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/61728620/ft1_filtered_4FGL_J2339.6+0242_weekly_bin858.fits evtable="EVENTS" scfile=/lscratch/kocevski/61728620/ft2_4FGL_J2339.6+0242_weekly_bin858.fits sctable="SC_DATA" expcube=/lscratch/kocevski/61728620/ltcube_757900801_758505601_4FGL_J2339.6+0242_weekly_bin858.fits outfile=/lscratch/kocevski/61728620/expmap_757900801_758505601_4FGL_J2339.6+0242_weekly_bin858.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/61728620/ltcube_757900801_758505601_4FGL_J2339.6+0242_weekly_bin858.fits
.....................!
real 68.27
user 64.04
sys 3.77

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/61728620/ft1_filtered_4FGL_J2339.6+0242_weekly_bin858.fits scfile=/lscratch/kocevski/61728620/ft2_4FGL_J2339.6+0242_weekly_bin858.fits outfile=/lscratch/kocevski/61728620/cmap_757900801_758505601_4FGL_J2339.6+0242_weekly_bin858.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.46
user 0.24
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/61728620/ft1_filtered_4FGL_J2339.6+0242_weekly_bin858.fits scfile=/lscratch/kocevski/61728620/ft2_4FGL_J2339.6+0242_weekly_bin858.fits outfile=/lscratch/kocevski/61728620/cmap_HighResolution_757900801_758505601_4FGL_J2339.6+0242_weekly_bin858.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.42
user 0.23
sys 0.15

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

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/61728620/ft1_filtered_4FGL_J2339.6+0242_weekly_bin858.fits', '/lscratch/kocevski/61728620/ft2_4FGL_J2339.6+0242_weekly_bin858.fits', expMap='/lscratch/kocevski/61728620/expmap_757900801_758505601_4FGL_J2339.6+0242_weekly_bin858.fits', expCube='/lscratch/kocevski/61728620/ltcube_757900801_758505601_4FGL_J2339.6+0242_weekly_bin858.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/61728620/Model_4FGL_J2339.6+0242_weekly_bin858.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/61728620/ft1_filtered_4FGL_J2339.6+0242_weekly_bin858.fits
Spacecraft file(s): /lscratch/kocevski/61728620/ft2_4FGL_J2339.6+0242_weekly_bin858.fits
Exposure map: /lscratch/kocevski/61728620/expmap_757900801_758505601_4FGL_J2339.6+0242_weekly_bin858.fits
Exposure cube: /lscratch/kocevski/61728620/ltcube_757900801_758505601_4FGL_J2339.6+0242_weekly_bin858.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/61728620/Model_4FGL_J2339.6+0242_weekly_bin858.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) = 22003.6065077

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .20814E-04   1.0000          .0000       .10000E+07
     2 'Prefactor '    2.3420       1.0000          .0000       .10000E+07
     3 'Prefactor '    .15543E-08   1.0000          .0000       .10000E+07
     4 'norm      '    .14988E-08   1.0000          .0000       .10000E+07
     5 'norm      '    .51405       1.0000          .0000       .10000E+07
     6 'Prefactor '    1.7181       1.0000          .0000       .10000E+07
     7 'norm      '    173.63       1.0000          .0000       .10000E+07
     8 'Prefactor '    35.106       1.0000          .0000       .10000E+07
     9 'Prefactor '    .73142E-03   1.0000          .0000       .10000E+07
    10 'Prefactor '    .24980E-08   1.0000          .0000       .10000E+07
    11 'norm      '    .39413E-08   1.0000          .0000       .10000E+07
    12 'norm      '    6.7204       1.0000          .0000       .10000E+07
    13 'Prefactor '    .16431E-07   1.0000          .0000       .10000E+07
    14 'Prefactor '    9.1351       1.0000          .0000       .10000E+07
    15 'norm      '    3.0158       1.0000          .0000       .10000E+07
    16 'Prefactor '    2.9234       1.0000          .0000       .10000E+07
    17 'Prefactor '    .29845E-04   1.0000          .0000       .10000E+07
    18 'norm      '    .25891E-02   1.0000          .0000       .10000E+07
    19 'norm      '    81.427       1.0000          .0000       .10000E+07
    20 'Prefactor '    3.4299       1.0000          .0000       .10000E+07
    21 'Prefactor '    19.916       1.0000          .0000       .10000E+07
    22 'Prefactor '    12.846       1.0000          .0000       .10000E+07
    23 'Normalizat'    .96956       1.0000         .10000E-01   10.000    
    24 'Prefactor '    .88736       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5260E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   22002.35     FROM MIGRAD    STATUS=CONVERGED    153 CALLS     1252 TOTAL
                     EDM=   .39E-11  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.7%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .16653E-09    15.883       -.27840E-06** at limit **
   2  Prefactor     2.3529        6.7405        .15201E-06   -.61590E-04
   3  Prefactor      .0000        1.3966       -.67726E-07** at limit **
   4  norm           .0000        .43305        .13439E-06** at limit **
   5  norm          .51447        1.1060        .24960E-07   -.39504E-03
   6  Prefactor     1.7093        5.5059        .14561E-06    .16817E-04
   7  norm          173.72        1.4000       -.61495E-08   -.14682E-01
   8  Prefactor     35.062        1.8873       -.13330E-08    .70199E-02
   9  Prefactor     .11102E-09    19.517        .20267E-06** at limit **
  10  Prefactor      .0000        2.1215       -.11775E-06** at limit **
  11  norm           .0000        .35065       -.36028E-07** at limit **
  12  norm          6.7215        2.9017       -.97423E-07   -.45875E-04
  13  Prefactor      .0000        2.5779        .34189E-06** at limit **
  14  Prefactor     9.1052        1.5294       -.29519E-07   -.18154E-02
  15  norm          3.0167        4.1083        .59351E-08   -.45057E-04
  16  Prefactor     2.9246        3.6330        .86915E-07    .11639E-03
  17  Prefactor     .55511E-10    10.812        .51542E-06** at limit **
  18  norm          .55511E-10    25.415       -.13080E-06** at limit **
  19  norm          81.329        1.4895        .88247E-09   -.41954E-02
  20  Prefactor     3.4400        2.9701        .12769E-06    .33396E-04
  21  Prefactor     20.012        2.3617       -.43103E-07   -.60643E-02
  22  Prefactor     12.903        9.3466       -.71111E-07    .23860E-03
  23  Normalizat    .96934        .12363        .12290E-05   -.51853E-05
  24  Prefactor     .88740        .82918E-01   -.20929E-05   -.15095E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 1.66533e-10
  Prefactor  = 2.35289
  Prefactor  = 0
  norm       = 0
  norm       = 0.514475
  Prefactor  = 1.70929
  norm       = 173.718
  Prefactor  = 35.0617
  Prefactor  = 1.11022e-10
  Prefactor  = 0
  norm       = 0
  norm       = 6.72147
  Prefactor  = 0
  Prefactor  = 9.10524
  norm       = 3.01667
  Prefactor  = 2.9246
  Prefactor  = 5.55112e-11
  norm       = 5.55112e-11
  norm       = 81.3291
  Prefactor  = 3.44001
  Prefactor  = 20.0115
  Prefactor  = 12.9025
  Normalizat = 0.969336
  Prefactor  = 0.887399
 **********
 **   18 **HESSE 
 **********

 FCN=   22002.35     FROM HESSE     STATUS=OK           459 CALLS     1711 TOTAL
                     EDM=   .22E-05    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .16653E-09    15.626        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     2.3529        6.7700        .66966E-03   -1.5677    
   3  Prefactor      .0000        1.3942        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  norm           .0000        .42823        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          .51447        1.1009        .51646E-02   -1.5694    
   6  Prefactor     1.7093        5.6045        .80125E-03   -1.5682    
   7  norm          173.72        15.292        .75898E-04   -1.5444    
   8  Prefactor     35.062        18.116        .16880E-03   -1.5590    
   9  Prefactor     .11102E-09    19.188        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor      .0000        2.1211        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  norm           .0000        .17104        .20541E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm          6.7215        2.9107        .38683E-03   -1.5656    
  13  Prefactor      .0000        2.5705        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     9.1052        17.441        .33136E-03   -1.5648    
  15  norm          3.0167        4.2432        .58416E-03   -1.5673    
  16  Prefactor     2.9246        3.7462        .59389E-03   -1.5674    
  17  Prefactor     .55511E-10    10.928        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  norm          .55511E-10    25.267        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  norm          81.329        22.585        .11083E-03   -1.5528    
  20  Prefactor     3.4400        3.6650        .54592E-03   -1.5671    
  21  Prefactor     20.012        16.599        .22415E-03   -1.5618    
  22  Prefactor     12.903        9.4184        .27922E-03   -1.5636    
  23  Normalizat    .96934        .10813        .65413E-01   -.94065    
  24  Prefactor     .88740        .71341E-01    .44844E-01   -.96583    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.17058e-06
Minuit parameter uncertainties:
  1  0.000103921
  2  6.77
  3  1.15761e-06
  4  3.09097e-07
  5  1.10092
  6  5.60447
  7  15.2919
  8  18.1161
  9  8.62195e-05
  10  6.81704e-07
  11  4.79034e-07
  12  2.91073
  13  1.94529e-06
  14  17.441
  15  4.24322
  16  3.74621
  17  5.38392e-05
  18  5.96382e-05
  19  22.5849
  20  3.66498
  21  16.5995
  22  9.41836
  23  0.108153
  24  0.0713485
Done.

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

Extracting fit parameters...

4FGL J2339.6+0242
   Spectrum: PowerLaw
463    Prefactor:  2.001e+01  1.660e+01  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:  8.874e-01  7.135e-02  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:  9.693e-01  1.082e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 2.60
Ra Dec: 354.904 2.710
Photon Index (Fixed Index): 2.55 +/- 0.00
Photon Flux (Fixed Index): 2.42e-08 +/- 2.01e-08
Energy Flux (Fixed Index): 6.67e-06 +/- 5.54e-06

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

Saving results to:
/lscratch/kocevski/61728620/likelihoodResults_757900801_758505601_4FGL_J2339.6+0242_weekly_bin858.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) = 22002.3510969
delta logL = 0.000173127617018

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 22002.3510437
delta logL = 0.000226366668358

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    19.862       1.0000          .0000       .10000E+07
     2 'Index     '    2.5671       1.0000          .0000       10.000    
     3 'Normalizat'    .96877       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .88759       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.

 FCN=   22002.35     FROM MIGRAD    STATUS=CONVERGED     50 CALLS      218 TOTAL
                     EDM=   .26E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     19.862        334.46        .22446E-03    .48451E-02
   2  Index         2.5675        3.6487        .23306        .16611E-03
   3  Normalizat    .96877        .39222E-01    .65430E-01    .55355E-04
   4  Prefactor     .88763        .22529E-01    .44847E-01    .27623E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 19.8616
  Index      = 2.56752
  Normalizat = 0.968766
  Prefactor  = 0.887631
 **********
 **   18 **HESSE 
 **********

 FCN=   22002.35     FROM HESSE     STATUS=OK            31 CALLS      249 TOTAL
                     EDM=   .17E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     19.862        19.004        .89783E-05   -1.5619    
   2  Index         2.5675        .91868        .13938E-01   -.50807    
   3  Normalizat    .96877        .11968        .28940E-03   -.94084    
   4  Prefactor     .88763        .83061E-01    .21316E-03   -.96575    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.7354e-08
Minuit parameter uncertainties:
  1  19.0039
  2  0.925592
  3  0.119709
  4  0.0830726
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) = 22002.351043
delta logL = 0.000227032676776

Extracting fit parameters...

4FGL J2339.6+0242
   Spectrum: PowerLaw
463    Prefactor:  1.986e+01  1.900e+01  0.000e+00  1.000e+06 ( 1.000e-13)
464        Index:  2.568e+00  9.256e-01  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:  8.876e-01  8.307e-02  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:  9.688e-01  1.197e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 2.59
Ra Dec: 354.904 2.710
Photon Index (Free Index): 2.57 +/- 0.93
Photon Flux (Free Index): 2.47e-08 +/- 2.86e-08
Energy Flux (Free Index): 6.67e-06 +/- 5.51e-06

Creating a high resolution counts map...
INFO: Auto-setting vmin to -1.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  1.110e+00 [aplpy.core]
Saving /lscratch/kocevski/61728620/cmap_HighResolution_757900801_758505601_4FGL_J2339.6+0242_weekly_bin858.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='5.17e-03', comment='SUCCESS', photon_flux='2.42e-08', energy_flux2='6.67e-06', photon_flux_error='2.01e-08', dlogl='2.27e-04', energy_flux='6.67e-06', photon_flux2='2.47e-08', job_status='DONE', time_completed='2025-01-14 04:00:37.763481', photon_index_error2='0.93', photon_index2='2.57', ts='2.60', fit_tolerance='1e-08', GAL='0.89', photon_index_error='0.00', photon_flux_upper_limit='6.63e-08', energy_flux_error2='5.51e-06', EG='0.97', time_epoch_completed='1736856037.76', return_code='0', job_id='61728620', GAL2='0.89', EG2='0.97', return_code2='0', energy_flux_error='5.54e-06', photon_flux_error2='2.86e-08', ts2='2.59', photon_index='2.55' WHERE bin_id='858' AND source_name='4FGL J2339.6+0242' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Jan 14 04:00:37 PST 2025

