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


Performing analysis on: 4FGL_J2121.0+1901_weekly_bin853
RA = 320.26, Dec = 19.0324
tmin = 754876801, tmax = 755481601
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='59979258', job_status='RUN', time_executed='2024-12-10 01:21:16.121672', time_epoch_executed='1733822476.12' WHERE source_name='4FGL J2121.0+1901' and cadence='weekly' and bin_id='853'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/59979258

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

Retrieving the FT1 file...

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

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

Retrieving 107 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/59979258/ft1_4FGL_J2121.0+1901_weekly_bin853.fits


Retrieving the FT1 file...

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

Retrieving 107 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/59979258/ft2_4FGL_J2121.0+1901_weekly_bin853.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/59979258/ft1_4FGL_J2121.0+1901_weekly_bin853.fits outfile=/lscratch/kocevski/59979258/ft1_filteredMKT_4FGL_J2121.0+1901_weekly_bin853.fits ra=320.26 dec=19.0324 rad=12.0 tmin=754876801.0 tmax=755481601.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 3.31
user 2.89
sys 0.27

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

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/59979258/ft2_4FGL_J2121.0+1901_weekly_bin853.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/59979258/ft1_filteredMKT_4FGL_J2121.0+1901_weekly_bin853.fits evtable="EVENTS" outfile="/lscratch/kocevski/59979258/ft1_filtered_4FGL_J2121.0+1901_weekly_bin853.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.73
user 0.20
sys 0.16

Number of photons that the gtmktime cut: 3447

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/59979258/ft1_filtered_4FGL_J2121.0+1901_weekly_bin853.fits" evtable="EVENTS" scfile=/lscratch/kocevski/59979258/ft2_4FGL_J2121.0+1901_weekly_bin853.fits sctable="SC_DATA" outfile=/lscratch/kocevski/59979258/ltcube_754876801_755481601_4FGL_J2121.0+1901_weekly_bin853.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/59979258/ft2_4FGL_J2121.0+1901_weekly_bin853.fits
.....................!
real 17.75
user 17.26
sys 0.31

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/59979258/ft1_filtered_4FGL_J2121.0+1901_weekly_bin853.fits evtable="EVENTS" scfile=/lscratch/kocevski/59979258/ft2_4FGL_J2121.0+1901_weekly_bin853.fits sctable="SC_DATA" expcube=/lscratch/kocevski/59979258/ltcube_754876801_755481601_4FGL_J2121.0+1901_weekly_bin853.fits outfile=/lscratch/kocevski/59979258/expmap_754876801_755481601_4FGL_J2121.0+1901_weekly_bin853.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/59979258/ltcube_754876801_755481601_4FGL_J2121.0+1901_weekly_bin853.fits
.....................!
real 63.54
user 59.59
sys 3.56

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/59979258/ft1_filtered_4FGL_J2121.0+1901_weekly_bin853.fits scfile=/lscratch/kocevski/59979258/ft2_4FGL_J2121.0+1901_weekly_bin853.fits outfile=/lscratch/kocevski/59979258/cmap_754876801_755481601_4FGL_J2121.0+1901_weekly_bin853.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.39
user 0.23
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/59979258/ft1_filtered_4FGL_J2121.0+1901_weekly_bin853.fits scfile=/lscratch/kocevski/59979258/ft2_4FGL_J2121.0+1901_weekly_bin853.fits outfile=/lscratch/kocevski/59979258/cmap_HighResolution_754876801_755481601_4FGL_J2121.0+1901_weekly_bin853.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.41
user 0.23
sys 0.14

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/59979258/ft1_filtered_4FGL_J2121.0+1901_weekly_bin853.fits evtable="EVENTS" scfile=/lscratch/kocevski/59979258/ft2_4FGL_J2121.0+1901_weekly_bin853.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/59979258/Model_4FGL_J2121.0+1901_weekly_bin853.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/59979258/ft1_filtered_4FGL_J2121.0+1901_weekly_bin853.fits.....................!
real 178.93
user 176.96
sys 0.90

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/59979258/ft1_filtered_4FGL_J2121.0+1901_weekly_bin853.fits', '/lscratch/kocevski/59979258/ft2_4FGL_J2121.0+1901_weekly_bin853.fits', expMap='/lscratch/kocevski/59979258/expmap_754876801_755481601_4FGL_J2121.0+1901_weekly_bin853.fits', expCube='/lscratch/kocevski/59979258/ltcube_754876801_755481601_4FGL_J2121.0+1901_weekly_bin853.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/59979258/Model_4FGL_J2121.0+1901_weekly_bin853.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/59979258/ft1_filtered_4FGL_J2121.0+1901_weekly_bin853.fits
Spacecraft file(s): /lscratch/kocevski/59979258/ft2_4FGL_J2121.0+1901_weekly_bin853.fits
Exposure map: /lscratch/kocevski/59979258/expmap_754876801_755481601_4FGL_J2121.0+1901_weekly_bin853.fits
Exposure cube: /lscratch/kocevski/59979258/ltcube_754876801_755481601_4FGL_J2121.0+1901_weekly_bin853.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/59979258/Model_4FGL_J2121.0+1901_weekly_bin853.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) = 36094.6635271

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    6.1419       1.0000          .0000       .10000E+07
     2 'Prefactor '    .26020E-04   1.0000          .0000       .10000E+07
     3 'Prefactor '    34.955       1.0000          .0000       .10000E+07
     4 'Prefactor '    1.2863       1.0000          .0000       .10000E+07
     5 'Prefactor '    .18219E-06   1.0000          .0000       .10000E+07
     6 'Prefactor '    .33267E-04   1.0000          .0000       .10000E+07
     7 'Prefactor '    1.2464       1.0000          .0000       .10000E+07
     8 'Prefactor '    .80455E-01   1.0000          .0000       .10000E+07
     9 'norm      '    2.1428       1.0000          .0000       .10000E+07
    10 'norm      '    1.0196       1.0000          .0000       .10000E+07
    11 'Prefactor '    .13878E-08   1.0000          .0000       .10000E+07
    12 'Prefactor '    .28202E-04   1.0000          .0000       .10000E+07
    13 'norm      '    .28366E-07   1.0000          .0000       .10000E+07
    14 'norm      '    .30588E-01   1.0000          .0000       .10000E+07
    15 'Prefactor '    16.999       1.0000          .0000       .10000E+07
    16 'Prefactor '    10.120       1.0000          .0000       .10000E+07
    17 'norm      '    .29421E-08   1.0000          .0000       .10000E+07
    18 'Normalizat'    .91902       1.0000         .10000E-01   10.000    
    19 'Prefactor '    1.0118       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=   36094.66     FROM MIGRAD    STATUS=CONVERGED    140 CALLS     1489 TOTAL
                     EDM=   .17E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.1%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          6.1416        5.0654        .45048E-06    .16434E-01
   2  Prefactor     .25535E-08    2.6422        .26296E-06** at limit **
   3  Prefactor     34.959        2.4464       -.10389E-06    .12643    
   4  Prefactor     1.2878        4.2910       -.30366E-07    .53740E-02
   5  Prefactor      .0000        3.9154       -.39328E-07** at limit **
   6  Prefactor     .49960E-09    2.7519       -.11804E-07** at limit **
   7  Prefactor     1.2810        1.2900        .13620E-06   -.36718E-02
   8  Prefactor     .99198E-01    12.539       -.11412E-05** at limit **
   9  norm          2.1349        2.0986        .60450E-07   -.28740E-02
  10  norm          1.0195        1.0455        .36045E-08    .80501E-03
  11  Prefactor     .44409E-09    1.3927        .14424E-06** at limit **
  12  Prefactor     .28866E-08    16.538       -.40175E-06** at limit **
  13  norm           .0000        .25080        .40012E-07** at limit **
  14  norm          .34384E-01    4.8132       -.29981E-06** at limit **
  15  Prefactor     17.021        1.3260       -.53246E-07    .28577E-01
  16  Prefactor     10.128        1.8347        .12096E-06   -.32055E-01
  17  norm           .0000        .11630        .54739E-08** at limit **
  18  Normalizat    .91886        .12829       -.52486E-06    .52263E-03
  19  Prefactor     1.0118        .49158E-01    .57299E-06    .19059E-02
                               ERR DEF=  .500    
