aklog: Couldn't determine realm of user:aklog: No credentials cache found  while getting realm
/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 73 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 = 17407
number of fields = 31
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J1821.6+6636_weekly_bin718
RA = 275.414, Dec = 66.6093
tmin = 673228801, tmax = 673833601
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='260846', job_status='RUN', time_executed='2022-05-10 00:55:29.868482', time_epoch_executed='1652169329.87' WHERE source_name='4FGL J1821.6+6636' and cadence='weekly' and bin_id='718'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/260846

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

Retrieving the FT1 file...

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

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

Retrieving 107 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/260846/ft1_4FGL_J1821.6+6636_weekly_bin718.fits


Retrieving the FT1 file...

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

Retrieving 107 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/260846/ft2_4FGL_J1821.6+6636_weekly_bin718.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/260846/ft1_4FGL_J1821.6+6636_weekly_bin718.fits outfile=/scratch/kocevski/260846/ft1_filteredMKT_4FGL_J1821.6+6636_weekly_bin718.fits ra=275.414 dec=66.6093 rad=12.0 tmin=673228801.0 tmax=673833601.0 emin=100.0 emax=100000.0 zmin=0.0 zmax=90.0 evclass=128 evtype="INDEF" convtype=-1 phasemin=0.0 phasemax=1.0 evtable="EVENTS" chatter=2 clobber=yes debug=no gui=no mode="ql"

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

Done.
real 5.47
user 5.13
sys 0.27

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/260846/ft2_4FGL_J1821.6+6636_weekly_bin718.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/260846/ft2_4FGL_J1821.6+6636_weekly_bin718.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/260846/ft1_filteredMKT_4FGL_J1821.6+6636_weekly_bin718.fits evtable="EVENTS" outfile="/scratch/kocevski/260846/ft1_filtered_4FGL_J1821.6+6636_weekly_bin718.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.56
user 0.39
sys 0.16

Number of photons that the gtmktime cut: 5223

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/260846/ft1_filtered_4FGL_J1821.6+6636_weekly_bin718.fits" evtable="EVENTS" scfile=/scratch/kocevski/260846/ft2_4FGL_J1821.6+6636_weekly_bin718.fits sctable="SC_DATA" outfile=/scratch/kocevski/260846/ltcube_673228801_673833601_4FGL_J1821.6+6636_weekly_bin718.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/260846/ft2_4FGL_J1821.6+6636_weekly_bin718.fits
.....................!
real 30.16
user 29.43
sys 0.33

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/260846/ft1_filtered_4FGL_J1821.6+6636_weekly_bin718.fits evtable="EVENTS" scfile=/scratch/kocevski/260846/ft2_4FGL_J1821.6+6636_weekly_bin718.fits sctable="SC_DATA" expcube=/scratch/kocevski/260846/ltcube_673228801_673833601_4FGL_J1821.6+6636_weekly_bin718.fits outfile=/scratch/kocevski/260846/expmap_673228801_673833601_4FGL_J1821.6+6636_weekly_bin718.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/260846/ltcube_673228801_673833601_4FGL_J1821.6+6636_weekly_bin718.fits
.....................!
real 194.65
user 187.10
sys 5.19

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

Setting source of interest to:
4FGL J1821.6+6636 @ 275.414 66.6093

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/260846/ft1_filtered_4FGL_J1821.6+6636_weekly_bin718.fits scfile=/scratch/kocevski/260846/ft2_4FGL_J1821.6+6636_weekly_bin718.fits outfile=/scratch/kocevski/260846/cmap_673228801_673833601_4FGL_J1821.6+6636_weekly_bin718.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.414 yref=66.6093 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.61
user 0.41
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/260846/ft1_filtered_4FGL_J1821.6+6636_weekly_bin718.fits scfile=/scratch/kocevski/260846/ft2_4FGL_J1821.6+6636_weekly_bin718.fits outfile=/scratch/kocevski/260846/cmap_HighResolution_673228801_673833601_4FGL_J1821.6+6636_weekly_bin718.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.414 yref=66.6093 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.59
user 0.43
sys 0.15

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/260846/ft1_filtered_4FGL_J1821.6+6636_weekly_bin718.fits evtable="EVENTS" scfile=/scratch/kocevski/260846/ft2_4FGL_J1821.6+6636_weekly_bin718.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/260846/Model_4FGL_J1821.6+6636_weekly_bin718.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...
/scratch/kocevski/260846/ft1_filtered_4FGL_J1821.6+6636_weekly_bin718.fits.....................!
real 527.19
user 519.73
sys 1.40

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/260846/ft1_filtered_4FGL_J1821.6+6636_weekly_bin718.fits', '/scratch/kocevski/260846/ft2_4FGL_J1821.6+6636_weekly_bin718.fits', expMap='/scratch/kocevski/260846/expmap_673228801_673833601_4FGL_J1821.6+6636_weekly_bin718.fits', expCube='/scratch/kocevski/260846/ltcube_673228801_673833601_4FGL_J1821.6+6636_weekly_bin718.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/260846/Model_4FGL_J1821.6+6636_weekly_bin718.xml', optimizer='MINUIT')

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

