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


Performing analysis on: 4FGL_J0502.5+1340_daily_bin1193
RA = 75.6341, Dec = 13.6685
tmin = 548553601, tmax = 548812801
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='924983', job_status='RUN', time_executed='2021-08-21 18:08:25.483438', time_epoch_executed='1629594505.48' WHERE source_name='4FGL J0502.5+1340' and cadence='daily' and bin_id='1193'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/924983

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/924983/ft1_4FGL_J0502.5+1340_daily_bin1193.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/924983/ft2_4FGL_J0502.5+1340_daily_bin1193.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/924983/ft1_4FGL_J0502.5+1340_daily_bin1193.fits outfile=/scratch/kocevski/924983/ft1_filteredMKT_4FGL_J0502.5+1340_daily_bin1193.fits ra=75.6341 dec=13.6685 rad=12.0 tmin=548553601.0 tmax=548812801.0 emin=100.0 emax=100000.0 zmin=0.0 zmax=90.0 evclass=128 evtype="INDEF" convtype=-1 phasemin=0.0 phasemax=1.0 evtable="EVENTS" chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

Done.
real 4.43
user 3.23
sys 1.15

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/924983/ft2_4FGL_J0502.5+1340_daily_bin1193.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/924983/ft1_filteredMKT_4FGL_J0502.5+1340_daily_bin1193.fits evtable="EVENTS" outfile="/scratch/kocevski/924983/ft1_filtered_4FGL_J0502.5+1340_daily_bin1193.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.47
user 0.32
sys 1.13

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/924983/ft1_filtered_4FGL_J0502.5+1340_daily_bin1193.fits" evtable="EVENTS" scfile=/scratch/kocevski/924983/ft2_4FGL_J0502.5+1340_daily_bin1193.fits sctable="SC_DATA" outfile=/scratch/kocevski/924983/ltcube_548553601_548812801_4FGL_J0502.5+1340_daily_bin1193.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/924983/ft2_4FGL_J0502.5+1340_daily_bin1193.fits
.....................!
real 13.59
user 12.17
sys 1.39

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/924983/ft1_filtered_4FGL_J0502.5+1340_daily_bin1193.fits evtable="EVENTS" scfile=/scratch/kocevski/924983/ft2_4FGL_J0502.5+1340_daily_bin1193.fits sctable="SC_DATA" expcube=/scratch/kocevski/924983/ltcube_548553601_548812801_4FGL_J0502.5+1340_daily_bin1193.fits outfile=/scratch/kocevski/924983/expmap_548553601_548812801_4FGL_J0502.5+1340_daily_bin1193.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/924983/ltcube_548553601_548812801_4FGL_J0502.5+1340_daily_bin1193.fits
.....................!
real 191.82
user 185.64
sys 5.83

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/924983/ft1_filtered_4FGL_J0502.5+1340_daily_bin1193.fits scfile=/scratch/kocevski/924983/ft2_4FGL_J0502.5+1340_daily_bin1193.fits outfile=/scratch/kocevski/924983/cmap_548553601_548812801_4FGL_J0502.5+1340_daily_bin1193.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.45
user 0.37
sys 1.07

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/924983/ft1_filtered_4FGL_J0502.5+1340_daily_bin1193.fits scfile=/scratch/kocevski/924983/ft2_4FGL_J0502.5+1340_daily_bin1193.fits outfile=/scratch/kocevski/924983/cmap_HighResolution_548553601_548812801_4FGL_J0502.5+1340_daily_bin1193.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.50
user 0.37
sys 1.10

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    64.320       1.0000         .10000E-03   10000.    
     2 'Prefactor '    4.7549       1.0000         .10000E-03   10000.    
     3 'Prefactor '    1.3179       1.0000         .10000E-03   10000.    
     4 'norm      '    5.1654       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .37426       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .49707E-03   1.0000         .10000E-03   10000.    
     7 'norm      '    22.338       1.0000         .10000E-03   10000.    
     8 'Prefactor '    .48132E-01   1.0000         .10000E-03   10000.    
     9 'Prefactor '    16.551       1.0000         .10000E-03   10000.    
    10 'Prefactor '    91.198       1.0000         .10000E-03   10000.    
    11 'norm      '    .11887E-03   1.0000         .10000E-03   10000.    
    12 'norm      '    .82336E-02   1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10110E-03   1.0000         .10000E-03   10000.    
    14 'norm      '    93.381       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .11476E-02   1.0000         .10000E-03   10000.    
    16 'Prefactor '    4.4276       1.0000         .10000E-03   10000.    
    17 'norm      '    .42529E-02   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .16299E-01   1.0000         .10000E-03   10000.    
    19 'norm      '    50.704       1.0000         .10000E-03   10000.    
    20 'norm      '    4.2297       1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10390E-03   1.0000         .10000E-03   10000.    
    22 'norm      '    9.3748       1.0000         .10000E-03   10000.    
    23 'Prefactor '    2.8231       1.0000         .10000E-03   10000.    
    24 'Prefactor '    .37756E-02   1.0000         .10000E-03   10000.    
    25 'Prefactor '    .21610E-01   1.0000         .10000E-03   10000.    
    26 'Prefactor '    .68058E-02   1.0000         .10000E-03   10000.    
    27 'Prefactor '    .17642E-02   1.0000         .10000E-03   10000.    
    28 'Normalizat'    .10000E-01   1.0000         .10000E-01   10.000    
    29 'Prefactor '    .98030       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=   859.8124     FROM MIGRAD    STATUS=CONVERGED    299 CALLS     2683 TOTAL
                     EDM=   .18E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.9%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     62.045        50.990       -.37599E-05    .18625E-01
   2  Prefactor     1.4332        288.89       -.12204E-03    .66503E-02
   3  Prefactor     .10001E-03    903.55        .17297E-04** at limit **
   4  norm          4.9768        14.377        .12057E-05   -.43618E-04
   5  Prefactor     .11655E-03    320.88        .10047E-03** at limit **
   6  Prefactor     .10000E-03    35.547        .39936E-05** at limit **
   7  norm          20.575        29.724        .50193E-05    .17289E-03
   8  Prefactor     .10001E-03    159.61       -.12355E-04** at limit **
   9  Prefactor     44.242        143.26        .23943E-05    .12038E-02
  10  Prefactor     110.89        136.57       -.44784E-04    .14118E-01
  11  norm          .10000E-03    2.6159       -.38545E-06** at limit **
  12  norm          .10000E-03    31.779       -.40630E-05** at limit **
  13  Prefactor     .10000E-03    18.457        .57858E-05** at limit **
  14  norm          121.17        208.34       -.36000E-05    .11375E-02
  15  Prefactor     .10000E-03    78.391       -.77875E-05** at limit **
  16  Prefactor     .12328E-01    501.85        .60902E-04    .47020E-02
  17  norm          .10000E-03    73.141       -.53049E-05** at limit **
  18  Prefactor     .31082E-03    223.21       -.36327E-03** at limit **
  19  norm          48.447        39.166       -.65385E-05   -.87518E-04
  20  norm          4.2698        4.6703       -.10800E-05   -.33372E-04
  21  Prefactor     .10000E-03    1.3090        .12657E-05** at limit **
  22  norm          9.2235        13.428        .17533E-06    .32066E-04
  23  Prefactor     2.8190        4.8425       -.87435E-06    .21481E-04
  24  Prefactor     .10000E-03    79.618        .25343E-05** at limit **
  25  Prefactor     .10000E-03    122.55       -.54801E-05** at limit **
  26  Prefactor     .10000E-03    86.700        .85799E-06** at limit **
  27  Prefactor     .10000E-03    12.452        .62940E-06** at limit **
  28  Normalizat    .10000E-01    .61838       -.34956E-05** at limit **
  29  Prefactor     .96969        .17674       -.21423E-05    .13643E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 62.0451
  Prefactor  = 1.43324
  Prefactor  = 0.000100008
  norm       = 4.97678
  Prefactor  = 0.000116551
  Prefactor  = 0.0001
  norm       = 20.5754
  Prefactor  = 0.000100009
  Prefactor  = 44.2422
  Prefactor  = 110.886
  norm       = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 121.172
  Prefactor  = 0.0001
  Prefactor  = 0.0123279
  norm       = 0.0001
  Prefactor  = 0.000310821
  norm       = 48.4471
  norm       = 4.26978
  Prefactor  = 0.0001
  norm       = 9.22354
  Prefactor  = 2.81897
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Normalizat = 0.01
  Prefactor  = 0.969687
 **********
 **   18 **HESSE 
 **********

 FCN=   859.8124     FROM HESSE     STATUS=OK           605 CALLS     3288 TOTAL
                     EDM=   .19E-03    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     62.045        132.43        .12510E-02   -1.4131    
   2  Prefactor     1.4332        8245.0        .46129E-02   -1.5469    
   3  Prefactor     .10001E-03    900.50        .95874E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  norm          4.9768        14.332        .44221E-02   -1.5262    
   5  Prefactor     .11655E-03    319.91        .10746E-01   -1.5707    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    35.522        .10580E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  norm          20.575        30.157        .21187E-02   -1.4800    
   8  Prefactor     .10001E-03    160.27        .92610E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     44.242        151.80        .24612E-02   -1.4377    
  10  Prefactor     110.89        190.14        .10520E-02   -1.3598    
  11  norm          .10000E-03    2.3885        .20493E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm          .10000E-03    31.403        .92136E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .10000E-03    18.409        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          121.17        226.29        .10397E-02   -1.3502    
  15  Prefactor     .10000E-03    77.252        .10335E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     .12328E-01    1130.5        .47846E-02   -1.5686    
  17  norm          .10000E-03    71.340        .97086E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .31082E-03    225.61        .91043E-02   -1.5711    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  norm          48.447        38.953        .14080E-02   -1.4315    
  20  norm          4.2698        4.6196        .48982E-02   -1.5295    
  21  Prefactor     .10000E-03    .83864        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  norm          9.2235        15.897        .32722E-02   -1.5100    
  23  Prefactor     2.8190        4.9587        .60514E-02   -1.5372    
  24  Prefactor     .10000E-03    79.270        .97826E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     .10000E-03    122.38        .91306E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  Prefactor     .10000E-03    86.380        .93724E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  27  Prefactor     .10000E-03    12.426        .10169E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  Normalizat    .10000E-01    .55191        .32094       -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  29  Prefactor     .96969        .18272        .32263E-01   -.93747    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 0.000187586
