/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_J0138.0+2247_weekly_bin906
RA = 24.5063, Dec = 22.7962
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='17371941', job_status='RUN', time_executed='2025-12-16 00:52:56.974251', time_epoch_executed='1765875176.97' WHERE source_name='4FGL J0138.0+2247' and cadence='weekly' and bin_id='906'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/17371941

Creating custom pfile directory:
/lscratch/kocevski/17371941/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/17371941/ft1_4FGL_J0138.0+2247_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/17371941/ft2_4FGL_J0138.0+2247_weekly_bin906.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/17371941/ft1_4FGL_J0138.0+2247_weekly_bin906.fits outfile=/lscratch/kocevski/17371941/ft1_filteredMKT_4FGL_J0138.0+2247_weekly_bin906.fits ra=24.5063 dec=22.7962 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.95
user 5.17
sys 0.24

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/17371941/ft2_4FGL_J0138.0+2247_weekly_bin906.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/17371941/ft2_4FGL_J0138.0+2247_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/17371941/ft1_filteredMKT_4FGL_J0138.0+2247_weekly_bin906.fits evtable="EVENTS" outfile="/lscratch/kocevski/17371941/ft1_filtered_4FGL_J0138.0+2247_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.07
user 0.21
sys 0.14

Number of photons that the gtmktime cut: 1598

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/17371941/ft1_filtered_4FGL_J0138.0+2247_weekly_bin906.fits" evtable="EVENTS" scfile=/lscratch/kocevski/17371941/ft2_4FGL_J0138.0+2247_weekly_bin906.fits sctable="SC_DATA" outfile=/lscratch/kocevski/17371941/ltcube_786931201_787536001_4FGL_J0138.0+2247_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/17371941/ft2_4FGL_J0138.0+2247_weekly_bin906.fits
.....................!
real 19.39
user 18.25
sys 0.25

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/17371941/ft1_filtered_4FGL_J0138.0+2247_weekly_bin906.fits evtable="EVENTS" scfile=/lscratch/kocevski/17371941/ft2_4FGL_J0138.0+2247_weekly_bin906.fits sctable="SC_DATA" expcube=/lscratch/kocevski/17371941/ltcube_786931201_787536001_4FGL_J0138.0+2247_weekly_bin906.fits outfile=/lscratch/kocevski/17371941/expmap_786931201_787536001_4FGL_J0138.0+2247_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/17371941/ltcube_786931201_787536001_4FGL_J0138.0+2247_weekly_bin906.fits
.....................!
real 72.20
user 67.32
sys 4.03

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
Added 169 point sources and 0 extended sources

Setting source of interest to:
4FGL J0138.0+2247 @ 24.5063 22.7962

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/17371941/ft1_filtered_4FGL_J0138.0+2247_weekly_bin906.fits scfile=/lscratch/kocevski/17371941/ft2_4FGL_J0138.0+2247_weekly_bin906.fits outfile=/lscratch/kocevski/17371941/cmap_786931201_787536001_4FGL_J0138.0+2247_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=24.5063 yref=22.7962 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.06
user 0.25
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/17371941/ft1_filtered_4FGL_J0138.0+2247_weekly_bin906.fits scfile=/lscratch/kocevski/17371941/ft2_4FGL_J0138.0+2247_weekly_bin906.fits outfile=/lscratch/kocevski/17371941/cmap_HighResolution_786931201_787536001_4FGL_J0138.0+2247_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=24.5063 yref=22.7962 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.00
user 0.25
sys 0.13

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/17371941/ft1_filtered_4FGL_J0138.0+2247_weekly_bin906.fits evtable="EVENTS" scfile=/lscratch/kocevski/17371941/ft2_4FGL_J0138.0+2247_weekly_bin906.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/17371941/Model_4FGL_J0138.0+2247_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
Working on...
/lscratch/kocevski/17371941/ft1_filtered_4FGL_J0138.0+2247_weekly_bin906.fits.....................!
real 69.42
user 67.35
sys 1.02

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/17371941/ft1_filtered_4FGL_J0138.0+2247_weekly_bin906.fits', '/lscratch/kocevski/17371941/ft2_4FGL_J0138.0+2247_weekly_bin906.fits', expMap='/lscratch/kocevski/17371941/expmap_786931201_787536001_4FGL_J0138.0+2247_weekly_bin906.fits', expCube='/lscratch/kocevski/17371941/ltcube_786931201_787536001_4FGL_J0138.0+2247_weekly_bin906.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/17371941/Model_4FGL_J0138.0+2247_weekly_bin906.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J0138.0+2247'

