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


Performing analysis on: 4FGL_J0638.6+7320_daily_bin660
RA = 99.6711, Dec = 73.3438
tmin = 410400001, tmax = 410659201
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='585525', job_status='RUN', time_executed='2021-08-25 13:36:39.659815', time_epoch_executed='1629923799.66' WHERE source_name='4FGL J0638.6+7320' and cadence='daily' and bin_id='660'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/585525

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/585525/ft1_4FGL_J0638.6+7320_daily_bin660.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/585525/ft2_4FGL_J0638.6+7320_daily_bin660.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/585525/ft1_4FGL_J0638.6+7320_daily_bin660.fits outfile=/scratch/kocevski/585525/ft1_filteredMKT_4FGL_J0638.6+7320_daily_bin660.fits ra=99.6711 dec=73.3438 rad=12.0 tmin=410400001.0 tmax=410659201.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 7.90
user 6.33
sys 1.50

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/585525/ft2_4FGL_J0638.6+7320_daily_bin660.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/585525/ft2_4FGL_J0638.6+7320_daily_bin660.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/585525/ft1_filteredMKT_4FGL_J0638.6+7320_daily_bin660.fits evtable="EVENTS" outfile="/scratch/kocevski/585525/ft1_filtered_4FGL_J0638.6+7320_daily_bin660.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 1.78
user 0.35
sys 1.40

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/585525/ft1_filtered_4FGL_J0638.6+7320_daily_bin660.fits" evtable="EVENTS" scfile=/scratch/kocevski/585525/ft2_4FGL_J0638.6+7320_daily_bin660.fits sctable="SC_DATA" outfile=/scratch/kocevski/585525/ltcube_410400001_410659201_4FGL_J0638.6+7320_daily_bin660.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/585525/ft2_4FGL_J0638.6+7320_daily_bin660.fits
.....................!
real 15.55
user 13.66
sys 1.74

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/585525/ft1_filtered_4FGL_J0638.6+7320_daily_bin660.fits evtable="EVENTS" scfile=/scratch/kocevski/585525/ft2_4FGL_J0638.6+7320_daily_bin660.fits sctable="SC_DATA" expcube=/scratch/kocevski/585525/ltcube_410400001_410659201_4FGL_J0638.6+7320_daily_bin660.fits outfile=/scratch/kocevski/585525/expmap_410400001_410659201_4FGL_J0638.6+7320_daily_bin660.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/585525/ltcube_410400001_410659201_4FGL_J0638.6+7320_daily_bin660.fits
.....................!
real 194.43
user 187.17
sys 6.39

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 212 point sources and 0 extended sources

Setting source of interest to:
4FGL J0638.6+7320 @ 99.6711 73.3438

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/585525/ft1_filtered_4FGL_J0638.6+7320_daily_bin660.fits scfile=/scratch/kocevski/585525/ft2_4FGL_J0638.6+7320_daily_bin660.fits outfile=/scratch/kocevski/585525/cmap_410400001_410659201_4FGL_J0638.6+7320_daily_bin660.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.6711 yref=73.3438 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 1.80
user 0.38
sys 1.38

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/585525/ft1_filtered_4FGL_J0638.6+7320_daily_bin660.fits scfile=/scratch/kocevski/585525/ft2_4FGL_J0638.6+7320_daily_bin660.fits outfile=/scratch/kocevski/585525/cmap_HighResolution_410400001_410659201_4FGL_J0638.6+7320_daily_bin660.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.6711 yref=73.3438 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 1.85
user 0.36
sys 1.41

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/585525/ft1_filtered_4FGL_J0638.6+7320_daily_bin660.fits evtable="EVENTS" scfile=/scratch/kocevski/585525/ft2_4FGL_J0638.6+7320_daily_bin660.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/585525/Model_4FGL_J0638.6+7320_daily_bin660.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/585525/ft1_filtered_4FGL_J0638.6+7320_daily_bin660.fits.....................!
real 107.33
user 103.54
sys 2.88

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/585525/ft1_filtered_4FGL_J0638.6+7320_daily_bin660.fits', '/scratch/kocevski/585525/ft2_4FGL_J0638.6+7320_daily_bin660.fits', expMap='/scratch/kocevski/585525/expmap_410400001_410659201_4FGL_J0638.6+7320_daily_bin660.fits', expCube='/scratch/kocevski/585525/ltcube_410400001_410659201_4FGL_J0638.6+7320_daily_bin660.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/585525/Model_4FGL_J0638.6+7320_daily_bin660.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J0638.6+7320'

