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


Performing analysis on: 4FGL_J0502.5+1340_daily_bin1194
RA = 75.6341, Dec = 13.6685
tmin = 548812801, tmax = 549072001
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='924985', job_status='RUN', time_executed='2021-08-21 18:09:02.831619', time_epoch_executed='1629594542.83' WHERE source_name='4FGL J0502.5+1340' and cadence='daily' and bin_id='1194'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/924985

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/924985/ft1_4FGL_J0502.5+1340_daily_bin1194.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/924985/ft2_4FGL_J0502.5+1340_daily_bin1194.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/924985/ft1_4FGL_J0502.5+1340_daily_bin1194.fits outfile=/scratch/kocevski/924985/ft1_filteredMKT_4FGL_J0502.5+1340_daily_bin1194.fits ra=75.6341 dec=13.6685 rad=12.0 tmin=548812801.0 tmax=549072001.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 3.44
user 2.61
sys 0.80

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/924985/ft2_4FGL_J0502.5+1340_daily_bin1194.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/924985/ft1_filteredMKT_4FGL_J0502.5+1340_daily_bin1194.fits evtable="EVENTS" outfile="/scratch/kocevski/924985/ft1_filtered_4FGL_J0502.5+1340_daily_bin1194.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.14
user 0.33
sys 0.80

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/924985/ft1_filtered_4FGL_J0502.5+1340_daily_bin1194.fits" evtable="EVENTS" scfile=/scratch/kocevski/924985/ft2_4FGL_J0502.5+1340_daily_bin1194.fits sctable="SC_DATA" outfile=/scratch/kocevski/924985/ltcube_548812801_549072001_4FGL_J0502.5+1340_daily_bin1194.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/924985/ft2_4FGL_J0502.5+1340_daily_bin1194.fits
.....................!
real 13.31
user 12.21
sys 1.06

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/924985/ft1_filtered_4FGL_J0502.5+1340_daily_bin1194.fits evtable="EVENTS" scfile=/scratch/kocevski/924985/ft2_4FGL_J0502.5+1340_daily_bin1194.fits sctable="SC_DATA" expcube=/scratch/kocevski/924985/ltcube_548812801_549072001_4FGL_J0502.5+1340_daily_bin1194.fits outfile=/scratch/kocevski/924985/expmap_548812801_549072001_4FGL_J0502.5+1340_daily_bin1194.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/924985/ltcube_548812801_549072001_4FGL_J0502.5+1340_daily_bin1194.fits
.....................!
real 190.48
user 185.16
sys 4.93

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/924985/ft1_filtered_4FGL_J0502.5+1340_daily_bin1194.fits scfile=/scratch/kocevski/924985/ft2_4FGL_J0502.5+1340_daily_bin1194.fits outfile=/scratch/kocevski/924985/cmap_548812801_549072001_4FGL_J0502.5+1340_daily_bin1194.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 1.15
user 0.37
sys 0.77

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/924985/ft1_filtered_4FGL_J0502.5+1340_daily_bin1194.fits scfile=/scratch/kocevski/924985/ft2_4FGL_J0502.5+1340_daily_bin1194.fits outfile=/scratch/kocevski/924985/cmap_HighResolution_548812801_549072001_4FGL_J0502.5+1340_daily_bin1194.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 1.17
user 0.38
sys 0.78

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/924985/ft1_filtered_4FGL_J0502.5+1340_daily_bin1194.fits evtable="EVENTS" scfile=/scratch/kocevski/924985/ft2_4FGL_J0502.5+1340_daily_bin1194.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/924985/Model_4FGL_J0502.5+1340_daily_bin1194.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/924985/ft1_filtered_4FGL_J0502.5+1340_daily_bin1194.fits......................!
real 40.55
user 38.33
sys 2.05

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/924985/ft1_filtered_4FGL_J0502.5+1340_daily_bin1194.fits', '/scratch/kocevski/924985/ft2_4FGL_J0502.5+1340_daily_bin1194.fits', expMap='/scratch/kocevski/924985/expmap_548812801_549072001_4FGL_J0502.5+1340_daily_bin1194.fits', expCube='/scratch/kocevski/924985/ltcube_548812801_549072001_4FGL_J0502.5+1340_daily_bin1194.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/924985/Model_4FGL_J0502.5+1340_daily_bin1194.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/924985/ft1_filtered_4FGL_J0502.5+1340_daily_bin1194.fits
Spacecraft file(s): /scratch/kocevski/924985/ft2_4FGL_J0502.5+1340_daily_bin1194.fits
Exposure map: /scratch/kocevski/924985/expmap_548812801_549072001_4FGL_J0502.5+1340_daily_bin1194.fits
Exposure cube: /scratch/kocevski/924985/ltcube_548812801_549072001_4FGL_J0502.5+1340_daily_bin1194.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/924985/Model_4FGL_J0502.5+1340_daily_bin1194.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) = 1255.77399242

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    71.179       1.0000         .10000E-03   10000.    
     2 'Prefactor '    3.3880       1.0000         .10000E-03   10000.    
     3 'Prefactor '   10000.0       1.0000         .10000E-03   10000.    
     4 'norm      '    5.7779       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10552E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     7 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    143.78       1.0000         .10000E-03   10000.    
     9 'Prefactor '    49.828       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10041E-03   1.0000         .10000E-03   10000.    
    11 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    12 'norm      '    10.883       1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10011E-03   1.0000         .10000E-03   10000.    
    14 'norm      '    .10149E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10015E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10555E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    20.678       1.0000         .10000E-03   10000.    
    18 'Prefactor '    40.785       1.0000         .10000E-03   10000.    
    19 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    20 'norm      '    2.9338       1.0000         .10000E-03   10000.    
    21 'Prefactor '    .74887       1.0000         .10000E-03   10000.    
    22 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    2.2551       1.0000         .10000E-03   10000.    
    24 'Prefactor '    64.392       1.0000         .10000E-03   10000.    
    25 'Prefactor '    .10024E-03   1.0000         .10000E-03   10000.    
    26 'Prefactor '    .10030E-03   1.0000         .10000E-03   10000.    
    27 'Prefactor '    .10008E-03   1.0000         .10000E-03   10000.    
    28 'Normalizat'    .10000E-01   1.0000         .10000E-01   10.000    
    29 'Prefactor '    .97991       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=   1255.391     FROM MIGRAD    STATUS=CONVERGED    719 CALLS     5069 TOTAL
                     EDM=   .50E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .0%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     71.192        204.04        .33871E-06   -.24606E-05
   2  Prefactor     .10038E-03    8383.2        .31779E-05** at limit **
   3  Prefactor    10000.0        9215.1        .38910E-06** at limit **
   4  norm          5.7761        12.255        .35805E-06   -.10212E-04
   5  Prefactor     .10000E-03    133.76        .62185E-07** at limit **
   6  Prefactor     .10000E-03    13.354        .13663E-07** at limit **
   7  norm          .10000E-03    8.5627        .11497E-07** at limit **
   8  Prefactor     143.76        199.90       -.64444E-06   -.95695E-05
   9  Prefactor     49.856        147.67       -.24715E-05   -.13021E-04
  10  Prefactor     .10000E-03    48.948        .58747E-08** at limit **
  11  norm          .10000E-03    .73683        .31622E-06** at limit **
  12  norm          10.884        11.673       -.12497E-06   -.33630E-04
  13  Prefactor     .10000E-03    64.028        .20212E-06** at limit **
  14  norm          .10000E-03    54.046        .54196E-08** at limit **
  15  Prefactor     .10000E-03    17.393       -.12848E-07** at limit **
  16  Prefactor     .10000E-03    262.42       -.16247E-07** at limit **
  17  norm          20.686        56.885        .47196E-06   -.87687E-05
  18  Prefactor     40.919        913.16       -.38612E-05   -.36723E-05
  19  norm          .10000E-03    12.995       -.31945E-07** at limit **
  20  norm          2.9356        5.0314        .19281E-06    .19058E-04
  21  Prefactor     .74903        .49341       -.11208E-06    .38159E-04
  22  norm          .10000E-03    5.9685        .70500E-08** at limit **
  23  Prefactor     2.2499        5.2837        .85971E-06   -.15526E-04
  24  Prefactor     64.375        122.30       -.61077E-05   -.63747E-05
  25  Prefactor     .10001E-03    397.13       -.15617E-05** at limit **
  26  Prefactor     .10000E-03    41.254       -.28049E-07** at limit **
  27  Prefactor     .10000E-03    8.7656       -.30126E-07** at limit **
  28  Normalizat    .10000E-01    .17411        .13021E-05** at limit **
  29  Prefactor     .97990        .15679       -.76299E-06   -.59469E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 71.1921
  Prefactor  = 0.000100381
  Prefactor  = 10000
  norm       = 5.77615
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 143.758
  Prefactor  = 49.8561
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 10.8836
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 20.6857
  Prefactor  = 40.9189
  norm       = 0.0001
  norm       = 2.93565
  Prefactor  = 0.749027
  norm       = 0.0001
  Prefactor  = 2.24994
  Prefactor  = 64.3748
  Prefactor  = 0.000100007
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Normalizat = 0.01
  Prefactor  = 0.979903
 **********
 **   18 **HESSE 
 **********

 FCN=   1255.391     FROM HESSE     STATUS=OK           537 CALLS     5606 TOTAL
                     EDM=   .93E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     71.192        204.10        .47582E-04   -1.4018    
   2  Prefactor     .10038E-03    8386.8        .10991E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor    10000.0        9215.1        .19742E-02    1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  norm          5.7761        12.231        .16380E-03   -1.5227    
   5  Prefactor     .10000E-03    133.76        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    13.355        .12649E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  norm          .10000E-03    8.5629        .10128E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     143.76        200.16        .33602E-04   -1.3304    
   9  Prefactor     49.856        147.57        .56810E-04   -1.4295    
  10  Prefactor     .10000E-03    48.949        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  norm          .10000E-03    .74837        .29774E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm          10.884        11.665        .11113E-03   -1.5048    
  13  Prefactor     .10000E-03    64.974        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          .10000E-03    54.046        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .10000E-03    17.395        .14437E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     .10000E-03    262.43        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          20.686        56.716        .88081E-04   -1.4798    
  18  Prefactor     40.919        906.87        .62766E-04   -1.4428    
  19  norm          .10000E-03    13.007        .12476E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  norm          2.9356        4.9707        .83644E-04   -1.5365    
  21  Prefactor     .74903        .50772        .14999E-04   -1.5535    
  22  norm          .10000E-03    5.9751        .84503E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     2.2499        5.2380        .87367E-04   -1.5408    
  24  Prefactor     64.375        121.70        .50010E-04   -1.4102    
  25  Prefactor     .10001E-03    396.04        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  Prefactor     .10000E-03    41.258        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  27  Prefactor     .10000E-03    8.7895        .10245E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  Normalizat    .10000E-01    .17948        .91529E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  29  Prefactor     .97990        .16136        .14663E-03   -.93402    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 9.30173e-11
