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


Performing analysis on: 4FGL_J1640.3+6850_daily_bin1229
RA = 250.082, Dec = 68.8483
tmin = 557884801, tmax = 558144001
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='824593', job_status='RUN', time_executed='2021-09-15 06:01:30.953768', time_epoch_executed='1631710890.95' WHERE source_name='4FGL J1640.3+6850' and cadence='daily' and bin_id='1229'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/824593

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/824593/ft1_4FGL_J1640.3+6850_daily_bin1229.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/824593/ft2_4FGL_J1640.3+6850_daily_bin1229.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/824593/ft1_4FGL_J1640.3+6850_daily_bin1229.fits outfile=/scratch/kocevski/824593/ft1_filteredMKT_4FGL_J1640.3+6850_daily_bin1229.fits ra=250.082 dec=68.8483 rad=12.0 tmin=557884801.0 tmax=558144001.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 4.07
user 3.84
sys 0.20

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/824593/ft2_4FGL_J1640.3+6850_daily_bin1229.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/824593/ft2_4FGL_J1640.3+6850_daily_bin1229.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/824593/ft1_filteredMKT_4FGL_J1640.3+6850_daily_bin1229.fits evtable="EVENTS" outfile="/scratch/kocevski/824593/ft1_filtered_4FGL_J1640.3+6850_daily_bin1229.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.34
sys 0.15

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/824593/ft1_filtered_4FGL_J1640.3+6850_daily_bin1229.fits" evtable="EVENTS" scfile=/scratch/kocevski/824593/ft2_4FGL_J1640.3+6850_daily_bin1229.fits sctable="SC_DATA" outfile=/scratch/kocevski/824593/ltcube_557884801_558144001_4FGL_J1640.3+6850_daily_bin1229.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/824593/ft2_4FGL_J1640.3+6850_daily_bin1229.fits
.....................!
real 14.31
user 13.96
sys 0.30

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/824593/ft1_filtered_4FGL_J1640.3+6850_daily_bin1229.fits evtable="EVENTS" scfile=/scratch/kocevski/824593/ft2_4FGL_J1640.3+6850_daily_bin1229.fits sctable="SC_DATA" expcube=/scratch/kocevski/824593/ltcube_557884801_558144001_4FGL_J1640.3+6850_daily_bin1229.fits outfile=/scratch/kocevski/824593/expmap_557884801_558144001_4FGL_J1640.3+6850_daily_bin1229.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/824593/ltcube_557884801_558144001_4FGL_J1640.3+6850_daily_bin1229.fits
.....................!
real 193.91
user 188.53
sys 4.85

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

Setting source of interest to:
4FGL J1640.3+6850 @ 250.082 68.8483

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/824593/ft1_filtered_4FGL_J1640.3+6850_daily_bin1229.fits scfile=/scratch/kocevski/824593/ft2_4FGL_J1640.3+6850_daily_bin1229.fits outfile=/scratch/kocevski/824593/cmap_557884801_558144001_4FGL_J1640.3+6850_daily_bin1229.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.082 yref=68.8483 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.58
user 0.40
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/824593/ft1_filtered_4FGL_J1640.3+6850_daily_bin1229.fits scfile=/scratch/kocevski/824593/ft2_4FGL_J1640.3+6850_daily_bin1229.fits outfile=/scratch/kocevski/824593/cmap_HighResolution_557884801_558144001_4FGL_J1640.3+6850_daily_bin1229.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.082 yref=68.8483 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/824593/ft1_filtered_4FGL_J1640.3+6850_daily_bin1229.fits evtable="EVENTS" scfile=/scratch/kocevski/824593/ft2_4FGL_J1640.3+6850_daily_bin1229.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/824593/Model_4FGL_J1640.3+6850_daily_bin1229.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/824593/ft1_filtered_4FGL_J1640.3+6850_daily_bin1229.fits...!
real 13.73
user 12.47
sys 1.17

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/824593/ft1_filtered_4FGL_J1640.3+6850_daily_bin1229.fits', '/scratch/kocevski/824593/ft2_4FGL_J1640.3+6850_daily_bin1229.fits', expMap='/scratch/kocevski/824593/expmap_557884801_558144001_4FGL_J1640.3+6850_daily_bin1229.fits', expCube='/scratch/kocevski/824593/ltcube_557884801_558144001_4FGL_J1640.3+6850_daily_bin1229.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/824593/Model_4FGL_J1640.3+6850_daily_bin1229.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1640.3+6850'

