/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_J2043.7+2741_weekly_bin906
RA = 310.933, Dec = 27.6936
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='17380838', job_status='RUN', time_executed='2025-12-16 03:09:49.059346', time_epoch_executed='1765883389.06' WHERE source_name='4FGL J2043.7+2741' and cadence='weekly' and bin_id='906'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/17380838

Creating custom pfile directory:
/lscratch/kocevski/17380838/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/17380838/ft1_4FGL_J2043.7+2741_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/17380838/ft2_4FGL_J2043.7+2741_weekly_bin906.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/17380838/ft1_4FGL_J2043.7+2741_weekly_bin906.fits outfile=/lscratch/kocevski/17380838/ft1_filteredMKT_4FGL_J2043.7+2741_weekly_bin906.fits ra=310.933 dec=27.6936 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.69
user 4.98
sys 0.25

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/17380838/ft2_4FGL_J2043.7+2741_weekly_bin906.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/17380838/ft2_4FGL_J2043.7+2741_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/17380838/ft1_filteredMKT_4FGL_J2043.7+2741_weekly_bin906.fits evtable="EVENTS" outfile="/lscratch/kocevski/17380838/ft1_filtered_4FGL_J2043.7+2741_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.80
user 0.21
sys 0.14

Number of photons that the gtmktime cut: 8001

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/17380838/ft1_filtered_4FGL_J2043.7+2741_weekly_bin906.fits" evtable="EVENTS" scfile=/lscratch/kocevski/17380838/ft2_4FGL_J2043.7+2741_weekly_bin906.fits sctable="SC_DATA" outfile=/lscratch/kocevski/17380838/ltcube_786931201_787536001_4FGL_J2043.7+2741_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/17380838/ft2_4FGL_J2043.7+2741_weekly_bin906.fits
.....................!
real 18.23
user 17.45
sys 0.22

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/17380838/ft1_filtered_4FGL_J2043.7+2741_weekly_bin906.fits evtable="EVENTS" scfile=/lscratch/kocevski/17380838/ft2_4FGL_J2043.7+2741_weekly_bin906.fits sctable="SC_DATA" expcube=/lscratch/kocevski/17380838/ltcube_786931201_787536001_4FGL_J2043.7+2741_weekly_bin906.fits outfile=/lscratch/kocevski/17380838/expmap_786931201_787536001_4FGL_J2043.7+2741_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/17380838/ltcube_786931201_787536001_4FGL_J2043.7+2741_weekly_bin906.fits
.....................!
real 69.12
user 64.19
sys 3.97

Generating the xml model:
radLim = 0.001
maxRad = 12
normsOnly = True
freeVariableSources = True
Fixing all sources to their catalog values, except variable sources
Creating file and adding sources from 4FGL
Extended source Cygnus Loop in ROI, make sure /sdf/group/fermi/g/LCRepository/Likelihood/ExtendedSources/Extended_8years/Templates/CygnusLoop.fits is the correct path to the extended template.
Extended source gamma Cygni in ROI with RadialDisk spatial model.
Extended source Cygnus Cocoon in ROI with RadialGaussian spatial model.
Added 223 point sources and 3 extended sources
If using unbinned likelihood you will need to rerun gtdiffrsp for the extended sources or rerun the makeModel function with optional argument psForce=True