Final values: 
  norm       = 6.14156
  Prefactor  = 2.55351e-09
  Prefactor  = 34.9587
  Prefactor  = 1.28777
  Prefactor  = 0
  Prefactor  = 4.996e-10
  Prefactor  = 1.28104
  Prefactor  = 0.0991978
  norm       = 2.13487
  norm       = 1.01946
  Prefactor  = 4.44089e-10
  Prefactor  = 2.88658e-09
  norm       = 0
  norm       = 0.0343842
  Prefactor  = 17.0213
  Prefactor  = 10.1281
  norm       = 0
  Normalizat = 0.918857
  Prefactor  = 1.01181
 **********
 **   18 **HESSE 
 **********

 FCN=   36094.66     FROM HESSE     STATUS=OK           320 CALLS     1809 TOTAL
                     EDM=   .12E-05    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          6.1416        5.1211        .40486E-03   -1.5658    
   2  Prefactor     .25535E-08    2.6636        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     34.959        35.540        .16916E-03   -1.5590    
   4  Prefactor     1.2878        4.2695        .97698E-03   -1.5685    
   5  Prefactor      .0000        3.9170        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .49960E-09    2.7777        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     1.2810        30.790        .10024E-02   -1.5685    
   8  Prefactor     .99198E-01    .42870        .91117E-02   -1.5702    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          2.1349        2.0792        .70378E-03   -1.5679    
  10  norm          1.0195        1.0447        .12812E-02   -1.5688    
  11  Prefactor     .44409E-09    1.3881        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .28866E-08    16.685        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm           .0000        .24987        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          .34384E-01    .27322        .54807E-02   -1.5704    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     17.021        12.932        .24265E-03   -1.5625    
  16  Prefactor     10.128        10.571        .31473E-03   -1.5644    
  17  norm           .0000        .11550        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    .91886        .11320        .91778E-01   -.95801    
  19  Prefactor     1.0118        .42056E-01    .43073E-01   -.92337    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.15346e-06
