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


Performing analysis on: 4FGL_J0328.4-4736_weekly_bin805
RA = 52.101, Dec = -47.6158
tmin = 725846401, tmax = 726451201
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='38414107', job_status='RUN', time_executed='2024-01-18 15:30:55.363616', time_epoch_executed='1705620655.36' WHERE source_name='4FGL J0328.4-4736' and cadence='weekly' and bin_id='805'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/38414107

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

Retrieving the FT1 file...

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

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

Retrieving 103 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/38414107/ft1_4FGL_J0328.4-4736_weekly_bin805.fits


Retrieving the FT1 file...

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

Retrieving 103 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/38414107/ft2_4FGL_J0328.4-4736_weekly_bin805.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/38414107/ft1_4FGL_J0328.4-4736_weekly_bin805.fits outfile=/lscratch/kocevski/38414107/ft1_filteredMKT_4FGL_J0328.4-4736_weekly_bin805.fits ra=52.101 dec=-47.6158 rad=12.0 tmin=725846401.0 tmax=726451201.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.05
user 2.78
sys 0.19

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/38414107/ft2_4FGL_J0328.4-4736_weekly_bin805.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/38414107/ft2_4FGL_J0328.4-4736_weekly_bin805.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/38414107/ft1_filteredMKT_4FGL_J0328.4-4736_weekly_bin805.fits evtable="EVENTS" outfile="/lscratch/kocevski/38414107/ft1_filtered_4FGL_J0328.4-4736_weekly_bin805.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.38
user 0.21
sys 0.12

Number of photons that the gtmktime cut: 2268

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/38414107/ft1_filtered_4FGL_J0328.4-4736_weekly_bin805.fits" evtable="EVENTS" scfile=/lscratch/kocevski/38414107/ft2_4FGL_J0328.4-4736_weekly_bin805.fits sctable="SC_DATA" outfile=/lscratch/kocevski/38414107/ltcube_725846401_726451201_4FGL_J0328.4-4736_weekly_bin805.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/38414107/ft2_4FGL_J0328.4-4736_weekly_bin805.fits
.....................!
real 15.18
user 14.86
sys 0.20

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/38414107/ft1_filtered_4FGL_J0328.4-4736_weekly_bin805.fits evtable="EVENTS" scfile=/lscratch/kocevski/38414107/ft2_4FGL_J0328.4-4736_weekly_bin805.fits sctable="SC_DATA" expcube=/lscratch/kocevski/38414107/ltcube_725846401_726451201_4FGL_J0328.4-4736_weekly_bin805.fits outfile=/lscratch/kocevski/38414107/expmap_725846401_726451201_4FGL_J0328.4-4736_weekly_bin805.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/38414107/ltcube_725846401_726451201_4FGL_J0328.4-4736_weekly_bin805.fits
.....................!
real 59.18
user 55.45
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 186 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 J0328.4-4736 @ 52.101 -47.6158

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/38414107/ft1_filtered_4FGL_J0328.4-4736_weekly_bin805.fits scfile=/lscratch/kocevski/38414107/ft2_4FGL_J0328.4-4736_weekly_bin805.fits outfile=/lscratch/kocevski/38414107/cmap_725846401_726451201_4FGL_J0328.4-4736_weekly_bin805.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=52.101 yref=-47.6158 axisrot=0.0 rafield="RA" decfield="DEC" proj="AIT" hpx_ordering_scheme="RING" hpx_order=3 hpx_ebin=yes hpx_region="" evtable="EVENTS" sctable="SC_DATA" efield="ENERGY" tfield="TIME" chatter=2 clobber=yes debug=no gui=no mode="ql"

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