Setting source of interest to:
4FGL J2043.7+2741 @ 310.933 27.6936

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/17380838/ft1_filtered_4FGL_J2043.7+2741_weekly_bin906.fits scfile=/lscratch/kocevski/17380838/ft2_4FGL_J2043.7+2741_weekly_bin906.fits outfile=/lscratch/kocevski/17380838/cmap_786931201_787536001_4FGL_J2043.7+2741_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=310.933 yref=27.6936 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.95
user 0.25
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/17380838/ft1_filtered_4FGL_J2043.7+2741_weekly_bin906.fits scfile=/lscratch/kocevski/17380838/ft2_4FGL_J2043.7+2741_weekly_bin906.fits outfile=/lscratch/kocevski/17380838/cmap_HighResolution_786931201_787536001_4FGL_J2043.7+2741_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=310.933 yref=27.6936 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.89
user 0.23
sys 0.15

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/17380838/ft1_filtered_4FGL_J2043.7+2741_weekly_bin906.fits evtable="EVENTS" scfile=/lscratch/kocevski/17380838/ft2_4FGL_J2043.7+2741_weekly_bin906.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/17380838/Model_4FGL_J2043.7+2741_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 Cygnus Cocoon
adding source Cygnus Loop
adding source EG_v02
adding source GAL_V02
adding source gamma Cygni
Working on...
/lscratch/kocevski/17380838/ft1_filtered_4FGL_J2043.7+2741_weekly_bin906.fits.....................!
real 583.00
user 577.78
sys 1.16

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/17380838/ft1_filtered_4FGL_J2043.7+2741_weekly_bin906.fits', '/lscratch/kocevski/17380838/ft2_4FGL_J2043.7+2741_weekly_bin906.fits', expMap='/lscratch/kocevski/17380838/expmap_786931201_787536001_4FGL_J2043.7+2741_weekly_bin906.fits', expCube='/lscratch/kocevski/17380838/ltcube_786931201_787536001_4FGL_J2043.7+2741_weekly_bin906.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/17380838/Model_4FGL_J2043.7+2741_weekly_bin906.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J2043.7+2741'

4FGL J2043.7+2741
   Spectrum: PLSuperExpCutoff2
489    Prefactor:  1.624e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-11)
490       Index1:  7.518e-01  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
491        Scale:  1.085e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed
492    Expfactor:  2.108e+01  0.000e+00 -1.000e+00  1.000e+02 ( 1.000e-03) fixed
493       Index2:  6.667e-01  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/17380838/ft1_filtered_4FGL_J2043.7+2741_weekly_bin906.fits
Spacecraft file(s): /lscratch/kocevski/17380838/ft2_4FGL_J2043.7+2741_weekly_bin906.fits
Exposure map: /lscratch/kocevski/17380838/expmap_786931201_787536001_4FGL_J2043.7+2741_weekly_bin906.fits
Exposure cube: /lscratch/kocevski/17380838/ltcube_786931201_787536001_4FGL_J2043.7+2741_weekly_bin906.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/17380838/Model_4FGL_J2043.7+2741_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) = 71699.4663934

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    8.0692       1.0000          .0000       .10000E+07
     2 'Prefactor '    20.020       1.0000          .0000       .10000E+07
     3 'norm      '    3.8798       1.0000          .0000       .10000E+07
     4 'norm      '    1.5321       1.0000          .0000       .10000E+07
     5 'Prefactor '    1.3657       1.0000         .10000E-03   10000.    
     6 'norm      '    13.056       1.0000          .0000       .10000E+07
     7 'Prefactor '    .54418E-06   1.0000          .0000       .10000E+07
     8 'Prefactor '    31.642       1.0000          .0000       .10000E+07
     9 'Prefactor '    2.3490       1.0000          .0000       .10000E+07
    10 'Prefactor '    .65192E-06   1.0000          .0000       .10000E+07
    11 'Prefactor '    .51126E-07   1.0000          .0000       .10000E+07
    12 'norm      '    .53429E-06   1.0000          .0000       .10000E+07
    13 'norm      '    .22538E-07   1.0000          .0000       .10000E+07
    14 'Normalizat'    1.3056       1.0000         .10000E-01   10.000    
    15 'Prefactor '    1.0109       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .8130E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   71699.47     FROM MIGRAD    STATUS=CONVERGED     84 CALLS     1030 TOTAL
                     EDM=   .45E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.9%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          8.0743        1.0413       -.91474E-07   -.75858E-02
   2  Prefactor     19.957        14.557       -.29929E-05    .57097E-01
   3  norm          3.8816        2.9161        .19278E-06    .90468E-02
   4  norm          1.5317        1.8440        .28349E-06   -.33196E-02
   5  Prefactor     1.3655        1.6372        .20345E-06   -.57380E-03
   6  norm          13.068        1.7136       -.35193E-06   -.14573E-01
   7  Prefactor      .0000        10.064       -.21063E-05** at limit **
   8  Prefactor     31.628        1.0159        .27865E-07    .17368E-02
   9  Prefactor     2.3355        12.133       -.63847E-05   -.25573E-01
  10  Prefactor      .0000        4.4667       -.73189E-07** at limit **
  11  Prefactor      .0000        1.0468        .70488E-08** at limit **
  12  norm           .0000        2.9420       -.22126E-06** at limit **
  13  norm           .0000        .69278       -.16589E-07** at limit **
  14  Normalizat    1.3056        .14222        .18064E-05    .88704E-04
  15  Prefactor     1.0109        .19693E-01    .43198E-06   -.62021E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 8.07426
  Prefactor  = 19.9567
  norm       = 3.88157
  norm       = 1.53169
  Prefactor  = 1.36551
  norm       = 13.0681
  Prefactor  = 0
  Prefactor  = 31.628
  Prefactor  = 2.33552
  Prefactor  = 0
  Prefactor  = 0
  norm       = 0
  norm       = 0
  Normalizat = 1.30562
  Prefactor  = 1.01095
 **********
 **   18 **HESSE 
 **********

 FCN=   71699.47     FROM HESSE     STATUS=OK           220 CALLS     1250 TOTAL
                     EDM=   .18E-04    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          8.0743        9.0983        .35272E-03   -1.5651    
   2  Prefactor     19.957        20.671        .22356E-03   -1.5619    
   3  norm          3.8816        2.9209        .51203E-03   -1.5669    
   4  norm          1.5317        1.8533        .86182E-03   -1.5683    
   5  Prefactor     1.3655        1.6630        .93345E-02   -1.5474    
   6  norm          13.068        13.061        .27696E-03   -1.5636    
   7  Prefactor      .0000        10.033        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     31.628        43.198        .17780E-03   -1.5595    
   9  Prefactor     2.3355        24.070        .66857E-03   -1.5677    
  10  Prefactor      .0000        4.4800        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor      .0000        1.0543        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm           .0000        2.8519        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm           .0000        .66561        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Normalizat    1.3056        .14798        .19070       -.83399    
  15  Prefactor     1.0109        .19586E-01    .28302E-01   -.92366    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.75706e-05
