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


Performing analysis on: 4FGL_J1738.2+4000_daily_bin293
RA = 264.56, Dec = 40.0099
tmin = 315273601, tmax = 315532801
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='941407', job_status='RUN', time_executed='2021-09-18 00:50:22.266271', time_epoch_executed='1631951422.27' WHERE source_name='4FGL J1738.2+4000' and cadence='daily' and bin_id='293'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/941407

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/941407/ft1_4FGL_J1738.2+4000_daily_bin293.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/941407/ft2_4FGL_J1738.2+4000_daily_bin293.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/941407/ft1_4FGL_J1738.2+4000_daily_bin293.fits outfile=/scratch/kocevski/941407/ft1_filteredMKT_4FGL_J1738.2+4000_daily_bin293.fits ra=264.56 dec=40.0099 rad=12.0 tmin=315273601.0 tmax=315532801.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.66
user 3.42
sys 0.22

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/941407/ft2_4FGL_J1738.2+4000_daily_bin293.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/941407/ft1_filteredMKT_4FGL_J1738.2+4000_daily_bin293.fits evtable="EVENTS" outfile="/scratch/kocevski/941407/ft1_filtered_4FGL_J1738.2+4000_daily_bin293.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.49
user 0.31
sys 0.16

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/941407/ft1_filtered_4FGL_J1738.2+4000_daily_bin293.fits" evtable="EVENTS" scfile=/scratch/kocevski/941407/ft2_4FGL_J1738.2+4000_daily_bin293.fits sctable="SC_DATA" outfile=/scratch/kocevski/941407/ltcube_315273601_315532801_4FGL_J1738.2+4000_daily_bin293.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/941407/ft2_4FGL_J1738.2+4000_daily_bin293.fits
.....................!
real 11.82
user 11.43
sys 0.34

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/941407/ft1_filtered_4FGL_J1738.2+4000_daily_bin293.fits evtable="EVENTS" scfile=/scratch/kocevski/941407/ft2_4FGL_J1738.2+4000_daily_bin293.fits sctable="SC_DATA" expcube=/scratch/kocevski/941407/ltcube_315273601_315532801_4FGL_J1738.2+4000_daily_bin293.fits outfile=/scratch/kocevski/941407/expmap_315273601_315532801_4FGL_J1738.2+4000_daily_bin293.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/941407/ltcube_315273601_315532801_4FGL_J1738.2+4000_daily_bin293.fits
.....................!
real 192.26
user 186.29
sys 5.48

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/941407/ft1_filtered_4FGL_J1738.2+4000_daily_bin293.fits scfile=/scratch/kocevski/941407/ft2_4FGL_J1738.2+4000_daily_bin293.fits outfile=/scratch/kocevski/941407/cmap_315273601_315532801_4FGL_J1738.2+4000_daily_bin293.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.54
user 0.37
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/941407/ft1_filtered_4FGL_J1738.2+4000_daily_bin293.fits scfile=/scratch/kocevski/941407/ft2_4FGL_J1738.2+4000_daily_bin293.fits outfile=/scratch/kocevski/941407/cmap_HighResolution_315273601_315532801_4FGL_J1738.2+4000_daily_bin293.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.38
sys 0.16

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .10375E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10013E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    1.4017       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10025E-03   1.0000         .10000E-03   10000.    
     5 'norm      '    .10026E-03   1.0000         .10000E-03   10000.    
     6 'norm      '    2.1749       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10015E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    4.4922       1.0000         .10000E-03   10000.    
     9 'norm      '    .10020E-03   1.0000         .10000E-03   10000.    
    10 'norm      '    1.2329       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10126E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    1.4650       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10189E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    81.503       1.0000         .10000E-03   10000.    
    16 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    .10007E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10131E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10467E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    2.6208       1.0000         .10000E-03   10000.    
    21 'Prefactor '    .83760E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    93.871       1.0000         .10000E-03   10000.    
    23 'norm      '    2.8731       1.0000         .10000E-03   10000.    
    24 'norm      '    .24914E-02   1.0000         .10000E-03   10000.    
    25 'norm      '    11.683       1.0000         .10000E-03   10000.    
    26 'Prefactor '    6.3920       1.0000         .10000E-03   10000.    
    27 'Prefactor '    .16764E-03   1.0000         .10000E-03   10000.    
    28 'Normalizat'    1.2396       1.0000         .10000E-01   10.000    
    29 'Prefactor '    .73948       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=   5965.448     FROM MIGRAD    STATUS=CONVERGED   1307 CALLS     4331 TOTAL
                     EDM=   .41E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .10000E-03    156.67        .18142E-02** at limit **
   2  Prefactor     .10000E-03    1.0453        .11829E-02** at limit **
   3  Prefactor     1.4008        1.1826        .74522E-04    .27777E-02
   4  Prefactor     .10000E-03    2.4821        .11770E-02** at limit **
   5  norm          .10000E-03    1.6220        .15231E-02** at limit **
   6  norm          2.1744        1.4272        .71592E-04   -.82258E-04
   7  Prefactor     .10000E-03    4.1760        .15374E-02** at limit **
   8  norm          4.4916        1.3994        .48493E-04    .27195E-04
   9  norm          .10000E-03    10.382        .18142E-02** at limit **
  10  norm          1.2328        1.5120        .10230E-03   -.11336E-03
  11  Prefactor     .10000E-03    1.0677        .77916E-03** at limit **
  12  Prefactor     .10000E-03    22.652        .18142E-02** at limit **
  13  norm          1.4636        4.5803        .28314E-03   -.37382E-04
  14  Prefactor     .10000E-03    27.588        .18142E-02** at limit **
  15  Prefactor     81.529        109.97        .44490E-04    .53611E-04
  16  norm          .10003E-03    11.326        .28856E-02** at limit **
  17  Prefactor     .10000E-03    20.937        .18142E-02** at limit **
  18  Prefactor     .10000E-03    18.728        .18142E-02** at limit **
  19  Prefactor     .10000E-03    6.9078        .18142E-02** at limit **
  20  Prefactor     2.6220        15.000        .25193E-03   -.21931E-04
  21  Prefactor     .10002E-03    134.76        .20874E-02** at limit **
  22  Prefactor     93.765        93.022        .20741E-03   -.14962E-03
  23  norm          2.8725        1.8703        .82503E-04    .17748E-03
  24  norm          .10002E-03    45.065        .17335    ** at limit **
  25  norm          11.683        10.034        .11720E-03   -.51701E-04
  26  Prefactor     6.3899        8.7720        .79377E-03   -.58321E-04
  27  Prefactor     .10001E-03    20.493        .31739E-02** at limit **
  28  Normalizat    1.2397        .28455        .29155E-03    .18874E-03
  29  Prefactor     .73928        .16279        .21556E-03    .16508E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 0.000100001
  Prefactor  = 0.0001
  Prefactor  = 1.40082
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 2.17443
  Prefactor  = 0.0001
  norm       = 4.49163
  norm       = 0.0001
  norm       = 1.23285
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 1.46357
  Prefactor  = 0.0001
  Prefactor  = 81.5295
  norm       = 0.000100026
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 2.622
  Prefactor  = 0.000100015
  Prefactor  = 93.7649
  norm       = 2.87248
  norm       = 0.000100016
  norm       = 11.6829
  Prefactor  = 6.38991
  Prefactor  = 0.000100007
  Normalizat = 1.23974
  Prefactor  = 0.739284
 **********
 **   18 **HESSE 
 **********

 FCN=   5965.448     FROM HESSE     STATUS=OK           535 CALLS     4866 TOTAL
                     EDM=   .41E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .10000E-03    156.72        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    1.0454        .23659E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     1.4008        1.1820        .29809E-05   -1.5471    
   4  Prefactor     .10000E-03    2.4828        .23539E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          .10000E-03    1.6246        .30463E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  norm          2.1744        1.4272        .28637E-05   -1.5413    
   7  Prefactor     .10000E-03    4.1765        .30748E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          4.4916        1.3994        .19397E-05   -1.5284    
   9  norm          .10000E-03    10.387        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          1.2328        1.5119        .40918E-05   -1.5486    
  11  Prefactor     .10000E-03    1.0677        .15583E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    22.653        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          1.4636        4.5797        .11325E-04   -1.5466    
  14  Prefactor     .10000E-03    27.588        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     81.529        109.97        .88979E-05   -1.3900    
  16  norm          .10003E-03    11.443        .57711E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     .10000E-03    20.938        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10000E-03    18.728        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10000E-03    6.9081        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     2.6220        14.993        .10077E-04   -1.5384    
  21  Prefactor     .10002E-03    134.81        .41749E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     93.765        93.012        .41481E-04   -1.3768    
  23  norm          2.8725        1.8702        .33001E-05   -1.5369    
  24  norm          .10002E-03    45.056        .17337       -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  norm          11.683        10.033        .46881E-05   -1.5024    
  26  Prefactor     6.3899        8.7679        .31751E-04   -1.5202    
  27  Prefactor     .10001E-03    20.821        .63478E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  Normalizat    1.2397        .28480        .58311E-04   -.85383    
  29  Prefactor     .73928        .16292        .86224E-05   -1.0201    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.0943e-09
