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


Performing analysis on: 4FGL_J1738.2+4000_daily_bin593
RA = 264.56, Dec = 40.0099
tmin = 393033601, tmax = 393292801
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='943769', job_status='RUN', time_executed='2021-09-18 00:55:39.863670', time_epoch_executed='1631951739.86' WHERE source_name='4FGL J1738.2+4000' and cadence='daily' and bin_id='593'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/943769

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/943769/ft1_4FGL_J1738.2+4000_daily_bin593.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/943769/ft2_4FGL_J1738.2+4000_daily_bin593.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/943769/ft1_4FGL_J1738.2+4000_daily_bin593.fits outfile=/scratch/kocevski/943769/ft1_filteredMKT_4FGL_J1738.2+4000_daily_bin593.fits ra=264.56 dec=40.0099 rad=12.0 tmin=393033601.0 tmax=393292801.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 2.63
user 2.43
sys 0.18

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/943769/ft1_filtered_4FGL_J1738.2+4000_daily_bin593.fits evtable="EVENTS" scfile=/scratch/kocevski/943769/ft2_4FGL_J1738.2+4000_daily_bin593.fits sctable="SC_DATA" expcube=/scratch/kocevski/943769/ltcube_393033601_393292801_4FGL_J1738.2+4000_daily_bin593.fits outfile=/scratch/kocevski/943769/expmap_393033601_393292801_4FGL_J1738.2+4000_daily_bin593.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/943769/ltcube_393033601_393292801_4FGL_J1738.2+4000_daily_bin593.fits
.....................!
real 140.79
user 136.81
sys 3.75

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/943769/ft1_filtered_4FGL_J1738.2+4000_daily_bin593.fits scfile=/scratch/kocevski/943769/ft2_4FGL_J1738.2+4000_daily_bin593.fits outfile=/scratch/kocevski/943769/cmap_393033601_393292801_4FGL_J1738.2+4000_daily_bin593.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.28
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/943769/ft1_filtered_4FGL_J1738.2+4000_daily_bin593.fits scfile=/scratch/kocevski/943769/ft2_4FGL_J1738.2+4000_daily_bin593.fits outfile=/scratch/kocevski/943769/cmap_HighResolution_393033601_393292801_4FGL_J1738.2+4000_daily_bin593.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.29
sys 0.14

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    11.122       1.0000         .10000E-03   10000.    
     2 'Prefactor '    4.5507       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10201E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     5 'norm      '    4.1583       1.0000         .10000E-03   10000.    
     6 'norm      '    .10344E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    9.0144       1.0000         .10000E-03   10000.    
     8 'norm      '    .89290       1.0000         .10000E-03   10000.    
     9 'norm      '    9.7571       1.0000         .10000E-03   10000.    
    10 'norm      '    .61264       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .23506E-02   1.0000         .10000E-03   10000.    
    14 'Prefactor '    84.748       1.0000         .10000E-03   10000.    
    15 'Prefactor '    56.282       1.0000         .10000E-03   10000.    
    16 'norm      '    10.851       1.0000         .10000E-03   10000.    
    17 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    29.781       1.0000         .10000E-03   10000.    
    20 'Prefactor '    18.405       1.0000         .10000E-03   10000.    
    21 'Prefactor '    12.646       1.0000         .10000E-03   10000.    
    22 'Prefactor '    .25199E-03   1.0000         .10000E-03   10000.    
    23 'norm      '    .10007E-03   1.0000         .10000E-03   10000.    
    24 'norm      '    13.850       1.0000         .10000E-03   10000.    
    25 'norm      '    1.7932       1.0000         .10000E-03   10000.    
    26 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    27 'Prefactor '    4.7547       1.0000         .10000E-03   10000.    
    28 'Normalizat'    1.1011       1.0000         .10000E-01   10.000    
    29 'Prefactor '    .83919       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=   7772.374     FROM MIGRAD    STATUS=CONVERGED    760 CALLS     3759 TOTAL
                     EDM=   .46E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  4.8%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          11.121        23.263       -.14285E-06   -.73691E-05
   2  Prefactor     4.5517        1.8034       -.40582E-06   -.59729E-03
   3  Prefactor     .10000E-03    .78315        .73101E-06** at limit **
   4  Prefactor     .10000E-03    1.0505        .33992E-08** at limit **
   5  norm          4.1584        2.3133       -.90212E-07   -.14834E-03
   6  norm          .10000E-03    .59285       -.15605E-06** at limit **
   7  Prefactor     9.0170        8.6407        .18392E-06    .36303E-03
   8  norm          .89314        .70388        .15331E-07   -.29004E-03
   9  norm          9.7513        9.1562        .38523E-06   -.58384E-04
  10  norm          .61288        1.3914        .95126E-07   -.37299E-03
  11  Prefactor     .10000E-03    1.2344       -.20565E-07** at limit **
  12  Prefactor     .10000E-03    14.856       -.55255E-07** at limit **
  13  norm          .10000E-03    50.285       -.66300E-05** at limit **
  14  Prefactor     84.572        71.121       -.69262E-07    .62336E-05
  15  Prefactor     56.254        105.14       -.74863E-06    .76277E-05
  16  norm          10.852        6.2506        .87575E-07    .29142E-04
  17  Prefactor     .10000E-03    20.793       -.13323E-06** at limit **
  18  Prefactor     .10000E-03    25.982       -.78885E-08** at limit **
  19  Prefactor     29.781        20.782        .24574E-06   -.20147E-05
  20  Prefactor     18.407        12.961        .90178E-07    .12817E-04
  21  Prefactor     12.592        27.075        .51306E-06   -.35152E-04
  22  Prefactor     .10001E-03    63.351       -.59014E-06** at limit **
  23  norm          .10000E-03    .42532       -.17825E-07** at limit **
  24  norm          13.827        41.453       -.49687E-06    .34035E-06
  25  norm          1.7943        6.4958        .40478E-08   -.14934E-03
  26  Prefactor     .10000E-03    1.3494       -.22274E-07** at limit **
  27  Prefactor     4.7539        4.4785       -.11035E-06   -.36467E-04
  28  Normalizat    1.1004        .27861       -.50998E-05    .28502E-03
  29  Prefactor     .83952        .15773        .33312E-05    .30593E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 11.1215
  Prefactor  = 4.55168
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 4.15843
  norm       = 0.0001
  Prefactor  = 9.01704
  norm       = 0.893142
  norm       = 9.75126
  norm       = 0.612883
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.000100001
  Prefactor  = 84.5719
  Prefactor  = 56.2541
  norm       = 10.8522
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 29.7811
  Prefactor  = 18.4065
  Prefactor  = 12.5925
  Prefactor  = 0.000100007
  norm       = 0.0001
  norm       = 13.8266
  norm       = 1.79427
  Prefactor  = 0.0001
  Prefactor  = 4.75388
  Normalizat = 1.10043
  Prefactor  = 0.839521
 **********
 **   18 **HESSE 
 **********

 FCN=   7772.374     FROM HESSE     STATUS=OK           571 CALLS     4330 TOTAL
                     EDM=   .79E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          11.121        23.258        .12013E-03   -1.5041    
   2  Prefactor     4.5517        1.8890        .72855E-04   -1.5281    
   3  Prefactor     .10000E-03    1.2304        .14953E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    1.0595        .88216E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          4.1584        2.3113        .95015E-04   -1.5300    
   6  norm          .10000E-03    1.0769        .12742E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     9.0170        8.4978        .13349E-03   -1.5107    
   8  norm          .89314        .67732        .61582E-03   -1.5519    
   9  norm          9.7513        9.1679        .12829E-03   -1.5083    
  10  norm          .61288        1.3434        .14706E-03   -1.5551    
  11  Prefactor     .10000E-03    1.2405        .95657E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    14.862        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .10000E-03    4.9361        .54265E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     84.572        77.067        .21818E-03   -1.3866    
  15  Prefactor     56.254        105.22        .53471E-04   -1.4207    
  16  norm          10.852        6.2496        .12163E-03   -1.5049    
  17  Prefactor     .10000E-03    20.806        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10000E-03    26.011        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     29.781        20.740        .73418E-04   -1.4616    
  20  Prefactor     18.407        12.917        .93359E-04   -1.4850    
  21  Prefactor     12.592        26.971        .11264E-03   -1.4998    
  22  Prefactor     .10001E-03    63.542        .21462E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  norm          .10000E-03    .42612        .56157E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  norm          13.827        41.416        .10763E-03   -1.4964    
  25  norm          1.7943        6.4569        .31231E-03   -1.5440    
  26  Prefactor     .10000E-03    1.3524        .10003E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  27  Prefactor     4.7539        4.4774        .17482E-03   -1.5272    
  28  Normalizat    1.1004        .27728        .31274E-03   -.89738    
  29  Prefactor     .83952        .15871        .21309E-03   -.98288    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 7.92852e-10
