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


Performing analysis on: 4FGL_J0239.7+0415_weekly_bin825
RA = 39.9403, Dec = 4.2643
tmin = 737942401, tmax = 738547201
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='49202101', job_status='RUN', time_executed='2024-05-28 01:00:49.400207', time_epoch_executed='1716883249.4' WHERE source_name='4FGL J0239.7+0415' and cadence='weekly' and bin_id='825'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/49202101

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

Retrieving the FT1 file...

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

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

Retrieving 107 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/49202101/ft1_4FGL_J0239.7+0415_weekly_bin825.fits


Retrieving the FT1 file...

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

Retrieving 107 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/49202101/ft2_4FGL_J0239.7+0415_weekly_bin825.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/49202101/ft1_4FGL_J0239.7+0415_weekly_bin825.fits outfile=/lscratch/kocevski/49202101/ft1_filteredMKT_4FGL_J0239.7+0415_weekly_bin825.fits ra=39.9403 dec=4.2643 rad=12.0 tmin=737942401.0 tmax=738547201.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.89
user 3.58
sys 0.23

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

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

Number of photons that the gtmktime cut: 1685

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/49202101/ft1_filtered_4FGL_J0239.7+0415_weekly_bin825.fits" evtable="EVENTS" scfile=/lscratch/kocevski/49202101/ft2_4FGL_J0239.7+0415_weekly_bin825.fits sctable="SC_DATA" outfile=/lscratch/kocevski/49202101/ltcube_737942401_738547201_4FGL_J0239.7+0415_weekly_bin825.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/49202101/ft2_4FGL_J0239.7+0415_weekly_bin825.fits
.....................!
real 15.45
user 15.04
sys 0.25

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/49202101/ft1_filtered_4FGL_J0239.7+0415_weekly_bin825.fits evtable="EVENTS" scfile=/lscratch/kocevski/49202101/ft2_4FGL_J0239.7+0415_weekly_bin825.fits sctable="SC_DATA" expcube=/lscratch/kocevski/49202101/ltcube_737942401_738547201_4FGL_J0239.7+0415_weekly_bin825.fits outfile=/lscratch/kocevski/49202101/expmap_737942401_738547201_4FGL_J0239.7+0415_weekly_bin825.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/49202101/ltcube_737942401_738547201_4FGL_J0239.7+0415_weekly_bin825.fits
.....................!
real 59.46
user 55.48
sys 3.64

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/49202101/ft1_filtered_4FGL_J0239.7+0415_weekly_bin825.fits scfile=/lscratch/kocevski/49202101/ft2_4FGL_J0239.7+0415_weekly_bin825.fits outfile=/lscratch/kocevski/49202101/cmap_737942401_738547201_4FGL_J0239.7+0415_weekly_bin825.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 0.40
user 0.22
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/49202101/ft1_filtered_4FGL_J0239.7+0415_weekly_bin825.fits scfile=/lscratch/kocevski/49202101/ft2_4FGL_J0239.7+0415_weekly_bin825.fits outfile=/lscratch/kocevski/49202101/cmap_HighResolution_737942401_738547201_4FGL_J0239.7+0415_weekly_bin825.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.40
user 0.21
sys 0.14

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/49202101/ft1_filtered_4FGL_J0239.7+0415_weekly_bin825.fits evtable="EVENTS" scfile=/lscratch/kocevski/49202101/ft2_4FGL_J0239.7+0415_weekly_bin825.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/49202101/Model_4FGL_J0239.7+0415_weekly_bin825.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/49202101/ft1_filtered_4FGL_J0239.7+0415_weekly_bin825.fits.....................!
real 70.66
user 69.62
sys 0.60

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/49202101/ft1_filtered_4FGL_J0239.7+0415_weekly_bin825.fits', '/lscratch/kocevski/49202101/ft2_4FGL_J0239.7+0415_weekly_bin825.fits', expMap='/lscratch/kocevski/49202101/expmap_737942401_738547201_4FGL_J0239.7+0415_weekly_bin825.fits', expCube='/lscratch/kocevski/49202101/ltcube_737942401_738547201_4FGL_J0239.7+0415_weekly_bin825.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/49202101/Model_4FGL_J0239.7+0415_weekly_bin825.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/49202101/ft1_filtered_4FGL_J0239.7+0415_weekly_bin825.fits
Spacecraft file(s): /lscratch/kocevski/49202101/ft2_4FGL_J0239.7+0415_weekly_bin825.fits
Exposure map: /lscratch/kocevski/49202101/expmap_737942401_738547201_4FGL_J0239.7+0415_weekly_bin825.fits
Exposure cube: /lscratch/kocevski/49202101/ltcube_737942401_738547201_4FGL_J0239.7+0415_weekly_bin825.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/49202101/Model_4FGL_J0239.7+0415_weekly_bin825.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) = 18893.6190036

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    15.015       1.0000          .0000       .10000E+07
     2 'norm      '    13.691       1.0000          .0000       .10000E+07
     3 'Prefactor '    4.1506       1.0000          .0000       .10000E+07
     4 'norm      '    .31272       1.0000          .0000       .10000E+07
     5 'Prefactor '    9.9479       1.0000          .0000       .10000E+07
     6 'Prefactor '    1.8551       1.0000          .0000       .10000E+07
     7 'Prefactor '    1.0665       1.0000          .0000       .10000E+07
     8 'Prefactor '    .17948E-03   1.0000          .0000       .10000E+07
     9 'Prefactor '    2.9346       1.0000          .0000       .10000E+07
    10 'Prefactor '    .73397E-03   1.0000          .0000       .10000E+07
    11 'Prefactor '    23.666       1.0000          .0000       .10000E+07
    12 'norm      '    6.3925       1.0000          .0000       .10000E+07
    13 'Prefactor '    .79131E-04   1.0000          .0000       .10000E+07
    14 'Prefactor '    .37037E-06   1.0000          .0000       .10000E+07
    15 'Prefactor '    .34598E-03   1.0000          .0000       .10000E+07
    16 'Prefactor '    5.1304       1.0000          .0000       .10000E+07
    17 'norm      '    11.872       1.0000          .0000       .10000E+07
    18 'norm      '    2.6979       1.0000          .0000       .10000E+07
    19 'Prefactor '    .93825       1.0000          .0000       .10000E+07
    20 'norm      '    .11691E-06   1.0000          .0000       .10000E+07
    21 'Prefactor '    .13711E-07   1.0000          .0000       .10000E+07
    22 'Prefactor '    .23054E-04   1.0000          .0000       .10000E+07
    23 'Normalizat'    .83368       1.0000         .10000E-01   10.000    
    24 'Prefactor '    1.0873       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=   18893.58     FROM MIGRAD    STATUS=CONVERGED    183 CALLS     1611 TOTAL
                     EDM=   .32E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  3.7%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     15.016        7.2830       -.56758E-07    .49806E-03
   2  norm          13.727        4.1207       -.15018E-09   -.55583E-03
   3  Prefactor     4.1589        1.8275        .36768E-07   -.34265E-02
   4  norm          .31286        .34047        .41030E-08   -.12821E-03
   5  Prefactor     9.9828        10.328       -.73302E-07   -.37548E-03
   6  Prefactor     .26035E-07    2742.6        .72918E-05** at limit **
   7  Prefactor     1.0809        4.6341       -.11273E-06    .18185E-03
   8  Prefactor     .55511E-10    12.733       -.36584E-06** at limit **
   9  Prefactor     2.9120        5.3139        .17273E-06   -.62261E-03
  10  Prefactor     .55511E-10    14.620        .29803E-06** at limit **
  11  Prefactor     23.676        1.3380       -.17740E-09    .14314E-02
  12  norm          6.3740        7.2227        .10138E-06   -.37724E-03
  13  Prefactor     .32752E-08    3.3080        .23758E-06** at limit **
  14  Prefactor      .0000        8.7750       -.43480E-07** at limit **
  15  Prefactor      .0000        6.0448        .18693E-06** at limit **
  16  Prefactor     5.1161        3.2143       -.29572E-07    .69453E-03
  17  norm          11.859        7.0342        .13417E-07    .61088E-04
  18  norm          2.6996        2.6160       -.21207E-07    .44336E-03
  19  Prefactor     .92725        2.2401        .91709E-07   -.51314E-03
  20  norm           .0000        1.8447       -.72177E-07** at limit **
  21  Prefactor     .17764E-08    3.9496        .22906E-06** at limit **
  22  Prefactor      .0000        4.2015        .73877E-07** at limit **
  23  Normalizat    .83367        .12070        .37419E-06   -.13573E-04
  24  Prefactor     1.0876        .68887E-01   -.58962E-06    .61794E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 15.0164
  norm       = 13.7267
  Prefactor  = 4.15889
  norm       = 0.312857
  Prefactor  = 9.98282
  Prefactor  = 2.60347e-08
  Prefactor  = 1.08087
  Prefactor  = 5.55112e-11
  Prefactor  = 2.91198
  Prefactor  = 5.55112e-11
  Prefactor  = 23.6765
  norm       = 6.37399
  Prefactor  = 3.27516e-09
  Prefactor  = 0
  Prefactor  = 0
  Prefactor  = 5.1161
  norm       = 11.8593
  norm       = 2.69961
  Prefactor  = 0.927255
  norm       = 0
  Prefactor  = 1.77636e-09
  Prefactor  = 0
  Normalizat = 0.833666
  Prefactor  = 1.08759
 **********
 **   18 **HESSE 
 **********

 FCN=   18893.58     FROM HESSE     STATUS=OK           459 CALLS     2070 TOTAL
                     EDM=   .77E-05    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     15.016        7.3601        .25822E-03   -1.5630    
   2  norm          13.727        4.1550        .27045E-03   -1.5634    
   3  Prefactor     4.1589        1.8422        .49450E-03   -1.5667    
   4  norm          .31286        .40486        .19575E-02   -1.5697    
   5  Prefactor     9.9828        10.434        .31746E-03   -1.5645    
   6  Prefactor     .26035E-07    22.431        .17346E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     1.0809        4.7044        .11796E-02   -1.5687    
   8  Prefactor     .55511E-10    12.753        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     2.9120        5.3639        .59268E-03   -1.5674    
  10  Prefactor     .55511E-10    14.685        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     23.676        12.890        .20561E-03   -1.5611    
  12  norm          6.3740        7.2517        .39674E-03   -1.5657    
  13  Prefactor     .32752E-08    7.1449        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor      .0000        8.8590        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor      .0000        6.1018        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     5.1161        3.2277        .44363E-03   -1.5663    
  17  norm          11.859        7.0649        .29048E-03   -1.5639    
  18  norm          2.6996        2.6292        .61996E-03   -1.5675    
  19  Prefactor     .92725        2.2519        .43151E-03   -1.5689    
  20  norm           .0000        1.8508        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .17764E-08    7.1338        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor      .0000        4.1424        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Normalizat    .83367        .11607        .81032E-01   -.98832    
  24  Prefactor     1.0876        .63581E-01    .38089E-01   -.89864    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 7.66571e-06
