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


Performing analysis on: 4FGL_J1738.2+4000_weekly_bin945
RA = 264.56, Dec = 40.0099
tmin = 810518401, tmax = 811123201
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='38319554', job_status='RUN', time_executed='2026-09-15 13:52:39.469639', time_epoch_executed='1789505559.47' WHERE source_name='4FGL J1738.2+4000' and cadence='weekly' and bin_id='945'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/38319554

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

Retrieving the FT1 file...

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

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

Retrieving 108 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/38319554/ft1_4FGL_J1738.2+4000_weekly_bin945.fits


Retrieving the FT1 file...

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

Retrieving 108 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/38319554/ft2_4FGL_J1738.2+4000_weekly_bin945.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/38319554/ft1_4FGL_J1738.2+4000_weekly_bin945.fits outfile=/lscratch/kocevski/38319554/ft1_filteredMKT_4FGL_J1738.2+4000_weekly_bin945.fits ra=264.56 dec=40.0099 rad=12.0 tmin=810518401.0 tmax=811123201.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.80
user 5.34
sys 0.23

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

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/38319554/ft2_4FGL_J1738.2+4000_weekly_bin945.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/38319554/ft1_filteredMKT_4FGL_J1738.2+4000_weekly_bin945.fits evtable="EVENTS" outfile="/lscratch/kocevski/38319554/ft1_filtered_4FGL_J1738.2+4000_weekly_bin945.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.51
user 0.22
sys 0.13

Number of photons that the gtmktime cut: 1812

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/38319554/ft1_filtered_4FGL_J1738.2+4000_weekly_bin945.fits" evtable="EVENTS" scfile=/lscratch/kocevski/38319554/ft2_4FGL_J1738.2+4000_weekly_bin945.fits sctable="SC_DATA" outfile=/lscratch/kocevski/38319554/ltcube_810518401_811123201_4FGL_J1738.2+4000_weekly_bin945.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/38319554/ft2_4FGL_J1738.2+4000_weekly_bin945.fits
.....................!
real 18.27
user 17.66
sys 0.24

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/38319554/ft1_filtered_4FGL_J1738.2+4000_weekly_bin945.fits evtable="EVENTS" scfile=/lscratch/kocevski/38319554/ft2_4FGL_J1738.2+4000_weekly_bin945.fits sctable="SC_DATA" expcube=/lscratch/kocevski/38319554/ltcube_810518401_811123201_4FGL_J1738.2+4000_weekly_bin945.fits outfile=/lscratch/kocevski/38319554/expmap_810518401_811123201_4FGL_J1738.2+4000_weekly_bin945.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/38319554/ltcube_810518401_811123201_4FGL_J1738.2+4000_weekly_bin945.fits
.....................!
real 69.42
user 64.63
sys 4.16

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/38319554/ft1_filtered_4FGL_J1738.2+4000_weekly_bin945.fits scfile=/lscratch/kocevski/38319554/ft2_4FGL_J1738.2+4000_weekly_bin945.fits outfile=/lscratch/kocevski/38319554/cmap_810518401_811123201_4FGL_J1738.2+4000_weekly_bin945.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.59
user 0.24
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/38319554/ft1_filtered_4FGL_J1738.2+4000_weekly_bin945.fits scfile=/lscratch/kocevski/38319554/ft2_4FGL_J1738.2+4000_weekly_bin945.fits outfile=/lscratch/kocevski/38319554/cmap_HighResolution_810518401_811123201_4FGL_J1738.2+4000_weekly_bin945.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.55
user 0.24
sys 0.13

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/38319554/ft1_filtered_4FGL_J1738.2+4000_weekly_bin945.fits evtable="EVENTS" scfile=/lscratch/kocevski/38319554/ft2_4FGL_J1738.2+4000_weekly_bin945.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/38319554/Model_4FGL_J1738.2+4000_weekly_bin945.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/38319205/ft1_filtered_4FGL_J1738.2+4000_weekly_bin945.fits.....................!
real 60.84
user 57.57
sys 0.94

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/38319205/ft1_filtered_4FGL_J1738.2+4000_weekly_bin945.fits', '/lscratch/kocevski/38319205/ft2_4FGL_J1738.2+4000_weekly_bin945.fits', expMap='/lscratch/kocevski/38319205/expmap_810518401_811123201_4FGL_J1738.2+4000_weekly_bin945.fits', expCube='/lscratch/kocevski/38319205/ltcube_810518401_811123201_4FGL_J1738.2+4000_weekly_bin945.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/38319205/Model_4FGL_J1738.2+4000_weekly_bin945.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/38319205/ft1_filtered_4FGL_J1738.2+4000_weekly_bin945.fits
Spacecraft file(s): /lscratch/kocevski/38319205/ft2_4FGL_J1738.2+4000_weekly_bin945.fits
Exposure map: /lscratch/kocevski/38319205/expmap_810518401_811123201_4FGL_J1738.2+4000_weekly_bin945.fits
Exposure cube: /lscratch/kocevski/38319205/ltcube_810518401_811123201_4FGL_J1738.2+4000_weekly_bin945.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/38319205/Model_4FGL_J1738.2+4000_weekly_bin945.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) = 19168.3668795

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    35.190       1.0000          .0000       .10000E+07
     2 'Prefactor '    .81394       1.0000          .0000       .10000E+07
     3 'Prefactor '    .21316E-07   1.0000          .0000       .10000E+07
     4 'Prefactor '    .17331       1.0000          .0000       .10000E+07
     5 'norm      '    5.0067       1.0000          .0000       .10000E+07
     6 'norm      '    .23315E-08   1.0000          .0000       .10000E+07
     7 'Prefactor '    1.1869       1.0000          .0000       .10000E+07
     8 'norm      '    .53314E-03   1.0000          .0000       .10000E+07
     9 'norm      '    .88068E-06   1.0000          .0000       .10000E+07
    10 'norm      '    .83148       1.0000          .0000       .10000E+07
    11 'Prefactor '    2.9559       1.0000          .0000       .10000E+07
    12 'norm      '    3.2428       1.0000          .0000       .10000E+07
    13 'Prefactor '    35.574       1.0000          .0000       .10000E+07
    14 'Prefactor '    .11164E-04   1.0000          .0000       .10000E+07
    15 'norm      '    1.5425       1.0000          .0000       .10000E+07
    16 'Prefactor '    31.263       1.0000          .0000       .10000E+07
    17 'Prefactor '    15.186       1.0000          .0000       .10000E+07
    18 'Prefactor '    5.5775       1.0000          .0000       .10000E+07
    19 'Prefactor '    .83179E-04   1.0000          .0000       .10000E+07
    20 'Prefactor '    .47101       1.0000          .0000       .10000E+07
    21 'norm      '    .65375E-06   1.0000          .0000       .10000E+07
    22 'norm      '    .65807E-03   1.0000          .0000       .10000E+07
    23 'norm      '    6.4514       1.0000          .0000       .10000E+07
    24 'Prefactor '    .86675       1.0000          .0000       .10000E+07
    25 'Prefactor '    2.6575       1.0000          .0000       .10000E+07
    26 'Normalizat'    .89218       1.0000         .10000E-01   10.000    
    27 'Prefactor '    1.0069       1.0000          .00_V02
