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


Performing analysis on: 4FGL_J0738.1+1742_daily_bin1400
RA = 114.539, Dec = 17.7066
tmin = 602208001, tmax = 602467201
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='583130', job_status='RUN', time_executed='2021-08-27 19:58:15.610288', time_epoch_executed='1630119495.61' WHERE source_name='4FGL J0738.1+1742' and cadence='daily' and bin_id='1400'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/583130

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/583130/ft1_4FGL_J0738.1+1742_daily_bin1400.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/583130/ft2_4FGL_J0738.1+1742_daily_bin1400.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/583130/ft1_4FGL_J0738.1+1742_daily_bin1400.fits outfile=/scratch/kocevski/583130/ft1_filteredMKT_4FGL_J0738.1+1742_daily_bin1400.fits ra=114.539 dec=17.7066 rad=12.0 tmin=602208001.0 tmax=602467201.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 5.43
user 4.94
sys 0.46

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/583130/ft2_4FGL_J0738.1+1742_daily_bin1400.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/583130/ft2_4FGL_J0738.1+1742_daily_bin1400.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/583130/ft1_filteredMKT_4FGL_J0738.1+1742_daily_bin1400.fits evtable="EVENTS" outfile="/scratch/kocevski/583130/ft1_filtered_4FGL_J0738.1+1742_daily_bin1400.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.70
user 0.33
sys 0.35

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/583130/ft1_filtered_4FGL_J0738.1+1742_daily_bin1400.fits" evtable="EVENTS" scfile=/scratch/kocevski/583130/ft2_4FGL_J0738.1+1742_daily_bin1400.fits sctable="SC_DATA" outfile=/scratch/kocevski/583130/ltcube_602208001_602467201_4FGL_J0738.1+1742_daily_bin1400.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/583130/ft2_4FGL_J0738.1+1742_daily_bin1400.fits
.....................!
real 11.82
user 11.25
sys 0.54

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/583130/ft1_filtered_4FGL_J0738.1+1742_daily_bin1400.fits evtable="EVENTS" scfile=/scratch/kocevski/583130/ft2_4FGL_J0738.1+1742_daily_bin1400.fits sctable="SC_DATA" expcube=/scratch/kocevski/583130/ltcube_602208001_602467201_4FGL_J0738.1+1742_daily_bin1400.fits outfile=/scratch/kocevski/583130/expmap_602208001_602467201_4FGL_J0738.1+1742_daily_bin1400.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/583130/ltcube_602208001_602467201_4FGL_J0738.1+1742_daily_bin1400.fits
.....................!
real 190.86
user 185.41
sys 5.05

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
Extended source IC 443 in ROI with RadialGaussian spatial model.
Extended source Rosette in ROI, make sure /nfs/farm/g/glast/g/LCRepository/Likelihood/ExtendedSources/Extended_archive_v18/Templates/Rosette.fits is the correct path to the extended template.
Extended source Monoceros in ROI with RadialGaussian spatial model.
Added 174 point sources and 3 extended sources
If using unbinned likelihood you will need to rerun gtdiffrsp for the extended sources or rerun the makeModel function with optional argument psForce=True

