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


Performing analysis on: 4FGL_J0537.5+0959_weekly_bin815
RA = 84.3775, Dec = 9.986
tmin = 731894401, tmax = 732499201
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='44595360', job_status='RUN', time_executed='2024-04-20 22:35:50.945648', time_epoch_executed='1713677750.95' WHERE source_name='4FGL J0537.5+0959' and cadence='weekly' and bin_id='815'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/44595360

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

Retrieving the FT1 file...

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

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

Retrieving 107 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/44595360/ft1_4FGL_J0537.5+0959_weekly_bin815.fits


Retrieving the FT1 file...

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

Retrieving 107 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/44595360/ft2_4FGL_J0537.5+0959_weekly_bin815.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/44595360/ft1_4FGL_J0537.5+0959_weekly_bin815.fits outfile=/lscratch/kocevski/44595360/ft1_filteredMKT_4FGL_J0537.5+0959_weekly_bin815.fits ra=84.3775 dec=9.986 rad=12.0 tmin=731894401.0 tmax=732499201.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 5.00
user 4.71
sys 0.22

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/44595360/ft2_4FGL_J0537.5+0959_weekly_bin815.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/44595360/ft2_4FGL_J0537.5+0959_weekly_bin815.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/44595360/ft1_filteredMKT_4FGL_J0537.5+0959_weekly_bin815.fits evtable="EVENTS" outfile="/lscratch/kocevski/44595360/ft1_filtered_4FGL_J0537.5+0959_weekly_bin815.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.34
user 0.19
sys 0.13

Number of photons that the gtmktime cut: 4480

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/44595360/ft1_filtered_4FGL_J0537.5+0959_weekly_bin815.fits" evtable="EVENTS" scfile=/lscratch/kocevski/44595360/ft2_4FGL_J0537.5+0959_weekly_bin815.fits sctable="SC_DATA" outfile=/lscratch/kocevski/44595360/ltcube_731894401_732499201_4FGL_J0537.5+0959_weekly_bin815.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/44595360/ft2_4FGL_J0537.5+0959_weekly_bin815.fits
.....................!
real 15.24
user 14.95
sys 0.20

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/44595360/ft1_filtered_4FGL_J0537.5+0959_weekly_bin815.fits evtable="EVENTS" scfile=/lscratch/kocevski/44595360/ft2_4FGL_J0537.5+0959_weekly_bin815.fits sctable="SC_DATA" expcube=/lscratch/kocevski/44595360/ltcube_731894401_732499201_4FGL_J0537.5+0959_weekly_bin815.fits outfile=/lscratch/kocevski/44595360/expmap_731894401_732499201_4FGL_J0537.5+0959_weekly_bin815.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/44595360/ltcube_731894401_732499201_4FGL_J0537.5+0959_weekly_bin815.fits
.....................!
real 60.00
user 55.54
sys 3.17

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 IC 443 in ROI with RadialGaussian spatial model.
Extended source Rosette in ROI, make sure /sdf/group/fermi/g/LCRepository/Likelihood/ExtendedSources/Extended_8years/Templates/Rosette.fits is the correct path to the extended template.
Extended source Monoceros in ROI with RadialGaussian spatial model.
Extended source S 147 in ROI, make sure /sdf/group/fermi/g/LCRepository/Likelihood/ExtendedSources/Extended_8years/Templates/S147.fits is the correct path to the extended template.
Added 164 point sources and 4 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 J0537.5+0959 @ 84.3775 9.986

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/44595360/ft1_filtered_4FGL_J0537.5+0959_weekly_bin815.fits scfile=/lscratch/kocevski/44595360/ft2_4FGL_J0537.5+0959_weekly_bin815.fits outfile=/lscratch/kocevski/44595360/cmap_731894401_732499201_4FGL_J0537.5+0959_weekly_bin815.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=84.3775 yref=9.986 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.36
user 0.21
sys 0.12

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/44595360/ft1_filtered_4FGL_J0537.5+0959_weekly_bin815.fits scfile=/lscratch/kocevski/44595360/ft2_4FGL_J0537.5+0959_weekly_bin815.fits outfile=/lscratch/kocevski/44595360/cmap_HighResolution_731894401_732499201_4FGL_J0537.5+0959_weekly_bin815.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=84.3775 yref=9.986 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.36
user 0.20
sys 0.13

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/44595360/ft1_filtered_4FGL_J0537.5+0959_weekly_bin815.fits evtable="EVENTS" scfile=/lscratch/kocevski/44595360/ft2_4FGL_J0537.5+0959_weekly_bin815.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/44595360/Model_4FGL_J0537.5+0959_weekly_bin815.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
adding source IC 443
adding source Monoceros
adding source Rosette
adding source S 147
Working on...
/lscratch/kocevski/44595360/ft1_filtered_4FGL_J0537.5+0959_weekly_bin815.fits....................!
real 346.37
user 344.04
sys 0.62

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/44595360/ft1_filtered_4FGL_J0537.5+0959_weekly_bin815.fits', '/lscratch/kocevski/44595360/ft2_4FGL_J0537.5+0959_weekly_bin815.fits', expMap='/lscratch/kocevski/44595360/expmap_731894401_732499201_4FGL_J0537.5+0959_weekly_bin815.fits', expCube='/lscratch/kocevski/44595360/ltcube_731894401_732499201_4FGL_J0537.5+0959_weekly_bin815.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/44595360/Model_4FGL_J0537.5+0959_weekly_bin815.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J0537.5+0959'

