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


Performing analysis on: 4FGL_J1738.2+4000_daily_bin958
RA = 264.56, Dec = 40.0099
tmin = 487641601, tmax = 487900801
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='946971', job_status='RUN', time_executed='2021-09-18 01:07:39.780199', time_epoch_executed='1631952459.78' WHERE source_name='4FGL J1738.2+4000' and cadence='daily' and bin_id='958'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/946971

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/946971/ft1_4FGL_J1738.2+4000_daily_bin958.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/946971/ft2_4FGL_J1738.2+4000_daily_bin958.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/946971/ft1_4FGL_J1738.2+4000_daily_bin958.fits outfile=/scratch/kocevski/946971/ft1_filteredMKT_4FGL_J1738.2+4000_daily_bin958.fits ra=264.56 dec=40.0099 rad=12.0 tmin=487641601.0 tmax=487900801.0 emin=100.0 emax=100000.0 zmin=0.0 zmax=90.0 evclass=128 evtype="INDEF" convtype=-1 phasemin=0.0 phasemax=1.0 evtable="EVENTS" chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

Done.
real 3.76
user 3.54
sys 0.20

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/946971/ft2_4FGL_J1738.2+4000_daily_bin958.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/946971/ft2_4FGL_J1738.2+4000_daily_bin958.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/946971/ft1_filteredMKT_4FGL_J1738.2+4000_daily_bin958.fits evtable="EVENTS" outfile="/scratch/kocevski/946971/ft1_filtered_4FGL_J1738.2+4000_daily_bin958.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.40
user 0.25
sys 0.15

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/946971/ft1_filtered_4FGL_J1738.2+4000_daily_bin958.fits" evtable="EVENTS" scfile=/scratch/kocevski/946971/ft2_4FGL_J1738.2+4000_daily_bin958.fits sctable="SC_DATA" outfile=/scratch/kocevski/946971/ltcube_487641601_487900801_4FGL_J1738.2+4000_daily_bin958.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/946971/ft2_4FGL_J1738.2+4000_daily_bin958.fits
.....................!
real 8.68
user 8.38
sys 0.27

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/946971/ft1_filtered_4FGL_J1738.2+4000_daily_bin958.fits evtable="EVENTS" scfile=/scratch/kocevski/946971/ft2_4FGL_J1738.2+4000_daily_bin958.fits sctable="SC_DATA" expcube=/scratch/kocevski/946971/ltcube_487641601_487900801_4FGL_J1738.2+4000_daily_bin958.fits outfile=/scratch/kocevski/946971/expmap_487641601_487900801_4FGL_J1738.2+4000_daily_bin958.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/946971/ltcube_487641601_487900801_4FGL_J1738.2+4000_daily_bin958.fits
.....................!
real 140.77
user 136.84
sys 3.70

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

Setting source of interest to:
4FGL J1738.2+4000 @ 264.56 40.0099

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/946971/ft1_filtered_4FGL_J1738.2+4000_daily_bin958.fits scfile=/scratch/kocevski/946971/ft2_4FGL_J1738.2+4000_daily_bin958.fits outfile=/scratch/kocevski/946971/cmap_487641601_487900801_4FGL_J1738.2+4000_daily_bin958.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=264.56 yref=40.0099 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.44
user 0.29
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/946971/ft1_filtered_4FGL_J1738.2+4000_daily_bin958.fits scfile=/scratch/kocevski/946971/ft2_4FGL_J1738.2+4000_daily_bin958.fits outfile=/scratch/kocevski/946971/cmap_HighResolution_487641601_487900801_4FGL_J1738.2+4000_daily_bin958.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=264.56 yref=40.0099 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.44
user 0.30
sys 0.13

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/946971/ft1_filtered_4FGL_J1738.2+4000_daily_bin958.fits evtable="EVENTS" scfile=/scratch/kocevski/946971/ft2_4FGL_J1738.2+4000_daily_bin958.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/946971/Model_4FGL_J1738.2+4000_daily_bin958.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/946971/ft1_filtered_4FGL_J1738.2+4000_daily_bin958.fits.....................!
real 40.23
user 39.16
sys 0.97

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/946971/ft1_filtered_4FGL_J1738.2+4000_daily_bin958.fits', '/scratch/kocevski/946971/ft2_4FGL_J1738.2+4000_daily_bin958.fits', expMap='/scratch/kocevski/946971/expmap_487641601_487900801_4FGL_J1738.2+4000_daily_bin958.fits', expCube='/scratch/kocevski/946971/ltcube_487641601_487900801_4FGL_J1738.2+4000_daily_bin958.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/946971/Model_4FGL_J1738.2+4000_daily_bin958.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1738.2+4000'