Working on...
/lscratch/kocevski/38319227/ft1_filtered_4FGL_J1738.2+4000_weekly_bin945.fits.....................!
real 57.08
user 54.99
sys 1.22

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/38319227/ft1_filtered_4FGL_J1738.2+4000_weekly_bin945.fits', '/lscratch/kocevski/38319227/ft2_4FGL_J1738.2+4000_weekly_bin945.fits', expMap='/lscratch/kocevski/38319227/expmap_810518401_811123201_4FGL_J1738.2+4000_weekly_bin945.fits', expCube='/lscratch/kocevski/38319227/ltcube_810518401_811123201_4FGL_J1738.2+4000_weekly_bin945.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/38319227/Model_4FGL_J1738.2+4000_weekly_bin945.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/38319227/ft1_filtered_4FGL_J1738.2+4000_weekly_bin945.fits
Spacecraft file(s): /lscratch/kocevski/38319227/ft2_4FGL_J1738.2+4000_weekly_bin945.fits
Exposure map: /lscratch/kocevski/38319227/expmap_810518401_811123201_4FGL_J1738.2+4000_weekly_bin945.fits
Exposure cube: /lscratch/kocevski/38319227/ltcube_810518401_811123201_4FGL_J1738.2+4000_weekly_bin945.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/38319227/Model_4FGL_J1738.2+4000_weekly_bin945.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) = 19168.3668795

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    35.190       1.0000          .0000       .10000E+07
     2 'Prefactor '    .81394       1.0000          .0000       .10000E+07
     3 'Prefactor '    .21316E-07   1.0000          .0000       .10000E+07
     4 'Prefactor '    .17331       1.0000          .0000       .10000E+07
     5 'norm      '    5.0067       1.0000          .0000       .10000E+07
     6 'norm      '    .23315E-08   1.0000          .0000       .10000E+07
     7 'Prefactor '    1.1869       1.0000          .0000       .10000E+07
     8 'norm      '    .53314E-03   1.0000          .0000       .10000E+07
     9 'norm      '    .88068E-06   1.0000          .0000       .10000E+07
    10 'norm      '    .83148       1.0000          .0000       .10000E+07
    11 'Prefactor '    2.9559       1.0000          .0000       .10000E+07
    12 'norm      '    3.2428       1.0000          .0000       .10000E+07
    13 'Prefactor '    35.574       1.0000          .0000       .10000E+07
    14 'Prefactor '    .11164E-04   1.0000          .0000       .10000E+07
    15 'norm      '    1.5425       1.0000          .0000       .10000E+07
    16 'Prefactor '    31.263       1.0000          .0000       .10000E+07
    17 'Prefactor '    15.186       1.0000          .0000       .10000E+07
    18 'Prefactor '    5.5775       1.0000          .0000       .10000E+07
    19 'Prefactor '    .83179E-04   1.0000          .0000       .10000E+07
    20 'Prefactor '    .47101       1.0000          .0000       .10000E+07
    21 'norm      '    .65375E-06   1.0000          .0000       .10000E+07
    22 'norm      '    .65807E-03   1.0000          .0000       .10000E+07
    23 'norm      '    6.4514       1.0000          .0000       .10000E+07
    24 'Prefactor '    .86675       1.0000          .0000       .10000E+07
    25 'Prefactor '    2.6575       1.0000          .0000       .10000E+07
    26 'Normalizat'    .89218       1.0000         .10000E-01   10.000    
    27 'Prefactor '    1.0069       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=   19168.35     FROM MIGRAD    STATUS=CONVERGED    164 CALLS     2407 TOTAL
                     EDM=   .15E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .9%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          34.769        2.0570        .37987E-08   -.12035E-01
   2  Prefactor     .81577        .46057        .10198E-07    .83221E-02
   3  Prefactor      .0000        .24224        .33364E-07** at limit **
   4  Prefactor     .16724        2.5271       -.29033E-07** at limit **
   5  norm          5.0069        1.2003        .11403E-07    .76727E-02
   6  norm           .0000        .17514        .57418E-08** at limit **
   7  Prefactor     1.1851        3.8647       -.67762E-09   -.29624E-03
   8  norm          .39735E-02    5.5150        .70836E-06** at limit **
   9  norm           .0000        1.4946        .41083E-07** at limit **
  10  norm          .83242        .63576        .53839E-08    .25407E-02
  11  Prefactor     2.9579        2.1634        .89801E-08    .11125E-02
  12  norm          3.2489        2.3268        .16511E-07    .42230E-03
  13  Prefactor     35.275        10.429       -.59941E-07    .21830    
  14  Prefactor     .28008E-05    22.222        .17537E-06** at limit **
  15  norm          1.5545        3.2588       -.52656E-07   -.92555E-03
  16  Prefactor     30.230        6.5421        .15289E-07    .72536E-01
  17  Prefactor     15.121        7.8417       -.60515E-07   -.11745E-01
  18  Prefactor     5.5822        4.2385        .27563E-07    .19604E-02
  19  Prefactor     .29754E-07    17.408       -.13176E-06** at limit **
  20  Prefactor     .30175E-04    36.555       -.22189E-06** at limit **
  21  norm           .0000        .28375       -.32074E-07** at limit **
  22  norm          .10478E-04    23.039        .29135E-07** at limit **
  23  norm          6.4514        4.7356       -.96411E-08    .55194E-03
  24  Prefactor     .85716        3.6510        .48083E-07    .10379E-01
  25  Prefactor     2.6577        2.2682        .53071E-08    .80999E-03
  26  Normalizat    .89288        .14885        .12032E-05    .19362E-03
  27  Prefactor     1.0068        .92617E-01   -.18813E-06    .25848E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 34.7692
  Prefactor  = 0.815772
  Prefactor  = 0
  Prefactor  = 0.167237
  norm       = 5.00694
  norm       = 0
  Prefactor  = 1.18509
  norm       = 0.00397349
  norm       = 0
  norm       = 0.832423
  Prefactor  = 2.95792
  norm       = 3.24894
  Prefactor  = 35.2749
  Prefactor  = 2.80082e-06
  norm       = 1.55447
  Prefactor  = 30.2304
  Prefactor  = 15.1209
  Prefactor  = 5.58219
  Prefactor  = 2.9754e-08
  Prefactor  = 3.01748e-05
  norm       = 0
  norm       = 1.04778e-05
  norm       = 6.45141
  Prefactor  = 0.857165
  Prefactor  = 2.65774
  Normalizat = 0.892878
  Prefactor  = 1.00683
