/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 6 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 = 7323
number of fields = 27
No RA_SUN column yet. Adding RA_SUN/DEC_SUN columns.
Done.


Performing analysis on: 4FGL_J1640.4+3945_daily_bin330
RA = 250.119, Dec = 39.7626
tmin = 324864001, tmax = 325123201
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='831726', job_status='RUN', time_executed='2021-09-15 06:23:47.664424', time_epoch_executed='1631712227.66' WHERE source_name='4FGL J1640.4+3945' and cadence='daily' and bin_id='330'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/831726

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/831726/ft1_4FGL_J1640.4+3945_daily_bin330.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/831726/ft2_4FGL_J1640.4+3945_daily_bin330.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/831726/ft1_4FGL_J1640.4+3945_daily_bin330.fits outfile=/scratch/kocevski/831726/ft1_filteredMKT_4FGL_J1640.4+3945_daily_bin330.fits ra=250.119 dec=39.7626 rad=12.0 tmin=324864001.0 tmax=325123201.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 5.76
user 5.45
sys 0.26

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/831726/ft1_filtered_4FGL_J1640.4+3945_daily_bin330.fits" evtable="EVENTS" scfile=/scratch/kocevski/831726/ft2_4FGL_J1640.4+3945_daily_bin330.fits sctable="SC_DATA" outfile=/scratch/kocevski/831726/ltcube_324864001_325123201_4FGL_J1640.4+3945_daily_bin330.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/831726/ft2_4FGL_J1640.4+3945_daily_bin330.fits
.....................!
real 13.48
user 12.99
sys 0.38

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/831726/ft1_filtered_4FGL_J1640.4+3945_daily_bin330.fits evtable="EVENTS" scfile=/scratch/kocevski/831726/ft2_4FGL_J1640.4+3945_daily_bin330.fits sctable="SC_DATA" expcube=/scratch/kocevski/831726/ltcube_324864001_325123201_4FGL_J1640.4+3945_daily_bin330.fits outfile=/scratch/kocevski/831726/expmap_324864001_325123201_4FGL_J1640.4+3945_daily_bin330.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/831726/ltcube_324864001_325123201_4FGL_J1640.4+3945_daily_bin330.fits
.....................!
real 191.98
user 186.44
sys 4.77

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/831726/ft1_filtered_4FGL_J1640.4+3945_daily_bin330.fits scfile=/scratch/kocevski/831726/ft2_4FGL_J1640.4+3945_daily_bin330.fits outfile=/scratch/kocevski/831726/cmap_324864001_325123201_4FGL_J1640.4+3945_daily_bin330.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.54
user 0.38
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/831726/ft1_filtered_4FGL_J1640.4+3945_daily_bin330.fits scfile=/scratch/kocevski/831726/ft2_4FGL_J1640.4+3945_daily_bin330.fits outfile=/scratch/kocevski/831726/cmap_HighResolution_324864001_325123201_4FGL_J1640.4+3945_daily_bin330.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.38
sys 0.17

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10172E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    47.712       1.0000         .10000E-03   10000.    
     3 'Prefactor '    7.9485       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .15763E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    5.9305       1.0000         .10000E-03   10000.    
     6 'Prefactor '    2.1326       1.0000         .10000E-03   10000.    
     7 'norm      '    .60790       1.0000         .10000E-03   10000.    
     8 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    3.7393       1.0000         .10000E-03   10000.    
    11 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    3.1708       1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10026E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    3.0911       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .64917       1.0000         .10000E-03   10000.    
    16 'norm      '    4.5529       1.0000         .10000E-03   10000.    
    17 'norm      '    2.4923       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    19 'norm      '    .22069       1.0000         .10000E-03   10000.    
    20 'norm      '    .10538E-03   1.0000         .10000E-03   10000.    
    21 'norm      '    6.4142       1.0000         .10000E-03   10000.    
    22 'Prefactor '    36.142       1.0000         .10000E-03   10000.    
    23 'norm      '    10.218       1.0000         .10000E-03   10000.    
    24 'Prefactor '    50.938       1.0000         .10000E-03   10000.    
    25 'Normalizat'    1.3046       1.0000         .10000E-01   10.000    
    26 'Prefactor '    .66291       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=   6487.662     FROM MIGRAD    STATUS=CONVERGED    630 CALLS     3182 TOTAL
                     EDM=   .57E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.1%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    43.263        .40080E-06** at limit **
   2  Prefactor     47.725        53.281        .22726E-06    .49429E-04
   3  Prefactor     7.9479        4.6213        .10732E-06    .97515E-04
   4  Prefactor     .10000E-03    8.2629       -.32901E-05** at limit **
   5  Prefactor     5.8989        23.067        .13805E-05    .30709E-04
   6  Prefactor     2.1332        3.4166        .22191E-06   -.42141E-04
   7  norm          .60788        .20347       -.14974E-09   -.14900E-03
   8  norm          .10000E-03    5.6415       -.69879E-08** at limit **
   9  Prefactor     .10000E-03    8.3184        .48938E-07** at limit **
  10  Prefactor     3.7395        3.5940       -.77624E-07   -.72062E-04
  11  norm          .10000E-03    14.443       -.24566E-07** at limit **
  12  Prefactor     3.1711        1.7744       -.28008E-07   -.23520E-04
  13  Prefactor     .10000E-03    1.0178       -.26572E-07** at limit **
  14  Prefactor     3.0912        2.8607        .61184E-07    .21399E-05
  15  Prefactor     .65059        2.6825        .16404E-06   -.18511E-03
  16  norm          4.5530        2.0961       -.31980E-07   -.68446E-04
  17  norm          2.4923        1.0663       -.11076E-07   -.84271E-04
  18  Prefactor     .10000E-03    8.9401       -.24306E-06** at limit **
  19  norm          .22080        .75849        .62759E-06   -.19487E-03
  20  norm          .10000E-03    25.378       -.39914E-06** at limit **
  21  norm          6.4143        2.3655       -.45034E-07   -.18284E-03
  22  Prefactor     36.123        44.380       -.31463E-06   -.71250E-04
  23  norm          10.218        8.7897        .71708E-07   -.14154E-04
  24  Prefactor     50.932        94.668       -.31389E-06   -.10168E-04
  25  Normalizat    1.3048        .20883       -.29276E-06   -.27664E-04
  26  Prefactor     .66282        .15255       -.38514E-06   -.24304E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 47.7245
  Prefactor  = 7.94786
  Prefactor  = 0.0001
  Prefactor  = 5.89886
  Prefactor  = 2.13322
  norm       = 0.607876
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 3.73949
  norm       = 0.0001
  Prefactor  = 3.17113
  Prefactor  = 0.0001
  Prefactor  = 3.0912
  Prefactor  = 0.650594
  norm       = 4.55295
  norm       = 2.49232
  Prefactor  = 0.0001
  norm       = 0.220805
  norm       = 0.0001
  norm       = 6.41428
  Prefactor  = 36.1231
  norm       = 10.218
  Prefactor  = 50.9315
  Normalizat = 1.30475
  Prefactor  = 0.662822
 **********
 **   18 **HESSE 
 **********

 FCN=   6487.662     FROM HESSE     STATUS=OK           466 CALLS     3648 TOTAL
                     EDM=   .24E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    44.022        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     47.725        53.249        .29026E-03   -1.4325    
   3  Prefactor     7.9479        4.6361        .12525E-03   -1.5144    
   4  Prefactor     .10000E-03    8.3539        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     5.8989        23.353        .16489E-03   -1.5222    
   6  Prefactor     2.1332        3.3929        .17782E-03   -1.5416    
   7  norm          .60788        .20319        .18841E-04   -1.5552    
   8  norm          .10000E-03    5.6444        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .10000E-03    8.3267        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     3.7395        3.5902        .14362E-03   -1.5321    
  11  norm          .10000E-03    14.444        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     3.1711        1.5302        .60877E-04   -1.5352    
  13  Prefactor     .10000E-03    2.3102        .12691E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     3.0912        2.8521        .12516E-03   -1.5356    
  15  Prefactor     .65059        4.3292        .23284E-02   -1.5547    
  16  norm          4.5530        2.0865        .75528E-04   -1.5281    
  17  norm          2.4923        1.0657        .25891E-04   -1.5392    
  18  Prefactor     .10000E-03    9.1526        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  norm          .22080        .75625        .12060E-03   -1.5614    
  20  norm          .10000E-03    26.025        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  norm          6.4143        2.3615        .71686E-04   -1.5201    
  22  Prefactor     36.123        44.289        .66662E-04   -1.4505    
  23  norm          10.218        8.7644        .12535E-03   -1.5069    
  24  Prefactor     50.932        94.538        .56191E-04   -1.4279    
  25  Normalizat    1.3048        .24903        .26186E-03   -.83425    
  26  Prefactor     .66282        .18089        .27413E-03   -1.0500    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.37357e-08
