/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_J2121.0+1901_weekly_bin906
RA = 320.26, Dec = 19.0324
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='17381042', job_status='RUN', time_executed='2025-12-16 03:14:27.750976', time_epoch_executed='1765883667.75' WHERE source_name='4FGL J2121.0+1901' and cadence='weekly' and bin_id='906'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/17381042

Creating custom pfile directory:
/lscratch/kocevski/17381042/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/17381042/ft1_4FGL_J2121.0+1901_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/17381042/ft2_4FGL_J2121.0+1901_weekly_bin906.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/17381042/ft1_4FGL_J2121.0+1901_weekly_bin906.fits outfile=/lscratch/kocevski/17381042/ft1_filteredMKT_4FGL_J2121.0+1901_weekly_bin906.fits ra=320.26 dec=19.0324 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.99
user 5.22
sys 0.25

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/17381042/ft2_4FGL_J2121.0+1901_weekly_bin906.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/17381042/ft2_4FGL_J2121.0+1901_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/17381042/ft1_filteredMKT_4FGL_J2121.0+1901_weekly_bin906.fits evtable="EVENTS" outfile="/lscratch/kocevski/17381042/ft1_filtered_4FGL_J2121.0+1901_weekly_bin906.fits" apply_filter=yes overwrite=yes header_obstimes=yes tstart=0.0 tstop=0.0 gtifile="default" chatter=3 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

This is gtmktime version HEAD
Applying GTI filter:
IN_SAA!=T && LIVETIME>0 && gtifilter('/sdf/group/fermi/g/LCRepository/Likelihood/GTIs/nogrb.gti',(START+STOP)/2) && (angsep(RA_SUN,DEC_SUN,RA_ZENITH,DEC_ZENITH)>115 || gtifilter('/sdf/group/fermi/g/LCRepository/Likelihood/GTIs/nosolarflares.gti',(START+STOP)/2))
real 1.00
user 0.24
sys 0.15

Number of photons that the gtmktime cut: 2231

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/17381042/ft1_filtered_4FGL_J2121.0+1901_weekly_bin906.fits" evtable="EVENTS" scfile=/lscratch/kocevski/17381042/ft2_4FGL_J2121.0+1901_weekly_bin906.fits sctable="SC_DATA" outfile=/lscratch/kocevski/17381042/ltcube_786931201_787536001_4FGL_J2121.0+1901_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/17381042/ft2_4FGL_J2121.0+1901_weekly_bin906.fits
.....................!
real 20.02
user 19.11
sys 0.26

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/17381042/ft1_filtered_4FGL_J2121.0+1901_weekly_bin906.fits evtable="EVENTS" scfile=/lscratch/kocevski/17381042/ft2_4FGL_J2121.0+1901_weekly_bin906.fits sctable="SC_DATA" expcube=/lscratch/kocevski/17381042/ltcube_786931201_787536001_4FGL_J2121.0+1901_weekly_bin906.fits outfile=/lscratch/kocevski/17381042/expmap_786931201_787536001_4FGL_J2121.0+1901_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/17381042/ltcube_786931201_787536001_4FGL_J2121.0+1901_weekly_bin906.fits
.....................!
real 72.56
user 67.50
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.
Added 193 point sources and 1 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 J2121.0+1901 @ 320.26 19.0324

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/17381042/ft1_filtered_4FGL_J2121.0+1901_weekly_bin906.fits scfile=/lscratch/kocevski/17381042/ft2_4FGL_J2121.0+1901_weekly_bin906.fits outfile=/lscratch/kocevski/17381042/cmap_786931201_787536001_4FGL_J2121.0+1901_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=320.26 yref=19.0324 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.90
user 0.24
sys 0.12

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/17381042/ft1_filtered_4FGL_J2121.0+1901_weekly_bin906.fits scfile=/lscratch/kocevski/17381042/ft2_4FGL_J2121.0+1901_weekly_bin906.fits outfile=/lscratch/kocevski/17381042/cmap_HighResolution_786931201_787536001_4FGL_J2121.0+1901_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=320.26 yref=19.0324 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.96
user 0.25
sys 0.13

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/17381042/ft1_filtered_4FGL_J2121.0+1901_weekly_bin906.fits evtable="EVENTS" scfile=/lscratch/kocevski/17381042/ft2_4FGL_J2121.0+1901_weekly_bin906.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/17381042/Model_4FGL_J2121.0+1901_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 Loop
adding source EG_v02
adding source GAL_V02
Working on...
/lscratch/kocevski/17381042/ft1_filtered_4FGL_J2121.0+1901_weekly_bin906.fits.....................!
real 132.58
user 129.79
sys 1.08

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/17381042/ft1_filtered_4FGL_J2121.0+1901_weekly_bin906.fits', '/lscratch/kocevski/17381042/ft2_4FGL_J2121.0+1901_weekly_bin906.fits', expMap='/lscratch/kocevski/17381042/expmap_786931201_787536001_4FGL_J2121.0+1901_weekly_bin906.fits', expCube='/lscratch/kocevski/17381042/ltcube_786931201_787536001_4FGL_J2121.0+1901_weekly_bin906.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/17381042/Model_4FGL_J2121.0+1901_weekly_bin906.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J2121.0+1901'