This is gtbin version HEAD
real 0.40
user 0.20
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/38414107/ft1_filtered_4FGL_J0328.4-4736_weekly_bin805.fits scfile=/lscratch/kocevski/38414107/ft2_4FGL_J0328.4-4736_weekly_bin805.fits outfile=/lscratch/kocevski/38414107/cmap_HighResolution_725846401_726451201_4FGL_J0328.4-4736_weekly_bin805.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=52.101 yref=-47.6158 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.37
user 0.20
sys 0.13

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/38414107/ft1_filtered_4FGL_J0328.4-4736_weekly_bin805.fits evtable="EVENTS" scfile=/lscratch/kocevski/38414107/ft2_4FGL_J0328.4-4736_weekly_bin805.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/38414107/Model_4FGL_J0328.4-4736_weekly_bin805.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/38414107/ft1_filtered_4FGL_J0328.4-4736_weekly_bin805.fits.....................!
real 150.79
user 149.56
sys 0.60

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/38414107/ft1_filtered_4FGL_J0328.4-4736_weekly_bin805.fits', '/lscratch/kocevski/38414107/ft2_4FGL_J0328.4-4736_weekly_bin805.fits', expMap='/lscratch/kocevski/38414107/expmap_725846401_726451201_4FGL_J0328.4-4736_weekly_bin805.fits', expCube='/lscratch/kocevski/38414107/ltcube_725846401_726451201_4FGL_J0328.4-4736_weekly_bin805.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/38414107/Model_4FGL_J0328.4-4736_weekly_bin805.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J0328.4-4736'

4FGL J0328.4-4736
   Spectrum: PowerLaw
