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


Performing analysis on: 4FGL_J1738.2+4000_weekly_bin906
RA = 264.56, Dec = 40.0099
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='17380088', job_status='RUN', time_executed='2025-12-16 02:55:14.769108', time_epoch_executed='1765882514.77' WHERE source_name='4FGL J1738.2+4000' and cadence='weekly' and bin_id='906'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/17380088

Creating custom pfile directory:
/lscratch/kocevski/17380088/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/17380088/ft1_4FGL_J1738.2+4000_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/17380088/ft2_4FGL_J1738.2+4000_weekly_bin906.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/17380088/ft1_4FGL_J1738.2+4000_weekly_bin906.fits outfile=/lscratch/kocevski/17380088/ft1_filteredMKT_4FGL_J1738.2+4000_weekly_bin906.fits ra=264.56 dec=40.0099 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.41
user 4.56
sys 0.27

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/17380088/ft2_4FGL_J1738.2+4000_weekly_bin906.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/17380088/ft2_4FGL_J1738.2+4000_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/17380088/ft1_filteredMKT_4FGL_J1738.2+4000_weekly_bin906.fits evtable="EVENTS" outfile="/lscratch/kocevski/17380088/ft1_filtered_4FGL_J1738.2+4000_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.93
user 0.19
sys 0.14

Number of photons that the gtmktime cut: 1862

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/17380088/ft1_filtered_4FGL_J1738.2+4000_weekly_bin906.fits" evtable="EVENTS" scfile=/lscratch/kocevski/17380088/ft2_4FGL_J1738.2+4000_weekly_bin906.fits sctable="SC_DATA" outfile=/lscratch/kocevski/17380088/ltcube_786931201_787536001_4FGL_J1738.2+4000_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/17380088/ft2_4FGL_J1738.2+4000_weekly_bin906.fits
.....................!
real 16.81
user 15.96
sys 0.24

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/17380088/ft1_filtered_4FGL_J1738.2+4000_weekly_bin906.fits evtable="EVENTS" scfile=/lscratch/kocevski/17380088/ft2_4FGL_J1738.2+4000_weekly_bin906.fits sctable="SC_DATA" expcube=/lscratch/kocevski/17380088/ltcube_786931201_787536001_4FGL_J1738.2+4000_weekly_bin906.fits outfile=/lscratch/kocevski/17380088/expmap_786931201_787536001_4FGL_J1738.2+4000_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/17380088/ltcube_786931201_787536001_4FGL_J1738.2+4000_weekly_bin906.fits
.....................!
real 65.02
user 60.77
sys 3.39

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

Setting source of interest to:
4FGL J1738.2+4000 @ 264.56 40.0099

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/17380088/ft1_filtered_4FGL_J1738.2+4000_weekly_bin906.fits scfile=/lscratch/kocevski/17380088/ft2_4FGL_J1738.2+4000_weekly_bin906.fits outfile=/lscratch/kocevski/17380088/cmap_786931201_787536001_4FGL_J1738.2+4000_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=264.56 yref=40.0099 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.99
user 0.24
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/17380088/ft1_filtered_4FGL_J1738.2+4000_weekly_bin906.fits scfile=/lscratch/kocevski/17380088/ft2_4FGL_J1738.2+4000_weekly_bin906.fits outfile=/lscratch/kocevski/17380088/cmap_HighResolution_786931201_787536001_4FGL_J1738.2+4000_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=264.56 yref=40.0099 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.97
user 0.24
sys 0.13

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/17380088/ft1_filtered_4FGL_J1738.2+4000_weekly_bin906.fits evtable="EVENTS" scfile=/lscratch/kocevski/17380088/ft2_4FGL_J1738.2+4000_weekly_bin906.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/17380088/Model_4FGL_J1738.2+4000_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/17380088/ft1_filtered_4FGL_J1738.2+4000_weekly_bin906.fits.....................!
real 56.75
user 54.56
sys 1.32

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/17380088/ft1_filtered_4FGL_J1738.2+4000_weekly_bin906.fits', '/lscratch/kocevski/17380088/ft2_4FGL_J1738.2+4000_weekly_bin906.fits', expMap='/lscratch/kocevski/17380088/expmap_786931201_787536001_4FGL_J1738.2+4000_weekly_bin906.fits', expCube='/lscratch/kocevski/17380088/ltcube_786931201_787536001_4FGL_J1738.2+4000_weekly_bin906.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/17380088/Model_4FGL_J1738.2+4000_weekly_bin906.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1738.2+4000'

4FGL J1738.2+4000
   Spectrum: PowerLaw
