aklog: Couldn't determine realm of user:aklog: No credentials cache found  while getting realm
/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 84 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 = 7530
number of fields = 31
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J0638.7+5658_daily_bin1674
RA = 99.6895, Dec = 56.9785
tmin = 673228801, tmax = 673488001
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='669230', job_status='RUN', time_executed='2022-05-06 02:45:33.418773', time_epoch_executed='1651830333.42' WHERE source_name='4FGL J0638.7+5658' and cadence='daily' and bin_id='1674'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/669230

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/669230/ft1_4FGL_J0638.7+5658_daily_bin1674.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/669230/ft2_4FGL_J0638.7+5658_daily_bin1674.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/669230/ft1_4FGL_J0638.7+5658_daily_bin1674.fits outfile=/scratch/kocevski/669230/ft1_filteredMKT_4FGL_J0638.7+5658_daily_bin1674.fits ra=99.6895 dec=56.9785 rad=12.0 tmin=673228801.0 tmax=673488001.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.77
user 2.58
sys 0.19

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/669230/ft2_4FGL_J0638.7+5658_daily_bin1674.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/669230/ft2_4FGL_J0638.7+5658_daily_bin1674.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/669230/ft1_filteredMKT_4FGL_J0638.7+5658_daily_bin1674.fits evtable="EVENTS" outfile="/scratch/kocevski/669230/ft1_filtered_4FGL_J0638.7+5658_daily_bin1674.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.51
user 0.35
sys 0.15

Number of photons that the gtmktime cut: 1209

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/669230/ft1_filtered_4FGL_J0638.7+5658_daily_bin1674.fits" evtable="EVENTS" scfile=/scratch/kocevski/669230/ft2_4FGL_J0638.7+5658_daily_bin1674.fits sctable="SC_DATA" outfile=/scratch/kocevski/669230/ltcube_673228801_673488001_4FGL_J0638.7+5658_daily_bin1674.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/669230/ft2_4FGL_J0638.7+5658_daily_bin1674.fits
.....................!
real 15.49
user 15.07
sys 0.37

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/669230/ft1_filtered_4FGL_J0638.7+5658_daily_bin1674.fits evtable="EVENTS" scfile=/scratch/kocevski/669230/ft2_4FGL_J0638.7+5658_daily_bin1674.fits sctable="SC_DATA" expcube=/scratch/kocevski/669230/ltcube_673228801_673488001_4FGL_J0638.7+5658_daily_bin1674.fits outfile=/scratch/kocevski/669230/expmap_673228801_673488001_4FGL_J0638.7+5658_daily_bin1674.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/669230/ltcube_673228801_673488001_4FGL_J0638.7+5658_daily_bin1674.fits
.....................!
real 193.20
user 187.64
sys 5.08

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 G150.3+4.5 in ROI with RadialDisk spatial model.
Extended source HB 9 in ROI, make sure /nfs/farm/g/glast/g/LCRepository/Likelihood/ExtendedSources/Extended_archive_v18/Templates/HB9.fits is the correct path to the extended template.
Added 185 point sources and 2 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 J0638.7+5658 @ 99.6895 56.9785

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/669230/ft1_filtered_4FGL_J0638.7+5658_daily_bin1674.fits scfile=/scratch/kocevski/669230/ft2_4FGL_J0638.7+5658_daily_bin1674.fits outfile=/scratch/kocevski/669230/cmap_673228801_673488001_4FGL_J0638.7+5658_daily_bin1674.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=99.6895 yref=56.9785 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.58
user 0.39
sys 0.17

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/669230/ft1_filtered_4FGL_J0638.7+5658_daily_bin1674.fits scfile=/scratch/kocevski/669230/ft2_4FGL_J0638.7+5658_daily_bin1674.fits outfile=/scratch/kocevski/669230/cmap_HighResolution_673228801_673488001_4FGL_J0638.7+5658_daily_bin1674.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=99.6895 yref=56.9785 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.59
user 0.40
sys 0.16

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/669230/ft1_filtered_4FGL_J0638.7+5658_daily_bin1674.fits evtable="EVENTS" scfile=/scratch/kocevski/669230/ft2_4FGL_J0638.7+5658_daily_bin1674.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/669230/Model_4FGL_J0638.7+5658_daily_bin1674.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 G150.3+4.5
adding source GAL_V02
adding source HB 9
Working on...
/scratch/kocevski/669230/ft1_filtered_4FGL_J0638.7+5658_daily_bin1674.fits.....................!
real 201.82
user 199.87
sys 1.39

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/669230/ft1_filtered_4FGL_J0638.7+5658_daily_bin1674.fits', '/scratch/kocevski/669230/ft2_4FGL_J0638.7+5658_daily_bin1674.fits', expMap='/scratch/kocevski/669230/expmap_673228801_673488001_4FGL_J0638.7+5658_daily_bin1674.fits', expCube='/scratch/kocevski/669230/ltcube_673228801_673488001_4FGL_J0638.7+5658_daily_bin1674.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/669230/Model_4FGL_J0638.7+5658_daily_bin1674.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J0638.7+5658'