Minuit parameter uncertainties:
  1  206.155
  2  0.656186
  3  0.00405898
  4  12.2363
  5  2.49628e-05
  6  1.76651e-06
  7  1.42687e-06
  8  201.114
  9  148.674
  10  1.75951e-05
  11  3.19509e-06
  12  11.6674
  13  0.000250715
  14  9.48889e-06
  15  4.46039e-06
  16  6.42609e-05
  17  56.8648
  18  392.201
  19  2.20258e-05
  20  4.97135
  21  0.50772
  22  7.27021e-06
  23  5.23904
  24  122.171
  25  0.00342254
  26  5.4793e-06
  27  1.50963e-05
  28  2.4786e-06
  29  0.161444
Done.

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

Extracting fit parameters...

4FGL J0502.5+1340
   Spectrum: PowerLaw
218    Prefactor:  1.000e-04  1.760e-05  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.799e-01  1.614e-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:  1.000e-02  2.479e-06  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.61e-06 ph cm-2 s-1
Energy Flux Upper Limit: 1.23e-01 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/924985/likelihoodResults_548812801_549072001_4FGL_J0502.5+1340_daily_bin1194.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) = 1255.39118736
delta logL = -9.72671446107e-05

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 1255.39109131
delta logL = -1.21392690744e-06

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .15477E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.4771       1.0000          .0000       10.000    
     3 'Normalizat'    .10000E-01   1.0000         .10000E-01   10.000    
     4 'Prefactor '    .97990       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=   1255.391     FROM MIGRAD    STATUS=CONVERGED     91 CALLS      279 TOTAL
                     EDM=   .15E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10287E-03    23.417        .18142E-01** at limit **
   2  Index         2.4055        6.1984        .50000        .83870E-05
   3  Normalizat    .10000E-01    .21904E-03    .91529E-03** at limit **
   4  Prefactor     .97990        .43872E-02    .14663E-03    .11708E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000102869
  Index      = 2.40552
  Normalizat = 0.01
  Prefactor  = 0.979904
 **********
 **   18 **HESSE 
 **********

 FCN=   1255.391     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      308 TOTAL
                     EDM=   .12E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10287E-03    190.77        .21509E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.4055        5.8399        .50000       -.54556    
   3  Normalizat    .10000E-01    .18100E-02    .18306E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .97990        .12612E-01    .58651E-05   -.93402    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 1.24812e-09
