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


Performing analysis on: 4FGL_J2149.7+1917_daily_bin1223
RA = 327.444, Dec = 19.2859
tmin = 556329601, tmax = 556588801
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='991322', job_status='RUN', time_executed='2021-09-27 18:43:33.926608', time_epoch_executed='1632793413.93' WHERE source_name='4FGL J2149.7+1917' and cadence='daily' and bin_id='1223'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/991322

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/991322/ft1_4FGL_J2149.7+1917_daily_bin1223.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/991322/ft2_4FGL_J2149.7+1917_daily_bin1223.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/991322/ft1_4FGL_J2149.7+1917_daily_bin1223.fits outfile=/scratch/kocevski/991322/ft1_filteredMKT_4FGL_J2149.7+1917_daily_bin1223.fits ra=327.444 dec=19.2859 rad=12.0 tmin=556329601.0 tmax=556588801.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 3.81
user 3.56
sys 0.23

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/991322/ft2_4FGL_J2149.7+1917_daily_bin1223.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/991322/ft2_4FGL_J2149.7+1917_daily_bin1223.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/991322/ft1_filteredMKT_4FGL_J2149.7+1917_daily_bin1223.fits evtable="EVENTS" outfile="/scratch/kocevski/991322/ft1_filtered_4FGL_J2149.7+1917_daily_bin1223.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.35
sys 0.16

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/991322/ft1_filtered_4FGL_J2149.7+1917_daily_bin1223.fits" evtable="EVENTS" scfile=/scratch/kocevski/991322/ft2_4FGL_J2149.7+1917_daily_bin1223.fits sctable="SC_DATA" outfile=/scratch/kocevski/991322/ltcube_556329601_556588801_4FGL_J2149.7+1917_daily_bin1223.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/991322/ft2_4FGL_J2149.7+1917_daily_bin1223.fits
.....................!
real 14.64
user 14.22
sys 0.34

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/991322/ft1_filtered_4FGL_J2149.7+1917_daily_bin1223.fits evtable="EVENTS" scfile=/scratch/kocevski/991322/ft2_4FGL_J2149.7+1917_daily_bin1223.fits sctable="SC_DATA" expcube=/scratch/kocevski/991322/ltcube_556329601_556588801_4FGL_J2149.7+1917_daily_bin1223.fits outfile=/scratch/kocevski/991322/expmap_556329601_556588801_4FGL_J2149.7+1917_daily_bin1223.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/991322/ltcube_556329601_556588801_4FGL_J2149.7+1917_daily_bin1223.fits
.....................!
real 192.85
user 187.05
sys 5.14

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 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 161 point sources and 1 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 J2149.7+1917 @ 327.444 19.2859

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/991322/ft1_filtered_4FGL_J2149.7+1917_daily_bin1223.fits scfile=/scratch/kocevski/991322/ft2_4FGL_J2149.7+1917_daily_bin1223.fits outfile=/scratch/kocevski/991322/cmap_556329601_556588801_4FGL_J2149.7+1917_daily_bin1223.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=327.444 yref=19.2859 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.54
user 0.40
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/991322/ft1_filtered_4FGL_J2149.7+1917_daily_bin1223.fits scfile=/scratch/kocevski/991322/ft2_4FGL_J2149.7+1917_daily_bin1223.fits outfile=/scratch/kocevski/991322/cmap_HighResolution_556329601_556588801_4FGL_J2149.7+1917_daily_bin1223.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=327.444 yref=19.2859 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.37
sys 0.17

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/991322/ft1_filtered_4FGL_J2149.7+1917_daily_bin1223.fits evtable="EVENTS" scfile=/scratch/kocevski/991322/ft2_4FGL_J2149.7+1917_daily_bin1223.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/991322/Model_4FGL_J2149.7+1917_daily_bin1223.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
Working on...
/scratch/kocevski/991322/ft1_filtered_4FGL_J2149.7+1917_daily_bin1223.fits......................!
real 47.51
user 46.19
sys 1.18

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/991322/ft1_filtered_4FGL_J2149.7+1917_daily_bin1223.fits', '/scratch/kocevski/991322/ft2_4FGL_J2149.7+1917_daily_bin1223.fits', expMap='/scratch/kocevski/991322/expmap_556329601_556588801_4FGL_J2149.7+1917_daily_bin1223.fits', expCube='/scratch/kocevski/991322/ltcube_556329601_556588801_4FGL_J2149.7+1917_daily_bin1223.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/991322/Model_4FGL_J2149.7+1917_daily_bin1223.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J2149.7+1917'

