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


Performing analysis on: 4FGL_J0402.0-2616_weekly_bin853
RA = 60.5103, Dec = -26.273
tmin = 754876801, tmax = 755481601
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='59976537', job_status='RUN', time_executed='2024-12-10 00:02:26.433977', time_epoch_executed='1733817746.43' WHERE source_name='4FGL J0402.0-2616' and cadence='weekly' and bin_id='853'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/59976537

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

Retrieving the FT1 file...

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

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

Retrieving 107 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/59976537/ft1_4FGL_J0402.0-2616_weekly_bin853.fits


Retrieving the FT1 file...

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

Retrieving 107 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/59976537/ft2_4FGL_J0402.0-2616_weekly_bin853.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/59976537/ft1_4FGL_J0402.0-2616_weekly_bin853.fits outfile=/lscratch/kocevski/59976537/ft1_filteredMKT_4FGL_J0402.0-2616_weekly_bin853.fits ra=60.5103 dec=-26.273 rad=12.0 tmin=754876801.0 tmax=755481601.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.51
user 3.05
sys 0.29

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/59976537/ft2_4FGL_J0402.0-2616_weekly_bin853.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/59976537/ft2_4FGL_J0402.0-2616_weekly_bin853.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/59976537/ft1_filteredMKT_4FGL_J0402.0-2616_weekly_bin853.fits evtable="EVENTS" outfile="/lscratch/kocevski/59976537/ft1_filtered_4FGL_J0402.0-2616_weekly_bin853.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.56
user 0.21
sys 0.16

Number of photons that the gtmktime cut: 1187

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/59976537/ft1_filtered_4FGL_J0402.0-2616_weekly_bin853.fits" evtable="EVENTS" scfile=/lscratch/kocevski/59976537/ft2_4FGL_J0402.0-2616_weekly_bin853.fits sctable="SC_DATA" outfile=/lscratch/kocevski/59976537/ltcube_754876801_755481601_4FGL_J0402.0-2616_weekly_bin853.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/59976537/ft2_4FGL_J0402.0-2616_weekly_bin853.fits
.....................!
real 23.15
user 22.21
sys 0.39

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/59976537/ft1_filtered_4FGL_J0402.0-2616_weekly_bin853.fits evtable="EVENTS" scfile=/lscratch/kocevski/59976537/ft2_4FGL_J0402.0-2616_weekly_bin853.fits sctable="SC_DATA" expcube=/lscratch/kocevski/59976537/ltcube_754876801_755481601_4FGL_J0402.0-2616_weekly_bin853.fits outfile=/lscratch/kocevski/59976537/expmap_754876801_755481601_4FGL_J0402.0-2616_weekly_bin853.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/59976537/ltcube_754876801_755481601_4FGL_J0402.0-2616_weekly_bin853.fits
.....................!
real 66.77
user 62.72
sys 3.47

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 Fornax A in ROI, make sure /sdf/group/fermi/g/LCRepository/Likelihood/ExtendedSources/Extended_8years/Templates/FornaxA.fits is the correct path to the extended template.
Added 156 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 J0402.0-2616 @ 60.5103 -26.273

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/59976537/ft1_filtered_4FGL_J0402.0-2616_weekly_bin853.fits scfile=/lscratch/kocevski/59976537/ft2_4FGL_J0402.0-2616_weekly_bin853.fits outfile=/lscratch/kocevski/59976537/cmap_754876801_755481601_4FGL_J0402.0-2616_weekly_bin853.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=60.5103 yref=-26.273 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.48
user 0.23
sys 0.12

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/59976537/ft1_filtered_4FGL_J0402.0-2616_weekly_bin853.fits scfile=/lscratch/kocevski/59976537/ft2_4FGL_J0402.0-2616_weekly_bin853.fits outfile=/lscratch/kocevski/59976537/cmap_HighResolution_754876801_755481601_4FGL_J0402.0-2616_weekly_bin853.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=60.5103 yref=-26.273 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.55
user 0.23
sys 0.15

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/59976537/ft1_filtered_4FGL_J0402.0-2616_weekly_bin853.fits evtable="EVENTS" scfile=/lscratch/kocevski/59976537/ft2_4FGL_J0402.0-2616_weekly_bin853.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/59976537/Model_4FGL_J0402.0-2616_weekly_bin853.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 Fornax A
adding source GAL_V02
Working on...
/lscratch/kocevski/59976537/ft1_filtered_4FGL_J0402.0-2616_weekly_bin853.fits.....................!
real 108.13
user 106.28
sys 0.90

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/59976537/ft1_filtered_4FGL_J0402.0-2616_weekly_bin853.fits', '/lscratch/kocevski/59976537/ft2_4FGL_J0402.0-2616_weekly_bin853.fits', expMap='/lscratch/kocevski/59976537/expmap_754876801_755481601_4FGL_J0402.0-2616_weekly_bin853.fits', expCube='/lscratch/kocevski/59976537/ltcube_754876801_755481601_4FGL_J0402.0-2616_weekly_bin853.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/59976537/Model_4FGL_J0402.0-2616_weekly_bin853.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J0402.0-2616'

