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


Performing analysis on: 4FGL_J1841.0+6115_weekly_bin827
RA = 280.253, Dec = 61.2522
tmin = 739152001, tmax = 739756801
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='50336929', job_status='RUN', time_executed='2024-06-11 01:42:18.018776', time_epoch_executed='1718095338.02' WHERE source_name='4FGL J1841.0+6115' and cadence='weekly' and bin_id='827'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/50336929

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

Retrieving the FT1 file...

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

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

Retrieving 107 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/50336929/ft1_4FGL_J1841.0+6115_weekly_bin827.fits


Retrieving the FT1 file...

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

Retrieving 107 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/50336929/ft2_4FGL_J1841.0+6115_weekly_bin827.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/50336929/ft1_4FGL_J1841.0+6115_weekly_bin827.fits outfile=/lscratch/kocevski/50336929/ft1_filteredMKT_4FGL_J1841.0+6115_weekly_bin827.fits ra=280.253 dec=61.2522 rad=12.0 tmin=739152001.0 tmax=739756801.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 4.71
user 4.17
sys 0.25

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/50336929/ft2_4FGL_J1841.0+6115_weekly_bin827.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/50336929/ft2_4FGL_J1841.0+6115_weekly_bin827.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/50336929/ft1_filteredMKT_4FGL_J1841.0+6115_weekly_bin827.fits evtable="EVENTS" outfile="/lscratch/kocevski/50336929/ft1_filtered_4FGL_J1841.0+6115_weekly_bin827.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.47
user 0.19
sys 0.12

Number of photons that the gtmktime cut: 2876

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/50336929/ft1_filtered_4FGL_J1841.0+6115_weekly_bin827.fits" evtable="EVENTS" scfile=/lscratch/kocevski/50336929/ft2_4FGL_J1841.0+6115_weekly_bin827.fits sctable="SC_DATA" outfile=/lscratch/kocevski/50336929/ltcube_739152001_739756801_4FGL_J1841.0+6115_weekly_bin827.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/50336929/ft2_4FGL_J1841.0+6115_weekly_bin827.fits
.....................!
real 15.84
user 15.35
sys 0.25

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/50336929/ft1_filtered_4FGL_J1841.0+6115_weekly_bin827.fits evtable="EVENTS" scfile=/lscratch/kocevski/50336929/ft2_4FGL_J1841.0+6115_weekly_bin827.fits sctable="SC_DATA" expcube=/lscratch/kocevski/50336929/ltcube_739152001_739756801_4FGL_J1841.0+6115_weekly_bin827.fits outfile=/lscratch/kocevski/50336929/expmap_739152001_739756801_4FGL_J1841.0+6115_weekly_bin827.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/50336929/ltcube_739152001_739756801_4FGL_J1841.0+6115_weekly_bin827.fits
.....................!
real 59.17
user 55.35
sys 3.47

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 HB 21 in ROI with RadialDisk spatial model.
Extended source FHES J2129.9+5833 in ROI with RadialGaussian spatial model.
Added 188 point sources and 2 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 J1841.0+6115 @ 280.253 61.2522

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/50336929/ft1_filtered_4FGL_J1841.0+6115_weekly_bin827.fits scfile=/lscratch/kocevski/50336929/ft2_4FGL_J1841.0+6115_weekly_bin827.fits outfile=/lscratch/kocevski/50336929/cmap_739152001_739756801_4FGL_J1841.0+6115_weekly_bin827.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=280.253 yref=61.2522 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.83
user 0.21
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/50336929/ft1_filtered_4FGL_J1841.0+6115_weekly_bin827.fits scfile=/lscratch/kocevski/50336929/ft2_4FGL_J1841.0+6115_weekly_bin827.fits outfile=/lscratch/kocevski/50336929/cmap_HighResolution_739152001_739756801_4FGL_J1841.0+6115_weekly_bin827.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=280.253 yref=61.2522 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.66
user 0.20
sys 0.14

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/50336929/ft1_filtered_4FGL_J1841.0+6115_weekly_bin827.fits evtable="EVENTS" scfile=/lscratch/kocevski/50336929/ft2_4FGL_J1841.0+6115_weekly_bin827.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/50336929/Model_4FGL_J1841.0+6115_weekly_bin827.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 FHES J2129.9+5833
adding source GAL_V02
adding source HB 21
Working on...
/lscratch/kocevski/50336929/ft1_filtered_4FGL_J1841.0+6115_weekly_bin827.fits.....................!
real 98.45
user 96.76
sys 0.90

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/50336929/ft1_filtered_4FGL_J1841.0+6115_weekly_bin827.fits', '/lscratch/kocevski/50336929/ft2_4FGL_J1841.0+6115_weekly_bin827.fits', expMap='/lscratch/kocevski/50336929/expmap_739152001_739756801_4FGL_J1841.0+6115_weekly_bin827.fits', expCube='/lscratch/kocevski/50336929/ltcube_739152001_739756801_4FGL_J1841.0+6115_weekly_bin827.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/50336929/Model_4FGL_J1841.0+6115_weekly_bin827.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1841.0+6115'

