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


Performing analysis on: 4FGL_J1738.2+4000_daily_bin506
RA = 264.56, Dec = 40.0099
tmin = 370483201, tmax = 370742401
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='941718', job_status='RUN', time_executed='2021-09-18 00:54:25.507218', time_epoch_executed='1631951665.51' WHERE source_name='4FGL J1738.2+4000' and cadence='daily' and bin_id='506'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/941718

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/941718/ft1_4FGL_J1738.2+4000_daily_bin506.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/941718/ft2_4FGL_J1738.2+4000_daily_bin506.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/941718/ft1_4FGL_J1738.2+4000_daily_bin506.fits outfile=/scratch/kocevski/941718/ft1_filteredMKT_4FGL_J1738.2+4000_daily_bin506.fits ra=264.56 dec=40.0099 rad=12.0 tmin=370483201.0 tmax=370742401.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 19.77
user 19.27
sys 0.45

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/941718/ft2_4FGL_J1738.2+4000_daily_bin506.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/941718/ft1_filteredMKT_4FGL_J1738.2+4000_daily_bin506.fits evtable="EVENTS" outfile="/scratch/kocevski/941718/ft1_filtered_4FGL_J1738.2+4000_daily_bin506.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.50
user 0.33
sys 0.14

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/941718/ft1_filtered_4FGL_J1738.2+4000_daily_bin506.fits" evtable="EVENTS" scfile=/scratch/kocevski/941718/ft2_4FGL_J1738.2+4000_daily_bin506.fits sctable="SC_DATA" outfile=/scratch/kocevski/941718/ltcube_370483201_370742401_4FGL_J1738.2+4000_daily_bin506.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/941718/ft2_4FGL_J1738.2+4000_daily_bin506.fits
.....................!
real 10.40
user 10.01
sys 0.36

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/941718/ft1_filtered_4FGL_J1738.2+4000_daily_bin506.fits evtable="EVENTS" scfile=/scratch/kocevski/941718/ft2_4FGL_J1738.2+4000_daily_bin506.fits sctable="SC_DATA" expcube=/scratch/kocevski/941718/ltcube_370483201_370742401_4FGL_J1738.2+4000_daily_bin506.fits outfile=/scratch/kocevski/941718/expmap_370483201_370742401_4FGL_J1738.2+4000_daily_bin506.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/941718/ltcube_370483201_370742401_4FGL_J1738.2+4000_daily_bin506.fits
.....................!
real 189.50
user 185.29
sys 3.82

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/941718/ft1_filtered_4FGL_J1738.2+4000_daily_bin506.fits scfile=/scratch/kocevski/941718/ft2_4FGL_J1738.2+4000_daily_bin506.fits outfile=/scratch/kocevski/941718/cmap_370483201_370742401_4FGL_J1738.2+4000_daily_bin506.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.53
user 0.37
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/941718/ft1_filtered_4FGL_J1738.2+4000_daily_bin506.fits scfile=/scratch/kocevski/941718/ft2_4FGL_J1738.2+4000_daily_bin506.fits outfile=/scratch/kocevski/941718/cmap_HighResolution_370483201_370742401_4FGL_J1738.2+4000_daily_bin506.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.54
user 0.39
sys 0.14

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

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/941718/ft1_filtered_4FGL_J1738.2+4000_daily_bin506.fits', '/scratch/kocevski/941718/ft2_4FGL_J1738.2+4000_daily_bin506.fits', expMap='/scratch/kocevski/941718/expmap_370483201_370742401_4FGL_J1738.2+4000_daily_bin506.fits', expCube='/scratch/kocevski/941718/ltcube_370483201_370742401_4FGL_J1738.2+4000_daily_bin506.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/941718/Model_4FGL_J1738.2+4000_daily_bin506.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/941718/ft1_filtered_4FGL_J1738.2+4000_daily_bin506.fits
Spacecraft file(s): /scratch/kocevski/941718/ft2_4FGL_J1738.2+4000_daily_bin506.fits
Exposure map: /scratch/kocevski/941718/expmap_370483201_370742401_4FGL_J1738.2+4000_daily_bin506.fits
Exposure cube: /scratch/kocevski/941718/ltcube_370483201_370742401_4FGL_J1738.2+4000_daily_bin506.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/941718/Model_4FGL_J1738.2+4000_daily_bin506.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) = 1890.00632089

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .60485E-01   1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10009E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     5 'norm      '    .10080E-03   1.0000         .10000E-03   10000.    
     6 'norm      '    .59377       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    10 'norm      '    .31473E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10020E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10024E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    .21523E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    .10005E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    173.45       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10014E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10078E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    .21624E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    171.59       1.0000         .10000E-03   10000.    
    23 'norm      '    .10011E-03   1.0000         .10000E-03   10000.    
    24 'norm      '    .10333E-03   1.0000         .10000E-03   10000.    
    25 'norm      '    29.019       1.0000         .10000E-03   10000.    
    26 'Prefactor '    25.672       1.0000         .10000E-03   10000.    
    27 'Prefactor '    6.9756       1.0000         .10000E-03   10000.    
    28 'Normalizat'    1.3413       1.0000         .10000E-01   10.000    
    29 'Prefactor '    .76405       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=   1889.975     FROM MIGRAD    STATUS=CONVERGED    762 CALLS     4949 TOTAL
                     EDM=   .75E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.1%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .10000E-03    43.863       -.45206E-07** at limit **
   2  Prefactor     .71754E-01    3.3261       -.59186E-06    .45659E-03
   3  Prefactor     .10000E-03    4.5269       -.13744E-06** at limit **
   4  Prefactor     .10000E-03    2.2668       -.18813E-07** at limit **
   5  norm          .10000E-03    4.4117       -.84867E-07** at limit **
   6  norm          .59385        1.5502        .28649E-06    .95341E-04
   7  Prefactor     .10000E-03    5.0928       -.15047E-07** at limit **
   8  norm          .10000E-03    .59335       -.24517E-07** at limit **
   9  norm          .10000E-03    13.737       -.64809E-07** at limit **
  10  norm          .10006E-03    4.3562        .17668E-05** at limit **
  11  Prefactor     .10000E-03    6.5066        .11328E-06** at limit **
  12  Prefactor     .10000E-03    69.765        .11368E-06** at limit **
  13  norm          .10000E-03    6.6766       -.21459E-07** at limit **
  14  Prefactor     .10000E-03    116.03       -.28303E-06** at limit **
  15  Prefactor     .10000E-03    349.27        .70410E-06** at limit **
  16  norm          .10000E-03    4.2734        .12773E-06** at limit **
  17  Prefactor     173.49        137.05       -.59844E-06   -.93260E-04
  18  Prefactor     .10000E-03    79.231        .11589E-05** at limit **
  19  Prefactor     .10000E-03    33.799        .91686E-07** at limit **
  20  Prefactor     .10000E-03    14.995        .55651E-07** at limit **
  21  Prefactor     .10001E-03    1255.0        .13173E-04** at limit **
  22  Prefactor     171.74        747.45       -.52127E-04   -.27989E-04
  23  norm          .10000E-03    10.808        .70891E-06** at limit **
  24  norm          .10000E-03    152.27        .26473E-06** at limit **
  25  norm          29.021        22.917        .43490E-07   -.69784E-04
  26  Prefactor     25.674        26.961        .42312E-07   -.19195E-04
  27  Prefactor     6.9613        57.812        .62476E-06   -.12494E-04
  28  Normalizat    1.3411        .46449       -.13806E-05   -.14637E-03
  29  Prefactor     .76417        .26900        .49865E-06   -.20531E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 0.0001
  Prefactor  = 0.0717545
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 0.59385
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 0.0001
  norm       = 0.000100061
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.000100001
  norm       = 0.0001
  Prefactor  = 173.489
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.000100014
  Prefactor  = 171.74
  norm       = 0.0001
  norm       = 0.0001
  norm       = 29.0212
  Prefactor  = 25.6742
  Prefactor  = 6.96129
  Normalizat = 1.34113
  Prefactor  = 0.764173
 **********
 **   18 **HESSE 
 **********

 FCN=   1889.975     FROM HESSE     STATUS=OK           539 CALLS     5488 TOTAL
                     EDM=   .10E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .10000E-03    43.862        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .71754E-01    65.280        .14276E-02   -1.5654    
   3  Prefactor     .10000E-03    4.6220        .17838E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    2.2684        .63920E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          .10000E-03    9.2460        .17505E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  norm          .59385        1.4811        .83642E-03   -1.5554    
   7  Prefactor     .10000E-03    5.0981        .95816E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .10000E-03    .59787        .32690E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          .10000E-03    13.773        .15739E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          .10006E-03    14.743        .14824E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    6.7552        .21646E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    69.750        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .10000E-03    6.6799        .10972E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10000E-03    115.98        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .10000E-03    349.04        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          .10000E-03    4.2799        .87766E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     173.49        136.90        .15320E-03   -1.3066    
  18  Prefactor     .10000E-03    79.246        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10000E-03    33.806        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10000E-03    15.003        .16444E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .10001E-03    1264.4        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     171.74        762.41        .15401E-03   -1.3079    
  23  norm          .10000E-03    11.021        .14000E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  norm          .10000E-03    152.24        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  norm          29.021        22.958        .74373E-04   -1.4630    
  26  Prefactor     25.674        26.937        .79063E-04   -1.4694    
  27  Prefactor     6.9613        57.679        .15190E-03   -1.5180    
  28  Normalizat    1.3411        .57348        .30416E-03   -.82347    
  29  Prefactor     .76417        .33022        .23373E-03   -1.0106    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.04835e-08
