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


Performing analysis on: 4FGL_J0502.5+1340_daily_bin1445
RA = 75.6341, Dec = 13.6685
tmin = 613872001, tmax = 614131201
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='929054', job_status='RUN', time_executed='2021-08-21 18:23:12.437801', time_epoch_executed='1629595392.44' WHERE source_name='4FGL J0502.5+1340' and cadence='daily' and bin_id='1445'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/929054

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

Retrieving the FT1 file...

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

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

Retrieving 45 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/929054/ft1_4FGL_J0502.5+1340_daily_bin1445.fits


Retrieving the FT1 file...

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

Retrieving 45 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/929054/ft2_4FGL_J0502.5+1340_daily_bin1445.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/929054/ft1_4FGL_J0502.5+1340_daily_bin1445.fits outfile=/scratch/kocevski/929054/ft1_filteredMKT_4FGL_J0502.5+1340_daily_bin1445.fits ra=75.6341 dec=13.6685 rad=12.0 tmin=613872001.0 tmax=614131201.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 11.95
user 2.05
sys 9.74

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

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

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/929054/ft1_filtered_4FGL_J0502.5+1340_daily_bin1445.fits" evtable="EVENTS" scfile=/scratch/kocevski/929054/ft2_4FGL_J0502.5+1340_daily_bin1445.fits sctable="SC_DATA" outfile=/scratch/kocevski/929054/ltcube_613872001_614131201_4FGL_J0502.5+1340_daily_bin1445.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/929054/ft2_4FGL_J0502.5+1340_daily_bin1445.fits
.....................!
real 24.00
user 12.77
sys 11.17

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/929054/ft1_filtered_4FGL_J0502.5+1340_daily_bin1445.fits evtable="EVENTS" scfile=/scratch/kocevski/929054/ft2_4FGL_J0502.5+1340_daily_bin1445.fits sctable="SC_DATA" expcube=/scratch/kocevski/929054/ltcube_613872001_614131201_4FGL_J0502.5+1340_daily_bin1445.fits outfile=/scratch/kocevski/929054/expmap_613872001_614131201_4FGL_J0502.5+1340_daily_bin1445.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/929054/ltcube_613872001_614131201_4FGL_J0502.5+1340_daily_bin1445.fits
.....................!
real 203.49
user 185.39
sys 17.69

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/929054/ft1_filtered_4FGL_J0502.5+1340_daily_bin1445.fits scfile=/scratch/kocevski/929054/ft2_4FGL_J0502.5+1340_daily_bin1445.fits outfile=/scratch/kocevski/929054/cmap_613872001_614131201_4FGL_J0502.5+1340_daily_bin1445.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 10.09
user 0.38
sys 9.63

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/929054/ft1_filtered_4FGL_J0502.5+1340_daily_bin1445.fits scfile=/scratch/kocevski/929054/ft2_4FGL_J0502.5+1340_daily_bin1445.fits outfile=/scratch/kocevski/929054/cmap_HighResolution_613872001_614131201_4FGL_J0502.5+1340_daily_bin1445.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.99
user 0.39
sys 9.47

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .59885E-02   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .55063E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    114.61       1.0000         .10000E-03   10000.    
     4 'norm      '    3.5508       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .13858E-01   1.0000         .10000E-03   10000.    
     6 'Prefactor '    8.9756       1.0000         .10000E-03   10000.    
     7 'norm      '    6.2069       1.0000         .10000E-03   10000.    
     8 'Prefactor '    19.564       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .31948       1.0000         .10000E-03   10000.    
    10 'Prefactor '    65.491       1.0000         .10000E-03   10000.    
    11 'norm      '    .69531E-01   1.0000         .10000E-03   10000.    
    12 'norm      '    8.3877       1.0000         .10000E-03   10000.    
    13 'Prefactor '    .13067E-03   1.0000         .10000E-03   10000.    
    14 'norm      '    6.5524       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .77142E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    .19100       1.0000         .10000E-03   10000.    
    17 'norm      '    .51134       1.0000         .10000E-03   10000.    
    18 'Prefactor '    26.514       1.0000         .10000E-03   10000.    
    19 'norm      '    29.200       1.0000         .10000E-03   10000.    
    20 'norm      '    3.7370       1.0000         .10000E-03   10000.    
    21 'Prefactor '    1.4456       1.0000         .10000E-03   10000.    
    22 'norm      '    26.060       1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10040E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    .30705E-03   1.0000         .10000E-03   10000.    
    25 'Prefactor '    .42443E-03   1.0000         .10000E-03   10000.    
    26 'Prefactor '    106.42       1.0000         .10000E-03   10000.    
    27 'Prefactor '    2.0953       1.0000         .10000E-03   10000.    
    28 'Normalizat'    .10000E-01   1.0000         .10000E-01   10.000    
    29 'Prefactor '    1.0499       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=   3821.094     FROM MIGRAD    STATUS=CONVERGED    350 CALLS     3561 TOTAL
                     EDM=   .95E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  4.0%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    24.127       -.58808E-08** at limit **
   2  Prefactor     .10000E-03    135.99       -.10448E-05** at limit **
   3  Prefactor     109.36        75.703        .26900E-07   -.10248E-03
   4  norm          3.5585        5.5027       -.25706E-07   -.42737E-05
   5  Prefactor     .10000E-03    42.309        .10089E-06** at limit **
   6  Prefactor     8.8125        19.505        .17257E-06    .68418E-05
   7  norm          6.2520        7.1085        .17966E-07   -.14090E-04
   8  Prefactor     19.550        57.628       -.52674E-06    .76091E-04
   9  Prefactor     .10000E-03    124.78        .36011E-05** at limit **
  10  Prefactor     65.240        6.5168       -.27835E-06    .16092E-02
  11  norm          .67272E-01    2.9122        .11573E-06    .95838E-05
  12  norm          8.4484        7.9927       -.25623E-07    .12141E-04
  13  Prefactor     .10000E-03    12.408        .16037E-07** at limit **
  14  norm          7.8639        26.388       -.17831E-05   -.24214E-05
  15  Prefactor     .10000E-03    11.134        .20974E-07** at limit **
  16  Prefactor     .10000E-03    303.04       -.63114E-06** at limit **
  17  norm          .10009E-03    1732.7       -.87132E-04** at limit **
  18  Prefactor     64.165        624.95        .21723E-04    .19614E-04
  19  norm          29.280        27.672       -.80884E-06    .60365E-04
  20  norm          3.7236        3.0307        .21130E-07    .56611E-04
  21  Prefactor     1.4098        1.3210       -.48117E-06    .15694E-02
  22  norm          26.069        41.263        .13263E-05    .85685E-04
  23  Prefactor     .10000E-03    2.9744        .52232E-07** at limit **
  24  Prefactor     .10000E-03    52.064        .42455E-06** at limit **
  25  Prefactor     .10000E-03    47.835       -.24205E-06** at limit **
  26  Prefactor     105.67        112.37       -.31222E-05   -.54135E-05
  27  Prefactor     2.0426        30.247       -.55889E-06    .44558E-04
  28  Normalizat    .10000E-01    .26931        .33483E-06** at limit **
  29  Prefactor     1.0510        .10817        .64980E-07    .11989E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 109.357
  norm       = 3.55846
  Prefactor  = 0.0001
  Prefactor  = 8.81246
  norm       = 6.252
  Prefactor  = 19.5499
  Prefactor  = 0.0001
  Prefactor  = 65.2399
  norm       = 0.0672722
  norm       = 8.44839
  Prefactor  = 0.0001
  norm       = 7.86392
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.000100093
  Prefactor  = 64.1646
  norm       = 29.2805
  norm       = 3.72357
  Prefactor  = 1.40984
  norm       = 26.069
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 105.67
  Prefactor  = 2.04264
  Normalizat = 0.01
  Prefactor  = 1.05097
 **********
 **   18 **HESSE 
 **********

 FCN=   3821.094     FROM HESSE     STATUS=OK           629 CALLS     4190 TOTAL
                     EDM=   .34E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    24.146        .94714E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    134.80        .10554E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     109.36        75.389        .93950E-03   -1.3613    
   4  norm          3.5585        5.5590        .53624E-02   -1.5331    
   5  Prefactor     .10000E-03    42.232        .90922E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     8.8125        19.735        .33446E-02   -1.5114    
   7  norm          6.2520        7.2566        .40283E-02   -1.5208    
   8  Prefactor     19.550        59.749        .22638E-02   -1.4823    
   9  Prefactor     .10000E-03    124.32        .10510E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     65.240        50.675        .12398E-02   -1.4091    
  11  norm          .67272E-01    1.3593        .17152E-01   -1.5656    
  12  norm          8.4484        8.3872        .34605E-02   -1.5127    
  13  Prefactor     .10000E-03    11.986        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          7.8639        26.505        .39194E-02   -1.5147    
  15  Prefactor     .10000E-03    11.075        .10462E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     .10000E-03    304.29        .99365E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .10009E-03    48.371        .12893       -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     64.165        660.79        .19450E-02   -1.4104    
  19  norm          29.280        27.996        .18536E-02   -1.4625    
  20  norm          3.7236        3.0132        .52218E-02   -1.5322    
  21  Prefactor     1.4098        .98375        .72187E-02   -1.5470    
  22  norm          26.069        31.683        .19618E-02   -1.4686    
  23  Prefactor     .10000E-03    2.9700        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     .10000E-03    51.840        .10690E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     .10000E-03    47.760        .10618E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  Prefactor     105.67        112.47        .97457E-03   -1.3648    
  27  Prefactor     2.0426        32.996        .71288E-02   -1.5422    
  28  Normalizat    .10000E-01    .22989        .32094       -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  29  Prefactor     1.0510        .10904        .39915E-01   -.91049    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.39226e-08
