/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_J0128.5+4440_weekly_bin906
RA = 22.1438, Dec = 44.6777
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='17371931', job_status='RUN', time_executed='2025-12-16 00:52:37.213827', time_epoch_executed='1765875157.21' WHERE source_name='4FGL J0128.5+4440' and cadence='weekly' and bin_id='906'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/17371931

Creating custom pfile directory:
/lscratch/kocevski/17371931/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/17371931/ft1_4FGL_J0128.5+4440_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/17371931/ft2_4FGL_J0128.5+4440_weekly_bin906.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/17371931/ft1_4FGL_J0128.5+4440_weekly_bin906.fits outfile=/lscratch/kocevski/17371931/ft1_filteredMKT_4FGL_J0128.5+4440_weekly_bin906.fits ra=22.1438 dec=44.6777 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 5.21
user 4.40
sys 0.25

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/17371931/ft2_4FGL_J0128.5+4440_weekly_bin906.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/17371931/ft2_4FGL_J0128.5+4440_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/17371931/ft1_filteredMKT_4FGL_J0128.5+4440_weekly_bin906.fits evtable="EVENTS" outfile="/lscratch/kocevski/17371931/ft1_filtered_4FGL_J0128.5+4440_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 0.84
user 0.25
sys 0.13

Number of photons that the gtmktime cut: 2530

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/17371931/ft1_filtered_4FGL_J0128.5+4440_weekly_bin906.fits" evtable="EVENTS" scfile=/lscratch/kocevski/17371931/ft2_4FGL_J0128.5+4440_weekly_bin906.fits sctable="SC_DATA" outfile=/lscratch/kocevski/17371931/ltcube_786931201_787536001_4FGL_J0128.5+4440_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/17371931/ft2_4FGL_J0128.5+4440_weekly_bin906.fits
.....................!
real 16.54
user 15.69
sys 0.23

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/17371931/ft1_filtered_4FGL_J0128.5+4440_weekly_bin906.fits evtable="EVENTS" scfile=/lscratch/kocevski/17371931/ft2_4FGL_J0128.5+4440_weekly_bin906.fits sctable="SC_DATA" expcube=/lscratch/kocevski/17371931/ltcube_786931201_787536001_4FGL_J0128.5+4440_weekly_bin906.fits outfile=/lscratch/kocevski/17371931/expmap_786931201_787536001_4FGL_J0128.5+4440_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/17371931/ltcube_786931201_787536001_4FGL_J0128.5+4440_weekly_bin906.fits
.....................!
real 60.04
user 55.46
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 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.
Added 171 point sources and 2 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 J0128.5+4440 @ 22.1438 44.6777

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/17371931/ft1_filtered_4FGL_J0128.5+4440_weekly_bin906.fits scfile=/lscratch/kocevski/17371931/ft2_4FGL_J0128.5+4440_weekly_bin906.fits outfile=/lscratch/kocevski/17371931/cmap_786931201_787536001_4FGL_J0128.5+4440_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=22.1438 yref=44.6777 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 2.10
user 0.22
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/17371931/ft1_filtered_4FGL_J0128.5+4440_weekly_bin906.fits scfile=/lscratch/kocevski/17371931/ft2_4FGL_J0128.5+4440_weekly_bin906.fits outfile=/lscratch/kocevski/17371931/cmap_HighResolution_786931201_787536001_4FGL_J0128.5+4440_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=22.1438 yref=44.6777 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.93
user 0.22
sys 0.12

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/17371931/ft1_filtered_4FGL_J0128.5+4440_weekly_bin906.fits evtable="EVENTS" scfile=/lscratch/kocevski/17371931/ft2_4FGL_J0128.5+4440_weekly_bin906.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/17371931/Model_4FGL_J0128.5+4440_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 GAL_V02
adding source HB 3
adding source W 3
Working on...
/lscratch/kocevski/17371931/ft1_filtered_4FGL_J0128.5+4440_weekly_bin906.fits.....................!
real 89.78
user 88.11
sys 0.59

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/17371931/ft1_filtered_4FGL_J0128.5+4440_weekly_bin906.fits', '/lscratch/kocevski/17371931/ft2_4FGL_J0128.5+4440_weekly_bin906.fits', expMap='/lscratch/kocevski/17371931/expmap_786931201_787536001_4FGL_J0128.5+4440_weekly_bin906.fits', expCube='/lscratch/kocevski/17371931/ltcube_786931201_787536001_4FGL_J0128.5+4440_weekly_bin906.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/17371931/Model_4FGL_J0128.5+4440_weekly_bin906.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J0128.5+4440'

4FGL J0128.5+4440
   Spectrum: PowerLaw