Minuit parameter uncertainties:
  1  5.12111
  2  0.000164604
  3  35.5403
  4  4.26948
  5  1.87711e-05
  6  7.3271e-05
  7  12.5609
  8  0.412435
  9  2.07917
  10  1.0447
  11  4.90423e-05
  12  0.000438183
  13  3.75188e-06
  14  0.19385
  15  12.9316
  16  10.5714
  17  3.88803e-07
  18  0.113231
  19  0.0420574
Done.

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

Extracting fit parameters...

4FGL J2121.0+1901
   Spectrum: LogParabola
390         norm:  1.019e+00  1.045e+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:  1.012e+00  4.206e-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.189e-01  1.132e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 2.99
Ra Dec: 320.260 19.032
Photon Index (Fixed Index): 2.16 +/- 0.00
Photon Flux (Fixed Index): 8.33e-09 +/- 8.53e-09
Energy Flux (Fixed Index): 3.81e-06 +/- 3.91e-06

TS (Fixed Index): 2.99
Ra Dec: 320.260 19.032
Photon Flux Upper Limit: 3.28621602361e-08 ph cm-2 s-1
Energy Flux Upper Limit: 1.50428843549e-05 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/59979258/likelihoodResults_754876801_755481601_4FGL_J2121.0+1901_weekly_bin853.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) = 36093.7703967
delta logL = 0.890843438669

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 36093.7675311
delta logL = 0.89370905175

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .54660       1.0000          .0000       .10000E+07
     2 'alpha     '    1.1260       1.0000          .0000       5.0000    
     3 'Normalizat'    .92387       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0114       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=   36093.77     FROM MIGRAD    STATUS=CONVERGED     50 CALLS      225 TOTAL
                     EDM=   .16E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .54659        .53184        .74154E-03    .42674E-02
   2  alpha         1.1261        .37105        .50000       -.22447E-03
   3  Normalizat    .92380        .10786        .91552E-01    .13538E-03
   4  Prefactor     1.0115        .41602E-01    .43124E-01   -.23702E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 0.546587
  alpha      = 1.12607
  Normalizat = 0.923796
  Prefactor  = 1.01147
 **********
 **   18 **HESSE 
 **********

 FCN=   36093.77     FROM HESSE     STATUS=OK            33 CALLS      258 TOTAL
                     EDM=   .64E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .54659        .72015        .13094E-04   -1.5693    
   2  alpha         1.1261        .59029        .32516E-01   -.58185    
   3  Normalizat    .92380        .12610        .40549E-03   -.95629    
   4  Prefactor     1.0115        .48771E-01    .14934E-03   -.92348    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.40102e-08
Minuit parameter uncertainties:
  1  0.720147
  2  0.598441
  3  0.126143
  4  0.0487728
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) = 36093.7675309
delta logL = 0.893709230753

Extracting fit parameters...

4FGL J2121.0+1901
   Spectrum: LogParabola
390         norm:  5.466e-01  7.201e-01  0.000e+00  1.000e+06 ( 1.000e-12)
391        alpha:  1.126e+00  5.984e-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.011e+00  4.877e-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.238e-01  1.261e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 4.77
Ra Dec: 320.260 19.032
Photon Index (Free Index): 1.13 +/- 0.60
Photon Flux (Free Index): 2.35e-09 +/- 2.74e-09
Energy Flux (Free Index): 1.43e-05 +/- 2.01e-05

Creating a high resolution counts map...
INFO: Auto-setting vmin to -1.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  1.110e+00 [aplpy.core]
Saving /lscratch/kocevski/59979258/cmap_HighResolution_754876801_755481601_4FGL_J2121.0+1901_weekly_bin853.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.50e-05', comment='SUCCESS', photon_flux='8.33e-09', energy_flux2='1.43e-05', photon_flux_error='8.53e-09', dlogl='8.94e-01', energy_flux='3.81e-06', photon_flux2='2.35e-09', job_status='DONE', time_completed='2024-12-10 01:36:21.177495', photon_index_error2='0.60', photon_index2='1.13', ts='2.99', fit_tolerance='1e-08', GAL='1.01', photon_index_error='0.00', photon_flux_upper_limit='3.29e-08', energy_flux_error2='2.01e-05', EG='0.92', time_epoch_completed='1733823381.18', return_code='0', job_id='59979258', GAL2='1.01', EG2='0.92', return_code2='0', energy_flux_error='3.91e-06', photon_flux_error2='2.74e-09', ts2='4.77', photon_index='2.16' WHERE bin_id='853' AND source_name='4FGL J2121.0+1901' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Dec 10 01:36:21 PST 2024