4FGL J1640.3+6850
   Spectrum: PowerLaw
350    Prefactor:  3.992e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-14)
351        Index:  2.132e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
352        Scale:  2.329e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/824593/ft1_filtered_4FGL_J1640.3+6850_daily_bin1229.fits
Spacecraft file(s): /scratch/kocevski/824593/ft2_4FGL_J1640.3+6850_daily_bin1229.fits
Exposure map: /scratch/kocevski/824593/expmap_557884801_558144001_4FGL_J1640.3+6850_daily_bin1229.fits
Exposure cube: /scratch/kocevski/824593/ltcube_557884801_558144001_4FGL_J1640.3+6850_daily_bin1229.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/824593/Model_4FGL_J1640.3+6850_daily_bin1229.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) = 43.7336260456

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .20201E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10657E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    .32701E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10246E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .11453E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .11082E-02   1.0000         .10000E-03   10000.    
     7 'norm      '    .10161E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .11767E-02   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .28492       1.0000         .10000E-03   10000.    
    10 'norm      '    .34765E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .38707E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    565.58       1.0000         .10000E-03   10000.    
    13 'Prefactor '    .16148E-03   1.0000         .10000E-03   10000.    
    14 'norm      '    .16046E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    .25082E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    .10231E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    .11026E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10031E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    .13256E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    .14327E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .18296E-03   1.0000         .10000E-03   10000.    
    24 'norm      '    .10081E-03   1.0000         .10000E-03   10000.    
    25 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    26 'Prefactor '    .18427E-03   1.0000         .10000E-03   10000.    
    27 'norm      '    84.476       1.0000         .10000E-03   10000.    
    28 'Prefactor '    744.47       1.0000         .10000E-03   10000.    
    29 'Prefactor '    .78965E-03   1.0000         .10000E-03   10000.    
    30 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    31 'Prefactor '    .11198E-03   1.0000         .10000E-03   10000.    
    32 'Prefactor '    .11109E-03   1.0000         .10000E-03   10000.    
    33 'Normalizat'    .10000E-01   1.0000         .10000E-01   10.000    
    34 'Prefactor '    .29096E-08   1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6760E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   42.81686     FROM MIGRAD    STATUS=CONVERGED    839 CALLS     5374 TOTAL
                     EDM=   .21E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.6%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10002E-03    6254.5       -.28788E-05** at limit **
   2  Prefactor     .10002E-03    6224.1       -.28670E-05** at limit **
   3  Prefactor     .10000E-03    727.63       -.24988E-07** at limit **
   4  Prefactor     .10000E-03    844.85       -.10814E-05** at limit **
   5  Prefactor     .10000E-03    511.86       -.10629E-06** at limit **
   6  Prefactor     .10000E-03    1667.2       -.63073E-06** at limit **
   7  norm          .10000E-03    138.04       -.36866E-06** at limit **
   8  Prefactor     .10000E-03    6291.8       -.93013E-06** at limit **
   9  Prefactor     .10017E-03    6059.1       -.80555E-03** at limit **
  10  norm          .10000E-03    282.56        .37530E-07** at limit **
  11  Prefactor     .10000E-03    2185.0       -.39517E-06** at limit **
  12  Prefactor     564.61        695.69       -.40458E-04   -.10583E-05
  13  Prefactor     .10000E-03    623.85       -.47066E-06** at limit **
  14  norm          .10000E-03    176.17        .15136E-07** at limit **
  15  Prefactor     .10000E-03    412.78       -.59712E-07** at limit **
  16  norm          .10000E-03    9.4210       -.10773E-08** at limit **
  17  Prefactor     .10000E-03    107.58       -.40805E-07** at limit **
  18  Prefactor     .10000E-03    27.369        .46450E-09** at limit **
  19  Prefactor     .10000E-03    174.53        .35590E-07** at limit **
  20  Prefactor     .10000E-03    115.40       -.14020E-06** at limit **
  21  Prefactor     .10000E-03    219.37        .30658E-06** at limit **
  22  Prefactor     .10000E-03    243.12        .37706E-06** at limit **
  23  Prefactor     .10001E-03    1061.6       -.15417E-05** at limit **
  24  norm          .10000E-03    34.110       -.39153E-06** at limit **
  25  norm          .10000E-03    6.2567        .51073E-09** at limit **
  26  Prefactor     .10000E-03    196.88        .18604E-06** at limit **
  27  norm          84.404        84.591       -.12362E-06   -.85874E-05
  28  Prefactor     744.36        734.83        .94031E-08   -.43223E-06
  29  Prefactor     .10000E-03    2037.3       -.60173E-06** at limit **
  30  Prefactor     .10000E-03    53.426        .22421E-07** at limit **
  31  Prefactor     .10000E-03    188.05        .12993E-06** at limit **
  32  Prefactor     .10001E-03    1045.9       -.15078E-05** at limit **
  33  Normalizat    .10000E-01    .41546       -.13024E-04** at limit **
  34  Prefactor     .57565E-12    .35991       -.20779E-04** at limit **
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100021
  Prefactor  = 0.00010002
  Prefactor  = 0.0001
  Prefactor  = 0.000100003
  Prefactor  = 0.0001
  Prefactor  = 0.000100001
  norm       = 0.0001
  Prefactor  = 0.000100002
  Prefactor  = 0.000100174
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 564.607
  Prefactor  = 0.000100001
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.000100006
  norm       = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 84.4035
  Prefactor  = 744.359
  Prefactor  = 0.000100001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.000100006
  Normalizat = 0.01
  Prefactor  = 5.75651e-13
 **********
 **   18 **HESSE 
 **********

 FCN=   42.81686     FROM HESSE     STATUS=OK           704 CALLS     6078 TOTAL
                     EDM=   .42E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10002E-03    6259.2        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10002E-03    6228.6        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .10000E-03    727.62        .17555E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    846.33        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    511.87        .14668E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    1667.7        .20693E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  norm          .10000E-03    138.09        .75701E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    6292.3        .20652E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .10017E-03    6220.6        .20717E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          .10000E-03    282.56        .10856E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    2185.1        .21279E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     564.61        677.13        .86581E-04   -1.0910    
  13  Prefactor     .10000E-03    624.13        .16229E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          .10000E-03    176.18        .85563E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .10000E-03    412.79        .13150E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          .10000E-03    9.4209        .19731E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     .10000E-03    107.58        .66784E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10000E-03    27.369        .33640E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10000E-03    174.53        .85161E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10000E-03    115.42        .69185E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .10000E-03    219.50        .95575E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     .10000E-03    243.33        .10067E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10001E-03    1064.5        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  norm          .10000E-03    34.113        .37559E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  norm          .10000E-03    6.2567        .16079E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  Prefactor     .10000E-03    196.92        .90493E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  27  norm          84.404        84.597        .21853E-03   -1.3868    
  28  Prefactor     744.36        734.81        .76191E-04   -1.0181    
  29  Prefactor     .10000E-03    2037.7        .20910E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  30  Prefactor     .10000E-03    53.427        .47021E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  31  Prefactor     .10000E-03    188.07        .88422E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  32  Prefactor     .10001E-03    1048.7        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  33  Normalizat    .10000E-01    .41526        .13193E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  34  Prefactor     .57565E-12    .35941        .12249E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.20222e-11