4FGL J1821.6+6636
   Spectrum: PowerLaw
351    Prefactor:  6.650e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-15)
352        Index:  1.833e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
353        Scale:  4.696e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/260846/ft1_filtered_4FGL_J1821.6+6636_weekly_bin718.fits
Spacecraft file(s): /scratch/kocevski/260846/ft2_4FGL_J1821.6+6636_weekly_bin718.fits
Exposure map: /scratch/kocevski/260846/expmap_673228801_673833601_4FGL_J1821.6+6636_weekly_bin718.fits
Exposure cube: /scratch/kocevski/260846/ltcube_673228801_673833601_4FGL_J1821.6+6636_weekly_bin718.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/260846/Model_4FGL_J1821.6+6636_weekly_bin718.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) = 52892.1621644

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    23.324       1.0000         .10000E-03   10000.    
     2 'Prefactor '    8.3081       1.0000         .10000E-03   10000.    
     3 'norm      '    .29286       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     5 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    1.6478       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    2.4937       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .14515       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .20045E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    14 'norm      '    5.7685       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    4.4399       1.0000         .10000E-03   10000.    
    17 'Prefactor '    3.8296       1.0000         .10000E-03   10000.    
    18 'norm      '    3.9883       1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    6.8591       1.0000         .10000E-03   10000.    
    22 'norm      '    9.8646       1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10006E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    .58221E-03   1.0000         .10000E-03   10000.    
    25 'Prefactor '    11.956       1.0000         .10000E-03   10000.    
    26 'Prefactor '    52.242       1.0000         .10000E-03   10000.    
    27 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    28 'norm      '    .85795       1.0000         .10000E-03   10000.    
    29 'norm      '    2.5652       1.0000         .10000E-03   10000.    
    30 'norm      '    .86151       1.0000         .10000E-03   10000.    
    31 'Prefactor '    7.3585       1.0000         .10000E-03   10000.    
    32 'Prefactor '    .38813       1.0000         .10000E-03   10000.    
    33 'norm      '    3.9635       1.0000         .10000E-03   10000.    
    34 'norm      '    18.454       1.0000         .10000E-03   10000.    
    35 'norm      '    1.1193       1.0000         .10000E-03   10000.    
    36 'Prefactor '    37.948       1.0000         .10000E-03   10000.    
    37 'norm      '    .43981E-01   1.0000         .10000E-03   10000.    
    38 'Normalizat'    .92144       1.0000         .10000E-01   10.000    
    39 'Prefactor '    1.0803       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6130E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   52892.12     FROM MIGRAD    STATUS=CONVERGED   1176 CALLS     6315 TOTAL
                     EDM=   .87E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.2%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     23.325        23.596        .20055E-06    .44245E-05
   2  Prefactor     8.3083        8.6828       -.53018E-07   -.24092E-04
   3  norm          .29558        .97446        .51120E-06   -.16408E-02
   4  Prefactor     .10000E-03    1.7535        .37256E-07** at limit **
   5  norm          .10000E-03    .61613E-01    .49860E-09** at limit **
   6  Prefactor     1.6479        2.3378       -.37769E-07   -.60406E-03
   7  Prefactor     .10000E-03    .30557        .53034E-08** at limit **
   8  Prefactor     2.4939        5.1888       -.99012E-07   -.13821E-03
   9  Prefactor     .14514        .72139       -.19460E-06   -.20363E-04
  10  Prefactor     .10000E-03    6.5784        .85929E-06** at limit **
  11  Prefactor     .10000E-03    .71093        .10118E-06** at limit **
  12  Prefactor     .10000E-03    18.750        .88388E-05** at limit **
  13  Prefactor     .10000E-03    21.662       -.79987E-05** at limit **
  14  norm          5.7686        1.3462       -.11917E-08   -.19415E-03
  15  Prefactor     .10000E-03    8.1437       -.14377E-05** at limit **
  16  norm          4.4399        .60560       -.46155E-08   -.41289E-03
  17  Prefactor     3.8303        4.3376       -.16531E-06   -.14258E-03
  18  norm          3.9883        1.1569        .74175E-07   -.52612E-02
  19  Prefactor     .10000E-03    4.1920       -.60652E-06** at limit **
  20  Prefactor     .10000E-03    11.707       -.87301E-06** at limit **
  21  Prefactor     6.8564        3.0210       -.91133E-07   -.45723E-03
  22  norm          9.8649        3.1153        .11142E-06    .40889E-04
  23  Prefactor     .10000E-03    3.4313        .34772E-06** at limit **
  24  Prefactor     .10000E-03    2.4051        .10421E-06** at limit **
  25  Prefactor     11.955        23.292       -.20260E-05   -.46166E-04
  26  Prefactor     52.238        30.444       -.37642E-05   -.15391E-03
  27  norm          .10000E-03    .36701        .12129E-07** at limit **
  28  norm          .85790        1.0027        .28817E-07    .45699E-04
  29  norm          2.5651        1.5296        .25099E-07   -.62343E-04
  30  norm          .86199        2.3625       -.12843E-06   -.88871E-03
  31  Prefactor     7.3579        6.2319       -.35410E-07   -.11603E-03
  32  Prefactor     .39005        .82262        .44567E-06   -.24441E-02
  33  norm          3.9635        .75638        .84694E-08   -.37722E-04
  34  norm          18.454        10.807       -.24059E-07   -.12540E-04
  35  norm          1.1192        3.3698       -.25379E-06   -.40979E-03
  36  Prefactor     37.948        10.762       -.87007E-07   -.10453E-03
  37  norm          .42876E-01    .30420       -.44979E-07   -.10372E-02
  38  Normalizat    .92141        .87964E-01   -.49703E-07   -.52629E-03
  39  Prefactor     1.0803        .46471E-01   -.66788E-08   -.90404E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 23.3246
  Prefactor  = 8.30832
  norm       = 0.295578
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 1.64793
  Prefactor  = 0.0001
  Prefactor  = 2.49392
  Prefactor  = 0.145137
  Prefactor  = 0.0001
  Prefactor  = 0.000100001
  Prefactor  = 0.000100001
  Prefactor  = 0.000100001
  norm       = 5.76858
  Prefactor  = 0.0001
  norm       = 4.4399
  Prefactor  = 3.83033
  norm       = 3.98825
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 6.85644
  norm       = 9.86491
  Prefactor  = 0.0001
  Prefactor  = 0.000100002
  Prefactor  = 11.9552
  Prefactor  = 52.2375
  norm       = 0.0001
  norm       = 0.857898
  norm       = 2.56513
  norm       = 0.861992
  Prefactor  = 7.35786
  Prefactor  = 0.39005
  norm       = 3.96347
  norm       = 18.4539
  norm       = 1.11921
  Prefactor  = 37.9479
  norm       = 0.0428764
  Normalizat = 0.92141
  Prefactor  = 1.08031
 **********
 **   18 **HESSE 
 **********

 FCN=   52892.12     FROM HESSE     STATUS=OK           964 CALLS     7279 TOTAL
                     EDM=   .12E-05    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     23.325        23.597        .82940E-04   -1.4742    
   2  Prefactor     8.3083        8.6498        .13909E-03   -1.5131    
   3  norm          .29558        3.2483        .39270E-02   -1.5599    
   4  Prefactor     .10000E-03    1.7612        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          .10000E-03    .10881        .10633E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     1.6479        2.3115        .32898E-03   -1.5451    
   7  Prefactor     .10000E-03    .73729        .24639E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     2.4939        5.0556        .25883E-03   -1.5392    
   9  Prefactor     .14514        7.8353        .36149E-02   -1.5632    
  10  Prefactor     .10000E-03    6.6734        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    6.2779        .36872E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    18.841        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .10000E-03    21.743        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          5.7686        1.3579        .12186E-03   -1.5228    
  15  Prefactor     .10000E-03    8.3746        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          4.4399        .60457        .63797E-04   -1.5287    
  17  Prefactor     3.8303        4.3505        .20624E-03   -1.5317    
  18  norm          3.9883        1.8256        .96291E-03   -1.5309    
  19  Prefactor     .10000E-03    4.2272        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10000E-03    11.711        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     6.8564        2.9024        .15319E-03   -1.5184    
  22  norm          9.8649        3.1164        .12758E-03   -1.5080    
  23  Prefactor     .10000E-03    3.4877        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     .10000E-03    14.076        .64290E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     11.955        23.299        .11585E-03   -1.5016    
  26  Prefactor     52.238        30.509        .55489E-04   -1.4261    
  27  norm          .10000E-03    .38154        .27097E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  norm          .85790        .73353        .24233E-02   -1.5523    
  29  norm          2.5651        1.5181        .20717E-03   -1.5388    
  30  norm          .86199        2.5165        .50669E-03   -1.5522    
  31  Prefactor     7.3579        6.2242        .14786E-03   -1.5165    
  32  Prefactor     .39005        2.6795        .27607E-02   -1.5583    
  33  norm          3.9635        .75427        .81173E-04   -1.5310    
  34  norm          18.454        10.813        .93234E-04   -1.4849    
  35  norm          1.1192        3.3852        .44422E-03   -1.5496    
  36  Prefactor     37.948        10.770        .65062E-04   -1.4475    
  37  norm          .42876E-01    2.1250        .24483E-02   -1.5667    
  38  Normalizat    .92141        .99037E-01    .37047E-03   -.95712    
  39  Prefactor     1.0803        .53033E-01    .19614E-03   -.90098    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.17871e-06