326    Prefactor:  6.394e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-14)
327        Index:  2.517e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
328        Scale:  1.525e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/17380088/ft1_filtered_4FGL_J1738.2+4000_weekly_bin906.fits
Spacecraft file(s): /lscratch/kocevski/17380088/ft2_4FGL_J1738.2+4000_weekly_bin906.fits
Exposure map: /lscratch/kocevski/17380088/expmap_786931201_787536001_4FGL_J1738.2+4000_weekly_bin906.fits
Exposure cube: /lscratch/kocevski/17380088/ltcube_786931201_787536001_4FGL_J1738.2+4000_weekly_bin906.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/17380088/Model_4FGL_J1738.2+4000_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) = 19520.4766904

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    5.0033       1.0000          .0000       .10000E+07
     2 'Prefactor '    .46088       1.0000          .0000       .10000E+07
     3 'Prefactor '    2.6882       1.0000          .0000       .10000E+07
     4 'Prefactor '    .62395E-07   1.0000          .0000       .10000E+07
     5 'norm      '    2.9743       1.0000          .0000       .10000E+07
     6 'norm      '    .12879E-07   1.0000          .0000       .10000E+07
     7 'Prefactor '    .46346E-06   1.0000          .0000       .10000E+07
     8 'norm      '    .39212       1.0000          .0000       .10000E+07
     9 'norm      '    .32612E-05   1.0000          .0000       .10000E+07
    10 'norm      '    3.0395       1.0000          .0000       .10000E+07
    11 'Prefactor '    6.3182       1.0000          .0000       .10000E+07
    12 'norm      '    5.3923       1.0000          .0000       .10000E+07
    13 'Prefactor '    37.969       1.0000          .0000       .10000E+07
    14 'Prefactor '    60.558       1.0000          .0000       .10000E+07
    15 'norm      '    11.718       1.0000          .0000       .10000E+07
    16 'Prefactor '    8.1460       1.0000          .0000       .10000E+07
    17 'Prefactor '    3.4803       1.0000          .0000       .10000E+07
    18 'Prefactor '    7.2088       1.0000          .0000       .10000E+07
    19 'Prefactor '    14.018       1.0000          .0000       .10000E+07
    20 'Prefactor '    .36399E-05   1.0000          .0000       .10000E+07
    21 'norm      '    1.1763       1.0000          .0000       .10000E+07
    22 'norm      '    25.509       1.0000          .0000       .10000E+07
    23 'norm      '    .83366       1.0000          .0000       .10000E+07
    24 'Prefactor '    5.1392       1.0000          .0000       .10000E+07
    25 'Prefactor '    6.4560       1.0000          .0000       .10000E+07
    26 'Normalizat'    1.2581       1.0000         .10000E-01   10.000    
    27 'Prefactor '    .75763       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6840E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   19520.47     FROM MIGRAD    STATUS=CONVERGED    161 CALLS     2365 TOTAL
                     EDM=   .12E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.9%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          5.1160        15.171       -.57942E-05   -.22237E-02
   2  Prefactor     .45991        .94838       -.12054E-06    .24535E-02
   3  Prefactor     2.6871        1.0541       -.10849E-06   -.53356E-02
   4  Prefactor      .0000        1.0571        .54455E-06** at limit **
   5  norm          2.9738        .90960        .21239E-06    .47739E-02
   6  norm           .0000        .16499       -.40991E-07** at limit **
   7  Prefactor      .0000        1.1645        .31500E-06** at limit **
   8  norm          .39176        .34503        .27590E-06   -.13060E-02
   9  norm           .0000        2.8973       -.40977E-06** at limit **
  10  norm          3.0379        1.0876        .27851E-07   -.44611E-02
  11  Prefactor     6.3215        2.8297       -.22902E-06    .63192E-03
  12  norm          5.4050        2.9981        .12865E-05    .77286E-03
  13  Prefactor     37.330        32.218       -.10422E-04   -.10067    
  14  Prefactor     60.268        27.867       -.70418E-05    .20767    
  15  norm          11.717        4.7113       -.81721E-07   -.33279E-02
  16  Prefactor     8.0178        6.4737        .40919E-05    .89123E-01
  17  Prefactor     3.4949        7.1032        .38478E-06   -.31036E-03
  18  Prefactor     7.2062        5.6654       -.94879E-07    .83948E-03
  19  Prefactor     13.410        21.842       -.45015E-07   -.10369E-01
  20  Prefactor     .77716E-09    43.083       -.42153E-05** at limit **
  21  norm          1.1770        .86646       -.23002E-07    .33602E-02
  22  norm          25.401        4.3534       -.16739E-05   -.21366E-01
  23  norm          .82284        7.6514        .63813E-05   -.29546E-03
  24  Prefactor     5.1396        2.6963        .51335E-06    .18235E-02
  25  Prefactor     6.4584        2.9074       -.36517E-06   -.41487E-03
  26  Normalizat    1.2587        .15164        .12094E-04    .73019E-04
  27  Prefactor     .75775        .91978E-01   -.13832E-04    .78434E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 5.11598
  Prefactor  = 0.459914
  Prefactor  = 2.68707
  Prefactor  = 0
  norm       = 2.97376
  norm       = 0
  Prefactor  = 0
  norm       = 0.39176
  norm       = 0
  norm       = 3.03788
  Prefactor  = 6.32148
  norm       = 5.40501
  Prefactor  = 37.3303
  Prefactor  = 60.2683
  norm       = 11.7169
  Prefactor  = 8.01776
  Prefactor  = 3.49486
  Prefactor  = 7.20616
  Prefactor  = 13.4103
  Prefactor  = 7.77156e-10
  norm       = 1.17701
  norm       = 25.4006
  norm       = 0.822835
  Prefactor  = 5.13956
  Prefactor  = 6.45841
  Normalizat = 1.2587
  Prefactor  = 0.757749
 **********
 **   18 **HESSE 
 **********

 FCN=   19520.47     FROM HESSE     STATUS=OK           558 CALLS     2923 TOTAL
                     EDM=   .38E-05    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          5.1160        15.198        .44934E-03   -1.5663    
   2  Prefactor     .45991        1.0072        .82747E-03   -1.5694    
   3  Prefactor     2.6871        1.1111        .62116E-03   -1.5675    
   4  Prefactor      .0000        1.0089        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          2.9738        .91042        .58846E-03   -1.5673    
   6  norm           .0000        .16271        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor      .0000        1.1619        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .39176        .39399        .17414E-02   -1.5695    
   9  norm           .0000        2.8920        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          3.0379        1.0950        .58175E-03   -1.5673    
  11  Prefactor     6.3215        2.8394        .39910E-03   -1.5658    
  12  norm          5.4050        3.0552        .43252E-03   -1.5661    
  13  Prefactor     37.330        38.626        .16231E-03   -1.5586    
  14  Prefactor     60.268        57.337        .12851E-03   -1.5553    
  15  norm          11.717        4.7610        .29240E-03   -1.5640    
  16  Prefactor     8.0178        24.715        .35104E-03   -1.5651    
  17  Prefactor     3.4949        7.4844        .54177E-03   -1.5671    
  18  Prefactor     7.2062        5.6946        .37336E-03   -1.5654    
  19  Prefactor     13.410        21.882        .26726E-03   -1.5635    
  20  Prefactor     .77716E-09    42.506        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  norm          1.1770        .86179        .10554E-02   -1.5686    
  22  norm          25.401        35.055        .19804E-03   -1.5607    
  23  norm          .82284        7.6474        .50459E-03   -1.5690    
  24  Prefactor     5.1396        2.7018        .44324E-03   -1.5663    
  25  Prefactor     6.4584        2.9078        .39476E-03   -1.5657    
  26  Normalizat    1.2587        .12710        .62652E-01   -.84808    
  27  Prefactor     .75775        .76741E-01    .43163E-01   -1.0131    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.78588e-06
