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


Performing analysis on: 4FGL_J0502.5+1340_daily_bin1499
RA = 75.6341, Dec = 13.6685
tmin = 627868801, tmax = 628128001
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='929139', job_status='RUN', time_executed='2021-08-21 18:22:43.951287', time_epoch_executed='1629595363.95' WHERE source_name='4FGL J0502.5+1340' and cadence='daily' and bin_id='1499'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/929139

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/929139/ft1_4FGL_J0502.5+1340_daily_bin1499.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/929139/ft2_4FGL_J0502.5+1340_daily_bin1499.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/929139/ft1_4FGL_J0502.5+1340_daily_bin1499.fits outfile=/scratch/kocevski/929139/ft1_filteredMKT_4FGL_J0502.5+1340_daily_bin1499.fits ra=75.6341 dec=13.6685 rad=12.0 tmin=627868801.0 tmax=628128001.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.75
user 2.29
sys 0.39

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/929139/ft2_4FGL_J0502.5+1340_daily_bin1499.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/929139/ft2_4FGL_J0502.5+1340_daily_bin1499.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/929139/ft1_filteredMKT_4FGL_J0502.5+1340_daily_bin1499.fits evtable="EVENTS" outfile="/scratch/kocevski/929139/ft1_filtered_4FGL_J0502.5+1340_daily_bin1499.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.73
user 0.34
sys 0.37

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/929139/ft1_filtered_4FGL_J0502.5+1340_daily_bin1499.fits" evtable="EVENTS" scfile=/scratch/kocevski/929139/ft2_4FGL_J0502.5+1340_daily_bin1499.fits sctable="SC_DATA" outfile=/scratch/kocevski/929139/ltcube_627868801_628128001_4FGL_J0502.5+1340_daily_bin1499.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/929139/ft2_4FGL_J0502.5+1340_daily_bin1499.fits
.....................!
real 15.67
user 15.08
sys 0.55

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/929139/ft1_filtered_4FGL_J0502.5+1340_daily_bin1499.fits evtable="EVENTS" scfile=/scratch/kocevski/929139/ft2_4FGL_J0502.5+1340_daily_bin1499.fits sctable="SC_DATA" expcube=/scratch/kocevski/929139/ltcube_627868801_628128001_4FGL_J0502.5+1340_daily_bin1499.fits outfile=/scratch/kocevski/929139/expmap_627868801_628128001_4FGL_J0502.5+1340_daily_bin1499.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/929139/ltcube_627868801_628128001_4FGL_J0502.5+1340_daily_bin1499.fits
.....................!
real 190.24
user 185.32
sys 4.52

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 S 147 in ROI, make sure /nfs/farm/g/glast/g/LCRepository/Likelihood/ExtendedSources/Extended_archive_v18/Templates/S147.fits is the correct path to the extended template.
Extended source IC 443 in ROI with RadialGaussian spatial model.
Added 161 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 J0502.5+1340 @ 75.6341 13.6685

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/929139/ft1_filtered_4FGL_J0502.5+1340_daily_bin1499.fits scfile=/scratch/kocevski/929139/ft2_4FGL_J0502.5+1340_daily_bin1499.fits outfile=/scratch/kocevski/929139/cmap_627868801_628128001_4FGL_J0502.5+1340_daily_bin1499.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.6341 yref=13.6685 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.78
user 0.38
sys 0.35

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/929139/ft1_filtered_4FGL_J0502.5+1340_daily_bin1499.fits scfile=/scratch/kocevski/929139/ft2_4FGL_J0502.5+1340_daily_bin1499.fits outfile=/scratch/kocevski/929139/cmap_HighResolution_627868801_628128001_4FGL_J0502.5+1340_daily_bin1499.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.6341 yref=13.6685 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.77
user 0.38
sys 0.37

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/929139/ft1_filtered_4FGL_J0502.5+1340_daily_bin1499.fits evtable="EVENTS" scfile=/scratch/kocevski/929139/ft2_4FGL_J0502.5+1340_daily_bin1499.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/929139/Model_4FGL_J0502.5+1340_daily_bin1499.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 S 147
Working on...
/scratch/kocevski/929139/ft1_filtered_4FGL_J0502.5+1340_daily_bin1499.fits.....................!
real 138.67
user 136.77
sys 1.52

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/929139/ft1_filtered_4FGL_J0502.5+1340_daily_bin1499.fits', '/scratch/kocevski/929139/ft2_4FGL_J0502.5+1340_daily_bin1499.fits', expMap='/scratch/kocevski/929139/expmap_627868801_628128001_4FGL_J0502.5+1340_daily_bin1499.fits', expCube='/scratch/kocevski/929139/ltcube_627868801_628128001_4FGL_J0502.5+1340_daily_bin1499.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/929139/Model_4FGL_J0502.5+1340_daily_bin1499.xml', optimizer='MINUIT')

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