4FGL J2149.7+1917
   Spectrum: PowerLaw
277    Prefactor:  7.294e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-13)
278        Index:  2.521e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
279        Scale:  8.988e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/991322/ft1_filtered_4FGL_J2149.7+1917_daily_bin1223.fits
Spacecraft file(s): /scratch/kocevski/991322/ft2_4FGL_J2149.7+1917_daily_bin1223.fits
Exposure map: /scratch/kocevski/991322/expmap_556329601_556588801_4FGL_J2149.7+1917_daily_bin1223.fits
Exposure cube: /scratch/kocevski/991322/ltcube_556329601_556588801_4FGL_J2149.7+1917_daily_bin1223.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/991322/Model_4FGL_J2149.7+1917_daily_bin1223.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) = 2545.47093922

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    57.073       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .12159E-01   1.0000         .10000E-03   10000.    
     3 'Prefactor '    .17015       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .38115E-01   1.0000         .10000E-03   10000.    
     5 'Prefactor '    22.720       1.0000         .10000E-03   10000.    
     6 'norm      '    5.2996       1.0000         .10000E-03   10000.    
     7 'Prefactor '    2.2857       1.0000         .10000E-03   10000.    
     8 'Prefactor '    25.516       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .30005E-01   1.0000         .10000E-03   10000.    
    10 'norm      '    .10112E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .21760E-01   1.0000         .10000E-03   10000.    
    12 'norm      '    .10814E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    98.739       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10978E-02   1.0000         .10000E-03   10000.    
    15 'norm      '    .10013E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    18.410       1.0000         .10000E-03   10000.    
    17 'norm      '    .10105E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    .12445       1.0000         .10000E-03   10000.    
    20 'Prefactor '    .34254E-01   1.0000         .10000E-03   10000.    
    21 'Normalizat'    .35195       1.0000         .10000E-01   10.000    
    22 'Prefactor '    .83188       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5400E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   2545.102     FROM MIGRAD    STATUS=CONVERGED    564 CALLS     2260 TOTAL
                     EDM=   .36E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.8%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     56.182        149.04        .12789E-05   -.28332E-04
   2  Prefactor     .10000E-03    269.80       -.13073E-05** at limit **
   3  Prefactor     .10003E-03    214.53       -.78849E-05** at limit **
   4  Prefactor     .10000E-03    47.060       -.15576E-05** at limit **
   5  Prefactor     20.952        69.283        .43801E-07    .32758E-04
   6  norm          5.2846        7.4401       -.87287E-07    .11463E-03
   7  Prefactor     2.3296        22.522        .36925E-05    .17890E-04
   8  Prefactor     25.571        27.916        .68114E-06    .75860E-04
   9  Prefactor     .10000E-03    147.82        .33561E-06** at limit **
  10  norm          .10000E-03    3.9125       -.19835E-06** at limit **
  11  Prefactor     .10000E-03    32.314        .10375E-06** at limit **
  12  norm          .10001E-03    2.1242        .15475E-05** at limit **
  13  Prefactor     104.45        91.383        .35838E-05    .58519E-04
  14  Prefactor     .10000E-03    115.35        .27961E-06** at limit **
  15  norm          .10000E-03    .79435        .29228E-06** at limit **
  16  Prefactor     18.137        29.137        .10249E-05    .44711E-04
  17  norm          .10000E-03    5.8080        .65827E-06** at limit **
  18  Prefactor     .10000E-03    9.5484        .53215E-06** at limit **
  19  Prefactor     .10000E-03    174.63       -.21071E-06** at limit **
  20  Prefactor     .10000E-03    54.742        .32491E-05** at limit **
  21  Normalizat    .34605        .42315       -.34569E-04   -.10615E-03
  22  Prefactor     .83322        .19015        .74650E-05   -.42870E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 56.1821
  Prefactor  = 0.0001
  Prefactor  = 0.000100034
  Prefactor  = 0.0001
  Prefactor  = 20.9524
  norm       = 5.28464
  Prefactor  = 2.3296
  Prefactor  = 25.5714
  Prefactor  = 0.000100001
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 0.000100009
  Prefactor  = 104.449
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 18.1367
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.000100001
  Prefactor  = 0.000100001
  Normalizat = 0.34605
  Prefactor  = 0.833216
 **********
 **   18 **HESSE 
 **********

 FCN=   2545.102     FROM HESSE     STATUS=OK           334 CALLS     2594 TOTAL
                     EDM=   .13E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     56.182        149.15        .26551E-03   -1.4207    
   2  Prefactor     .10000E-03    269.84        .18167E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .10003E-03    219.07        .39362E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    47.029        .18424E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     20.952        69.730        .84034E-04   -1.4792    
   6  norm          5.2846        7.4392        .15803E-03   -1.5248    
   7  Prefactor     2.3296        20.864        .27154E-03   -1.5403    
   8  Prefactor     25.571        26.735        .79303E-04   -1.4696    
   9  Prefactor     .10000E-03    147.82        .18344E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          .10000E-03    3.9265        .96978E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    32.315        .18263E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm          .10001E-03    14.033        .13310E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     104.45        91.747        .40455E-04   -1.3660    
  14  Prefactor     .10000E-03    115.47        .20700E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          .10000E-03    .81379        .43917E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     18.137        29.167        .93345E-04   -1.4856    
  17  norm          .10000E-03    5.9202        .11879E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10000E-03    9.5821        .15235E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10000E-03    174.62        .19254E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10000E-03    56.523        .36772E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Normalizat    .34605        .42728        .53200E-03   -1.2019    
  22  Prefactor     .83322        .19286        .16037E-03   -.98515    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.30814e-09