4FGL J1841.0+6115
   Spectrum: PowerLaw
349    Prefactor:  3.678e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-13)
350        Index:  2.547e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
351        Scale:  1.110e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/50336929/ft1_filtered_4FGL_J1841.0+6115_weekly_bin827.fits
Spacecraft file(s): /lscratch/kocevski/50336929/ft2_4FGL_J1841.0+6115_weekly_bin827.fits
Exposure map: /lscratch/kocevski/50336929/expmap_739152001_739756801_4FGL_J1841.0+6115_weekly_bin827.fits
Exposure cube: /lscratch/kocevski/50336929/ltcube_739152001_739756801_4FGL_J1841.0+6115_weekly_bin827.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/50336929/Model_4FGL_J1841.0+6115_weekly_bin827.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) = 29345.8278419

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    25.974       1.0000          .0000       .10000E+07
     2 'Prefactor '    1.8200       1.0000          .0000       .10000E+07
     3 'Prefactor '    .10816E-03   1.0000          .0000       .10000E+07
     4 'Prefactor '    .15467E-02   1.0000          .0000       .10000E+07
     5 'Prefactor '    21.505       1.0000          .0000       .10000E+07
     6 'Prefactor '    60.483       1.0000          .0000       .10000E+07
     7 'norm      '    4.1046       1.0000          .0000       .10000E+07
     8 'Prefactor '    .14536E-03   1.0000          .0000       .10000E+07
     9 'norm      '    9.7999       1.0000          .0000       .10000E+07
    10 'Prefactor '    .65707E-03   1.0000          .0000       .10000E+07
    11 'Prefactor '    .84935E-04   1.0000          .0000       .10000E+07
    12 'Prefactor '    .36893E-04   1.0000          .0000       .10000E+07
    13 'norm      '    9.0306       1.0000          .0000       .10000E+07
    14 'Prefactor '    .57295E-03   1.0000          .0000       .10000E+07
    15 'Prefactor '    20.813       1.0000          .0000       .10000E+07
    16 'Prefactor '    9.5576       1.0000          .0000       .10000E+07
    17 'norm      '    .14910E-05   1.0000          .0000       .10000E+07
    18 'norm      '    7.1753       1.0000          .0000       .10000E+07
    19 'norm      '    .10936E-07   1.0000          .0000       .10000E+07
    20 'norm      '    7.8439       1.0000          .0000       .10000E+07
    21 'Prefactor '    5.8585       1.0000          .0000       .10000E+07
    22 'norm      '    .90770       1.0000          .0000       .10000E+07
    23 'norm      '    .58650E-03   1.0000          .0000       .10000E+07
    24 'Prefactor '    .21118E-01   1.0000          .0000       .10000E+07
    25 'Normalizat'    1.1328       1.0000         .10000E-01   10.000    
    26 'Prefactor '    .93082       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6340E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   29345.73     FROM MIGRAD    STATUS=CONVERGED    168 CALLS     1793 TOTAL
                     EDM=   .35E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.5%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     25.952        1.0737       -.18003E-07    .61512E-01
   2  Prefactor     1.8220        3.2443       -.10862E-05   -.25059E-02
   3  Prefactor     .55511E-10    2.2171       -.51627E-06** at limit **
   4  Prefactor     .66613E-09    14.339       -.46366E-06** at limit **
   5  Prefactor     21.471        1.3137       -.24725E-08    .15108E-01
   6  Prefactor     56.143        41.493        .77536E-06   -.33625E-03
   7  norm          4.1029        1.4872       -.21619E-06    .33183E-02
   8  Prefactor     .33307E-09    23.044       -.19208E-05** at limit **
   9  norm          9.7935        2.8651        .22332E-06   -.55976E-02
  10  Prefactor     .67724E-08    4.0168       -.41972E-06** at limit **
  11  Prefactor     .49960E-09    28.536        .12326E-05** at limit **
  12  Prefactor     .16653E-09    2.2511       -.37749E-07** at limit **
  13  norm          9.0354        4.2502       -.13231E-06   -.12540E-02
  14  Prefactor     .16653E-09    7.8967       -.17804E-06** at limit **
  15  Prefactor     20.796        6.6777        .88712E-07    .57593E-01
  16  Prefactor     9.7575        2.0494       -.71088E-07    .44723E-02
  17  norm          .30087E-07    3.5676        .17554E-05** at limit **
  18  norm          7.1733        1.6095        .19084E-06   -.68715E-02
  19  norm          .55511E-10    .64384        .64964E-06** at limit **
  20  norm          7.8321        5.1083        .26583E-06    .24857E-02
  21  Prefactor     5.8208        8.5143       -.18814E-05   -.17764E-01
  22  norm          .90770        .60748       -.26409E-06    .46513E-02
  23  norm          .11102E-09    2.3994       -.12605E-06** at limit **
  24  Prefactor     .16653E-09    16.649       -.67206E-07** at limit **
  25  Normalizat    1.1348        .13069        .13622E-04   -.16079E-03
  26  Prefactor     .93040        .62269E-01   -.72242E-05   -.23285E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 25.9524
  Prefactor  = 1.82202
  Prefactor  = 5.55112e-11
  Prefactor  = 6.66134e-10
  Prefactor  = 21.4714
  Prefactor  = 56.1431
  norm       = 4.1029
  Prefactor  = 3.33067e-10
  norm       = 9.79346
  Prefactor  = 6.77236e-09
  Prefactor  = 4.996e-10
  Prefactor  = 1.66533e-10
  norm       = 9.03543
  Prefactor  = 1.66533e-10
  Prefactor  = 20.7963
  Prefactor  = 9.75745
  norm       = 3.0087e-08
  norm       = 7.17331
  norm       = 5.55112e-11
  norm       = 7.83208
  Prefactor  = 5.82078
  norm       = 0.907697
  norm       = 1.11022e-10
  Prefactor  = 1.66533e-10
  Normalizat = 1.1348
  Prefactor  = 0.930399
 **********
 **   18 **HESSE 
 **********

 FCN=   29345.73     FROM HESSE     STATUS=OK           522 CALLS     2315 TOTAL
                     EDM=   .26E-05    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     25.952        10.200        .19625E-03   -1.5606    
   2  Prefactor     1.8220        3.2419        .77376E-03   -1.5681    
   3  Prefactor     .55511E-10    2.2173        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .66613E-09    14.384        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     21.471        18.203        .21570E-03   -1.5615    
   6  Prefactor     56.143        41.469        .12859E-03   -1.5558    
   7  norm          4.1029        1.4890        .49735E-03   -1.5667    
   8  Prefactor     .33307E-09    22.854        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          9.7935        2.8753        .31986E-03   -1.5645    
  10  Prefactor     .67724E-08    4.2109        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .49960E-09    28.735        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .16653E-09    2.2442        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          9.0354        4.2585        .33328E-03   -1.5648    
  14  Prefactor     .16653E-09    7.8390        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     20.796        10.448        .21926E-03   -1.5617    
  16  Prefactor     9.7575        26.357        .32391E-03   -1.5645    
  17  norm          .30087E-07    .49917        .62888E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  norm          7.1733        1.6102        .37423E-03   -1.5654    
  19  norm          .55511E-10    .64346        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  norm          7.8321        5.1158        .35779E-03   -1.5652    
  21  Prefactor     5.8208        9.3929        .41467E-03   -1.5660    
  22  norm          .90770        .62034        .45229E-03   -1.5689    
  23  norm          .11102E-09    2.4078        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     .16653E-09    4.1582        .11959E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Normalizat    1.1348        .11485        .79284E-01   -.88642    
  26  Prefactor     .93040        .54465E-01    .45397E-01   -.95087    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.61228e-06