4FGL J0502.5+1340
   Spectrum: PowerLaw
218    Prefactor:  1.139e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-13)
219        Index:  2.232e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
220        Scale:  1.884e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/929139/ft1_filtered_4FGL_J0502.5+1340_daily_bin1499.fits
Spacecraft file(s): /scratch/kocevski/929139/ft2_4FGL_J0502.5+1340_daily_bin1499.fits
Exposure map: /scratch/kocevski/929139/expmap_627868801_628128001_4FGL_J0502.5+1340_daily_bin1499.fits
Exposure cube: /scratch/kocevski/929139/ltcube_627868801_628128001_4FGL_J0502.5+1340_daily_bin1499.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/929139/Model_4FGL_J0502.5+1340_daily_bin1499.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) = 5668.75232494

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

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 '    .16459E-02   1.0000         .10000E-03   10000.    
     3 'Prefactor '    .19359E-02   1.0000         .10000E-03   10000.    
     4 'norm      '    .10053E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    10.496       1.0000         .10000E-03   10000.    
     7 'norm      '    .10007E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10008E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    43.584       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10007E-03   1.0000         .10000E-03   10000.    
    11 'norm      '    .31052E-01   1.0000         .10000E-03   10000.    
    12 'norm      '    .10012E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    7.4956       1.0000         .10000E-03   10000.    
    14 'norm      '    .12179E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    4.6455       1.0000         .10000E-03   10000.    
    16 'Prefactor '    157.09       1.0000         .10000E-03   10000.    
    17 'norm      '    12.121       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10070E-03   1.0000         .10000E-03   10000.    
    19 'norm      '    27.777       1.0000         .10000E-03   10000.    
    20 'norm      '    1.6697       1.0000         .10000E-03   10000.    
    21 'Prefactor '    1.0961       1.0000         .10000E-03   10000.    
    22 'norm      '    .10006E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    7.0769       1.0000         .10000E-03   10000.    
    24 'Prefactor '    .28531E-03   1.0000         .10000E-03   10000.    
    25 'Prefactor '    53.281       1.0000         .10000E-03   10000.    
    26 'Prefactor '    .10059E-03   1.0000         .10000E-03   10000.    
    27 'Prefactor '    .10038E-03   1.0000         .10000E-03   10000.    
    28 'Normalizat'    .59308       1.0000         .10000E-01   10.000    
    29 'Prefactor '    .94682       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5520E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   5668.735     FROM MIGRAD    STATUS=CONVERGED    722 CALLS     3753 TOTAL
                     EDM=   .26E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  3.0%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    26.795       -.44885E-08** at limit **
   2  Prefactor     .10000E-03    315.63        .22656E-05** at limit **
   3  Prefactor     .10001E-03    371.62        .40890E-06** at limit **
   4  norm          .10000E-03    2.6175       -.10356E-06** at limit **
   5  Prefactor     .10000E-03    24.953       -.15380E-06** at limit **
   6  Prefactor     10.498        16.942       -.71512E-06   -.12239E-04
   7  norm          .10000E-03    1.6595       -.70590E-07** at limit **
   8  Prefactor     .10000E-03    18.583       -.11604E-06** at limit **
   9  Prefactor     43.539        47.240        .11931E-05   -.27019E-04
  10  Prefactor     .10000E-03    7.5829       -.62424E-07** at limit **
  11  norm          .33644E-01    .52926       -.96059E-07   -.11377E-02
  12  norm          .10000E-03    3.1120       -.24052E-06** at limit **
  13  Prefactor     7.4958        5.9428       -.15416E-06   -.59923E-04
  14  norm          .10000E-03    18.692       -.89486E-06** at limit **
  15  Prefactor     4.6590        10.912       -.55089E-06   -.25897E-04
  16  Prefactor     156.79        181.81        .20826E-05   -.54724E-04
  17  norm          12.120        9.1349        .74389E-07   -.15898E-04
  18  Prefactor     .10000E-03    88.308       -.51110E-06** at limit **
  19  norm          27.780        14.369       -.12531E-06   -.68318E-04
  20  norm          1.6679        2.0066        .79891E-06    .13557E-03
  21  Prefactor     1.0959        .27808       -.44966E-08   -.49966E-03
  22  norm          .10000E-03    4.9835        .36284E-07** at limit **
  23  Prefactor     7.0768        3.5884       -.61334E-07   -.96004E-04
  24  Prefactor     .10000E-03    50.236       -.38540E-06** at limit **
  25  Prefactor     53.259        48.393       -.14574E-05   -.68392E-04
  26  Prefactor     .10000E-03    41.130        .19555E-06** at limit **
  27  Prefactor     .10000E-03    7.6062       -.20871E-06** at limit **
  28  Normalizat    .59370        .53314        .92195E-05    .13235E-05
  29  Prefactor     .94664        .10599       -.12711E-05   -.17243E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.000100003
  Prefactor  = 0.000100006
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 10.4984
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 43.5391
  Prefactor  = 0.0001
  norm       = 0.0336444
  norm       = 0.0001
  Prefactor  = 7.49583
  norm       = 0.0001
  Prefactor  = 4.65897
  Prefactor  = 156.788
  norm       = 12.1199
  Prefactor  = 0.0001
  norm       = 27.7797
  norm       = 1.66792
  Prefactor  = 1.09595
  norm       = 0.0001
  Prefactor  = 7.07682
  Prefactor  = 0.0001
  Prefactor  = 53.2586
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Normalizat = 0.593705
  Prefactor  = 0.946639
 **********
 **   18 **HESSE 
 **********

 FCN=   5668.735     FROM HESSE     STATUS=OK           547 CALLS     4300 TOTAL
                     EDM=   .30E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    26.798        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    315.60        .20396E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .10001E-03    380.57        .40516E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  norm          .10000E-03    2.6557        .11891E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    24.954        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     10.498        17.010        .12367E-03   -1.5060    
   7  norm          .10000E-03    1.6683        .94712E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    18.591        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     43.539        49.074        .60726E-04   -1.4387    
  10  Prefactor     .10000E-03    7.5934        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  norm          .33644E-01    6.7341        .92794E-03   -1.5671    
  12  norm          .10000E-03    3.1384        .12962E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     7.4958        5.9442        .14649E-03   -1.5160    
  14  norm          .10000E-03    18.851        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     4.6590        10.871        .18673E-03   -1.5276    
  16  Prefactor     156.79        181.21        .16084E-03   -1.3197    
  17  norm          12.120        9.1415        .11506E-03   -1.5012    
  18  Prefactor     .10000E-03    88.547        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  norm          27.780        14.445        .76014E-04   -1.4653    
  20  norm          1.6679        2.0104        .52557E-03   -1.5450    
  21  Prefactor     1.0959        .28403        .16357E-04   -1.5499    
  22  norm          .10000E-03    5.0218        .16347E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     7.0768        3.6711        .82915E-04   -1.5176    
  24  Prefactor     .10000E-03    50.337        .21411E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     53.259        48.555        .54948E-04   -1.4247    
  26  Prefactor     .10000E-03    41.189        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  27  Prefactor     .10000E-03    7.7146        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  Normalizat    .59370        .54988        .87450E-03   -1.0825    
  29  Prefactor     .94664        .10642        .15289E-03   -.94530    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.04668e-09
