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


Performing analysis on: 4FGL_J0322.4+6606_weekly_bin787
RA = 50.6146, Dec = 66.1102
tmin = 714960001, tmax = 715564801
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='28612559', job_status='RUN', time_executed='2023-09-19 21:31:02.725059', time_epoch_executed='1695184262.73' WHERE source_name='4FGL J0322.4+6606' and cadence='weekly' and bin_id='787'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/28612559

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

Retrieving the FT1 file...

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

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

Retrieving 107 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/28612559/ft1_4FGL_J0322.4+6606_weekly_bin787.fits


Retrieving the FT1 file...

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

Retrieving 107 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/28612559/ft2_4FGL_J0322.4+6606_weekly_bin787.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/28612559/ft1_4FGL_J0322.4+6606_weekly_bin787.fits outfile=/lscratch/kocevski/28612559/ft1_filteredMKT_4FGL_J0322.4+6606_weekly_bin787.fits ra=50.6146 dec=66.1102 rad=12.0 tmin=714960001.0 tmax=715564801.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.10
user 5.09
sys 0.25

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

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

Number of photons that the gtmktime cut: 9262

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/28612559/ft1_filtered_4FGL_J0322.4+6606_weekly_bin787.fits" evtable="EVENTS" scfile=/lscratch/kocevski/28612559/ft2_4FGL_J0322.4+6606_weekly_bin787.fits sctable="SC_DATA" outfile=/lscratch/kocevski/28612559/ltcube_714960001_715564801_4FGL_J0322.4+6606_weekly_bin787.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/28612559/ft2_4FGL_J0322.4+6606_weekly_bin787.fits
.....................!
real 18.92
user 18.35
sys 0.25

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/28612559/ft1_filtered_4FGL_J0322.4+6606_weekly_bin787.fits evtable="EVENTS" scfile=/lscratch/kocevski/28612559/ft2_4FGL_J0322.4+6606_weekly_bin787.fits sctable="SC_DATA" expcube=/lscratch/kocevski/28612559/ltcube_714960001_715564801_4FGL_J0322.4+6606_weekly_bin787.fits outfile=/lscratch/kocevski/28612559/expmap_714960001_715564801_4FGL_J0322.4+6606_weekly_bin787.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/28612559/ltcube_714960001_715564801_4FGL_J0322.4+6606_weekly_bin787.fits
.....................!
real 70.07
user 65.57
sys 3.93

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/28612559/ft1_filtered_4FGL_J0322.4+6606_weekly_bin787.fits scfile=/lscratch/kocevski/28612559/ft2_4FGL_J0322.4+6606_weekly_bin787.fits outfile=/lscratch/kocevski/28612559/cmap_714960001_715564801_4FGL_J0322.4+6606_weekly_bin787.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 0.59
user 0.26
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/28612559/ft1_filtered_4FGL_J0322.4+6606_weekly_bin787.fits scfile=/lscratch/kocevski/28612559/ft2_4FGL_J0322.4+6606_weekly_bin787.fits outfile=/lscratch/kocevski/28612559/cmap_HighResolution_714960001_715564801_4FGL_J0322.4+6606_weekly_bin787.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 0.60
user 0.26
sys 0.14

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/28612559/ft1_filtered_4FGL_J0322.4+6606_weekly_bin787.fits evtable="EVENTS" scfile=/lscratch/kocevski/28612559/ft2_4FGL_J0322.4+6606_weekly_bin787.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/28612559/Model_4FGL_J0322.4+6606_weekly_bin787.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/28612559/ft1_filtered_4FGL_J0322.4+6606_weekly_bin787.fits.....................!
real 472.08
user 466.85
sys 1.09

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/28612559/ft1_filtered_4FGL_J0322.4+6606_weekly_bin787.fits', '/lscratch/kocevski/28612559/ft2_4FGL_J0322.4+6606_weekly_bin787.fits', expMap='/lscratch/kocevski/28612559/expmap_714960001_715564801_4FGL_J0322.4+6606_weekly_bin787.fits', expCube='/lscratch/kocevski/28612559/ltcube_714960001_715564801_4FGL_J0322.4+6606_weekly_bin787.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/28612559/Model_4FGL_J0322.4+6606_weekly_bin787.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/28612559/ft1_filtered_4FGL_J0322.4+6606_weekly_bin787.fits
Spacecraft file(s): /lscratch/kocevski/28612559/ft2_4FGL_J0322.4+6606_weekly_bin787.fits
Exposure map: /lscratch/kocevski/28612559/expmap_714960001_715564801_4FGL_J0322.4+6606_weekly_bin787.fits
Exposure cube: /lscratch/kocevski/28612559/ltcube_714960001_715564801_4FGL_J0322.4+6606_weekly_bin787.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/28612559/Model_4FGL_J0322.4+6606_weekly_bin787.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) = 86394.0802954

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    24.286       1.0000          .0000       .10000E+07
     2 'Prefactor '    1.8192       1.0000         .10000E-03   10000.    
     3 'norm      '    .39319E-03   1.0000          .0000       .10000E+07
     4 'Prefactor '    1.0120       1.0000          .0000       .10000E+07
     5 'norm      '    4.6308       1.0000          .0000       .10000E+07
     6 'norm      '    5.3180       1.0000          .0000       .10000E+07
     7 'norm      '    1.2694       1.0000          .0000       .10000E+07
     8 'Prefactor '    27.330       1.0000          .0000       .10000E+07
     9 'Prefactor '    .66613E-05   1.0000          .0000       .10000E+07
    10 'Prefactor '    2.2754       1.0000          .0000       .10000E+07
    11 'Prefactor '    5.3667       1.0000          .0000       .10000E+07
    12 'Prefactor '    12.583       1.0000          .0000       .10000E+07
    13 'Prefactor '    .22031E-04   1.0000          .0000       .10000E+07
    14 'norm      '    6.2149       1.0000          .0000       .10000E+07
    15 'norm      '    5.9070       1.0000          .0000       .10000E+07
    16 'Prefactor '    7.6862       1.0000          .0000       .10000E+07
    17 'Normalizat'    1.0252       1.0000         .10000E-01   10.000    
    18 'Prefactor '    .97535       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=   86394.06     FROM MIGRAD    STATUS=CONVERGED    100 CALLS     1287 TOTAL
                     EDM=   .17E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  3.2%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     24.567        17.178       -.11906E-06   -.10069    
   2  Prefactor     1.8204        .57749       -.47699E-06    .62296E-03
   3  norm          .11047E-07    5.5702        .98344E-06** at limit **
   4  Prefactor     1.0071        1.5901       -.10551E-06    .85876E-02
   5  norm          4.6318        .37249        .38117E-07   -.63741E-02
   6  norm          5.3280        4.5059       -.64521E-07    .15062E-02
   7  norm          1.2687        2.5487       -.10552E-05    .67092E-02
   8  Prefactor     27.650        10.036       -.89509E-07    .34322E-01
   9  Prefactor     .55511E-10    4.2374       -.51971E-06** at limit **
  10  Prefactor     2.2692        1.3906       -.92655E-07    .38547E-02
  11  Prefactor     5.4000        1.0997        .33036E-07   -.20619E-01
  12  Prefactor     12.862        6.7027       -.12709E-06    .15711    
  13  Prefactor     .27200E-08    5.0170        .84427E-07** at limit **
  14  norm          6.2031        6.0026        .23934E-07    .35405E-02
  15  norm          5.9681        1.2042        .65488E-08   -.76804E-02
  16  Prefactor     7.7056        5.1025       -.86849E-07   -.42969E-03
  17  Normalizat    1.0250        .15885       -.27805E-04    .28107E-03
  18  Prefactor     .97527        .18892E-01    .25769E-05    .54687E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 24.5666
  Prefactor  = 1.82036
  norm       = 1.10467e-08
  Prefactor  = 1.00711
  norm       = 4.63182
  norm       = 5.32801
  norm       = 1.26871
  Prefactor  = 27.6501
  Prefactor  = 5.55112e-11
  Prefactor  = 2.2692
  Prefactor  = 5.39997
  Prefactor  = 12.8615
  Prefactor  = 2.72005e-09
  norm       = 6.20313
  norm       = 5.96809
  Prefactor  = 7.70564
  Normalizat = 1.02497
  Prefactor  = 0.975271
 **********
 **   18 **HESSE 
 **********

 FCN=   86394.06     FROM HESSE     STATUS=OK           294 CALLS     1581 TOTAL
                     EDM=   .93E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     24.567        21.273        .20296E-03   -1.5609    
   2  Prefactor     1.8204        .58236        .77405E-02   -1.5438    
   3  norm          .11047E-07    5.5411        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     1.0071        1.6542        .44187E-03   -1.5688    
   5  norm          4.6318        .37361        .46747E-03   -1.5665    
   6  norm          5.3280        4.5062        .43558E-03   -1.5662    
   7  norm          1.2687        2.5955        .98745E-03   -1.5685    
   8  Prefactor     27.650        20.610        .19132E-03   -1.5603    
   9  Prefactor     .55511E-10    4.0539        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     2.2692        1.4199        .68047E-03   -1.5678    
  11  Prefactor     5.4000        12.621        .43357E-03   -1.5661    
  12  Prefactor     12.862        18.581        .28214E-03   -1.5636    
  13  Prefactor     .27200E-08    5.0261        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          6.2031        6.1157        .40244E-03   -1.5658    
  15  norm          5.9681        12.970        .41294E-03   -1.5659    
  16  Prefactor     7.7056        5.1034        .36147E-03   -1.5652    
  17  Normalizat    1.0250        .16757        .22069       -.92198    
  18  Prefactor     .97527        .19051E-01    .26878E-01   -.93558    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 9.32054e-07
