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


Performing analysis on: 4FGL_J2049.9+1002_daily_bin1210
RA = 312.478, Dec = 10.0407
tmin = 552960001, tmax = 553219201
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='163173', job_status='RUN', time_executed='2021-09-25 18:51:51.717561', time_epoch_executed='1632621111.72' WHERE source_name='4FGL J2049.9+1002' and cadence='daily' and bin_id='1210'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/163173

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/163173/ft1_4FGL_J2049.9+1002_daily_bin1210.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/163173/ft2_4FGL_J2049.9+1002_daily_bin1210.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/163173/ft1_4FGL_J2049.9+1002_daily_bin1210.fits outfile=/scratch/kocevski/163173/ft1_filteredMKT_4FGL_J2049.9+1002_daily_bin1210.fits ra=312.478 dec=10.0407 rad=12.0 tmin=552960001.0 tmax=553219201.0 emin=100.0 emax=100000.0 zmin=0.0 zmax=90.0 evclass=128 evtype="INDEF" convtype=-1 phasemin=0.0 phasemax=1.0 evtable="EVENTS" chatter=2 clobber=yes debug=no gui=no mode="ql"

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

Done.
real 2.90
user 2.69
sys 0.20

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/163173/ft2_4FGL_J2049.9+1002_daily_bin1210.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/163173/ft2_4FGL_J2049.9+1002_daily_bin1210.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/163173/ft1_filteredMKT_4FGL_J2049.9+1002_daily_bin1210.fits evtable="EVENTS" outfile="/scratch/kocevski/163173/ft1_filtered_4FGL_J2049.9+1002_daily_bin1210.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.52
user 0.33
sys 0.16

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/163173/ft1_filtered_4FGL_J2049.9+1002_daily_bin1210.fits" evtable="EVENTS" scfile=/scratch/kocevski/163173/ft2_4FGL_J2049.9+1002_daily_bin1210.fits sctable="SC_DATA" outfile=/scratch/kocevski/163173/ltcube_552960001_553219201_4FGL_J2049.9+1002_daily_bin1210.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/163173/ft2_4FGL_J2049.9+1002_daily_bin1210.fits
.....................!
real 18.17
user 17.77
sys 0.35

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/163173/ft1_filtered_4FGL_J2049.9+1002_daily_bin1210.fits evtable="EVENTS" scfile=/scratch/kocevski/163173/ft2_4FGL_J2049.9+1002_daily_bin1210.fits sctable="SC_DATA" expcube=/scratch/kocevski/163173/ltcube_552960001_553219201_4FGL_J2049.9+1002_daily_bin1210.fits outfile=/scratch/kocevski/163173/expmap_552960001_553219201_4FGL_J2049.9+1002_daily_bin1210.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/163173/ltcube_552960001_553219201_4FGL_J2049.9+1002_daily_bin1210.fits
.....................!
real 192.99
user 187.35
sys 5.27

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 Cygnus Loop in ROI, make sure /nfs/farm/g/glast/g/LCRepository/Likelihood/ExtendedSources/Extended_archive_v18/Templates/CygnusLoop.fits is the correct path to the extended template.
Added 201 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 J2049.9+1002 @ 312.478 10.0407

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/163173/ft1_filtered_4FGL_J2049.9+1002_daily_bin1210.fits scfile=/scratch/kocevski/163173/ft2_4FGL_J2049.9+1002_daily_bin1210.fits outfile=/scratch/kocevski/163173/cmap_552960001_553219201_4FGL_J2049.9+1002_daily_bin1210.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=312.478 yref=10.0407 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.41
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/163173/ft1_filtered_4FGL_J2049.9+1002_daily_bin1210.fits scfile=/scratch/kocevski/163173/ft2_4FGL_J2049.9+1002_daily_bin1210.fits outfile=/scratch/kocevski/163173/cmap_HighResolution_552960001_553219201_4FGL_J2049.9+1002_daily_bin1210.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=312.478 yref=10.0407 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.56
user 0.39
sys 0.16

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/163173/ft1_filtered_4FGL_J2049.9+1002_daily_bin1210.fits evtable="EVENTS" scfile=/scratch/kocevski/163173/ft2_4FGL_J2049.9+1002_daily_bin1210.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/163173/Model_4FGL_J2049.9+1002_daily_bin1210.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 Cygnus Loop
adding source EG_v02
adding source GAL_V02
adding source W 51C
Working on...
/scratch/kocevski/163173/ft1_filtered_4FGL_J2049.9+1002_daily_bin1210.fits.....................!
real 112.64
user 111.06
sys 1.36

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/163173/ft1_filtered_4FGL_J2049.9+1002_daily_bin1210.fits', '/scratch/kocevski/163173/ft2_4FGL_J2049.9+1002_daily_bin1210.fits', expMap='/scratch/kocevski/163173/expmap_552960001_553219201_4FGL_J2049.9+1002_daily_bin1210.fits', expCube='/scratch/kocevski/163173/ltcube_552960001_553219201_4FGL_J2049.9+1002_daily_bin1210.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/163173/Model_4FGL_J2049.9+1002_daily_bin1210.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J2049.9+1002'

