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


Performing analysis on: 4FGL_J0502.5+1340_daily_bin1215
RA = 75.6341, Dec = 13.6685
tmin = 554256001, tmax = 554515201
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='926171', job_status='RUN', time_executed='2021-08-21 18:12:52.826934', time_epoch_executed='1629594772.83' WHERE source_name='4FGL J0502.5+1340' and cadence='daily' and bin_id='1215'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/926171

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/926171/ft1_4FGL_J0502.5+1340_daily_bin1215.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/926171/ft2_4FGL_J0502.5+1340_daily_bin1215.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/926171/ft1_4FGL_J0502.5+1340_daily_bin1215.fits outfile=/scratch/kocevski/926171/ft1_filteredMKT_4FGL_J0502.5+1340_daily_bin1215.fits ra=75.6341 dec=13.6685 rad=12.0 tmin=554256001.0 tmax=554515201.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 12.50
user 3.80
sys 8.66

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/926171/ft1_filtered_4FGL_J0502.5+1340_daily_bin1215.fits" evtable="EVENTS" scfile=/scratch/kocevski/926171/ft2_4FGL_J0502.5+1340_daily_bin1215.fits sctable="SC_DATA" outfile=/scratch/kocevski/926171/ltcube_554256001_554515201_4FGL_J0502.5+1340_daily_bin1215.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/926171/ft2_4FGL_J0502.5+1340_daily_bin1215.fits
.....................!
real 21.70
user 11.63
sys 9.91

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/926171/ft1_filtered_4FGL_J0502.5+1340_daily_bin1215.fits evtable="EVENTS" scfile=/scratch/kocevski/926171/ft2_4FGL_J0502.5+1340_daily_bin1215.fits sctable="SC_DATA" expcube=/scratch/kocevski/926171/ltcube_554256001_554515201_4FGL_J0502.5+1340_daily_bin1215.fits outfile=/scratch/kocevski/926171/expmap_554256001_554515201_4FGL_J0502.5+1340_daily_bin1215.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/926171/ltcube_554256001_554515201_4FGL_J0502.5+1340_daily_bin1215.fits
.....................!
real 203.39
user 185.47
sys 17.28

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/926171/ft1_filtered_4FGL_J0502.5+1340_daily_bin1215.fits scfile=/scratch/kocevski/926171/ft2_4FGL_J0502.5+1340_daily_bin1215.fits outfile=/scratch/kocevski/926171/cmap_554256001_554515201_4FGL_J0502.5+1340_daily_bin1215.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 9.43
user 0.38
sys 9.01

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/926171/ft1_filtered_4FGL_J0502.5+1340_daily_bin1215.fits scfile=/scratch/kocevski/926171/ft2_4FGL_J0502.5+1340_daily_bin1215.fits outfile=/scratch/kocevski/926171/cmap_HighResolution_554256001_554515201_4FGL_J0502.5+1340_daily_bin1215.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 9.50
user 0.39
sys 9.06

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .43141E-01   1.0000         .10000E-03   10000.    
     2 'Prefactor '    1.5878       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .85879       1.0000         .10000E-03   10000.    
     4 'norm      '    .10128E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .88309       1.0000         .10000E-03   10000.    
     6 'Prefactor '    34.413       1.0000         .10000E-03   10000.    
     7 'norm      '    .15732E-02   1.0000         .10000E-03   10000.    
     8 'Prefactor '    23.265       1.0000         .10000E-03   10000.    
     9 'Prefactor '    19.862       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .28123E-03   1.0000         .10000E-03   10000.    
    11 'norm      '    .92498       1.0000         .10000E-03   10000.    
    12 'norm      '    1.8784       1.0000         .10000E-03   10000.    
    13 'Prefactor '    .66100E-03   1.0000         .10000E-03   10000.    
    14 'norm      '    .33005E-02   1.0000         .10000E-03   10000.    
    15 'Prefactor '    .41431E-02   1.0000         .10000E-03   10000.    
    16 'Prefactor '    14.314       1.0000         .10000E-03   10000.    
    17 'norm      '    .45155E-01   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .66703       1.0000         .10000E-03   10000.    
    19 'norm      '    .60538E-02   1.0000         .10000E-03   10000.    
    20 'norm      '    15.217       1.0000         .10000E-03   10000.    
    21 'Prefactor '    .83517       1.0000         .10000E-03   10000.    
    22 'norm      '    46.680       1.0000         .10000E-03   10000.    
    23 'Prefactor '    11.808       1.0000         .10000E-03   10000.    
    24 'Prefactor '    1.1378       1.0000         .10000E-03   10000.    
    25 'Prefactor '    8.7530       1.0000         .10000E-03   10000.    
    26 'Prefactor '    .35755       1.0000         .10000E-03   10000.    
    27 'Prefactor '    .11106E-02   1.0000         .10000E-03   10000.    
    28 'Normalizat'    .10000E-01   1.0000         .10000E-01   10.000    
    29 'Prefactor '    .60931       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5520E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   348.4224     FROM MIGRAD    STATUS=CONVERGED    462 CALLS     2890 TOTAL
                     EDM=   .46E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.0%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    179.17        .17262E-05** at limit **
   2  Prefactor     .10000E-03    235.76        .11042E-05** at limit **
   3  Prefactor     3.0389        885.40        .23540E-04   -.40784E-05
   4  norm          .10000E-03    13.698       -.32863E-07** at limit **
   5  Prefactor     .10000E-03    454.26        .75487E-06** at limit **
   6  Prefactor     34.024        78.203        .20035E-04    .10328E-04
   7  norm          .10000E-03    26.711        .20676E-06** at limit **
   8  Prefactor     50.540        211.22       -.58784E-04   -.10814E-04
   9  Prefactor     .10002E-03    1493.2        .12780E-04** at limit **
  10  Prefactor     .10000E-03    49.926        .41106E-06** at limit **
  11  norm          .98177        2.4354        .49131E-06    .10999E-03
  12  norm          2.4536        32.441       -.18446E-05   -.51631E-05
  13  Prefactor     .10000E-03    19.407       -.19327E-06** at limit **
  14  norm          .10000E-03    40.195       -.65594E-06** at limit **
  15  Prefactor     .10000E-03    37.208        .70425E-06** at limit **
  16  Prefactor     937.75        1226.7        .18834E-04    .55691E-05
  17  norm          .10000E-03    74.007        .43381E-06** at limit **
  18  Prefactor     .10000E-03    329.56        .11834E-05** at limit **
  19  norm          .10000E-03    239.08        .54129E-05** at limit **
  20  norm          14.897        10.631       -.13804E-06    .42339E-04
  21  Prefactor     .88469        2.3770        .11931E-05    .12344E-04
  22  norm          48.536        86.169       -.84738E-05   -.33743E-04
  23  Prefactor     4.6201        14.778       -.32789E-05    .18881E-04
  24  Prefactor     .10000E-03    553.23       -.19878E-05** at limit **
  25  Prefactor     43.644        398.85        .99763E-05    .17596E-05
  26  Prefactor     .10000E-03    744.96        .13071E-04** at limit **
  27  Prefactor     .10000E-03    35.719       -.18074E-05** at limit **
  28  Normalizat    .10000E-01    .50471       -.30284E-05** at limit **
  29  Prefactor     .58680        .21262       -.47657E-05    .10430E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 3.03893
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 34.0245
  norm       = 0.0001
  Prefactor  = 50.5399
  Prefactor  = 0.000100022
  Prefactor  = 0.0001
  norm       = 0.981775
  norm       = 2.45358
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 937.747
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 14.897
  Prefactor  = 0.884686
  norm       = 48.5361
  Prefactor  = 4.62005
  Prefactor  = 0.0001
  Prefactor  = 43.644
  Prefactor  = 0.000100003
  Prefactor  = 0.0001
  Normalizat = 0.01
  Prefactor  = 0.586798
 **********
 **   18 **HESSE 
 **********

 FCN=   348.4224     FROM HESSE     STATUS=OK           607 CALLS     3497 TOTAL
                     EDM=   .26E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    178.89        .92366E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    236.24        .84208E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     3.0389        913.05        .12657E-01   -1.5359    
   4  norm          .10000E-03    13.803        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    454.96        .12746E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     34.024        77.932        .17078E-02   -1.4541    
   7  norm          .10000E-03    26.606        .10216E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     50.540        211.70        .20761E-02   -1.4285    
   9  Prefactor     .10002E-03    1497.9        .22468E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    50.175        .10708E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  norm          .98177        2.4454        .89108E-02   -1.5510    
  12  norm          2.4536        30.223        .75945E-02   -1.6021    
  13  Prefactor     .10000E-03    19.352        .10506E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          .10000E-03    40.094        .98613E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .10000E-03    37.211        .97252E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     937.75        1223.5        .26466E-02   -.94834    
  17  norm          .10000E-03    73.892        .92464E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10000E-03    328.17        .11935E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  norm          .10000E-03    237.67        .94632E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  norm          14.897        10.612        .25669E-02   -1.4936    
  21  Prefactor     .88469        2.1294        .55214E-02   -1.5520    
  22  norm          48.536        77.296        .14672E-02   -1.4313    
  23  Prefactor     4.6201        14.089        .29144E-02   -1.5278    
  24  Prefactor     .10000E-03    553.66        .10911E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     43.644        401.43        .33871E-02   -1.4386    
  26  Prefactor     .10000E-03    737.85        .10675E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  27  Prefactor     .10000E-03    36.489        .10346E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  Normalizat    .10000E-01    .47660        .18273       -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  29  Prefactor     .58680        .21153        .29020E-01   -1.0815    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.64105e-08
