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


Performing analysis on: 4FGL_J1738.2+4000_daily_bin1171
RA = 264.56, Dec = 40.0099
tmin = 542851201, tmax = 543110401
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='948517', job_status='RUN', time_executed='2021-09-18 01:10:55.488449', time_epoch_executed='1631952655.49' WHERE source_name='4FGL J1738.2+4000' and cadence='daily' and bin_id='1171'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/948517

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

Retrieving the FT1 file...

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

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

Retrieving 4 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/948517/ft1_4FGL_J1738.2+4000_daily_bin1171.fits


Retrieving the FT1 file...

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

Retrieving 4 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/948517/ft2_4FGL_J1738.2+4000_daily_bin1171.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/948517/ft1_4FGL_J1738.2+4000_daily_bin1171.fits outfile=/scratch/kocevski/948517/ft1_filteredMKT_4FGL_J1738.2+4000_daily_bin1171.fits ra=264.56 dec=40.0099 rad=12.0 tmin=542851201.0 tmax=543110401.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 0.80
user 0.59
sys 0.16

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/948517/ft1_filtered_4FGL_J1738.2+4000_daily_bin1171.fits" evtable="EVENTS" scfile=/scratch/kocevski/948517/ft2_4FGL_J1738.2+4000_daily_bin1171.fits sctable="SC_DATA" outfile=/scratch/kocevski/948517/ltcube_542851201_543110401_4FGL_J1738.2+4000_daily_bin1171.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/948517/ft2_4FGL_J1738.2+4000_daily_bin1171.fits
.....................!
real 1.88
user 1.52
sys 0.33

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/948517/ft1_filtered_4FGL_J1738.2+4000_daily_bin1171.fits evtable="EVENTS" scfile=/scratch/kocevski/948517/ft2_4FGL_J1738.2+4000_daily_bin1171.fits sctable="SC_DATA" expcube=/scratch/kocevski/948517/ltcube_542851201_543110401_4FGL_J1738.2+4000_daily_bin1171.fits outfile=/scratch/kocevski/948517/expmap_542851201_543110401_4FGL_J1738.2+4000_daily_bin1171.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/948517/ltcube_542851201_543110401_4FGL_J1738.2+4000_daily_bin1171.fits
.....................!
real 190.45
user 185.12
sys 4.88

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/948517/ft1_filtered_4FGL_J1738.2+4000_daily_bin1171.fits scfile=/scratch/kocevski/948517/ft2_4FGL_J1738.2+4000_daily_bin1171.fits outfile=/scratch/kocevski/948517/cmap_542851201_543110401_4FGL_J1738.2+4000_daily_bin1171.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.51
user 0.35
sys 0.15

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

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .14039E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     5 'norm      '    5.0232       1.0000         .10000E-03   10000.    
     6 'norm      '    5.9372       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10004E-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      '    .10000E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10007E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    70.578       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10052E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    17.301       1.0000         .10000E-03   10000.    
    17 'Prefactor '    .10278E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10086E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    128.04       1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    .39531E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    236.06       1.0000         .10000E-03   10000.    
    23 'norm      '    .12943E-03   1.0000         .10000E-03   10000.    
    24 'norm      '    .10199E-03   1.0000         .10000E-03   10000.    
    25 'norm      '    .10013E-03   1.0000         .10000E-03   10000.    
    26 'Prefactor '    .47964E-02   1.0000         .10000E-03   10000.    
    27 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    28 'Normalizat'    .21703       1.0000         .10000E-01   10.000    
    29 'Prefactor '    .91114       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=   644.1543     FROM MIGRAD    STATUS=CONVERGED    730 CALLS     3740 TOTAL
                     EDM=   .88E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  4.5%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .10000E-03    317.47        .45425E-05** at limit **
   2  Prefactor     .10000E-03    1.5202        .35712E-07** at limit **
   3  Prefactor     .10000E-03    1.3959        .33378E-07** at limit **
   4  Prefactor     .10000E-03    3.7808       -.10952E-08** at limit **
   5  norm          5.0223        5.5290        .17791E-06    .11195E-03
   6  norm          5.9363        4.4453        .33252E-06    .26478E-03
   7  Prefactor     .10000E-03    12.168        .10643E-06** at limit **
   8  norm          .10000E-03    .89507        .36826E-07** at limit **
   9  norm          .10000E-03    14.596        .84522E-07** at limit **
  10  norm          .10000E-03    2.5256        .13318E-06** at limit **
  11  Prefactor     .10000E-03    24.840       -.44591E-06** at limit **
  12  Prefactor     .10000E-03    167.03       -.25771E-05** at limit **
  13  norm          70.572        32.970        .95848E-06    .19899E-03
  14  Prefactor     .10000E-03    196.09       -.21215E-05** at limit **
  15  Prefactor     .10000E-03    130.44       -.13685E-05** at limit **
  16  norm          17.296        23.990        .11659E-05    .11448E-03
  17  Prefactor     .10000E-03    108.14        .76883E-06** at limit **
  18  Prefactor     .10000E-03    99.108        .19814E-05** at limit **
  19  Prefactor     128.14        76.806        .36366E-06   -.26015E-03
  20  Prefactor     .10000E-03    32.224        .62678E-06** at limit **
  21  Prefactor     .10000E-03    117.14        .16456E-05** at limit **
  22  Prefactor     236.21        300.40       -.46311E-06   -.29358E-04
  23  norm          .10001E-03    37.604        .11159E-04** at limit **
  24  norm          .10001E-03    259.25        .23785E-05** at limit **
  25  norm          .10000E-03    34.627       -.37460E-07** at limit **
  26  Prefactor     .10030E-03    51.492        .98065E-05** at limit **
  27  Prefactor     .10000E-03    10.088        .14003E-06** at limit **
  28  Normalizat    .21714        .63750       -.23787E-04   -.98371E-04
  29  Prefactor     .91150        .41446        .73411E-05   -.27112E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 0.000100003
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 5.02225
  norm       = 5.93631
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.000100001
  norm       = 70.5715
  Prefactor  = 0.000100001
  Prefactor  = 0.0001
  norm       = 17.296
  Prefactor  = 0.0001
  Prefactor  = 0.000100001
  Prefactor  = 128.141
  Prefactor  = 0.0001
  Prefactor  = 0.000100003
  Prefactor  = 236.214
  norm       = 0.000100005
  norm       = 0.000100005
  norm       = 0.0001
  Prefactor  = 0.000100299
  Prefactor  = 0.0001
  Normalizat = 0.217144
  Prefactor  = 0.911498
 **********
 **   18 **HESSE 
 **********

 FCN=   644.1543     FROM HESSE     STATUS=OK           531 CALLS     4271 TOTAL
                     EDM=   .33E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .10000E-03    316.92        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    1.5218        .30573E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .10000E-03    1.3971        .29296E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    3.7818        .48214E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          5.0223        5.5344        .61019E-04   -1.5260    
   6  norm          5.9363        4.4485        .44146E-04   -1.5221    
   7  Prefactor     .10000E-03    12.186        .86489E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .10000E-03    .89568        .23459E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          .10000E-03    14.600        .94749E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          .10000E-03    2.5393        .39420E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    25.100        .12358E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    166.88        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          70.572        33.173        .47783E-04   -1.4026    
  14  Prefactor     .10000E-03    196.05        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .10000E-03    130.35        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          17.296        24.078        .96289E-04   -1.4876    
  17  Prefactor     .10000E-03    108.13        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10000E-03    99.096        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     128.14        76.848        .17789E-03   -1.3439    
  20  Prefactor     .10000E-03    32.301        .14084E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .10000E-03    117.49        .21269E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     236.21        300.46        .13174E-03   -1.2622    
  23  norm          .10001E-03    41.451        .21816E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  norm          .10001E-03    259.76        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  norm          .10000E-03    34.784        .14596E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  Prefactor     .10030E-03    139.40        .27107E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  27  Prefactor     .10000E-03    10.101        .78750E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  Normalizat    .21714        .63737        .51384E-03   -1.2818    
  29  Prefactor     .91150        .41715        .16688E-03   -.95740    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.30017e-09
