/nfs/farm/g/glast/g/LCRepository/bin/miniconda2/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)


Waiting 8 seconds before starting...
Proceeding.

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 make4FGLxml version 01r04.
The default diffuse model files and names are for pass 8 and 4FGL and assume you have v11r5p3 of the Fermi Science Tools or higher.

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

/nfs/farm/g/glast/g/LCRepository/bin/miniconda2/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 = 73235
number of fields = 30
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J1841.8+3218_monthly_bin105
RA = 280.453, Dec = 32.301
tmin = 509155201, tmax = 511747201
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='746478', job_status='RUN', time_executed='2021-11-03 04:46:48.974938', time_epoch_executed='1635940008.97' WHERE source_name='4FGL J1841.8+3218' and cadence='monthly' and bin_id='105'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/746478

Creating custom pfile directory:
/scratch/kocevski/746478/pfiles/

Retrieving the FT1 file...

Issuing command:
/afs/slac.stanford.edu/g/glast/ground/bin/datacat find --group FT1 --filter 'nMetStop>=509155201.0 && nMetStart<511747201.0' /Data/Flight/Reprocess/P305

Issuing command:
/afs/slac.stanford.edu/g/glast/ground/bin/datacat find --group FT1 --filter 'nMetStart>564945418 && nMetStop>=509155201.0 && nMetStart<511747201.0' /Data/Flight/Level1/LPA

Retrieving 456 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/746478/ft1_4FGL_J1841.8+3218_monthly_bin105.fits


Retrieving the FT1 file...

Issuing command:
/afs/slac.stanford.edu/g/glast/ground/bin/datacat find --group FT2 --filter 'nMetStop>=509155201.0 && nMetStart<511747201.0' /Data/Flight/Level1/LPA

Retrieving 456 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/746478/ft2_4FGL_J1841.8+3218_monthly_bin105.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/746478/ft1_4FGL_J1841.8+3218_monthly_bin105.fits outfile=/scratch/kocevski/746478/ft1_filteredMKT_4FGL_J1841.8+3218_monthly_bin105.fits ra=280.453 dec=32.301 rad=12.0 tmin=509155201.0 tmax=511747201.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 25.87
user 25.24
sys 0.47

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/746478/ft2_4FGL_J1841.8+3218_monthly_bin105.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/746478/ft2_4FGL_J1841.8+3218_monthly_bin105.fits sctable="SC_DATA" filter="IN_SAA!=T && LIVETIME>0 && gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nogrb.gti',(START+STOP)/2) && (angsep(RA_SUN,DEC_SUN,RA_ZENITH,DEC_ZENITH)>115 || gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nosolarflares.gti',(START+STOP)/2))" roicut=no evfile=/scratch/kocevski/746478/ft1_filteredMKT_4FGL_J1841.8+3218_monthly_bin105.fits evtable="EVENTS" outfile="/scratch/kocevski/746478/ft1_filtered_4FGL_J1841.8+3218_monthly_bin105.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('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nogrb.gti',(START+STOP)/2) && (angsep(RA_SUN,DEC_SUN,RA_ZENITH,DEC_ZENITH)>115 || gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nosolarflares.gti',(START+STOP)/2))
real 0.73
user 0.55
sys 0.15

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/746478/ft1_filtered_4FGL_J1841.8+3218_monthly_bin105.fits" evtable="EVENTS" scfile=/scratch/kocevski/746478/ft2_4FGL_J1841.8+3218_monthly_bin105.fits sctable="SC_DATA" outfile=/scratch/kocevski/746478/ltcube_509155201_511747201_4FGL_J1841.8+3218_monthly_bin105.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 /scratch/kocevski/746478/ft2_4FGL_J1841.8+3218_monthly_bin105.fits
.....................!
real 94.54
user 93.97
sys 0.31

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/746478/ft1_filtered_4FGL_J1841.8+3218_monthly_bin105.fits evtable="EVENTS" scfile=/scratch/kocevski/746478/ft2_4FGL_J1841.8+3218_monthly_bin105.fits sctable="SC_DATA" expcube=/scratch/kocevski/746478/ltcube_509155201_511747201_4FGL_J1841.8+3218_monthly_bin105.fits outfile=/scratch/kocevski/746478/expmap_509155201_511747201_4FGL_J1841.8+3218_monthly_bin105.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 /scratch/kocevski/746478/ltcube_509155201_511747201_4FGL_J1841.8+3218_monthly_bin105.fits
.....................!
real 156.03
user 151.29
sys 4.36

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 W 51C in ROI, make sure /nfs/farm/g/glast/g/LCRepository/Likelihood/ExtendedSources/Extended_archive_v18/Templates/W51C.fits is the correct path to the extended template.
Extended source gamma Cygni in ROI with RadialDisk spatial model.
Added 236 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.8+3218 @ 280.453 32.301

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/746478/ft1_filtered_4FGL_J1841.8+3218_monthly_bin105.fits scfile=/scratch/kocevski/746478/ft2_4FGL_J1841.8+3218_monthly_bin105.fits outfile=/scratch/kocevski/746478/cmap_509155201_511747201_4FGL_J1841.8+3218_monthly_bin105.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.453 yref=32.301 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.71
user 0.51
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/746478/ft1_filtered_4FGL_J1841.8+3218_monthly_bin105.fits scfile=/scratch/kocevski/746478/ft2_4FGL_J1841.8+3218_monthly_bin105.fits outfile=/scratch/kocevski/746478/cmap_HighResolution_509155201_511747201_4FGL_J1841.8+3218_monthly_bin105.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.453 yref=32.301 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.68
user 0.52
sys 0.15

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/746478/ft1_filtered_4FGL_J1841.8+3218_monthly_bin105.fits evtable="EVENTS" scfile=/scratch/kocevski/746478/ft2_4FGL_J1841.8+3218_monthly_bin105.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/746478/Model_4FGL_J1841.8+3218_monthly_bin105.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
adding source W 51C
adding source gamma Cygni
Working on...
/scratch/kocevski/746478/ft1_filtered_4FGL_J1841.8+3218_monthly_bin105.fits.....................!
real 1698.75
user 1692.99
sys 1.18

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/746478/ft1_filtered_4FGL_J1841.8+3218_monthly_bin105.fits', '/scratch/kocevski/746478/ft2_4FGL_J1841.8+3218_monthly_bin105.fits', expMap='/scratch/kocevski/746478/expmap_509155201_511747201_4FGL_J1841.8+3218_monthly_bin105.fits', expCube='/scratch/kocevski/746478/ltcube_509155201_511747201_4FGL_J1841.8+3218_monthly_bin105.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/746478/Model_4FGL_J1841.8+3218_monthly_bin105.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1841.8+3218'

