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


Performing analysis on: 4FGL_J1401.7-3217_weekly_bin908
RA = 210.446, Dec = -32.2877
tmin = 788140801, tmax = 788745601
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='18159535', job_status='RUN', time_executed='2025-12-30 01:47:01.454013', time_epoch_executed='1767088021.45' WHERE source_name='4FGL J1401.7-3217' and cadence='weekly' and bin_id='908'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/18159535

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

Retrieving the FT1 file...

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

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

Retrieving 107 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/18159535/ft1_4FGL_J1401.7-3217_weekly_bin908.fits


Retrieving the FT1 file...

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

Retrieving 107 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/18159535/ft2_4FGL_J1401.7-3217_weekly_bin908.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/18159535/ft1_4FGL_J1401.7-3217_weekly_bin908.fits outfile=/lscratch/kocevski/18159535/ft1_filteredMKT_4FGL_J1401.7-3217_weekly_bin908.fits ra=210.446 dec=-32.2877 rad=12.0 tmin=788140801.0 tmax=788745601.0 emin=100.0 emax=100000.0 zmin=0.0 zmax=90.0 evclass=128 evtype="INDEF" convtype=-1 phasemin=0.0 phasemax=1.0 evtable="EVENTS" chatter=2 clobber=yes debug=no gui=no mode="ql"

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

Done.
real 4.99
user 4.54
sys 0.29

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/18159535/ft2_4FGL_J1401.7-3217_weekly_bin908.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/18159535/ft2_4FGL_J1401.7-3217_weekly_bin908.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/18159535/ft1_filteredMKT_4FGL_J1401.7-3217_weekly_bin908.fits evtable="EVENTS" outfile="/lscratch/kocevski/18159535/ft1_filtered_4FGL_J1401.7-3217_weekly_bin908.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.44
user 0.23
sys 0.12

Number of photons that the gtmktime cut: 1958

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/18159535/ft1_filtered_4FGL_J1401.7-3217_weekly_bin908.fits" evtable="EVENTS" scfile=/lscratch/kocevski/18159535/ft2_4FGL_J1401.7-3217_weekly_bin908.fits sctable="SC_DATA" outfile=/lscratch/kocevski/18159535/ltcube_788140801_788745601_4FGL_J1401.7-3217_weekly_bin908.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/18159535/ft2_4FGL_J1401.7-3217_weekly_bin908.fits
.....................!
real 20.22
user 19.68
sys 0.25

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/18159535/ft1_filtered_4FGL_J1401.7-3217_weekly_bin908.fits evtable="EVENTS" scfile=/lscratch/kocevski/18159535/ft2_4FGL_J1401.7-3217_weekly_bin908.fits sctable="SC_DATA" expcube=/lscratch/kocevski/18159535/ltcube_788140801_788745601_4FGL_J1401.7-3217_weekly_bin908.fits outfile=/lscratch/kocevski/18159535/expmap_788140801_788745601_4FGL_J1401.7-3217_weekly_bin908.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/18159535/ltcube_788140801_788745601_4FGL_J1401.7-3217_weekly_bin908.fits
.....................!
real 75.57
user 70.55
sys 4.45

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
Extended source CenA Lobes in ROI, make sure /sdf/group/fermi/g/LCRepository/Likelihood/ExtendedSources/Extended_8years/Templates/CenALobes.fits is the correct path to the extended template.
Added 206 point sources and 1 extended sources
If using unbinned likelihood you will need to rerun gtdiffrsp for the extended sources or rerun the makeModel function with optional argument psForce=True

