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


Performing analysis on: 4FGL_J1642.9+3948_daily_bin1022
RA = 250.734, Dec = 39.8164
tmin = 504230401, tmax = 504489601
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='861801', job_status='RUN', time_executed='2021-09-15 08:02:53.152982', time_epoch_executed='1631718173.15' WHERE source_name='4FGL J1642.9+3948' and cadence='daily' and bin_id='1022'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/861801

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/861801/ft1_4FGL_J1642.9+3948_daily_bin1022.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/861801/ft2_4FGL_J1642.9+3948_daily_bin1022.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/861801/ft1_4FGL_J1642.9+3948_daily_bin1022.fits outfile=/scratch/kocevski/861801/ft1_filteredMKT_4FGL_J1642.9+3948_daily_bin1022.fits ra=250.734 dec=39.8164 rad=12.0 tmin=504230401.0 tmax=504489601.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.59
user 3.36
sys 0.21

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/861801/ft2_4FGL_J1642.9+3948_daily_bin1022.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/861801/ft2_4FGL_J1642.9+3948_daily_bin1022.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/861801/ft1_filteredMKT_4FGL_J1642.9+3948_daily_bin1022.fits evtable="EVENTS" outfile="/scratch/kocevski/861801/ft1_filtered_4FGL_J1642.9+3948_daily_bin1022.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/861801/ft1_filtered_4FGL_J1642.9+3948_daily_bin1022.fits" evtable="EVENTS" scfile=/scratch/kocevski/861801/ft2_4FGL_J1642.9+3948_daily_bin1022.fits sctable="SC_DATA" outfile=/scratch/kocevski/861801/ltcube_504230401_504489601_4FGL_J1642.9+3948_daily_bin1022.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/861801/ft2_4FGL_J1642.9+3948_daily_bin1022.fits
.....................!
real 14.38
user 13.98
sys 0.35

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/861801/ft1_filtered_4FGL_J1642.9+3948_daily_bin1022.fits evtable="EVENTS" scfile=/scratch/kocevski/861801/ft2_4FGL_J1642.9+3948_daily_bin1022.fits sctable="SC_DATA" expcube=/scratch/kocevski/861801/ltcube_504230401_504489601_4FGL_J1642.9+3948_daily_bin1022.fits outfile=/scratch/kocevski/861801/expmap_504230401_504489601_4FGL_J1642.9+3948_daily_bin1022.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/861801/ltcube_504230401_504489601_4FGL_J1642.9+3948_daily_bin1022.fits
.....................!
real 192.09
user 185.90
sys 5.80

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

Setting source of interest to:
4FGL J1642.9+3948 @ 250.734 39.8164

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/861801/ft1_filtered_4FGL_J1642.9+3948_daily_bin1022.fits scfile=/scratch/kocevski/861801/ft2_4FGL_J1642.9+3948_daily_bin1022.fits outfile=/scratch/kocevski/861801/cmap_504230401_504489601_4FGL_J1642.9+3948_daily_bin1022.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=250.734 yref=39.8164 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.17

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/861801/ft1_filtered_4FGL_J1642.9+3948_daily_bin1022.fits scfile=/scratch/kocevski/861801/ft2_4FGL_J1642.9+3948_daily_bin1022.fits outfile=/scratch/kocevski/861801/cmap_HighResolution_504230401_504489601_4FGL_J1642.9+3948_daily_bin1022.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=250.734 yref=39.8164 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.57
user 0.40
sys 0.15

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/861801/ft1_filtered_4FGL_J1642.9+3948_daily_bin1022.fits evtable="EVENTS" scfile=/scratch/kocevski/861801/ft2_4FGL_J1642.9+3948_daily_bin1022.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/861801/Model_4FGL_J1642.9+3948_daily_bin1022.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/861801/ft1_filtered_4FGL_J1642.9+3948_daily_bin1022.fits.....................!
real 57.84
user 56.44
sys 1.23

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/861801/ft1_filtered_4FGL_J1642.9+3948_daily_bin1022.fits', '/scratch/kocevski/861801/ft2_4FGL_J1642.9+3948_daily_bin1022.fits', expMap='/scratch/kocevski/861801/expmap_504230401_504489601_4FGL_J1642.9+3948_daily_bin1022.fits', expCube='/scratch/kocevski/861801/ltcube_504230401_504489601_4FGL_J1642.9+3948_daily_bin1022.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/861801/Model_4FGL_J1642.9+3948_daily_bin1022.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1642.9+3948'