Minuit parameter uncertainties:
  1  8.15124e-05
  2  53.3023
  3  4.63633
  4  5.46053e-05
  5  23.3888
  6  3.3932
  7  0.203188
  8  1.16905e-06
  9  1.38751e-06
  10  3.59039
  11  1.52302e-06
  12  1.53017
  13  1.86015e-05
  14  2.85221
  15  3.35661
  16  2.08649
  17  1.06569
  18  2.79727e-05
  19  0.756282
  20  1.60723e-06
  21  2.36152
  22  44.3296
  23  8.76547
  24  94.8178
  25  0.249263
  26  0.181049
Done.

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

Extracting fit parameters...

4FGL J1640.4+3945
   Spectrum: PowerLaw
308    Prefactor:  3.171e+00  1.530e+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:  6.628e-01  1.810e-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:  1.305e+00  2.493e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 11.09
Ra Dec: 250.119 39.763
Photon Index (Fixed Index): 2.42 +/- 0.00
Photon Flux (Fixed Index): 1.25e-07 +/- 6.04e-08
Energy Flux (Fixed Index): 3.99e-05 +/- 1.93e-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) = 6487.35351605
delta logL = 0.308923002288

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6487.34753284
delta logL = 0.31490621609

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    2.0447       1.0000         .10000E-03   10000.    
     2 'Index     '    2.7798       1.0000          .0000       10.000    
     3 'Normalizat'    1.2646       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .68324       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=   6487.348     FROM MIGRAD    STATUS=CONVERGED     63 CALLS      256 TOTAL
                     EDM=   .52E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     2.0445        10.984        .72289E-02    .31262E-03
   2  Index         2.7800        2.2497        .89026E-01    .17648E-03
   3  Normalizat    1.2646        .86444E-01    .59913E-01    .67585E-05
   4  Prefactor     .68329        .57787E-01    .61107E-01    .21169E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 2.04447
  Index      = 2.78
  Normalizat = 1.26461
  Prefactor  = 0.683292
 **********
 **   18 **HESSE 
 **********

 FCN=   6487.348     FROM HESSE     STATUS=OK            33 CALLS      289 TOTAL
                     EDM=   .11E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     2.0445        1.8918        .44669E-04   -1.5422    
   2  Index         2.7800        .53722        .35294E-02   -.46006    
   3  Normalizat    1.2646        .23943        .26497E-03   -.84629    
   4  Prefactor     .68329        .18108        .27030E-03   -1.0419    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.05675e-11
