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


Performing analysis on: 4FGL_J1738.2+4000_daily_bin653
RA = 264.56, Dec = 40.0099
tmin = 408585601, tmax = 408844801
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='943912', job_status='RUN', time_executed='2021-09-18 00:57:45.256217', time_epoch_executed='1631951865.26' WHERE source_name='4FGL J1738.2+4000' and cadence='daily' and bin_id='653'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/943912

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/943912/ft1_4FGL_J1738.2+4000_daily_bin653.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/943912/ft2_4FGL_J1738.2+4000_daily_bin653.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/943912/ft1_4FGL_J1738.2+4000_daily_bin653.fits outfile=/scratch/kocevski/943912/ft1_filteredMKT_4FGL_J1738.2+4000_daily_bin653.fits ra=264.56 dec=40.0099 rad=12.0 tmin=408585601.0 tmax=408844801.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.31
user 4.05
sys 0.22

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/943912/ft1_filtered_4FGL_J1738.2+4000_daily_bin653.fits" evtable="EVENTS" scfile=/scratch/kocevski/943912/ft2_4FGL_J1738.2+4000_daily_bin653.fits sctable="SC_DATA" outfile=/scratch/kocevski/943912/ltcube_408585601_408844801_4FGL_J1738.2+4000_daily_bin653.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/943912/ft2_4FGL_J1738.2+4000_daily_bin653.fits
.....................!
real 11.90
user 11.59
sys 0.28

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/943912/ft1_filtered_4FGL_J1738.2+4000_daily_bin653.fits evtable="EVENTS" scfile=/scratch/kocevski/943912/ft2_4FGL_J1738.2+4000_daily_bin653.fits sctable="SC_DATA" expcube=/scratch/kocevski/943912/ltcube_408585601_408844801_4FGL_J1738.2+4000_daily_bin653.fits outfile=/scratch/kocevski/943912/expmap_408585601_408844801_4FGL_J1738.2+4000_daily_bin653.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/943912/ltcube_408585601_408844801_4FGL_J1738.2+4000_daily_bin653.fits
.....................!
real 190.14
user 185.69
sys 4.11

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/943912/ft1_filtered_4FGL_J1738.2+4000_daily_bin653.fits scfile=/scratch/kocevski/943912/ft2_4FGL_J1738.2+4000_daily_bin653.fits outfile=/scratch/kocevski/943912/cmap_408585601_408844801_4FGL_J1738.2+4000_daily_bin653.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.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/943912/ft1_filtered_4FGL_J1738.2+4000_daily_bin653.fits scfile=/scratch/kocevski/943912/ft2_4FGL_J1738.2+4000_daily_bin653.fits outfile=/scratch/kocevski/943912/cmap_HighResolution_408585601_408844801_4FGL_J1738.2+4000_daily_bin653.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.52
user 0.38
sys 0.14

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    58.771       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10016E-03   1.0000         .10000E-03   10000.    
     5 'norm      '    5.1526       1.0000         .10000E-03   10000.    
     6 'norm      '    .10016E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    6.4209       1.0000         .10000E-03   10000.    
     8 'norm      '    1.0595       1.0000         .10000E-03   10000.    
     9 'norm      '    14.533       1.0000         .10000E-03   10000.    
    10 'norm      '    1.8121       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    2.1280       1.0000         .10000E-03   10000.    
    13 'norm      '    .10004E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    58.677       1.0000         .10000E-03   10000.    
    15 'Prefactor '    157.04       1.0000         .10000E-03   10000.    
    16 'norm      '    .10016E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    54.964       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10007E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10026E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    6.9210       1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10058E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    23 'norm      '    3.3848       1.0000         .10000E-03   10000.    
    24 'norm      '    .10010E-03   1.0000         .10000E-03   10000.    
    25 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    26 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    27 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    28 'Normalizat'    1.2240       1.0000         .10000E-01   10.000    
    29 'Prefactor '    .84560       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=   3577.258     FROM MIGRAD    STATUS=CONVERGED    724 CALLS     3706 TOTAL
                     EDM=   .46E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .7%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          58.773        69.890       -.20269E-06   -.29567E-05
   2  Prefactor     .10000E-03    .92806        .94988E-07** at limit **
   3  Prefactor     .10000E-03    .86483        .79948E-07** at limit **
   4  Prefactor     .10000E-03    5.7193        .16999E-06** at limit **
   5  norm          5.1521        2.7549       -.23181E-07   -.18943E-04
   6  norm          .10000E-03    1.2751       -.12792E-06** at limit **
   7  Prefactor     6.4197        12.183        .38510E-05   -.67813E-05
   8  norm          1.0594        1.2488       -.22415E-06   -.27526E-03
   9  norm          14.531        13.642       -.12995E-06    .50193E-04
  10  norm          1.8118        3.3948        .13781E-06   -.57878E-04
  11  Prefactor     .10000E-03    3.2745        .24028E-06** at limit **
  12  Prefactor     2.0713        326.41       -.46984E-05   -.66798E-05
  13  norm          .10000E-03    8.1390       -.28483E-05** at limit **
  14  Prefactor     58.628        90.532       -.16619E-06    .40316E-05
  15  Prefactor     156.96        144.68       -.30105E-06   -.29935E-04
  16  norm          .10000E-03    6.0872        .83917E-06** at limit **
  17  Prefactor     55.040        87.300        .16961E-06    .34191E-04
  18  Prefactor     .10000E-03    108.53        .60668E-05** at limit **
  19  Prefactor     .10000E-03    6.5417       -.22936E-06** at limit **
  20  Prefactor     6.9213        16.075        .16364E-06   -.97948E-06
  21  Prefactor     .10000E-03    24.447       -.69645E-07** at limit **
  22  Prefactor     .10000E-03    49.911       -.18473E-07** at limit **
  23  norm          3.3845        2.5197        .74987E-08    .42685E-05
  24  norm          .10000E-03    50.050       -.76764E-07** at limit **
  25  norm          .10000E-03    4.7371        .13390E-06** at limit **
  26  Prefactor     .10000E-03    2.5098        .36179E-07** at limit **
  27  Prefactor     .10000E-03    1.6301        .32193E-07** at limit **
  28  Normalizat    1.2240        .31598       -.60688E-06    .15466E-04
  29  Prefactor     .84560        .18088       -.47668E-06    .10024E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 58.7735
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 5.1521
  norm       = 0.0001
  Prefactor  = 6.41971
  norm       = 1.05936
  norm       = 14.5314
  norm       = 1.81183
  Prefactor  = 0.0001
  Prefactor  = 2.07129
  norm       = 0.0001
  Prefactor  = 58.6283
  Prefactor  = 156.962
  norm       = 0.0001
  Prefactor  = 55.0396
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 6.9213
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 3.3845
  norm       = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Normalizat = 1.22403
  Prefactor  = 0.845595
 **********
 **   18 **HESSE 
 **********

 FCN=   3577.258     FROM HESSE     STATUS=OK           547 CALLS     4253 TOTAL
                     EDM=   .13E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          58.773        69.730        .52333E-04   -1.4173    
   2  Prefactor     .10000E-03    .95663        .11230E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .10000E-03    .87752        .54226E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    5.8766        .27871E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          5.1521        2.7559        .70541E-04   -1.5254    
   6  norm          .10000E-03    3.4251        .13092E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     6.4197        12.240        .79196E-03   -1.5201    
   8  norm          1.0594        1.2133        .68807E-04   -1.5502    
   9  norm          14.531        13.629        .10506E-03   -1.4945    
  10  norm          1.8118        3.3549        .13655E-03   -1.5439    
  11  Prefactor     .10000E-03    3.2783        .10568E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     2.0713        334.83        .28265E-03   -1.5420    
  13  norm          .10000E-03    8.0883        .16478E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     58.628        90.418        .52375E-04   -1.4175    
  15  Prefactor     156.96        145.01        .16087E-03   -1.3196    
  16  norm          .10000E-03    6.1057        .14405E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     55.040        87.266        .27052E-03   -1.4223    
  18  Prefactor     .10000E-03    108.39        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10000E-03    6.5434        .14939E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     6.9213        16.065        .15250E-03   -1.5182    
  21  Prefactor     .10000E-03    24.479        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     .10000E-03    49.932        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  norm          3.3845        2.5218        .79498E-04   -1.5340    
  24  norm          .10000E-03    50.088        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  norm          .10000E-03    4.7411        .12714E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  Prefactor     .10000E-03    2.5137        .92538E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  27  Prefactor     .10000E-03    1.6323        .74579E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  Normalizat    1.2240        .38754        .29745E-03   -.85863    
  29  Prefactor     .84560        .22216        .20960E-03   -.98069    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.34581e-10
