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


Performing analysis on: 4FGL_J1821.6+6819_weekly_bin855
RA = 275.403, Dec = 68.3242
tmin = 756086401, tmax = 756691201
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='60730227', job_status='RUN', time_executed='2024-12-24 03:56:12.611052', time_epoch_executed='1735041372.61' WHERE source_name='4FGL J1821.6+6819' and cadence='weekly' and bin_id='855'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/60730227

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

Retrieving the FT1 file...

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

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

Retrieving 65 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/60730227/ft1_4FGL_J1821.6+6819_weekly_bin855.fits


Retrieving the FT1 file...

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

Retrieving 65 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/60730227/ft2_4FGL_J1821.6+6819_weekly_bin855.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/60730227/ft1_4FGL_J1821.6+6819_weekly_bin855.fits outfile=/lscratch/kocevski/60730227/ft1_filteredMKT_4FGL_J1821.6+6819_weekly_bin855.fits ra=275.403 dec=68.3242 rad=12.0 tmin=756086401.0 tmax=756691201.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 2.93
user 2.41
sys 0.28

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/60730227/ft2_4FGL_J1821.6+6819_weekly_bin855.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/60730227/ft2_4FGL_J1821.6+6819_weekly_bin855.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/60730227/ft1_filteredMKT_4FGL_J1821.6+6819_weekly_bin855.fits evtable="EVENTS" outfile="/lscratch/kocevski/60730227/ft1_filtered_4FGL_J1821.6+6819_weekly_bin855.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.44
user 0.20
sys 0.16

Number of photons that the gtmktime cut: 1730

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/60730227/ft1_filtered_4FGL_J1821.6+6819_weekly_bin855.fits" evtable="EVENTS" scfile=/lscratch/kocevski/60730227/ft2_4FGL_J1821.6+6819_weekly_bin855.fits sctable="SC_DATA" outfile=/lscratch/kocevski/60730227/ltcube_756086401_756691201_4FGL_J1821.6+6819_weekly_bin855.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/60730227/ft2_4FGL_J1821.6+6819_weekly_bin855.fits
.....................!
real 15.21
user 14.61
sys 0.41

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/60730227/ft1_filtered_4FGL_J1821.6+6819_weekly_bin855.fits evtable="EVENTS" scfile=/lscratch/kocevski/60730227/ft2_4FGL_J1821.6+6819_weekly_bin855.fits sctable="SC_DATA" expcube=/lscratch/kocevski/60730227/ltcube_756086401_756691201_4FGL_J1821.6+6819_weekly_bin855.fits outfile=/lscratch/kocevski/60730227/expmap_756086401_756691201_4FGL_J1821.6+6819_weekly_bin855.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/60730227/ltcube_756086401_756691201_4FGL_J1821.6+6819_weekly_bin855.fits
.....................!
real 60.25
user 56.55
sys 3.31

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

Setting source of interest to:
4FGL J1821.6+6819 @ 275.403 68.3242

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/60730227/ft1_filtered_4FGL_J1821.6+6819_weekly_bin855.fits scfile=/lscratch/kocevski/60730227/ft2_4FGL_J1821.6+6819_weekly_bin855.fits outfile=/lscratch/kocevski/60730227/cmap_756086401_756691201_4FGL_J1821.6+6819_weekly_bin855.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=275.403 yref=68.3242 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.22
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/60730227/ft1_filtered_4FGL_J1821.6+6819_weekly_bin855.fits scfile=/lscratch/kocevski/60730227/ft2_4FGL_J1821.6+6819_weekly_bin855.fits outfile=/lscratch/kocevski/60730227/cmap_HighResolution_756086401_756691201_4FGL_J1821.6+6819_weekly_bin855.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=275.403 yref=68.3242 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.43
user 0.22
sys 0.15

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/60730227/ft1_filtered_4FGL_J1821.6+6819_weekly_bin855.fits evtable="EVENTS" scfile=/lscratch/kocevski/60730227/ft2_4FGL_J1821.6+6819_weekly_bin855.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/60730227/Model_4FGL_J1821.6+6819_weekly_bin855.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/60730227/ft1_filtered_4FGL_J1821.6+6819_weekly_bin855.fits.....................!
real 65.90
user 64.24
sys 1.21

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/60730227/ft1_filtered_4FGL_J1821.6+6819_weekly_bin855.fits', '/lscratch/kocevski/60730227/ft2_4FGL_J1821.6+6819_weekly_bin855.fits', expMap='/lscratch/kocevski/60730227/expmap_756086401_756691201_4FGL_J1821.6+6819_weekly_bin855.fits', expCube='/lscratch/kocevski/60730227/ltcube_756086401_756691201_4FGL_J1821.6+6819_weekly_bin855.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/60730227/Model_4FGL_J1821.6+6819_weekly_bin855.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1821.6+6819'

