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


Performing analysis on: 4FGL_J0502.4+0609_daily_bin651
RA = 75.6181, Dec = 6.1627
tmin = 408067201, tmax = 408326401
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='906203', job_status='RUN', time_executed='2021-08-21 17:10:01.600008', time_epoch_executed='1629591001.6' WHERE source_name='4FGL J0502.4+0609' and cadence='daily' and bin_id='651'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/906203

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/906203/ft1_4FGL_J0502.4+0609_daily_bin651.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/906203/ft2_4FGL_J0502.4+0609_daily_bin651.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/906203/ft1_4FGL_J0502.4+0609_daily_bin651.fits outfile=/scratch/kocevski/906203/ft1_filteredMKT_4FGL_J0502.4+0609_daily_bin651.fits ra=75.6181 dec=6.1627 rad=12.0 tmin=408067201.0 tmax=408326401.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.56
user 3.62
sys 0.92

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/906203/ft2_4FGL_J0502.4+0609_daily_bin651.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/906203/ft2_4FGL_J0502.4+0609_daily_bin651.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/906203/ft1_filteredMKT_4FGL_J0502.4+0609_daily_bin651.fits evtable="EVENTS" outfile="/scratch/kocevski/906203/ft1_filtered_4FGL_J0502.4+0609_daily_bin651.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.23
user 0.34
sys 0.86

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/906203/ft1_filtered_4FGL_J0502.4+0609_daily_bin651.fits" evtable="EVENTS" scfile=/scratch/kocevski/906203/ft2_4FGL_J0502.4+0609_daily_bin651.fits sctable="SC_DATA" outfile=/scratch/kocevski/906203/ltcube_408067201_408326401_4FGL_J0502.4+0609_daily_bin651.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/906203/ft2_4FGL_J0502.4+0609_daily_bin651.fits
.....................!
real 13.26
user 12.05
sys 1.13

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/906203/ft1_filtered_4FGL_J0502.4+0609_daily_bin651.fits evtable="EVENTS" scfile=/scratch/kocevski/906203/ft2_4FGL_J0502.4+0609_daily_bin651.fits sctable="SC_DATA" expcube=/scratch/kocevski/906203/ltcube_408067201_408326401_4FGL_J0502.4+0609_daily_bin651.fits outfile=/scratch/kocevski/906203/expmap_408067201_408326401_4FGL_J0502.4+0609_daily_bin651.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/906203/ltcube_408067201_408326401_4FGL_J0502.4+0609_daily_bin651.fits
.....................!
real 192.67
user 185.39
sys 6.66

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

Setting source of interest to:
4FGL J0502.4+0609 @ 75.6181 6.1627

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/906203/ft1_filtered_4FGL_J0502.4+0609_daily_bin651.fits scfile=/scratch/kocevski/906203/ft2_4FGL_J0502.4+0609_daily_bin651.fits outfile=/scratch/kocevski/906203/cmap_408067201_408326401_4FGL_J0502.4+0609_daily_bin651.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=75.6181 yref=6.1627 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.30
user 0.36
sys 0.84

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/906203/ft1_filtered_4FGL_J0502.4+0609_daily_bin651.fits scfile=/scratch/kocevski/906203/ft2_4FGL_J0502.4+0609_daily_bin651.fits outfile=/scratch/kocevski/906203/cmap_HighResolution_408067201_408326401_4FGL_J0502.4+0609_daily_bin651.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=75.6181 yref=6.1627 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.25
user 0.39
sys 0.83

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/906203/ft1_filtered_4FGL_J0502.4+0609_daily_bin651.fits evtable="EVENTS" scfile=/scratch/kocevski/906203/ft2_4FGL_J0502.4+0609_daily_bin651.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/906203/Model_4FGL_J0502.4+0609_daily_bin651.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/906203/ft1_filtered_4FGL_J0502.4+0609_daily_bin651.fits.......................!
real 58.89
user 56.26
sys 2.12

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/906203/ft1_filtered_4FGL_J0502.4+0609_daily_bin651.fits', '/scratch/kocevski/906203/ft2_4FGL_J0502.4+0609_daily_bin651.fits', expMap='/scratch/kocevski/906203/expmap_408067201_408326401_4FGL_J0502.4+0609_daily_bin651.fits', expCube='/scratch/kocevski/906203/ltcube_408067201_408326401_4FGL_J0502.4+0609_daily_bin651.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/906203/Model_4FGL_J0502.4+0609_daily_bin651.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J0502.4+0609'