4FGL J1738.2+4000
   Spectrum: PowerLaw
326    Prefactor:  6.394e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-14)
327        Index:  2.517e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
328        Scale:  1.525e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/946971/ft1_filtered_4FGL_J1738.2+4000_daily_bin958.fits
Spacecraft file(s): /scratch/kocevski/946971/ft2_4FGL_J1738.2+4000_daily_bin958.fits
Exposure map: /scratch/kocevski/946971/expmap_487641601_487900801_4FGL_J1738.2+4000_daily_bin958.fits
Exposure cube: /scratch/kocevski/946971/ltcube_487641601_487900801_4FGL_J1738.2+4000_daily_bin958.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/946971/Model_4FGL_J1738.2+4000_daily_bin958.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) = 6172.01957541

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    41.174       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .11493E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    .16402       1.0000         .10000E-03   10000.    
     4 'Prefactor '    6.1787       1.0000         .10000E-03   10000.    
     5 'norm      '    4.8302       1.0000         .10000E-03   10000.    
     6 'norm      '    .18764       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10087E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    2.8566       1.0000         .10000E-03   10000.    
     9 'norm      '    .10063E-03   1.0000         .10000E-03   10000.    
    10 'norm      '    2.0302       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .19471E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10081E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .10629E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    39.937       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10024E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    8.2751       1.0000         .10000E-03   10000.    
    17 'Prefactor '    8.9661       1.0000         .10000E-03   10000.    
    18 'Prefactor '    91.320       1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10145E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    8.3191       1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10018E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    23 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
    24 'norm      '    .10075E-03   1.0000         .10000E-03   10000.    
    25 'norm      '    4.6383       1.0000         .10000E-03   10000.    
    26 'Prefactor '    11.472       1.0000         .10000E-03   10000.    
    27 'Prefactor '    .10017E-03   1.0000         .10000E-03   10000.    
    28 'Normalizat'    .64263       1.0000         .10000E-01   10.000    
    29 'Prefactor '    1.0531       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6840E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   6171.989     FROM MIGRAD    STATUS=CONVERGED    734 CALLS     3754 TOTAL
                     EDM=   .15E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .4%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          41.181        49.562        .78792E-05    .88949E-04
   2  Prefactor     .10000E-03    .99108        .38050E-06** at limit **
   3  Prefactor     .16202        1.4806       -.17545E-05   -.95581E-03
   4  Prefactor     6.1801        4.4643       -.62908E-07    .44363E-03
   5  norm          4.8308        2.3960        .95456E-08    .84115E-03
   6  norm          .18861        .86872       -.91296E-06   -.80102E-03
   7  Prefactor     .10000E-03    19.473        .28412E-05** at limit **
   8  norm          2.8572        1.3556       -.23196E-07    .20956E-03
   9  norm          .10000E-03    3.3917        .30951E-06** at limit **
  10  norm          2.0311        3.0757        .21179E-06   -.61297E-03
  11  Prefactor     .10001E-03    4.7544        .15612E-05** at limit **
  12  Prefactor     .10000E-03    27.790       -.28728E-05** at limit **
  13  norm          .10000E-03    2.6919        .97480E-06** at limit **
  14  Prefactor     39.882        71.358       -.74840E-04   -.46198E-05
  15  Prefactor     .10000E-03    63.987       -.17546E-04** at limit **
  16  norm          8.2704        9.0772       -.52374E-05   -.32648E-03
  17  Prefactor     8.9448        107.95       -.59847E-04   -.22913E-04
  18  Prefactor     91.339        86.573        .19232E-04    .18783E-04
  19  Prefactor     .10000E-03    30.974       -.59236E-06** at limit **
  20  Prefactor     8.3206        9.2594        .20826E-05    .27711E-04
  21  Prefactor     .10000E-03    28.211       -.35664E-05** at limit **
  22  Prefactor     .10000E-03    26.391       -.17199E-05** at limit **
  23  norm          .10000E-03    .67049       -.39947E-07** at limit **
  24  norm          .10000E-03    54.344        .19082E-04** at limit **
  25  norm          4.6387        8.7190        .14509E-05   -.14347E-03
  26  Prefactor     11.471        7.7567        .59446E-06   -.12459E-03
  27  Prefactor     .10000E-03    2.3608       -.13052E-06** at limit **
  28  Normalizat    .64224        .24270        .11347E-04   -.14133E-04
  29  Prefactor     1.0533        .13605       -.16109E-05    .33494E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 41.1807
  Prefactor  = 0.0001
  Prefactor  = 0.162017
  Prefactor  = 6.18007
  norm       = 4.83084
  norm       = 0.188614
  Prefactor  = 0.0001
  norm       = 2.85723
  norm       = 0.0001
  norm       = 2.03107
  Prefactor  = 0.000100006
  Prefactor  = 0.0001
  norm       = 0.000100002
  Prefactor  = 39.8818
  Prefactor  = 0.0001
  norm       = 8.2704
  Prefactor  = 8.94484
  Prefactor  = 91.3387
  Prefactor  = 0.0001
  Prefactor  = 8.32059
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 0.0001
  norm       = 4.6387
  Prefactor  = 11.471
  Prefactor  = 0.0001
  Normalizat = 0.642238
  Prefactor  = 1.0533
 **********
 **   18 **HESSE 
 **********

 FCN=   6171.989     FROM HESSE     STATUS=OK           557 CALLS     4311 TOTAL
                     EDM=   .30E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          41.181        49.299        .62471E-04   -1.4424    
   2  Prefactor     .10000E-03    1.8038        .13022E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .16202        2.1413        .14830E-02   -1.5627    
   4  Prefactor     6.1801        4.4301        .13126E-03   -1.5211    
   5  norm          4.8308        2.3666        .80195E-04   -1.5268    
   6  norm          .18861        1.5450        .14095E-02   -1.5621    
   7  Prefactor     .10000E-03    19.964        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          2.8572        1.3459        .58559E-04   -1.5370    
   9  norm          .10000E-03    3.4059        .14130E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          2.0311        3.0397        .15157E-03   -1.5423    
  11  Prefactor     .10001E-03    32.329        .32512E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    27.816        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .10000E-03    2.7273        .12599E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     39.882        71.178        .63427E-04   -1.4444    
  15  Prefactor     .10000E-03    64.060        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          8.2704        8.8997        .13936E-03   -1.5133    
  17  Prefactor     8.9448        106.95        .13385E-03   -1.5110    
  18  Prefactor     91.339        86.146        .42051E-04   -1.3794    
  19  Prefactor     .10000E-03    31.488        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     8.3206        9.2490        .13899E-03   -1.5131    
  21  Prefactor     .10000E-03    28.367        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     .10000E-03    26.404        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  norm          .10000E-03    .67885        .62802E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  norm          .10000E-03    54.344        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  norm          4.6387        8.6936        .18688E-03   -1.5277    
  26  Prefactor     11.471        7.7475        .11828E-03   -1.5030    
  27  Prefactor     .10000E-03    2.3942        .11784E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  Normalizat    .64224        .27798        .37257E-03   -1.0622    
  29  Prefactor     1.0533        .15856        .17887E-03   -.90973    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.95579e-09