4FGL J0537.5+0959
   Spectrum: PowerLaw
261    Prefactor:  4.070e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-13)
262        Index:  2.641e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
263        Scale:  1.004e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/44595360/ft1_filtered_4FGL_J0537.5+0959_weekly_bin815.fits
Spacecraft file(s): /lscratch/kocevski/44595360/ft2_4FGL_J0537.5+0959_weekly_bin815.fits
Exposure map: /lscratch/kocevski/44595360/expmap_731894401_732499201_4FGL_J0537.5+0959_weekly_bin815.fits
Exposure cube: /lscratch/kocevski/44595360/ltcube_731894401_732499201_4FGL_J0537.5+0959_weekly_bin815.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/44595360/Model_4FGL_J0537.5+0959_weekly_bin815.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) = 43491.6650705

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    10.499       1.0000          .0000       .10000E+07
     2 'Prefactor '    22.331       1.0000          .0000       .10000E+07
     3 'Prefactor '    .11491E-01   1.0000          .0000       .10000E+07
     4 'Prefactor '    .26144E-03   1.0000          .0000       .10000E+07
     5 'norm      '    .45568       1.0000          .0000       .10000E+07
     6 'norm      '    7.7836       1.0000          .0000       .10000E+07
     7 'Prefactor '    .21599E-06   1.0000          .0000       .10000E+07
     8 'norm      '    .14572E-06   1.0000          .0000       .10000E+07
     9 'Prefactor '    .10220E-04   1.0000          .0000       .10000E+07
    10 'Prefactor '    45.907       1.0000          .0000       .10000E+07
    11 'norm      '    4.1442       1.0000          .0000       .10000E+07
    12 'Prefactor '    3.4501       1.0000          .0000       .10000E+07
    13 'norm      '    4.2226       1.0000          .0000       .10000E+07
    14 'norm      '    1.8885       1.0000          .0000       .10000E+07
    15 'Prefactor '    .22871E-02   1.0000          .0000       .10000E+07
    16 'Prefactor '    .21415E-03   1.0000          .0000       .10000E+07
    17 'Prefactor '    .18002E-03   1.0000          .0000       .10000E+07
    18 'norm      '    .14907E-02   1.0000          .0000       .10000E+07
    19 'norm      '    .36402E-03   1.0000          .0000       .10000E+07
    20 'Normalizat'    .67635       1.0000         .10000E-01   10.000    
    21 'Prefactor '    1.0556       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5800E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   43491.64     FROM MIGRAD    STATUS=CONVERGED    160 CALLS     1688 TOTAL
                     EDM=   .56E-12  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.9%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          10.497        2.6037        .79452E-08    .20414E-03
   2  Prefactor     22.568        21.676        .46995E-07    .36658E-04
   3  Prefactor      .0000        18.443       -.97039E-07** at limit **
   4  Prefactor      .0000        3.7374       -.10401E-06** at limit **
   5  norm          .45540        .39630       -.11622E-07    .93400E-03
   6  norm          7.7842        2.9012       -.10122E-07    .66031E-04
   7  Prefactor      .0000        1.5495        .41999E-07** at limit **
   8  norm           .0000        .90495       -.30856E-08** at limit **
   9  Prefactor      .0000        1.8482       -.26076E-08** at limit **
  10  Prefactor     46.763        39.332        .74901E-07   -.46500E-05
  11  norm          4.1436        1.7118        .14860E-07   -.32239E-03
  12  Prefactor     3.3959        5.5006        .24381E-07    .26030E-04
  13  norm          4.2206        3.5424       -.57170E-08    .77537E-04
  14  norm          1.8891        .74896        .97662E-09    .26430E-03
  15  Prefactor      .0000        12.187        .10090E-06** at limit **
  16  Prefactor      .0000        4.0160       -.70877E-07** at limit **
  17  Prefactor      .0000        4.3154       -.12181E-06** at limit **
  18  norm           .0000        5.6930        .11494E-06** at limit **
  19  norm           .0000        2.6879       -.89711E-07** at limit **
  20  Normalizat    .67583        .20875       -.59384E-05    .58876E-05
  21  Prefactor     1.0556        .32042E-01    .78650E-06   -.19465E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 10.497
  Prefactor  = 22.568
  Prefactor  = 0
  Prefactor  = 0
  norm       = 0.455405
  norm       = 7.78423
  Prefactor  = 0
  norm       = 0
  Prefactor  = 0
  Prefactor  = 46.7631
  norm       = 4.14356
  Prefactor  = 3.39588
  norm       = 4.22061
  norm       = 1.88911
  Prefactor  = 0
  Prefactor  = 0
  Prefactor  = 0
  norm       = 0
  norm       = 0
  Normalizat = 0.675827
  Prefactor  = 1.05562
 **********
 **   18 **HESSE 
 **********

 FCN=   43491.64     FROM HESSE     STATUS=OK           361 CALLS     2049 TOTAL
                     EDM=   .30E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          10.497        2.6254        .30897E-03   -1.5643    
   2  Prefactor     22.568        21.930        .21167E-03   -1.5613    
   3  Prefactor      .0000        18.459        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor      .0000        3.7231        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          .45540        .41917        .83300E-03   -1.5694    
   6  norm          7.7842        2.9407        .35918E-03   -1.5652    
   7  Prefactor      .0000        1.5186        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm           .0000        .90295        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor      .0000        1.8265        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     46.763        39.476        .14760E-03   -1.5571    
  11  norm          4.1436        1.7164        .49489E-03   -1.5667    
  12  Prefactor     3.3959        5.5257        .54425E-03   -1.5671    
  13  norm          4.2206        3.5555        .49014E-03   -1.5667    
  14  norm          1.8891        .75718        .75697E-03   -1.5680    
  15  Prefactor      .0000        12.160        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor      .0000        4.0143        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor      .0000        4.1824        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  norm           .0000        5.6899        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  norm           .0000        2.6693        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Normalizat    .67583        .23600        .22439       -1.0486    
  21  Prefactor     1.0556        .34985E-01    .30181E-01   -.90898    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.03326e-09