4FGL J0502.4+0609
   Spectrum: PowerLaw
175    Prefactor:  7.487e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-13)
176        Index:  2.650e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
177        Scale:  9.046e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/906203/ft1_filtered_4FGL_J0502.4+0609_daily_bin651.fits
Spacecraft file(s): /scratch/kocevski/906203/ft2_4FGL_J0502.4+0609_daily_bin651.fits
Exposure map: /scratch/kocevski/906203/expmap_408067201_408326401_4FGL_J0502.4+0609_daily_bin651.fits
Exposure cube: /scratch/kocevski/906203/ltcube_408067201_408326401_4FGL_J0502.4+0609_daily_bin651.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/906203/Model_4FGL_J0502.4+0609_daily_bin651.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) = 2370.47235644

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
     2 'norm      '    106.72       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .13411E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    76.337       1.0000         .10000E-03   10000.    
     6 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    12.474       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10119E-03   1.0000         .10000E-03   10000.    
    10 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10016E-03   1.0000         .10000E-03   10000.    
    12 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    129.19       1.0000         .10000E-03   10000.    
    14 'Prefactor '    38.786       1.0000         .10000E-03   10000.    
    15 'norm      '    .10630E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    24.674       1.0000         .10000E-03   10000.    
    17 'norm      '    .10407E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    1.9841       1.0000         .10000E-03   10000.    
    19 'norm      '    .10856E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10365E-03   1.0000         .10000E-03   10000.    
    21 'norm      '    .10015E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    .11703E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10010E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    25 'norm      '    77.944       1.0000         .10000E-03   10000.    
    26 'norm      '    .10005E-03   1.0000         .10000E-03   10000.    
    27 'Prefactor '    .10028E-03   1.0000         .10000E-03   10000.    
    28 'Prefactor '    .10080E-03   1.0000         .10000E-03   10000.    
    29 'Normalizat'    .42908       1.0000         .10000E-01   10.000    
    30 'Prefactor '    .85311       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .4730E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   2370.395     FROM MIGRAD    STATUS=CONVERGED    800 CALLS     3971 TOTAL
                     EDM=   .77E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.3%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    92.772       -.35608E-05** at limit **
   2  norm          106.83        93.636        .13435E-05   -.27386E-04
   3  Prefactor     .10000E-03    7.0022        .23504E-05** at limit **
   4  Prefactor     .10000E-03    24.286       -.28637E-08** at limit **
   5  Prefactor     76.687        118.88       -.79497E-05   -.40991E-05
   6  norm          .10000E-03    2.9830       -.19715E-08** at limit **
   7  Prefactor     .10000E-03    76.304        .31137E-05** at limit **
   8  norm          12.468        7.1156        .24200E-06   -.39682E-04
   9  Prefactor     .10000E-03    27.120       -.77570E-06** at limit **
  10  norm          .10000E-03    5.3003        .29448E-08** at limit **
  11  Prefactor     .10000E-03    316.98       -.27123E-05** at limit **
  12  norm          .10000E-03    1.5625       -.29932E-07** at limit **
  13  Prefactor     129.09        118.05        .20172E-05    .63245E-05
  14  Prefactor     38.752        77.589        .74948E-07    .22814E-05
  15  norm          .10000E-03    .97870       -.24875E-06** at limit **
  16  Prefactor     24.635        37.252        .26812E-06   -.17480E-05
  17  norm          .10000E-03    6.3066       -.12265E-06** at limit **
  18  Prefactor     1.9858        17.678        .19193E-05   -.91479E-04
  19  norm          .10000E-03    156.61        .23520E-05** at limit **
  20  Prefactor     .10000E-03    29.054        .14435E-06** at limit **
  21  norm          .10000E-03    56.675       -.95462E-06** at limit **
  22  Prefactor     .10000E-03    780.42       -.19176E-04** at limit **
  23  Prefactor     .10000E-03    36.356        .20281E-05** at limit **
  24  Prefactor     .10000E-03    3.7537       -.27912E-07** at limit **
  25  norm          77.929        47.135       -.76751E-07    .13042E-04
  26  norm          .10000E-03    1.0106       -.64415E-08** at limit **
  27  Prefactor     .10000E-03    27.336        .52634E-06** at limit **
  28  Prefactor     .10000E-03    35.535       -.20505E-05** at limit **
  29  Normalizat    .42990        .63017        .75077E-06   -.71266E-06
  30  Prefactor     .85296        .15396       -.18905E-06    .13319E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  norm       = 106.831
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 76.6869
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 12.4678
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 129.086
  Prefactor  = 38.7515
  norm       = 0.0001
  Prefactor  = 24.6348
  norm       = 0.0001
  Prefactor  = 1.98576
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.000100004
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 77.9294
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Normalizat = 0.429902
  Prefactor  = 0.852961
 **********
 **   18 **HESSE 
 **********

 FCN=   2370.395     FROM HESSE     STATUS=OK           574 CALLS     4545 TOTAL
                     EDM=   .14E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    92.458        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  norm          106.83        92.962        .38930E-04   -1.3637    
   3  Prefactor     .10000E-03    7.1953        .25058E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    24.286        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     76.687        119.57        .22979E-03   -1.3954    
   6  norm          .10000E-03    2.9853        .82125E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    76.036        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          12.468        6.9520        .84932E-04   -1.5002    
   9  Prefactor     .10000E-03    27.216        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          .10000E-03    5.3062        .10947E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    318.31        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm          .10000E-03    1.5808        .59284E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     129.09        114.91        .17711E-03   -1.3431    
  14  Prefactor     38.752        77.599        .64358E-04   -1.4462    
  15  norm          .10000E-03    .99408        .93370E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     24.635        36.469        .80642E-04   -1.4715    
  17  norm          .10000E-03    6.3230        .11933E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     1.9858        18.476        .14710E-02   -1.5426    
  19  norm          .10000E-03    156.54        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10000E-03    29.066        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  norm          .10000E-03    56.847        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     .10000E-03    770.97        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10000E-03    36.259        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     .10000E-03    3.7576        .92115E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  norm          77.929        47.278        .45486E-04   -1.3940    
  26  norm          .10000E-03    1.0304        .47776E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  27  Prefactor     .10000E-03    27.334        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  Prefactor     .10000E-03    35.431        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  29  Normalizat    .42990        .56448        .69576E-03   -1.1578    
  30  Prefactor     .85296        .14376        .13851E-03   -.97805    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.36805e-10