Minuit parameter uncertainties:
  1  10.2004
  2  3.24187
  3  2.50611e-05
  4  0.000196229
  5  18.203
  6  41.4697
  7  1.48899
  8  0.000176407
  9  2.87532
  10  0.000337687
  11  0.00023455
  12  4.00562e-05
  13  4.25847
  14  6.86059e-05
  15  10.4478
  16  26.3573
  17  0.000245086
  18  1.61025
  19  9.02705e-06
  20  5.11584
  21  9.3929
  22  0.620342
  23  3.52702e-05
  24  5.24565e-05
  25  0.114875
  26  0.0544679
Done.

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

Extracting fit parameters...

4FGL J1841.0+6115
   Spectrum: PowerLaw
349    Prefactor:  1.665e-10  6.861e-05  0.000e+00  1.000e+06 ( 1.000e-13)
350        Index:  2.547e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
351        Scale:  1.110e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
627    Prefactor:  9.304e-01  5.447e-02  0.000e+00  1.000e+01 ( 1.000e+00)
628        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
629        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
623   Normalization:  1.135e+00  1.149e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 280.253 61.252
Photon Flux Upper Limit: 4.85872177514e-08 ph cm-2 s-1
Energy Flux Upper Limit: 0.00379012634167 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/50336929/likelihoodResults_739152001_739756801_4FGL_J1841.0+6115_weekly_bin827.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): 102
logL (Free Index) = 29345.7952044
delta logL = -0.0648395311546

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 29343.8226497
delta logL = 1.90771520713

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   29343.82     FROM MIGRAD    STATUS=CONVERGED     60 CALLS      322 TOTAL
                     EDM=   .81E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .26848E-01    .10559        .33337E-03** at limit **
   2  Index         5.8244        1.3355        .11139        .81609E-03
   3  Normalizat    1.0591        .22532E-01    .81604E-01    .17007E-03
   4  Prefactor     .95278        .11328E-01    .45673E-01    .18702E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0268481
  Index      = 5.82437
  Normalizat = 1.05913
  Prefactor  = 0.952784
 **********
 **   18 **HESSE 
 **********

 FCN=   29343.82     FROM HESSE     STATUS=NOT POSDEF    33 CALLS      355 TOTAL
                     EDM=   .20E-05    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .26848E-01    .38635        .15028E-04   -1.5705    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         5.8244        3.1123        .63953E-02    .16563    
   3  Normalizat    1.0591        .87924E-01    .36127E-03   -.91075    
   4  Prefactor     .95278        .43392E-01    .18956E-03   -.94320    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 2.04607e-06