4FGL J1642.9+3948
   Spectrum: PowerLaw
304    Prefactor:  1.494e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-12)
305        Index:  2.402e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
306        Scale:  1.373e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/861801/ft1_filtered_4FGL_J1642.9+3948_daily_bin1022.fits
Spacecraft file(s): /scratch/kocevski/861801/ft2_4FGL_J1642.9+3948_daily_bin1022.fits
Exposure map: /scratch/kocevski/861801/expmap_504230401_504489601_4FGL_J1642.9+3948_daily_bin1022.fits
Exposure cube: /scratch/kocevski/861801/ltcube_504230401_504489601_4FGL_J1642.9+3948_daily_bin1022.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/861801/Model_4FGL_J1642.9+3948_daily_bin1022.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) = 7011.11281338

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    40.010       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10012E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10042E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    2.4323       1.0000         .10000E-03   10000.    
     6 'Prefactor '    5.7588       1.0000         .10000E-03   10000.    
     7 'norm      '    .24728       1.0000         .10000E-03   10000.    
     8 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    2.5067       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .15325       1.0000         .10000E-03   10000.    
    11 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    2.8043       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10034E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    1.7980       1.0000         .10000E-03   10000.    
    16 'norm      '    3.1564       1.0000         .10000E-03   10000.    
    17 'norm      '    1.5956       1.0000         .10000E-03   10000.    
    18 'Prefactor '    6.1990       1.0000         .10000E-03   10000.    
    19 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    20 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    21 'norm      '    2.4532       1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10125E-03   1.0000         .10000E-03   10000.    
    23 'norm      '    .10065E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    6.2431       1.0000         .10000E-03   10000.    
    25 'Normalizat'    .94627       1.0000         .10000E-01   10.000    
    26 'Prefactor '    1.0405       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6530E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   7010.990     FROM MIGRAD    STATUS=CONVERGED    627 CALLS     3181 TOTAL
                     EDM=   .11E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .1%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    10.366       -.72925E-06** at limit **
   2  Prefactor     39.904        65.503       -.13085E-03   -.30769E-04
   3  Prefactor     .10000E-03    2.9168       -.46309E-06** at limit **
   4  Prefactor     .10000E-03    3.2034       -.21480E-07** at limit **
   5  Prefactor     2.4308        17.171        .10334E-04   -.68940E-04
   6  Prefactor     5.7587        3.9784       -.42869E-06   -.35988E-03
   7  norm          .24723        .17609        .38907E-07   -.91004E-04
   8  norm          .10000E-03    5.4097        .12565E-07** at limit **
   9  Prefactor     2.5209        70.207       -.10517E-04   -.80173E-04
  10  Prefactor     .20047        1.9993        .12964E-05   -.12735E-02
  11  norm          .10000E-03    16.641        .62911E-05** at limit **
  12  Prefactor     .10000E-03    .57760       -.33604E-08** at limit **
  13  Prefactor     2.8042        1.5130       -.73156E-07   -.18207E-03
  14  Prefactor     .10000E-03    2.4039        .78459E-08** at limit **
  15  Prefactor     1.7977        2.7265       -.75029E-06   -.98905E-03
  16  norm          3.1566        1.6164       -.36989E-07    .11399E-03
  17  norm          1.5947        .96619       -.15992E-06   -.10738E-02
  18  Prefactor     6.1993        6.3814       -.10611E-05   -.32041E-03
  19  norm          .10000E-03    .14999       -.19517E-07** at limit **
  20  norm          .10000E-03    3.1044        .54187E-06** at limit **
  21  norm          2.4534        1.5373       -.20632E-06   -.27235E-03
  22  Prefactor     .10000E-03    125.04        .11093E-04** at limit **
  23  norm          .10000E-03    2.3842       -.70781E-07** at limit **
  24  Prefactor     6.2408        134.57       -.48664E-05   -.97435E-05
  25  Normalizat    .94617        .20318        .69559E-05   -.37197E-03
  26  Prefactor     1.0404        .15168       -.66851E-06    .27138E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 39.9043
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 2.43083
  Prefactor  = 5.75867
  norm       = 0.247235
  norm       = 0.0001
  Prefactor  = 2.52088
  Prefactor  = 0.200465
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 2.8042
  Prefactor  = 0.0001
  Prefactor  = 1.79772
  norm       = 3.1566
  norm       = 1.59466
  Prefactor  = 6.19935
  norm       = 0.0001
  norm       = 0.0001
  norm       = 2.45341
  Prefactor  = 0.000100001
  norm       = 0.0001
  Prefactor  = 6.24076
  Normalizat = 0.946168
  Prefactor  = 1.04042
 **********
 **   18 **HESSE 
 **********

 FCN=   7010.990     FROM HESSE     STATUS=OK           462 CALLS     3643 TOTAL
                     EDM=   .12E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    10.377        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     39.904        65.577        .31685E-03   -1.4444    
   3  Prefactor     .10000E-03    3.0257        .27896E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    3.2114        .14566E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     2.4308        16.984        .26238E-03   -1.5396    
   6  Prefactor     5.7587        3.9718        .12911E-03   -1.5228    
   7  norm          .24723        .16663        .23002E-04   -1.5609    
   8  norm          .10000E-03    5.4129        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     2.5209        65.114        .25809E-03   -1.5390    
  10  Prefactor     .20047        19.253        .22082E-02   -1.5618    
  11  norm          .10000E-03    16.647        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    .74475        .10920E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     2.8042        1.3813        .61534E-04   -1.5373    
  14  Prefactor     .10000E-03    2.5028        .25264E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     1.7977        2.6934        .15943E-03   -1.5440    
  16  norm          3.1566        1.6161        .72874E-04   -1.5353    
  17  norm          1.5947        .95010        .59803E-04   -1.5455    
  18  Prefactor     6.1993        6.3562        .16124E-03   -1.5210    
  19  norm          .10000E-03    .15260        .31635E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  norm          .10000E-03    3.1195        .14404E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  norm          2.4534        1.5330        .78372E-04   -1.5395    
  22  Prefactor     .10000E-03    127.40        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  norm          .10000E-03    2.3981        .12596E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     6.2408        133.97        .16066E-03   -1.5208    
  25  Normalizat    .94617        .23757        .28174E-03   -.94856    
  26  Prefactor     1.0404        .17790        .22097E-03   -.91394    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.15411e-08
