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


Performing analysis on: 4FGL_J1821.6+6636_daily_bin1084
RA = 275.414, Dec = 66.6093
tmin = 520300801, tmax = 520560001
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='800238', job_status='RUN', time_executed='2021-09-20 04:45:28.158977', time_epoch_executed='1632138328.16' WHERE source_name='4FGL J1821.6+6636' and cadence='daily' and bin_id='1084'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/800238

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/800238/ft1_4FGL_J1821.6+6636_daily_bin1084.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/800238/ft2_4FGL_J1821.6+6636_daily_bin1084.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/800238/ft1_4FGL_J1821.6+6636_daily_bin1084.fits outfile=/scratch/kocevski/800238/ft1_filteredMKT_4FGL_J1821.6+6636_daily_bin1084.fits ra=275.414 dec=66.6093 rad=12.0 tmin=520300801.0 tmax=520560001.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 6.17
user 5.88
sys 0.27

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/800238/ft2_4FGL_J1821.6+6636_daily_bin1084.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/800238/ft1_filteredMKT_4FGL_J1821.6+6636_daily_bin1084.fits evtable="EVENTS" outfile="/scratch/kocevski/800238/ft1_filtered_4FGL_J1821.6+6636_daily_bin1084.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.49
user 0.34
sys 0.14

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/800238/ft1_filtered_4FGL_J1821.6+6636_daily_bin1084.fits" evtable="EVENTS" scfile=/scratch/kocevski/800238/ft2_4FGL_J1821.6+6636_daily_bin1084.fits sctable="SC_DATA" outfile=/scratch/kocevski/800238/ltcube_520300801_520560001_4FGL_J1821.6+6636_daily_bin1084.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/800238/ft2_4FGL_J1821.6+6636_daily_bin1084.fits
.....................!
real 12.15
user 11.78
sys 0.34

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/800238/ft1_filtered_4FGL_J1821.6+6636_daily_bin1084.fits evtable="EVENTS" scfile=/scratch/kocevski/800238/ft2_4FGL_J1821.6+6636_daily_bin1084.fits sctable="SC_DATA" expcube=/scratch/kocevski/800238/ltcube_520300801_520560001_4FGL_J1821.6+6636_daily_bin1084.fits outfile=/scratch/kocevski/800238/expmap_520300801_520560001_4FGL_J1821.6+6636_daily_bin1084.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/800238/ltcube_520300801_520560001_4FGL_J1821.6+6636_daily_bin1084.fits
.....................!
real 190.43
user 185.21
sys 4.81

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/800238/ft1_filtered_4FGL_J1821.6+6636_daily_bin1084.fits scfile=/scratch/kocevski/800238/ft2_4FGL_J1821.6+6636_daily_bin1084.fits outfile=/scratch/kocevski/800238/cmap_520300801_520560001_4FGL_J1821.6+6636_daily_bin1084.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.55
user 0.37
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/800238/ft1_filtered_4FGL_J1821.6+6636_daily_bin1084.fits scfile=/scratch/kocevski/800238/ft2_4FGL_J1821.6+6636_daily_bin1084.fits outfile=/scratch/kocevski/800238/cmap_HighResolution_520300801_520560001_4FGL_J1821.6+6636_daily_bin1084.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.55
user 0.37
sys 0.16

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

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/800238/ft1_filtered_4FGL_J1821.6+6636_daily_bin1084.fits', '/scratch/kocevski/800238/ft2_4FGL_J1821.6+6636_daily_bin1084.fits', expMap='/scratch/kocevski/800238/expmap_520300801_520560001_4FGL_J1821.6+6636_daily_bin1084.fits', expCube='/scratch/kocevski/800238/ltcube_520300801_520560001_4FGL_J1821.6+6636_daily_bin1084.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/800238/Model_4FGL_J1821.6+6636_daily_bin1084.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/800238/ft1_filtered_4FGL_J1821.6+6636_daily_bin1084.fits
Spacecraft file(s): /scratch/kocevski/800238/ft2_4FGL_J1821.6+6636_daily_bin1084.fits
Exposure map: /scratch/kocevski/800238/expmap_520300801_520560001_4FGL_J1821.6+6636_daily_bin1084.fits
Exposure cube: /scratch/kocevski/800238/ltcube_520300801_520560001_4FGL_J1821.6+6636_daily_bin1084.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/800238/Model_4FGL_J1821.6+6636_daily_bin1084.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) = 3516.53528692

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    381.36       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
     5 'norm      '    .84547       1.0000         .10000E-03   10000.    
     6 'Prefactor '    1.9517       1.0000         .10000E-03   10000.    
     7 'Prefactor '    1.4598       1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .85725E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10369E-03   1.0000         .10000E-03   10000.    
    14 'norm      '    10.999       1.0000         .10000E-03   10000.    
    15 'Prefactor '    36.626       1.0000         .10000E-03   10000.    
    16 'norm      '    .33576       1.0000         .10000E-03   10000.    
    17 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    18 'norm      '    .10006E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10007E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    283.80       1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10754E-03   1.0000         .10000E-03   10000.    
    22 'norm      '    .10025E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    81.899       1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10027E-03   1.0000         .10000E-03   10000.    
    25 'Prefactor '    151.33       1.0000         .10000E-03   10000.    
    26 'Prefactor '    7.9587       1.0000         .10000E-03   10000.    
    27 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    28 'norm      '    .12151E-01   1.0000         .10000E-03   10000.    
    29 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    30 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    31 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    32 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    33 'norm      '    3.7139       1.0000         .10000E-03   10000.    
    34 'norm      '    11.074       1.0000         .10000E-03   10000.    
    35 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    36 'Prefactor '    89.982       1.0000         .10000E-03   10000.    
    37 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    38 'Normalizat'    1.4214       1.0000         .10000E-01   10.000    
    39 'Prefactor '    .75112       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=   3516.390     FROM MIGRAD    STATUS=CONVERGED   1181 CALLS     7130 TOTAL
                     EDM=   .36E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.7%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     381.39        343.23       -.12836E-05   -.33618E-05
   2  Prefactor     .10000E-03    43.996        .21159E-06** at limit **
   3  norm          .10000E-03    10.646        .20386E-06** at limit **
   4  Prefactor     .10000E-03    40.430       -.14205E-06** at limit **
   5  norm          .84623        1.5784        .68742E-06    .49098E-03
   6  Prefactor     1.9551        59.178        .34322E-05    .51328E-04
   7  Prefactor     1.4571        6.0710        .24887E-06    .15463E-04
   8  Prefactor     .10000E-03    28.296       -.33059E-07** at limit **
   9  Prefactor     .10000E-03    5.2919        .45208E-08** at limit **
  10  Prefactor     .10000E-03    296.19        .18952E-06** at limit **
  11  Prefactor     .10000E-03    7.9131       -.67769E-07** at limit **
  12  Prefactor     .10000E-03    39.341       -.29944E-06** at limit **
  13  Prefactor     .10000E-03    100.35        .30425E-06** at limit **
  14  norm          11.001        6.3430       -.14030E-06   -.57031E-04
  15  Prefactor     36.620        40.899       -.83058E-07   -.10349E-05
  16  norm          .33598        1.1465        .12609E-06    .45863E-04
  17  Prefactor     .10000E-03    5.6959        .13739E-07** at limit **
  18  norm          .10000E-03    7.1664        .20758E-07** at limit **
  19  Prefactor     .10000E-03    17.016        .31337E-07** at limit **
  20  Prefactor     283.96        341.97       -.26148E-05   -.42579E-05
  21  Prefactor     .10000E-03    14.987        .59982E-06** at limit **
  22  norm          .10000E-03    26.298       -.42170E-06** at limit **
  23  Prefactor     81.909        44.191       -.18781E-07   -.12041E-04
  24  Prefactor     .10000E-03    26.871        .27526E-06** at limit **
  25  Prefactor     151.59        189.98       -.57266E-05   -.76989E-05
  26  Prefactor     8.1355        891.85       -.18616E-04   -.40865E-05
  27  norm          .10000E-03    1.5110        .79930E-07** at limit **
  28  norm          .15513        11.334        .16753E-05   -.39928E-03
  29  norm          .10000E-03    3.5793       -.39335E-07** at limit **
  30  norm          .10000E-03    7.6628       -.10872E-07** at limit **
  31  Prefactor     .10000E-03    20.966       -.10357E-06** at limit **
  32  Prefactor     .10000E-03    7.9354       -.10396E-06** at limit **
  33  norm          3.7147        2.7368        .85785E-07    .27804E-04
  34  norm          11.159        140.97       -.42776E-05   -.25677E-05
  35  norm          .10000E-03    13.780       -.28231E-07** at limit **
  36  Prefactor     90.032        48.998       -.82569E-06   -.39577E-05
  37  norm          .10000E-03    2.2071       -.86774E-07** at limit **
  38  Normalizat    1.4215        .35420        .15510E-05   -.47815E-04
  39  Prefactor     .75059        .16924       -.42394E-06   -.10803E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 381.387
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 0.846226
  Prefactor  = 1.95508
  Prefactor  = 1.45712
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.000100001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 11.0012
  Prefactor  = 36.6202
  norm       = 0.335976
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 283.956
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 81.9088
  Prefactor  = 0.0001
  Prefactor  = 151.586
  Prefactor  = 8.13549
  norm       = 0.0001
  norm       = 0.155126
  norm       = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 3.71468
  norm       = 11.1585
  norm       = 0.0001
  Prefactor  = 90.0318
  norm       = 0.0001
  Normalizat = 1.42153
  Prefactor  = 0.750589
 **********
 **   18 **HESSE 
 **********

 FCN=   3516.390     FROM HESSE     STATUS=OK           932 CALLS     8062 TOTAL
                     EDM=   .56E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     381.39        343.66        .10443E-03   -1.1777    
   2  Prefactor     .10000E-03    43.986        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .10000E-03    10.652        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    40.490        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          .84623        1.5641        .94680E-03   -1.5524    
   6  Prefactor     1.9551        63.053        .14852E-02   -1.5428    
   7  Prefactor     1.4571        5.8728        .26668E-03   -1.5467    
   8  Prefactor     .10000E-03    28.352        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .10000E-03    5.3003        .13323E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    301.40        .41721E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    7.9232        .16293E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    39.343        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .10000E-03    100.36        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          11.001        6.3524        .10880E-03   -1.5044    
  15  Prefactor     36.620        40.899        .66222E-04   -1.4497    
  16  norm          .33598        1.0776        .10983E-02   -1.5592    
  17  Prefactor     .10000E-03    5.6981        .13823E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  norm          .10000E-03    7.2380        .15483E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10000E-03    17.018        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     283.96        341.62        .12044E-03   -1.2322    
  21  Prefactor     .10000E-03    15.357        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  norm          .10000E-03    26.868        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     81.909        44.267        .44383E-04   -1.3895    
  24  Prefactor     .10000E-03    27.068        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     151.59        188.79        .16382E-03   -1.3239    
  26  Prefactor     8.1355        870.20        .14213E-03   -1.5137    
  27  norm          .10000E-03    1.5125        .71192E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  norm          .15513        102.88        .34822E-02   -1.5629    
  29  norm          .10000E-03    3.5806        .10957E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  30  norm          .10000E-03    7.6656        .16033E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  31  Prefactor     .10000E-03    21.035        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  32  Prefactor     .10000E-03    8.1459        .32595E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  33  norm          3.7147        2.7346        .78917E-04   -1.5322    
  34  norm          11.159        144.33        .12039E-03   -1.5040    
  35  norm          .10000E-03    13.784        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  36  Prefactor     90.032        48.921        .21180E-03   -1.3807    
  37  norm          .10000E-03    2.2202        .85998E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  38  Normalizat    1.4215        .40681        .32608E-03   -.80008    
  39  Prefactor     .75059        .19683        .21510E-03   -1.0158    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 5.56897e-09
