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


Performing analysis on: 4FGL_J0322.4+6606_weekly_bin906
RA = 50.6146, Dec = 66.1102
tmin = 786931201, tmax = 787536001
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='17373170', job_status='RUN', time_executed='2025-12-16 01:13:18.793042', time_epoch_executed='1765876398.79' WHERE source_name='4FGL J0322.4+6606' and cadence='weekly' and bin_id='906'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/17373170

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

Retrieving the FT1 file...

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

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

Retrieving 107 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/17373170/ft1_4FGL_J0322.4+6606_weekly_bin906.fits


Retrieving the FT1 file...

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

Retrieving 107 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/17373170/ft2_4FGL_J0322.4+6606_weekly_bin906.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/17373170/ft1_4FGL_J0322.4+6606_weekly_bin906.fits outfile=/lscratch/kocevski/17373170/ft1_filteredMKT_4FGL_J0322.4+6606_weekly_bin906.fits ra=50.6146 dec=66.1102 rad=12.0 tmin=786931201.0 tmax=787536001.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 6.13
user 5.10
sys 0.32

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/17373170/ft2_4FGL_J0322.4+6606_weekly_bin906.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/17373170/ft2_4FGL_J0322.4+6606_weekly_bin906.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/17373170/ft1_filteredMKT_4FGL_J0322.4+6606_weekly_bin906.fits evtable="EVENTS" outfile="/lscratch/kocevski/17373170/ft1_filtered_4FGL_J0322.4+6606_weekly_bin906.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.13
user 0.23
sys 0.12

Number of photons that the gtmktime cut: 9169

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/17373170/ft1_filtered_4FGL_J0322.4+6606_weekly_bin906.fits" evtable="EVENTS" scfile=/lscratch/kocevski/17373170/ft2_4FGL_J0322.4+6606_weekly_bin906.fits sctable="SC_DATA" outfile=/lscratch/kocevski/17373170/ltcube_786931201_787536001_4FGL_J0322.4+6606_weekly_bin906.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/17373170/ft2_4FGL_J0322.4+6606_weekly_bin906.fits
.....................!
real 18.77
user 17.52
sys 0.27

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/17373170/ft1_filtered_4FGL_J0322.4+6606_weekly_bin906.fits evtable="EVENTS" scfile=/lscratch/kocevski/17373170/ft2_4FGL_J0322.4+6606_weekly_bin906.fits sctable="SC_DATA" expcube=/lscratch/kocevski/17373170/ltcube_786931201_787536001_4FGL_J0322.4+6606_weekly_bin906.fits outfile=/lscratch/kocevski/17373170/expmap_786931201_787536001_4FGL_J0322.4+6606_weekly_bin906.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/17373170/ltcube_786931201_787536001_4FGL_J0322.4+6606_weekly_bin906.fits
.....................!
real 69.02
user 63.82
sys 4.11

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 HB 3 in ROI with RadialDisk spatial model.
Extended source W 3 in ROI, make sure /sdf/group/fermi/g/LCRepository/Likelihood/ExtendedSources/Extended_8years/Templates/W3.fits is the correct path to the extended template.
Extended source G150.3+4.5 in ROI with RadialDisk spatial model.
Added 182 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 J0322.4+6606 @ 50.6146 66.1102

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/17373170/ft1_filtered_4FGL_J0322.4+6606_weekly_bin906.fits scfile=/lscratch/kocevski/17373170/ft2_4FGL_J0322.4+6606_weekly_bin906.fits outfile=/lscratch/kocevski/17373170/cmap_786931201_787536001_4FGL_J0322.4+6606_weekly_bin906.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=50.6146 yref=66.1102 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.40
user 0.25
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/17373170/ft1_filtered_4FGL_J0322.4+6606_weekly_bin906.fits scfile=/lscratch/kocevski/17373170/ft2_4FGL_J0322.4+6606_weekly_bin906.fits outfile=/lscratch/kocevski/17373170/cmap_HighResolution_786931201_787536001_4FGL_J0322.4+6606_weekly_bin906.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=50.6146 yref=66.1102 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.33
user 0.25
sys 0.15

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/17373170/ft1_filtered_4FGL_J0322.4+6606_weekly_bin906.fits evtable="EVENTS" scfile=/lscratch/kocevski/17373170/ft2_4FGL_J0322.4+6606_weekly_bin906.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/17373170/Model_4FGL_J0322.4+6606_weekly_bin906.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 G150.3+4.5
adding source GAL_V02
adding source HB 3
adding source W 3
Working on...
/lscratch/kocevski/17373170/ft1_filtered_4FGL_J0322.4+6606_weekly_bin906.fits.....................!
real 463.28
user 457.82
sys 2.27

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/17373170/ft1_filtered_4FGL_J0322.4+6606_weekly_bin906.fits', '/lscratch/kocevski/17373170/ft2_4FGL_J0322.4+6606_weekly_bin906.fits', expMap='/lscratch/kocevski/17373170/expmap_786931201_787536001_4FGL_J0322.4+6606_weekly_bin906.fits', expCube='/lscratch/kocevski/17373170/ltcube_786931201_787536001_4FGL_J0322.4+6606_weekly_bin906.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/17373170/Model_4FGL_J0322.4+6606_weekly_bin906.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J0322.4+6606'