4FGL J1821.6+6819
   Spectrum: PowerLaw
357    Prefactor:  4.076e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-12)
358        Index:  2.718e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
359        Scale:  5.847e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/60730227/ft1_filtered_4FGL_J1821.6+6819_weekly_bin855.fits
Spacecraft file(s): /lscratch/kocevski/60730227/ft2_4FGL_J1821.6+6819_weekly_bin855.fits
Exposure map: /lscratch/kocevski/60730227/expmap_756086401_756691201_4FGL_J1821.6+6819_weekly_bin855.fits
Exposure cube: /lscratch/kocevski/60730227/ltcube_756086401_756691201_4FGL_J1821.6+6819_weekly_bin855.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/60730227/Model_4FGL_J1821.6+6819_weekly_bin855.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) = 17565.7818374

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    10.935       1.0000          .0000       .10000E+07
     2 'Prefactor '    .74271E-02   1.0000          .0000       .10000E+07
     3 'Prefactor '    .12309E-02   1.0000          .0000       .10000E+07
     4 'norm      '    .11657E-08   1.0000          .0000       .10000E+07
     5 'norm      '    4.8331       1.0000          .0000       .10000E+07
     6 'Prefactor '    .94564E-04   1.0000          .0000       .10000E+07
     7 'Prefactor '    .16653E-09   1.0000          .0000       .10000E+07
     8 'Prefactor '    .10835E-02   1.0000          .0000       .10000E+07
     9 'Prefactor '    .22144       1.0000          .0000       .10000E+07
    10 'Prefactor '    22.289       1.0000          .0000       .10000E+07
    11 'Prefactor '    16.621       1.0000          .0000       .10000E+07
    12 'Prefactor '    .48316E-02   1.0000          .0000       .10000E+07
    13 'Prefactor '    .33539E-01   1.0000          .0000       .10000E+07
    14 'norm      '    6.4505       1.0000          .0000       .10000E+07
    15 'norm      '    3.4054       1.0000          .0000       .10000E+07
    16 'norm      '    .44297E-04   1.0000          .0000       .10000E+07
    17 'Prefactor '    .18820E-03   1.0000          .0000       .10000E+07
    18 'Prefactor '    .20637       1.0000          .0000       .10000E+07
    19 'Prefactor '    4.3691       1.0000          .0000       .10000E+07
    20 'norm      '    18.760       1.0000          .0000       .10000E+07
    21 'Prefactor '    .34306E-07   1.0000          .0000       .10000E+07
    22 'Prefactor '    .66099E-02   1.0000          .0000       .10000E+07
    23 'Prefactor '    .94872       1.0000          .0000       .10000E+07
    24 'norm      '    4.8960       1.0000          .0000       .10000E+07
    25 'norm      '    .12323E-01   1.0000          .0000       .10000E+07
    26 'norm      '    41.205       1.0000          .0000       .10000E+07
    27 'Prefactor '    .39491E-06   1.0000          .0000       .10000E+07
    28 'Prefactor '    4.6702       1.0000          .0000       .10000E+07
    29 'norm      '    4.1228       1.0000          .0000       .10000E+07
    30 'norm      '    .44574E-03   1.0000          .0000       .10000E+07
    31 'norm      '    2.2015       1.0000          .0000       .10000E+07
    32 'norm      '    .53697E-03   1.0000          .0000       .10000E+07
    33 'Prefactor '    48.378       1.0000          .0000       .10000E+07
    34 'norm      '    .15377E-07   1.0000          .0000       .10000E+07
    35 'Prefactor '    28.850       1.0000          .0000       .10000E+07
    36 'Normalizat'    1.1961       1.0000         .10000E-01   10.000    
    37 'Prefactor '    .96242       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6200E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   17562.53     FROM MIGRAD    STATUS=CONVERGED    295 CALLS     2359 TOTAL
                     EDM=   .66E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.7%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          10.844        1.7023        .56347E-07    .50199E-02
   2  Prefactor     .86042E-08    33.333       -.17135E-05** at limit **
   3  Prefactor     .13711E-07    20.733        .21081E-05** at limit **
   4  norm           .0000        2.6193       -.19220E-06** at limit **
   5  norm          4.8335        .94770        .78144E-07   -.11750E-01
   6  Prefactor     .49960E-09    74.131        .32685E-05** at limit **
   7  Prefactor      .0000        1.9579       -.66837E-07** at limit **
   8  Prefactor      .0000        7.7976        .31431E-06** at limit **
   9  Prefactor     .37209        20.860        .10050E-05    .66508E-04
  10  Prefactor     22.128        2.0714        .20452E-06   -.41866E-02
  11  Prefactor     16.389        9.7083       -.18033E-06   -.56840E-03
  12  Prefactor     .29421E-08    18.830       -.20769E-05** at limit **
  13  Prefactor      .0000        30.816       -.20927E-06** at limit **
  14  norm          6.4509        2.1795        .28967E-07    .11231E-02
  15  norm          3.4074        .73489       -.21788E-07   -.17960E-02
  16  norm           .0000        2.3549       -.35261E-06** at limit **
  17  Prefactor     .44409E-09    13.742        .70003E-06** at limit **
  18  Prefactor     .71054E-08    72.781        .87698E-07** at limit **
  19  Prefactor     4.3742        4.8125       -.66735E-06    .28196E-02
  20  norm          18.772        9.7502        .15137E-07    .65478E-03
  21  Prefactor      .0000        3.2747        .11322E-06** at limit **
  22  Prefactor     .91427E-07    214.06        .38208E-05** at limit **
  23  Prefactor     .59003E-06    813.40       -.33021E-05** at limit **
  24  norm          4.9101        2.5880       -.48458E-06    .71299E-02
  25  norm          .65412E-02    1.5303        .27466E-06** at limit **
  26  norm          41.442        12.314       -.30234E-06   -.32655E-02
  27  Prefactor      .0000        2.3439       -.29439E-06** at limit **
  28  Prefactor     4.6743        4.2587        .96639E-07    .14362E-02
  29  norm          4.1192        1.2644       -.43839E-07   -.68312E-02
  30  norm          .11102E-09    7.0847       -.73278E-07** at limit **
  31  norm          2.2076        3.0773        .12157E-06   -.59847E-04
  32  norm          .13989E-07    27.203        .11585E-05** at limit **
  33  Prefactor     48.583        7.5213       -.57415E-06    .97094E-01
  34  norm           .0000        .92282       -.80598E-07** at limit **
  35  Prefactor     28.717        13.980       -.17551E-05   -.38066E-01
  36  Normalizat    1.1956        .17588       -.18577E-05   -.45922E-04
  37  Prefactor     .96251        .85465E-01    .33525E-05    .38007E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 10.8442
  Prefactor  = 8.60423e-09
  Prefactor  = 1.37113e-08
  norm       = 0
  norm       = 4.83352
  Prefactor  = 4.996e-10
  Prefactor  = 0
  Prefactor  = 0
  Prefactor  = 0.372091
  Prefactor  = 22.1278
  Prefactor  = 16.3889
  Prefactor  = 2.94209e-09
  Prefactor  = 0
  norm       = 6.45089
  norm       = 3.40742
  norm       = 0
  Prefactor  = 4.44089e-10
  Prefactor  = 7.10543e-09
  Prefactor  = 4.37422
  norm       = 18.7717
  Prefactor  = 0
  Prefactor  = 9.14269e-08
  Prefactor  = 5.90028e-07
  norm       = 4.91009
  norm       = 0.00654122
  norm       = 41.4423
  Prefactor  = 0
  Prefactor  = 4.67429
  norm       = 4.11921
  norm       = 1.11022e-10
  norm       = 2.20758
  norm       = 1.39888e-08
  Prefactor  = 48.5831
  norm       = 0
  Prefactor  = 28.717
  Normalizat = 1.19563
  Prefactor  = 0.962511
 **********
 **   18 **HESSE 
 **********

 FCN=   17562.53     FROM HESSE     STATUS=OK           945 CALLS     3304 TOTAL
                     EDM=   .84E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          10.844        14.816        .30273E-03   -1.5642    
   2  Prefactor     .86042E-08    33.497        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .13711E-07    21.091        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  norm           .0000        2.6185        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          4.8335        .97941        .45735E-03   -1.5664    
   6  Prefactor     .49960E-09    7.0625        .68115E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor      .0000        1.9374        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor      .0000        7.8067        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .37209        3.2279        .80470E-02   -1.5696    
  10  Prefactor     22.128        20.179        .21187E-03   -1.5614    
  11  Prefactor     16.389        9.7451        .24540E-03   -1.5627    
  12  Prefactor     .29421E-08    19.190        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor      .0000        30.836        .16269E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          6.4509        2.1782        .39493E-03   -1.5657    
  15  norm          3.4074        .74911        .54797E-03   -1.5671    
  16  norm           .0000        2.3402        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     .44409E-09    13.748        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .71054E-08    73.485        .11664E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     4.3742        4.8232        .48162E-03   -1.5666    
  20  norm          18.772        9.7599        .23096E-03   -1.5621    
  21  Prefactor      .0000        3.2805        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     .91427E-07    208.57        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .59003E-06    809.59        .42449E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  norm          4.9101        2.6032        .45434E-03   -1.5664    
  25  norm          .65412E-02    1.9818        .67113E-02   -1.5706    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  norm          41.442        13.128        .15580E-03   -1.5579    
  27  Prefactor      .0000        2.3475        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  Prefactor     4.6743        4.2848        .46544E-03   -1.5665    
  29  norm          4.1192        1.2965        .49622E-03   -1.5667    
  30  norm          .11102E-09    7.1106        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  31  norm          2.2076        3.1039        .69314E-03   -1.5678    
  32  norm          .13989E-07    27.123        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  33  Prefactor     48.583        18.181        .14378E-03   -1.5569    
  34  norm           .0000        .92065        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  35  Prefactor     28.717        14.992        .18621E-03   -1.5601    
  36  Normalizat    1.1956        .16363        .84142E-01   -.86738    
  37  Prefactor     .96251        .76931E-01    .45796E-01   -.93990    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 8.43187e-08