269    Prefactor:  3.763e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-13)
270        Index:  2.389e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
271        Scale:  9.405e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/38414107/ft1_filtered_4FGL_J0328.4-4736_weekly_bin805.fits
Spacecraft file(s): /lscratch/kocevski/38414107/ft2_4FGL_J0328.4-4736_weekly_bin805.fits
Exposure map: /lscratch/kocevski/38414107/expmap_725846401_726451201_4FGL_J0328.4-4736_weekly_bin805.fits
Exposure cube: /lscratch/kocevski/38414107/ltcube_725846401_726451201_4FGL_J0328.4-4736_weekly_bin805.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/38414107/Model_4FGL_J0328.4-4736_weekly_bin805.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) = 24368.4423141

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .23143E-06   1.0000          .0000       .10000E+07
     2 'Prefactor '    1.8001       1.0000          .0000       .10000E+07
     3 'Prefactor '    .84210E-06   1.0000          .0000       .10000E+07
     4 'norm      '    .64873       1.0000          .0000       .10000E+07
     5 'Prefactor '    1.8265       1.0000          .0000       .10000E+07
     6 'Prefactor '    .28966E-06   1.0000          .0000       .10000E+07
     7 'Prefactor '    .47228E-05   1.0000          .0000       .10000E+07
     8 'Prefactor '    2.0962       1.0000          .0000       .10000E+07
     9 'Prefactor '    .34417E-08   1.0000          .0000       .10000E+07
    10 'Prefactor '    35.936       1.0000          .0000       .10000E+07
    11 'Prefactor '    .37659E-06   1.0000          .0000       .10000E+07
    12 'norm      '    4.9801       1.0000          .0000       .10000E+07
    13 'norm      '    1.4468       1.0000          .0000       .10000E+07
    14 'Prefactor '    24.068       1.0000          .0000       .10000E+07
    15 'Prefactor '    16.944       1.0000          .0000       .10000E+07
    16 'norm      '    35.442       1.0000          .0000       .10000E+07
    17 'Prefactor '    2.7716       1.0000          .0000       .10000E+07
    18 'Prefactor '    14.340       1.0000          .0000       .10000E+07
    19 'norm      '    4.1632       1.0000          .0000       .10000E+07
    20 'Prefactor '    .71946E-05   1.0000          .0000       .10000E+07
    21 'Normalizat'    .91191       1.0000         .10000E-01   10.000    
    22 'Prefactor '    .95895       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5990E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   24368.33     FROM MIGRAD    STATUS=CONVERGED    103 CALLS     1374 TOTAL
                     EDM=   .11E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.5%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .12046E-06    5.8618        .44110E-05** at limit **
   2  Prefactor     1.8333        6.0234       -.13449E-06    .32799E-02
   3  Prefactor     .49960E-09    3.3727        .14697E-05** at limit **
   4  norm          .64878        .36722       -.58186E-07    .35886E-01
   5  Prefactor     1.8263        1.5553       -.22784E-07   -.59140E-03
   6  Prefactor      .0000        2.3839       -.85920E-06** at limit **
   7  Prefactor     .11657E-07    1.4406        .92404E-06** at limit **
   8  Prefactor     2.0963        1.7650        .11930E-06   -.12565E-01
   9  Prefactor     .11602E-07    1.4449       -.66433E-06** at limit **
  10  Prefactor     36.070        2.4793        .40382E-06   -.47604E-01
  11  Prefactor     .69389E-08    3.4637       -.20498E-05** at limit **
  12  norm          4.9797        1.5446       -.37265E-07    .22206E-02
  13  norm          1.4469        .41138       -.38779E-07    .93017E-02
  14  Prefactor     23.990        4.6298       -.10016E-05    .83670E-01
  15  Prefactor     16.998        1.2412       -.95171E-07    .25502E-02
  16  norm          35.426        6.2183       -.11797E-06   -.59448E-02
  17  Prefactor     2.7797        4.4691        .39897E-06    .12302E-02
  18  Prefactor     14.350        4.9419       -.13232E-05    .39664E-01
  19  norm          4.1629        1.6135        .25625E-07    .34188E-02
  20  Prefactor     .24758E-07    7.5328       -.53029E-06** at limit **
  21  Normalizat    .91190        .91746E-01    .59493E-06   -.15018E-03
  22  Prefactor     .95889        .10281        .32264E-05    .13775E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 1.20459e-07
  Prefactor  = 1.83333
  Prefactor  = 4.996e-10
  norm       = 0.648783
  Prefactor  = 1.82628
  Prefactor  = 0
  Prefactor  = 1.16573e-08
  Prefactor  = 2.09629
  Prefactor  = 1.16018e-08
  Prefactor  = 36.0697
  Prefactor  = 6.93889e-09
  norm       = 4.97968
  norm       = 1.44689
  Prefactor  = 23.9896
  Prefactor  = 16.9979
  norm       = 35.4258
  Prefactor  = 2.77974
  Prefactor  = 14.3502
  norm       = 4.16294
  Prefactor  = 2.4758e-08
  Normalizat = 0.911897
  Prefactor  = 0.958886
 **********
 **   18 **HESSE 
 **********

 FCN=   24368.33     FROM HESSE     STATUS=OK           390 CALLS     1764 TOTAL
                     EDM=   .17E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .12046E-06    6.7257        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     1.8333        6.0528        .77886E-03   -1.5681    
   3  Prefactor     .49960E-09    4.9546        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  norm          .64878        .37208        .64972E-03   -1.5692    
   5  Prefactor     1.8263        1.5564        .77210E-03   -1.5681    
   6  Prefactor      .0000        2.4102        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .11657E-07    4.4249        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     2.0963        1.7642        .71261E-03   -1.5679    
   9  Prefactor     .11602E-07    4.5313        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     36.070        17.813        .16683E-03   -1.5588    
  11  Prefactor     .69389E-08    4.9304        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm          4.9797        1.5537        .45041E-03   -1.5663    
  13  norm          1.4469        .41383        .89578E-03   -1.5684    
  14  Prefactor     23.990        17.393        .20388E-03   -1.5610    
  15  Prefactor     16.998        10.807        .24304E-03   -1.5626    
  16  norm          35.426        6.2674        .16799E-03   -1.5589    
  17  Prefactor     2.7797        4.5030        .61105E-03   -1.5675    
  18  Prefactor     14.350        15.232        .26424E-03   -1.5632    
  19  norm          4.1629        1.6135        .49373E-03   -1.5667    
  20  Prefactor     .24758E-07    7.9344        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Normalizat    .91190        .79134E-01    .45054E-01   -.96043    
  22  Prefactor     .95889        .87652E-01    .45752E-01   -.94113    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.65982e-07
Minuit parameter uncertainties:
  1  0.00180003
  2  6.05286
  3  9.77403e-05
  4  0.372079
  5  1.5564
  6  1.50562e-05
  7  0.000454017
  8  1.76425
  9  0.000458139
  10  17.8128
  11  0.000369331
  12  1.55375
  13  0.413828
  14  17.393
  15  10.8074
  16  6.26738
  17  4.503
  18  15.2321
  19  1.6135
  20  0.000886709
  21  0.0791443
  22  0.0876651