246    Prefactor:  2.926e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-14)
247        Index:  2.132e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
248        Scale:  2.341e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/17371931/ft1_filtered_4FGL_J0128.5+4440_weekly_bin906.fits
Spacecraft file(s): /lscratch/kocevski/17371931/ft2_4FGL_J0128.5+4440_weekly_bin906.fits
Exposure map: /lscratch/kocevski/17371931/expmap_786931201_787536001_4FGL_J0128.5+4440_weekly_bin906.fits
Exposure cube: /lscratch/kocevski/17371931/ltcube_786931201_787536001_4FGL_J0128.5+4440_weekly_bin906.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/17371931/Model_4FGL_J0128.5+4440_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) = 26212.5283857

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    2.1003       1.0000          .0000       .10000E+07
     2 'Prefactor '    .11889E-03   1.0000          .0000       .10000E+07
     3 'Prefactor '    .10087E-03   1.0000          .0000       .10000E+07
     4 'Prefactor '    5.9313       1.0000          .0000       .10000E+07
     5 'Prefactor '    3.5953       1.0000          .0000       .10000E+07
     6 'Prefactor '    .49571E-06   1.0000          .0000       .10000E+07
     7 'norm      '    1.7215       1.0000          .0000       .10000E+07
     8 'Prefactor '    .34022E-03   1.0000          .0000       .10000E+07
     9 'norm      '    2.4962       1.0000          .0000       .10000E+07
    10 'Prefactor '    32.812       1.0000          .0000       .10000E+07
    11 'norm      '    1.4363       1.0000          .0000       .10000E+07
    12 'norm      '    .52736E-08   1.0000          .0000       .10000E+07
    13 'Prefactor '    1.7945       1.0000          .0000       .10000E+07
    14 'Prefactor '    .18968E-05   1.0000          .0000       .10000E+07
    15 'Prefactor '    33.341       1.0000          .0000       .10000E+07
    16 'norm      '    .81948       1.0000          .0000       .10000E+07
    17 'Normalizat'    .83434       1.0000         .10000E-01   10.000    
    18 'Prefactor '    .98869       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5820E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   26212.52     FROM MIGRAD    STATUS=CONVERGED    102 CALLS     1365 TOTAL
                     EDM=   .80E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .8%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     2.0992        1.6671        .10302E-06   -.93759E-03
   2  Prefactor     .14828E-05    10.293       -.56766E-06** at limit **
   3  Prefactor     .12556E-05    11.630       -.55487E-06** at limit **
   4  Prefactor     5.9305        1.0227       -.61513E-08    .29041E-01
   5  Prefactor     3.5944        3.0145       -.58190E-08    .96137E-03
   6  Prefactor      .0000        1.0171       -.24408E-06** at limit **
   7  norm          1.9395        14.092       -.61686E-06   -.56792E-03
   8  Prefactor     .38858E-09    10.867       -.69810E-06** at limit **
   9  norm          2.4968        1.4902       -.26895E-07   -.16614E-02
  10  Prefactor     32.823        1.0490       -.23206E-08    .18369    
  11  norm          1.4366        .64661        .21548E-07    .90167E-04
  12  norm           .0000        .27143       -.62608E-07** at limit **
  13  Prefactor     1.8010        3.5468        .12026E-07    .35854E-03
  14  Prefactor      .0000        1.7554       -.96478E-08** at limit **
  15  Prefactor     33.403        1.0447        .44607E-08    .47472E-03
  16  norm          .81946        .20445        .17475E-07   -.69476E-02
  17  Normalizat    .83433        .11556        .33671E-05    .10019E-04
  18  Prefactor     .98865        .47360E-01   -.68809E-06   -.23208E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 2.0992
  Prefactor  = 1.48281e-06
  Prefactor  = 1.25555e-06
  Prefactor  = 5.93051
  Prefactor  = 3.59439
  Prefactor  = 0
  norm       = 1.93949
  Prefactor  = 3.88578e-10
  norm       = 2.49679
  Prefactor  = 32.8233
  norm       = 1.4366
  norm       = 0
  Prefactor  = 1.80097
  Prefactor  = 0
  Prefactor  = 33.4029
  norm       = 0.819462
  Normalizat = 0.834329
  Prefactor  = 0.988655
 **********
 **   18 **HESSE 
 **********

 FCN=   26212.52     FROM HESSE     STATUS=OK           292 CALLS     1657 TOTAL
                     EDM=   .90E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     2.0992        1.6768        .71182E-03   -1.5679    
   2  Prefactor     .14828E-05    22.401        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .12556E-05    21.242        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     5.9305        14.358        .41208E-03   -1.5659    
   5  Prefactor     3.5944        3.0197        .53267E-03   -1.5670    
   6  Prefactor      .0000        1.0214        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  norm          1.9395        13.267        .80030E-03   -1.5680    
   8  Prefactor     .38858E-09    10.822        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          2.4968        1.4949        .64662E-03   -1.5676    
  10  Prefactor     32.823        22.270        .17460E-03   -1.5593    
  11  norm          1.4366        .64721        .90031E-03   -1.5684    
  12  norm           .0000        .13071        .19625E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     1.8010        3.6193        .78033E-03   -1.5681    
  14  Prefactor      .0000        1.7297        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     33.403        27.599        .17321E-03   -1.5592    
  16  norm          .81946        .20605        .51494E-03   -1.5690    
  17  Normalizat    .83433        .10942        .88207E-01   -.98808    
  18  Prefactor     .98865        .43807E-01    .33814E-01   -.93109    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 8.98831e-07