Minuit parameter uncertainties:
  1  69.827
  2  1.66599e-08
  3  3.7012e-08
  4  1.12307e-05
  5  2.75598
  6  5.83897e-05
  7  12.2445
  8  1.21332
  9  13.6323
  10  3.3552
  11  1.82506e-06
  12  52.9729
  13  4.09519e-05
  14  90.6311
  15  145.338
  16  1.11357e-06
  17  87.4695
  18  3.97947e-05
  19  3.00357e-06
  20  16.0751
  21  1.22653e-05
  22  4.53621e-07
  23  2.52188
  24  1.39046e-05
  25  1.23437e-06
  26  1.61177e-06
  27  6.79238e-07
  28  0.388456
  29  0.222396
Done.

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

Extracting fit parameters...

4FGL J1738.2+4000
   Spectrum: PowerLaw
326    Prefactor:  5.863e+01  9.063e+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.456e-01  2.224e-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.224e+00  3.885e-01  1.000e-02  1.000e+01 ( 1.000e+00)


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

Saving results to:
/scratch/kocevski/943912/likelihoodResults_408585601_408844801_4FGL_J1738.2+4000_daily_bin653.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) = 3577.25112775
delta logL = 0.00675063214749

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 3577.24305553
delta logL = 0.0148228454773

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    44.253       1.0000         .10000E-03   10000.    
     2 'Index     '    2.7126       1.0000          .0000       10.000    
     3 'Normalizat'    1.2171       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .84840       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=   3577.243     FROM MIGRAD    STATUS=CONVERGED     82 CALLS      265 TOTAL
                     EDM=   .11E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     44.239        132.18        .60267E-04   -.34898E-05
   2  Index         2.7133        1.4317        .73374E-02    .31591E-03
   3  Normalizat    1.2169        .36696        .29819E-03   -.29857E-03
   4  Prefactor     .84851        .21827        .20928E-03   -.43203E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 44.2393
  Index      = 2.71332
  Normalizat = 1.21686
  Prefactor  = 0.848505
 **********
 **   18 **HESSE 
 **********

 FCN=   3577.243     FROM HESSE     STATUS=OK            25 CALLS      290 TOTAL
                     EDM=   .26E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     44.239        110.31        .24107E-05   -1.4377    
   2  Index         2.7133        1.1984        .14675E-02   -.47500    
   3  Normalizat    1.2169        .36682        .59638E-04   -.86083    
   4  Prefactor     .84851        .21819        .41856E-04   -.97964    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.58834e-10