Minuit parameter uncertainties:
  1  345.526
  2  6.62601e-05
  3  1.38291e-05
  4  3.20811e-05
  5  1.56413
  6  22.2308
  7  5.85142
  8  0.000133746
  9  4.90293e-06
  10  0.00128128
  11  4.49621e-06
  12  1.30041e-05
  13  1.20446e-05
  14  6.35282
  15  40.9302
  16  1.0777
  17  1.23733e-06
  18  2.40755e-07
  19  3.45948e-07
  20  344.079
  21  3.00132e-05
  22  7.52559e-05
  23  44.2844
  24  2.69621e-05
  25  189.551
  26  170.894
  27  2.58007e-06
  28  8.00126
  29  1.38305e-06
  30  2.64986e-06
  31  9.01552e-06
  32  1.39773e-06
  33  2.73464
  34  80.5015
  35  7.49796e-06
  36  48.9426
  37  7.61297e-07
  38  0.40774
  39  0.197012
Done.

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

Extracting fit parameters...

4FGL J1821.6+6636
   Spectrum: PowerLaw
351    Prefactor:  2.840e+02  3.441e+02  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:  7.506e-01  1.970e-01  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:  1.422e+00  4.077e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 1.01
Ra Dec: 275.414 66.609
Photon Index (Fixed Index): 1.83 +/- 0.00
Photon Flux (Fixed Index): 3.94e-08 +/- 4.77e-08
Energy Flux (Fixed Index): 4.28e-05 +/- 5.18e-05