4FGL J0402.0-2616
   Spectrum: LogParabola
255         norm:  2.550e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-13)
256        alpha:  1.995e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
257         beta:  1.705e-01  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
258           Eb:  1.630e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/59976537/ft1_filtered_4FGL_J0402.0-2616_weekly_bin853.fits
Spacecraft file(s): /lscratch/kocevski/59976537/ft2_4FGL_J0402.0-2616_weekly_bin853.fits
Exposure map: /lscratch/kocevski/59976537/expmap_754876801_755481601_4FGL_J0402.0-2616_weekly_bin853.fits
Exposure cube: /lscratch/kocevski/59976537/ltcube_754876801_755481601_4FGL_J0402.0-2616_weekly_bin853.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/59976537/Model_4FGL_J0402.0-2616_weekly_bin853.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) = 13421.5815444

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    78.184       1.0000          .0000       .10000E+07
     2 'Prefactor '    19.691       1.0000          .0000       .10000E+07
     3 'Prefactor '    4.9454       1.0000          .0000       .10000E+07
     4 'Prefactor '    .36145E-02   1.0000          .0000       .10000E+07
     5 'Prefactor '    1.2684       1.0000          .0000       .10000E+07
     6 'Prefactor '    .23521E-02   1.0000          .0000       .10000E+07
     7 'Prefactor '    3.1632       1.0000          .0000       .10000E+07
     8 'Prefactor '    3.3630       1.0000          .0000       .10000E+07
     9 'norm      '    .80745       1.0000          .0000       .10000E+07
    10 'Prefactor '    .84043E-02   1.0000          .0000       .10000E+07
    11 'norm      '    .33027       1.0000          .0000       .10000E+07
    12 'Prefactor '    .43692       1.0000          .0000       .10000E+07
    13 'Prefactor '    13.484       1.0000          .0000       .10000E+07
    14 'Prefactor '    .90437       1.0000          .0000       .10000E+07
    15 'norm      '    .22867E-02   1.0000          .0000       .10000E+07
    16 'Prefactor '    .68791       1.0000          .0000       .10000E+07
    17 'norm      '    .30234       1.0000          .0000       .10000E+07
    18 'Prefactor '    .82406E-03   1.0000          .0000       .10000E+07
    19 'Prefactor '    .35617E-02   1.0000          .0000       .10000E+07
    20 'norm      '    8.3681       1.0000          .0000       .10000E+07
    21 'Prefactor '    .43333E-02   1.0000          .0000       .10000E+07
    22 'norm      '    .89345E-06   1.0000          .0000       .10000E+07
    23 'Normalizat'    1.1325       1.0000         .10000E-01   10.000    
    24 'Prefactor '    .91518       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5030E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   13421.58     FROM MIGRAD    STATUS=CONVERGED    156 CALLS     2040 TOTAL
                     EDM=   .32E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  4.5%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     79.986        106.93        .15052E-05   -.15796E-02
   2  Prefactor     19.641        4.5699       -.51160E-06   -.25674E-01
   3  Prefactor     4.9532        5.7289       -.15079E-05   -.39700E-01
   4  Prefactor     .24480E-07    9.2359       -.47442E-06** at limit **
   5  Prefactor     1.2664        1.4252       -.25054E-06    .11924E-03
   6  Prefactor     .10575E-06    12.604        .13781E-05** at limit **
   7  Prefactor     3.1691        2.6797        .12367E-06   -.23574E-03
   8  Prefactor     3.2824        7.8873       -.15152E-06   -.64650E-03
   9  norm          .80763        .45748       -.11090E-06    .20316E-02
  10  Prefactor     .27311E-07    11.202        .12856E-05** at limit **
  11  norm          .32927        1.0918       -.30309E-06   -.97635E-03
  12  Prefactor     .46629E-07    8.8729       -.14214E-05** at limit **
  13  Prefactor     13.598        17.922        .16417E-05   -.27196E-01
  14  Prefactor     .90551        2.0634        .15288E-06   -.89608E-04
  15  norm          .16653E-09    3.6015        .86501E-06** at limit **
  16  Prefactor     .60764        60.651        .73496E-05   -.57682E-02
  17  norm          .30256        .16378        .33596E-08    .79054E-02
  18  Prefactor     .49960E-09    3.8272        .82290E-06** at limit **
  19  Prefactor     .16653E-08    9.6379        .79136E-06** at limit **
  20  norm          8.3922        2.5809       -.37223E-06    .10629E-01
  21  Prefactor     .18319E-08    8.4404       -.56438E-06** at limit **
  22  norm           .0000        .69676       -.33479E-06** at limit **
  23  Normalizat    1.1328        .13685        .56804E-05    .15716E-05
  24  Prefactor     .91497        .13306       -.17083E-04   -.55901E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 79.9862
  Prefactor  = 19.6406
  Prefactor  = 4.95321
  Prefactor  = 2.44804e-08
  Prefactor  = 1.26638
  Prefactor  = 1.05749e-07
  Prefactor  = 3.16906
  Prefactor  = 3.28245
  norm       = 0.807631
  Prefactor  = 2.73115e-08
  norm       = 0.32927
  Prefactor  = 4.66294e-08
  Prefactor  = 13.5983
  Prefactor  = 0.905512
  norm       = 1.66533e-10
  Prefactor  = 0.607645
  norm       = 0.302558
  Prefactor  = 4.996e-10
  Prefactor  = 1.66533e-09
  norm       = 8.39222
  Prefactor  = 1.83187e-09
  norm       = 0
  Normalizat = 1.13283
  Prefactor  = 0.914965
 **********
 **   18 **HESSE 
 **********

 FCN=   13421.58     FROM HESSE     STATUS=OK           457 CALLS     2497 TOTAL
                     EDM=   .11E-05    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     79.986        106.85        .11310E-03   -1.5529    
   2  Prefactor     19.641        16.920        .22543E-03   -1.5619    
   3  Prefactor     4.9532        15.873        .45202E-03   -1.5663    
   4  Prefactor     .24480E-07    14.905        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     1.2664        1.4901        .98802E-03   -1.5685    
   6  Prefactor     .10575E-06    1.7227        .49389E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     3.1691        2.8925        .56961E-03   -1.5672    
   8  Prefactor     3.2824        7.8804        .55158E-03   -1.5672    
   9  norm          .80763        .46473        .52382E-03   -1.5690    
  10  Prefactor     .27311E-07    15.930        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  norm          .32927        1.1574        .98055E-03   -1.5696    
  12  Prefactor     .46629E-07    68.342        .85328E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     13.598        20.677        .27251E-03   -1.5634    
  14  Prefactor     .90551        2.1422        .45458E-03   -1.5689    
  15  norm          .16653E-09    3.5975        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     .60764        65.180        .61695E-03   -1.5692    
  17  norm          .30256        .16915        .74227E-03   -1.5697    
  18  Prefactor     .49960E-09    3.7634        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .16653E-08    9.6819        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  norm          8.3922        69.943        .34631E-03   -1.5650    
  21  Prefactor     .18319E-08    8.4790        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  norm           .0000        .69065        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Normalizat    1.1328        .11901        .54031E-01   -.88705    
  24  Prefactor     .91497        .11526        .45198E-01   -.95620    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.10099e-06
