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


Performing analysis on: 4FGL_J1406.6-3934_daily_bin1829
RA = 211.665, Dec = -39.5727
tmin = 713404801, tmax = 713664001
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='28602537', job_status='RUN', time_executed='2023-09-19 17:56:07.472381', time_epoch_executed='1695171367.47' WHERE source_name='4FGL J1406.6-3934' and cadence='daily' and bin_id='1829'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/28602537

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/28602537/ft1_4FGL_J1406.6-3934_daily_bin1829.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/28602537/ft2_4FGL_J1406.6-3934_daily_bin1829.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/28602537/ft1_4FGL_J1406.6-3934_daily_bin1829.fits outfile=/lscratch/kocevski/28602537/ft1_filteredMKT_4FGL_J1406.6-3934_daily_bin1829.fits ra=211.665 dec=-39.5727 rad=12.0 tmin=713404801.0 tmax=713664001.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 2.61
user 1.64
sys 0.17

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/28602537/ft2_4FGL_J1406.6-3934_daily_bin1829.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/28602537/ft2_4FGL_J1406.6-3934_daily_bin1829.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/28602537/ft1_filteredMKT_4FGL_J1406.6-3934_daily_bin1829.fits evtable="EVENTS" outfile="/lscratch/kocevski/28602537/ft1_filtered_4FGL_J1406.6-3934_daily_bin1829.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.62
user 0.20
sys 0.11

Number of photons that the gtmktime cut: 2547

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/28602537/ft1_filtered_4FGL_J1406.6-3934_daily_bin1829.fits" evtable="EVENTS" scfile=/lscratch/kocevski/28602537/ft2_4FGL_J1406.6-3934_daily_bin1829.fits sctable="SC_DATA" outfile=/lscratch/kocevski/28602537/ltcube_713404801_713664001_4FGL_J1406.6-3934_daily_bin1829.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/28602537/ft2_4FGL_J1406.6-3934_daily_bin1829.fits
.....................!
real 10.67
user 9.84
sys 0.22

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/28602537/ft1_filtered_4FGL_J1406.6-3934_daily_bin1829.fits evtable="EVENTS" scfile=/lscratch/kocevski/28602537/ft2_4FGL_J1406.6-3934_daily_bin1829.fits sctable="SC_DATA" expcube=/lscratch/kocevski/28602537/ltcube_713404801_713664001_4FGL_J1406.6-3934_daily_bin1829.fits outfile=/lscratch/kocevski/28602537/expmap_713404801_713664001_4FGL_J1406.6-3934_daily_bin1829.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/28602537/ltcube_713404801_713664001_4FGL_J1406.6-3934_daily_bin1829.fits
.....................!
real 69.22
user 64.04
sys 3.78

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.
Extended source FGES J1409.1-6121 in ROI with RadialDisk spatial model.
Extended source HESS J1420-607 in ROI with RadialDisk spatial model.
Added 261 point sources and 3 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 J1406.6-3934 @ 211.665 -39.5727

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/28602537/ft1_filtered_4FGL_J1406.6-3934_daily_bin1829.fits scfile=/lscratch/kocevski/28602537/ft2_4FGL_J1406.6-3934_daily_bin1829.fits outfile=/lscratch/kocevski/28602537/cmap_713404801_713664001_4FGL_J1406.6-3934_daily_bin1829.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=211.665 yref=-39.5727 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 1.01
user 0.20
sys 0.11

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/28602537/ft1_filtered_4FGL_J1406.6-3934_daily_bin1829.fits scfile=/lscratch/kocevski/28602537/ft2_4FGL_J1406.6-3934_daily_bin1829.fits outfile=/lscratch/kocevski/28602537/cmap_HighResolution_713404801_713664001_4FGL_J1406.6-3934_daily_bin1829.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=211.665 yref=-39.5727 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 1.28
user 0.20
sys 0.11

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/28602537/ft1_filtered_4FGL_J1406.6-3934_daily_bin1829.fits evtable="EVENTS" scfile=/lscratch/kocevski/28602537/ft2_4FGL_J1406.6-3934_daily_bin1829.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/28602537/Model_4FGL_J1406.6-3934_daily_bin1829.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 FGES J1409.1-6121
adding source GAL_V02
adding source HESS J1420-607
Working on...
/lscratch/kocevski/28602537/ft1_filtered_4FGL_J1406.6-3934_daily_bin1829.fits.....................!
real 177.81
user 174.03
sys 1.12

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/28602537/ft1_filtered_4FGL_J1406.6-3934_daily_bin1829.fits', '/lscratch/kocevski/28602537/ft2_4FGL_J1406.6-3934_daily_bin1829.fits', expMap='/lscratch/kocevski/28602537/expmap_713404801_713664001_4FGL_J1406.6-3934_daily_bin1829.fits', expCube='/lscratch/kocevski/28602537/ltcube_713404801_713664001_4FGL_J1406.6-3934_daily_bin1829.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/28602537/Model_4FGL_J1406.6-3934_daily_bin1829.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1406.6-3934'