Minuit parameter uncertainties:
  1  8.6902e-07
  2  0.000132776
  3  75.4552
  4  5.55985
  5  9.92362e-06
  6  19.7496
  7  7.25762
  8  59.9327
  9  5.85021e-05
  10  50.7081
  11  0.604367
  12  8.38836
  13  8.92406e-06
  14  26.5449
  15  4.52206e-06
  16  0.000566158
  17  0.00423612
  18  417.911
  19  28.0088
  20  3.01332
  21  0.983765
  22  31.7037
  23  3.08913e-06
  24  0.000111297
  25  2.28684e-05
  26  112.703
  27  16.4296
  28  6.60458e-08
  29  0.109063
Done.

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

Extracting fit parameters...

4FGL J0502.5+1340
   Spectrum: PowerLaw
218    Prefactor:  6.524e+01  5.071e+01  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:  1.051e+00  1.091e-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  6.605e-08  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 2.29
Ra Dec: 75.634 13.668
Photon Index (Fixed Index): 2.23 +/- 0.00
Photon Flux (Fixed Index): 3.71e-07 +/- 2.88e-07
Energy Flux (Fixed Index): 1.57e-04 +/- 1.22e-04

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

Saving results to:
/scratch/kocevski/929054/likelihoodResults_613872001_614131201_4FGL_J0502.5+1340_daily_bin1445.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) = 3821.03534366
delta logL = 0.0587648840301

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 3821.02799608
delta logL = 0.0661124683611

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    47.217       1.0000         .10000E-03   10000.    
     2 'Index     '    2.4531       1.0000          .0000       10.000    
     3 'Normalizat'    .10000E-01   1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0499       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=   3821.028     FROM MIGRAD    STATUS=CONVERGED     77 CALLS      275 TOTAL
                     EDM=   .75E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     47.188        73.694        .58353E-04   -.28542E-04
   2  Index         2.4531        .74813        .41064E-02    .36409E-03
   3  Normalizat    .10000E-01    .25678        .64188E-02** at limit **
   4  Prefactor     1.0501        .79682E-01    .14976E-03   -.22934E-02
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 47.1883
  Index      = 2.45312
  Normalizat = 0.01
  Prefactor  = 1.05015
 **********
 **   18 **HESSE 
 **********

 FCN=   3821.028     FROM HESSE     STATUS=OK            25 CALLS      300 TOTAL
                     EDM=   .35E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     47.188        65.632        .23341E-05   -1.4333    
   2  Index         2.4531        .66646        .82127E-03   -.53446    
   3  Normalizat    .10000E-01    .25680        .12838E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     1.0501        .79603E-01    .29952E-04   -.91076    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.50019e-09