Minuit parameter uncertainties:
  1  0.000227576
  2  93.0896
  3  9.96491e-05
  4  1.63001e-06
  5  119.943
  6  7.64864e-07
  7  0.000186641
  8  6.95245
  9  7.68385e-06
  10  1.68752e-06
  11  0.000627028
  12  1.54001e-06
  13  115.112
  14  77.8019
  15  6.53136e-06
  16  36.5017
  17  1.23449e-05
  18  12.119
  19  0.000239439
  20  1.15763e-05
  21  3.70458e-05
  22  0.00364102
  23  9.30864e-05
  24  6.47816e-07
  25  47.3011
  26  4.49208e-07
  27  2.00849e-05
  28  8.17021e-05
  29  0.572222
  30  0.143827
Done.

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

Extracting fit parameters...

4FGL J0502.4+0609
   Spectrum: PowerLaw
175    Prefactor:  1.291e+02  1.151e+02  1.000e-04  1.000e+04 ( 1.000e-13)
176        Index:  2.650e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
177        Scale:  9.046e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
470    Prefactor:  8.530e-01  1.438e-01  0.000e+00  1.000e+01 ( 1.000e+00)
471        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
472        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
469   Normalization:  4.299e-01  5.722e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 2.07
Ra Dec: 75.618 6.163
Photon Index (Fixed Index): 2.65 +/- 0.00
Photon Flux (Fixed Index): 2.68e-07 +/- 2.39e-07
Energy Flux (Fixed Index): 6.73e-05 +/- 6.00e-05