Minuit parameter uncertainties:
  1  1.89182
  2  0.538512
  3  0.23964
  4  0.181238
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/831726': 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) = 6487.34753239
delta logL = 0.314906664952

Extracting fit parameters...

4FGL J1640.4+3945
   Spectrum: PowerLaw
308    Prefactor:  2.044e+00  1.892e+00  1.000e-04  1.000e+04 ( 1.000e-12)
309        Index:  2.780e+00  5.385e-01  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.833e-01  1.812e-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:  1.265e+00  2.396e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 12.01
Ra Dec: 250.119 39.763
Photon Index (Free Index): 2.78 +/- 0.54
Photon Flux (Free Index): 1.65e-07 +/- 8.12e-08
Energy Flux (Free Index): 3.74e-05 +/- 1.57e-05

Creating a high resolution counts map...
INFO: Auto-setting vmin to  0.000e+00 [aplpy.core]
INFO: Auto-setting vmax to  0.000e+00 [aplpy.core]
Saving /scratch/kocevski/831726/cmap_HighResolution_324864001_325123201_4FGL_J1640.4+3945_daily_bin330.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='1.25e-07', energy_flux2='3.74e-05', photon_flux_error='6.04e-08', dlogl='3.15e-01', energy_flux='3.99e-05', photon_flux2='1.65e-07', job_status='DONE', time_completed='2021-09-15 06:36:27.652557', photon_index_error2='0.54', photon_index2='2.78', ts='11.09', fit_tolerance='1e-08', GAL='0.66', photon_index_error='0.00', energy_flux_error2='1.57e-05', EG='1.30', time_epoch_completed='1631712987.65', return_code='0', job_id='831726', GAL2='0.68', EG2='1.26', return_code2='0', energy_flux_error='1.93e-05', photon_flux_error2='8.12e-08', ts2='12.01', photon_index='2.42' WHERE bin_id='330' AND source_name='4FGL J1640.4+3945' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Wed Sep 15 06:36:27 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0115>
Subject: Job 831726: <4FGL_J1640.4+3945_daily_bin330> in cluster <slac> Done

Job <4FGL_J1640.4+3945_daily_bin330> was submitted from host <rhel6-64f> by user <kocevski> in cluster <slac> at Wed Sep 15 06:20:33 2021
Job was executed on host(s) <bullet0115>, in queue <medium>, as user <kocevski> in cluster <slac> at Wed Sep 15 06:23:32 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:23:32 2021
Terminated at Wed Sep 15 06:36:28 2021
Results reported at Wed Sep 15 06:36:28 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1640.4+3945_daily_bin330 250.119 39.7626 324864001 325123201 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 :                                   753.38 sec.
    Max Memory :                                 1258 MB
    Average Memory :                             361.88 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   777 sec.
    Turnaround time :                            955 sec.

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