Minuit parameter uncertainties:
  1  21.2728
  2  0.582363
  3  0.000495031
  4  1.65418
  5  0.373606
  6  4.50618
  7  2.59549
  8  20.6104
  9  2.40749e-05
  10  1.41988
  11  12.6215
  12  18.5812
  13  0.000232711
  14  6.11567
  15  12.9703
  16  5.10345
  17  0.167656
  18  0.0190515
Done.

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

Extracting fit parameters...

4FGL J0322.4+6606
   Spectrum: PowerLaw
326    Prefactor:  2.765e+01  2.061e+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.753e-01  1.905e-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.025e+00  1.677e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 2.25
Ra Dec: 50.615 66.110
Photon Index (Fixed Index): 2.65 +/- 0.00
Photon Flux (Fixed Index): 6.13e-08 +/- 4.57e-08
Energy Flux (Fixed Index): 1.53e-05 +/- 1.14e-05

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

Saving results to:
/lscratch/kocevski/28612559/likelihoodResults_714960001_715564801_4FGL_J0322.4+6606_weekly_bin787.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) = 86393.4060613
delta logL = 0.649358778464

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 86393.4025707
delta logL = 0.65284937949

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    10.892       1.0000          .0000       .10000E+07
     2 'Index     '    3.4109       1.0000          .0000       10.000    
     3 'Normalizat'    .99744       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .97670       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.
 MACHINE ACCURACY LIMITS FURTHER IMPROVEMENT.

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
 MIGRAD TERMINATED WITHOUT CONVERGENCE.

 FCN=   86393.40     FROM MIGRAD    STATUS=FAILED       106 CALLS      360 TOTAL
                     EDM=   .12E-04    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     10.909        167.98        .60664E-04   -.34093E-02
   2  Index         3.4102        3.6673        .95005E-02    .37870E-02
   3  Normalizat    .99738        .14758        .99640E-03   -.20245E-03
   4  Prefactor     .97670        .17797E-01    .11870E-03   -.23600E-02
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   86393.40     FROM SIMPLEX   STATUS=UNCHANGED     84 CALLS      444 TOTAL
                     EDM=   .15E-04    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     10.909        167.98        .17845E-04   -.34093E-02
   2  Index         3.4102        3.6673        .55903E-03    .37870E-02
   3  Normalizat    .99738        .14758        .12823E-03   -.20245E-03
   4  Prefactor     .97670        .17797E-01    .14630E-04   -.23600E-02
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   86393.40     FROM MIGRAD    STATUS=CONVERGED     38 CALLS      482 TOTAL
                     EDM=   .11E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     10.908        22.230        .24266E-05   -.32384E-02
   2  Index         3.4102        1.0797        .19001E-02   -.65385E-04
   3  Normalizat    .99738        .15755        .39856E-04   -.15974E-03
   4  Prefactor     .97670        .18564E-01    .47479E-05   -.19002E-02
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 10.9085
  Index      = 3.41019
  Normalizat = 0.997384
  Prefactor  = 0.9767
 **********
 **   18 **HESSE 
 **********

 FCN=   86393.40     FROM HESSE     STATUS=OK            23 CALLS      505 TOTAL
                     EDM=   .91E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     10.908        17.688        .48531E-06   -1.5642    
   2  Index         3.4102        .86162        .76004E-04   -.32358    
   3  Normalizat    .99738        .15719        .79712E-05   -.93118    
   4  Prefactor     .97670        .18504E-01    .94959E-06   -.93510    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 9.05641e-11