Minuit parameter uncertainties:
  1  1.67684
  2  0.0115267
  3  0.0103288
  4  14.3581
  5  3.01974
  6  2.41401e-06
  7  10.145
  8  0.000128284
  9  1.49487
  10  22.27
  11  0.647213
  12  9.67661e-07
  13  3.61931
  14  4.40722e-06
  15  27.5988
  16  0.206049
  17  0.109451
  18  0.0438084
Done.

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

Extracting fit parameters...

4FGL J0128.5+4440
   Spectrum: PowerLaw
246    Prefactor:  3.282e+01  2.227e+01  0.000e+00  1.000e+06 ( 1.000e-14)
247        Index:  2.132e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
248        Scale:  2.341e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
571    Prefactor:  9.887e-01  4.381e-02  0.000e+00  1.000e+01 ( 1.000e+00)
572        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
573        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
570   Normalization:  8.343e-01  1.095e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 3.88
Ra Dec: 22.144 44.678
Photon Index (Fixed Index): 2.13 +/- 0.00
Photon Flux (Fixed Index): 2.41e-08 +/- 1.63e-08
Energy Flux (Fixed Index): 1.24e-05 +/- 8.39e-06

TS (Fixed Index): 3.88
Ra Dec: 22.144 44.678
Photon Flux Upper Limit: 5.8813192684e-08 ph cm-2 s-1
Energy Flux Upper Limit: 0.00445787762102 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/17371931/likelihoodResults_786931201_787536001_4FGL_J0128.5+4440_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) = 26211.8561283
delta logL = 0.666634576388

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 26211.8266698
delta logL = 0.696093130438

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   26211.83     FROM MIGRAD    STATUS=CONVERGED     66 CALLS      285 TOTAL
                     EDM=   .17E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     12.854        73.474        .27903E-03    .24309E-02
   2  Index         2.8121        1.3222        .14030        .57368E-03
   3  Normalizat    .80202        .36524E-01    .89797E-01    .71093E-04
   4  Prefactor     .99499        .13702E-01    .33715E-01   -.42770E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 12.8539
  Index      = 2.81212
  Normalizat = 0.802017
  Prefactor  = 0.994991
 **********
 **   18 **HESSE 
 **********

 FCN=   26211.83     FROM HESSE     STATUS=OK            33 CALLS      318 TOTAL
                     EDM=   .40E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     12.854        104.66        .11161E-04   -1.5636    
   2  Index         2.8121        2.4282        .49520E-02   -.45290    
   3  Normalizat    .80202        .14465        .39776E-03   -.99994    
   4  Prefactor     .99499        .52423E-01    .14898E-03   -.92897    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.95582e-09
Minuit parameter uncertainties:
  1  73.3574
  2  2.56511
  3  0.144715
  4  0.0524261
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) = 26211.8266694
delta logL = 0.69609350957

Extracting fit parameters...

4FGL J0128.5+4440
   Spectrum: PowerLaw
246    Prefactor:  1.285e+01  7.336e+01  0.000e+00  1.000e+06 ( 1.000e-14)
247        Index:  2.812e+00  2.565e+00  0.000e+00  1.000e+01 (-1.000e+00)
248        Scale:  2.341e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
571    Prefactor:  9.950e-01  5.243e-02  0.000e+00  1.000e+01 ( 1.000e+00)
572        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
573        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
570   Normalization:  8.020e-01  1.447e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 5.40
Ra Dec: 22.144 44.678
Photon Index (Free Index): 2.81 +/- 2.57
Photon Flux (Free Index): 5.04e-08 +/- 5.63e-08
Energy Flux (Free Index): 1.12e-05 +/- 9.66e-06

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/17371931/cmap_HighResolution_786931201_787536001_4FGL_J0128.5+4440_weekly_bin906.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='4.46e-03', comment='SUCCESS', photon_flux='2.41e-08', energy_flux2='1.12e-05', photon_flux_error='1.63e-08', dlogl='6.96e-01', energy_flux='1.24e-05', photon_flux2='5.04e-08', job_status='DONE', time_completed='2025-12-16 01:06:53.287631', photon_index_error2='2.57', photon_index2='2.81', ts='3.88', fit_tolerance='1e-08', GAL='0.99', photon_index_error='0.00', photon_flux_upper_limit='5.88e-08', energy_flux_error2='9.66e-06', EG='0.83', time_epoch_completed='1765876013.29', return_code='0', job_id='17371931', GAL2='0.99', EG2='0.80', return_code2='0', energy_flux_error='8.39e-06', photon_flux_error2='5.63e-08', ts2='5.40', photon_index='2.13' WHERE bin_id='906' AND source_name='4FGL J0128.5+4440' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Dec 16 01:06:53 PST 2025