Minuit parameter uncertainties:
  1  150.153
  2  0.000149421
  3  0.00550863
  4  0.00025643
  5  70.0035
  6  7.44054
  7  13.9495
  8  26.7472
  9  0.000626781
  10  2.23336e-05
  11  6.6126e-07
  12  0.000720269
  13  91.8719
  14  2.91496e-05
  15  2.45958e-06
  16  29.1897
  17  1.79558e-06
  18  1.81538e-05
  19  0.000641049
  20  0.000364286
  21  0.431389
  22  0.193013
Done.

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

Extracting fit parameters...

4FGL J2149.7+1917
   Spectrum: PowerLaw
277    Prefactor:  1.044e+02  9.187e+01  1.000e-04  1.000e+04 ( 1.000e-13)
278        Index:  2.521e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
279        Scale:  8.988e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
537    Prefactor:  8.332e-01  1.930e-01  0.000e+00  1.000e+01 ( 1.000e+00)
538        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
539        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
536   Normalization:  3.461e-01  4.314e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 1.84
Ra Dec: 327.444 19.286
Photon Index (Fixed Index): 2.52 +/- 0.00
Photon Flux (Fixed Index): 1.74e-07 +/- 1.53e-07
Energy Flux (Fixed Index): 4.95e-05 +/- 4.35e-05