4FGL J2049.9+1002
   Spectrum: LogParabola
407         norm:  4.360e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-12)
408        alpha:  2.394e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
409         beta:  1.463e-01  0.000e+00  0.000e+00  1.000e+01 ( 1.000e+00) fixed
410           Eb:  6.403e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/163173/ft1_filtered_4FGL_J2049.9+1002_daily_bin1210.fits
Spacecraft file(s): /scratch/kocevski/163173/ft2_4FGL_J2049.9+1002_daily_bin1210.fits
Exposure map: /scratch/kocevski/163173/expmap_552960001_553219201_4FGL_J2049.9+1002_daily_bin1210.fits
Exposure cube: /scratch/kocevski/163173/ltcube_552960001_553219201_4FGL_J2049.9+1002_daily_bin1210.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/163173/Model_4FGL_J2049.9+1002_daily_bin1210.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) = 4825.08999369

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    58.279       1.0000         .10000E-03   10000.    
     2 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10012E-03   1.0000         .10000E-03   10000.    
     5 'norm      '    .19801       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10394E-03   1.0000         .10000E-03   10000.    
     7 'norm      '    .10008E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10018E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    23.097       1.0000         .10000E-03   10000.    
    11 'Prefactor '    437.16       1.0000         .10000E-03   10000.    
    12 'Prefactor '    37.011       1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10899E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    8.4028       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10175E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    16.491       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10108E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    10.366       1.0000         .10000E-03   10000.    
    20 'Prefactor '    5.1025       1.0000         .10000E-03   10000.    
    21 'Normalizat'    .81113E-01   1.0000         .10000E-01   10.000    
    22 'Prefactor '    1.0935       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6980E+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=   4825.063     FROM MIGRAD    STATUS=FAILED       836 CALLS     3094 TOTAL
                     EDM=   .77E-07    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     58.269        62.469        .52552E-04   -.12288E-04
   2  norm          .10000E-03    2.3388        .10374E-02** at limit **
   3  Prefactor     .10000E-03    7.2439        .18142E-02** at limit **
   4  Prefactor     .10000E-03    29.402        .18142E-02** at limit **
   5  norm          .19712        2.1572        .13623E-02    .46058E-02
   6  Prefactor     .10000E-03    207.51        .18142E-02** at limit **
   7  norm          .10000E-03    6.1904        .16867E-02** at limit **
   8  norm          .10000E-03    21.665        .18142E-02** at limit **
   9  Prefactor     .10000E-03    7.3799        .18142E-02** at limit **
  10  Prefactor     23.090        20.564        .83347E-04    .87297E-05
  11  Prefactor     437.34        250.22        .97818E-04   -.15086E-04
  12  Prefactor     37.013        30.880        .65878E-04    .94914E-05
  13  Prefactor     .10000E-03    114.54        .18142E-02** at limit **
  14  Prefactor     .10000E-03    21.868        .18142E-02** at limit **
  15  Prefactor     8.4073        56.036        .13830E-03   -.20552E-05
  16  Prefactor     .10000E-03    554.94        .18142E-02** at limit **
  17  norm          16.490        9.3533        .98627E-04    .11527E-05
  18  Prefactor     .10000E-03    88.244        .18142E-02** at limit **
  19  Prefactor     10.372        12.959        .12445E-03    .23204E-04
  20  Prefactor     5.0943        24.412        .17799E-03    .15585E-04
  21  Normalizat    .79836E-01    1.5077        .12642E-01    .30549E-03
  22  Prefactor     1.0938        .18370        .14059E-03   -.77143E-04
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   4825.063     FROM SIMPLEX   STATUS=UNCHANGED   1210 CALLS     4304 TOTAL
                     EDM=   .17E-04    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     58.269        62.469        .48172E-06   -1.4180    
   2  norm          .10000E-03    2.3388        .23503E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .10000E-03    7.2439        .10943E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    29.402        .24343E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          .19712        2.1572        .51477E-06   -1.5619    
   6  Prefactor     .10000E-03    207.51        .16713E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  norm          .10000E-03    6.1904        .38379E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .10000E-03    21.665        .20125E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .10000E-03    7.3799        .12977E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     23.090        20.564        .48493E-06   -1.4747    
  11  Prefactor     437.34        250.22        .37794E-06   -1.1494    
  12  Prefactor     37.013        30.880        .47641E-06   -1.4490    
  13  Prefactor     .10000E-03    114.54        .29948E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10000E-03    21.868        .54044E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     8.4073        56.036        .49783E-06   -1.5128    
  16  Prefactor     .10000E-03    554.94        .10121E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          16.490        9.3533        .48981E-06   -1.4896    
  18  Prefactor     .10000E-03    88.244        .67406E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     10.372        12.959        .49504E-06   -1.5064    
  20  Prefactor     5.0943        24.412        .50142E-06   -1.5257    
  21  Normalizat    .79836E-01    1.5077        .46123E-06   -1.4034    
  22  Prefactor     1.0938        .18370        .29484E-06   -.89664    
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   4825.063     FROM MIGRAD    STATUS=CONVERGED    333 CALLS     4637 TOTAL
                     EDM=   .30E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     58.269        62.463        .10510E-04    .43266E-06
   2  norm          .10000E-03    2.3388        .20747E-03** at limit **
   3  Prefactor     .10000E-03    7.2440        .36285E-03** at limit **
   4  Prefactor     .10000E-03    29.403        .36285E-03** at limit **
   5  norm          .19713        2.1422        .27246E-03    .98056E-05
   6  Prefactor     .10000E-03    207.54        .36285E-03** at limit **
   7  norm          .10000E-03    6.1906        .33733E-03** at limit **
   8  norm          .10000E-03    21.665        .36285E-03** at limit **
   9  Prefactor     .10000E-03    7.3801        .36285E-03** at limit **
  10  Prefactor     23.090        20.508        .33339E-05    .20460E-05
  11  Prefactor     437.34        248.01        .19564E-04    .58112E-06
  12  Prefactor     37.013        30.052        .26351E-05    .34514E-05
  13  Prefactor     .10000E-03    114.62        .36285E-03** at limit **
  14  Prefactor     .10000E-03    21.870        .36285E-03** at limit **
  15  Prefactor     8.4074        55.930        .55318E-05    .41103E-06
  16  Prefactor     .10000E-03    554.95        .36285E-03** at limit **
  17  norm          16.490        9.3096        .39451E-05    .46108E-05
  18  Prefactor     .10000E-03    88.270        .36285E-03** at limit **
  19  Prefactor     10.372        12.841        .49778E-05    .41109E-05
  20  Prefactor     5.0943        23.098        .71196E-05    .22355E-05
  21  Normalizat    .79834E-01    1.0250        .25285E-02   -.15467E-05
  22  Prefactor     1.0938        .15329        .56237E-05    .10917E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 58.2693
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.197132
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 23.0901
  Prefactor  = 437.34
  Prefactor  = 37.0129
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 8.40737
  Prefactor  = 0.0001
  norm       = 16.4902
  Prefactor  = 0.0001
  Prefactor  = 10.3724
  Prefactor  = 5.09429
  Normalizat = 0.0798337
  Prefactor  = 1.09383
 **********
 **   18 **HESSE 
 **********

 FCN=   4825.063     FROM HESSE     STATUS=OK           324 CALLS     4961 TOTAL
                     EDM=   .35E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     58.269        62.433        .21021E-05   -1.4180    
   2  norm          .10000E-03    2.3388        .20747E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .10000E-03    7.2440        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    29.403        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          .19713        2.1374        .10898E-04   -1.5619    
   6  Prefactor     .10000E-03    207.54        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  norm          .10000E-03    6.1907        .67466E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .10000E-03    21.665        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .10000E-03    7.3801        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     23.090        20.423        .66678E-06   -1.4747    
  11  Prefactor     437.34        247.82        .39127E-05   -1.1494    
  12  Prefactor     37.013        29.868        .52703E-06   -1.4490    
  13  Prefactor     .10000E-03    114.63        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10000E-03    21.870        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     8.4074        56.194        .11064E-05   -1.5128    
  16  Prefactor     .10000E-03    554.95        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          16.490        9.2994        .78902E-06   -1.4896    
  18  Prefactor     .10000E-03    88.271        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     10.372        12.791        .99557E-06   -1.5064    
  20  Prefactor     5.0943        22.760        .14239E-05   -1.5257    
  21  Normalizat    .79834E-01    .95288        .10114E-03   -1.4034    
  22  Prefactor     1.0938        .14797        .11247E-05   -.89664    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.49375e-12