Minuit parameter uncertainties:
  1  23.6067
  2  8.65109
  3  1.95951
  4  2.67588e-09
  5  2.67227e-07
  6  2.31159
  7  8.90777e-07
  8  5.05648
  9  2.13234
  10  1.2077e-05
  11  0.000130397
  12  0.000257927
  13  0.000234823
  14  1.35793
  15  1.57646e-05
  16  0.604573
  17  4.35082
  18  1.82558
  19  4.9066e-06
  20  1.7687e-05
  21  2.90248
  22  3.11644
  23  6.52777e-06
  24  0.000337433
  25  23.3165
  26  30.5184
  27  1.87178e-06
  28  0.733535
  29  1.51814
  30  2.51681
  31  6.22475
  32  2.04451
  33  0.75427
  34  10.8141
  35  3.38579
  36  10.7705
  37  0.603018
  38  0.0990569
  39  0.053036
Done.

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

Extracting fit parameters...

4FGL J1821.6+6636
   Spectrum: PowerLaw
351    Prefactor:  1.000e-04  1.769e-05  1.000e-04  1.000e+04 ( 1.000e-15)
352        Index:  1.833e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
353        Scale:  4.696e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
610    Prefactor:  1.080e+00  5.304e-02  0.000e+00  1.000e+01 ( 1.000e+00)
611        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
612        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
609   Normalization:  9.214e-01  9.906e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 275.414 66.609
Photon Flux Upper Limit: 8.34e-09 ph cm-2 s-1
Energy Flux Upper Limit: 6.16e-04 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/260846/likelihoodResults_673228801_673833601_4FGL_J1821.6+6636_weekly_bin718.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) = 52892.1211979
delta logL = -0.000406712235417

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 52892.1207911
delta logL = 7.50878825784e-09

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10273E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    1.8010       1.0000          .0000       10.000    
     3 'Normalizat'    .92138       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0803       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6130E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

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

 FCN=   52892.12     FROM MIGRAD    STATUS=FAILED        92 CALLS      247 TOTAL
                     EDM=   .21E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10664E-03    5.1200        .18142E-01** at limit **
   2  Index         1.5708        6.0541        .50000        .88146E-05
   3  Normalizat    .92141        .12280E-02    .37047E-03   -.31915E-04
   4  Prefactor     1.0803        .70316E-03    .19614E-03   -.87455E-04
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   52892.12     FROM SIMPLEX   STATUS=UNCHANGED     90 CALLS      337 TOTAL
                     EDM=   .12E-04    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10664E-03    5.1200        .66454E-03** at limit **
   2  Index         1.5708        6.0541        .38688E-01    .88146E-05
   3  Normalizat    .92141        .12280E-02    .11805E-04   -.31915E-04
   4  Prefactor     1.0803        .70316E-03    .57453E-05   -.87455E-04
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   52892.12     FROM MIGRAD    STATUS=CONVERGED     33 CALLS      370 TOTAL
                     EDM=   .72E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10306E-03    87.637        .36285E-02** at limit **
   2  Index         1.6071        9.1745        .50000        .10020E-04
   3  Normalizat    .92141        .51815E-02    .14819E-04   -.31915E-04
   4  Prefactor     1.0803        .29670E-02    .39227E-04   -.86713E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.00010306
  Index      = 1.6071
  Normalizat = 0.92141
  Prefactor  = 1.08031
 **********
 **   18 **HESSE 
 **********

 FCN=   52892.12     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      399 TOTAL
                     EDM=   .40E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10306E-03    468.90        .72569E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         1.6071        7.3677        .50000       -.74583    
   3  Normalizat    .92141        .12417E-01    .29638E-05   -.95712    
   4  Prefactor     1.0803        .71094E-02    .78454E-05   -.90098    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 3.98919e-08
