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


Performing analysis on: 4FGL_J1738.2+4000_daily_bin974
RA = 264.56, Dec = 40.0099
tmin = 491788801, tmax = 492048001
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='946994', job_status='RUN', time_executed='2021-09-18 01:08:16.209461', time_epoch_executed='1631952496.21' WHERE source_name='4FGL J1738.2+4000' and cadence='daily' and bin_id='974'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/946994

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/946994/ft1_4FGL_J1738.2+4000_daily_bin974.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/946994/ft2_4FGL_J1738.2+4000_daily_bin974.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/946994/ft1_4FGL_J1738.2+4000_daily_bin974.fits outfile=/scratch/kocevski/946994/ft1_filteredMKT_4FGL_J1738.2+4000_daily_bin974.fits ra=264.56 dec=40.0099 rad=12.0 tmin=491788801.0 tmax=492048001.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.20
user 3.98
sys 0.20

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/946994/ft1_filtered_4FGL_J1738.2+4000_daily_bin974.fits" evtable="EVENTS" scfile=/scratch/kocevski/946994/ft2_4FGL_J1738.2+4000_daily_bin974.fits sctable="SC_DATA" outfile=/scratch/kocevski/946994/ltcube_491788801_492048001_4FGL_J1738.2+4000_daily_bin974.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/946994/ft2_4FGL_J1738.2+4000_daily_bin974.fits
.....................!
real 11.44
user 11.09
sys 0.32

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/946994/ft1_filtered_4FGL_J1738.2+4000_daily_bin974.fits evtable="EVENTS" scfile=/scratch/kocevski/946994/ft2_4FGL_J1738.2+4000_daily_bin974.fits sctable="SC_DATA" expcube=/scratch/kocevski/946994/ltcube_491788801_492048001_4FGL_J1738.2+4000_daily_bin974.fits outfile=/scratch/kocevski/946994/expmap_491788801_492048001_4FGL_J1738.2+4000_daily_bin974.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/946994/ltcube_491788801_492048001_4FGL_J1738.2+4000_daily_bin974.fits
.....................!
real 191.70
user 186.33
sys 5.06

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/946994/ft1_filtered_4FGL_J1738.2+4000_daily_bin974.fits scfile=/scratch/kocevski/946994/ft2_4FGL_J1738.2+4000_daily_bin974.fits outfile=/scratch/kocevski/946994/cmap_491788801_492048001_4FGL_J1738.2+4000_daily_bin974.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.15

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

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .10053E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    7.6954       1.0000         .10000E-03   10000.    
     4 'Prefactor '    10.774       1.0000         .10000E-03   10000.    
     5 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     6 'norm      '    .10013E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10127E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    1.9748       1.0000         .10000E-03   10000.    
     9 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
    10 'norm      '    .57561       1.0000         .10000E-03   10000.    
    11 'Prefactor '    4.8756       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10121E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .10013E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10743E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    547.80       1.0000         .10000E-03   10000.    
    16 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    .10023E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10007E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10007E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10038E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10010E-03   1.0000         .10000E-03   10000.    
    23 'norm      '    16.063       1.0000         .10000E-03   10000.    
    24 'norm      '    .10498E-03   1.0000         .10000E-03   10000.    
    25 'norm      '    .10006E-03   1.0000         .10000E-03   10000.    
    26 'Prefactor '    .10010E-03   1.0000         .10000E-03   10000.    
    27 'Prefactor '    .10013E-03   1.0000         .10000E-03   10000.    
    28 'Normalizat'    .90467       1.0000         .10000E-01   10.000    
    29 'Prefactor '    .68880       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=   848.5319     FROM MIGRAD    STATUS=CONVERGED    733 CALLS     3656 TOTAL
                     EDM=   .79E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .1%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .10000E-03    148.07        .45770E-04** at limit **
   2  Prefactor     .10000E-03    3.3180        .16771E-06** at limit **
   3  Prefactor     7.6954        4.1905        .34839E-07   -.18904E-03
   4  Prefactor     10.773        10.849       -.26698E-06   -.12541E-03
   5  norm          .10000E-03    2.0035       -.40182E-06** at limit **
   6  norm          .10000E-03    1.7797       -.15326E-06** at limit **
   7  Prefactor     .10000E-03    26.527        .12073E-04** at limit **
   8  norm          1.9749        2.1605       -.56565E-07   -.97040E-04
   9  norm          .10000E-03    8.0560        .42914E-06** at limit **
  10  norm          .56964        6.0265       -.26447E-06   -.13767E-03
  11  Prefactor     4.8759        8.0206       -.15004E-06   -.17884E-04
  12  Prefactor     .10000E-03    128.42       -.61317E-05** at limit **
  13  norm          .10000E-03    14.697        .83919E-05** at limit **
  14  Prefactor     .10000E-03    417.36       -.20028E-03** at limit **
  15  Prefactor     547.76        475.33       -.14776E-04    .77742E-06
  16  norm          .10000E-03    6.9791        .29215E-06** at limit **
  17  Prefactor     .10000E-03    55.258        .53004E-05** at limit **
  18  Prefactor     .10000E-03    44.617        .12759E-04** at limit **
  19  Prefactor     .10000E-03    41.200        .13954E-05** at limit **
  20  Prefactor     .10000E-03    33.962       -.22842E-04** at limit **
  21  Prefactor     .10000E-03    41.921        .41001E-05** at limit **
  22  Prefactor     .10000E-03    105.00       -.70021E-04** at limit **
  23  norm          16.063        10.335        .13306E-06    .13609E-04
  24  norm          .10000E-03    180.20        .99234E-04** at limit **
  25  norm          .10000E-03    20.110       -.36722E-05** at limit **
  26  Prefactor     .10000E-03    13.189        .95709E-06** at limit **
  27  Prefactor     .10000E-03    14.307       -.83549E-05** at limit **
  28  Normalizat    .90484        .55153        .12176E-05    .53678E-04
  29  Prefactor     .68881        .33559        .17793E-05    .76544E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 7.69538
  Prefactor  = 10.7729
  norm       = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 1.97491
  norm       = 0.0001
  norm       = 0.569638
  Prefactor  = 4.87586
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 547.764
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 16.0629
  norm       = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Normalizat = 0.904836
  Prefactor  = 0.688814
 **********
 **   18 **HESSE 
 **********

 FCN=   848.5319     FROM HESSE     STATUS=OK           535 CALLS     4191 TOTAL
                     EDM=   .16E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .10000E-03    148.14        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    3.3377        .51398E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     7.6954        4.1636        .41609E-04   -1.5153    
   4  Prefactor     10.773        10.891        .89887E-04   -1.5051    
   5  norm          .10000E-03    2.0046        .40274E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  norm          .10000E-03    1.8291        .75804E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    26.726        .14639E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          1.9749        2.1479        .42648E-04   -1.5427    
   9  norm          .10000E-03    8.0564        .80775E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          .56964        9.8505        .12899E-02   -1.5557    
  11  Prefactor     4.8759        8.0140        .10305E-03   -1.5266    
  12  Prefactor     .10000E-03    128.48        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .10000E-03    14.768        .10909E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10000E-03    417.79        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     547.76        476.00        .87893E-04   -1.0983    
  16  norm          .10000E-03    6.9852        .75178E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     .10000E-03    55.259        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10000E-03    44.619        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10000E-03    41.221        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10000E-03    34.016        .16587E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .10000E-03    41.922        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     .10000E-03    105.00        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  norm          16.063        10.337        .72895E-04   -1.4906    
  24  norm          .10000E-03    180.25        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  norm          .10000E-03    20.169        .12763E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  Prefactor     .10000E-03    13.212        .10335E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  27  Prefactor     .10000E-03    14.362        .10765E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  Normalizat    .90484        .65554        .27932E-03   -.96290    
  29  Prefactor     .68881        .40178        .20308E-03   -1.0397    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.64121e-10