Minuit parameter uncertainties:
  1  62.5028
  2  7.95642e-10
  3  6.57666e-07
  4  7.09901e-06
  5  1.29797
  6  2.3927e-05
  7  1.18322e-07
  8  2.57806e-09
  9  8.02253e-08
  10  20.429
  11  248.429
  12  29.8799
  13  4.90546e-06
  14  2.70533e-07
  15  43.5306
  16  6.71846e-07
  17  9.30026
  18  2.44669e-06
  19  12.7948
  20  21.549
  21  0.526479
  22  0.148022
Done.

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

Extracting fit parameters...

4FGL J2049.9+1002
   Spectrum: LogParabola
407         norm:  1.000e-04  1.183e-07  1.000e-04  1.000e+04 ( 1.000e-12)
408        alpha:  2.394e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
409         beta:  1.463e-01  0.000e+00  0.000e+00  1.000e+01 ( 1.000e+00) fixed
410           Eb:  6.403e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
691    Prefactor:  1.094e+00  1.480e-01  0.000e+00  1.000e+01 ( 1.000e+00)
692        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
693        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
690   Normalization:  7.983e-02  5.265e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 312.478 10.041
Photon Flux Upper Limit: 1.36e-07 ph cm-2 s-1
Energy Flux Upper Limit: 4.32e-05 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/163173/likelihoodResults_552960001_553219201_4FGL_J2049.9+1002_daily_bin1210.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) = 4825.06350943
delta logL = -0.000768817910284

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 4825.06274089
delta logL = -2.74504600384e-07

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     2 'alpha     '    2.3938       1.0000          .0000       5.0000    
     3 'Normalizat'    .79514E-01   1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0939       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6980E+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=   4825.063     FROM MIGRAD    STATUS=FAILED        87 CALLS      236 TOTAL
                     EDM=   .34E-07    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .10001E-03    322.21        .16867E-02** at limit **
   2  alpha         2.3791        2.5990        .16479        .21696E-06
   3  Normalizat    .79833E-01    .86512        .12648E-01    .29633E-03
   4  Prefactor     1.0938        .15885        .14059E-03   -.54098E-04
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   4825.063     FROM SIMPLEX   STATUS=UNCHANGED    160 CALLS      396 TOTAL
                     EDM=   .98E-05    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .10001E-03    322.21        .43166E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  alpha         2.3791        2.5990        .20896E-05   -.48372E-01
   3  Normalizat    .79833E-01    .86512        .33820E-05   -1.4034    
   4  Prefactor     1.0938        .15885        .15737E-06   -.89664    
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   4825.063     FROM MIGRAD    STATUS=CONVERGED     32 CALLS      428 TOTAL
                     EDM=   .27E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .10000E-03    6.1931        .33734E-03** at limit **
   2  alpha         2.3645        3.5360        .65918E-02    .20696E-08
   3  Normalizat    .79836E-01    .69306        .25296E-02    .11851E-04
   4  Prefactor     1.0938        .14168        .56236E-05    .31132E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 0.0001
  alpha      = 2.36448
  Normalizat = 0.0798364
  Prefactor  = 1.09383
 **********
 **   18 **HESSE 
 **********

 FCN=   4825.063     FROM HESSE     STATUS=OK            23 CALLS      451 TOTAL
                     EDM=   .23E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .10000E-03    6.1927        .67467E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  alpha         2.3645        3.0424        .13184E-02   -.54235E-01
   3  Normalizat    .79836E-01    .65964        .10119E-03   -1.4034    
   4  Prefactor     1.0938        .13810        .11247E-05   -.89664    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.28871e-11
