/nfs/farm/g/glast/g/LCRepository/bin/miniconda2/envs/fermitools_v1.0.5/lib/python2.7/site-packages/matplotlib/font_manager.py:281: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment.
  'Matplotlib is building the font cache using fc-list. '
/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 18 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 = 610
number of fields = 30
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J1640.4+3945_daily_bin1171
RA = 250.119, Dec = 39.7626
tmin = 542851201, tmax = 543110401
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='838444', job_status='RUN', time_executed='2021-09-15 06:47:53.005328', time_epoch_executed='1631713673.01' WHERE source_name='4FGL J1640.4+3945' and cadence='daily' and bin_id='1171'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/838444

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

Retrieving the FT1 file...

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

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

Retrieving 4 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/838444/ft1_4FGL_J1640.4+3945_daily_bin1171.fits


Retrieving the FT1 file...

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

Retrieving 4 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/838444/ft2_4FGL_J1640.4+3945_daily_bin1171.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/838444/ft1_4FGL_J1640.4+3945_daily_bin1171.fits outfile=/scratch/kocevski/838444/ft1_filteredMKT_4FGL_J1640.4+3945_daily_bin1171.fits ra=250.119 dec=39.7626 rad=12.0 tmin=542851201.0 tmax=543110401.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 1.28
user 1.06
sys 0.20

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/838444/ft2_4FGL_J1640.4+3945_daily_bin1171.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/838444/ft2_4FGL_J1640.4+3945_daily_bin1171.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/838444/ft1_filteredMKT_4FGL_J1640.4+3945_daily_bin1171.fits evtable="EVENTS" outfile="/scratch/kocevski/838444/ft1_filtered_4FGL_J1640.4+3945_daily_bin1171.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.74
user 0.52
sys 0.19

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/838444/ft1_filtered_4FGL_J1640.4+3945_daily_bin1171.fits" evtable="EVENTS" scfile=/scratch/kocevski/838444/ft2_4FGL_J1640.4+3945_daily_bin1171.fits sctable="SC_DATA" outfile=/scratch/kocevski/838444/ltcube_542851201_543110401_4FGL_J1640.4+3945_daily_bin1171.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/838444/ft2_4FGL_J1640.4+3945_daily_bin1171.fits
.....................!
real 3.52
user 2.93
sys 0.55

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/838444/ft1_filtered_4FGL_J1640.4+3945_daily_bin1171.fits evtable="EVENTS" scfile=/scratch/kocevski/838444/ft2_4FGL_J1640.4+3945_daily_bin1171.fits sctable="SC_DATA" expcube=/scratch/kocevski/838444/ltcube_542851201_543110401_4FGL_J1640.4+3945_daily_bin1171.fits outfile=/scratch/kocevski/838444/expmap_542851201_543110401_4FGL_J1640.4+3945_daily_bin1171.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/838444/ltcube_542851201_543110401_4FGL_J1640.4+3945_daily_bin1171.fits
.....................!
real 355.93
user 345.46
sys 9.45

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

Setting source of interest to:
4FGL J1640.4+3945 @ 250.119 39.7626

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/838444/ft1_filtered_4FGL_J1640.4+3945_daily_bin1171.fits scfile=/scratch/kocevski/838444/ft2_4FGL_J1640.4+3945_daily_bin1171.fits outfile=/scratch/kocevski/838444/cmap_542851201_543110401_4FGL_J1640.4+3945_daily_bin1171.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.119 yref=39.7626 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.80
user 0.61
sys 0.17

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/838444/ft1_filtered_4FGL_J1640.4+3945_daily_bin1171.fits scfile=/scratch/kocevski/838444/ft2_4FGL_J1640.4+3945_daily_bin1171.fits outfile=/scratch/kocevski/838444/cmap_HighResolution_542851201_543110401_4FGL_J1640.4+3945_daily_bin1171.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.119 yref=39.7626 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.83
user 0.63
sys 0.19

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/838444/ft1_filtered_4FGL_J1640.4+3945_daily_bin1171.fits evtable="EVENTS" scfile=/scratch/kocevski/838444/ft2_4FGL_J1640.4+3945_daily_bin1171.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/838444/Model_4FGL_J1640.4+3945_daily_bin1171.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/838444/ft1_filtered_4FGL_J1640.4+3945_daily_bin1171.fits.........................!
real 29.90
user 27.79
sys 1.96

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/838444/ft1_filtered_4FGL_J1640.4+3945_daily_bin1171.fits', '/scratch/kocevski/838444/ft2_4FGL_J1640.4+3945_daily_bin1171.fits', expMap='/scratch/kocevski/838444/expmap_542851201_543110401_4FGL_J1640.4+3945_daily_bin1171.fits', expCube='/scratch/kocevski/838444/ltcube_542851201_543110401_4FGL_J1640.4+3945_daily_bin1171.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/838444/Model_4FGL_J1640.4+3945_daily_bin1171.xml', optimizer='MINUIT')

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