Minuit parameter uncertainties:
  1  49.348
  2  4.94014e-05
  3  1.1777
  4  4.43037
  5  2.36666
  6  1.07939
  7  5.54773e-05
  8  1.34592
  9  5.47165e-05
  10  3.03991
  11  0.000843827
  12  0.000163574
  13  0.000163673
  14  71.3302
  15  8.97045e-05
  16  8.90116
  17  61.9976
  18  86.2642
  19  0.000137435
  20  9.25059
  21  0.000114485
  22  3.1661e-05
  23  3.68287e-06
  24  7.68702e-05
  25  8.69601
  26  7.74819
  27  1.5618e-05
  28  0.278586
  29  0.158635
Done.

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

Extracting fit parameters...

4FGL J1738.2+4000
   Spectrum: PowerLaw
326    Prefactor:  3.988e+01  7.133e+01  1.000e-04  1.000e+04 ( 1.000e-14)
327        Index:  2.517e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
328        Scale:  1.525e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
681    Prefactor:  1.053e+00  1.586e-01  0.000e+00  1.000e+01 ( 1.000e+00)
682        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
683        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
680   Normalization:  6.422e-01  2.786e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.40
Ra Dec: 264.560 40.010
Photon Flux Upper Limit: 1.27e-07 ph cm-2 s-1
Energy Flux Upper Limit: 9.87e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/946971/likelihoodResults_487641601_487900801_4FGL_J1738.2+4000_daily_bin958.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) = 6169.89812645
delta logL = 2.09070599681

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 6169.54089923
delta logL = 2.44793321076

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   6169.541     FROM MIGRAD    STATUS=CONVERGED    197 CALLS      604 TOTAL
                     EDM=   .11E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .11424E-03    .34702E-02    .18626E-03** at limit **
   2  Index         8.3933        1.8015        .98617E-01    .69507E-03
   3  Normalizat    .48373        .58015E-01    .96094E-01    .17103E-03
   4  Prefactor     1.1233        .34497E-01    .36766E-01    .11083E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000114244
  Index      = 8.39334
  Normalizat = 0.483731
  Prefactor  = 1.1233
 **********
 **   18 **HESSE 
 **********

 FCN=   6169.541     FROM HESSE     STATUS=NOT POSDEF    33 CALLS      637 TOTAL
                     EDM=   .40E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .11424E-03    .14282E-01    .95209E-05   -1.5707    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         8.3933        2.6853        .41473E-02    .74595    
   3  Normalizat    .48373        .19141        .42577E-03   -1.1318    
   4  Prefactor     1.1233        .11257        .17373E-03   -.88725    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 4.00203e-09