4FGL J1841.8+3218
   Spectrum: LogParabola
365         norm:  4.939e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-14)
366        alpha:  1.556e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
367         beta:  2.467e-01  0.000e+00  0.000e+00  1.000e+01 ( 1.000e+00) fixed
368           Eb:  3.657e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/746478/ft1_filtered_4FGL_J1841.8+3218_monthly_bin105.fits
Spacecraft file(s): /scratch/kocevski/746478/ft2_4FGL_J1841.8+3218_monthly_bin105.fits
Exposure map: /scratch/kocevski/746478/expmap_509155201_511747201_4FGL_J1841.8+3218_monthly_bin105.fits
Exposure cube: /scratch/kocevski/746478/ltcube_509155201_511747201_4FGL_J1841.8+3218_monthly_bin105.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/746478/Model_4FGL_J1841.8+3218_monthly_bin105.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) = 128788.51735

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    4.9003       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .13380E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    .25328E-03   1.0000         .10000E-03   10000.    
     4 'norm      '    1.3336       1.0000         .10000E-03   10000.    
     5 'norm      '    .10979E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    3.5948       1.0000         .10000E-03   10000.    
     7 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    2.0817       1.0000         .10000E-03   10000.    
     9 'Prefactor '    4.8243       1.0000         .10000E-03   10000.    
    10 'norm      '    .39033       1.0000         .10000E-03   10000.    
    11 'Prefactor '    5.0661       1.0000         .10000E-03   10000.    
    12 'norm      '    2.7888       1.0000         .10000E-03   10000.    
    13 'norm      '    2.0993       1.0000         .10000E-03   10000.    
    14 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    2.6038       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .81044E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    6.3437       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .13389E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10027E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .13072E-02   1.0000         .10000E-03   10000.    
    21 'Normalizat'    1.1711       1.0000         .10000E-01   10.000    
    22 'Prefactor '    .99872       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .8320E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   128788.4     FROM MIGRAD    STATUS=CONVERGED    493 CALLS     2093 TOTAL
                     EDM=   .60E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .8%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     4.8867        4.1309        .19015E-05    .19307E-03
   2  Prefactor     .10000E-03    4.4382        .52595E-06** at limit **
   3  Prefactor     .10000E-03    12.763        .66646E-06** at limit **
   4  norm          1.3338        .46719       -.29866E-07   -.59692E-03
   5  norm          .10000E-03    6.2325        .33900E-05** at limit **
   6  Prefactor     3.5944        1.3646       -.22727E-07   -.26972E-03
   7  norm          .10000E-03    .40689        .12225E-07** at limit **
   8  Prefactor     2.0820        1.1467        .16180E-08   -.37664E-03
   9  Prefactor     4.8256        4.8849       -.10107E-06   -.70601E-04
  10  norm          .36794        1.7549        .96651E-06   -.13969E-02
  11  Prefactor     5.0668        1.8100       -.32324E-07   -.20200E-02
  12  norm          2.7880        6.4499       -.32848E-07   -.17584E-04
  13  norm          2.0992        .76339        .46689E-07   -.77909E-04
  14  norm          .10000E-03    .74087E-01   -.14248E-07** at limit **
  15  Prefactor     2.6086        1.3509       -.26494E-07   -.16241E-02
  16  Prefactor     .10000E-03    12.603        .32905E-05** at limit **
  17  Prefactor     6.3222        3.5517       -.21425E-07   -.14443E-04
  18  Prefactor     .10000E-03    6.8663       -.39672E-05** at limit **
  19  Prefactor     .10000E-03    4.0132       -.88006E-06** at limit **
  20  Prefactor     .10000E-03    34.559       -.93099E-05** at limit **
  21  Normalizat    1.1712        .68029E-01   -.35013E-06   -.15284E-03
  22  Prefactor     .99871        .18793E-01    .40341E-07   -.71787E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 4.88667
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 1.33377
  norm       = 0.0001
  Prefactor  = 3.59445
  norm       = 0.0001
  Prefactor  = 2.08203
  Prefactor  = 4.82563
  norm       = 0.367936
  Prefactor  = 5.06679
  norm       = 2.78795
  norm       = 2.09916
  norm       = 0.0001
  Prefactor  = 2.60857
  Prefactor  = 0.0001
  Prefactor  = 6.32222
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.000100001
  Normalizat = 1.17117
  Prefactor  = 0.998706
 **********
 **   18 **HESSE 
 **********

 FCN=   128788.4     FROM HESSE     STATUS=OK           356 CALLS     2449 TOTAL
                     EDM=   .25E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     4.8867        4.1255        .18170E-03   -1.5266    
   2  Prefactor     .10000E-03    4.4753        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .10000E-03    12.910        .21460E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  norm          1.3338        .46219        .14097E-03   -1.5477    
   5  norm          .10000E-03    6.2092        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     3.5944        1.3654        .21313E-03   -1.5329    
   7  norm          .10000E-03    .41088        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     2.0820        1.1395        .26958E-03   -1.5419    
   9  Prefactor     4.8256        4.8592        .18316E-03   -1.5269    
  10  norm          .36794        1.6746        .16441       -1.5587    
  11  Prefactor     5.0668        2.1256        .89321E-03   -1.5258    
  12  norm          2.7880        6.4327        .24365E-03   -1.5374    
  13  norm          2.0992        .69954        .16757E-03   -1.5418    
  14  norm          .10000E-03    .34207        .17208E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     2.6086        2.3328        .12641E-02   -1.5385    
  16  Prefactor     .10000E-03    12.766        .20894E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     6.3222        3.5506        .15936E-03   -1.5205    
  18  Prefactor     .10000E-03    6.8863        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10000E-03    4.1427        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10000E-03    34.692        .20576E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Normalizat    1.1712        .74277E-01    .45855E-03   -.87499    
  22  Prefactor     .99871        .20594E-01    .14065E-03   -.92773    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.49419e-09