4FGL J1640.4+3945
   Spectrum: PowerLaw
308    Prefactor:  1.345e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-12)
309        Index:  2.421e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
310        Scale:  1.366e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/838444/ft1_filtered_4FGL_J1640.4+3945_daily_bin1171.fits
Spacecraft file(s): /scratch/kocevski/838444/ft2_4FGL_J1640.4+3945_daily_bin1171.fits
Exposure map: /scratch/kocevski/838444/expmap_542851201_543110401_4FGL_J1640.4+3945_daily_bin1171.fits
Exposure cube: /scratch/kocevski/838444/ltcube_542851201_543110401_4FGL_J1640.4+3945_daily_bin1171.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/838444/Model_4FGL_J1640.4+3945_daily_bin1171.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) = 506.257495424

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    93.309       1.0000         .10000E-03   10000.    
     2 'Prefactor '    5.8280       1.0000         .10000E-03   10000.    
     3 'Prefactor '    28.125       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .28173E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .25364E-01   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .28841E-03   1.0000         .10000E-03   10000.    
     7 'norm      '    .62280       1.0000         .10000E-03   10000.    
     8 'norm      '    23.131       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .45721E-02   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10955E-02   1.0000         .10000E-03   10000.    
    11 'norm      '    43.975       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10016E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .30417E-02   1.0000         .10000E-03   10000.    
    15 'Prefactor '    .16731E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    5.0607       1.0000         .10000E-03   10000.    
    17 'norm      '    5.4122       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .37335E-03   1.0000         .10000E-03   10000.    
    19 'norm      '    .10014E-03   1.0000         .10000E-03   10000.    
    20 'norm      '    .19219E-03   1.0000         .10000E-03   10000.    
    21 'norm      '    .10721E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10174E-03   1.0000         .10000E-03   10000.    
    23 'norm      '    78.474       1.0000         .10000E-03   10000.    
    24 'Prefactor '    1.2671       1.0000         .10000E-03   10000.    
    25 'Normalizat'    .44817       1.0000         .10000E-01   10.000    
    26 'Prefactor '    .67938       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6620E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   506.1977     FROM MIGRAD    STATUS=CONVERGED    265 CALLS     2267 TOTAL
                     EDM=   .10E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  5.0%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     90.205        111.18       -.12883E-04    .65852E-04
   2  Prefactor     84.686        394.54        .71187E-05   -.32710E-05
   3  Prefactor     28.832        24.278       -.44922E-06   -.50258E-04
   4  Prefactor     .10000E-03    11.085       -.39962E-06** at limit **
   5  Prefactor     .10000E-03    31.312       -.50616E-06** at limit **
   6  Prefactor     .10000E-03    4.3451        .28177E-07** at limit **
   7  norm          .62323        .46514       -.10572E-06    .53105E-03
   8  norm          3.4252        1283.2       -.24236E-03    .80346E-04
   9  Prefactor     .10000E-03    88.725        .24386E-05** at limit **
  10  Prefactor     .10000E-03    11.143        .34673E-06** at limit **
  11  norm          93.045        292.94        .13422E-03    .15380E-03
  12  Prefactor     .10000E-03    1.4381       -.72690E-08** at limit **
  13  Prefactor     .10000E-03    1.3734       -.13529E-07** at limit **
  14  Prefactor     .10000E-03    46.381        .49606E-05** at limit **
  15  Prefactor     .10000E-03    3.5838        .15062E-06** at limit **
  16  norm          5.1980        5.6126       -.16669E-06    .17211E-04
  17  norm          5.4594        4.0532        .47697E-07    .31406E-04
  18  Prefactor     .10000E-03    13.794       -.20009E-06** at limit **
  19  norm          .10000E-03    .90304        .13134E-08** at limit **
  20  norm          .10000E-03    14.981        .15926E-06** at limit **
  21  norm          .10000E-03    2.6769        .92447E-07** at limit **
  22  Prefactor     .10001E-03    204.83        .34193E-05** at limit **
  23  norm          79.031        35.513       -.55471E-06   -.31669E-03
  24  Prefactor     .10000E-03    307.45        .32802E-05** at limit **
  25  Normalizat    .44222        .69695       -.13495E-04    .36180E-04
  26  Prefactor     .65537        .54188        .82179E-05    .67402E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 90.2052
  Prefactor  = 84.6863
  Prefactor  = 28.8322
  Prefactor  = 0.000100001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.623225
  norm       = 3.42523
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 93.0449
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.000100002
  Prefactor  = 0.0001
  norm       = 5.19798
  norm       = 5.45935
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 0.0001
  norm       = 0.0001
  Prefactor  = 0.000100006
  norm       = 79.0306
  Prefactor  = 0.000100001
  Normalizat = 0.442216
  Prefactor  = 0.655366
 **********
 **   18 **HESSE 
 **********

 FCN=   506.1977     FROM HESSE     STATUS=OK           508 CALLS     2775 TOTAL
                     EDM=   .17E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     90.205        111.84        .10401E-02   -1.3806    
   2  Prefactor     84.686        393.78        .41590E-02   -1.3865    
   3  Prefactor     28.832        24.209        .18886E-02   -1.4634    
   4  Prefactor     .10000E-03    11.072        .10708E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    30.858        .91491E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    4.3580        .10703E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  norm          .62323        .46298        .28569E-02   -1.5550    
   8  norm          3.4252        1449.0        .20821E-02   -1.5338    
   9  Prefactor     .10000E-03    88.404        .96616E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    10.943        .10351E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  norm          93.045        304.69        .15114E-02   -1.3776    
  12  Prefactor     .10000E-03    1.4358        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .10000E-03    1.3716        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10000E-03    25.193        .35129E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .10000E-03    3.5350        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          5.1980        5.6139        .44685E-02   -1.5252    
  17  norm          5.4594        4.0886        .43183E-02   -1.5241    
  18  Prefactor     .10000E-03    13.617        .10647E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  norm          .10000E-03    .90370        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  norm          .10000E-03    15.061        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  norm          .10000E-03    2.6891        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     .10001E-03    204.72        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  norm          79.031        35.639        .11333E-02   -1.3928    
  24  Prefactor     .10000E-03    307.27        .98896E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Normalizat    .44222        .60697        .70265E-01   -1.1517    
  26  Prefactor     .65537        .46346        .42126E-01   -1.0530    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.67597e-09