Minuit parameter uncertainties:
  1  133.062
  2  227.157
  3  0.00537984
  4  14.342
  5  0.146318
  6  2.57196e-05
  7  30.1797
  8  0.00239368
  9  153.154
  10  191.201
  11  4.18246e-06
  12  5.85031e-06
  13  1.99301e-05
  14  227.931
  15  2.05259e-05
  16  7.58396
  17  7.67105e-05
  18  0.437842
  19  38.973
  20  4.61999
  21  1.83775e-06
  22  15.9038
  23  4.95946
  24  7.45269e-05
  25  4.22346e-05
  26  0.000161478
  27  2.73412e-06
  28  2.56052e-07
  29  0.182836
Done.

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

Extracting fit parameters...

4FGL J0502.5+1340
   Spectrum: PowerLaw
218    Prefactor:  1.109e+02  1.912e+02  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.697e-01  1.828e-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.561e-07  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.52
Ra Dec: 75.634 13.668
Photon Flux Upper Limit: 3.72e-06 ph cm-2 s-1
Energy Flux Upper Limit: 2.84e-01 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/924983/likelihoodResults_548553601_548812801_4FGL_J0502.5+1340_daily_bin1193.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) = 859.812096799
delta logL = 0.000321750971807

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 859.811761556
delta logL = 0.000656994835253

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    104.68       1.0000         .10000E-03   10000.    
     2 'Index     '    2.2711       1.0000          .0000       10.000    
     3 'Normalizat'    .10000E-01   1.0000         .10000E-01   10.000    
     4 'Prefactor '    .96974       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=   859.8118     FROM MIGRAD    STATUS=CONVERGED     83 CALLS      260 TOTAL
                     EDM=   .33E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     104.73        246.13        .19651E-03   -.26456E-03
   2  Index         2.2708        1.1324        .48066E-02   -.27491E-03
   3  Normalizat    .10000E-01    .62017        .12429E-01** at limit **
   4  Prefactor     .96971        .14941        .14259E-03    .27660E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 104.728
  Index      = 2.27077
  Normalizat = 0.01
  Prefactor  = 0.969712
 **********
 **   18 **HESSE 
 **********

 FCN=   859.8118     FROM HESSE     STATUS=OK            23 CALLS      283 TOTAL
                     EDM=   .34E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     104.73        235.31        .39302E-04   -1.3658    
   2  Index         2.2708        1.0830        .19226E-03   -.57740    
   3  Normalizat    .10000E-01    .62028        .24858E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .96971        .14938        .28518E-04   -.93746    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.429e-09
