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


Performing analysis on: 4FGL_J1640.4+3945_daily_bin1215
RA = 250.119, Dec = 39.7626
tmin = 554256001, tmax = 554515201
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='838522', job_status='RUN', time_executed='2021-09-15 06:50:05.488927', time_epoch_executed='1631713805.49' WHERE source_name='4FGL J1640.4+3945' and cadence='daily' and bin_id='1215'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/838522

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/838522/ft1_4FGL_J1640.4+3945_daily_bin1215.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/838522/ft2_4FGL_J1640.4+3945_daily_bin1215.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/838522/ft1_4FGL_J1640.4+3945_daily_bin1215.fits outfile=/scratch/kocevski/838522/ft1_filteredMKT_4FGL_J1640.4+3945_daily_bin1215.fits ra=250.119 dec=39.7626 rad=12.0 tmin=554256001.0 tmax=554515201.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.80
sys 0.23

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/838522/ft2_4FGL_J1640.4+3945_daily_bin1215.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/838522/ft1_filteredMKT_4FGL_J1640.4+3945_daily_bin1215.fits evtable="EVENTS" outfile="/scratch/kocevski/838522/ft1_filtered_4FGL_J1640.4+3945_daily_bin1215.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.36
sys 0.15

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/838522/ft1_filtered_4FGL_J1640.4+3945_daily_bin1215.fits" evtable="EVENTS" scfile=/scratch/kocevski/838522/ft2_4FGL_J1640.4+3945_daily_bin1215.fits sctable="SC_DATA" outfile=/scratch/kocevski/838522/ltcube_554256001_554515201_4FGL_J1640.4+3945_daily_bin1215.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/838522/ft2_4FGL_J1640.4+3945_daily_bin1215.fits
.....................!
real 14.05
user 13.68
sys 0.33

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/838522/ft1_filtered_4FGL_J1640.4+3945_daily_bin1215.fits evtable="EVENTS" scfile=/scratch/kocevski/838522/ft2_4FGL_J1640.4+3945_daily_bin1215.fits sctable="SC_DATA" expcube=/scratch/kocevski/838522/ltcube_554256001_554515201_4FGL_J1640.4+3945_daily_bin1215.fits outfile=/scratch/kocevski/838522/expmap_554256001_554515201_4FGL_J1640.4+3945_daily_bin1215.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/838522/ltcube_554256001_554515201_4FGL_J1640.4+3945_daily_bin1215.fits
.....................!
real 192.16
user 186.76
sys 5.00

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/838522/ft1_filtered_4FGL_J1640.4+3945_daily_bin1215.fits scfile=/scratch/kocevski/838522/ft2_4FGL_J1640.4+3945_daily_bin1215.fits outfile=/scratch/kocevski/838522/cmap_554256001_554515201_4FGL_J1640.4+3945_daily_bin1215.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.55
user 0.40
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/838522/ft1_filtered_4FGL_J1640.4+3945_daily_bin1215.fits scfile=/scratch/kocevski/838522/ft2_4FGL_J1640.4+3945_daily_bin1215.fits outfile=/scratch/kocevski/838522/cmap_HighResolution_554256001_554515201_4FGL_J1640.4+3945_daily_bin1215.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.56
user 0.40
sys 0.15

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

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/838522/ft1_filtered_4FGL_J1640.4+3945_daily_bin1215.fits', '/scratch/kocevski/838522/ft2_4FGL_J1640.4+3945_daily_bin1215.fits', expMap='/scratch/kocevski/838522/expmap_554256001_554515201_4FGL_J1640.4+3945_daily_bin1215.fits', expCube='/scratch/kocevski/838522/ltcube_554256001_554515201_4FGL_J1640.4+3945_daily_bin1215.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/838522/Model_4FGL_J1640.4+3945_daily_bin1215.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/838522/ft1_filtered_4FGL_J1640.4+3945_daily_bin1215.fits
Spacecraft file(s): /scratch/kocevski/838522/ft2_4FGL_J1640.4+3945_daily_bin1215.fits
Exposure map: /scratch/kocevski/838522/expmap_554256001_554515201_4FGL_J1640.4+3945_daily_bin1215.fits
Exposure cube: /scratch/kocevski/838522/ltcube_554256001_554515201_4FGL_J1640.4+3945_daily_bin1215.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/838522/Model_4FGL_J1640.4+3945_daily_bin1215.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) = 1932.63048109

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    13.438       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10189E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .99207E-02   1.0000         .10000E-03   10000.    
     7 'norm      '    .94965       1.0000         .10000E-03   10000.    
     8 'norm      '    103.56       1.0000         .10000E-03   10000.    
     9 'Prefactor '    225.15       1.0000         .10000E-03   10000.    
    10 'Prefactor '    16.471       1.0000         .10000E-03   10000.    
    11 'norm      '    .10061E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .89916       1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10013E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    41.470       1.0000         .10000E-03   10000.    
    15 'Prefactor '    9.0217       1.0000         .10000E-03   10000.    
    16 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10018E-03   1.0000         .10000E-03   10000.    
    19 'norm      '    1.4501       1.0000         .10000E-03   10000.    
    20 'norm      '    .11987E-03   1.0000         .10000E-03   10000.    
    21 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    170.76       1.0000         .10000E-03   10000.    
    23 'norm      '    18.954       1.0000         .10000E-03   10000.    
    24 'Prefactor '    .12188E-02   1.0000         .10000E-03   10000.    
    25 'Normalizat'    .86089       1.0000         .10000E-01   10.000    
    26 'Prefactor '    .73122       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.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   1932.538     FROM MIGRAD    STATUS=CONVERGED    613 CALLS     3117 TOTAL
                     EDM=   .67E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .2%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     13.440        81.513        .29464E-05    .87172E-05
   2  Prefactor     .10000E-03    406.54       -.11564E-03** at limit **
   3  Prefactor     .10000E-03    4.9431        .50499E-07** at limit **
   4  Prefactor     .10000E-03    22.606        .23859E-06** at limit **
   5  Prefactor     .10000E-03    93.819       -.95633E-04** at limit **
   6  Prefactor     .10027E-03    20.423       -.59810E-05** at limit **
   7  norm          .95015        .56563        .53071E-07    .29708E-02
   8  norm          103.63        109.79        .54751E-04    .11118E-03
   9  Prefactor     225.15        87.585       -.89245E-07    .21782E-03
  10  Prefactor     16.477        27.710       -.30311E-05    .92618E-04
  11  norm          .10000E-03    115.05        .12147E-03** at limit **
  12  Prefactor     .90083        3.0549       -.98417E-06   -.45258E-04
  13  Prefactor     .10000E-03    4.3446        .37546E-07** at limit **
  14  Prefactor     41.469        42.854       -.11329E-06    .31475E-04
  15  Prefactor     9.0341        19.162       -.33576E-05    .14405E-03
  16  norm          .10000E-03    2.4558        .83240E-08** at limit **
  17  norm          .10000E-03    3.4880       -.10736E-07** at limit **
  18  Prefactor     .10000E-03    25.025       -.73588E-06** at limit **
  19  norm          1.4502        3.2457        .13271E-06   -.91868E-04
  20  norm          .10000E-03    52.816        .77773E-05** at limit **
  21  norm          .10000E-03    5.8074        .20537E-08** at limit **
  22  Prefactor     170.77        208.22        .10300E-04    .11311E-04
  23  norm          18.976        25.700       -.54193E-05    .60719E-04
  24  Prefactor     .10000E-03    630.13       -.10621E-03** at limit **
  25  Normalizat    .86105        .45253        .26219E-05    .14795E-03
  26  Prefactor     .73126        .29913       -.36898E-05    .23954E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 13.4401
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.000100269
  norm       = 0.950148
  norm       = 103.634
  Prefactor  = 225.147
  Prefactor  = 16.4766
  norm       = 0.000100001
  Prefactor  = 0.900834
  Prefactor  = 0.0001
  Prefactor  = 41.4694
  Prefactor  = 9.03413
  norm       = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 1.45015
  norm       = 0.0001
  norm       = 0.0001
  Prefactor  = 170.775
  norm       = 18.9756
  Prefactor  = 0.000100002
  Normalizat = 0.861049
  Prefactor  = 0.731265
 **********
 **   18 **HESSE 
 **********

 FCN=   1932.538     FROM HESSE     STATUS=OK           444 CALLS     3561 TOTAL
                     EDM=   .32E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     13.440        81.561        .10927E-03   -1.4975    
   2  Prefactor     .10000E-03    406.31        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .10000E-03    4.9861        .95353E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    22.607        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    93.757        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10027E-03    101.51        .36587E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  norm          .95015        .56026        .20230E-04   -1.5513    
   8  norm          103.63        109.47        .19756E-03   -1.3668    
   9  Prefactor     225.15        88.731        .26963E-04   -1.2696    
  10  Prefactor     16.477        27.691        .98686E-04   -1.4896    
  11  norm          .10000E-03    114.51        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .90083        2.8864        .12161E-03   -1.5518    
  13  Prefactor     .10000E-03    4.3687        .17661E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     41.469        42.874        .62248E-04   -1.4419    
  15  Prefactor     9.0341        18.890        .13344E-03   -1.5107    
  16  norm          .10000E-03    2.4695        .67228E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .10000E-03    3.4885        .80186E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10000E-03    25.028        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  norm          1.4502        3.1918        .11337E-03   -1.5467    
  20  norm          .10000E-03    52.966        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  norm          .10000E-03    5.8084        .10348E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     170.77        208.16        .30875E-04   -1.3087    
  23  norm          18.976        25.671        .91996E-04   -1.4836    
  24  Prefactor     .10000E-03    629.69        .20627E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Normalizat    .86105        .58192        .33119E-03   -.97843    
  26  Prefactor     .73126        .38712        .24595E-03   -1.0231    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.22819e-09