Minuit parameter uncertainties:
  1  112.104
  2  369.29
  3  24.2174
  4  0.000221199
  5  0.000214077
  6  1.24693e-06
  7  0.462981
  8  144.568
  9  0.00023491
  10  0.000102922
  11  310.054
  12  4.2087e-07
  13  6.98681e-07
  14  0.000394584
  15  2.13284e-05
  16  5.61451
  17  4.0888
  18  4.46729e-05
  19  7.16889e-07
  20  2.38604e-05
  21  5.12898e-06
  22  0.00215364
  23  35.6487
  24  0.00114602
  25  0.616373
  26  0.466212
Done.

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

Extracting fit parameters...

4FGL J1640.4+3945
   Spectrum: PowerLaw
308    Prefactor:  1.000e-04  4.209e-07  1.000e-04  1.000e+04 ( 1.000e-12)
309        Index:  2.421e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
310        Scale:  1.366e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
659    Prefactor:  6.554e-01  4.662e-01  0.000e+00  1.000e+01 ( 1.000e+00)
660        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
661        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
658   Normalization:  4.422e-01  6.164e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 250.119 39.763
Photon Flux Upper Limit: 3.00e-07 ph cm-2 s-1
Energy Flux Upper Limit: 2.32e-02 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/838444/likelihoodResults_542851201_543110401_4FGL_J1640.4+3945_daily_bin1171.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) = 506.198491023
delta logL = -0.000793820153433

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 506.197696434
delta logL = 7.68453276123e-07

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   506.1977     FROM MIGRAD    STATUS=CONVERGED     69 CALLS      217 TOTAL
                     EDM=   .62E-10    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    14.464        .90712E-02** at limit **
   2  Index         1.4811        8.9500        .50000        .30480E-06
   3  Normalizat    .44221        .27288E-01    .70265E-01   -.76507E-04
   4  Prefactor     .65536        .22292E-01    .41810E-01   -.10334E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 1.48114
  Normalizat = 0.442215
  Prefactor  = 0.655363
 **********
 **   18 **HESSE 
 **********

 FCN=   506.1977     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      246 TOTAL
                     EDM=   .13E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    297.65        .39568E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         1.4811        9.1244        .50000       -.78069    
   3  Normalizat    .44221        .13960        .31111E-03   -1.1517    
   4  Prefactor     .65536        .11431        .20874E-03   -1.0530    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 1.29976e-09