Minuit parameter uncertainties:
  1  5.21593e-05
  2  6.68112e-06
  3  4.16375
  4  10.8926
  5  8.03939e-07
  6  6.78255e-06
  7  8.46286e-05
  8  2.14796
  9  1.7553e-06
  10  4.73809
  11  8.01577
  12  2.09792e-05
  13  5.98319e-06
  14  0.000601902
  15  479.544
  16  2.55036e-06
  17  3.34739e-06
  18  3.0053e-06
  19  6.63764e-05
  20  3.28497e-05
  21  1.18686e-05
  22  1.07221e-05
  23  10.3383
  24  1.79844e-05
  25  5.87416e-06
  26  2.55358e-06
  27  1.24702e-06
  28  0.661448
  29  0.403481
Done.

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

Extracting fit parameters...

4FGL J1738.2+4000
   Spectrum: PowerLaw
326    Prefactor:  1.000e-04  6.019e-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:  6.888e-01  4.035e-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:  9.048e-01  6.614e-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.39e-07 ph cm-2 s-1
Energy Flux Upper Limit: 2.64e-02 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/946994/likelihoodResults_491788801_492048001_4FGL_J1738.2+4000_daily_bin974.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) = 848.531924727
delta logL = -1.12529229455e-05

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 848.531924727
delta logL = -1.12524512588e-05

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .96360E-02   1.0000         .10000E-03   10000.    
     2 'Index     '    2.5168       1.0000          .0000       10.000    
     3 'Normalizat'    .90484       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .68881       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=   848.5319     FROM MIGRAD    STATUS=CONVERGED     61 CALLS      200 TOTAL
                     EDM=   .55E-10    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10038E-03    266.78        .90713E-02** at limit **
   2  Index         2.4821        7.4644        .50000        .63926E-06
   3  Normalizat    .90483        .97569E-02    .44963E-01   -.11674E-03
   4  Prefactor     .68882        .62972E-02    .42252E-01   -.11069E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100382
  Index      = 2.48214
  Normalizat = 0.90483
  Prefactor  = 0.688815
 **********
 **   18 **HESSE 
 **********

 FCN=   848.5319     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      229 TOTAL
                     EDM=   .28E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10038E-03    1325.4        .18143E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.4821        5.1040        .50000       -.52773    
   3  Normalizat    .90483        .22175E-01    .27932E-03   -.96291    
   4  Prefactor     .68882        .14313E-01    .20308E-03   -1.0397    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 2.79348e-10