4FGL J1406.6-3934
   Spectrum: PowerLaw
363    Prefactor:  8.843e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-16)
364        Index:  1.553e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
365        Scale:  1.471e+04  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/28602537/ft1_filtered_4FGL_J1406.6-3934_daily_bin1829.fits
Spacecraft file(s): /lscratch/kocevski/28602537/ft2_4FGL_J1406.6-3934_daily_bin1829.fits
Exposure map: /lscratch/kocevski/28602537/expmap_713404801_713664001_4FGL_J1406.6-3934_daily_bin1829.fits
Exposure cube: /lscratch/kocevski/28602537/ltcube_713404801_713664001_4FGL_J1406.6-3934_daily_bin1829.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/28602537/Model_4FGL_J1406.6-3934_daily_bin1829.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) = 24790.9624974

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    2.2392       1.0000          .0000       .10000E+07
     2 'norm      '    6.3745       1.0000          .0000       .10000E+07
     3 'Prefactor '    .18167       1.0000          .0000       .10000E+07
     4 'Prefactor '    .41060E-01   1.0000          .0000       .10000E+07
     5 'norm      '    24.449       1.0000          .0000       .10000E+07
     6 'norm      '    8.7640       1.0000          .0000       .10000E+07
     7 'Prefactor '    7.4303       1.0000          .0000       .10000E+07
     8 'Prefactor '    55.864       1.0000          .0000       .10000E+07
     9 'Prefactor '    .24928E-03   1.0000          .0000       .10000E+07
    10 'Prefactor '    .89962E-02   1.0000          .0000       .10000E+07
    11 'norm      '    .33111E-05   1.0000          .0000       .10000E+07
    12 'Prefactor '    .27122E-02   1.0000          .0000       .10000E+07
    13 'norm      '    2.2813       1.0000          .0000       .10000E+07
    14 'Prefactor '    .53538E-02   1.0000          .0000       .10000E+07
    15 'Prefactor '    .21400E-02   1.0000          .0000       .10000E+07
    16 'Prefactor '    24.585       1.0000          .0000       .10000E+07
    17 'norm      '    4.6346       1.0000          .0000       .10000E+07
    18 'Prefactor '    .68997E-03   1.0000          .0000       .10000E+07
    19 'Prefactor '    10.280       1.0000          .0000       .10000E+07
    20 'norm      '    .96726       1.0000          .0000       .10000E+07
    21 'Normalizat'    1.7197       1.0000         .10000E-01   10.000    
    22 'Prefactor '    .91375       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .9130E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   24790.93     FROM MIGRAD    STATUS=CONVERGED    166 CALLS     1772 TOTAL
                     EDM=   .96E-11  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.3%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     2.2401        3.3357       -.11845E-06    .32578E-03
   2  norm          6.3740        3.9228        .31323E-07   -.24140E-03
   3  Prefactor      .0000        68.770        .49183E-06** at limit **
   4  Prefactor      .0000        43.487       -.21521E-06** at limit **
   5  norm          24.439        1.6573        .66759E-09   -.83680E-02
   6  norm          8.7881        7.0065       -.97106E-07    .23552E-03
   7  Prefactor     7.4691        1.7274        .34641E-07    .68129E-02
   8  Prefactor     56.748        44.580       -.33493E-06    .85467E-03
   9  Prefactor     .16653E-09    124.07       -.13312E-06** at limit **
  10  Prefactor     .55511E-10    17.327        .14086E-06** at limit **
  11  norm           .0000        7.5384        .46536E-06** at limit **
  12  Prefactor     .27756E-09    8.4929       -.34804E-06** at limit **
  13  norm          2.2814        .17959        .19581E-08   -.31908E-02
  14  Prefactor      .0000        14.749       -.18178E-06** at limit **
  15  Prefactor     .55511E-10    23.992        .76457E-06** at limit **
  16  Prefactor     24.453        10.997       -.28755E-07    .20821E-02
  17  norm          4.6338        4.6994        .49036E-07   -.15238E-03
  18  Prefactor     .38858E-09    10.171       -.34749E-06** at limit **
  19  Prefactor     10.201        10.444        .29307E-07   -.22484E-04
  20  norm          .96740        .54690        .24558E-07   -.12592E-02
  21  Normalizat    1.7193        .22375        .47093E-05   -.25862E-04
  22  Prefactor     .91385        .63506E-01   -.12293E-05   -.27053E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 2.24013
  norm       = 6.37405
  Prefactor  = 0
  Prefactor  = 0
  norm       = 24.4393
  norm       = 8.78815
  Prefactor  = 7.46908
  Prefactor  = 56.7484
  Prefactor  = 1.66533e-10
  Prefactor  = 5.55112e-11
  norm       = 0
  Prefactor  = 2.77556e-10
  norm       = 2.28139
  Prefactor  = 0
  Prefactor  = 5.55112e-11
  Prefactor  = 24.4526
  norm       = 4.63379
  Prefactor  = 3.88578e-10
  Prefactor  = 10.201
  norm       = 0.967405
  Normalizat = 1.71928
  Prefactor  = 0.913846
 **********
 **   18 **HESSE 
 **********

 FCN=   24790.93     FROM HESSE     STATUS=OK           390 CALLS     2162 TOTAL
                     EDM=   .12E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     2.2401        3.3513        .68658E-03   -1.5678    
   2  norm          6.3740        3.9219        .39731E-03   -1.5657    
   3  Prefactor      .0000        68.736        .12112E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor      .0000        42.689        .15916E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          24.439        21.680        .20229E-03   -1.5609    
   6  norm          8.7881        7.0201        .33835E-03   -1.5649    
   7  Prefactor     7.4691        27.981        .36770E-03   -1.5653    
   8  Prefactor     56.748        44.529        .13380E-03   -1.5557    
   9  Prefactor     .16653E-09    124.16        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .55511E-10    17.363        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  norm           .0000        7.2098        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .27756E-09    11.693        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          2.2814        .17952        .40478E-03   -1.5678    
  14  Prefactor      .0000        14.859        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .55511E-10    23.992        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     24.453        16.356        .20173E-03   -1.5609    
  17  norm          4.6338        4.6935        .46727E-03   -1.5665    
  18  Prefactor     .38858E-09    12.186        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     10.201        10.447        .31226E-03   -1.5644    
  20  norm          .96740        .54928        .42603E-03   -1.5688    
  21  Normalizat    1.7193        .19483        .10573       -.71790    
  22  Prefactor     .91385        .54554E-01    .45180E-01   -.95659    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.21399e-08