4FGL J2121.0+1901
   Spectrum: LogParabola
390         norm:  3.670e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-12)
391        alpha:  2.156e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
392         beta:  5.740e-02  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
393           Eb:  8.783e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/17381042/ft1_filtered_4FGL_J2121.0+1901_weekly_bin906.fits
Spacecraft file(s): /lscratch/kocevski/17381042/ft2_4FGL_J2121.0+1901_weekly_bin906.fits
Exposure map: /lscratch/kocevski/17381042/expmap_786931201_787536001_4FGL_J2121.0+1901_weekly_bin906.fits
Exposure cube: /lscratch/kocevski/17381042/ltcube_786931201_787536001_4FGL_J2121.0+1901_weekly_bin906.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/17381042/Model_4FGL_J2121.0+1901_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) = 23081.4732173

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    3.0127       1.0000          .0000       .10000E+07
     2 'Prefactor '    2.0937       1.0000          .0000       .10000E+07
     3 'Prefactor '    69.705       1.0000          .0000       .10000E+07
     4 'Prefactor '    .90492E-03   1.0000          .0000       .10000E+07
     5 'Prefactor '    7.5411       1.0000          .0000       .10000E+07
     6 'Prefactor '    10.220       1.0000          .0000       .10000E+07
     7 'Prefactor '    .15135E-03   1.0000          .0000       .10000E+07
     8 'Prefactor '    .28824E-05   1.0000          .0000       .10000E+07
     9 'norm      '    .16156E-03   1.0000          .0000       .10000E+07
    10 'norm      '    4.9852       1.0000          .0000       .10000E+07
    11 'Prefactor '    .11405E-05   1.0000          .0000       .10000E+07
    12 'Prefactor '    78.271       1.0000          .0000       .10000E+07
    13 'norm      '    2.2614       1.0000          .0000       .10000E+07
    14 'norm      '    .57554       1.0000          .0000       .10000E+07
    15 'Prefactor '    .41909E-03   1.0000          .0000       .10000E+07
    16 'Prefactor '    40.302       1.0000          .0000       .10000E+07
    17 'norm      '    .37748E-08   1.0000          .0000       .10000E+07
    18 'Normalizat'    1.0129       1.0000         .10000E-01   10.000    
    19 'Prefactor '    .99703       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6610E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   23081.46     FROM MIGRAD    STATUS=CONVERGED    133 CALLS     1471 TOTAL
                     EDM=   .55E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .8%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          3.0110        3.7259        .33057E-07    .47312E-03
   2  Prefactor     2.0866        1.7127        .17233E-07   -.55247E-02
   3  Prefactor     70.223        40.067       -.63925E-07    .80557E-01
   4  Prefactor     .91593E-08    24.639       -.47732E-06** at limit **
   5  Prefactor     7.5409        11.845        .62621E-07   -.25065E-01
   6  Prefactor     10.225        9.6277       -.30783E-07    .16909E-01
   7  Prefactor     .21649E-08    5.6158       -.72161E-07** at limit **
   8  Prefactor     .22760E-08    2.3980       -.62203E-08** at limit **
   9  norm          .31677E-02    3.2236       -.21791E-07** at limit **
  10  norm          4.9819        2.8112        .48465E-07    .14482E-02
  11  Prefactor     .47184E-08    3.9455       -.92283E-07** at limit **
  12  Prefactor     78.616        27.817       -.44867E-07   -.11450    
  13  norm          2.2600        1.3300        .22686E-07    .95502E-03
  14  norm          .57161        1.2239       -.24437E-07   -.17525E-02
  15  Prefactor     .99920E-09    6.6723       -.32649E-07** at limit **
  16  Prefactor     40.365        4.4859        .66447E-09   -.13113    
  17  norm           .0000        .89013        .34082E-07** at limit **
  18  Normalizat    1.0127        .16864       -.22860E-05   -.25361E-03
  19  Prefactor     .99700        .63785E-01    .32309E-07   -.55770E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 3.01101
  Prefactor  = 2.08661
  Prefactor  = 70.2225
  Prefactor  = 9.15934e-09
  Prefactor  = 7.54093
  Prefactor  = 10.2252
  Prefactor  = 2.16493e-09
  Prefactor  = 2.27596e-09
  norm       = 0.00316766
  norm       = 4.9819
  Prefactor  = 4.71845e-09
  Prefactor  = 78.6162
  norm       = 2.25995
  norm       = 0.571609
  Prefactor  = 9.99201e-10
  Prefactor  = 40.3652
  norm       = 0
  Normalizat = 1.01269
  Prefactor  = 0.996996
 **********
 **   18 **HESSE 
 **********

 FCN=   23081.46     FROM HESSE     STATUS=OK           324 CALLS     1795 TOTAL
                     EDM=   .97E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          3.0110        3.7428        .58447E-03   -1.5673    
   2  Prefactor     2.0866        14.453        .71309E-03   -1.5679    
   3  Prefactor     70.223        47.246        .11978E-03   -1.5540    
   4  Prefactor     .91593E-08    24.344        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     7.5409        12.069        .36496E-03   -1.5653    
   6  Prefactor     10.225        9.7435        .31318E-03   -1.5644    
   7  Prefactor     .21649E-08    5.6261        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .22760E-08    2.3833        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          .31677E-02    .91036        .55537E-02   -1.5709    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          4.9819        2.8166        .45017E-03   -1.5663    
  11  Prefactor     .47184E-08    3.8642        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     78.616        52.747        .11304E-03   -1.5531    
  13  norm          2.2600        1.3436        .68282E-03   -1.5678    
  14  norm          .57161        1.2354        .71448E-03   -1.5693    
  15  Prefactor     .99920E-09    6.6724        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     40.365        25.853        .15753E-03   -1.5581    
  17  norm           .0000        .21755        .22385E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    1.0127        .14973        .90831E-01   -.92606    
  19  Prefactor     .99700        .55447E-01    .35097E-01   -.92830    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 9.66725e-07