Minuit parameter uncertainties:
  1  2.9204e-05
  2  3.68918e-05
  3  107.039
  4  6.11216e-06
  5  0.000641956
  6  78.1663
  7  1.50363e-05
  8  208.146
  9  0.0116873
  10  5.33263e-05
  11  2.44562
  12  17.233
  13  7.84284e-07
  14  1.9829e-05
  15  5.51306e-05
  16  1262.62
  17  2.3122e-05
  18  0.000184933
  19  0.000663763
  20  10.6133
  21  2.12958
  22  77.4567
  23  14.0986
  24  0.000430549
  25  267.131
  26  0.00312288
  27  9.90112e-05
  28  1.04337e-06
  29  0.211817
Done.

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

Extracting fit parameters...

4FGL J0502.5+1340
   Spectrum: PowerLaw
218    Prefactor:  1.000e-04  5.333e-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:  5.868e-01  2.118e-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  1.043e-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.65e-06 ph cm-2 s-1
Energy Flux Upper Limit: 1.26e-01 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/926171/likelihoodResults_554256001_554515201_4FGL_J0502.5+1340_daily_bin1215.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) = 348.422469412
delta logL = -9.37997496067e-05

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 348.422377452
delta logL = -1.83991272706e-06

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .19989E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.4173       1.0000          .0000       10.000    
     3 'Normalizat'    .10000E-01   1.0000         .10000E-01   10.000    
     4 'Prefactor '    .58674       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=   348.4224     FROM MIGRAD    STATUS=CONVERGED     93 CALLS      276 TOTAL
                     EDM=   .18E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10279E-03    33.167        .11454E-01** at limit **
   2  Index         2.3412        6.1624        .50000        .91727E-05
   3  Normalizat    .10000E-01    .78003E-03    .78812E-02** at limit **
   4  Prefactor     .58680        .65916E-02    .12826E-03    .45090E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000102789
  Index      = 2.34123
  Normalizat = 0.01
  Prefactor  = 0.586798
 **********
 **   18 **HESSE 
 **********

 FCN=   348.4224     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      305 TOTAL
                     EDM=   .17E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10279E-03    303.74        .11785E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.3412        8.7003        .50000       -.56067    
   3  Normalizat    .10000E-01    .73035E-02    .15762E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .58680        .20171E-01    .25651E-04   -1.0815    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 1.69998e-09