Minuit parameter uncertainties:
  1  1.45625e-05
  2  65.6963
  3  3.14184e-05
  4  5.22324e-05
  5  12.8557
  6  3.97194
  7  0.166627
  8  1.98478e-06
  9  25.6544
  10  3.92944
  11  1.27237e-06
  12  1.89524e-06
  13  1.38133
  14  6.10356e-06
  15  2.69355
  16  1.61616
  17  0.950113
  18  6.35691
  19  5.61735e-07
  20  1.21109e-05
  21  1.53306
  22  0.000864514
  23  9.08905e-06
  24  57.9771
  25  0.237834
  26  0.177997
Done.

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

Extracting fit parameters...

4FGL J1642.9+3948
   Spectrum: PowerLaw
304    Prefactor:  2.804e+00  1.381e+00  1.000e-04  1.000e+04 ( 1.000e-12)
305        Index:  2.402e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
306        Scale:  1.373e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
650    Prefactor:  1.040e+00  1.780e-01  0.000e+00  1.000e+01 ( 1.000e+00)
651        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
652        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
649   Normalization:  9.462e-01  2.378e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 7.73
Ra Dec: 250.734 39.816
Photon Index (Fixed Index): 2.40 +/- 0.00
Photon Flux (Fixed Index): 1.08e-07 +/- 5.32e-08
Energy Flux (Fixed Index): 3.53e-05 +/- 1.74e-05

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) = 7010.91923325
delta logL = 0.0711378811848

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 7010.90844585
delta logL = 0.081925285077

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   7010.908     FROM MIGRAD    STATUS=CONVERGED     43 CALLS      225 TOTAL
                     EDM=   .14E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     2.1662        13.070        .69957E-02    .23292E-02
   2  Index         2.5983        2.2878        .10393        .93804E-04
   3  Normalizat    .92728        .72820E-01    .45249E-01   -.11982E-04
   4  Prefactor     1.0516        .51802E-01    .39817E-01    .38434E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 2.1662
  Index      = 2.59829
  Normalizat = 0.927275
  Prefactor  = 1.05162
 **********
 **   18 **HESSE 
 **********

 FCN=   7010.908     FROM HESSE     STATUS=OK            33 CALLS      258 TOTAL
                     EDM=   .12E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     2.1662        2.2022        .52475E-04   -1.5414    
   2  Index         2.5983        .59063        .39666E-02   -.50105    
   3  Normalizat    .92728        .22189        .28414E-03   -.95508    
   4  Prefactor     1.0516        .17838        .21995E-03   -.91028    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.17054e-09