Minuit parameter uncertainties:
  1  0.0763686
  2  1002.06
  3  0.0124166
  4  0.00710941
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/260846': 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): 102
logL (Free Index) = 52892.1207904
delta logL = 7.90882040747e-07

Extracting fit parameters...

4FGL J1821.6+6636
   Spectrum: PowerLaw
351    Prefactor:  1.031e-04  7.637e-02  1.000e-04  1.000e+04 ( 1.000e-15)
352        Index:  1.607e+00  1.002e+03  0.000e+00  1.000e+01 (-1.000e+00)
353        Scale:  4.696e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
610    Prefactor:  1.080e+00  7.109e-03  0.000e+00  1.000e+01 ( 1.000e+00)
611        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
612        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
609   Normalization:  9.214e-01  1.242e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 275.414 66.609

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 /scratch/kocevski/260846/cmap_HighResolution_673228801_673833601_4FGL_J1821.6+6636_weekly_bin718.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='6.16e-04', job_status='DONE', photon_flux_upper_limit='8.34e-09', time_completed='2022-05-10 03:20:58.618013', job_id='260846', GAL2='1.08', fit_tolerance='1e-08', EG2='0.92', EG='0.92', time_epoch_completed='1652178058.62', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.08', dlogl='7.91e-07', ts2='-0.00', photon_index_error='0.00', photon_index='1.83' WHERE bin_id='718' AND source_name='4FGL J1821.6+6636' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue May 10 03:20:58 PDT 2022