Minuit parameter uncertainties:
  1  0.0585122
  2  335.487
  3  9.15683e-08
  4  0.0201712
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/926171': 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) = 348.422375848
delta logL = -2.36465098169e-07

Extracting fit parameters...

4FGL J0502.5+1340
   Spectrum: PowerLaw
218    Prefactor:  1.028e-04  5.851e-02  1.000e-04  1.000e+04 ( 1.000e-13)
219        Index:  2.341e+00  3.355e+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:  5.868e-01  2.017e-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  9.157e-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/926171/cmap_HighResolution_554256001_554515201_4FGL_J0502.5+1340_daily_bin1215.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.26e-01', job_status='DONE', photon_flux_upper_limit='1.65e-06', time_completed='2021-08-21 18:21:02.605972', job_id='926171', GAL2='0.59', fit_tolerance='1e-08', EG2='0.01', EG='0.01', time_epoch_completed='1629595262.61', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.59', dlogl='-2.36e-07', ts2='-0.00', photon_index_error='0.00', photon_index='2.23' WHERE bin_id='1215' AND source_name='4FGL J0502.5+1340' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Aug 21 18:21:02 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0058>
Subject: Job 926171: <4FGL_J0502.5+1340_daily_bin1215> in cluster <slac> Done

Job <4FGL_J0502.5+1340_daily_bin1215> was submitted from host <rhel6-64d> by user <kocevski> in cluster <slac> at Sat Aug 21 18:10:21 2021
Job was executed on host(s) <bullet0058>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Aug 21 18:10:23 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:10:23 2021
Terminated at Sat Aug 21 18:21:04 2021
Results reported at Sat Aug 21 18:21:04 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J0502.5+1340_daily_bin1215 75.6341 13.6685 554256001 554515201 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 :                                   618.00 sec.
    Max Memory :                                 1255 MB
    Average Memory :                             264.77 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   640 sec.
    Turnaround time :                            643 sec.

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