Minuit parameter uncertainties:
  1  9.09832
  2  20.6714
  3  2.9209
  4  1.85328
  5  1.66308
  6  13.061
  7  2.44656e-06
  8  43.1989
  9  14.9956
  10  2.18846e-05
  11  8.5278e-06
  12  3.66691e-06
  13  7.59258e-06
  14  0.14803
  15  0.0195862
Done.

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

Extracting fit parameters...

4FGL J2043.7+2741
   Spectrum: PLSuperExpCutoff2
489    Prefactor:  1.366e+00  1.663e+00  1.000e-04  1.000e+04 ( 1.000e-11)
490       Index1:  7.518e-01  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
491        Scale:  1.085e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed
492    Expfactor:  2.108e+01  0.000e+00 -1.000e+00  1.000e+02 ( 1.000e-03) fixed
493       Index2:  6.667e-01  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
806    Prefactor:  1.011e+00  1.959e-02  0.000e+00  1.000e+01 ( 1.000e+00)
807        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
808        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
805   Normalization:  1.306e+00  1.480e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 1.10
Ra Dec: 310.933 27.694
Photon Index (Fixed Index): 0.75 +/- 0.00
Photon Flux (Fixed Index): 9.96e-09 +/- 1.21e-08
Energy Flux (Fixed Index): 4.65e-06 +/- 5.66e-06