Minuit parameter uncertainties:
  1  14.8157
  2  0.0010731
  3  0.00107574
  4  1.39924e-05
  5  0.979409
  6  0.000119907
  7  3.53188e-06
  8  1.46992e-06
  9  2.19188
  10  20.179
  11  9.74516
  12  0.000476159
  13  2.32114e-05
  14  2.17822
  15  0.749105
  16  1.57412e-05
  17  0.000159245
  18  0.00144243
  19  4.82316
  20  9.75995
  21  7.97178e-06
  22  0.00873521
  23  0.043718
  24  2.60324
  25  0.227714
  26  13.1284
  27  1.31109e-05
  28  4.28477
  29  1.29646
  30  5.00613e-05
  31  3.10395
  32  0.00123197
  33  18.1811
  34  1.5247e-06
  35  14.9923
  36  0.163699
  37  0.0769392
Done.

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

Extracting fit parameters...

4FGL J1821.6+6819
   Spectrum: PowerLaw
357    Prefactor:  4.374e+00  4.823e+00  0.000e+00  1.000e+06 ( 1.000e-12)
358        Index:  2.718e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
359        Scale:  5.847e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
617    Prefactor:  9.625e-01  7.694e-02  0.000e+00  1.000e+01 ( 1.000e+00)
618        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
619        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
616   Normalization:  1.196e+00  1.637e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 1.08
Ra Dec: 275.403 68.324
Photon Index (Fixed Index): 2.72 +/- 0.00
Photon Flux (Fixed Index): 3.10e-08 +/- 3.41e-08
Energy Flux (Fixed Index): 7.35e-06 +/- 8.10e-06