Minuit parameter uncertainties:
  1  2.6254
  2  21.9304
  3  7.19067e-06
  4  1.91855e-06
  5  0.419175
  6  2.94071
  7  8.32969e-07
  8  1.32711e-07
  9  2.56467e-09
  10  39.4767
  11  1.71639
  12  5.52573
  13  3.55551
  14  0.75718
  15  3.08308e-08
  16  1.55651e-06
  17  1.79801e-06
  18  1.48664e-06
  19  1.61589e-06
  20  0.236354
  21  0.0349857
Done.

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

Extracting fit parameters...

4FGL J0537.5+0959
   Spectrum: PowerLaw
261    Prefactor:  0.000e+00  1.557e-06  0.000e+00  1.000e+06 ( 1.000e-13)
262        Index:  2.641e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
263        Scale:  1.004e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
561    Prefactor:  1.056e+00  3.499e-02  0.000e+00  1.000e+01 ( 1.000e+00)
562        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
563        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
560   Normalization:  6.758e-01  2.364e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.00
Ra Dec: 84.377 9.986
Photon Flux Upper Limit: 5.04697892891e-08 ph cm-2 s-1
Energy Flux Upper Limit: 0.00395959135696 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/44595360/likelihoodResults_731894401_732499201_4FGL_J0537.5+0959_weekly_bin815.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) = 43491.6445784
delta logL = -0.00672297419078

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 43491.6378617
delta logL = -6.27843837719e-06

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

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

 FCN=   43491.64     FROM MIGRAD    STATUS=CONVERGED     52 CALLS      225 TOTAL
                     EDM=   .32E-12  STRATEGY=1  ERROR MATRIX UNCERTAINTY=100.0%

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor      .0000        .50448        .42118E-03** at limit **
   2  Index         .53141        .49816        .53659E-05     .0000    
   3  Normalizat    .67583        1.0153        .15474E-05    .33703E-05
   4  Prefactor     1.0556        1.1850        .12069E-06    .71772E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0
  Index      = 0.531413
  Normalizat = 0.675826
  Prefactor  = 1.05562
 **********
 **   18 **HESSE 
 **********
  MNHESS FAILS AND WILL RETURN DIAGONAL MATRIX. 

 FCN=   43491.64     FROM HESSE     STATUS=FAILED         9 CALLS      234 TOTAL
                     EDM=   .32E-12  STRATEGY=1  ERROR MATRIX UNCERTAINTY=100.0%

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor      .0000        .50448        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         .50096E-02    .63799        .53659E-05   -1.1056    
   3  Normalizat    .67583        1.0153        .15474E-05   -1.0486    
   4  Prefactor     1.0556        1.1850        .12069E-06   -.90898    
                               ERR DEF=  .500    