4FGL J0322.4+6606
   Spectrum: PowerLaw
326    Prefactor:  4.959e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-13)
327        Index:  2.653e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
328        Scale:  9.256e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/17373170/ft1_filtered_4FGL_J0322.4+6606_weekly_bin906.fits
Spacecraft file(s): /lscratch/kocevski/17373170/ft2_4FGL_J0322.4+6606_weekly_bin906.fits
Exposure map: /lscratch/kocevski/17373170/expmap_786931201_787536001_4FGL_J0322.4+6606_weekly_bin906.fits
Exposure cube: /lscratch/kocevski/17373170/ltcube_786931201_787536001_4FGL_J0322.4+6606_weekly_bin906.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/17373170/Model_4FGL_J0322.4+6606_weekly_bin906.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) = 84025.5532503

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .20831E-02   1.0000          .0000       .10000E+07
     2 'Prefactor '    1.8139       1.0000         .10000E-03   10000.    
     3 'norm      '    .12442E-02   1.0000          .0000       .10000E+07
     4 'Prefactor '    2.5781       1.0000          .0000       .10000E+07
     5 'norm      '    7.6812       1.0000          .0000       .10000E+07
     6 'norm      '    2.0524       1.0000          .0000       .10000E+07
     7 'norm      '    .37065       1.0000          .0000       .10000E+07
     8 'Prefactor '    17.026       1.0000          .0000       .10000E+07
     9 'Prefactor '    1.0723       1.0000          .0000       .10000E+07
    10 'Prefactor '    1.5308       1.0000          .0000       .10000E+07
    11 'Prefactor '    15.165       1.0000          .0000       .10000E+07
    12 'Prefactor '    .10528E-05   1.0000          .0000       .10000E+07
    13 'Prefactor '    .10959E-05   1.0000          .0000       .10000E+07
    14 'norm      '    .75423E-06   1.0000          .0000       .10000E+07
    15 'norm      '    13.387       1.0000          .0000       .10000E+07
    16 'Prefactor '    4.6145       1.0000          .0000       .10000E+07
    17 'Normalizat'    1.4595       1.0000         .10000E-01   10.000    
    18 'Prefactor '    .96662       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6290E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   84025.47     FROM MIGRAD    STATUS=CONVERGED    101 CALLS     1053 TOTAL
                     EDM=   .14E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.5%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .43299E-08    19.936       -.13576E-05** at limit **
   2  Prefactor     1.8140        .59062        .18797E-06    .27198E-03
   3  norm          .15377E-07    8.2410        .14904E-06** at limit **
   4  Prefactor     2.5793        1.7662       -.24596E-07    .14199E-02
   5  norm          7.6812        .43408        .37061E-08   -.43981E-03
   6  norm          2.0501        3.7647       -.16996E-07    .22860E-04
   7  norm          .33497        4.9188        .62383E-06    .12350E-05
   8  Prefactor     17.306        1.8136        .20166E-07    .62136E-01
   9  Prefactor     1.0711        1.6500       -.18093E-07   -.14525E-02
  10  Prefactor     1.5279        1.3342       -.78839E-07   -.13144E-02
  11  Prefactor     15.180        2.8554        .27320E-08    .18312    
  12  Prefactor     .58398E-07    7.4767       -.10603E-06** at limit **
  13  Prefactor     .27811E-07    9.5256       -.15775E-06** at limit **
  14  norm           .0000        1.6278       -.20905E-07** at limit **
  15  norm          13.478        1.0487       -.19330E-08   -.30263E-02
  16  Prefactor     4.6089        4.0103        .47762E-07   -.37173E-04
  17  Normalizat    1.4593        .16318       -.34265E-06    .78143E-04
  18  Prefactor     .96663        .19480E-01    .14439E-07    .34691E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 4.32987e-09
  Prefactor  = 1.81402
  norm       = 1.53766e-08
  Prefactor  = 2.5793
  norm       = 7.68117
  norm       = 2.05008
  norm       = 0.334967
  Prefactor  = 17.306
  Prefactor  = 1.07113
  Prefactor  = 1.52789
  Prefactor  = 15.1797
  Prefactor  = 5.83977e-08
  Prefactor  = 2.78111e-08
  norm       = 0
  norm       = 13.4781
  Prefactor  = 4.6089
  Normalizat = 1.4593
  Prefactor  = 0.966628
 **********
 **   18 **HESSE 
 **********

 FCN=   84025.47     FROM HESSE     STATUS=OK           290 CALLS     1343 TOTAL
                     EDM=   .37E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .43299E-08    19.984        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     1.8140        .59249        .77539E-02   -1.5439    
   3  norm          .15377E-07    8.1193        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     2.5793        1.7748        .63537E-03   -1.5676    
   5  norm          7.6812        .43358        .36159E-03   -1.5653    
   6  norm          2.0501        3.7699        .72124E-03   -1.5679    
   7  norm          .33497        .84046        .92969E-02   -1.5696    
   8  Prefactor     17.306        18.258        .24246E-03   -1.5625    
   9  Prefactor     1.0711        1.6864        .11707E-02   -1.5687    
  10  Prefactor     1.5279        1.3577        .86230E-03   -1.5683    
  11  Prefactor     15.180        10.787        .25693E-03   -1.5630    
  12  Prefactor     .58398E-07    7.7649        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .27811E-07    9.7479        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm           .0000        1.6514        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          13.478        12.138        .27350E-03   -1.5635    
  16  Prefactor     4.6089        4.0060        .46831E-03   -1.5665    
  17  Normalizat    1.4593        .16319        .19620       -.78929    
  18  Prefactor     .96663        .18852E-01    .27870E-01   -.93850    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.72224e-07