Minuit parameter uncertainties:
  1  0.0460753
  2  461.623
  3  0.0221755
  4  0.0143129
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/946994': 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) = 848.531913469
delta logL = 4.95288077218e-09

Extracting fit parameters...

4FGL J1738.2+4000
   Spectrum: PowerLaw
326    Prefactor:  1.004e-04  4.608e-02  1.000e-04  1.000e+04 ( 1.000e-14)
327        Index:  2.482e+00  4.616e+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:  6.888e-01  1.431e-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:  9.048e-01  2.218e-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/946994/cmap_HighResolution_491788801_492048001_4FGL_J1738.2+4000_daily_bin974.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='2.64e-02', job_status='DONE', photon_flux_upper_limit='3.39e-07', time_completed='2021-09-18 01:15:23.169613', job_id='946994', GAL2='0.69', fit_tolerance='1e-08', EG2='0.90', EG='0.90', time_epoch_completed='1631952923.17', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.69', dlogl='4.95e-09', ts2='-0.00', photon_index_error='0.00', photon_index='2.52' WHERE bin_id='974' AND source_name='4FGL J1738.2+4000' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep 18 01:15:23 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0125>
Subject: Job 946994: <4FGL_J1738.2+4000_daily_bin974> in cluster <slac> Done

Job <4FGL_J1738.2+4000_daily_bin974> was submitted from host <rhel6-64e> by user <kocevski> in cluster <slac> at Sat Sep 18 01:05:26 2021
Job was executed on host(s) <bullet0125>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Sep 18 01:05:28 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:28 2021
Terminated at Sat Sep 18 01:15:23 2021
Results reported at Sat Sep 18 01:15:23 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1738.2+4000_daily_bin974 264.56 40.0099 491788801 492048001 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 :                                   415.13 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             245.85 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   595 sec.
    Turnaround time :                            597 sec.

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