Setting source of interest to:
4FGL J1401.7-3217 @ 210.446 -32.2877

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/18159535/ft1_filtered_4FGL_J1401.7-3217_weekly_bin908.fits scfile=/lscratch/kocevski/18159535/ft2_4FGL_J1401.7-3217_weekly_bin908.fits outfile=/lscratch/kocevski/18159535/cmap_788140801_788745601_4FGL_J1401.7-3217_weekly_bin908.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=210.446 yref=-32.2877 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.54
user 0.24
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/18159535/ft1_filtered_4FGL_J1401.7-3217_weekly_bin908.fits scfile=/lscratch/kocevski/18159535/ft2_4FGL_J1401.7-3217_weekly_bin908.fits outfile=/lscratch/kocevski/18159535/cmap_HighResolution_788140801_788745601_4FGL_J1401.7-3217_weekly_bin908.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=210.446 yref=-32.2877 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.51
user 0.25
sys 0.13

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/18159535/ft1_filtered_4FGL_J1401.7-3217_weekly_bin908.fits evtable="EVENTS" scfile=/lscratch/kocevski/18159535/ft2_4FGL_J1401.7-3217_weekly_bin908.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/18159535/Model_4FGL_J1401.7-3217_weekly_bin908.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 CenA Lobes
adding source EG_v02
adding source GAL_V02
Working on...
/lscratch/kocevski/18159535/ft1_filtered_4FGL_J1401.7-3217_weekly_bin908.fits.....................!
real 137.68
user 135.00
sys 1.64

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/18159535/ft1_filtered_4FGL_J1401.7-3217_weekly_bin908.fits', '/lscratch/kocevski/18159535/ft2_4FGL_J1401.7-3217_weekly_bin908.fits', expMap='/lscratch/kocevski/18159535/expmap_788140801_788745601_4FGL_J1401.7-3217_weekly_bin908.fits', expCube='/lscratch/kocevski/18159535/ltcube_788140801_788745601_4FGL_J1401.7-3217_weekly_bin908.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/18159535/Model_4FGL_J1401.7-3217_weekly_bin908.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1401.7-3217'

4FGL J1401.7-3217
   Spectrum: PowerLaw