Minuit parameter uncertainties:
  1  3.3513
  2  3.92185
  3  5.67286e-05
  4  1.94955e-05
  5  21.6797
  6  7.02014
  7  27.9818
  8  44.5292
  9  0.000277089
  10  6.07694e-05
  11  1.87971e-05
  12  0.000114077
  13  0.17952
  14  7.16363e-06
  15  5.8054e-05
  16  16.3556
  17  4.69349
  18  0.000136499
  19  10.4465
  20  0.549284
  21  0.194921
  22  0.0545574
Done.

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

Extracting fit parameters...

4FGL J1406.6-3934
   Spectrum: PowerLaw
363    Prefactor:  1.665e-10  2.771e-04  0.000e+00  1.000e+06 ( 1.000e-16)
364        Index:  1.553e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
365        Scale:  1.471e+04  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
907    Prefactor:  9.138e-01  5.456e-02  0.000e+00  1.000e+01 ( 1.000e+00)
908        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
909        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
902   Normalization:  1.719e+00  1.949e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.00
Ra Dec: 211.665 -39.573
Photon Flux Upper Limit: 1.92443485794e-08 ph cm-2 s-1
Energy Flux Upper Limit: 0.00138274492224 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/28602537/likelihoodResults_713404801_713664001_4FGL_J1406.6-3934_daily_bin1829.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) = 24790.9371932
delta logL = -0.00384698160269

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 24790.9333465
delta logL = -2.48648575507e-07

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

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

 FCN=   24790.93     FROM MIGRAD    STATUS=CONVERGED     60 CALLS      266 TOTAL
                     EDM=   .31E-11  STRATEGY=1  ERROR MATRIX UNCERTAINTY=100.0%

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor      .0000        148.85        .42118E-03** at limit **
   2  Index         1.2036        .97345       -.22482E-03     .0000    
   3  Normalizat    1.7193        1.0326        .29849E-05    .27825E-04
   4  Prefactor     .91385        1.2581       -.91587E-06    .96244E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0
  Index      = 1.20363
  Normalizat = 1.71928
  Prefactor  = 0.913846
 **********
 **   18 **HESSE 
 **********
  MNHESS FAILS AND WILL RETURN DIAGONAL MATRIX. 

 FCN=   24790.93     FROM HESSE     STATUS=FAILED         9 CALLS      275 TOTAL
                     EDM=   .31E-11  STRATEGY=1  ERROR MATRIX UNCERTAINTY=100.0%

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor      .0000        148.85        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         3.2752        1.8977       -.22482E-03   -2.2794    
   3  Normalizat    1.7193        1.0326        .29849E-05   -.71790    
   4  Prefactor     .91385        1.2581       -.91587E-06   -.95659    
                               ERR DEF=  .500    