Minuit parameter uncertainties:
  1  1.84636e-05
  2  4.3303
  3  2.26911e-05
  4  6.12294e-07
  5  0.000116936
  6  1.48119
  7  2.87445e-06
  8  7.7063e-07
  9  3.20347e-06
  10  0.00189354
  11  4.61165e-06
  12  0.000116001
  13  2.07416e-08
  14  0.000269218
  15  0.00113836
  16  3.81118e-06
  17  137.151
  18  9.05239e-05
  19  3.22895e-05
  20  2.56601e-07
  21  0.00870198
  22  740.074
  23  9.95086e-05
  24  0.00031086
  25  22.9647
  26  26.9498
  27  40.1282
  28  0.576241
  29  0.331074
Done.

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

Extracting fit parameters...

4FGL J1738.2+4000
   Spectrum: PowerLaw
326    Prefactor:  1.000e-04  2.692e-04  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:  7.642e-01  3.311e-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:  1.341e+00  5.762e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 264.560 40.010
Photon Flux Upper Limit: 3.10e-07 ph cm-2 s-1
Energy Flux Upper Limit: 2.41e-02 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/941718/likelihoodResults_370483201_370742401_4FGL_J1738.2+4000_daily_bin506.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) = 1889.97468676
delta logL = -4.0772614966e-05

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 1889.97464645
delta logL = -4.62606294604e-07

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10523E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    3.2669       1.0000          .0000       10.000    
     3 'Normalizat'    1.3411       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .76419       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.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   1889.975     FROM MIGRAD    STATUS=CONVERGED     93 CALLS      277 TOTAL
                     EDM=   .25E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10714E-03    9.5890        .18142E-01** at limit **
   2  Index         3.0886        5.5553        .50000        .34638E-05
   3  Normalizat    1.3411        .39977E-02    .30416E-03   -.13800E-03
   4  Prefactor     .76417        .24053E-02    .23374E-03   -.37455E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000107137
  Index      = 3.08857
  Normalizat = 1.34114
  Prefactor  = 0.764166
 **********
 **   18 **HESSE 
 **********

 FCN=   1889.975     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      306 TOTAL
                     EDM=   .80E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10714E-03    309.12        .35705E-02   -1.5707    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         3.0886        5.4977        .50000       -.39227    
   3  Normalizat    1.3411        .22869E-01    .60832E-04   -.82346    
   4  Prefactor     .76417        .13760E-01    .46747E-04   -1.0106    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 8.01805e-09
