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


Performing analysis on: 4FGL_J0539.6+1432_weekly_bin784
RA = 84.9052, Dec = 14.5443
tmin = 713145601, tmax = 713750401
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='28615424', job_status='RUN', time_executed='2023-09-19 22:41:35.968919', time_epoch_executed='1695188495.97' WHERE source_name='4FGL J0539.6+1432' and cadence='weekly' and bin_id='784'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/28615424

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

Retrieving the FT1 file...

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

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

Retrieving 107 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/28615424/ft1_4FGL_J0539.6+1432_weekly_bin784.fits


Retrieving the FT1 file...

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

Retrieving 107 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/28615424/ft2_4FGL_J0539.6+1432_weekly_bin784.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/28615424/ft1_4FGL_J0539.6+1432_weekly_bin784.fits outfile=/lscratch/kocevski/28615424/ft1_filteredMKT_4FGL_J0539.6+1432_weekly_bin784.fits ra=84.9052 dec=14.5443 rad=12.0 tmin=713145601.0 tmax=713750401.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.08
user 3.70
sys 0.18

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/28615424/ft2_4FGL_J0539.6+1432_weekly_bin784.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/28615424/ft2_4FGL_J0539.6+1432_weekly_bin784.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/28615424/ft1_filteredMKT_4FGL_J0539.6+1432_weekly_bin784.fits evtable="EVENTS" outfile="/lscratch/kocevski/28615424/ft1_filtered_4FGL_J0539.6+1432_weekly_bin784.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 1.56
user 0.22
sys 0.11

Number of photons that the gtmktime cut: 6159

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/28615424/ft1_filtered_4FGL_J0539.6+1432_weekly_bin784.fits" evtable="EVENTS" scfile=/lscratch/kocevski/28615424/ft2_4FGL_J0539.6+1432_weekly_bin784.fits sctable="SC_DATA" outfile=/lscratch/kocevski/28615424/ltcube_713145601_713750401_4FGL_J0539.6+1432_weekly_bin784.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/28615424/ft2_4FGL_J0539.6+1432_weekly_bin784.fits
.....................!
real 22.34
user 20.30
sys 0.22

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/28615424/ft1_filtered_4FGL_J0539.6+1432_weekly_bin784.fits evtable="EVENTS" scfile=/lscratch/kocevski/28615424/ft2_4FGL_J0539.6+1432_weekly_bin784.fits sctable="SC_DATA" expcube=/lscratch/kocevski/28615424/ltcube_713145601_713750401_4FGL_J0539.6+1432_weekly_bin784.fits outfile=/lscratch/kocevski/28615424/expmap_713145601_713750401_4FGL_J0539.6+1432_weekly_bin784.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/28615424/ltcube_713145601_713750401_4FGL_J0539.6+1432_weekly_bin784.fits
.....................!
real 71.56
user 64.13
sys 3.66

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 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.
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.
Added 171 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 J0539.6+1432 @ 84.9052 14.5443

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/28615424/ft1_filtered_4FGL_J0539.6+1432_weekly_bin784.fits scfile=/lscratch/kocevski/28615424/ft2_4FGL_J0539.6+1432_weekly_bin784.fits outfile=/lscratch/kocevski/28615424/cmap_713145601_713750401_4FGL_J0539.6+1432_weekly_bin784.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.9052 yref=14.5443 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.31
user 0.23
sys 0.12

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/28615424/ft1_filtered_4FGL_J0539.6+1432_weekly_bin784.fits scfile=/lscratch/kocevski/28615424/ft2_4FGL_J0539.6+1432_weekly_bin784.fits outfile=/lscratch/kocevski/28615424/cmap_HighResolution_713145601_713750401_4FGL_J0539.6+1432_weekly_bin784.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.9052 yref=14.5443 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.63
user 0.23
sys 0.11

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/28615424/ft1_filtered_4FGL_J0539.6+1432_weekly_bin784.fits evtable="EVENTS" scfile=/lscratch/kocevski/28615424/ft2_4FGL_J0539.6+1432_weekly_bin784.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/28615424/Model_4FGL_J0539.6+1432_weekly_bin784.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/28615424/ft1_filtered_4FGL_J0539.6+1432_weekly_bin784.fits.....................!
real 540.66
user 533.10
sys 1.06

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/28615424/ft1_filtered_4FGL_J0539.6+1432_weekly_bin784.fits', '/lscratch/kocevski/28615424/ft2_4FGL_J0539.6+1432_weekly_bin784.fits', expMap='/lscratch/kocevski/28615424/expmap_713145601_713750401_4FGL_J0539.6+1432_weekly_bin784.fits', expCube='/lscratch/kocevski/28615424/ltcube_713145601_713750401_4FGL_J0539.6+1432_weekly_bin784.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/28615424/Model_4FGL_J0539.6+1432_weekly_bin784.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J0539.6+1432'

4FGL J0539.6+1432
   Spectrum: PowerLaw