Minuit fit quality: 1   estimated distance: 3.05176e-12
Minuit parameter uncertainties:
  1  9.21255e-05
  2  0.988591
  3  1.04602
  4  1.30192
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) = 24790.9333462
delta logL = 0.0

Extracting fit parameters...

4FGL J1406.6-3934
   Spectrum: PowerLaw
363    Prefactor:  0.000e+00  9.213e-05  0.000e+00  1.000e+06 ( 1.000e-16)
364        Index:  1.204e+00  9.886e-01  0.000e+00  1.000e+01 (-1.000e+00)
365        Scale:  1.471e+04  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
907    Prefactor:  9.138e-01  1.302e+00  0.000e+00  1.000e+01 ( 1.000e+00)
908        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
909        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
902   Normalization:  1.719e+00  1.046e+00  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.00
Ra Dec: 211.665 -39.573

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/28602537/cmap_HighResolution_713404801_713664001_4FGL_J1406.6-3934_daily_bin1829.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.38e-03', job_status='DONE', photon_flux_upper_limit='1.92e-08', time_completed='2023-09-19 18:13:28.429492', job_id='28602537', GAL2='0.91', fit_tolerance='1e-08', EG2='1.72', EG='1.72', time_epoch_completed='1695172408.43', return_code2='101', ts='0.00', comment='SUCCESS', return_code='0', GAL='0.91', dlogl='0.00e+00', ts2='0.00', photon_index_error='0.00', photon_index='1.55' WHERE bin_id='1829' AND source_name='4FGL J1406.6-3934' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Tue Sep 19 18:13:28 PDT 2023

