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


Performing analysis on: 4FGL_J0509.4+0542_daily_bin651
RA = 77.3593, Dec = 5.7014
tmin = 408067201, tmax = 408326401
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='39972', job_status='RUN', time_executed='2021-08-22 00:34:05.812548', time_epoch_executed='1629617645.81' WHERE source_name='4FGL J0509.4+0542' and cadence='daily' and bin_id='651'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/39972

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/39972/ft1_4FGL_J0509.4+0542_daily_bin651.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/39972/ft2_4FGL_J0509.4+0542_daily_bin651.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/39972/ft1_4FGL_J0509.4+0542_daily_bin651.fits outfile=/scratch/kocevski/39972/ft1_filteredMKT_4FGL_J0509.4+0542_daily_bin651.fits ra=77.3593 dec=5.7014 rad=12.0 tmin=408067201.0 tmax=408326401.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.42
user 3.66
sys 0.72

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/39972/ft2_4FGL_J0509.4+0542_daily_bin651.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/39972/ft2_4FGL_J0509.4+0542_daily_bin651.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/39972/ft1_filteredMKT_4FGL_J0509.4+0542_daily_bin651.fits evtable="EVENTS" outfile="/scratch/kocevski/39972/ft1_filtered_4FGL_J0509.4+0542_daily_bin651.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.03
user 0.33
sys 0.68

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/39972/ft1_filtered_4FGL_J0509.4+0542_daily_bin651.fits" evtable="EVENTS" scfile=/scratch/kocevski/39972/ft2_4FGL_J0509.4+0542_daily_bin651.fits sctable="SC_DATA" outfile=/scratch/kocevski/39972/ltcube_408067201_408326401_4FGL_J0509.4+0542_daily_bin651.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/39972/ft2_4FGL_J0509.4+0542_daily_bin651.fits
.....................!
real 12.25
user 11.33
sys 0.87

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/39972/ft1_filtered_4FGL_J0509.4+0542_daily_bin651.fits evtable="EVENTS" scfile=/scratch/kocevski/39972/ft2_4FGL_J0509.4+0542_daily_bin651.fits sctable="SC_DATA" expcube=/scratch/kocevski/39972/ltcube_408067201_408326401_4FGL_J0509.4+0542_daily_bin651.fits outfile=/scratch/kocevski/39972/expmap_408067201_408326401_4FGL_J0509.4+0542_daily_bin651.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/39972/ltcube_408067201_408326401_4FGL_J0509.4+0542_daily_bin651.fits
.....................!
real 191.47
user 185.84
sys 5.26

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 Rosette in ROI, make sure /nfs/farm/g/glast/g/LCRepository/Likelihood/ExtendedSources/Extended_archive_v18/Templates/Rosette.fits is the correct path to the extended template.
Added 147 point sources and 1 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 J0509.4+0542 @ 77.3593 5.7014

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/39972/ft1_filtered_4FGL_J0509.4+0542_daily_bin651.fits scfile=/scratch/kocevski/39972/ft2_4FGL_J0509.4+0542_daily_bin651.fits outfile=/scratch/kocevski/39972/cmap_408067201_408326401_4FGL_J0509.4+0542_daily_bin651.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=77.3593 yref=5.7014 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.13
user 0.37
sys 0.67

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/39972/ft1_filtered_4FGL_J0509.4+0542_daily_bin651.fits scfile=/scratch/kocevski/39972/ft2_4FGL_J0509.4+0542_daily_bin651.fits outfile=/scratch/kocevski/39972/cmap_HighResolution_408067201_408326401_4FGL_J0509.4+0542_daily_bin651.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=77.3593 yref=5.7014 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.06
user 0.37
sys 0.68

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/39972/ft1_filtered_4FGL_J0509.4+0542_daily_bin651.fits evtable="EVENTS" scfile=/scratch/kocevski/39972/ft2_4FGL_J0509.4+0542_daily_bin651.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/39972/Model_4FGL_J0509.4+0542_daily_bin651.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 Rosette
Working on...
/scratch/kocevski/39972/ft1_filtered_4FGL_J0509.4+0542_daily_bin651.fits.....................!
real 77.15
user 74.82
sys 1.90

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/39972/ft1_filtered_4FGL_J0509.4+0542_daily_bin651.fits', '/scratch/kocevski/39972/ft2_4FGL_J0509.4+0542_daily_bin651.fits', expMap='/scratch/kocevski/39972/expmap_408067201_408326401_4FGL_J0509.4+0542_daily_bin651.fits', expCube='/scratch/kocevski/39972/ltcube_408067201_408326401_4FGL_J0509.4+0542_daily_bin651.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/39972/Model_4FGL_J0509.4+0542_daily_bin651.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J0509.4+0542'