TS (Fixed Index): 1.08
Ra Dec: 275.403 68.324
Photon Flux Upper Limit: 9.68712843273e-08 ph cm-2 s-1
Energy Flux Upper Limit: 0.00763378754652 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/60730227/likelihoodResults_756086401_756691201_4FGL_J1821.6+6819_weekly_bin855.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) = 17562.3822116
delta logL = 0.151082812805

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 17562.3743834
delta logL = 0.158911068316

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    2.4428       1.0000          .0000       .10000E+07
     2 'Index     '    3.4489       1.0000          .0000       10.000    
     3 'Normalizat'    1.1768       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .96867       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6200E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
 MIGRAD TERMINATED WITHOUT CONVERGENCE.

 FCN=   17562.37     FROM MIGRAD    STATUS=FAILED        94 CALLS      288 TOTAL
                     EDM=   .28E-06    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     2.4428        99.059        .89910E-04   -.20015E-01
   2  Index         3.4489        6.0768        .12023E-01    .64316E-04
   3  Normalizat    1.1769        .15080        .37516E-03   -.24243E-06
   4  Prefactor     .96867        .78440E-01    .20963E-03    .21693E-06
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   17562.37     FROM SIMPLEX   STATUS=UNCHANGED     88 CALLS      376 TOTAL
                     EDM=   .16E-04    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     2.4428        99.059        .12486E-04   -.20015E-01
   2  Index         3.4489        6.0768        .12582E-02    .64316E-04
   3  Normalizat    1.1769        .15080        .83181E-04   -.24243E-06
   4  Prefactor     .96867        .78440E-01    .73187E-04    .21693E-06
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   17562.37     FROM MIGRAD    STATUS=CONVERGED     33 CALLS      409 TOTAL
                     EDM=   .30E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     2.4432        5.2969        .35964E-05   -.10369E-02
   2  Index         3.4488        1.5828        .48091E-03   -.10213E-04
   3  Normalizat    1.1769        .16583        .15006E-04    .78790E-05
   4  Prefactor     .96867        .83049E-01    .83852E-05   -.32539E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 2.4432
  Index      = 3.4488
  Normalizat = 1.17688
  Prefactor  = 0.968667
 **********
 **   18 **HESSE 
 **********

 FCN=   17562.37     FROM HESSE     STATUS=OK            23 CALLS      432 TOTAL
                     EDM=   .31E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     2.4432        5.1468        .14386E-06   -1.5677    
   2  Index         3.4488        1.5400        .19236E-04   -.31544    
   3  Normalizat    1.1769        .16593        .30012E-05   -.87320    
   4  Prefactor     .96867        .83062E-01    .16770E-05   -.93781    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.12133e-12