Minuit parameter uncertainties:
  1  15.1981
  2  1.0072
  3  1.1111
  4  2.75348e-06
  5  0.910423
  6  2.43398e-06
  7  3.26587e-06
  8  0.393985
  9  7.57375e-06
  10  1.095
  11  2.83942
  12  3.05522
  13  38.6263
  14  57.3375
  15  4.76104
  16  24.7152
  17  7.48438
  18  5.69458
  19  21.8818
  20  0.000368715
  21  0.861793
  22  35.0551
  23  5.01701
  24  2.70177
  25  2.90778
  26  0.127135
  27  0.0767515
Done.

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

Extracting fit parameters...

4FGL J1738.2+4000
   Spectrum: PowerLaw
326    Prefactor:  3.733e+01  3.863e+01  0.000e+00  1.000e+06 ( 1.000e-14)
327        Index:  2.517e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
328        Scale:  1.525e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
681    Prefactor:  7.577e-01  7.675e-02  0.000e+00  1.000e+01 ( 1.000e+00)
682        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
683        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
680   Normalization:  1.259e+00  1.271e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 1.52
Ra Dec: 264.560 40.010
Photon Index (Fixed Index): 2.52 +/- 0.00
Photon Flux (Fixed Index): 2.34e-08 +/- 2.42e-08
Energy Flux (Fixed Index): 6.68e-06 +/- 6.91e-06