Minuit parameter uncertainties:
  1  0.000672102
  2  3.24763e-05
  3  1.18197
  4  5.07654e-06
  5  1.59871e-05
  6  1.42718
  7  1.40744e-07
  8  1.39939
  9  8.70271e-06
  10  1.51194
  11  4.7749e-07
  12  0.000198459
  13  4.58083
  14  8.53288e-05
  15  110.251
  16  0.00108168
  17  6.02872e-05
  18  0.000188256
  19  8.28983e-06
  20  12.5444
  21  0.00289344
  22  93.157
  23  1.87027
  24  0.00168345
  25  10.0347
  26  8.76962
  27  0.000769552
  28  0.285159
  29  0.163021
Done.

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

Extracting fit parameters...

4FGL J1738.2+4000
   Spectrum: PowerLaw
326    Prefactor:  1.000e-04  8.533e-05  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.393e-01  1.630e-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.240e+00  2.852e-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: 8.35e-08 ph cm-2 s-1
Energy Flux Upper Limit: 6.50e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/941407/likelihoodResults_315273601_315532801_4FGL_J1738.2+4000_daily_bin293.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) = 5965.44818313
delta logL = -0.000172619662408

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 5965.44801164
delta logL = -1.13198530016e-06

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10028E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.9323       1.0000          .0000       10.000    
     3 'Normalizat'    1.2397       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .73929       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=   5965.448     FROM MIGRAD    STATUS=CONVERGED     95 CALLS      279 TOTAL
                     EDM=   .21E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10467E-03    5.3861        .18142E-01** at limit **
   2  Index         2.8271        7.8461        .50000        .15094E-04
   3  Normalizat    1.2397        .29807E-02    .29155E-03    .15597E-06
   4  Prefactor     .73928        .17578E-02    .21556E-03   -.86495E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000104671
  Index      = 2.82713
  Normalizat = 1.23974
  Prefactor  = 0.739284
 **********
 **   18 **HESSE 
 **********

 FCN=   5965.448     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      308 TOTAL
                     EDM=   .31E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10467E-03    80.962        .33262E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.8271        6.9564        .50000       -.44957    
   3  Normalizat    1.2397        .11602E-01    .11662E-04   -.85383    
   4  Prefactor     .73928        .68420E-02    .86223E-05   -1.0201    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 3.11629e-09