Minuit parameter uncertainties:
  1  5.14684
  2  1.56827
  3  0.166002
  4  0.0830733
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) = 17562.3743833
delta logL = 0.158911126851

Extracting fit parameters...

4FGL J1821.6+6819
   Spectrum: PowerLaw
357    Prefactor:  2.443e+00  5.147e+00  0.000e+00  1.000e+06 ( 1.000e-12)
358        Index:  3.449e+00  1.568e+00  0.000e+00  1.000e+01 (-1.000e+00)
359        Scale:  5.847e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
617    Prefactor:  9.687e-01  8.307e-02  0.000e+00  1.000e+01 ( 1.000e+00)
618        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
619        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
616   Normalization:  1.177e+00  1.660e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.47
Ra Dec: 275.403 68.324
Photon Index (Free Index): 3.45 +/- 1.57
Photon Flux (Free Index): 4.42e-08 +/- 4.25e-08
Energy Flux (Free Index): 7.45e-06 +/- 7.11e-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/60730227/cmap_HighResolution_756086401_756691201_4FGL_J1821.6+6819_weekly_bin855.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='7.63e-03', comment='SUCCESS', photon_flux='3.10e-08', energy_flux2='7.45e-06', photon_flux_error='3.41e-08', dlogl='1.59e-01', energy_flux='7.35e-06', photon_flux2='4.42e-08', job_status='DONE', time_completed='2024-12-24 04:09:05.564676', photon_index_error2='1.57', photon_index2='3.45', ts='1.08', fit_tolerance='1e-08', GAL='0.96', photon_index_error='0.00', photon_flux_upper_limit='9.69e-08', energy_flux_error2='7.11e-06', EG='1.20', time_epoch_completed='1735042145.56', return_code='0', job_id='60730227', GAL2='0.97', EG2='1.18', return_code2='0', energy_flux_error='8.10e-06', photon_flux_error2='4.25e-08', ts2='1.47', photon_index='2.72' WHERE bin_id='855' AND source_name='4FGL J1821.6+6819' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Dec 24 04:09:05 PST 2024