Minuit parameter uncertainties:
  1  0.00198091
  2  1.37252e-06
  3  1.15153e-06
  4  2.01848e-06
  5  5.53501
  6  4.44873
  7  1.04851e-05
  8  1.11056e-06
  9  1.03728e-05
  10  5.99989e-06
  11  0.000137886
  12  0.000989877
  13  33.1815
  14  0.000953298
  15  0.000410361
  16  24.0914
  17  0.000233164
  18  0.000597054
  19  76.908
  20  8.62026e-05
  21  0.00125323
  22  302.46
  23  0.000938062
  24  0.00234412
  25  6.47116e-05
  26  0.0129342
  27  1.32724e-05
  28  0.660853
  29  0.418629
Done.

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

Extracting fit parameters...

4FGL J1738.2+4000
   Spectrum: PowerLaw
326    Prefactor:  1.000e-04  9.533e-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:  9.115e-01  4.186e-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:  2.171e-01  6.609e-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: 4.17e-07 ph cm-2 s-1
Energy Flux Upper Limit: 3.25e-02 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/948517/likelihoodResults_542851201_543110401_4FGL_J1738.2+4000_daily_bin1171.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) = 644.154308706
delta logL = -2.41585913727e-05

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 644.154284541
delta logL = 5.70048541704e-09

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10018E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.4854       1.0000          .0000       10.000    
     3 'Normalizat'    .21715       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .91150       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=   644.1543     FROM MIGRAD    STATUS=CONVERGED     54 CALLS      235 TOTAL
                     EDM=   .16E-10    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    9827.8        .90712E-02** at limit **
   2  Index         2.4670        5.4102        .50000        .79262E-06
   3  Normalizat    .21715        .22100        .11639        .89795E-05
   4  Prefactor     .91150        .14831        .45151E-01   -.98404E-06
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 2.46702
  Normalizat = 0.217149
  Prefactor  = 0.911498
 **********
 **   18 **HESSE 
 **********

 FCN=   644.1543     FROM HESSE     STATUS=OK            33 CALLS      268 TOTAL
                     EDM=   .67E-12    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    288.73        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.4670        6.1831        .50000       -.53123    
   3  Normalizat    .21715        .55667        .51387E-03   -1.2818    
   4  Prefactor     .91150        .38105        .16688E-03   -.95740    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.66606e-13