00       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6840E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   19168.35     FROM MIGRAD    STATUS=CONVERGED    164 CALLS     2407 TOTAL
                     EDM=   .15E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .9%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          34.769        2.0570        .37987E-08   -.12035E-01
   2  Prefactor     .81577        .46057        .10198E-07    .83221E-02
   3  Prefactor      .0000        .24224        .33364E-07** at limit **
   4  Prefactor     .16724        2.5271       -.29033E-07** at limit **
   5  norm          5.0069        1.2003        .11403E-07    .76727E-02
   6  norm           .0000        .17514        .57418E-08** at limit **
   7  Prefactor     1.1851        3.8647       -.67762E-09   -.29624E-03
   8  norm          .39735E-02    5.5150        .70836E-06** at limit **
   9  norm           .0000        1.4946        .41083E-07** at limit **
  10  norm          .83242        .63576        .53839E-08    .25407E-02
  11  Prefactor     2.9579        2.1634        .89801E-08    .11125E-02
  12  norm          3.2489        2.3268        .16511E-07    .42230E-03
  13  Prefactor     35.275        10.429       -.59941E-07    .21830    
  14  Prefactor     .28008E-05    22.222        .17537E-06** at limit **
  15  norm          1.5545        3.2588       -.52656E-07   -.92555E-03
  16  Prefactor     30.230        6.5421        .15289E-07    .72536E-01
  17  Prefactor     15.121        7.8417       -.60515E-07   -.11745E-01
  18  Prefactor     5.5822        4.2385        .27563E-07    .19604E-02
  19  Prefactor     .29754E-07    17.408       -.13176E-06** at limit **
  20  Prefactor     .30175E-04    36.555       -.22189E-06** at limit **
  21  norm           .0000        .28375       -.32074E-07** at limit **
  22  norm          .10478E-04    23.039        .29135E-07** at limit **
  23  norm          6.4514        4.7356       -.96411E-08    .55194E-03
  24  Prefactor     .85716        3.6510        .48083E-07    .10379E-01
  25  Prefactor     2.6577        2.2682        .53071E-08    .80999E-03
  26  Normalizat    .89288        .14885        .12032E-05    .19362E-03
  27  Prefactor     1.0068        .92617E-01   -.18813E-06    .25848E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 34.7692
  Prefactor  = 0.815772
  Prefactor  = 0
  Prefactor  = 0.167237
  norm       = 5.00694
  norm       = 0
  Prefactor  = 1.18509
  norm       = 0.00397349
  norm       = 0
  norm       = 0.832423
  Prefactor  = 2.95792
  norm       = 3.24894
  Prefactor  = 35.2749
  Prefactor  = 2.80082e-06
  norm       = 1.55447
  Prefactor  = 30.2304
  Prefactor  = 15.1209
  Prefactor  = 5.58219
  Prefactor  = 2.9754e-08
  Prefactor  = 3.01748e-05
  norm       = 0
  norm       = 1.04778e-05
  norm       = 6.45141
  Prefactor  = 0.857165
  Prefactor  = 2.65774
  Normalizat = 0.892878
  Prefactor  = 1.00683
 **********
 **   18 **HESSE 
 **********

 FCN=   19168.35     FROM HESSE     STATUS=OK           562 CALLS     2969 TOTAL
                     EDM=   .16E-04    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          34.769        25.301        .16859E-03   -1.5590    
   2  Prefactor     .81577        .46649        .51902E-04   -1.5690    
   3  Prefactor      .0000        .24141        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .16724        .59601        .53733E-02   -1.5700    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          5.0069        1.2040        .44919E-03   -1.5663    
   6  norm           .0000        .17025        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     1.1851        3.8861        .10465E-02   -1.5686    
   8  norm          .39735E-02    .12417        .27332E-02   -1.5709    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm           .0000        1.4909        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          .83242        .64184        .50618E-03   -1.5690    
  11  Prefactor     2.9579        2.1781        .59041E-03   -1.5674    
  12  norm          3.2489        2.4382        .56221E-03   -1.5672    
  13  Prefactor     35.275        37.012        .16768E-03   -1.5589    
  14  Prefactor     .28008E-05    26.300        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          1.5545        3.3152        .85797E-03   -1.5683    
  16  Prefactor     30.230        22.993        .17887E-03   -1.5598    
  17  Prefactor     15.121        7.8733        .25675E-03   -1.5630    
  18  Prefactor     5.5822        4.2374        .42515E-03   -1.5661    
  19  Prefactor     .29754E-07    17.462        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .30175E-04    146.89        .81681E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  norm           .0000        .28416        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  norm          .10478E-04    31.064        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  norm          6.4514        4.7352        .39490E-03   -1.5657    
  24  Prefactor     .85716        3.6847        .48087E-03   -1.5689    
  25  Prefactor     2.6577        2.2680        .62503E-03   -1.5675    
  26  Normalizat    .89288        .12555        .69251E-01   -.96711    
  27  Prefactor     1.0068        .76431E-01    .43823E-01   -.92502    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.57708e-05