4FGL J0638.7+5658
   Spectrum: PowerLaw
254    Prefactor:  3.366e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-13)
255        Index:  2.562e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
256        Scale:  7.785e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/669230/ft1_filtered_4FGL_J0638.7+5658_daily_bin1674.fits
Spacecraft file(s): /scratch/kocevski/669230/ft2_4FGL_J0638.7+5658_daily_bin1674.fits
Exposure map: /scratch/kocevski/669230/expmap_673228801_673488001_4FGL_J0638.7+5658_daily_bin1674.fits
Exposure cube: /scratch/kocevski/669230/ltcube_673228801_673488001_4FGL_J0638.7+5658_daily_bin1674.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/669230/Model_4FGL_J0638.7+5658_daily_bin1674.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) = 12719.4457819

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    24.505       1.0000         .10000E-03   10000.    
     2 'norm      '    .10148E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     4 'norm      '    .10010E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    9.3713       1.0000         .10000E-03   10000.    
     7 'Prefactor '    5.3956       1.0000         .10000E-03   10000.    
     8 'Prefactor '    25.096       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    10 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    11 'norm      '    .17728E-03   1.0000         .10000E-03   10000.    
    12 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10024E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    27.505       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    5.5614       1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    20 'norm      '    .33163       1.0000         .10000E-03   10000.    
    21 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    9.3746       1.0000         .10000E-03   10000.    
    23 'Normalizat'    .86611       1.0000         .10000E-01   10.000    
    24 'Prefactor '    1.0759       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6140E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   12719.44     FROM MIGRAD    STATUS=CONVERGED    555 CALLS     2745 TOTAL
                     EDM=   .95E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .5%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     24.491        51.456       -.17294E-04    .17625E-03
   2  norm          .10000E-03    88.398        .74554E-06** at limit **
   3  Prefactor     .10000E-03    10.926       -.48189E-12** at limit **
   4  norm          .10000E-03    .69247       -.44368E-07** at limit **
   5  Prefactor     .10000E-03    33.587       -.21198E-05** at limit **
   6  Prefactor     9.3709        21.127       -.24668E-06   -.13447E-04
   7  Prefactor     5.3955        5.3136       -.98196E-07   -.17044E-04
   8  Prefactor     25.097        27.997       -.19668E-06   -.12870E-05
   9  Prefactor     .10000E-03    5.9048        .43541E-08** at limit **
  10  norm          .10000E-03    1.3767       -.76625E-08** at limit **
  11  norm          .10001E-03    2.4702        .58290E-07** at limit **
  12  norm          .10000E-03    4.2609       -.19168E-07** at limit **
  13  Prefactor     .10000E-03    8.2114       -.39096E-08** at limit **
  14  Prefactor     .10000E-03    1.7225        .70137E-08** at limit **
  15  Prefactor     27.503        16.485       -.11366E-06    .13798E-04
  16  Prefactor     .10000E-03    4.1032        .13934E-07** at limit **
  17  Prefactor     .10000E-03    7.3764        .16609E-07** at limit **
  18  Prefactor     5.5604        20.283       -.34319E-06   -.20924E-04
  19  Prefactor     .10000E-03    44.297        .73525E-07** at limit **
  20  norm          .33175        .54683       -.42560E-06   -.37738E-02
  21  norm          .10000E-03    1.4133       -.12807E-07** at limit **
  22  Prefactor     9.3750        13.895       -.77954E-07   -.99238E-05
  23  Normalizat    .86606        .15761        .24933E-06    .58691E-04
  24  Prefactor     1.0760        .68023E-01    .40806E-06    .18129E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 24.491
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 9.37087
  Prefactor  = 5.39546
  Prefactor  = 25.097
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 0.000100013
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 27.5031
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 5.56038
  Prefactor  = 0.0001
  norm       = 0.331753
  norm       = 0.0001
  Prefactor  = 9.37499
  Normalizat = 0.866059
  Prefactor  = 1.07596
 **********
 **   18 **HESSE 
 **********

 FCN=   12719.44     FROM HESSE     STATUS=OK           403 CALLS     3148 TOTAL
                     EDM=   .19E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     24.491        49.582        .80920E-04   -1.4718    
   2  norm          .10000E-03    88.537        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .10000E-03    10.931        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  norm          .10000E-03    1.2331        .18293E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    33.813        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     9.3709        21.127        .13091E-03   -1.5096    
   7  Prefactor     5.3955        5.3115        .17300E-03   -1.5243    
   8  Prefactor     25.097        28.071        .79963E-04   -1.4706    
   9  Prefactor     .10000E-03    5.9062        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          .10000E-03    1.3889        .12918E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  norm          .10001E-03    2.7918        .59477E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm          .10000E-03    4.3815        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .10000E-03    8.3645        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10000E-03    1.7347        .14446E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     27.503        16.449        .76388E-04   -1.4659    
  16  Prefactor     .10000E-03    4.1069        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     .10000E-03    7.3926        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     5.5604        20.279        .17036E-03   -1.5236    
  19  Prefactor     .10000E-03    44.309        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  norm          .33175        .58134        .10930E-03   -1.5593    
  21  norm          .10000E-03    1.4531        .26161E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     9.3750        13.894        .13089E-03   -1.5095    
  23  Normalizat    .86606        .17204        .37705E-03   -.97663    
  24  Prefactor     1.0760        .74638E-01    .15505E-03   -.90239    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.8552e-09