Minuit parameter uncertainties:
  1  106.856
  2  16.92
  3  15.8727
  4  0.0012083
  5  1.49012
  6  0.000853564
  7  2.89247
  8  7.88046
  9  0.464731
  10  0.00131869
  11  1.15739
  12  0.0035694
  13  20.6773
  14  2.14218
  15  4.61415e-05
  16  12.5868
  17  0.169152
  18  8.81146e-05
  19  0.000254146
  20  48.4562
  21  0.00024982
  22  7.17478e-07
  23  0.11904
  24  0.115286
Done.

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

Extracting fit parameters...

4FGL J0402.0-2616
   Spectrum: LogParabola
255         norm:  1.665e-10  4.614e-05  0.000e+00  1.000e+06 ( 1.000e-13)
256        alpha:  1.995e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
257         beta:  1.705e-01  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
258           Eb:  1.630e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
500    Prefactor:  9.150e-01  1.153e-01  0.000e+00  1.000e+01 ( 1.000e+00)
501        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
502        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
496   Normalization:  1.133e+00  1.190e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 60.510 -26.273
Photon Flux Upper Limit: 1.88012669793e-08 ph cm-2 s-1
Energy Flux Upper Limit: 1.43503628519e-05 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/59976537/likelihoodResults_754876801_755481601_4FGL_J0402.0-2616_weekly_bin853.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) = 13421.5767374
delta logL = -0.000772819170379

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 13421.5759647
delta logL = -6.38920027995e-08

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .22204E-09   1.0000          .0000       .10000E+07
     2 'alpha     '    .56338       1.0000          .0000       5.0000    
     3 'Normalizat'    1.1328       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .91501       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5030E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

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

 FCN=   13421.58     FROM MIGRAD    STATUS=CONVERGED     40 CALLS      230 TOTAL
                     EDM=   .11E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=100.0%

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm           .0000        2.6730        .42118E-03** at limit **
   2  alpha         2.5051        1.3959        .13411E-04     .0000    
   3  Normalizat    1.1328        1.1351        .49743E-05   -.14966E-03
   4  Prefactor     .91497        1.2592       -.65520E-05   -.18223E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 0
  alpha      = 2.50515
  Normalizat = 1.13283
  Prefactor  = 0.914965
 **********
 **   18 **HESSE 
 **********
  MNHESS FAILS AND WILL RETURN DIAGONAL MATRIX. 

 FCN=   13421.58     FROM HESSE     STATUS=FAILED         7 CALLS      237 TOTAL
                     EDM=   .11E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=100.0%

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm           .0000        2.6730        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  alpha         1.2841        1.3959        .13411E-04    .20585E-02
   3  Normalizat    1.1328        1.1351        .49743E-05   -.88705    
   4  Prefactor     .91497        1.2592       -.65520E-05   -.95620    
                               ERR DEF=  .500    