Minuit parameter uncertainties:
  1  0.0389477
  2  307.612
  3  0.0116019
  4  0.00684198
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/941407': 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) = 5965.44801138
delta logL = -8.7353237177e-07

Extracting fit parameters...

4FGL J1738.2+4000
   Spectrum: PowerLaw
326    Prefactor:  1.047e-04  3.895e-02  1.000e-04  1.000e+04 ( 1.000e-14)
327        Index:  2.827e+00  3.076e+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.393e-01  6.842e-03  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.240e+00  1.160e-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/941407/cmap_HighResolution_315273601_315532801_4FGL_J1738.2+4000_daily_bin293.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='6.50e-03', job_status='DONE', photon_flux_upper_limit='8.35e-08', time_completed='2021-09-18 01:05:46.198356', job_id='941407', GAL2='0.74', fit_tolerance='1e-08', EG2='1.24', EG='1.24', time_epoch_completed='1631952346.2', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.74', dlogl='-8.74e-07', ts2='-0.00', photon_index_error='0.00', photon_index='2.52' WHERE bin_id='293' AND source_name='4FGL J1738.2+4000' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep 18 01:05:46 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0036>
Subject: Job 941407: <4FGL_J1738.2+4000_daily_bin293> in cluster <slac> Done

Job <4FGL_J1738.2+4000_daily_bin293> was submitted from host <rhel6-64f> by user <kocevski> in cluster <slac> at Sat Sep 18 00:50:12 2021
Job was executed on host(s) <bullet0036>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Sep 18 00:50:14 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:14 2021
Terminated at Sat Sep 18 01:05:47 2021
Results reported at Sat Sep 18 01:05:47 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1738.2+4000_daily_bin293 264.56 40.0099 315273601 315532801 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 :                                   920.09 sec.
    Max Memory :                                 1258 MB
    Average Memory :                             338.47 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   932 sec.
    Turnaround time :                            935 sec.

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