Minuit parameter uncertainties:
  1  0.000902059
  2  3.01179
  3  0.191674
  4  0.112598
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/946971': 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) = 6169.54086907
delta logL = 2.44796337873

Extracting fit parameters...

4FGL J1738.2+4000
   Spectrum: PowerLaw
326    Prefactor:  1.142e-04  9.021e-04  1.000e-04  1.000e+04 ( 1.000e-14)
327        Index:  8.393e+00  3.012e+00  0.000e+00  1.000e+01 (-1.000e+00)
328        Scale:  1.525e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
681    Prefactor:  1.123e+00  1.126e-01  0.000e+00  1.000e+01 ( 1.000e+00)
682        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
683        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
680   Normalization:  4.837e-01  1.917e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 5.81
Ra Dec: 264.560 40.010
Photon Index (Free Index): 8.39 +/- 3.01
Photon Flux (Free Index): 1.35e-07 +/- 7.14e-08
Energy Flux (Free Index): 1.55e-05 +/- 8.45e-06

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/946971/cmap_HighResolution_487641601_487900801_4FGL_J1738.2+4000_daily_bin958.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='9.87e-03', comment='SUCCESS', energy_flux2='1.55e-05', dlogl='2.45e+00', photon_flux2='1.35e-07', job_status='DONE', time_completed='2021-09-18 01:19:00.050722', photon_index_error2='3.01', photon_index2='8.39', ts='0.40', fit_tolerance='1e-08', GAL='1.05', photon_index_error='0.00', photon_flux_upper_limit='1.27e-07', energy_flux_error2='8.45e-06', EG='0.64', time_epoch_completed='1631953140.05', return_code='0', job_id='946971', GAL2='1.12', EG2='0.48', return_code2='102', photon_flux_error2='7.14e-08', ts2='5.81', photon_index='2.52' WHERE bin_id='958' AND source_name='4FGL J1738.2+4000' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep 18 01:19:00 PDT 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0033>
Subject: Job 946971: <4FGL_J1738.2+4000_daily_bin958> in cluster <slac> Done

Job <4FGL_J1738.2+4000_daily_bin958> was submitted from host <rhel6-64e> by user <kocevski> in cluster <slac> at Sat Sep 18 01:05:25 2021
Job was executed on host(s) <bullet0033>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Sep 18 01:05:27 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Sat Sep 18 01:05:27 2021
Terminated at Sat Sep 18 01:19:00 2021
Results reported at Sat Sep 18 01:19:00 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1738.2+4000_daily_bin958 264.56 40.0099 487641601 487900801 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1738.2+4000 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   677.07 sec.
    Max Memory :                                 1095 MB
    Average Memory :                             270.27 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   814 sec.
    Turnaround time :                            815 sec.

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