4FGL J0509.4+0542
   Spectrum: LogParabola
203         norm:  7.518e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-12)
204        alpha:  1.996e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
205         beta:  5.199e-02  0.000e+00  0.000e+00  1.000e+01 ( 1.000e+00) fixed
206           Eb:  1.074e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/39972/ft1_filtered_4FGL_J0509.4+0542_daily_bin651.fits
Spacecraft file(s): /scratch/kocevski/39972/ft2_4FGL_J0509.4+0542_daily_bin651.fits
Exposure map: /scratch/kocevski/39972/expmap_408067201_408326401_4FGL_J0509.4+0542_daily_bin651.fits
Exposure cube: /scratch/kocevski/39972/ltcube_408067201_408326401_4FGL_J0509.4+0542_daily_bin651.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/39972/Model_4FGL_J0509.4+0542_daily_bin651.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) = 3163.78731667

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10124E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    148.59       1.0000         .10000E-03   10000.    
     3 'norm      '    .10021E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10805E-03   1.0000         .10000E-03   10000.    
     5 'norm      '    12.141       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10029E-03   1.0000         .10000E-03   10000.    
     7 'norm      '    .10009E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .12404E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    127.16       1.0000         .10000E-03   10000.    
    11 'Prefactor '    35.955       1.0000         .10000E-03   10000.    
    12 'norm      '    .10170E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    30.139       1.0000         .10000E-03   10000.    
    14 'norm      '    .10103E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    .68108       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10015E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    .10394E-01   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .45337E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    21 'norm      '    77.312       1.0000         .10000E-03   10000.    
    22 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10067E-03   1.0000         .10000E-03   10000.    
    25 'Prefactor '    1.4275       1.0000         .10000E-03   10000.    
    26 'norm      '    .10109E-03   1.0000         .10000E-03   10000.    
    27 'norm      '    4.8630       1.0000         .10000E-03   10000.    
    28 'Normalizat'    .20109       1.0000         .10000E-01   10.000    
    29 'Prefactor '    .97587       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5060E+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=   3163.749     FROM MIGRAD    STATUS=CONVERGED   1291 CALLS     4843 TOTAL
                     EDM=   .30E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    26.371        .18142E-02** at limit **
   2  Prefactor     148.60        177.29        .33061E-04    .16162E-05
   3  norm          .10000E-03    3.0974        .96642E-03** at limit **
   4  Prefactor     .10000E-03    80.068        .18142E-02** at limit **
   5  norm          12.144        7.0947        .10020E-03    .14296E-04
   6  Prefactor     .10000E-03    29.845        .18142E-02** at limit **
   7  norm          .10000E-03    5.5346        .12917E-02** at limit **
   8  Prefactor     .10000E-03    337.26        .18142E-02** at limit **
   9  norm          .10000E-03    1.5752        .68381E-03** at limit **
  10  Prefactor     127.11        114.91        .17850E-03    .56112E-04
  11  Prefactor     35.969        79.343        .66835E-04    .20038E-04
  12  norm          .10000E-03    .94003        .10501E-03** at limit **
  13  Prefactor     30.139        40.564        .72982E-04    .98917E-05
  14  norm          .10000E-03    5.7138        .13109E-02** at limit **
  15  Prefactor     .64219        54.871        .41645E-02    .11022E-03
  16  Prefactor     .10000E-03    27.770        .18142E-02** at limit **
  17  norm          .10000E-03    72.035        .12019    ** at limit **
  18  Prefactor     .10000E-03    636.50        .21205E-02** at limit **
  19  Prefactor     .10000E-03    31.022        .18142E-02** at limit **
  20  Prefactor     .10000E-03    3.4422        .10187E-02** at limit **
  21  norm          77.356        62.518        .45670E-04    .72140E-04
  22  norm          .10000E-03    .91887        .52253E-03** at limit **
  23  Prefactor     .10000E-03    25.610        .18142E-02** at limit **
  24  Prefactor     .10000E-03    33.835        .18142E-02** at limit **
  25  Prefactor     1.4247        519.18        .36172E-03    .10686E-04
  26  norm          .10000E-03    37.971        .18142E-02** at limit **
  27  norm          4.8641        10.751        .91206E-03    .26401E-04
  28  Normalizat    .20054        .53376        .10929E-01    .28158E-04
  29  Prefactor     .97589        .12198        .13150E-03    .13022E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 148.597
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 12.1443
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 127.108
  Prefactor  = 35.969
  norm       = 0.0001
  Prefactor  = 30.139
  norm       = 0.0001
  Prefactor  = 0.642188
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 77.3562
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 1.42469
  norm       = 0.0001
  norm       = 4.86409
  Normalizat = 0.200537
  Prefactor  = 0.975893
 **********
 **   18 **HESSE 
 **********

 FCN=   3163.749     FROM HESSE     STATUS=OK           539 CALLS     5382 TOTAL
                     EDM=   .14E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    26.371        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     148.60        177.07        .66122E-05   -1.3264    
   3  norm          .10000E-03    3.0975        .19328E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    80.068        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          12.144        7.0637        .40081E-05   -1.5011    
   6  Prefactor     .10000E-03    29.849        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  norm          .10000E-03    5.5348        .25834E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    337.29        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          .10000E-03    1.5753        .13676E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     127.11        114.09        .71399E-05   -1.3448    
  11  Prefactor     35.969        79.193        .13367E-04   -1.4508    
  12  norm          .10000E-03    .94003        .21002E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     30.139        40.364        .29193E-05   -1.4609    
  14  norm          .10000E-03    5.7140        .26218E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .64219        54.669        .16658E-03   -1.5548    
  16  Prefactor     .10000E-03    27.770        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .10000E-03    70.842        .12122       -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10000E-03    636.50        .42410E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10000E-03    31.023        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10000E-03    3.4422        .20373E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  norm          77.356        62.163        .91340E-05   -1.3947    
  22  norm          .10000E-03    .91892        .10451E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10000E-03    25.610        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     .10000E-03    33.835        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     1.4247        512.96        .14469E-04   -1.5469    
  26  norm          .10000E-03    37.971        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  27  norm          4.8641        10.741        .36482E-04   -1.5267    
  28  Normalizat    .20054        .51548        .43718E-03   -1.2937    
  29  Prefactor     .97589        .11855        .26299E-04   -.93537    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.40671e-10