Minuit parameter uncertainties:
  1  0.015183
  2  0.0148298
  3  6.76662e-05
  4  0.00320166
  5  0.00023641
  6  0.00261465
  7  0.000221269
  8  0.00470066
  9  0.219234
  10  6.39032e-05
  11  0.00192805
  12  687.238
  13  0.00118733
  14  6.33727e-05
  15  0.000110627
  16  5.58194e-08
  17  4.07082e-05
  18  2.6721e-07
  19  4.84324e-05
  20  0.000146587
  21  0.000457403
  22  0.000614684
  23  0.00512049
  24  3.01251e-05
  25  1.36595e-07
  26  0.000263795
  27  84.7182
  28  744.766
  29  0.00280329
  30  1.77909e-05
  31  0.000179686
  32  0.0049851
  33  6.13926e-07
  34  9.15228e-07
Done.

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

Extracting fit parameters...

4FGL J1640.3+6850
   Spectrum: PowerLaw
350    Prefactor:  1.000e-04  1.187e-03  1.000e-04  1.000e+04 ( 1.000e-14)
351        Index:  2.132e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
352        Scale:  2.329e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
673    Prefactor:  5.757e-13  9.152e-07  0.000e+00  1.000e+01 ( 1.000e+00)
674        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
675        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
672   Normalization:  1.000e-02  6.139e-07  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 250.082 68.848
Photon Flux Upper Limit: 2.77e-06 ph cm-2 s-1
Energy Flux Upper Limit: 2.10e-01 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/824593/likelihoodResults_557884801_558144001_4FGL_J1640.3+6850_daily_bin1229.txt