4FGL J0638.6+7320
   Spectrum: PowerLaw
267    Prefactor:  9.247e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-12)
268        Index:  3.027e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
269        Scale:  3.246e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/585525/ft1_filtered_4FGL_J0638.6+7320_daily_bin660.fits
Spacecraft file(s): /scratch/kocevski/585525/ft2_4FGL_J0638.6+7320_daily_bin660.fits
Exposure map: /scratch/kocevski/585525/expmap_410400001_410659201_4FGL_J0638.6+7320_daily_bin660.fits
Exposure cube: /scratch/kocevski/585525/ltcube_410400001_410659201_4FGL_J0638.6+7320_daily_bin660.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/585525/Model_4FGL_J0638.6+7320_daily_bin660.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) = 8585.38621478

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    3.5845       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     5 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    10.427       1.0000         .10000E-03   10000.    
     7 'Prefactor '    43.261       1.0000         .10000E-03   10000.    
     8 'Prefactor '    .26914E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    29.713       1.0000         .10000E-03   10000.    
    10 'norm      '    13.587       1.0000         .10000E-03   10000.    
    11 'norm      '    .76355       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10238E-03   1.0000         .10000E-03   10000.    
    14 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    1.2164       1.0000         .10000E-03   10000.    
    18 'norm      '    2.2216       1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10041E-03   1.0000         .10000E-03   10000.    
    20 'Normalizat'    1.0968       1.0000         .10000E-01   10.000    
    21 'Prefactor '    .96293       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6810E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   8585.383     FROM MIGRAD    STATUS=CONVERGED    448 CALLS     2181 TOTAL
                     EDM=   .63E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .8%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    4.3555       -.84035E-08** at limit **
   2  Prefactor     3.5846        4.0409        .24959E-07    .97425E-04
   3  Prefactor     .10000E-03    15.485       -.33422E-06** at limit **
   4  Prefactor     .10000E-03    4.6726       -.16212E-09** at limit **
   5  norm          .10000E-03    93.282       -.20361E-05** at limit **
   6  Prefactor     10.425        26.920       -.75385E-06   -.11374E-04
   7  Prefactor     43.256        39.169       -.33046E-05    .87277E-04
   8  Prefactor     .10000E-03    71.173        .10966E-04** at limit **
   9  Prefactor     29.703        26.207       -.27730E-05   -.16695E-04
  10  norm          13.586        16.589        .56615E-07   -.45752E-05
  11  norm          .76333        .51461        .59739E-08   -.21907E-03
  12  Prefactor     .10000E-03    37.041        .77793E-05** at limit **
  13  Prefactor     .10000E-03    32.185       -.62905E-05** at limit **
  14  norm          .10000E-03    10.480        .85020E-07** at limit **
  15  Prefactor     .10000E-03    9.0506       -.31365E-07** at limit **
  16  Prefactor     .10000E-03    29.565       -.65250E-05** at limit **
  17  Prefactor     1.2168        2.8663       -.85339E-06   -.11291E-02
  18  norm          2.2220        1.8868       -.18226E-06   -.80480E-03
  19  Prefactor     .10000E-03    25.670        .59211E-05** at limit **
  20  Normalizat    1.0970        .16882        .11003E-05   -.90252E-04
  21  Prefactor     .96284        .84506E-01   -.59540E-07   -.44971E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 3.5846
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 10.4252
  Prefactor  = 43.2564
  Prefactor  = 0.000100001
  Prefactor  = 29.7028
  norm       = 13.5858
  norm       = 0.763334
  Prefactor  = 0.000100002
  Prefactor  = 0.000100001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.000100001
  Prefactor  = 1.21677
  norm       = 2.22195
  Prefactor  = 0.000100001
  Normalizat = 1.09697
  Prefactor  = 0.962844
 **********
 **   18 **HESSE 
 **********

 FCN=   8585.383     FROM HESSE     STATUS=OK           313 CALLS     2494 TOTAL
                     EDM=   .12E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    4.3776        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     3.5846        4.0431        .19278E-03   -1.5329    
   3  Prefactor     .10000E-03    15.501        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    4.6757        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          .10000E-03    93.266        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     10.425        26.943        .12409E-03   -1.5062    
   7  Prefactor     43.256        39.020        .60951E-04   -1.4392    
   8  Prefactor     .10000E-03    73.594        .42870E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     29.703        26.356        .73502E-04   -1.4617    
  10  norm          13.586        16.589        .10867E-03   -1.4971    
  11  norm          .76333        .49815        .52488E-03   -1.5533    
  12  Prefactor     .10000E-03    36.501        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .10000E-03    31.844        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          .10000E-03    10.494        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .10000E-03    9.0697        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     .10000E-03    29.242        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     1.2168        2.9882        .24697E-03   -1.5487    
  18  norm          2.2220        1.8954        .11227E-03   -1.5410    
  19  Prefactor     .10000E-03    25.645        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Normalizat    1.0970        .19018        .30603E-03   -.89849    
  21  Prefactor     .96284        .95227E-01    .16946E-03   -.93978    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.22361e-09