Minuit parameter uncertainties:
  1  25.3012
  2  0.466493
  3  2.08379e-06
  4  0.59601
  5  1.20404
  6  1.13739e-07
  7  3.88609
  8  0.0444249
  9  5.64929e-06
  10  0.641841
  11  2.17808
  12  2.43819
  13  37.012
  14  0.0171651
  15  3.31522
  16  22.9927
  17  7.87332
  18  4.23745
  19  0.00144182
  20  0.133157
  21  3.68152e-06
  22  0.0360828
  23  4.73519
  24  3.55436
  25  2.26802
  26  0.125589
  27  0.0764394
 **********
 **   18 **HESSE 
 **********

 FCN=   19168.35     FROM HESSE     STATUS=OK           562 CALLS     2969 TOTAL
                     EDM=   .16E-04    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          34.769        25.301        .16859E-03   -1.5590    
   2  Prefactor     .81577        .46649        .51902E-04   -1.5690    
   3  Prefactor      .0000        .24141        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .16724        .59601        .53733E-02   -1.5700    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          5.0069        1.2040        .44919E-03   -1.5663    
   6  norm           .0000        .17025        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     1.1851        3.8861        .10465E-02   -1.5686    
   8  norm          .39735E-02    .12417        .27332E-02   -1.5709    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm           .0000        1.4909        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          .83242        .64184        .50618E-03   -1.5690    
  11  Prefactor     2.9579        2.1781        .59041E-03   -1.5674    
  12  norm          3.2489        2.4382        .56221E-03   -1.5672    
  13  Prefactor     35.275        37.012        .16768E-03   -1.5589    
  14  Prefactor     .28008E-05    26.300        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          1.5545        3.3152        .85797E-03   -1.5683    
  16  Prefactor     30.230        22.993        .17887E-03   -1.5598    
  17  Prefactor     15.121        7.8733        .25675E-03   -1.5630    
  18  Prefactor     5.5822        4.2374        .42515E-03   -1.5661    
  19  Prefactor     .29754E-07    17.462        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .30175E-04    146.89        .81681E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  norm           .0000        .28416        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  norm          .10478E-04    31.064        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  norm          6.4514        4.7352        .39490E-03   -1.5657    
  24  Prefactor     .85716        3.6847        .48087E-03   -1.5689    
  25  Prefactor     2.6577        2.2680        .62503E-03   -1.5675    
  26  Normalizat    .89288        .12555        .69251E-01   -.96711    
  27  Prefactor     1.0068        .76431E-01    .43823E-01   -.92502    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.57708e-05