TS (Fixed Index): 1.01
Ra Dec: 275.414 66.609
Photon Flux Upper Limit: 1.60e-07 ph cm-2 s-1
Energy Flux Upper Limit: 1.18e-02 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/800238/likelihoodResults_520300801_520560001_4FGL_J1821.6+6636_daily_bin1084.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) = 3516.33170751
delta logL = 0.0582073407713

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 3516.32800722
delta logL = 0.0619076280286

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    179.87       1.0000         .10000E-03   10000.    
     2 'Index     '    2.0706       1.0000          .0000       10.000    
     3 'Normalizat'    1.4117       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .75288       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.

 FCN=   3516.328     FROM MIGRAD    STATUS=CONVERGED     79 CALLS      282 TOTAL
                     EDM=   .52E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     179.63        430.15        .15049E-03    .31541E-04
   2  Index         2.0707        .84965        .47714E-02    .52218E-04
   3  Normalizat    1.4117        .34838        .32697E-03   -.10141E-02
   4  Prefactor     .75330        .17382        .21475E-03   -.18981E-02
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 179.629
  Index      = 2.07073
  Normalizat = 1.41174
  Prefactor  = 0.753302
 **********
 **   18 **HESSE 
 **********

 FCN=   3516.328     FROM HESSE     STATUS=OK            25 CALLS      307 TOTAL
                     EDM=   .52E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     179.63        364.27        .30097E-04   -1.3019    
   2  Index         2.0707        .71716        .19086E-03   -.62593    
   3  Normalizat    1.4117        .34820        .65394E-04   -.80290    
   4  Prefactor     .75330        .17371        .42951E-04   -1.0147    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 5.19778e-09