Minuit parameter uncertainties:
  1  17.688
  2  0.866438
  3  0.157259
  4  0.0185041
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) = 86393.4025702
delta logL = 0.652849934282

Extracting fit parameters...

4FGL J0322.4+6606
   Spectrum: PowerLaw
326    Prefactor:  1.091e+01  1.769e+01  0.000e+00  1.000e+06 ( 1.000e-13)
327        Index:  3.410e+00  8.664e-01  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.767e-01  1.850e-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:  9.974e-01  1.573e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 3.64
Ra Dec: 50.615 66.110
Photon Index (Free Index): 3.41 +/- 0.87
Photon Flux (Free Index): 8.96e-08 +/- 5.10e-08
Energy Flux (Free Index): 1.53e-05 +/- 9.22e-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/28612559/cmap_HighResolution_714960001_715564801_4FGL_J0322.4+6606_weekly_bin787.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.09e-02', comment='SUCCESS', photon_flux='6.13e-08', energy_flux2='1.53e-05', photon_flux_error='4.57e-08', dlogl='6.53e-01', energy_flux='1.53e-05', photon_flux2='8.96e-08', job_status='DONE', time_completed='2023-09-19 22:05:21.440578', photon_index_error2='0.87', photon_index2='3.41', ts='2.25', fit_tolerance='1e-08', GAL='0.98', photon_index_error='0.00', photon_flux_upper_limit='1.39e-07', energy_flux_error2='9.22e-06', EG='1.02', time_epoch_completed='1695186321.44', return_code='0', job_id='28612559', GAL2='0.98', EG2='1.00', return_code2='0', energy_flux_error='1.14e-05', photon_flux_error2='5.10e-08', ts2='3.64', photon_index='2.65' WHERE bin_id='787' AND source_name='4FGL J0322.4+6606' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Sep 19 22:05:21 PDT 2023