Minuit parameter uncertainties:
  1  0.000255089
  2  5.34827
  3  0.571934
  4  0.382173
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/948517': 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) = 644.154284537
delta logL = 9.61870227911e-09

Extracting fit parameters...

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

GAL_V02
   Spectrum: PowerLaw
681    Prefactor:  9.115e-01  3.822e-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:  2.171e-01  5.719e-01  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/948517/cmap_HighResolution_542851201_543110401_4FGL_J1738.2+4000_daily_bin1171.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='3.25e-02', job_status='DONE', photon_flux_upper_limit='4.17e-07', time_completed='2021-09-18 01:16:56.997350', job_id='948517', GAL2='0.91', fit_tolerance='1e-08', EG2='0.22', EG='0.22', time_epoch_completed='1631953017.0', return_code2='0', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.91', dlogl='9.62e-09', ts2='-0.00', photon_index_error='0.00', photon_index='2.52' WHERE bin_id='1171' AND source_name='4FGL J1738.2+4000' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep 18 01:16:57 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0282>
Subject: Job 948517: <4FGL_J1738.2+4000_daily_bin1171> in cluster <slac> Done

Job <4FGL_J1738.2+4000_daily_bin1171> was submitted from host <rhel6-64d> by user <kocevski> in cluster <slac> at Sat Sep 18 01:10:41 2021
Job was executed on host(s) <bullet0282>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Sep 18 01:10:43 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:10:43 2021
Terminated at Sat Sep 18 01:16:57 2021
Results reported at Sat Sep 18 01:16:57 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1738.2+4000_daily_bin1171 264.56 40.0099 542851201 543110401 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 :                                   364.51 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             342.83 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   374 sec.
    Turnaround time :                            376 sec.

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