TS (Fixed Index): 1.52
Ra Dec: 264.560 40.010
Photon Flux Upper Limit: 7.14792369043e-08 ph cm-2 s-1
Energy Flux Upper Limit: 0.0055654182907 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/17380088/likelihoodResults_786931201_787536001_4FGL_J1738.2+4000_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) = 19520.3481761
delta logL = 0.119394687434

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 19520.3297636
delta logL = 0.137807216139

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    18.889       1.0000          .0000       .10000E+07
     2 'Index     '    3.0398       1.0000          .0000       10.000    
     3 'Normalizat'    1.2391       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .76564       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6840E+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=   19520.33     FROM MIGRAD    STATUS=FAILED       104 CALLS      314 TOTAL
                     EDM=   .44E-05    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     18.877        595.22        .92068E-05   -.10027E-02
   2  Index         3.0399        6.5079        .82854E-02    .16426E-02
   3  Normalizat    1.2391        .17805        .27899E-03    .16007E-03
   4  Prefactor     .76566        .96962E-01    .21688E-03   -.72318E-03
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   19520.33     FROM SIMPLEX   STATUS=UNCHANGED     96 CALLS      410 TOTAL
                     EDM=   .15E-04    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     18.877        595.22        .37937E-04   -.10027E-02
   2  Index         3.0399        6.5079        .11866E-02    .16426E-02
   3  Normalizat    1.2391        .17805        .20935E-03    .16007E-03
   4  Prefactor     .76566        .96962E-01    .19939E-03   -.72318E-03
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   19520.33     FROM MIGRAD    STATUS=CONVERGED     29 CALLS      439 TOTAL
                     EDM=   .97E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     18.877        49.185        .36827E-06   -.14896E-02
   2  Index         3.0399        1.3359        .16571E-02   -.15780E-04
   3  Normalizat    1.2391        .15175        .11159E-04    .14670E-03
   4  Prefactor     .76566        .92631E-01    .86751E-05   -.69823E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 18.8767
  Index      = 3.03994
  Normalizat = 1.23914
  Prefactor  = 0.765662
 **********
 **   18 **HESSE 
 **********

 FCN=   19520.33     FROM HESSE     STATUS=OK            23 CALLS      462 TOTAL
                     EDM=   .96E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     18.877        41.400        .37244E-06   -1.5621    
   2  Index         3.0399        1.1286        .66283E-04   -.40282    
   3  Normalizat    1.2391        .15018        .22319E-05   -.85402    
   4  Prefactor     .76566        .91914E-01    .17350E-05   -1.0101    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 9.6404e-10
Minuit parameter uncertainties:
  1  41.4005
  2  1.14023
  3  0.150234
  4  0.0919326
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) = 19520.3297634
delta logL = 0.137807411942

Extracting fit parameters...

4FGL J1738.2+4000
   Spectrum: PowerLaw
326    Prefactor:  1.888e+01  4.140e+01  0.000e+00  1.000e+06 ( 1.000e-14)
327        Index:  3.040e+00  1.140e+00  0.000e+00  1.000e+01 (-1.000e+00)
328        Scale:  1.525e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
681    Prefactor:  7.657e-01  9.193e-02  0.000e+00  1.000e+01 ( 1.000e+00)
682        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
683        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
680   Normalization:  1.239e+00  1.502e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.87
Ra Dec: 264.560 40.010
Photon Index (Free Index): 3.04 +/- 1.14
Photon Flux (Free Index): 3.67e-08 +/- 3.61e-08
Energy Flux (Free Index): 7.18e-06 +/- 6.01e-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/17380088/cmap_HighResolution_786931201_787536001_4FGL_J1738.2+4000_weekly_bin906.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='5.57e-03', comment='SUCCESS', photon_flux='2.34e-08', energy_flux2='7.18e-06', photon_flux_error='2.42e-08', dlogl='1.38e-01', energy_flux='6.68e-06', photon_flux2='3.67e-08', job_status='DONE', time_completed='2025-12-16 03:12:31.572881', photon_index_error2='1.14', photon_index2='3.04', ts='1.52', fit_tolerance='1e-08', GAL='0.76', photon_index_error='0.00', photon_flux_upper_limit='7.15e-08', energy_flux_error2='6.01e-06', EG='1.26', time_epoch_completed='1765883551.57', return_code='0', job_id='17380088', GAL2='0.77', EG2='1.24', return_code2='0', energy_flux_error='6.91e-06', photon_flux_error2='3.61e-08', ts2='1.87', photon_index='2.52' WHERE bin_id='906' AND source_name='4FGL J1738.2+4000' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Dec 16 03:12:31 PST 2025