Minuit parameter uncertainties:
  1  1.82553e-05
  2  177.709
  3  1.02698e-06
  4  1.99188e-06
  5  7.06416
  6  1.80483e-05
  7  2.74105e-06
  8  0.000788111
  9  2.65742e-06
  10  114.288
  11  79.4255
  12  1.56456e-07
  13  40.4005
  14  6.32601e-07
  15  11.8606
  16  3.32732e-05
  17  1.27951e-05
  18  0.000100655
  19  8.70989e-06
  20  2.02848e-06
  21  62.2153
  22  4.11974e-07
  23  4.27435e-05
  24  7.05024e-05
  25  54.5424
  26  7.84336e-05
  27  10.7455
  28  0.528565
  29  0.118577
Done.

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

Extracting fit parameters...

4FGL J0509.4+0542
   Spectrum: LogParabola
203         norm:  1.000e-04  6.326e-07  1.000e-04  1.000e+04 ( 1.000e-12)
204        alpha:  1.996e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
205         beta:  5.199e-02  0.000e+00  0.000e+00  1.000e+01 ( 1.000e+00) fixed
206           Eb:  1.074e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
499    Prefactor:  9.759e-01  1.186e-01  0.000e+00  1.000e+01 ( 1.000e+00)
500        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
501        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
498   Normalization:  2.005e-01  5.286e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 77.359 5.701
Photon Flux Upper Limit: 2.30e-07 ph cm-2 s-1
Energy Flux Upper Limit: 1.47e-04 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/39972/likelihoodResults_408067201_408326401_4FGL_J0509.4+0542_daily_bin651.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) = 3163.74951234
delta logL = -0.000833684505324

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 3163.7486785
delta logL = 1.51129370352e-07

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .10006E-03   1.0000         .10000E-03   10000.    
     2 'alpha     '    2.0171       1.0000          .0000       5.0000    
     3 'Normalizat'    .20055       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .97589       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5060E+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=   3163.749     FROM MIGRAD    STATUS=CONVERGED    115 CALLS      275 TOTAL
                     EDM=   .45E-11    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .10000E-03    .64542        .53882E-01** at limit **
   2  alpha         2.9848        3.5066        .50000        .61789E-07
   3  Normalizat    .20054        .60412E-02    .10928E-01    .63178E-04
   4  Prefactor     .97589        .15169E-02    .13150E-03    .42116E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 0.0001
  alpha      = 2.98481
  Normalizat = 0.200536
  Prefactor  = 0.975893
 **********
 **   18 **HESSE 
 **********

 FCN=   3163.749     FROM HESSE     STATUS=NOT POSDEF    33 CALLS      308 TOTAL
                     EDM=   .47E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .10000E-03    291.05        .18477E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  alpha         2.9848        3.1827        .50000        .19516    
   3  Normalizat    .20054        .67540E-01    .43713E-03   -1.2937    
   4  Prefactor     .97589        .16962E-01    .26299E-04   -.93537    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 4.68247e-10