Minuit parameter uncertainties:
  1  66.3526
  2  3.19382e-06
  3  1.21399e-05
  4  4.53986e-05
  5  0.000182987
  6  0.0104684
  7  0.560263
  8  109.682
  9  88.7844
  10  27.7125
  11  0.000489468
  12  2.88685
  13  1.3456e-05
  14  42.9058
  15  18.9024
  16  4.19841e-06
  17  3.84047e-07
  18  1.02025e-05
  19  3.19217
  20  0.000222363
  21  2.83217e-06
  22  209.065
  23  25.6861
  24  0.00218887
  25  0.586228
  26  0.388565
Done.

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

Extracting fit parameters...

4FGL J1640.4+3945
   Spectrum: PowerLaw
308    Prefactor:  9.008e-01  2.887e+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

GAL_V02
   Spectrum: PowerLaw
659    Prefactor:  7.313e-01  3.886e-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:  8.610e-01  5.862e-01  1.000e-02  1.000e+01 ( 1.000e+00)


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

Saving results to:
/scratch/kocevski/838522/likelihoodResults_554256001_554515201_4FGL_J1640.4+3945_daily_bin1215.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) = 1932.47004785
delta logL = 0.0677706827169

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 1932.46519863
delta logL = 0.0726199000865

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    1.6348       1.0000         .10000E-03   10000.    
     2 'Index     '    1.9503       1.0000          .0000       10.000    
     3 'Normalizat'    .86931       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .72577       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=   1932.465     FROM MIGRAD    STATUS=CONVERGED     47 CALLS      237 TOTAL
                     EDM=   .45E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     1.6348        247.89        .82656E-02   -.16142E-03
   2  Index         1.9498        6.1787        .26083        .70213E-05
   3  Normalizat    .86955        .14008        .74489E-01    .62997E-05
   4  Prefactor     .72561        .90497E-01    .42743E-01    .45923E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 1.63477
  Index      = 1.94982
  Normalizat = 0.869552
  Prefactor  = 0.72561
 **********
 **   18 **HESSE 
 **********

 FCN=   1932.465     FROM HESSE     STATUS=OK            33 CALLS      270 TOTAL
                     EDM=   .94E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     1.6348        3.6417        .12131E-03   -1.5452    
   2  Index         1.9498        1.1064        .89918E-02   -.65611    
   3  Normalizat    .86955        .54698        .32967E-03   -.97538    
   4  Prefactor     .72561        .38020        .24669E-03   -1.0253    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 9.41405e-11