Minuit parameter uncertainties:
  1  7.80595e-06
  2  406.699
  3  0.435741
  4  0.138144
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/163173': 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) = 4825.06274061
delta logL = 2.63753463514e-09

Extracting fit parameters...

4FGL J2049.9+1002
   Spectrum: LogParabola
407         norm:  1.000e-04  7.806e-06  1.000e-04  1.000e+04 ( 1.000e-12)
408        alpha:  2.364e+00  4.067e+02  0.000e+00  5.000e+00 ( 1.000e+00)
409         beta:  1.463e-01  0.000e+00  0.000e+00  1.000e+01 ( 1.000e+00) fixed
410           Eb:  6.403e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
691    Prefactor:  1.094e+00  1.381e-01  0.000e+00  1.000e+01 ( 1.000e+00)
692        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
693        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
690   Normalization:  7.984e-02  4.357e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 312.478 10.041

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/163173/cmap_HighResolution_552960001_553219201_4FGL_J2049.9+1002_daily_bin1210.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='4.32e-05', job_status='DONE', photon_flux_upper_limit='1.36e-07', time_completed='2021-09-25 19:06:01.974872', job_id='163173', GAL2='1.09', fit_tolerance='1e-08', EG2='0.08', EG='0.08', time_epoch_completed='1632621961.97', return_code2='0', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.09', dlogl='2.64e-09', ts2='-0.00', photon_index_error='0.00', photon_index='2.39' WHERE bin_id='1210' AND source_name='4FGL J2049.9+1002' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep 25 19:06:02 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0254>
Subject: Job 163173: <4FGL_J2049.9+1002_daily_bin1210> in cluster <slac> Done

Job <4FGL_J2049.9+1002_daily_bin1210> was submitted from host <rhel6-64h> by user <kocevski> in cluster <slac> at Sat Sep 25 18:50:23 2021
Job was executed on host(s) <bullet0254>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Sep 25 18:51:22 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Sat Sep 25 18:51:22 2021
Terminated at Sat Sep 25 19:06:02 2021
Results reported at Sat Sep 25 19:06:02 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2049.9+1002_daily_bin1210 312.478 10.0407 552960001 553219201 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J2049.9+1002 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   847.02 sec.
    Max Memory :                                 1258 MB
    Average Memory :                             342.70 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   880 sec.
    Turnaround time :                            939 sec.

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