Minuit parameter uncertainties:
  1  0.000263899
  2  885.568
  3  0.139713
  4  0.114352
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/838444': 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) = 506.197677875
delta logL = 1.93281700831e-05

Extracting fit parameters...

4FGL J1640.4+3945
   Spectrum: PowerLaw
308    Prefactor:  1.000e-04  2.639e-04  1.000e-04  1.000e+04 ( 1.000e-12)
309        Index:  1.481e+00  8.856e+02  0.000e+00  1.000e+01 (-1.000e+00)
310        Scale:  1.366e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
659    Prefactor:  6.554e-01  1.144e-01  0.000e+00  1.000e+01 ( 1.000e+00)
660        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
661        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
658   Normalization:  4.422e-01  1.397e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 250.119 39.763

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/838444/cmap_HighResolution_542851201_543110401_4FGL_J1640.4+3945_daily_bin1171.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='2.32e-02', job_status='DONE', photon_flux_upper_limit='3.00e-07', time_completed='2021-09-15 06:58:04.474550', job_id='838444', GAL2='0.66', fit_tolerance='1e-08', EG2='0.44', EG='0.44', time_epoch_completed='1631714284.47', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.66', dlogl='1.93e-05', ts2='-0.00', photon_index_error='0.00', photon_index='2.42' WHERE bin_id='1171' AND source_name='4FGL J1640.4+3945' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Wed Sep 15 06:58:04 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0164>
Subject: Job 838444: <4FGL_J1640.4+3945_daily_bin1171> in cluster <slac> Done

Job <4FGL_J1640.4+3945_daily_bin1171> was submitted from host <rhel6-64f> by user <kocevski> in cluster <slac> at Wed Sep 15 06:45:23 2021
Job was executed on host(s) <bullet0164>, in queue <medium>, as user <kocevski> in cluster <slac> at Wed Sep 15 06:47:18 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Wed Sep 15 06:47:18 2021
Terminated at Wed Sep 15 06:58:05 2021
Results reported at Wed Sep 15 06:58:05 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1640.4+3945_daily_bin1171 250.119 39.7626 542851201 543110401 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1640.4+3945 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   618.68 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             356.21 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   646 sec.
    Turnaround time :                            762 sec.

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