Minuit parameter uncertainties:
  1  49.6659
  2  0.000112112
  3  3.47863e-06
  4  2.6725e-06
  5  0.000130708
  6  21.1434
  7  5.31197
  8  28.0858
  9  1.01684e-06
  10  1.36428e-06
  11  0.00037653
  12  6.00845e-06
  13  4.74518e-06
  14  1.3571e-06
  15  16.4521
  16  6.88417e-07
  17  4.02342e-06
  18  20.3043
  19  1.28559e-05
  20  0.581354
  21  1.3945e-06
  22  13.8984
  23  0.172152
  24  0.0746457
Done.

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

Extracting fit parameters...

4FGL J0638.7+5658
   Spectrum: PowerLaw
254    Prefactor:  2.510e+01  2.809e+01  1.000e-04  1.000e+04 ( 1.000e-13)
255        Index:  2.562e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
256        Scale:  7.785e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
607    Prefactor:  1.076e+00  7.465e-02  0.000e+00  1.000e+01 ( 1.000e+00)
608        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
609        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
602   Normalization:  8.661e-01  1.722e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.99
Ra Dec: 99.689 56.978
Photon Flux Upper Limit: 1.01e-07 ph cm-2 s-1
Energy Flux Upper Limit: 7.89e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/669230/likelihoodResults_673228801_673488001_4FGL_J0638.7+5658_daily_bin1674.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) = 12719.0845208
delta logL = 0.358974735553

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 12719.0649878
delta logL = 0.378507703103

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    10.390       1.0000         .10000E-03   10000.    
     2 'Index     '    3.4640       1.0000          .0000       10.000    
     3 'Normalizat'    .84058       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0825       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6140E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
 MACHINE ACCURACY LIMITS FURTHER IMPROVEMENT.

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   12719.06     FROM MIGRAD    STATUS=CONVERGED    102 CALLS      304 TOTAL
                     EDM=   .48E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     10.328        557.59        .62152E-03   -.10902E-04
   2  Index         3.4680        6.2497        .72324E-02    .33730E-04
   3  Normalizat    .84019        .17454        .19117E-02   -.48181E-04
   4  Prefactor     1.0827        .79731E-01    .15462E-03   -.90289E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 10.3284
  Index      = 3.46802
  Normalizat = 0.840187
  Prefactor  = 1.08265
 **********
 **   18 **HESSE 
 **********

 FCN=   12719.06     FROM HESSE     STATUS=OK            25 CALLS      329 TOTAL
                     EDM=   .11E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     10.328        20.717        .24861E-04   -1.5065    
   2  Index         3.4680        1.2031        .28930E-03   -.31141    
   3  Normalizat    .84019        .16732        .76470E-04   -.98595    
   4  Prefactor     1.0827        .74279E-01    .61849E-05   -.90023    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.12451e-11