Minuit parameter uncertainties:
  1  0.000587401
  2  0.592496
  3  0.00070712
  4  1.77481
  5  0.433585
  6  3.76986
  7  0.840463
  8  18.2585
  9  1.68642
  10  1.35773
  11  10.7873
  12  0.0013471
  13  0.00104162
  14  1.31861e-05
  15  12.1378
  16  4.00603
  17  0.163246
  18  0.0188517
Done.

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

Extracting fit parameters...

4FGL J0322.4+6606
   Spectrum: PowerLaw
326    Prefactor:  1.731e+01  1.826e+01  0.000e+00  1.000e+06 ( 1.000e-13)
327        Index:  2.653e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
328        Scale:  9.256e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
618    Prefactor:  9.666e-01  1.885e-02  0.000e+00  1.000e+01 ( 1.000e+00)
619        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
620        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
613   Normalization:  1.459e+00  1.632e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 1.13
Ra Dec: 50.615 66.110
Photon Index (Fixed Index): 2.65 +/- 0.00
Photon Flux (Fixed Index): 3.84e-08 +/- 4.05e-08
Energy Flux (Fixed Index): 9.60e-06 +/- 1.01e-05

TS (Fixed Index): 1.13
Ra Dec: 50.615 66.110
Photon Flux Upper Limit: 1.14428758523e-07 ph cm-2 s-1
Energy Flux Upper Limit: 0.00898346509169 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/17373170/likelihoodResults_786931201_787536001_4FGL_J0322.4+6606_weekly_bin906.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) = 84025.4452483
delta logL = 0.0274891647859

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 84025.4099127
delta logL = 0.0628248154972

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    10.451       1.0000          .0000       .10000E+07
     2 'Index     '    3.1161       1.0000          .0000       10.000    
     3 'Normalizat'    1.4477       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .96716       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6290E+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.
 MIGRAD TERMINATED WITHOUT CONVERGENCE.

 FCN=   84025.41     FROM MIGRAD    STATUS=FAILED        93 CALLS      277 TOTAL
                     EDM=   .13E-05    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     10.448        65.902        .12387E-04   -.12217E-01
   2  Index         3.1169        2.9329        .48852E-02   -.19622E-02
   3  Normalizat    1.4477        .17098        .87732E-03   -.21803E-02
   4  Prefactor     .96717        .19562E-01    .12313E-03   -.12355E-01
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   84025.41     FROM SIMPLEX   STATUS=UNCHANGED     74 CALLS      351 TOTAL
                     EDM=   .16E-04    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     10.448        65.902        .30678E-04   -1.5643    
   2  Index         3.1169        2.9329        .11399E-02   -.38613    
   3  Normalizat    1.4477        .17098        .32028E-03   -.79259    
   4  Prefactor     .96717        .19562E-01    .25796E-04   -.93832    
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   84025.41     FROM MIGRAD    STATUS=CONVERGED     31 CALLS      382 TOTAL
                     EDM=   .84E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     10.436        25.108        .49550E-06   -.95591E-03
   2  Index         3.1178        1.4921        .19541E-03   -.22341E-04
   3  Normalizat    1.4477        .16429        .35093E-04   -.41467E-05
   4  Prefactor     .96717        .19163E-01    .24626E-04   -.14773E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 10.4359
  Index      = 3.11776
  Normalizat = 1.44768
  Prefactor  = 0.967173
 **********
 **   18 **HESSE 
 **********

 FCN=   84025.41     FROM HESSE     STATUS=OK            23 CALLS      405 TOTAL
                     EDM=   .88E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     10.436        25.017        .37297E-06   -1.5643    
   2  Index         3.1178        1.4858        .78163E-05   -.38596    
   3  Normalizat    1.4477        .16408        .70186E-05   -.79259    
   4  Prefactor     .96717        .19153E-01    .49253E-05   -.93832    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 8.7612e-12