Minuit parameter uncertainties:
  1  110.821
  2  1.21344
  3  0.367598
  4  0.218413
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/943912': 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) = 3577.24305502
delta logL = 0.0148233538257

Extracting fit parameters...

4FGL J1738.2+4000
   Spectrum: PowerLaw
326    Prefactor:  4.424e+01  1.108e+02  1.000e-04  1.000e+04 ( 1.000e-14)
327        Index:  2.713e+00  1.213e+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:  8.485e-01  2.184e-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.217e+00  3.676e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.59
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/943912/cmap_HighResolution_408585601_408844801_4FGL_J1738.2+4000_daily_bin653.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.38e-02', job_status='DONE', photon_flux_upper_limit='1.77e-07', time_completed='2021-09-18 01:08:38.340667', job_id='943912', GAL2='0.85', fit_tolerance='1e-08', EG2='1.22', EG='1.22', time_epoch_completed='1631952518.34', return_code2='0', ts='0.59', comment='SUCCESS', return_code='0', GAL='0.85', dlogl='1.48e-02', ts2='0.62', photon_index_error='0.00', photon_index='2.52' WHERE bin_id='653' AND source_name='4FGL J1738.2+4000' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep 18 01:08:38 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0148>
Subject: Job 943912: <4FGL_J1738.2+4000_daily_bin653> in cluster <slac> Done

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

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1738.2+4000_daily_bin653 264.56 40.0099 408585601 408844801 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 :                                   651.00 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             304.42 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   784 sec.
    Turnaround time :                            787 sec.

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