Minuit parameter uncertainties:
  1  7.36014
  2  4.15497
  3  1.8422
  4  0.404857
  5  10.4343
  6  0.00152904
  7  4.5099
  8  5.26145e-05
  9  5.36396
  10  4.23122e-05
  11  12.8905
  12  7.25174
  13  0.000304693
  14  2.38838e-05
  15  6.32114e-06
  16  3.22771
  17  7.0649
  18  2.62918
  19  2.25188
  20  5.72347e-06
  21  0.000224865
  22  5.34942e-06
  23  0.116101
  24  0.0635858
Done.

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

Extracting fit parameters...

4FGL J0239.7+0415
   Spectrum: PowerLaw
277    Prefactor:  2.368e+01  1.289e+01  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.088e+00  6.359e-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.337e-01  1.161e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 4.65
Ra Dec: 39.940 4.264
Photon Index (Fixed Index): 2.78 +/- 0.00
Photon Flux (Fixed Index): 6.76e-08 +/- 3.67e-08
Energy Flux (Fixed Index): 1.54e-05 +/- 8.37e-06

Performing a free index iterative likelihood fit...

Freezing all point sources, except source of interest...

Done.

Freeing candidate source...
Done.

Fit tolerance = 1

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 18893.4088923
delta logL = 0.17104875471

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 18893.4062084
delta logL = 0.173732692798

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   18893.41     FROM MIGRAD    STATUS=CONVERGED     87 CALLS      303 TOTAL
                     EDM=   .90E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     20.673        14.337        .87999E-05    .12351E-02
   2  Index         3.1102        .65487        .11270E-01    .70479E-04
   3  Normalizat    .82205        .12257        .36104E-03   -.13452E-03
   4  Prefactor     1.0915        .66635E-01    .17703E-03   -.21197E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 20.6733
  Index      = 3.11018
  Normalizat = 0.822054
  Prefactor  = 1.09153
 **********
 **   18 **HESSE 
 **********

 FCN=   18893.41     FROM HESSE     STATUS=OK            25 CALLS      328 TOTAL
                     EDM=   .46E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     20.673        13.490        .35200E-06   -1.5617    
   2  Index         3.1102        .61551        .45080E-03   -.38760    
   3  Normalizat    .82205        .12267        .14442E-04   -.99256    
   4  Prefactor     1.0915        .66634E-01    .35407E-04   -.89738    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.59272e-11