Minuit parameter uncertainties:
  1  3.64222
  2  1.12127
  3  0.550516
  4  0.381579
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/838522': 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) = 1932.46519845
delta logL = 0.072620079992

Extracting fit parameters...

4FGL J1640.4+3945
   Spectrum: PowerLaw
308    Prefactor:  1.635e+00  3.642e+00  1.000e-04  1.000e+04 ( 1.000e-12)
309        Index:  1.950e+00  1.121e+00  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:  7.256e-01  3.816e-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:  8.696e-01  5.505e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.14
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/838522/cmap_HighResolution_554256001_554515201_4FGL_J1640.4+3945_daily_bin1215.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='2.76e-02', job_status='DONE', photon_flux_upper_limit='3.56e-07', time_completed='2021-09-15 06:58:35.129289', job_id='838522', GAL2='0.73', fit_tolerance='1e-08', EG2='0.87', EG='0.86', time_epoch_completed='1631714315.13', return_code2='0', ts='0.14', comment='SUCCESS', return_code='0', GAL='0.73', dlogl='7.26e-02', ts2='0.29', photon_index_error='0.00', photon_index='2.42' WHERE bin_id='1215' AND source_name='4FGL J1640.4+3945' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Wed Sep 15 06:58:35 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0206>
Subject: Job 838522: <4FGL_J1640.4+3945_daily_bin1215> in cluster <slac> Done

Job <4FGL_J1640.4+3945_daily_bin1215> was submitted from host <rhel6-64f> by user <kocevski> in cluster <slac> at Wed Sep 15 06:45:28 2021
Job was executed on host(s) <bullet0206>, in queue <medium>, as user <kocevski> in cluster <slac> at Wed Sep 15 06:48:07 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:48:07 2021
Terminated at Wed Sep 15 06:58:35 2021
Results reported at Wed Sep 15 06:58:35 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1640.4+3945_daily_bin1215 250.119 39.7626 554256001 554515201 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 :                                   472.00 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             297.00 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   628 sec.
    Turnaround time :                            787 sec.

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