Minuit parameter uncertainties:
  1  25.3012
  2  0.466493
  3  2.08379e-06
  4  0.59601
  5  1.20404
  6  1.13739e-07
  7  3.88609
  8  0.0444249
  9  5.64929e-06
  10  0.641841
  11  2.17808
  12  2.43819
  13  37.012
  14  0.0171651
  15  3.31522
  16  22.9927
  17  7.87332
  18  4.23745
  19  0.00144182
  20  0.133157
  21  3.68152e-06
  22  0.0360828
  23  4.73519
  24  3.55436
  25  2.26802
  26  0.125589
  27  0.0764394
Done.

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

Extracting fit parameters...

4FGL J1738.2+4000
   Spectrum: PowerLaw
326    Prefactor:  3.527e+01  3.701e+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:  1.007e+00  7.644e-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:  8.929e-01  1.256e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 1.26
Ra Dec: 264.560 40.010
Photon Index (Fixed Index): 2.52 +/- 0.00
Photon Flux (Fixed Index): 2.21e-08 +/- 2.32e-08
Energy Flux (Fixed Index): 6.31e-06 +/- 6.62e-06

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

Saving results to:
/lscratch/kocevski/38319227/likelihoodResults_810518401_811123201_4FGL_J1738.2+4000_weekly_bin945.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) = 19168.2509972
delta logL = 0.102836157286

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 19168.2486107
delta logL = 0.105222616607

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    57.043       1.0000          .0000       .10000E+07
     2 'Index     '    2.2128       1.0000          .0000       10.000    
     3 'Normalizat'    .89940       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0034       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.

 FCN=   19168.25     FROM MIGRAD    STATUS=CONVERGED     95 CALLS      303 TOTAL
                     EDM=   .44E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     57.120        72.763        .52965E-05    .21465E-03
   2  Index         2.2138        .64759        .10593E-01    .52987E-04
   3  Normalizat    .89938        .13885        .30536E-03   -.19836E-03
   4  Prefactor     1.0032        .89993E-01    .18802E-03    .33392E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 57.1204
  Index      = 2.2138
  Normalizat = 0.899379
  Prefactor  = 1.00321
 **********
 **   18 **HESSE 
 **********

 FCN=   19168.25     FROM HESSE     STATUS=OK            25 CALLS      328 TOTAL
                     EDM=   .38E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     57.120        66.641        .10593E-05   -1.5557    
   2  Index         2.2138        .59323        .42372E-03   -.59106    
   3  Normalizat    .89938        .13880        .12214E-04   -.96482    
   4  Prefactor     1.0032        .89974E-01    .37604E-04   -.92622    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.75018e-10
Minuit parameter uncertainties:
  1  66.6422
  2  0.595262
  3  0.138851
  4  0.0899879
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) = 19168.2485993
delta logL = 0.105234040413

Extracting fit parameters...

4FGL J1738.2+4000
   Spectrum: PowerLaw
326    Prefactor:  5.712e+01  6.664e+01  0.000e+00  1.000e+06 ( 1.000e-14)
327        Index:  2.214e+00  5.953e-01  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:  1.003e+00  8.999e-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:  8.994e-01  1.389e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.46
Ra Dec: 264.560 40.010
Photon Index (Free Index): 2.21 +/- 0.60
Photon Flux (Free Index): 1.96e-08 +/- 2.03e-08
Energy Flux (Free Index): 8.59e-06 +/- 9.75e-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/38319227/cmap_HighResolution_810518401_811123201_4FGL_J1738.2+4000_weekly_bin945.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='5.17e-03', comment='SUCCESS', photon_flux='2.21e-08', energy_flux2='8.59e-06', photon_flux_error='2.32e-08', dlogl='1.05e-01', energy_flux='6.31e-06', photon_flux2='1.96e-08', job_status='DONE', time_completed='2026-09-15 14:00:07.362319', photon_index_error2='0.60', photon_index2='2.21', ts='1.26', fit_tolerance='1e-08', GAL='1.01', photon_index_error='0.00', photon_flux_upper_limit='6.64e-08', energy_flux_error2='9.75e-06', EG='0.89', time_epoch_completed='1789506007.36', return_code='0', job_id='38319227', GAL2='1.00', EG2='0.90', return_code2='0', energy_flux_error='6.62e-06', photon_flux_error2='2.03e-08', ts2='1.46', photon_index='2.52' WHERE bin_id='945' AND source_name='4FGL J1738.2+4000' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Sep 15 14:00:07 PDT 2026

Done.

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

Extracting fit parameters...

4FGL J1738.2+4000
   Spectrum: PowerLaw
326    Prefactor:  3.527e+01  3.701e+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:  1.007e+00  7.644e-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:  8.929e-01  1.256e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 1.26
Ra Dec: 264.560 40.010
Photon Index (Fixed Index): 2.52 +/- 0.00
Photon Flux (Fixed Index): 2.21e-08 +/- 2.32e-08
Energy Flux (Fixed Index): 6.31e-06 +/- 6.62e-06

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