Minuit parameter uncertainties:
  1  2.6943e-06
  2  4.0434
  3  8.44059e-06
  4  7.662e-07
  5  0.000194938
  6  26.9744
  7  39.0432
  8  0.000507478
  9  26.3665
  10  16.5951
  11  0.498154
  12  0.000473346
  13  0.000431807
  14  4.15006e-06
  15  1.775e-06
  16  0.000370047
  17  2.98857
  18  1.89542
  19  0.000318222
  20  0.190298
  21  0.0952432
Done.

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

Extracting fit parameters...

4FGL J0638.6+7320
   Spectrum: PowerLaw
267    Prefactor:  2.970e+01  2.637e+01  1.000e-04  1.000e+04 ( 1.000e-12)
268        Index:  3.027e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
269        Scale:  3.246e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
678    Prefactor:  9.628e-01  9.524e-02  0.000e+00  1.000e+01 ( 1.000e+00)
679        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
680        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
677   Normalization:  1.097e+00  1.903e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 1.67
Ra Dec: 99.671 73.344
Photon Index (Fixed Index): 3.03 +/- 0.00
Photon Flux (Fixed Index): 5.18e-08 +/- 4.59e-08
Energy Flux (Fixed Index): 1.02e-05 +/- 9.06e-06

TS (Fixed Index): 1.67
Ra Dec: 99.671 73.344
Photon Flux Upper Limit: 1.43e-07 ph cm-2 s-1
Energy Flux Upper Limit: 1.15e-02 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/585525/likelihoodResults_410400001_410659201_4FGL_J0638.6+7320_daily_bin660.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) = 8582.22109107
delta logL = 3.16155574737

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 8582.18943495
delta logL = 3.19321186296

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   8582.189     FROM MIGRAD    STATUS=CONVERGED     49 CALLS      266 TOTAL
                     EDM=   .19E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     4.7095        30.720        .46356E-02   -.43964E-03
   2  Index         6.1697        4.0117        .17360        .91765E-04
   3  Normalizat    1.0060        .74104E-01    .71653E-01   -.28887E-03
   4  Prefactor     .98996        .38687E-01    .46142E-01   -.76335E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 4.70948
  Index      = 6.16968
  Normalizat = 1.00599
  Prefactor  = 0.989963
 **********
 **   18 **HESSE 
 **********

 FCN=   8582.189     FROM HESSE     STATUS=NOT POSDEF    31 CALLS      297 TOTAL
                     EDM=   .42E-06    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     4.7095        45.205        .82516E-04   -1.5274    
   2  Index         6.1697        7.7078        .72143E-02    .23612    
   3  Normalizat    1.0060        .18173        .31701E-03   -.92830    
   4  Prefactor     .98996        .93379E-01    .16723E-03   -.93065    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 4.18244e-07