Minuit fit quality: 1   estimated distance: 1.08912e-11
Minuit parameter uncertainties:
  1  3.39334e-06
  2  1.48103
  3  1.16114
  4  1.30307
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) = 13421.5759646
delta logL = 1.63709046319e-11

Extracting fit parameters...

4FGL J0402.0-2616
   Spectrum: LogParabola
255         norm:  0.000e+00  3.393e-06  0.000e+00  1.000e+06 ( 1.000e-13)
256        alpha:  2.505e+00  1.481e+00  0.000e+00  5.000e+00 ( 1.000e+00)
257         beta:  1.705e-01  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
258           Eb:  1.630e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
500    Prefactor:  9.150e-01  1.303e+00  0.000e+00  1.000e+01 ( 1.000e+00)
501        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
502        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
496   Normalization:  1.133e+00  1.161e+00  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 60.510 -26.273

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/59976537/cmap_HighResolution_754876801_755481601_4FGL_J0402.0-2616_weekly_bin853.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.44e-05', job_status='DONE', photon_flux_upper_limit='1.88e-08', time_completed='2024-12-10 00:10:48.697164', job_id='59976537', GAL2='0.91', fit_tolerance='1e-08', EG2='1.13', EG='1.13', time_epoch_completed='1733818248.7', return_code2='101', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.91', dlogl='1.64e-11', ts2='0.00', photon_index_error='0.00', photon_index='2.00' WHERE bin_id='853' AND source_name='4FGL J0402.0-2616' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Dec 10 00:10:48 PST 2024