TS (Fixed Index): 1.84
Ra Dec: 327.444 19.286
Photon Flux Upper Limit: 4.76e-07 ph cm-2 s-1
Energy Flux Upper Limit: 3.71e-02 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/991322/likelihoodResults_556329601_556588801_4FGL_J2149.7+1917_daily_bin1223.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) = 2543.72477397
delta logL = 1.37693090997

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 2543.70454387
delta logL = 1.39716100758

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    8.6100       1.0000         .10000E-03   10000.    
     2 'Index     '    4.4936       1.0000          .0000       10.000    
     3 'Normalizat'    .96412E-01   1.0000         .10000E-01   10.000    
     4 'Prefactor '    .91969       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5400E+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=   2543.705     FROM MIGRAD    STATUS=CONVERGED     94 CALLS      337 TOTAL
                     EDM=   .44E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     8.5850        112.29        .74712E-04   -.68056E-03
   2  Index         4.4964        3.5061        .26400E-02   -.14676E-03
   3  Normalizat    .93624E-01    .55254        .92651E-02    .13403E-03
   4  Prefactor     .92052        .20675        .15294E-03    .22115E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 8.58504
  Index      = 4.49642
  Normalizat = 0.0936243
  Prefactor  = 0.920523
 **********
 **   18 **HESSE 
 **********

 FCN=   2543.705     FROM HESSE     STATUS=OK            27 CALLS      364 TOTAL
                     EDM=   .38E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     8.5850        33.666        .29885E-05   -1.5122    
   2  Index         4.4964        2.0452        .10560E-03   -.10089    
   3  Normalizat    .93624E-01    .53152        .37060E-03   -1.3876    
   4  Prefactor     .92052        .19582        .61174E-05   -.95428    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.78485e-09
Minuit parameter uncertainties:
  1  33.7408
  2  2.10773
  3  0.427358
  4  0.195971
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/991322': 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) = 2543.70451559
delta logL = 1.39718928868

Extracting fit parameters...

4FGL J2149.7+1917
   Spectrum: PowerLaw
277    Prefactor:  8.585e+00  3.374e+01  1.000e-04  1.000e+04 ( 1.000e-13)
278        Index:  4.496e+00  2.108e+00  0.000e+00  1.000e+01 (-1.000e+00)
279        Scale:  8.988e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
537    Prefactor:  9.205e-01  1.960e-01  0.000e+00  1.000e+01 ( 1.000e+00)
538        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
539        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
536   Normalization:  9.362e-02  4.274e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 5.31
Ra Dec: 327.444 19.286
Photon Index (Free Index): 4.50 +/- 2.11
Photon Flux (Free Index): 4.79e-07 +/- 2.74e-07
Energy Flux (Free Index): 6.69e-05 +/- 3.79e-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/991322/cmap_HighResolution_556329601_556588801_4FGL_J2149.7+1917_daily_bin1223.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='3.71e-02', comment='SUCCESS', photon_flux='1.74e-07', energy_flux2='6.69e-05', photon_flux_error='1.53e-07', dlogl='1.40e+00', energy_flux='4.95e-05', photon_flux2='4.79e-07', job_status='DONE', time_completed='2021-09-27 18:51:38.932769', photon_index_error2='2.11', photon_index2='4.50', ts='1.84', fit_tolerance='1e-08', GAL='0.83', photon_index_error='0.00', photon_flux_upper_limit='4.76e-07', energy_flux_error2='3.79e-05', EG='0.35', time_epoch_completed='1632793898.93', return_code='0', job_id='991322', GAL2='0.92', EG2='0.09', return_code2='0', energy_flux_error='4.35e-05', photon_flux_error2='2.74e-07', ts2='5.31', photon_index='2.52' WHERE bin_id='1223' AND source_name='4FGL J2149.7+1917' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep 27 18:51:38 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0223>
Subject: Job 991322: <4FGL_J2149.7+1917_daily_bin1223> in cluster <slac> Done

Job <4FGL_J2149.7+1917_daily_bin1223> was submitted from host <rhel6-64f> by user <kocevski> in cluster <slac> at Mon Sep 27 18:35:22 2021
Job was executed on host(s) <bullet0223>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep 27 18:40:21 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Mon Sep 27 18:40:21 2021
Terminated at Mon Sep 27 18:51:39 2021
Results reported at Mon Sep 27 18:51:39 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2149.7+1917_daily_bin1223 327.444 19.2859 556329601 556588801 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J2149.7+1917 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   455.00 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             252.71 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   678 sec.
    Turnaround time :                            977 sec.

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