Setting source of interest to:
4FGL J0738.1+1742 @ 114.539 17.7066

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/583130/ft1_filtered_4FGL_J0738.1+1742_daily_bin1400.fits scfile=/scratch/kocevski/583130/ft2_4FGL_J0738.1+1742_daily_bin1400.fits outfile=/scratch/kocevski/583130/cmap_602208001_602467201_4FGL_J0738.1+1742_daily_bin1400.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=114.539 yref=17.7066 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.74
user 0.35
sys 0.36

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/583130/ft1_filtered_4FGL_J0738.1+1742_daily_bin1400.fits scfile=/scratch/kocevski/583130/ft2_4FGL_J0738.1+1742_daily_bin1400.fits outfile=/scratch/kocevski/583130/cmap_HighResolution_602208001_602467201_4FGL_J0738.1+1742_daily_bin1400.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=114.539 yref=17.7066 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.79
user 0.37
sys 0.37

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/583130/ft1_filtered_4FGL_J0738.1+1742_daily_bin1400.fits evtable="EVENTS" scfile=/scratch/kocevski/583130/ft2_4FGL_J0738.1+1742_daily_bin1400.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/583130/Model_4FGL_J0738.1+1742_daily_bin1400.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
adding source IC 443
adding source Monoceros
adding source Rosette
Working on...
/scratch/kocevski/583130/ft1_filtered_4FGL_J0738.1+1742_daily_bin1400.fits.....................!
real 94.46
user 92.61
sys 1.55

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/583130/ft1_filtered_4FGL_J0738.1+1742_daily_bin1400.fits', '/scratch/kocevski/583130/ft2_4FGL_J0738.1+1742_daily_bin1400.fits', expMap='/scratch/kocevski/583130/expmap_602208001_602467201_4FGL_J0738.1+1742_daily_bin1400.fits', expCube='/scratch/kocevski/583130/ltcube_602208001_602467201_4FGL_J0738.1+1742_daily_bin1400.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/583130/Model_4FGL_J0738.1+1742_daily_bin1400.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J0738.1+1742'

4FGL J0738.1+1742
   Spectrum: LogParabola
277         norm:  2.808e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-12)
278        alpha:  1.980e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
279         beta:  6.041e-02  0.000e+00  0.000e+00  1.000e+01 ( 1.000e+00) fixed
280           Eb:  1.540e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/583130/ft1_filtered_4FGL_J0738.1+1742_daily_bin1400.fits
Spacecraft file(s): /scratch/kocevski/583130/ft2_4FGL_J0738.1+1742_daily_bin1400.fits
Exposure map: /scratch/kocevski/583130/expmap_602208001_602467201_4FGL_J0738.1+1742_daily_bin1400.fits
Exposure cube: /scratch/kocevski/583130/ltcube_602208001_602467201_4FGL_J0738.1+1742_daily_bin1400.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/583130/Model_4FGL_J0738.1+1742_daily_bin1400.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) = 6487.9793271

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    4.8770       1.0000         .10000E-03   10000.    
     3 'norm      '    14.779       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     5 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     6 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    18.754       1.0000         .10000E-03   10000.    
     8 'norm      '    5.1985       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    2.5848       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10107E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    4.8366       1.0000         .10000E-03   10000.    
    14 'norm      '    30.947       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10949E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    67.464       1.0000         .10000E-03   10000.    
    17 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.2291       1.0000         .10000E-01   10.000    
    19 'Prefactor '    .93317       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5880E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   6487.964     FROM MIGRAD    STATUS=CONVERGED    376 CALLS     1856 TOTAL
                     EDM=   .92E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .3%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    47.013        .39277E-05** at limit **
   2  Prefactor     4.8771        4.8146       -.81341E-06    .19447E-03
   3  norm          14.780        11.267        .14496E-08   -.29906E-04
   4  Prefactor     .10000E-03    1.7826       -.45664E-07** at limit **
   5  norm          .10000E-03    .45917       -.53722E-08** at limit **
   6  norm          .10000E-03    .74615        .31539E-07** at limit **
   7  Prefactor     18.753        10.594        .26671E-07   -.34402E-04
   8  norm          5.1980        4.3797       -.46720E-06   -.31607E-03
   9  Prefactor     .10000E-03    12.560       -.28740E-06** at limit **
  10  Prefactor     2.5796        27.836       -.30131E-05   -.98442E-04
  11  Prefactor     .10000E-03    12.988        .24563E-07** at limit **
  12  Prefactor     .10000E-03    3.4599        .17897E-06** at limit **
  13  Prefactor     4.8498        39.663        .26196E-04   -.15374E-04
  14  norm          30.944        21.547       -.20474E-06   -.27561E-07
  15  Prefactor     .10000E-03    28.660       -.15079E-06** at limit **
  16  Prefactor     67.439        106.89       -.28932E-04   -.81055E-06
  17  norm          .10000E-03    48.140       -.26206E-05** at limit **
  18  Normalizat    1.2292        .21392        .49719E-06   -.66775E-04
  19  Prefactor     .93306        .12483       -.44426E-06   -.95361E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 4.87707
  norm       = 14.78
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 0.0001
  Prefactor  = 18.753
  norm       = 5.19796
  Prefactor  = 0.0001
  Prefactor  = 2.5796
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 4.84983
  norm       = 30.9444
  Prefactor  = 0.0001
  Prefactor  = 67.4392
  norm       = 0.0001
  Normalizat = 1.22925
  Prefactor  = 0.933064
 **********
 **   18 **HESSE 
 **********

 FCN=   6487.964     FROM HESSE     STATUS=OK           264 CALLS     2120 TOTAL
                     EDM=   .19E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    47.180        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     4.8771        4.8128        .17105E-03   -1.5266    
   3  norm          14.780        11.280        .10418E-03   -1.4939    
   4  Prefactor     .10000E-03    1.7835        .10503E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          .10000E-03    .47035        .10653E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  norm          .10000E-03    .75112        .67432E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     18.753        10.559        .92485E-04   -1.4842    
   8  norm          5.1980        4.3590        .14184E-03   -1.5252    
   9  Prefactor     .10000E-03    12.568        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     2.5796        27.690        .25382E-03   -1.5387    
  11  Prefactor     .10000E-03    12.993        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    3.5727        .29224E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     4.8498        39.337        .18292E-03   -1.5267    
  14  norm          30.944        21.536        .72025E-04   -1.4595    
  15  Prefactor     .10000E-03    29.074        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     67.439        106.94        .48866E-04   -1.4064    
  17  norm          .10000E-03    48.167        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    1.2292        .24502        .30849E-03   -.85704    
  19  Prefactor     .93306        .14290        .20793E-03   -.94995    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.88404e-10