281    Prefactor:  1.737e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-12)
282        Index:  2.545e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
283        Scale:  8.434e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/28615424/ft1_filtered_4FGL_J0539.6+1432_weekly_bin784.fits
Spacecraft file(s): /lscratch/kocevski/28615424/ft2_4FGL_J0539.6+1432_weekly_bin784.fits
Exposure map: /lscratch/kocevski/28615424/expmap_713145601_713750401_4FGL_J0539.6+1432_weekly_bin784.fits
Exposure cube: /lscratch/kocevski/28615424/ltcube_713145601_713750401_4FGL_J0539.6+1432_weekly_bin784.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/28615424/Model_4FGL_J0539.6+1432_weekly_bin784.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) = 57660.7880508

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    2.1201       1.0000          .0000       .10000E+07
     2 'norm      '    11.176       1.0000          .0000       .10000E+07
     3 'Prefactor '    1.4729       1.0000          .0000       .10000E+07
     4 'norm      '    .48280E-02   1.0000          .0000       .10000E+07
     5 'Prefactor '    1.8788       1.0000          .0000       .10000E+07
     6 'Prefactor '    35.743       1.0000          .0000       .10000E+07
     7 'norm      '    2.1807       1.0000          .0000       .10000E+07
     8 'norm      '    .43959E-03   1.0000          .0000       .10000E+07
     9 'norm      '    .30837       1.0000          .0000       .10000E+07
    10 'Prefactor '    1.2033       1.0000         .10000E-03   10000.    
    11 'Prefactor '    2.7540       1.0000          .0000       .10000E+07
    12 'Prefactor '    29.035       1.0000          .0000       .10000E+07
    13 'Prefactor '    .35382E-03   1.0000          .0000       .10000E+07
    14 'Prefactor '    7.9423       1.0000          .0000       .10000E+07
    15 'norm      '    .11247E-03   1.0000          .0000       .10000E+07
    16 'Prefactor '    2.5936       1.0000          .0000       .10000E+07
    17 'Normalizat'    .65391       1.0000         .10000E-01   10.000    
    18 'Prefactor '    1.0346       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6020E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   57660.70     FROM MIGRAD    STATUS=CONVERGED    135 CALLS     1361 TOTAL
                     EDM=   .12E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.1%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     2.1236        4.2363        .80723E-08   -.63344E-03
   2  norm          11.175        2.8273       -.31832E-07   -.44740E-02
   3  Prefactor     1.4736        1.8922       -.37226E-08   -.53681E-03
   4  norm          .24941E-06    71.809       -.13178E-05** at limit **
   5  Prefactor     1.8808        2.3351        .47011E-07    .11748E-02
   6  Prefactor     35.852        7.5450        .43230E-07   -.24756    
   7  norm          2.1801        1.1431        .38140E-07    .55459E-02
   8  norm          .20572E-06    17.512       -.61310E-07** at limit **
   9  norm          .30575        .67688       -.27654E-07   -.20713E-02
  10  Prefactor     1.2033        .79206E-01    .50834E-08   -.14413E-02
  11  Prefactor     2.7543        .58819       -.14615E-08   -.18099E-03
  12  Prefactor     29.256        15.352       -.38216E-07   -.87179E-01
  13  Prefactor     .51403E-06    21.684       -.14226E-06** at limit **
  14  Prefactor     7.9318        3.2773       -.62620E-07   -.37567E-02
  15  norm          .49960E-09    6.1512       -.14796E-06** at limit **
  16  Prefactor     2.6302        5.1119        .43627E-06    .13450E-02
  17  Normalizat    .65346        .22110        .25862E-05   -.61265E-04
  18  Prefactor     1.0346        .29258E-01   -.62468E-06   -.67078E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 2.12358
  norm       = 11.1751
  Prefactor  = 1.47357
  norm       = 2.49412e-07
  Prefactor  = 1.88077
  Prefactor  = 35.8525
  norm       = 2.1801
  norm       = 2.05724e-07
  norm       = 0.305753
  Prefactor  = 1.20329
  Prefactor  = 2.75432
  Prefactor  = 29.2557
  Prefactor  = 5.14033e-07
  Prefactor  = 7.93177
  norm       = 4.996e-10
  Prefactor  = 2.63015
  Normalizat = 0.653457
  Prefactor  = 1.03458
 **********
 **   18 **HESSE 
 **********

 FCN=   57660.70     FROM HESSE     STATUS=OK           306 CALLS     1667 TOTAL
                     EDM=   .30E-05    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     2.1236        4.2699        .70802E-03   -1.5679    
   2  norm          11.175        2.8594        .29943E-03   -1.5641    
   3  Prefactor     1.4736        1.9844        .88487E-03   -1.5684    
   4  norm          .24941E-06    .65758        .67573E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     1.8808        2.3858        .75925E-03   -1.5681    
   6  Prefactor     35.852        31.996        .16729E-03   -1.5588    
   7  norm          2.1801        1.1447        .69686E-03   -1.5678    
   8  norm          .20572E-06    1.4067        .72471E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          .30575        .71385        .10098E-02   -1.5697    
  10  Prefactor     1.2033        .76977E-01    .29108E-02   -1.5489    
  11  Prefactor     2.7543        .59076        .61314E-03   -1.5675    
  12  Prefactor     29.256        16.499        .18561E-03   -1.5600    
  13  Prefactor     .51403E-06    21.992        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     7.9318        3.3896        .35554E-03   -1.5652    
  15  norm          .49960E-09    6.1668        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     2.6302        5.1092        .63331E-03   -1.5676    
  17  Normalizat    .65346        .30518        .26565       -1.0576    
  18  Prefactor     1.0346        .36168E-01    .31281E-01   -.91586    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.99948e-06