Minuit parameter uncertainties:
  1  4.12573
  2  3.54446e-06
  3  8.96153e-06
  4  0.462188
  5  1.9492e-05
  6  1.3654
  7  1.66487e-07
  8  1.13948
  9  4.8596
  10  1.56974
  11  2.1256
  12  6.43432
  13  0.69954
  14  1.6787e-07
  15  2.33283
  16  5.19107e-05
  17  3.55074
  18  5.34193e-05
  19  2.63052e-07
  20  0.000263645
  21  0.0742838
  22  0.0205942
Done.

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

Extracting fit parameters...

4FGL J1841.8+3218
   Spectrum: LogParabola
365         norm:  2.788e+00  6.434e+00  1.000e-04  1.000e+04 ( 1.000e-14)
366        alpha:  1.556e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
367         beta:  2.467e-01  0.000e+00  0.000e+00  1.000e+01 ( 1.000e+00) fixed
368           Eb:  3.657e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
821    Prefactor:  9.987e-01  2.059e-02  0.000e+00  1.000e+01 ( 1.000e+00)
822        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
823        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
820   Normalization:  1.171e+00  7.428e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.24
Ra Dec: 280.453 32.301
Photon Flux Upper Limit: 3.73e-09 ph cm-2 s-1
Energy Flux Upper Limit: 1.21e-05 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/746478/likelihoodResults_509155201_511747201_4FGL_J1841.8+3218_monthly_bin105.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) = 128787.611736
delta logL = 0.746988326893

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 128787.603447
delta logL = 0.755277434655

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    3.9276       1.0000         .10000E-03   10000.    
     2 'alpha     '    2.5877       1.0000          .0000       5.0000    
     3 'Normalizat'    1.1704       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .99815       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .8320E+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.

 FCN=   128787.6     FROM MIGRAD    STATUS=CONVERGED    102 CALLS      296 TOTAL
                     EDM=   .22E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          3.9372        7.2389        .20356E-03    .95614E-04
   2  alpha         2.5857        .99213        .45787E-01    .12135E-03
   3  Normalizat    1.1704        .70873E-01    .45864E-03    .13366E-03
   4  Prefactor     .99815        .20394E-01    .14067E-03    .52371E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 3.93716
  alpha      = 2.58566
  Normalizat = 1.17044
  Prefactor  = 0.998151
 **********
 **   18 **HESSE 
 **********

 FCN=   128787.6     FROM HESSE     STATUS=OK            25 CALLS      321 TOTAL
                     EDM=   .86E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          3.9372        4.8628        .81424E-05   -1.5311    
   2  alpha         2.5857        .68009        .18315E-02    .34271E-01
   3  Normalizat    1.1704        .70815E-01    .18345E-04   -.87521    
   4  Prefactor     .99815        .20399E-01    .56267E-05   -.92791    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 8.61239e-12