Minuit parameter uncertainties:
  1  2.20228
  2  0.592429
  3  0.22211
  4  0.178479
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/861801': 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) = 7010.90844585
delta logL = 0.0819252863512

Extracting fit parameters...

4FGL J1642.9+3948
   Spectrum: PowerLaw
304    Prefactor:  2.166e+00  2.202e+00  1.000e-04  1.000e+04 ( 1.000e-12)
305        Index:  2.598e+00  5.924e-01  0.000e+00  1.000e+01 (-1.000e+00)
306        Scale:  1.373e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
650    Prefactor:  1.052e+00  1.785e-01  0.000e+00  1.000e+01 ( 1.000e+00)
651        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
652        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
649   Normalization:  9.273e-01  2.221e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 8.08
Ra Dec: 250.734 39.816
Photon Index (Free Index): 2.60 +/- 0.59
Photon Flux (Free Index): 1.23e-07 +/- 6.42e-08
Energy Flux (Free Index): 3.22e-05 +/- 1.71e-05

Creating a high resolution counts map...
INFO: Auto-setting vmin to -1.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  1.110e+00 [aplpy.core]
Saving /scratch/kocevski/861801/cmap_HighResolution_504230401_504489601_4FGL_J1642.9+3948_daily_bin1022.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='1.08e-07', energy_flux2='3.22e-05', photon_flux_error='5.32e-08', dlogl='8.19e-02', energy_flux='3.53e-05', photon_flux2='1.23e-07', job_status='DONE', time_completed='2021-09-15 08:15:42.627446', photon_index_error2='0.59', photon_index2='2.60', ts='7.73', fit_tolerance='1e-08', GAL='1.04', photon_index_error='0.00', energy_flux_error2='1.71e-05', EG='0.95', time_epoch_completed='1631718942.63', return_code='0', job_id='861801', GAL2='1.05', EG2='0.93', return_code2='0', energy_flux_error='1.74e-05', photon_flux_error2='6.42e-08', ts2='8.08', photon_index='2.40' WHERE bin_id='1022' AND source_name='4FGL J1642.9+3948' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Wed Sep 15 08:15:42 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0049>
Subject: Job 861801: <4FGL_J1642.9+3948_daily_bin1022> in cluster <slac> Done

Job <4FGL_J1642.9+3948_daily_bin1022> was submitted from host <rhel6-64d> by user <kocevski> in cluster <slac> at Wed Sep 15 08:00:27 2021
Job was executed on host(s) <bullet0049>, in queue <medium>, as user <kocevski> in cluster <slac> at Wed Sep 15 08:00:58 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Wed Sep 15 08:00:58 2021
Terminated at Wed Sep 15 08:15:43 2021
Results reported at Wed Sep 15 08:15:43 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1642.9+3948_daily_bin1022 250.734 39.8164 504230401 504489601 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1642.9+3948 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   768.12 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             293.50 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   884 sec.
    Turnaround time :                            916 sec.

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