Minuit parameter uncertainties:
  1  3.7428
  2  10.9831
  3  47.246
  4  0.000943371
  5  12.0688
  6  9.74354
  7  0.000221275
  8  0.000146427
  9  0.1074
  10  2.81661
  11  0.000269952
  12  52.7468
  13  1.34359
  14  1.23537
  15  0.000163953
  16  25.8528
  17  4.39541e-07
  18  0.149789
  19  0.0554498
Done.

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

Extracting fit parameters...

4FGL J2121.0+1901
   Spectrum: LogParabola
390         norm:  4.982e+00  2.817e+00  0.000e+00  1.000e+06 ( 1.000e-12)
391        alpha:  2.156e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
392         beta:  5.740e-02  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
393           Eb:  8.783e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
658    Prefactor:  9.970e-01  5.545e-02  0.000e+00  1.000e+01 ( 1.000e+00)
659        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
660        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
657   Normalization:  1.013e+00  1.498e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 4.85
Ra Dec: 320.260 19.032
Photon Index (Fixed Index): 2.16 +/- 0.00
Photon Flux (Fixed Index): 4.07e-08 +/- 2.30e-08
Energy Flux (Fixed Index): 1.86e-05 +/- 1.05e-05

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) = 23079.6328313
delta logL = 1.82749843982

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 23079.6220899
delta logL = 1.8382398035

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    2.9881       1.0000          .0000       .10000E+07
     2 'alpha     '    3.0117       1.0000          .0000       5.0000    
     3 'Normalizat'    .95176       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0097       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6610E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   23079.62     FROM MIGRAD    STATUS=CONVERGED     53 CALLS      249 TOTAL
                     EDM=   .43E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          2.9886        12.431        .58703E-03    .18060E-01
   2  alpha         3.0118        1.8592        .35065        .22345E-03
   3  Normalizat    .95184        .46965E-01    .93332E-01    .63138E-04
   4  Prefactor     1.0097        .16712E-01    .43368E-01   -.21887E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 2.98857
  alpha      = 3.01178
  Normalizat = 0.951836
  Prefactor  = 1.00969
 **********
 **   18 **HESSE 
 **********

 FCN=   23079.62     FROM HESSE     STATUS=OK            33 CALLS      282 TOTAL
                     EDM=   .11E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          2.9886        2.7338        .10247E-04   -1.5673    
   2  alpha         3.0118        .58939        .12516E-01    .20617    
   3  Normalizat    .95184        .17022        .41339E-03   -.94662    
   4  Prefactor     1.0097        .64286E-01    .15417E-03   -.92407    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.05747e-10