317    Prefactor:  5.798e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-14)
318        Index:  2.186e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
319        Scale:  1.969e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/18159535/ft1_filtered_4FGL_J1401.7-3217_weekly_bin908.fits
Spacecraft file(s): /lscratch/kocevski/18159535/ft2_4FGL_J1401.7-3217_weekly_bin908.fits
Exposure map: /lscratch/kocevski/18159535/expmap_788140801_788745601_4FGL_J1401.7-3217_weekly_bin908.fits
Exposure cube: /lscratch/kocevski/18159535/ltcube_788140801_788745601_4FGL_J1401.7-3217_weekly_bin908.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/18159535/Model_4FGL_J1401.7-3217_weekly_bin908.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) = 20875.6519297

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    15.682       1.0000          .0000       .10000E+07
     2 'Prefactor '    .12050       1.0000          .0000       .10000E+07
     3 'Prefactor '    29.884       1.0000          .0000       .10000E+07
     4 'Prefactor '    .10262E-02   1.0000          .0000       .10000E+07
     5 'Prefactor '    28.018       1.0000          .0000       .10000E+07
     6 'norm      '    .11239E-02   1.0000          .0000       .10000E+07
     7 'norm      '    18.256       1.0000          .0000       .10000E+07
     8 'norm      '    .24407E-02   1.0000          .0000       .10000E+07
     9 'Prefactor '    1.0070       1.0000          .0000       .10000E+07
    10 'Prefactor '    .10523E-02   1.0000          .0000       .10000E+07
    11 'Prefactor '    .49122E-01   1.0000          .0000       .10000E+07
    12 'Prefactor '    .11493E-01   1.0000          .0000       .10000E+07
    13 'Prefactor '    .22843E-03   1.0000          .0000       .10000E+07
    14 'Prefactor '    .10180       1.0000          .0000       .10000E+07
    15 'Prefactor '    .20729E-04   1.0000          .0000       .10000E+07
    16 'norm      '    .33029E-07   1.0000          .0000       .10000E+07
    17 'Prefactor '    .44723E-03   1.0000          .0000       .10000E+07
    18 'norm      '    .42930       1.0000          .0000       .10000E+07
    19 'Prefactor '    .99391E-02   1.0000          .0000       .10000E+07
    20 'Prefactor '    46.528       1.0000          .0000       .10000E+07
    21 'norm      '    19.250       1.0000          .0000       .10000E+07
    22 'Prefactor '    158.53       1.0000          .0000       .10000E+07
    23 'Normalizat'    1.4672       1.0000         .10000E-01   10.000    
    24 'Prefactor '    .90648       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6880E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   20875.64     FROM MIGRAD    STATUS=CONVERGED    138 CALLS     1967 TOTAL
                     EDM=   .19E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  5.0%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          15.689        4.8916        .19842E-06    .20502E-02
   2  Prefactor     .84313E-05    5.2038       -.64288E-06** at limit **
   3  Prefactor     29.859        1.5337        .10998E-07   -.27477E-01
   4  Prefactor     .41633E-08    2.5593       -.54290E-06** at limit **
   5  Prefactor     27.963        1.2777        .14070E-07   -.25567E-01
   6  norm          .31097E-06    5.0393       -.17159E-06** at limit **
   7  norm          18.306        1.6456       -.43948E-07    .36313E-01
   8  norm          .24725E-06    8.7583       -.75099E-06** at limit **
   9  Prefactor     .99709        2.5668       -.80941E-06   -.30301E-03
  10  Prefactor     .13323E-08    20.381        .38849E-06** at limit **
  11  Prefactor      .0000        30.916        .38368E-06** at limit **
  12  Prefactor     .11077E-05    6.9808       -.42812E-06** at limit **
  13  Prefactor     .33396E-06    92.131       -.44707E-06** at limit **
  14  Prefactor     .28089E-07    37.987       -.22938E-06** at limit **
  15  Prefactor      .0000        3.2882       -.76463E-07** at limit **
  16  norm           .0000        1.0397       -.36306E-06** at limit **
  17  Prefactor     .54151E-06    5.3565       -.11235E-05** at limit **
  18  norm          .42926        .10515       -.46648E-08   -.94265E-02
  19  Prefactor     .65614E-06    7.9840       -.92929E-06** at limit **
  20  Prefactor     46.499        2.3224        .30660E-07   -.55529E-01
  21  norm          19.237        8.6045        .11182E-06    .21455E-01
  22  Prefactor     158.36        3.9637       -.44165E-07    .42043    
  23  Normalizat    1.4673        .21608        .16397E-04    .86416E-05
  24  Prefactor     .90655        .78851E-01   -.76863E-05   -.83161E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 15.6885
  Prefactor  = 8.43126e-06
  Prefactor  = 29.8589
  Prefactor  = 4.16334e-09
  Prefactor  = 27.9633
  norm       = 3.10973e-07
  norm       = 18.3061
  norm       = 2.47247e-07
  Prefactor  = 0.997088
  Prefactor  = 1.33227e-09
  Prefactor  = 0
  Prefactor  = 1.10773e-06
  Prefactor  = 3.33955e-07
  Prefactor  = 2.80886e-08
  Prefactor  = 0
  norm       = 0
  Prefactor  = 5.41511e-07
  norm       = 0.429261
  Prefactor  = 6.56142e-07
  Prefactor  = 46.4993
  norm       = 19.237
  Prefactor  = 158.357
  Normalizat = 1.4673
  Prefactor  = 0.906549
 **********
 **   18 **HESSE 
 **********

 FCN=   20875.64     FROM HESSE     STATUS=OK           439 CALLS     2406 TOTAL
                     EDM=   .95E-05    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          15.689        4.8953        .25266E-03   -1.5629    
   2  Prefactor     .84313E-05    153.07        .13408E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     29.859        18.867        .18296E-03   -1.5599    
   4  Prefactor     .41633E-08    7.3317        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     27.963        37.913        .18895E-03   -1.5602    
   6  norm          .31097E-06    6.9659        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  norm          18.306        24.561        .23413E-03   -1.5622    
   8  norm          .24725E-06    9.2397        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .99709        2.5667        .44013E-03   -1.5688    
  10  Prefactor     .13323E-08    20.455        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor      .0000        30.691        .15576E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .11077E-05    12.033        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .33396E-06    92.243        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .28089E-07    37.714        .13881E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor      .0000        3.2989        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm           .0000        1.0359        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     .54151E-06    7.0941        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  norm          .42926        .10572        .50373E-03   -1.5695    
  19  Prefactor     .65614E-06    12.872        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     46.499        17.872        .14662E-03   -1.5572    
  21  norm          19.237        8.6068        .22800E-03   -1.5620    
  22  Prefactor     158.36        86.504        .79429E-04   -1.5456    
  23  Normalizat    1.4673        .17915        .89264E-01   -.78701    
  24  Prefactor     .90655        .64729E-01    .45088E-01   -.95913    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 9.50628e-06