Minuit parameter uncertainties:
  1  65.7329
  2  0.669158
  3  1.0259e-06
  4  0.0796121
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/929054': 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) = 3821.02799195
delta logL = 0.0661165928536

Extracting fit parameters...

4FGL J0502.5+1340
   Spectrum: PowerLaw
218    Prefactor:  4.719e+01  6.573e+01  1.000e-04  1.000e+04 ( 1.000e-13)
219        Index:  2.453e+00  6.692e-01  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:  1.050e+00  7.961e-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.026e-06  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 2.39
Ra Dec: 75.634 13.668
Photon Index (Free Index): 2.45 +/- 0.67
Photon Flux (Free Index): 4.36e-07 +/- 3.54e-07
Energy Flux (Free Index): 1.34e-04 +/- 1.18e-04

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/929054/cmap_HighResolution_613872001_614131201_4FGL_J0502.5+1340_daily_bin1445.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='7.07e-02', comment='SUCCESS', photon_flux='3.71e-07', energy_flux2='1.34e-04', photon_flux_error='2.88e-07', dlogl='6.61e-02', energy_flux='1.57e-04', photon_flux2='4.36e-07', job_status='DONE', time_completed='2021-08-21 18:36:05.289053', photon_index_error2='0.67', photon_index2='2.45', ts='2.29', fit_tolerance='1e-08', GAL='1.05', photon_index_error='0.00', photon_flux_upper_limit='9.26e-07', energy_flux_error2='1.18e-04', EG='0.01', time_epoch_completed='1629596165.29', return_code='0', job_id='929054', GAL2='1.05', EG2='0.01', return_code2='0', energy_flux_error='1.22e-04', photon_flux_error2='3.54e-07', ts2='2.39', photon_index='2.23' WHERE bin_id='1445' AND source_name='4FGL J0502.5+1340' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Aug 21 18:36:05 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0072>
Subject: Job 929054: <4FGL_J0502.5+1340_daily_bin1445> in cluster <slac> Done

Job <4FGL_J0502.5+1340_daily_bin1445> was submitted from host <rhel6-64h> by user <kocevski> in cluster <slac> at Sat Aug 21 18:20:23 2021
Job was executed on host(s) <bullet0072>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Aug 21 18:20:24 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:24 2021
Terminated at Sat Aug 21 18:36:07 2021
Results reported at Sat Aug 21 18:36:07 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J0502.5+1340_daily_bin1445 75.6341 13.6685 613872001 614131201 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 :                                   915.00 sec.
    Max Memory :                                 1255 MB
    Average Memory :                             299.73 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              7
    Max Threads :                                21
    Run time :                                   942 sec.
    Turnaround time :                            944 sec.

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