Minuit parameter uncertainties:
  1  237.461
  2  1.09539
  3  2.26313e-06
  4  0.149448
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/924983': 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) = 859.811761499
delta logL = 0.000657051777125

Extracting fit parameters...

4FGL J0502.5+1340
   Spectrum: PowerLaw
218    Prefactor:  1.047e+02  2.375e+02  1.000e-04  1.000e+04 ( 1.000e-13)
219        Index:  2.271e+00  1.095e+00  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.697e-01  1.494e-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.263e-06  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.52
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/924983/cmap_HighResolution_548553601_548812801_4FGL_J0502.5+1340_daily_bin1193.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='2.84e-01', job_status='DONE', photon_flux_upper_limit='3.72e-06', time_completed='2021-08-21 18:15:01.030666', job_id='924983', GAL2='0.97', fit_tolerance='1e-08', EG2='0.01', EG='0.01', time_epoch_completed='1629594901.03', return_code2='0', ts='0.52', comment='SUCCESS', return_code='0', GAL='0.97', dlogl='6.57e-04', ts2='0.52', photon_index_error='0.00', photon_index='2.23' WHERE bin_id='1193' AND source_name='4FGL J0502.5+1340' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Aug 21 18:15:01 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0221>
Subject: Job 924983: <4FGL_J0502.5+1340_daily_bin1193> in cluster <slac> Done

Job <4FGL_J0502.5+1340_daily_bin1193> 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) <bullet0221>, 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:15:02 2021
Results reported at Sat Aug 21 18:15:02 2021

Your job looked like:

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

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