4FGL J0138.0+2247
   Spectrum: PowerLaw
257    Prefactor:  5.231e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-14)
258        Index:  2.006e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
259        Scale:  2.764e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/17371941/ft1_filtered_4FGL_J0138.0+2247_weekly_bin906.fits
Spacecraft file(s): /lscratch/kocevski/17371941/ft2_4FGL_J0138.0+2247_weekly_bin906.fits
Exposure map: /lscratch/kocevski/17371941/expmap_786931201_787536001_4FGL_J0138.0+2247_weekly_bin906.fits
Exposure cube: /lscratch/kocevski/17371941/ltcube_786931201_787536001_4FGL_J0138.0+2247_weekly_bin906.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/17371941/Model_4FGL_J0138.0+2247_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) = 17136.5120779

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .46529       1.0000          .0000       .10000E+07
     2 'norm      '    1.5133       1.0000          .0000       .10000E+07
     3 'norm      '    .19162E-06   1.0000          .0000       .10000E+07
     4 'Prefactor '    10.999       1.0000          .0000       .10000E+07
     5 'Prefactor '    7.5170       1.0000          .0000       .10000E+07
     6 'Prefactor '    1.3965       1.0000          .0000       .10000E+07
     7 'Prefactor '    .93991E-04   1.0000          .0000       .10000E+07
     8 'Prefactor '    17.941       1.0000          .0000       .10000E+07
     9 'norm      '    .91167       1.0000          .0000       .10000E+07
    10 'Prefactor '    12.191       1.0000          .0000       .10000E+07
    11 'Prefactor '    .11772E-03   1.0000          .0000       .10000E+07
    12 'norm      '    .18188E-04   1.0000          .0000       .10000E+07
    13 'Prefactor '    1.8390       1.0000          .0000       .10000E+07
    14 'Prefactor '    .81978E-03   1.0000          .0000       .10000E+07
    15 'Prefactor '    .38708E-06   1.0000          .0000       .10000E+07
    16 'norm      '    39.369       1.0000          .0000       .10000E+07
    17 'Prefactor '    21.501       1.0000          .0000       .10000E+07
    18 'Prefactor '    .68573E-04   1.0000          .0000       .10000E+07
    19 'Normalizat'    1.1651       1.0000         .10000E-01   10.000    
    20 'Prefactor '    .88113       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5370E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   17136.49     FROM MIGRAD    STATUS=CONVERGED    125 CALLS     1523 TOTAL
                     EDM=   .44E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .9%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .33098        19.656        .93448E-08    .16649E-01
   2  norm          1.5133        .42733       -.78483E-08   -.97071E-02
   3  norm           .0000        .62777        .43426E-07** at limit **
   4  Prefactor     11.006        6.0031        .76124E-08    .93131E-03
   5  Prefactor     7.5661        1.9776       -.18085E-07    .20238E-01
   6  Prefactor     1.3935        2.6614        .49887E-07    .11636E-02
   7  Prefactor     .74163E-07    11.739        .13407E-06** at limit **
   8  Prefactor     18.508        7.6347       -.32491E-07    .81813E-01
   9  norm          .91132        .37082        .66782E-08    .79014E-02
  10  Prefactor     12.191        6.5709       -.72182E-08    .11811E-02
  11  Prefactor      .0000        3.7089        .10764E-07** at limit **
  12  norm           .0000        1.4276        .31565E-07** at limit **
  13  Prefactor     1.8389        1.4286        .21007E-07    .38328E-02
  14  Prefactor     .14877E-07    28.203        .46400E-06** at limit **
  15  Prefactor      .0000        .80775        .61845E-08** at limit **
  16  norm          39.409        1.6047       -.35583E-08   -.38457E-01
  17  Prefactor     20.970        12.353        .10274E-06    .15451E-01
  18  Prefactor     .57732E-08    7.0119        .22838E-08** at limit **
  19  Normalizat    1.1654        .13968       -.49708E-06   -.30864E-05
  20  Prefactor     .88111        .85089E-01    .32553E-06    .66383E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.330979
  norm       = 1.51326
  norm       = 0
  Prefactor  = 11.0061
  Prefactor  = 7.56606
  Prefactor  = 1.39346
  Prefactor  = 7.41629e-08
  Prefactor  = 18.5084
  norm       = 0.911321
  Prefactor  = 12.1909
  Prefactor  = 0
  norm       = 0
  Prefactor  = 1.83894
  Prefactor  = 1.4877e-08
  Prefactor  = 0
  norm       = 39.4085
  Prefactor  = 20.9698
  Prefactor  = 5.77316e-09
  Normalizat = 1.16539
  Prefactor  = 0.881111
 **********
 **   18 **HESSE 
 **********

 FCN=   17136.49     FROM HESSE     STATUS=OK           349 CALLS     1872 TOTAL
                     EDM=   .21E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .33098        3.3561        .82281E-02   -1.5696    
   2  norm          1.5133        .43108        .86890E-03   -1.5683    
   3  norm           .0000        .24340        .21989E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     11.006        6.0078        .30184E-03   -1.5642    
   5  Prefactor     7.5661        28.193        .36555E-03   -1.5653    
   6  Prefactor     1.3935        3.1925        .91840E-03   -1.5684    
   7  Prefactor     .74163E-07    12.173        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     18.508        16.864        .23619E-03   -1.5622    
   9  norm          .91132        .37180        .44957E-03   -1.5689    
  10  Prefactor     12.191        6.5815        .28664E-03   -1.5638    
  11  Prefactor      .0000        3.7381        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm           .0000        1.4179        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     1.8389        1.4457        .76897E-03   -1.5681    
  14  Prefactor     .14877E-07    2.0421        .58761E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor      .0000        .81234        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          39.409        35.909        .15939E-03   -1.5582    
  17  Prefactor     20.970        26.176        .21572E-03   -1.5616    
  18  Prefactor     .57732E-08    7.1075        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Normalizat    1.1654        .12168        .62903E-01   -.87679    
  20  Prefactor     .88111        .72959E-01    .44764E-01   -.96804    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.11332e-07