Minuit parameter uncertainties:
  1  2.73384
  2  0.595241
  3  0.170315
  4  0.0642905
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) = 23079.6220894
delta logL = 1.83824031666

Extracting fit parameters...

4FGL J2121.0+1901
   Spectrum: LogParabola
390         norm:  2.989e+00  2.734e+00  0.000e+00  1.000e+06 ( 1.000e-12)
391        alpha:  3.012e+00  5.952e-01  0.000e+00  5.000e+00 ( 1.000e+00)
392         beta:  5.740e-02  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
393           Eb:  8.783e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
658    Prefactor:  1.010e+00  6.429e-02  0.000e+00  1.000e+01 ( 1.000e+00)
659        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
660        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
657   Normalization:  9.518e-01  1.703e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 8.71
Ra Dec: 320.260 19.032
Photon Index (Free Index): 3.01 +/- 0.60
Photon Flux (Free Index): 8.70e-08 +/- 3.86e-08
Energy Flux (Free Index): 1.80e-05 +/- 7.82e-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/17381042/cmap_HighResolution_786931201_787536001_4FGL_J2121.0+1901_weekly_bin906.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='4.07e-08', energy_flux2='1.80e-05', photon_flux_error='2.30e-08', dlogl='1.84e+00', energy_flux='1.86e-05', photon_flux2='8.70e-08', job_status='DONE', time_completed='2025-12-16 03:28:57.421334', photon_index_error2='0.60', photon_index2='3.01', ts='4.85', fit_tolerance='1e-08', GAL='1.00', photon_index_error='0.00', energy_flux_error2='7.82e-06', EG='1.01', time_epoch_completed='1765884537.42', return_code='0', job_id='17381042', GAL2='1.01', EG2='0.95', return_code2='0', energy_flux_error='1.05e-05', photon_flux_error2='3.86e-08', ts2='8.71', photon_index='2.16' WHERE bin_id='906' AND source_name='4FGL J2121.0+1901' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Dec 16 03:28:57 PST 2025