Saving results to:
/lscratch/kocevski/38319205/likelihoodResults_810518401_811123201_4FGL_J1738.2+4000_weekly_bin945.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) = 19168.2509972
delta logL = 0.102836157286

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 19168.2486107
delta logL = 0.105222616607

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    57.043       1.0000          .0000       .10000E+07
     2 'Index     '    2.2128       1.0000          .0000       10.000    
     3 'Normalizat'    .89940       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0034       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.

 FCN=   19168.25     FROM MIGRAD    STATUS=CONVERGED     95 CALLS      303 TOTAL
                     EDM=   .44E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     57.120        72.763        .52965E-05    .21465E-03
   2  Index         2.2138        .64759        .10593E-01    .52987E-04
   3  Normalizat    .89938        .13885        .30536E-03   -.19836E-03
   4  Prefactor     1.0032        .89993E-01    .18802E-03    .33392E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 57.1204
  Index      = 2.2138
  Normalizat = 0.899379
  Prefactor  = 1.00321
 **********
 **   18 **HESSE 
 **********

 FCN=   19168.25     FROM HESSE     STATUS=OK            25 CALLS      328 TOTAL
                     EDM=   .38E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     57.120        66.641        .10593E-05   -1.5557    
   2  Index         2.2138        .59323        .42372E-03   -.59106    
   3  Normalizat    .89938        .13880        .12214E-04   -.96482    
   4  Prefactor     1.0032        .89974E-01    .37604E-04   -.92622    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.75018e-10
Minuit parameter uncertainties:
  1  66.6422
  2  0.595262
  3  0.138851
  4  0.0899879
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) = 19168.2485993
delta logL = 0.105234040413

Extracting fit parameters...

4FGL J1738.2+4000
   Spectrum: PowerLaw
326    Prefactor:  5.712e+01  6.664e+01  0.000e+00  1.000e+06 ( 1.000e-14)
327        Index:  2.214e+00  5.953e-01  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:  1.003e+00  8.999e-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:  8.994e-01  1.389e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.46
Ra Dec: 264.560 40.010
Photon Index (Free Index): 2.21 +/- 0.60
Photon Flux (Free Index): 1.96e-08 +/- 2.03e-08
Energy Flux (Free Index): 8.59e-06 +/- 9.75e-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/38319205/cmap_HighResolution_810518401_811123201_4FGL_J1738.2+4000_weekly_bin945.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='5.17e-03', comment='SUCCESS', photon_flux='2.21e-08', energy_flux2='8.59e-06', photon_flux_error='2.32e-08', dlogl='1.05e-01', energy_flux='6.31e-06', photon_flux2='1.96e-08', job_status='DONE', time_completed='2026-09-15 14:00:15.266053', photon_index_error2='0.60', photon_index2='2.21', ts='1.26', fit_tolerance='1e-08', GAL='1.01', photon_index_error='0.00', photon_flux_upper_limit='6.64e-08', energy_flux_error2='9.75e-06', EG='0.89', time_epoch_completed='1789506015.27', return_code='0', job_id='38319205', GAL2='1.00', EG2='0.90', return_code2='0', energy_flux_error='6.62e-06', photon_flux_error2='2.03e-08', ts2='1.46', photon_index='2.52' WHERE bin_id='945' AND source_name='4FGL J1738.2+4000' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Sep 15 14:00:15 PDT 2026