TS (Fixed Index): 1.10
Ra Dec: 310.933 27.694
Photon Flux Upper Limit: 4.05507053267e-08 ph cm-2 s-1
Energy Flux Upper Limit: 1.89117836456e-05 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/17380838/likelihoodResults_786931201_787536001_4FGL_J2043.7+2741_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) = 71699.2366257
delta logL = 0.229170991894

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 71699.2349754
delta logL = 0.23082129391

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    1.4336       1.0000         .10000E-03   10000.    
     2 'Index1    '    .18702E-05   1.0000          .0000       10.000    
     3 'Normalizat'    1.3090       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0110       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .8130E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
 MACHINE ACCURACY LIMITS FURTHER IMPROVEMENT.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   71699.23     FROM MIGRAD    STATUS=CONVERGED     64 CALLS      234 TOTAL
                     EDM=   .28E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     1.4384        1.6755         .0000        .53286E-01
   2  Index1        .29565E-09    1.7599         .0000    ** at limit **
   3  Normalizat    1.3091        .14050         .0000        .20099E-03
   4  Prefactor     1.0109        .18553E-01     .0000       -.19948E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 1.43843
  Index1     = 2.9565e-10
  Normalizat = 1.30905
  Prefactor  = 1.01094
 **********
 **   18 **HESSE 
 **********

 FCN=   71699.23     FROM HESSE     STATUS=OK            35 CALLS      269 TOTAL
                     EDM=   .13E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     1.4384        1.6638        .18032E-02   -1.5468    
   2  Index1        .29565E-09    1.7601        .50000       -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Normalizat    1.3091        .14170        .84954E-03   -.83297    
   4  Prefactor     1.0109        .18887E-01    .12507E-03   -.92366    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.33257e-10
Minuit parameter uncertainties:
  1  1.66383
  2  4.70808e-05
  3  0.141741
  4  0.0188874
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) = 71699.2349708
delta logL = 0.230825888226

Extracting fit parameters...

4FGL J2043.7+2741
   Spectrum: PLSuperExpCutoff2
489    Prefactor:  1.438e+00  1.664e+00  1.000e-04  1.000e+04 ( 1.000e-11)
490       Index1:  2.957e-10  4.708e-05  0.000e+00  1.000e+01 (-1.000e+00)
491        Scale:  1.085e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed
492    Expfactor:  2.108e+01  0.000e+00 -1.000e+00  1.000e+02 ( 1.000e-03) fixed
493       Index2:  6.667e-01  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
806    Prefactor:  1.011e+00  1.889e-02  0.000e+00  1.000e+01 ( 1.000e+00)
807        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
808        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
805   Normalization:  1.309e+00  1.417e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.56
Ra Dec: 310.933 27.694
Photon Index (Free Index): 0.00 +/- 0.00
Photon Flux (Free Index): 5.15e-09 +/- 5.95e-09
Energy Flux (Free Index): 4.56e-06 +/- 5.27e-06

Creating a high resolution counts map...
INFO: Auto-setting vmin to -2.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  2.220e+00 [aplpy.core]
Saving /lscratch/kocevski/17380838/cmap_HighResolution_786931201_787536001_4FGL_J2043.7+2741_weekly_bin906.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.89e-05', comment='SUCCESS', photon_flux='9.96e-09', energy_flux2='4.56e-06', photon_flux_error='1.21e-08', dlogl='2.31e-01', energy_flux='4.65e-06', photon_flux2='5.15e-09', job_status='DONE', time_completed='2025-12-16 03:46:00.981839', photon_index_error2='0.00', photon_index2='0.00', ts='1.10', fit_tolerance='1e-08', GAL='1.01', photon_index_error='0.00', photon_flux_upper_limit='4.06e-08', energy_flux_error2='5.27e-06', EG='1.31', time_epoch_completed='1765885560.98', return_code='0', job_id='17380838', GAL2='1.01', EG2='1.31', return_code2='0', energy_flux_error='5.66e-06', photon_flux_error2='5.95e-09', ts2='1.56', photon_index='0.75' WHERE bin_id='906' AND source_name='4FGL J2043.7+2741' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Dec 16 03:46:01 PST 2025