Minuit parameter uncertainties:
  1  6.96148e-05
  2  969.25
  3  0.0675671
  4  0.0169619
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/39972': 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) = 3163.74867447
delta logL = 4.18295212512e-06

Extracting fit parameters...

4FGL J0509.4+0542
   Spectrum: LogParabola
203         norm:  1.000e-04  6.961e-05  1.000e-04  1.000e+04 ( 1.000e-12)
204        alpha:  2.985e+00  9.693e+02  0.000e+00  5.000e+00 ( 1.000e+00)
205         beta:  5.199e-02  0.000e+00  0.000e+00  1.000e+01 ( 1.000e+00) fixed
206           Eb:  1.074e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
499    Prefactor:  9.759e-01  1.696e-02  0.000e+00  1.000e+01 ( 1.000e+00)
500        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
501        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
498   Normalization:  2.005e-01  6.757e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 77.359 5.701

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/39972/cmap_HighResolution_408067201_408326401_4FGL_J0509.4+0542_daily_bin651.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.47e-04', job_status='DONE', photon_flux_upper_limit='2.30e-07', time_completed='2021-08-22 00:44:16.869595', job_id='39972', GAL2='0.98', fit_tolerance='1e-08', EG2='0.20', EG='0.20', time_epoch_completed='1629618256.87', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.98', dlogl='4.18e-06', ts2='-0.00', photon_index_error='0.00', photon_index='2.00' WHERE bin_id='651' AND source_name='4FGL J0509.4+0542' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sun Aug 22 00:44:16 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0224>
Subject: Job 39972: <4FGL_J0509.4+0542_daily_bin651> in cluster <slac> Done

Job <4FGL_J0509.4+0542_daily_bin651> was submitted from host <rhel6-64h> by user <kocevski> in cluster <slac> at Sun Aug 22 00:30:25 2021
Job was executed on host(s) <bullet0224>, in queue <medium>, as user <kocevski> in cluster <slac> at Sun Aug 22 00:30:26 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Sun Aug 22 00:30:26 2021
Terminated at Sun Aug 22 00:44:17 2021
Results reported at Sun Aug 22 00:44:17 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J0509.4+0542_daily_bin651 77.3593 5.7014 408067201 408326401 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J0509.4+0542 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   617.15 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             255.62 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   831 sec.
    Turnaround time :                            832 sec.

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