Minuit parameter uncertainties:
  1  13.4897
  2  0.617342
  3  0.122712
  4  0.0666388
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) = 18893.4062076
delta logL = 0.173733517535

Extracting fit parameters...

4FGL J0239.7+0415
   Spectrum: PowerLaw
277    Prefactor:  2.067e+01  1.349e+01  0.000e+00  1.000e+06 ( 1.000e-12)
278        Index:  3.110e+00  6.173e-01  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.092e+00  6.664e-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.221e-01  1.227e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 5.07
Ra Dec: 39.940 4.264
Photon Index (Free Index): 3.11 +/- 0.62
Photon Flux (Free Index): 7.97e-08 +/- 4.43e-08
Energy Flux (Free Index): 1.51e-05 +/- 7.98e-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/49202101/cmap_HighResolution_737942401_738547201_4FGL_J0239.7+0415_weekly_bin825.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='6.76e-08', energy_flux2='1.51e-05', photon_flux_error='3.67e-08', dlogl='1.74e-01', energy_flux='1.54e-05', photon_flux2='7.97e-08', job_status='DONE', time_completed='2024-05-28 01:08:56.012270', photon_index_error2='0.62', photon_index2='3.11', ts='4.65', fit_tolerance='1e-08', GAL='1.09', photon_index_error='0.00', energy_flux_error2='7.98e-06', EG='0.83', time_epoch_completed='1716883736.01', return_code='0', job_id='49202101', GAL2='1.09', EG2='0.82', return_code2='0', energy_flux_error='8.37e-06', photon_flux_error2='4.43e-08', ts2='5.07', photon_index='2.78' WHERE bin_id='825' AND source_name='4FGL J0239.7+0415' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue May 28 01:08:56 PDT 2024