Minuit parameter uncertainties:
  1  23.2765
  2  1.88898
  3  2.71623e-05
  4  2.45464e-06
  5  2.31131
  6  1.80594e-05
  7  8.49895
  8  0.677329
  9  9.16923
  10  1.34349
  11  5.99328e-06
  12  3.03025e-05
  13  0.000109968
  14  77.1584
  15  105.57
  16  6.24999
  17  4.38547e-05
  18  0.000119537
  19  20.7455
  20  12.9191
  21  26.9975
  22  0.00137251
  23  3.29417e-06
  24  41.5025
  25  6.45938
  26  6.83355e-06
  27  4.47773
  28  0.277643
  29  0.158797
Done.

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

Extracting fit parameters...

4FGL J1738.2+4000
   Spectrum: PowerLaw
326    Prefactor:  8.457e+01  7.716e+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:  8.395e-01  1.588e-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.100e+00  2.776e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 2.19
Ra Dec: 264.560 40.010
Photon Index (Fixed Index): 2.52 +/- 0.00
Photon Flux (Fixed Index): 5.31e-08 +/- 4.84e-08
Energy Flux (Fixed Index): 1.51e-05 +/- 1.38e-05

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

Saving results to:
/scratch/kocevski/943769/likelihoodResults_393033601_393292801_4FGL_J1738.2+4000_daily_bin593.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) = 7772.18026488
delta logL = 0.193550752555

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 7772.17317884
delta logL = 0.20063678984

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    44.212       1.0000         .10000E-03   10000.    
     2 'Index     '    2.9512       1.0000          .0000       10.000    
     3 'Normalizat'    1.0777       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .84907       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=   7772.173     FROM MIGRAD    STATUS=CONVERGED     87 CALLS      300 TOTAL
                     EDM=   .19E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     44.228        95.675        .60295E-04    .11381E-03
   2  Index         2.9506        1.0139        .53377E-02    .12211E-03
   3  Normalizat    1.0777        .25734        .31557E-03   -.72592E-04
   4  Prefactor     .84896        .15408        .21201E-03   -.16628E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 44.2277
  Index      = 2.95061
  Normalizat = 1.07771
  Prefactor  = 0.848963
 **********
 **   18 **HESSE 
 **********

 FCN=   7772.173     FROM HESSE     STATUS=OK            25 CALLS      325 TOTAL
                     EDM=   .74E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     44.228        69.255        .12059E-04   -1.4377    
   2  Index         2.9506        .73492        .21351E-03   -.42232    
   3  Normalizat    1.0777        .25693        .12623E-04   -.90471    
   4  Prefactor     .84896        .15378        .84805E-05   -.97948    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 7.3866e-11