Minuit parameter uncertainties:
  1  7.26008e-06
  2  4.81314
  3  11.2817
  4  2.03421e-07
  5  4.03369e-07
  6  3.96235e-07
  7  10.5598
  8  4.35929
  9  2.77948e-05
  10  16.9129
  11  3.69936e-06
  12  4.50357e-05
  13  27.6491
  14  21.5416
  15  0.000151073
  16  107.251
  17  5.08297e-06
  18  0.245252
  19  0.142954
Done.

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

Extracting fit parameters...

4FGL J0738.1+1742
   Spectrum: LogParabola
277         norm:  1.000e-04  3.962e-07  1.000e-04  1.000e+04 ( 1.000e-12)
278        alpha:  1.980e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
279         beta:  6.041e-02  0.000e+00  0.000e+00  1.000e+01 ( 1.000e+00) fixed
280           Eb:  1.540e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
573    Prefactor:  9.331e-01  1.430e-01  0.000e+00  1.000e+01 ( 1.000e+00)
574        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
575        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
572   Normalization:  1.229e+00  2.453e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 114.539 17.707
Photon Flux Upper Limit: 5.84e-08 ph cm-2 s-1
Energy Flux Upper Limit: 4.18e-05 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/583130/likelihoodResults_602208001_602467201_4FGL_J0738.1+1742_daily_bin1400.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) = 6487.96984503
delta logL = -0.00621023397525

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6487.96362988
delta logL = 4.92195977131e-06

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .10259E-03   1.0000         .10000E-03   10000.    
     2 'alpha     '    2.3190       1.0000          .0000       5.0000    
     3 'Normalizat'    1.2292       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .93311       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5880E+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.
 MIGRAD TERMINATED WITHOUT CONVERGENCE.

 FCN=   6487.964     FROM MIGRAD    STATUS=FAILED        86 CALLS      271 TOTAL
                     EDM=   .20E-04    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .10119E-03    79.918        .11183E-02** at limit **
   2  alpha         2.5372        3.7036        .50000       -.16123E-04
   3  Normalizat    1.2292        .62326E-01    .30849E-03    .36549E-03
   4  Prefactor     .93306        .37345E-01    .20793E-03    .41696E-03
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   6487.964     FROM SIMPLEX   STATUS=PROGRESS     139 CALLS      410 TOTAL
                     EDM=   .60E-05    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .10086E-03    79.918        .12059E-03** at limit **
   2  alpha         2.5366        3.7036        .30379E-03   -.16123E-04
   3  Normalizat    1.2292        .62326E-01    .80574E-05    .36549E-03
   4  Prefactor     .93305        .37345E-01    .42541E-05    .41696E-03
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   6487.964     FROM MIGRAD    STATUS=CONVERGED     44 CALLS      454 TOTAL
                     EDM=   .90E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .10000E-03    204.07        .22366E-03** at limit **
   2  alpha         2.6964        3.2951        .50000        .13040E-06
   3  Normalizat    1.2292        .19017        .61698E-04    .25650E-04
   4  Prefactor     .93306        .10939        .41587E-04   -.11646E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 0.0001
  alpha      = 2.69644
  Normalizat = 1.22924
  Prefactor  = 0.933064
 **********
 **   18 **HESSE 
 **********

 FCN=   6487.964     FROM HESSE     STATUS=OK            29 CALLS      483 TOTAL
                     EDM=   .34E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .10000E-03    .91892        .44731E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  alpha         2.6964        3.8414        .50000        .78658E-01
   3  Normalizat    1.2292        .23550        .12340E-04   -.85704    
   4  Prefactor     .93306        .14133        .83174E-05   -.94995    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.40223e-11