Minuit parameter uncertainties:
  1  0.0944285
  2  998.861
  3  0.0228691
  4  0.0137597
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/941718': 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) = 1889.97464631
delta logL = -3.25523387801e-07

Extracting fit parameters...

4FGL J1738.2+4000
   Spectrum: PowerLaw
326    Prefactor:  1.071e-04  9.443e-02  1.000e-04  1.000e+04 ( 1.000e-14)
327        Index:  3.089e+00  9.989e+02  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:  7.642e-01  1.376e-02  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:  1.341e+00  2.287e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 264.560 40.010

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/941718/cmap_HighResolution_370483201_370742401_4FGL_J1738.2+4000_daily_bin506.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='2.41e-02', job_status='DONE', photon_flux_upper_limit='3.10e-07', time_completed='2021-09-18 01:04:35.699013', job_id='941718', GAL2='0.76', fit_tolerance='1e-08', EG2='1.34', EG='1.34', time_epoch_completed='1631952275.7', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.76', dlogl='-3.26e-07', ts2='-0.00', photon_index_error='0.00', photon_index='2.52' WHERE bin_id='506' AND source_name='4FGL J1738.2+4000' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep 18 01:04:35 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0252>
Subject: Job 941718: <4FGL_J1738.2+4000_daily_bin506> in cluster <slac> Done

Job <4FGL_J1738.2+4000_daily_bin506> was submitted from host <rhel6-64f> by user <kocevski> in cluster <slac> at Sat Sep 18 00:50:34 2021
Job was executed on host(s) <bullet0252>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Sep 18 00:50:36 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Sat Sep 18 00:50:36 2021
Terminated at Sat Sep 18 01:04:36 2021
Results reported at Sat Sep 18 01:04:36 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1738.2+4000_daily_bin506 264.56 40.0099 370483201 370742401 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 :                                   602.00 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             275.23 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              7
    Max Threads :                                21
    Run time :                                   839 sec.
    Turnaround time :                            842 sec.

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