Minuit parameter uncertainties:
  1  4.8633
  2  0.688779
  3  0.0708203
  4  0.0203987
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/746478': No such file or directory
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) = 128787.603443
delta logL = 0.755281731341

Extracting fit parameters...

4FGL J1841.8+3218
   Spectrum: LogParabola
365         norm:  3.937e+00  4.863e+00  1.000e-04  1.000e+04 ( 1.000e-14)
366        alpha:  2.586e+00  6.888e-01  0.000e+00  5.000e+00 ( 1.000e+00)
367         beta:  2.467e-01  0.000e+00  0.000e+00  1.000e+01 ( 1.000e+00) fixed
368           Eb:  3.657e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
821    Prefactor:  9.982e-01  2.040e-02  0.000e+00  1.000e+01 ( 1.000e+00)
822        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
823        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
820   Normalization:  1.170e+00  7.082e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.76
Ra Dec: 280.453 32.301
Photon Index (Free Index): 2.59 +/- 0.69
Photon Flux (Free Index): 3.98e-09 +/- 4.73e-09
Energy Flux (Free Index): 2.54e-06 +/- 2.33e-06

Creating a high resolution counts map...
INFO: Auto-setting vmin to -2.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  2.220e+00 [aplpy.core]
Saving /scratch/kocevski/746478/cmap_HighResolution_509155201_511747201_4FGL_J1841.8+3218_monthly_bin105.png

Cleaning up...

** Nuclear option initiated! **
rmdir /scratch/kocevski/746478

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.21e-05', comment='SUCCESS', energy_flux2='2.54e-06', dlogl='7.55e-01', photon_flux2='3.98e-09', job_status='DONE', time_completed='2021-11-03 07:23:23.958223', photon_index_error2='0.69', photon_index2='2.59', ts='0.24', fit_tolerance='1e-08', GAL='1.00', photon_index_error='0.00', photon_flux_upper_limit='3.73e-09', energy_flux_error2='2.33e-06', EG='1.17', time_epoch_completed='1635949403.96', return_code='0', job_id='746478', GAL2='1.00', EG2='1.17', return_code2='0', photon_flux_error2='4.73e-09', ts2='1.76', photon_index='1.56' WHERE bin_id='105' AND source_name='4FGL J1841.8+3218' AND cadence='monthly';

Database successfully updated.


Analysis Complete.


Wed Nov  3 07:23:23 PDT 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0175>
Subject: Job 746478: <4FGL_J1841.8+3218_monthly_bin105> in cluster <slac> Done

Job <4FGL_J1841.8+3218_monthly_bin105> was submitted from host <rhel6-64e> by user <kocevski> in cluster <slac> at Wed Nov  3 04:35:23 2021
Job was executed on host(s) <bullet0175>, in queue <medium>, as user <kocevski> in cluster <slac> at Wed Nov  3 04:46:33 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Wed Nov  3 04:46:33 2021
Terminated at Wed Nov  3 07:23:25 2021
Results reported at Wed Nov  3 07:23:25 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1841.8+3218_monthly_bin105 280.453 32.301 509155201 511747201 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1841.8+3218 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   9245.00 sec.
    Max Memory :                                 1269 MB
    Average Memory :                             549.36 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   9412 sec.
    Turnaround time :                            10082 sec.

The output (if any) is above this job summary.