Minuit parameter uncertainties:
  1  1.2039e-05
  2  0.0020529
  3  0.00307198
  4  3.64965e-06
  5  2.89161e-05
  6  17.0183
  7  1.4278e-06
  8  2.95079e-05
  9  49.1194
  10  3.91757e-06
  11  0.950667
  12  1.51049e-05
  13  5.94472
  14  5.96169e-06
  15  10.8753
  16  181.855
  17  9.14253
  18  0.000347416
  19  14.4465
  20  2.01049
  21  0.284031
  22  5.05081e-06
  23  3.67122
  24  0.000137542
  25  48.5906
  26  6.14546e-05
  27  6.08695e-06
  28  0.555058
  29  0.106443
Done.

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

Extracting fit parameters...

4FGL J0502.5+1340
   Spectrum: PowerLaw
218    Prefactor:  1.000e-04  3.918e-06  1.000e-04  1.000e+04 ( 1.000e-13)
219        Index:  2.232e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
220        Scale:  1.884e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
541    Prefactor:  9.466e-01  1.064e-01  0.000e+00  1.000e+01 ( 1.000e+00)
542        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
543        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
540   Normalization:  5.937e-01  5.551e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 75.634 13.668
Photon Flux Upper Limit: 1.99e-07 ph cm-2 s-1
Energy Flux Upper Limit: 1.52e-02 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/929139/likelihoodResults_627868801_628128001_4FGL_J0502.5+1340_daily_bin1499.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): 102
logL (Free Index) = 5668.73533547
delta logL = -0.00062730191712

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 5668.73471426
delta logL = -6.09223934589e-06

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10403E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.2126       1.0000          .0000       10.000    
     3 'Normalizat'    .59410       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .94637       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5520E+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=   5668.735     FROM MIGRAD    STATUS=CONVERGED     93 CALLS      249 TOTAL
                     EDM=   .58E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10117E-03    68.573        .18142E-02** at limit **
   2  Index         2.1595        8.0098        .50000        .17825E-04
   3  Normalizat    .59370        .36541E-01    .87441E-03    .37054E-05
   4  Prefactor     .94664        .80382E-02    .15289E-03    .27439E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000101173
  Index      = 2.15952
  Normalizat = 0.593705
  Prefactor  = 0.946639
 **********
 **   18 **HESSE 
 **********

 FCN=   5668.735     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      278 TOTAL
                     EDM=   .27E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10117E-03    300.67        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.1595        5.9431        .50000       -.60419    
   3  Normalizat    .59370        .79361E-01    .34976E-04   -1.0825    
   4  Prefactor     .94664        .17459E-01    .61155E-05   -.94530    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 2.65173e-08