Minuit parameter uncertainties:
  1  69.381
  2  0.738137
  3  0.257224
  4  0.153859
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/943769': No such file or directory
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 7772.17317689
delta logL = 0.200638744173

Extracting fit parameters...

4FGL J1738.2+4000
   Spectrum: PowerLaw
326    Prefactor:  4.423e+01  6.938e+01  1.000e-04  1.000e+04 ( 1.000e-14)
327        Index:  2.951e+00  7.381e-01  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:  8.490e-01  1.539e-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.078e+00  2.572e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 2.64
Ra Dec: 264.560 40.010
Photon Index (Free Index): 2.95 +/- 0.74
Photon Flux (Free Index): 7.04e-08 +/- 5.57e-08
Energy Flux (Free Index): 1.44e-05 +/- 1.10e-05

Creating a high resolution counts map...
INFO: Auto-setting vmin to -1.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  1.110e+00 [aplpy.core]
Saving /scratch/kocevski/943769/cmap_HighResolution_393033601_393292801_4FGL_J1738.2+4000_daily_bin593.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.13e-02', comment='SUCCESS', photon_flux='5.31e-08', energy_flux2='1.44e-05', photon_flux_error='4.84e-08', dlogl='2.01e-01', energy_flux='1.51e-05', photon_flux2='7.04e-08', job_status='DONE', time_completed='2021-09-18 01:08:43.638792', photon_index_error2='0.74', photon_index2='2.95', ts='2.19', fit_tolerance='1e-08', GAL='0.84', photon_index_error='0.00', photon_flux_upper_limit='1.45e-07', energy_flux_error2='1.10e-05', EG='1.10', time_epoch_completed='1631952523.64', return_code='0', job_id='943769', GAL2='0.85', EG2='1.08', return_code2='0', energy_flux_error='1.38e-05', photon_flux_error2='5.57e-08', ts2='2.64', photon_index='2.52' WHERE bin_id='593' AND source_name='4FGL J1738.2+4000' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep 18 01:08:43 PDT 2021


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

Job <4FGL_J1738.2+4000_daily_bin593> was submitted from host <rhel6-64p> by user <kocevski> in cluster <slac> at Sat Sep 18 00:55:25 2021
Job was executed on host(s) <bullet0033>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Sep 18 00:55: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 00:55:27 2021
Terminated at Sat Sep 18 01:08:44 2021
Results reported at Sat Sep 18 01:08:44 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1738.2+4000_daily_bin593 264.56 40.0099 393033601 393292801 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 :                                   783.24 sec.
    Max Memory :                                 1095 MB
    Average Memory :                             354.23 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   796 sec.
    Turnaround time :                            799 sec.

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