Minuit parameter uncertainties:
  1  5.45428e-06
  2  98.3275
  3  0.235703
  4  0.141388
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/583130': 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) = 6487.9636255
delta logL = 9.30254827836e-06

Extracting fit parameters...

4FGL J0738.1+1742
   Spectrum: LogParabola
277         norm:  1.000e-04  5.454e-06  1.000e-04  1.000e+04 ( 1.000e-12)
278        alpha:  2.696e+00  9.833e+01  0.000e+00  5.000e+00 ( 1.000e+00)
279         beta:  6.041e-02  0.000e+00  0.000e+00  1.000e+01 ( 1.000e+00) fixed
280           Eb:  1.540e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
573    Prefactor:  9.331e-01  1.414e-01  0.000e+00  1.000e+01 ( 1.000e+00)
574        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
575        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
572   Normalization:  1.229e+00  2.357e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 114.539 17.707

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/583130/cmap_HighResolution_602208001_602467201_4FGL_J0738.1+1742_daily_bin1400.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='4.18e-05', job_status='DONE', photon_flux_upper_limit='5.84e-08', time_completed='2021-08-27 20:10:03.882950', job_id='583130', GAL2='0.93', fit_tolerance='1e-08', EG2='1.23', EG='1.23', time_epoch_completed='1630120203.88', return_code2='0', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.93', dlogl='9.30e-06', ts2='-0.00', photon_index_error='0.00', photon_index='1.98' WHERE bin_id='1400' AND source_name='4FGL J0738.1+1742' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Fri Aug 27 20:10:03 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0043>
Subject: Job 583130: <4FGL_J0738.1+1742_daily_bin1400> in cluster <slac> Done

Job <4FGL_J0738.1+1742_daily_bin1400> was submitted from host <rhel6-64m> by user <kocevski> in cluster <slac> at Fri Aug 27 19:55:33 2021
Job was executed on host(s) <bullet0043>, in queue <medium>, as user <kocevski> in cluster <slac> at Fri Aug 27 19:55:35 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Fri Aug 27 19:55:35 2021
Terminated at Fri Aug 27 20:10:04 2021
Results reported at Fri Aug 27 20:10:04 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J0738.1+1742_daily_bin1400 114.539 17.7066 602208001 602467201 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J0738.1+1742 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   654.34 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             255.82 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              7
    Max Threads :                                21
    Run time :                                   869 sec.
    Turnaround time :                            871 sec.

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