_V02
Working on...
/lscratch/kocevski/38319554/ft1_filtered_4FGL_J1738.2+4000_weekly_bin945.fits.....................!
real 56.90
user 55.02
sys 1.15

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/38319554/ft1_filtered_4FGL_J1738.2+4000_weekly_bin945.fits', '/lscratch/kocevski/38319554/ft2_4FGL_J1738.2+4000_weekly_bin945.fits', expMap='/lscratch/kocevski/38319554/expmap_810518401_811123201_4FGL_J1738.2+4000_weekly_bin945.fits', expCube='/lscratch/kocevski/38319554/ltcube_810518401_811123201_4FGL_J1738.2+4000_weekly_bin945.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/38319554/Model_4FGL_J1738.2+4000_weekly_bin945.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/38319554/ft1_filtered_4FGL_J1738.2+4000_weekly_bin945.fits
Spacecraft file(s): /lscratch/kocevski/38319554/ft2_4FGL_J1738.2+4000_weekly_bin945.fits
Exposure map: /lscratch/kocevski/38319554/expmap_810518401_811123201_4FGL_J1738.2+4000_weekly_bin945.fits
Exposure cube: /lscratch/kocevski/38319554/ltcube_810518401_811123201_4FGL_J1738.2+4000_weekly_bin945.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/38319554/Model_4FGL_J1738.2+4000_weekly_bin945.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) = 19168.3668795

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    35.190       1.0000          .0000       .10000E+07
     2 'Prefactor '    .81394       1.0000          .0000       .10000E+07
     3 'Prefactor '    .21316E-07   1.0000          .0000       .10000E+07
     4 'Prefactor '    .17331       1.0000          .0000       .10000E+07
     5 'norm      '    5.0067       1.0000          .0000       .10000E+07
     6 'norm      '    .23315E-08   1.0000          .0000       .10000E+07
     7 'Prefactor '    1.1869       1.0000          .0000       .10000E+07
     8 'norm      '    .53314E-03   1.0000          .0000       .10000E+07
     9 'norm      '    .88068E-06   1.0000          .0000       .10000E+07
    10 'norm      '    .83148       1.0000          .0000       .10000E+07
    11 'Prefactor '    2.9559       1.0000          .0000       .10000E+07
    12 'norm      '    3.2428       1.0000          .0000       .10000E+07
    13 'Prefactor '    35.574       1.0000          .0000       .10000E+07
    14 'Prefactor '    .11164E-04   1.0000          .0000       .10000E+07
    15 'norm      '    1.5425       1.0000          .0000       .10000E+07
    16 'Prefactor '    31.263       1.0000          .0000       .10000E+07
    17 'Prefactor '    15.186       1.0000          .0000       .10000E+07
    18 'Prefactor '    5.5775       1.0000          .0000       .10000E+07
    19 'Prefactor '    .83179E-04   1.0000          .0000       .10000E+07
    20 'Prefactor '    .47101       1.0000          .0000       .10000E+07
    21 'norm      '    .65375E-06   1.0000          .0000       .10000E+07
    22 'norm      '    .65807E-03   1.0000          .0000       .10000E+07
    23 'norm      '    6.4514       1.0000          .0000       .10000E+07
    24 'Prefactor '    .86675       1.0000          .0000       .10000E+07
    25 'Prefactor '    2.6575       1.0000          .0000       .10000E+07
    26 'Normalizat'    .89218       1.0000         .10000E-01   10.000    
    27 'Prefactor '    1.0069       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=   19168.35     FROM MIGRAD    STATUS=CONVERGED    164 CALLS     2407 TOTAL
                     EDM=   .15E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .9%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          34.769        2.0570        .37987E-08   -.12035E-01
   2  Prefactor     .81577        .46057        .10198E-07    .83221E-02
   3  Prefactor      .0000        .24224        .33364E-07** at limit **
   4  Prefactor     .16724        2.5271       -.29033E-07** at limit **
   5  norm          5.0069        1.2003        .11403E-07    .76727E-02
   6  norm           .0000        .17514        .57418E-08** at limit **
   7  Prefactor     1.1851        3.8647       -.67762E-09   -.29624E-03
   8  norm          .39735E-02    5.5150        .70836E-06** at limit **
   9  norm           .0000        1.4946        .41083E-07** at limit **
  10  norm          .83242        .63576        .53839E-08    .25407E-02
  11  Prefactor     2.9579        2.1634        .89801E-08    .11125E-02
  12  norm          3.2489        2.3268        .16511E-07    .42230E-03
  13  Prefactor     35.275        10.429       -.59941E-07    .21830    
  14  Prefactor     .28008E-05    22.222        .17537E-06** at limit **
  15  norm          1.5545        3.2588       -.52656E-07   -.92555E-03
  16  Prefactor     30.230        6.5421        .15289E-07    .72536E-01
  17  Prefactor     15.121        7.8417       -.60515E-07   -.11745E-01
  18  Prefactor     5.5822        4.2385        .27563E-07    .19604E-02
  19  Prefactor     .29754E-07    17.408       -.13176E-06** at limit **
  20  Prefactor     .30175E-04    36.555       -.22189E-06** at limit **
  21  norm           .0000        .28375       -.32074E-07** at limit **
  22  norm          .10478E-04    23.039        .29135E-07** at limit **
  23  norm          6.4514        4.7356       -.96411E-08    .55194E-03
  24  Prefactor     .85716        3.6510        .48083E-07    .10379E-01
  25  Prefactor     2.6577        2.2682        .53071E-08    .80999E-03
  26  Normalizat    .89288        .14885        .12032E-05    .19362E-03
  27  Prefactor     1.0068        .92617E-01   -.18813E-06    .25848E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 34.7692
  Prefactor  = 0.815772
  Prefactor  = 0
  Prefactor  = 0.167237
  norm       = 5.00694
  norm       = 0
  Prefactor  = 1.18509
  norm       = 0.00397349
  norm       = 0
  norm       = 0.832423
  Prefactor  = 2.95792
  norm       = 3.24894
  Prefactor  = 35.2749
  Prefactor  = 2.80082e-06
  norm       = 1.55447
  Prefactor  = 30.2304
  Prefactor  = 15.1209
  Prefactor  = 5.58219
  Prefactor  = 2.9754e-08
  Prefactor  = 3.01748e-05
  norm       = 0
  norm       = 1.04778e-05
  norm       = 6.45141
  Prefactor  = 0.857165
  Prefactor  = 2.65774
  Normalizat = 0.892878
  Prefactor  = 1.00683
 **********
 **   18 **HESSE 
 **********

 FCN=   19168.35     FROM HESSE     STATUS=OK           562 CALLS     2969 TOTAL
                     EDM=   .16E-04    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          34.769        25.301        .16859E-03   -1.5590    
   2  Prefactor     .81577        .46649        .51902E-04   -1.5690    
   3  Prefactor      .0000        .24141        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .16724        .59601        .53733E-02   -1.5700    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          5.0069        1.2040        .44919E-03   -1.5663    
   6  norm           .0000        .17025        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     1.1851        3.8861        .10465E-02   -1.5686    
   8  norm          .39735E-02    .12417        .27332E-02   -1.5709    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm           .0000        1.4909        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          .83242        .64184        .50618E-03   -1.5690    
  11  Prefactor     2.9579        2.1781        .59041E-03   -1.5674    
  12  norm          3.2489        2.4382        .56221E-03   -1.5672    
  13  Prefactor     35.275        37.012        .16768E-03   -1.5589    
  14  Prefactor     .28008E-05    26.300        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          1.5545        3.3152        .85797E-03   -1.5683    
  16  Prefactor     30.230        22.993        .17887E-03   -1.5598    
  17  Prefactor     15.121        7.8733        .25675E-03   -1.5630    
  18  Prefactor     5.5822        4.2374        .42515E-03   -1.5661    
  19  Prefactor     .29754E-07    17.462        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .30175E-04    146.89        .81681E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  norm           .0000        .28416        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  norm          .10478E-04    31.064        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  norm          6.4514        4.7352        .39490E-03   -1.5657    
  24  Prefactor     .85716        3.6847        .48087E-03   -1.5689    
  25  Prefactor     2.6577        2.2680        .62503E-03   -1.5675    
  26  Normalizat    .89288        .12555        .69251E-01   -.96711    
  27  Prefactor     1.0068        .76431E-01    .43823E-01   -.92502    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.57708e-05