Minuit parameter uncertainties:
  1  4.26993
  2  2.85942
  3  1.98443
  4  0.00080998
  5  2.38576
  6  31.9957
  7  1.14474
  8  0.00107589
  9  0.713855
  10  0.076977
  11  0.590763
  12  16.4993
  13  0.00672434
  14  3.38962
  15  0.000112404
  16  5.10923
  17  0.305974
  18  0.0361684
Done.

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

Extracting fit parameters...

4FGL J0539.6+1432
   Spectrum: PowerLaw
281    Prefactor:  7.932e+00  3.390e+00  0.000e+00  1.000e+06 ( 1.000e-12)
282        Index:  2.545e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
283        Scale:  8.434e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
583    Prefactor:  1.035e+00  3.617e-02  0.000e+00  1.000e+01 ( 1.000e+00)
584        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
585        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
582   Normalization:  6.535e-01  3.060e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 9.15
Ra Dec: 84.905 14.544
Photon Index (Fixed Index): 2.55 +/- 0.00
Photon Flux (Fixed Index): 1.17e-07 +/- 4.99e-08
Energy Flux (Fixed Index): 3.23e-05 +/- 1.38e-05

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) = 57660.5390041
delta logL = 0.163419144606

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 57660.5177622
delta logL = 0.184661027954

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   57660.52     FROM MIGRAD    STATUS=CONVERGED     88 CALLS      282 TOTAL
                     EDM=   .44E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     8.8572        3.9489        .13462E-04   -.50265E-02
   2  Index         2.3375        .34260        .11215E-01   -.20886E-03
   3  Normalizat    .67366        .20050        .11652E-02   -.16212E-03
   4  Prefactor     1.0334        .28716E-01    .13832E-03    .40043E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 8.85724
  Index      = 2.33753
  Normalizat = 0.673658
  Prefactor  = 1.03335
 **********
 **   18 **HESSE 
 **********

 FCN=   57660.52     FROM HESSE     STATUS=OK            25 CALLS      307 TOTAL
                     EDM=   .56E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     8.8572        3.8834        .53848E-06   -1.5648    
   2  Index         2.3375        .33649        .44859E-03   -.56154    
   3  Normalizat    .67366        .20028        .46609E-04   -1.0494    
   4  Prefactor     1.0334        .28688E-01    .55329E-05   -.91626    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 5.59562e-10
Minuit parameter uncertainties:
  1  3.88341
  2  0.336844
  3  0.200498
  4  0.0286886
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 57660.5177621
delta logL = 0.184661093997

Extracting fit parameters...

4FGL J0539.6+1432
   Spectrum: PowerLaw
281    Prefactor:  8.857e+00  3.883e+00  0.000e+00  1.000e+06 ( 1.000e-12)
282        Index:  2.338e+00  3.368e-01  0.000e+00  1.000e+01 (-1.000e+00)
283        Scale:  8.434e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
583    Prefactor:  1.033e+00  2.869e-02  0.000e+00  1.000e+01 ( 1.000e+00)
584        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
585        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
582   Normalization:  6.737e-01  2.005e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 9.38
Ra Dec: 84.905 14.544
Photon Index (Free Index): 2.34 +/- 0.34
Photon Flux (Free Index): 9.68e-08 +/- 5.57e-08
Energy Flux (Free Index): 3.46e-05 +/- 1.54e-05

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/28615424/cmap_HighResolution_713145601_713750401_4FGL_J0539.6+1432_weekly_bin784.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='1.17e-07', energy_flux2='3.46e-05', photon_flux_error='4.99e-08', dlogl='1.85e-01', energy_flux='3.23e-05', photon_flux2='9.68e-08', job_status='DONE', time_completed='2023-09-19 23:06:48.427157', photon_index_error2='0.34', photon_index2='2.34', ts='9.15', fit_tolerance='1e-08', GAL='1.03', photon_index_error='0.00', energy_flux_error2='1.54e-05', EG='0.65', time_epoch_completed='1695190008.43', return_code='0', job_id='28615424', GAL2='1.03', EG2='0.67', return_code2='0', energy_flux_error='1.38e-05', photon_flux_error2='5.57e-08', ts2='9.38', photon_index='2.55' WHERE bin_id='784' AND source_name='4FGL J0539.6+1432' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Sep 19 23:06:48 PDT 2023