TS (Fixed Index): 2.07
Ra Dec: 75.618 6.163
Photon Flux Upper Limit: 7.66e-07 ph cm-2 s-1
Energy Flux Upper Limit: 6.01e-02 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/906203/likelihoodResults_408067201_408326401_4FGL_J0502.4+0609_daily_bin651.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) = 2370.0344215
delta logL = 0.360909563914

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 2370.02949495
delta logL = 0.365836120597

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    49.843       1.0000         .10000E-03   10000.    
     2 'Index     '    3.4230       1.0000          .0000       10.000    
     3 'Normalizat'    .36542       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .86615       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .4730E+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=   2370.029     FROM MIGRAD    STATUS=CONVERGED     88 CALLS      302 TOTAL
                     EDM=   .20E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     49.776        125.67        .56802E-04    .99873E-04
   2  Index         3.4234        1.4032        .38390E-02    .76519E-04
   3  Normalizat    .36602        .50177        .74966E-03    .90991E-07
   4  Prefactor     .86611        .13778        .13750E-03    .22023E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 49.776
  Index      = 3.42339
  Normalizat = 0.366021
  Prefactor  = 0.866114
 **********
 **   18 **HESSE 
 **********

 FCN=   2370.029     FROM HESSE     STATUS=OK            25 CALLS      327 TOTAL
                     EDM=   .17E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     49.776        97.244        .11360E-04   -1.4296    
   2  Index         3.4234        1.0895        .15356E-03   -.32080    
   3  Normalizat    .36602        .50161        .29986E-04   -1.1910    
   4  Prefactor     .86611        .13750        .27500E-04   -.97335    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.7067e-10
Minuit parameter uncertainties:
  1  97.5556
  2  1.09936
  3  0.507951
  4  0.137559
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/906203': 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) = 2370.0294935
delta logL = 0.365837563868

Extracting fit parameters...

4FGL J0502.4+0609
   Spectrum: PowerLaw
175    Prefactor:  4.978e+01  9.756e+01  1.000e-04  1.000e+04 ( 1.000e-13)
176        Index:  3.423e+00  1.099e+00  0.000e+00  1.000e+01 (-1.000e+00)
177        Scale:  9.046e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
470    Prefactor:  8.661e-01  1.376e-01  0.000e+00  1.000e+01 ( 1.000e+00)
471        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
472        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
469   Normalization:  3.660e-01  5.080e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 2.93
Ra Dec: 75.618 6.163
Photon Index (Free Index): 3.42 +/- 1.10
Photon Flux (Free Index): 3.87e-07 +/- 3.04e-07
Energy Flux (Free Index): 6.58e-05 +/- 5.16e-05

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/906203/cmap_HighResolution_408067201_408326401_4FGL_J0502.4+0609_daily_bin651.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='6.01e-02', comment='SUCCESS', photon_flux='2.68e-07', energy_flux2='6.58e-05', photon_flux_error='2.39e-07', dlogl='3.66e-01', energy_flux='6.73e-05', photon_flux2='3.87e-07', job_status='DONE', time_completed='2021-08-21 17:18:21.839975', photon_index_error2='1.10', photon_index2='3.42', ts='2.07', fit_tolerance='1e-08', GAL='0.85', photon_index_error='0.00', photon_flux_upper_limit='7.66e-07', energy_flux_error2='5.16e-05', EG='0.43', time_epoch_completed='1629591501.84', return_code='0', job_id='906203', GAL2='0.87', EG2='0.37', return_code2='0', energy_flux_error='6.00e-05', photon_flux_error2='3.04e-07', ts2='2.93', photon_index='2.65' WHERE bin_id='651' AND source_name='4FGL J0502.4+0609' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Aug 21 17:18:21 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0050>
Subject: Job 906203: <4FGL_J0502.4+0609_daily_bin651> in cluster <slac> Done

Job <4FGL_J0502.4+0609_daily_bin651> was submitted from host <rhel6-64p> by user <kocevski> in cluster <slac> at Sat Aug 21 17:05:41 2021
Job was executed on host(s) <bullet0050>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Aug 21 17:05:43 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Sat Aug 21 17:05:43 2021
Terminated at Sat Aug 21 17:18:22 2021
Results reported at Sat Aug 21 17:18:22 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J0502.4+0609_daily_bin651 75.6181 6.1627 408067201 408326401 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J0502.4+0609 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   510.00 sec.
    Max Memory :                                 1093 MB
    Average Memory :                             242.59 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   759 sec.
    Turnaround time :                            761 sec.

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