Minuit parameter uncertainties:
  1  25.3012
  2  0.466493
  3  2.08379e-06
  4  0.59601
  5  1.20404
  6  1.13739e-07
  7  3.88609
  8  0.0444249
  9  5.64929e-06
  10  0.641841
  11  2.17808
  12  2.43819
  13  37.012
  14  0.0171651
  15  3.31522
  16  22.9927
  17  7.87332
  18  4.23745
  19  0.00144182
  20  0.133157
  21  3.68152e-06
  22  0.0360828
  23  4.73519
  24  3.55436
  25  2.26802
  26  0.125589
  27  0.0764394
Done.

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

Extracting fit parameters...

4FGL J1738.2+4000
   Spectrum: PowerLaw
326    Prefactor:  3.527e+01  3.701e+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:  1.007e+00  7.644e-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:  8.929e-01  1.256e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 1.26
Ra Dec: 264.560 40.010
Photon Index (Fixed Index): 2.52 +/- 0.00
Photon Flux (Fixed Index): 2.21e-08 +/- 2.32e-08
Energy Flux (Fixed Index): 6.31e-06 +/- 6.62e-06

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

Saving results to:
/lscratch/kocevski/38319554/likelihoodResults_810518401_811123201_4FGL_J1738.2+4000_weekly_bin945.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) = 19168.2509972
delta logL = 0.102836157286

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 19168.2486107
delta logL = 0.105222616607

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    57.043       1.0000          .0000       .10000E+07
     2 'Index     '    2.2128       1.0000          .0000       10.000    
     3 'Normalizat'    .89940       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0034       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.

 FCN=   19168.25     FROM MIGRAD    STATUS=CONVERGED     95 CALLS      303 TOTAL
                     EDM=   .44E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     57.120        72.763        .52965E-05    .21465E-03
   2  Index         2.2138        .64759        .10593E-01    .52987E-04
   3  Normalizat    .89938        .13885        .30536E-03   -.19836E-03
   4  Prefactor     1.0032        .89993E-01    .18802E-03    .33392E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 57.1204
  Index      = 2.2138
  Normalizat = 0.899379
  Prefactor  = 1.00321
 **********
 **   18 **HESSE 
 **********

 FCN=   19168.25     FROM HESSE     STATUS=OK            25 CALLS      328 TOTAL
                     EDM=   .38E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     57.120        66.641        .10593E-05   -1.5557    
   2  Index         2.2138        .59323        .42372E-03   -.59106    
   3  Normalizat    .89938        .13880        .12214E-04   -.96482    
   4  Prefactor     1.0032        .89974E-01    .37604E-04   -.92622    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.75018e-10
Minuit parameter uncertainties:
  1  66.6422
  2  0.595262
  3  0.138851
  4  0.0899879
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) = 19168.2485993
delta logL = 0.105234040413

Extracting fit parameters...

4FGL J1738.2+4000
   Spectrum: PowerLaw
326    Prefactor:  5.712e+01  6.664e+01  0.000e+00  1.000e+06 ( 1.000e-14)
327        Index:  2.214e+00  5.953e-01  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:  1.003e+00  8.999e-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:  8.994e-01  1.389e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.46
Ra Dec: 264.560 40.010
Photon Index (Free Index): 2.21 +/- 0.60
Photon Flux (Free Index): 1.96e-08 +/- 2.03e-08
Energy Flux (Free Index): 8.59e-06 +/- 9.75e-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/38319554/cmap_HighResolution_810518401_811123201_4FGL_J1738.2+4000_weekly_bin945.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='5.17e-03', comment='SUCCESS', photon_flux='2.21e-08', energy_flux2='8.59e-06', photon_flux_error='2.32e-08', dlogl='1.05e-01', energy_flux='6.31e-06', photon_flux2='1.96e-08', job_status='DONE', time_completed='2026-09-15 14:05:00.890073', photon_index_error2='0.60', photon_index2='2.21', ts='1.26', fit_tolerance='1e-08', GAL='1.01', photon_index_error='0.00', photon_flux_upper_limit='6.64e-08', energy_flux_error2='9.75e-06', EG='0.89', time_epoch_completed='1789506300.89', return_code='0', job_id='38319554', GAL2='1.00', EG2='0.90', return_code2='0', energy_flux_error='6.62e-06', photon_flux_error2='2.03e-08', ts2='1.46', photon_index='2.52' WHERE bin_id='945' AND source_name='4FGL J1738.2+4000' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Sep 15 14:05:01 PDT 2026