Done.

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

Extracting fit parameters...

4FGL J0328.4-4736
   Spectrum: PowerLaw
269    Prefactor:  6.939e-09  3.693e-04  0.000e+00  1.000e+06 ( 1.000e-13)
270        Index:  2.389e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
271        Scale:  9.405e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
596    Prefactor:  9.589e-01  8.767e-02  0.000e+00  1.000e+01 ( 1.000e+00)
597        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
598        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
592   Normalization:  9.119e-01  7.914e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 52.101 -47.616
Photon Flux Upper Limit: 2.05152958306e-08 ph cm-2 s-1
Energy Flux Upper Limit: 0.0015840829957 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/38414107/likelihoodResults_725846401_726451201_4FGL_J0328.4-4736_weekly_bin805.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) = 24368.32604
delta logL = 0.000870352454513

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 24368.3269103
delta logL = -5.6425051298e-09

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .51070E-08   1.0000          .0000       .10000E+07
     2 'Index     '    2.9936       1.0000          .0000       10.000    
     3 'Normalizat'    .91190       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .95889       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5990E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

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

 FCN=   24368.33     FROM MIGRAD    STATUS=CONVERGED     52 CALLS      340 TOTAL
                     EDM=   .49E-11  STRATEGY=1  ERROR MATRIX UNCERTAINTY=100.0%

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor      .0000        1.2027        .42118E-03** at limit **
   2  Index         .98528        .65393       -.19503E-04     .0000    
   3  Normalizat    .91190        1.2467       -.52540E-06    .75114E-04
   4  Prefactor     .95889        1.3006        .24568E-06    .18039E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0
  Index      = 0.985282
  Normalizat = 0.911898
  Prefactor  = 0.958885
 **********
 **   18 **HESSE 
 **********
  MNHESS FAILS AND WILL RETURN DIAGONAL MATRIX. 

 FCN=   24368.33     FROM HESSE     STATUS=FAILED         9 CALLS      349 TOTAL
                     EDM=   .49E-11  STRATEGY=1  ERROR MATRIX UNCERTAINTY=100.0%

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor      .0000        1.2027        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         .41274E-01    1.0418       -.19503E-04   -.93222    
   3  Normalizat    .91190        1.2467       -.52540E-06   -.96043    
   4  Prefactor     .95889        1.3006        .24568E-06   -.94113    
                               ERR DEF=  .500    
Minuit fit quality: 1   estimated distance: 4.94255e-12
Minuit parameter uncertainties:
  1  4.81245e-06
  2  0.659296
  3  1.28986
  4  1.34709
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) = 24368.3269103
delta logL = 7.42147676647e-10

Extracting fit parameters...

4FGL J0328.4-4736
   Spectrum: PowerLaw
269    Prefactor:  0.000e+00  4.812e-06  0.000e+00  1.000e+06 ( 1.000e-13)
270        Index:  9.853e-01  6.593e-01  0.000e+00  1.000e+01 (-1.000e+00)
271        Scale:  9.405e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
596    Prefactor:  9.589e-01  1.347e+00  0.000e+00  1.000e+01 ( 1.000e+00)
597        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
598        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
592   Normalization:  9.119e-01  1.290e+00  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 52.101 -47.616

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/38414107/cmap_HighResolution_725846401_726451201_4FGL_J0328.4-4736_weekly_bin805.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.58e-03', job_status='DONE', photon_flux_upper_limit='2.05e-08', time_completed='2024-01-18 15:41:31.195026', job_id='38414107', GAL2='0.96', fit_tolerance='1e-08', EG2='0.91', EG='0.91', time_epoch_completed='1705621291.2', return_code2='101', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.96', dlogl='7.42e-10', ts2='0.00', photon_index_error='0.00', photon_index='2.39' WHERE bin_id='805' AND source_name='4FGL J0328.4-4736' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Thu Jan 18 15:41:31 PST 2024