Minuit parameter uncertainties:
  1  368.994
  2  0.720961
  3  0.348785
  4  0.173832
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/800238': 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) = 3516.32799772
delta logL = 0.0619171241351

Extracting fit parameters...

4FGL J1821.6+6636
   Spectrum: PowerLaw
351    Prefactor:  1.796e+02  3.690e+02  1.000e-04  1.000e+04 ( 1.000e-15)
352        Index:  2.071e+00  7.210e-01  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:  7.533e-01  1.738e-01  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:  1.412e+00  3.488e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.14
Ra Dec: 275.414 66.609
Photon Index (Free Index): 2.07 +/- 0.72
Photon Flux (Free Index): 4.86e-08 +/- 5.93e-08
Energy Flux (Free Index): 2.84e-05 +/- 4.76e-05

Creating a high resolution counts map...
INFO: Auto-setting vmin to  0.000e+00 [aplpy.core]
INFO: Auto-setting vmax to  0.000e+00 [aplpy.core]
Saving /scratch/kocevski/800238/cmap_HighResolution_520300801_520560001_4FGL_J1821.6+6636_daily_bin1084.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.18e-02', comment='SUCCESS', photon_flux='3.94e-08', energy_flux2='2.84e-05', photon_flux_error='4.77e-08', dlogl='6.19e-02', energy_flux='4.28e-05', photon_flux2='4.86e-08', job_status='DONE', time_completed='2021-09-20 05:00:44.675797', photon_index_error2='0.72', photon_index2='2.07', ts='1.01', fit_tolerance='1e-08', GAL='0.75', photon_index_error='0.00', photon_flux_upper_limit='1.60e-07', energy_flux_error2='4.76e-05', EG='1.42', time_epoch_completed='1632139244.68', return_code='0', job_id='800238', GAL2='0.75', EG2='1.41', return_code2='0', energy_flux_error='5.18e-05', photon_flux_error2='5.93e-08', ts2='1.14', photon_index='1.83' WHERE bin_id='1084' AND source_name='4FGL J1821.6+6636' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep 20 05:00:44 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0214>
Subject: Job 800238: <4FGL_J1821.6+6636_daily_bin1084> in cluster <slac> Done

Job <4FGL_J1821.6+6636_daily_bin1084> was submitted from host <rhel6-64d> by user <kocevski> in cluster <slac> at Mon Sep 20 04:45:17 2021
Job was executed on host(s) <bullet0214>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep 20 04:45:18 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Mon Sep 20 04:45:18 2021
Terminated at Mon Sep 20 05:00:45 2021
Results reported at Mon Sep 20 05:00:45 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1821.6+6636_daily_bin1084 275.414 66.6093 520300801 520560001 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 :                                   912.15 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             357.70 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   926 sec.
    Turnaround time :                            928 sec.

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