Minuit parameter uncertainties:
  1  0.0469363
  2  320.721
  3  1.71419e-08
  4  0.0126117
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/924985': 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) = 1255.39109041
delta logL = -3.11638359562e-07

Extracting fit parameters...

4FGL J0502.5+1340
   Spectrum: PowerLaw
218    Prefactor:  1.029e-04  4.694e-02  1.000e-04  1.000e+04 ( 1.000e-13)
219        Index:  2.406e+00  3.207e+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.799e-01  1.261e-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:  1.000e-02  1.714e-08  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/924985/cmap_HighResolution_548812801_549072001_4FGL_J0502.5+1340_daily_bin1194.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.23e-01', job_status='DONE', photon_flux_upper_limit='1.61e-06', time_completed='2021-08-21 18:16:28.571162', job_id='924985', GAL2='0.98', fit_tolerance='1e-08', EG2='0.01', EG='0.01', time_epoch_completed='1629594988.57', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.98', dlogl='-3.12e-07', ts2='-0.00', photon_index_error='0.00', photon_index='2.23' WHERE bin_id='1194' AND source_name='4FGL J0502.5+1340' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Aug 21 18:16:28 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0078>
Subject: Job 924985: <4FGL_J0502.5+1340_daily_bin1194> in cluster <slac> Done

Job <4FGL_J0502.5+1340_daily_bin1194> was submitted from host <rhel6-64d> by user <kocevski> in cluster <slac> at Sat Aug 21 18:05:26 2021
Job was executed on host(s) <bullet0078>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Aug 21 18:05:27 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:05:27 2021
Terminated at Sat Aug 21 18:16:29 2021
Results reported at Sat Aug 21 18:16:29 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J0502.5+1340_daily_bin1194 75.6341 13.6685 548812801 549072001 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 :                                   452.21 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             282.77 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   661 sec.
    Turnaround time :                            663 sec.

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