Minuit parameter uncertainties:
  1  2.1079
  2  0.431075
  3  3.36701e-06
  4  6.00784
  5  28.1939
  6  3.19246
  7  0.00190021
  8  16.8637
  9  0.371805
  10  6.58151
  11  1.95906e-05
  12  6.78262e-06
  13  1.44566
  14  0.000348818
  15  2.59787e-06
  16  35.9087
  17  26.1761
  18  0.000404379
  19  0.121714
  20  0.0729668
Done.

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

Extracting fit parameters...

4FGL J0138.0+2247
   Spectrum: PowerLaw
257    Prefactor:  1.851e+01  1.686e+01  0.000e+00  1.000e+06 ( 1.000e-14)
258        Index:  2.006e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
259        Scale:  2.764e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
534    Prefactor:  8.811e-01  7.297e-02  0.000e+00  1.000e+01 ( 1.000e+00)
535        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
536        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
533   Normalization:  1.165e+00  1.217e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 2.11
Ra Dec: 24.506 22.796
Photon Index (Fixed Index): 2.01 +/- 0.00
Photon Flux (Fixed Index): 1.43e-08 +/- 1.31e-08
Energy Flux (Fixed Index): 9.76e-06 +/- 8.89e-06

TS (Fixed Index): 2.11
Ra Dec: 24.506 22.796
Photon Flux Upper Limit: 4.59345779969e-08 ph cm-2 s-1
Energy Flux Upper Limit: 0.00344690776849 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/17371941/likelihoodResults_786931201_787536001_4FGL_J0138.0+2247_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) = 17136.313799
delta logL = 0.17337727853

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 17136.305658
delta logL = 0.181518293579

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    23.582       1.0000          .0000       .10000E+07
     2 'Index     '    1.6125       1.0000          .0000       10.000    
     3 'Normalizat'    1.1704       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .88049       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5370E+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=   17136.31     FROM MIGRAD    STATUS=CONVERGED     82 CALLS      295 TOTAL
                     EDM=   .36E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     23.584        21.631        .82390E-05   -.63816E-02
   2  Index         1.6123        .62210        .11497E-01   -.31194E-03
   3  Normalizat    1.1705        .13734        .27772E-03    .42196E-03
   4  Prefactor     .88044        .85180E-01    .19434E-03    .71653E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 23.5841
  Index      = 1.61228
  Normalizat = 1.17051
  Prefactor  = 0.880438
 **********
 **   18 **HESSE 
 **********

 FCN=   17136.31     FROM HESSE     STATUS=OK            23 CALLS      318 TOTAL
                     EDM=   .38E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     23.584        21.573        .16478E-05   -1.5611    
   2  Index         1.6123        .62062        .45989E-03   -.74442    
   3  Normalizat    1.1705        .13743        .11109E-04   -.87519    
   4  Prefactor     .88044        .85251E-01    .38869E-04   -.96828    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.76316e-09