Minuit parameter uncertainties:
  1  20.7314
  2  1.2163
  3  0.16742
  4  0.0742857
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/669230': 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) = 12719.0649799
delta logL = 0.378515688732

Extracting fit parameters...

4FGL J0638.7+5658
   Spectrum: PowerLaw
254    Prefactor:  1.033e+01  2.073e+01  1.000e-04  1.000e+04 ( 1.000e-13)
255        Index:  3.468e+00  1.216e+00  0.000e+00  1.000e+01 (-1.000e+00)
256        Scale:  7.785e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
607    Prefactor:  1.083e+00  7.429e-02  0.000e+00  1.000e+01 ( 1.000e+00)
608        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
609        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
602   Normalization:  8.402e-01  1.674e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.82
Ra Dec: 99.689 56.978
Photon Index (Free Index): 3.47 +/- 1.22
Photon Flux (Free Index): 5.17e-08 +/- 4.47e-08
Energy Flux (Free Index): 8.68e-06 +/- 7.46e-06

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/669230/cmap_HighResolution_673228801_673488001_4FGL_J0638.7+5658_daily_bin1674.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='7.89e-03', comment='SUCCESS', energy_flux2='8.68e-06', dlogl='3.79e-01', photon_flux2='5.17e-08', job_status='DONE', time_completed='2022-05-06 03:06:40.887750', photon_index_error2='1.22', photon_index2='3.47', ts='0.99', fit_tolerance='1e-08', GAL='1.08', photon_index_error='0.00', photon_flux_upper_limit='1.01e-07', energy_flux_error2='7.46e-06', EG='0.87', time_epoch_completed='1651831600.89', return_code='0', job_id='669230', GAL2='1.08', EG2='0.84', return_code2='0', photon_flux_error2='4.47e-08', ts2='1.82', photon_index='2.56' WHERE bin_id='1674' AND source_name='4FGL J0638.7+5658' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Fri May  6 03:06:40 PDT 2022


------------------------------------------------------------
Sender: LSF System <lsf@bullet0126>
Subject: Job 669165: <4FGL_J0638.7+5658_daily_bin1674> in cluster <slac> Done

Job <4FGL_J0638.7+5658_daily_bin1674> was submitted from host <rhel6-64f> by user <kocevski> in cluster <slac> at Fri May  6 00:06:24 2022
Job was executed on host(s) <bullet0126>, in queue <medium>, as user <kocevski> in cluster <slac> at Fri May  6 02:43:21 2022
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Fri May  6 02:43:21 2022
Terminated at Fri May  6 03:05:22 2022
Results reported at Fri May  6 03:05:22 2022

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J0638.7+5658_daily_bin1674 99.6895 56.9785 673228801 673488001 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J0638.7+5658 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   1264.00 sec.
    Max Memory :                                 619 MB
    Average Memory :                             331.40 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   1321 sec.
    Turnaround time :                            10738 sec.

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


------------------------------------------------------------
Sender: LSF System <lsf@bullet0109>
Subject: Job 669230: <4FGL_J0638.7+5658_daily_bin1674> in cluster <slac> Done

Job <4FGL_J0638.7+5658_daily_bin1674> was submitted from host <rhel6-64q> by user <kocevski> in cluster <slac> at Fri May  6 00:06:28 2022
Job was executed on host(s) <bullet0109>, in queue <medium>, as user <kocevski> in cluster <slac> at Fri May  6 02:43:58 2022
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Fri May  6 02:43:58 2022
Terminated at Fri May  6 03:06:41 2022
Results reported at Fri May  6 03:06:41 2022

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J0638.7+5658_daily_bin1674 99.6895 56.9785 673228801 673488001 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J0638.7+5658 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   1269.00 sec.
    Max Memory :                                 1258 MB
    Average Memory :                             356.60 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   1363 sec.
    Turnaround time :                            10813 sec.

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