Minuit parameter uncertainties:
  1  29.2103
  2  6.07943
  3  0.181841
  4  0.0933942
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/585525': 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): 102
logL (Free Index) = 8582.18943494
delta logL = 3.19321187941

Extracting fit parameters...

4FGL J0638.6+7320
   Spectrum: PowerLaw
267    Prefactor:  4.709e+00  2.921e+01  1.000e-04  1.000e+04 ( 1.000e-12)
268        Index:  6.170e+00  6.079e+00  0.000e+00  1.000e+01 (-1.000e+00)
269        Scale:  3.246e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
678    Prefactor:  9.900e-01  9.339e-02  0.000e+00  1.000e+01 ( 1.000e+00)
679        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
680        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
677   Normalization:  1.006e+00  1.818e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 8.51
Ra Dec: 99.671 73.344
Photon Index (Free Index): 6.17 +/- 6.08
Photon Flux (Free Index): 1.31e-07 +/- 6.26e-08
Energy Flux (Free Index): 1.62e-05 +/- 1.05e-05

Creating a high resolution counts map...
INFO: Auto-setting vmin to -1.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  1.110e+00 [aplpy.core]
Saving /scratch/kocevski/585525/cmap_HighResolution_410400001_410659201_4FGL_J0638.6+7320_daily_bin660.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.15e-02', comment='SUCCESS', photon_flux='5.18e-08', energy_flux2='1.62e-05', photon_flux_error='4.59e-08', dlogl='3.19e+00', energy_flux='1.02e-05', photon_flux2='1.31e-07', job_status='DONE', time_completed='2021-08-25 13:52:03.756758', photon_index_error2='6.08', photon_index2='6.17', ts='1.67', fit_tolerance='1e-08', GAL='0.96', photon_index_error='0.00', photon_flux_upper_limit='1.43e-07', energy_flux_error2='1.05e-05', EG='1.10', time_epoch_completed='1629924723.76', return_code='0', job_id='585525', GAL2='0.99', EG2='1.01', return_code2='102', energy_flux_error='9.06e-06', photon_flux_error2='6.26e-08', ts2='8.51', photon_index='3.03' WHERE bin_id='660' AND source_name='4FGL J0638.6+7320' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Wed Aug 25 13:52:03 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0240>
Subject: Job 585525: <4FGL_J0638.6+7320_daily_bin660> in cluster <slac> Done

Job <4FGL_J0638.6+7320_daily_bin660> was submitted from host <rhel6-64d> by user <kocevski> in cluster <slac> at Wed Aug 25 13:35:55 2021
Job was executed on host(s) <bullet0240>, in queue <medium>, as user <kocevski> in cluster <slac> at Wed Aug 25 13:36:01 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Wed Aug 25 13:36:01 2021
Terminated at Wed Aug 25 13:52:04 2021
Results reported at Wed Aug 25 13:52:04 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J0638.6+7320_daily_bin660 99.6711 73.3438 410400001 410659201 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J0638.6+7320 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   936.13 sec.
    Max Memory :                                 1258 MB
    Average Memory :                             342.50 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   963 sec.
    Turnaround time :                            969 sec.

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