Minuit parameter uncertainties:
  1  4.89527
  2  0.0718506
  3  18.8671
  4  0.000350066
  5  37.9134
  6  0.0029437
  7  24.5611
  8  0.00302281
  9  2.56669
  10  0.000328712
  11  2.26476e-05
  12  0.00730177
  13  0.0111007
  14  0.00205945
  15  1.54268e-05
  16  6.954e-07
  17  0.00392003
  18  0.10572
  19  0.00581221
  20  17.8722
  21  8.60678
  22  86.5045
  23  0.179225
  24  0.064734
Done.

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

Extracting fit parameters...

4FGL J1401.7-3217
   Spectrum: PowerLaw
317    Prefactor:  0.000e+00  2.265e-05  0.000e+00  1.000e+06 ( 1.000e-14)
318        Index:  2.186e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
319        Scale:  1.969e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
685    Prefactor:  9.065e-01  6.473e-02  0.000e+00  1.000e+01 ( 1.000e+00)
686        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
687        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
684   Normalization:  1.467e+00  1.792e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.00
Ra Dec: 210.446 -32.288
Photon Flux Upper Limit: 4.67697022052e-08 ph cm-2 s-1
Energy Flux Upper Limit: 0.0035596762496 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/18159535/likelihoodResults_788140801_788745601_4FGL_J1401.7-3217_weekly_bin908.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) = 20875.6541343
delta logL = -0.015619472797

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 20875.6311277
delta logL = 0.00738711876693

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   20875.63     FROM MIGRAD    STATUS=CONVERGED     62 CALLS      240 TOTAL
                     EDM=   .37E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .39862        1.6159        .58029E-02    .23799E-01
   2  Index         3.5099        .11162        .50000       -.99249E-05
   3  Normalizat    1.4601        .47233E-02    .89451E-01   -.90191E-05
   4  Prefactor     .90797        .17431E-02    .45107E-01    .27573E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.398616
  Index      = 3.50987
  Normalizat = 1.46013
  Prefactor  = 0.907974
 **********
 **   18 **HESSE 
 **********

 FCN=   20875.63     FROM HESSE     STATUS=NOT POSDEF    35 CALLS      275 TOTAL
                     EDM=   .49E-06    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .39862        1126.8        .33568E-03   -1.5695    
   2  Index         3.5099        6.6529        .30882E-02   -.30262    
   3  Normalizat    1.4601        .12556        .39611E-03   -.78905    
   4  Prefactor     .90797        .38868E-01    .17905E-03   -.95863    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 4.87532e-07
Minuit parameter uncertainties:
  1  42.3946
  2  34.6726
  3  0.125586
  4  0.0388691
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 20875.6311274
delta logL = 0.00738742121757

Extracting fit parameters...

4FGL J1401.7-3217
   Spectrum: PowerLaw
317    Prefactor:  3.986e-01  4.239e+01  0.000e+00  1.000e+06 ( 1.000e-14)
318        Index:  3.510e+00  3.467e+01  0.000e+00  1.000e+01 (-1.000e+00)
319        Scale:  1.969e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
685    Prefactor:  9.080e-01  3.887e-02  0.000e+00  1.000e+01 ( 1.000e+00)
686        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
687        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
684   Normalization:  1.460e+00  1.256e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.00
Ra Dec: 210.446 -32.288

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/18159535/cmap_HighResolution_788140801_788745601_4FGL_J1401.7-3217_weekly_bin908.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='3.56e-03', job_status='DONE', photon_flux_upper_limit='4.68e-08', time_completed='2025-12-30 02:01:15.572434', job_id='18159535', GAL2='0.91', fit_tolerance='1e-08', EG2='1.46', EG='1.47', time_epoch_completed='1767088875.57', return_code2='102', ts='0.00', comment='SUCCESS', return_code='0', GAL='0.91', dlogl='7.39e-03', ts2='0.02', photon_index_error='0.00', photon_index='2.19' WHERE bin_id='908' AND source_name='4FGL J1401.7-3217' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Dec 30 02:01:15 PST 2025