Minuit parameter uncertainties:
  1  0.0377562
  2  571.401
  3  0.0793762
  4  0.0174589
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/929139': 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) = 5668.73470791
delta logL = 2.65726157522e-07

Extracting fit parameters...

4FGL J0502.5+1340
   Spectrum: PowerLaw
218    Prefactor:  1.012e-04  3.776e-02  1.000e-04  1.000e+04 ( 1.000e-13)
219        Index:  2.160e+00  5.714e+02  0.000e+00  1.000e+01 (-1.000e+00)
220        Scale:  1.884e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
541    Prefactor:  9.466e-01  1.746e-02  0.000e+00  1.000e+01 ( 1.000e+00)
542        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
543        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
540   Normalization:  5.937e-01  7.938e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 75.634 13.668

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/929139/cmap_HighResolution_627868801_628128001_4FGL_J0502.5+1340_daily_bin1499.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.52e-02', job_status='DONE', photon_flux_upper_limit='1.99e-07', time_completed='2021-08-21 18:36:20.661886', job_id='929139', GAL2='0.95', fit_tolerance='1e-08', EG2='0.59', EG='0.59', time_epoch_completed='1629596180.66', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.95', dlogl='2.66e-07', ts2='-0.00', photon_index_error='0.00', photon_index='2.23' WHERE bin_id='1499' AND source_name='4FGL J0502.5+1340' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Aug 21 18:36:20 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0043>
Subject: Job 929139: <4FGL_J0502.5+1340_daily_bin1499> in cluster <slac> Done

Job <4FGL_J0502.5+1340_daily_bin1499> was submitted from host <rhel6-64h> by user <kocevski> in cluster <slac> at Sat Aug 21 18:20:30 2021
Job was executed on host(s) <bullet0043>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Aug 21 18:20:31 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Sat Aug 21 18:20:31 2021
Terminated at Sat Aug 21 18:36:21 2021
Results reported at Sat Aug 21 18:36:21 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J0502.5+1340_daily_bin1499 75.6341 13.6685 627868801 628128001 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J0502.5+1340 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   810.00 sec.
    Max Memory :                                 1093 MB
    Average Memory :                             327.55 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   949 sec.
    Turnaround time :                            951 sec.

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