Performing a free index iterative likelihood fit...

Freezing all point sources, except source of interest...

Done.

Freeing candidate source...
Done.

Fit tolerance = 1

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 42.8168640818
delta logL = -7.59900202496e-06

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 42.8168640743
delta logL = -7.59142569962e-06

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .96183E-02   1.0000         .10000E-03   10000.    
     2 'Index     '    2.1324       1.0000          .0000       10.000    
     3 'Normalizat'    .10000E-01   1.0000         .10000E-01   10.000    
     4 'Prefactor '    .36535E-07   1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6760E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   42.81686     FROM MIGRAD    STATUS=CONVERGED     56 CALLS      191 TOTAL
                     EDM=   .33E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    610.75        .90730E-02** at limit **
   2  Index         2.0850        6.0324        .50000        .55155E-06
   3  Normalizat    .10000E-01    .75279E-03    .59720E-01** at limit **
   4  Prefactor     .66613E-14    .64972E-03    .55469E-01** at limit **
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100002
  Index      = 2.08505
  Normalizat = 0.01
  Prefactor  = 6.66134e-15
 **********
 **   18 **HESSE 
 **********

 FCN=   42.81686     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      220 TOTAL
                     EDM=   .18E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    6480.0        .16979E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.0850        6.0182        .50000       -.62241    
   3  Normalizat    .10000E-01    .40259E-02    .13196E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .66613E-14    .34778E-02    .12253E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 1.75106e-08
Minuit parameter uncertainties:
  1  0.0048949
  2  948.837
  3  5.14067e-10
  4  9.49269e-09
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/824593': No such file or directory
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 42.8168564761
delta logL = 6.77467681953e-09

Extracting fit parameters...

4FGL J1640.3+6850
   Spectrum: PowerLaw
350    Prefactor:  1.000e-04  4.895e-03  1.000e-04  1.000e+04 ( 1.000e-14)
351        Index:  2.085e+00  9.488e+02  0.000e+00  1.000e+01 (-1.000e+00)
352        Scale:  2.329e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
673    Prefactor:  6.661e-15  9.493e-09  0.000e+00  1.000e+01 ( 1.000e+00)
674        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
675        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
672   Normalization:  1.000e-02  5.141e-10  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 250.082 68.848

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/824593/cmap_HighResolution_557884801_558144001_4FGL_J1640.3+6850_daily_bin1229.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='2.10e-01', job_status='DONE', photon_flux_upper_limit='2.77e-06', time_completed='2021-09-15 06:07:56.484505', job_id='824593', GAL2='0.00', fit_tolerance='1e-08', EG2='0.01', EG='0.01', time_epoch_completed='1631711276.48', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.00', dlogl='6.77e-09', ts2='-0.00', photon_index_error='0.00', photon_index='2.13' WHERE bin_id='1229' AND source_name='4FGL J1640.3+6850' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Wed Sep 15 06:07:56 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0058>
Subject: Job 824593: <4FGL_J1640.3+6850_daily_bin1229> in cluster <slac> Done

Job <4FGL_J1640.3+6850_daily_bin1229> was submitted from host <rhel6-64f> by user <kocevski> in cluster <slac> at Wed Sep 15 05:55:42 2021
Job was executed on host(s) <bullet0058>, in queue <medium>, as user <kocevski> in cluster <slac> at Wed Sep 15 05:59:00 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Wed Sep 15 05:59:00 2021
Terminated at Wed Sep 15 06:07:57 2021
Results reported at Wed Sep 15 06:07:57 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1640.3+6850_daily_bin1229 250.082 68.8483 557884801 558144001 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1640.3+6850 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   351.00 sec.
    Max Memory :                                 1028 MB
    Average Memory :                             239.15 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   536 sec.
    Turnaround time :                            735 sec.

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