Minuit fit quality: 1   estimated distance: 3.16628e-13
Minuit parameter uncertainties:
  1  1.90743e-07
  2  0.502351
  3  1.0457
  4  1.21656
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) = 43491.6378554
delta logL = 0.0

Extracting fit parameters...

4FGL J0537.5+0959
   Spectrum: PowerLaw
261    Prefactor:  0.000e+00  1.907e-07  0.000e+00  1.000e+06 ( 1.000e-13)
262        Index:  5.314e-01  5.024e-01  0.000e+00  1.000e+01 (-1.000e+00)
263        Scale:  1.004e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
561    Prefactor:  1.056e+00  1.217e+00  0.000e+00  1.000e+01 ( 1.000e+00)
562        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
563        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
560   Normalization:  6.758e-01  1.046e+00  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.00
Ra Dec: 84.377 9.986

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/44595360/cmap_HighResolution_731894401_732499201_4FGL_J0537.5+0959_weekly_bin815.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='3.96e-03', job_status='DONE', photon_flux_upper_limit='5.05e-08', time_completed='2024-04-20 22:53:24.689451', job_id='44595360', GAL2='1.06', fit_tolerance='1e-08', EG2='0.68', EG='0.68', time_epoch_completed='1713678804.69', return_code2='101', ts='0.00', comment='SUCCESS', return_code='0', GAL='1.06', dlogl='0.00e+00', ts2='0.00', photon_index_error='0.00', photon_index='2.64' WHERE bin_id='815' AND source_name='4FGL J0537.5+0959' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Sat Apr 20 22:53:24 PDT 2024