------------------------------------------------------------
Sender: LSF System <lsf@bullet0111>
Subject: Job 260578: <4FGL_J1821.6+6636_weekly_bin718> in cluster <slac> Done

Job <4FGL_J1821.6+6636_weekly_bin718> was submitted from host <rhel6-64k> by user <kocevski> in cluster <slac> at Tue May 10 00:07:07 2022
Job was executed on host(s) <bullet0111>, in queue <medium>, as user <kocevski> in cluster <slac> at Tue May 10 00:52:47 2022
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Tue May 10 00:52:47 2022
Terminated at Tue May 10 03:20:29 2022
Results reported at Tue May 10 03:20:29 2022

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1821.6+6636_weekly_bin718 275.414 66.6093 673228801 673833601 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1821.6+6636 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   8704.00 sec.
    Max Memory :                                 1261 MB
    Average Memory :                             386.15 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   8862 sec.
    Turnaround time :                            11602 sec.

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


------------------------------------------------------------
Sender: LSF System <scs@bullet0185>
Subject: Job 260846: <4FGL_J1821.6+6636_weekly_bin718> in cluster <slac> Done

Job <4FGL_J1821.6+6636_weekly_bin718> was submitted from host <rhel6-64p> by user <kocevski> in cluster <slac> at Tue May 10 00:07:24 2022
Job was executed on host(s) <bullet0185>, in queue <medium>, as user <kocevski> in cluster <slac> at Tue May 10 00:54:06 2022
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Tue May 10 00:54:06 2022
Terminated at Tue May 10 03:20:59 2022
Results reported at Tue May 10 03:20:59 2022

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1821.6+6636_weekly_bin718 275.414 66.6093 673228801 673833601 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1821.6+6636 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   8637.00 sec.
    Max Memory :                                 1261 MB
    Average Memory :                             388.32 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   8813 sec.
    Turnaround time :                            11615 sec.

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