Minuit parameter uncertainties:
  1  21.5728
  2  0.623601
  3  0.137475
  4  0.0852641
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) = 17136.3056577
delta logL = 0.181518501711

Extracting fit parameters...

4FGL J0138.0+2247
   Spectrum: PowerLaw
257    Prefactor:  2.358e+01  2.157e+01  0.000e+00  1.000e+06 ( 1.000e-14)
258        Index:  1.612e+00  6.236e-01  0.000e+00  1.000e+01 (-1.000e+00)
259        Scale:  2.764e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
534    Prefactor:  8.804e-01  8.526e-02  0.000e+00  1.000e+01 ( 1.000e+00)
535        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
536        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
533   Normalization:  1.171e+00  1.375e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 2.48
Ra Dec: 24.506 22.796
Photon Index (Free Index): 1.61 +/- 0.62
Photon Flux (Free Index): 8.01e-09 +/- 1.13e-08
Energy Flux (Free Index): 1.74e-05 +/- 2.34e-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/17371941/cmap_HighResolution_786931201_787536001_4FGL_J0138.0+2247_weekly_bin906.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='3.45e-03', comment='SUCCESS', photon_flux='1.43e-08', energy_flux2='1.74e-05', photon_flux_error='1.31e-08', dlogl='1.82e-01', energy_flux='9.76e-06', photon_flux2='8.01e-09', job_status='DONE', time_completed='2025-12-16 01:06:24.810794', photon_index_error2='0.62', photon_index2='1.61', ts='2.11', fit_tolerance='1e-08', GAL='0.88', photon_index_error='0.00', photon_flux_upper_limit='4.59e-08', energy_flux_error2='2.34e-05', EG='1.17', time_epoch_completed='1765875984.81', return_code='0', job_id='17371941', GAL2='0.88', EG2='1.17', return_code2='0', energy_flux_error='8.89e-06', photon_flux_error2='1.13e-08', ts2='2.48', photon_index='2.01' WHERE bin_id='906' AND source_name='4FGL J0138.0+2247' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Dec 16 01:06:25 PST 2025