Minuit parameter uncertainties:
  1  0.203693
  2  3.36811
  3  0.087936
  4  0.0433934
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 29343.8226402
delta logL = 1.9077246786

Extracting fit parameters...

4FGL J1841.0+6115
   Spectrum: PowerLaw
349    Prefactor:  2.685e-02  2.037e-01  0.000e+00  1.000e+06 ( 1.000e-13)
350        Index:  5.824e+00  3.368e+00  0.000e+00  1.000e+01 (-1.000e+00)
351        Scale:  1.110e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
627    Prefactor:  9.528e-01  4.339e-02  0.000e+00  1.000e+01 ( 1.000e+00)
628        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
629        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
623   Normalization:  1.059e+00  8.794e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 4.29
Ra Dec: 280.253 61.252
Photon Index (Free Index): 5.82 +/- 3.37
Photon Flux (Free Index): 6.87e-08 +/- 3.60e-08
Energy Flux (Free Index): 8.64e-06 +/- 5.24e-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/50336929/cmap_HighResolution_739152001_739756801_4FGL_J1841.0+6115_weekly_bin827.png

Cleaning up...

** Nuclear option initiated! **

Updating database...
UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='3.79e-03', comment='SUCCESS', energy_flux2='8.64e-06', dlogl='1.91e+00', photon_flux2='6.87e-08', job_status='DONE', time_completed='2024-06-11 01:59:17.761029', photon_index_error2='3.37', photon_index2='5.82', ts='-0.00', fit_tolerance='1e-08', GAL='0.93', photon_index_error='0.00', photon_flux_upper_limit='4.86e-08', energy_flux_error2='5.24e-06', EG='1.13', time_epoch_completed='1718096357.76', return_code='0', job_id='50336929', GAL2='0.95', EG2='1.06', return_code2='102', photon_flux_error2='3.60e-08', ts2='4.29', photon_index='2.55' WHERE bin_id='827' AND source_name='4FGL J1841.0+6115' AND cadence='weekly';
2003: Can't connect to MySQL server on 'mysql-node01:3307' (-2 Name or service not known)
Traceback (most recent call last):
  File "/sdf/data/fermi/g/LCRepository/Likelihood/Scripts/DatabaseTools.py", line 110, in executeCommand
    mydb = mysql.connector.connect(host=host, user=user, passwd=passwd, database=database, port=port)
  File "/sdf/group/fermi/u/kocevski/software/conda/envs/fermitools_v1.0.5/lib/python2.7/site-packages/mysql/connector/__init__.py", line 179, in connect
    return MySQLConnection(*args, **kwargs)
  File "/sdf/group/fermi/u/kocevski/software/conda/envs/fermitools_v1.0.5/lib/python2.7/site-packages/mysql/connector/connection.py", line 95, in __init__
    self.connect(**kwargs)
  File "/sdf/group/fermi/u/kocevski/software/conda/envs/fermitools_v1.0.5/lib/python2.7/site-packages/mysql/connector/abstracts.py", line 722, in connect
    self._open_connection()
  File "/sdf/group/fermi/u/kocevski/software/conda/envs/fermitools_v1.0.5/lib/python2.7/site-packages/mysql/connector/connection.py", line 208, in _open_connection
    self._socket.open_connection()
  File "/sdf/group/fermi/u/kocevski/software/conda/envs/fermitools_v1.0.5/lib/python2.7/site-packages/mysql/connector/network.py", line 501, in open_connection
    errno=2003, values=(self.get_address(), _strioerror(err)))