Minuit parameter uncertainties:
  1  25.0169
  2  1.51257
  3  0.164144
  4  0.019153
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) = 84025.4099108
delta logL = 0.0628266671411

Extracting fit parameters...

4FGL J0322.4+6606
   Spectrum: PowerLaw
326    Prefactor:  1.044e+01  2.502e+01  0.000e+00  1.000e+06 ( 1.000e-13)
327        Index:  3.118e+00  1.513e+00  0.000e+00  1.000e+01 (-1.000e+00)
328        Scale:  9.256e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
618    Prefactor:  9.672e-01  1.915e-02  0.000e+00  1.000e+01 ( 1.000e+00)
619        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
620        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
613   Normalization:  1.448e+00  1.641e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.27
Ra Dec: 50.615 66.110
Photon Index (Free Index): 3.12 +/- 1.51
Photon Flux (Free Index): 5.09e-08 +/- 5.27e-08
Energy Flux (Free Index): 9.62e-06 +/- 9.20e-06

Creating a high resolution counts map...
INFO: Auto-setting vmin to -2.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  2.220e+00 [aplpy.core]
Saving /lscratch/kocevski/17373170/cmap_HighResolution_786931201_787536001_4FGL_J0322.4+6606_weekly_bin906.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='8.98e-03', comment='SUCCESS', photon_flux='3.84e-08', energy_flux2='9.62e-06', photon_flux_error='4.05e-08', dlogl='6.28e-02', energy_flux='9.60e-06', photon_flux2='5.09e-08', job_status='DONE', time_completed='2025-12-16 01:48:39.053212', photon_index_error2='1.51', photon_index2='3.12', ts='1.13', fit_tolerance='1e-08', GAL='0.97', photon_index_error='0.00', photon_flux_upper_limit='1.14e-07', energy_flux_error2='9.20e-06', EG='1.46', time_epoch_completed='1765878519.05', return_code='0', job_id='17373170', GAL2='0.97', EG2='1.45', return_code2='0', energy_flux_error='1.01e-05', photon_flux_error2='5.27e-08', ts2='1.27', photon_index='2.65' WHERE bin_id='906' AND source_name='4FGL J0322.4+6606' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Dec 16 01:48:39 PST 2025