InterfaceError: 2003: Can't connect to MySQL server on 'mysql-node01:3307' (-2 Name or service not known)

Command execution failed.

Waiting 12.0552140931 seconds and trying again...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='3.79e-03', comment='SUCCESS', energy_flux2='8.64e-06', dlogl='1.91e+00', photon_flux2='6.87e-08', job_status='DONE', time_completed='2024-06-11 01:59:17.761029', photon_index_error2='3.37', photon_index2='5.82', ts='-0.00', fit_tolerance='1e-08', GAL='0.93', photon_index_error='0.00', photon_flux_upper_limit='4.86e-08', energy_flux_error2='5.24e-06', EG='1.13', time_epoch_completed='1718096357.76', return_code='0', job_id='50336929', GAL2='0.95', EG2='1.06', return_code2='102', photon_flux_error2='3.60e-08', ts2='4.29', photon_index='2.55' WHERE bin_id='827' ANshell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
D source_name='4FGL J1841.0+6115' AND cadence='weekly';
2003: Can't connect to MySQL server on 'mysql-node01:3307' (-2 Name or service not known)
Traceback (most recent call last):
  File "/sdf/data/fermi/g/LCRepository/Likelihood/Scripts/DatabaseTools.py", line 110, in executeCommand
    mydb = mysql.connector.connect(host=host, user=user, passwd=passwd, database=database, port=port)
  File "/sdf/group/fermi/u/kocevski/software/conda/envs/fermitools_v1.0.5/lib/python2.7/site-packages/mysql/connector/__init__.py", line 179, in connect
    return MySQLConnection(*args, **kwargs)
  File "/sdf/group/fermi/u/kocevski/software/conda/envs/fermitools_v1.0.5/lib/python2.7/site-packages/mysql/connector/connection.py", line 95, in __init__
    self.connect(**kwargs)
  File "/sdf/group/fermi/u/kocevski/software/conda/envs/fermitools_v1.0.5/lib/python2.7/site-packages/mysql/connector/abstracts.py", line 722, in connect
    self._open_connection()
  File "/sdf/group/fermi/u/kocevski/software/conda/envs/fermitools_v1.0.5/lib/python2.7/site-packages/mysql/connector/connection.py", line 208, in _open_connection
    self._socket.open_connection()
  File "/sdf/group/fermi/u/kocevski/software/conda/envs/fermitools_v1.0.5/lib/python2.7/site-packages/mysql/connector/network.py", line 501, in open_connection
    errno=2003, values=(self.get_address(), _strioerror(err)))
InterfaceError: 2003: Can't connect to MySQL server on 'mysql-node01:3307' (-2 Name or service not known)

Command execution failed.

Waiting 0.991197851969 seconds and trying again...


UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='3.79e-03', comment='SUCCESS', energy_flux2='8.64e-06', dlogl='1.91e+00', photon_flux2='6.87e-08', job_status='DONE', time_completed='2024-06-11 01:59:17.761029', photon_index_error2='3.37', photon_index2='5.82', ts='-0.00', fit_tolerance='1e-08', GAL='0.93', photon_index_error='0.00', photon_flux_upper_limit='4.86e-08', energy_flux_error2='5.24e-06', EG='1.13', time_epoch_completed='1718096357.76', return_code='0', job_id='50336929', GAL2='0.95', EG2='1.06', return_code2='102', photon_flux_error2='3.60e-08', ts2='4.29', photon_index='2.55' WHERE bin_id='827' AND source_name='4FGL J1841.0+6115' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Jun 11 01:59:40 PDT 2024

