/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 133 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 = 7484
number of fields = 22
No RA_SUN column yet. Adding RA_SUN/DEC_SUN columns.
Done.


Performing analysis on: 4FGL_J2358.3+3830_daily_bin99
RA = 359.588, Dec = 38.5097
tmin = 264988801, tmax = 265248001
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='219107', job_status='RUN', time_executed='2021-09-30 10:43:08.512357', time_epoch_executed='1633023788.51' WHERE source_name='4FGL J2358.3+3830' and cadence='daily' and bin_id='99'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/219107

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/219107/ft1_4FGL_J2358.3+3830_daily_bin99.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/219107/ft2_4FGL_J2358.3+3830_daily_bin99.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/219107/ft1_4FGL_J2358.3+3830_daily_bin99.fits outfile=/scratch/kocevski/219107/ft1_filteredMKT_4FGL_J2358.3+3830_daily_bin99.fits ra=359.588 dec=38.5097 rad=12.0 tmin=264988801.0 tmax=265248001.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 1.45
user 1.27
sys 0.17

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/219107/ft2_4FGL_J2358.3+3830_daily_bin99.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/219107/ft2_4FGL_J2358.3+3830_daily_bin99.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/219107/ft1_filteredMKT_4FGL_J2358.3+3830_daily_bin99.fits evtable="EVENTS" outfile="/scratch/kocevski/219107/ft1_filtered_4FGL_J2358.3+3830_daily_bin99.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 0.49
user 0.34
sys 0.14

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/219107/ft1_filtered_4FGL_J2358.3+3830_daily_bin99.fits" evtable="EVENTS" scfile=/scratch/kocevski/219107/ft2_4FGL_J2358.3+3830_daily_bin99.fits sctable="SC_DATA" outfile=/scratch/kocevski/219107/ltcube_264988801_265248001_4FGL_J2358.3+3830_daily_bin99.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/219107/ft2_4FGL_J2358.3+3830_daily_bin99.fits
.....................!
real 13.42
user 13.03
sys 0.34

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/219107/ft1_filtered_4FGL_J2358.3+3830_daily_bin99.fits evtable="EVENTS" scfile=/scratch/kocevski/219107/ft2_4FGL_J2358.3+3830_daily_bin99.fits sctable="SC_DATA" expcube=/scratch/kocevski/219107/ltcube_264988801_265248001_4FGL_J2358.3+3830_daily_bin99.fits outfile=/scratch/kocevski/219107/expmap_264988801_265248001_4FGL_J2358.3+3830_daily_bin99.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/219107/ltcube_264988801_265248001_4FGL_J2358.3+3830_daily_bin99.fits
.....................!
real 191.18
user 186.31
sys 4.55

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 FHES J2304.0+5406 in ROI with RadialGaussian spatial model.
Added 154 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 J2358.3+3830 @ 359.588 38.5097

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/219107/ft1_filtered_4FGL_J2358.3+3830_daily_bin99.fits scfile=/scratch/kocevski/219107/ft2_4FGL_J2358.3+3830_daily_bin99.fits outfile=/scratch/kocevski/219107/cmap_264988801_265248001_4FGL_J2358.3+3830_daily_bin99.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=359.588 yref=38.5097 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 0.54
user 0.38
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/219107/ft1_filtered_4FGL_J2358.3+3830_daily_bin99.fits scfile=/scratch/kocevski/219107/ft2_4FGL_J2358.3+3830_daily_bin99.fits outfile=/scratch/kocevski/219107/cmap_HighResolution_264988801_265248001_4FGL_J2358.3+3830_daily_bin99.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=359.588 yref=38.5097 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 0.54
user 0.39
sys 0.14

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/219107/ft1_filtered_4FGL_J2358.3+3830_daily_bin99.fits evtable="EVENTS" scfile=/scratch/kocevski/219107/ft2_4FGL_J2358.3+3830_daily_bin99.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/219107/Model_4FGL_J2358.3+3830_daily_bin99.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 FHES J2304.0+5406
adding source GAL_V02
Working on...
/scratch/kocevski/219107/ft1_filtered_4FGL_J2358.3+3830_daily_bin99.fits.....................!
real 90.08
user 88.79
sys 1.12

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/219107/ft1_filtered_4FGL_J2358.3+3830_daily_bin99.fits', '/scratch/kocevski/219107/ft2_4FGL_J2358.3+3830_daily_bin99.fits', expMap='/scratch/kocevski/219107/expmap_264988801_265248001_4FGL_J2358.3+3830_daily_bin99.fits', expCube='/scratch/kocevski/219107/ltcube_264988801_265248001_4FGL_J2358.3+3830_daily_bin99.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/219107/Model_4FGL_J2358.3+3830_daily_bin99.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J2358.3+3830'

4FGL J2358.3+3830
   Spectrum: PowerLaw
488    Prefactor:  8.894e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-14)
489        Index:  2.175e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
490        Scale:  2.145e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/219107/ft1_filtered_4FGL_J2358.3+3830_daily_bin99.fits
Spacecraft file(s): /scratch/kocevski/219107/ft2_4FGL_J2358.3+3830_daily_bin99.fits
Exposure map: /scratch/kocevski/219107/expmap_264988801_265248001_4FGL_J2358.3+3830_daily_bin99.fits
Exposure cube: /scratch/kocevski/219107/ltcube_264988801_265248001_4FGL_J2358.3+3830_daily_bin99.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/219107/Model_4FGL_J2358.3+3830_daily_bin99.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) = 8182.79388597

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    25.924       1.0000         .10000E-03   10000.    
     4 'Prefactor '    2.1050       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    8.0886       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10712E-03   1.0000         .10000E-03   10000.    
    10 'norm      '    2.1593       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .68397E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    7.8812       1.0000         .10000E-03   10000.    
    13 'norm      '    .63369       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .12935E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    .10019E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    19.309       1.0000         .10000E-03   10000.    
    17 'Prefactor '    2.4891       1.0000         .10000E-03   10000.    
    18 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    13.698       1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .11851E-01   1.0000         .10000E-03   10000.    
    24 'Normalizat'    1.4350       1.0000         .10000E-01   10.000    
    25 'Prefactor '    .82311       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5050E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   8182.714     FROM MIGRAD    STATUS=CONVERGED    587 CALLS     2561 TOTAL
                     EDM=   .14E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  7.2%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10001E-03    78.900       -.89211E-05** at limit **
   2  Prefactor     .10000E-03    10.741       -.61796E-06** at limit **
   3  norm          25.918        19.081        .83526E-07   -.17423E-03
   4  Prefactor     2.1049        6.6511        .61638E-06   -.35886E-04
   5  Prefactor     .10000E-03    5.1474       -.58632E-07** at limit **
   6  Prefactor     .10000E-03    1.8434       -.94310E-07** at limit **
   7  Prefactor     .10000E-03    11.826        .88831E-06** at limit **
   8  Prefactor     8.0711        24.282        .83019E-06    .42732E-05
   9  Prefactor     .10001E-03    123.18        .12818E-04** at limit **
  10  norm          2.1593        2.0288        .35503E-07    .99438E-05
  11  Prefactor     .10000E-03    3.9534       -.46129E-06** at limit **
  12  Prefactor     7.8807        25.190        .88961E-07    .25520E-04
  13  norm          .63387        1.2707        .16898E-06    .37519E-03
  14  Prefactor     .10060E-03    5.4654       -.24316E-05** at limit **
  15  norm          .10000E-03    2.6774        .55395E-06** at limit **
  16  norm          19.309        10.695        .10343E-07    .51746E-04
  17  Prefactor     2.4925        22.168        .73062E-05    .28791E-03
  18  norm          .10000E-03    .92132       -.17857E-07** at limit **
  19  Prefactor     .10000E-03    4.9464        .47354E-08** at limit **
  20  Prefactor     13.689        48.823        .28913E-05    .34638E-04
  21  Prefactor     .10000E-03    16.777       -.16279E-06** at limit **
  22  Prefactor     .10000E-03    13.858       -.40773E-06** at limit **
  23  Prefactor     .10143E-03    5.4451        .18148E-05** at limit **
  24  Normalizat    1.4348        .20464       -.13027E-05    .50403E-04
  25  Prefactor     .82315        .90879E-01    .25346E-06    .63134E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100006
  Prefactor  = 0.0001
  norm       = 25.9185
  Prefactor  = 2.10493
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 8.07111
  Prefactor  = 0.000100009
  norm       = 2.15933
  Prefactor  = 0.0001
  Prefactor  = 7.88067
  norm       = 0.633871
  Prefactor  = 0.000100603
  norm       = 0.0001
  norm       = 19.3091
  Prefactor  = 2.49247
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 13.6886
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.000101432
  Normalizat = 1.43482
  Prefactor  = 0.82315
 **********
 **   18 **HESSE 
 **********

 FCN=   8182.714     FROM HESSE     STATUS=OK           437 CALLS     2998 TOTAL
                     EDM=   .14E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10001E-03    79.975        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    10.781        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          25.918        18.993        .78678E-04   -1.4689    
   4  Prefactor     2.1049        6.5722        .28440E-03   -1.5418    
   5  Prefactor     .10000E-03    5.2027        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    1.8841        .11986E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    11.883        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     8.0711        24.266        .14097E-03   -1.5140    
   9  Prefactor     .10001E-03    124.44        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          2.1593        2.0290        .12134E-03   -1.5414    
  11  Prefactor     .10000E-03    10.610        .34536E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     7.8807        25.125        .14283E-03   -1.5146    
  13  norm          .63387        1.2409        .13627E-03   -1.5549    
  14  Prefactor     .10060E-03    43.580        .33069E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          .10000E-03    2.7167        .14479E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          19.309        10.699        .91148E-04   -1.4829    
  17  Prefactor     2.4925        22.707        .12954E-02   -1.5392    
  18  norm          .10000E-03    .93556        .84760E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .10000E-03    4.9501        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     13.689        48.939        .10822E-03   -1.4968    
  21  Prefactor     .10000E-03    16.814        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     .10000E-03    13.861        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10143E-03    5.0859        .58995E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Normalizat    1.4348        .23683        .30036E-03   -.79627    
  25  Prefactor     .82315        .10617        .17761E-03   -.98881    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.44024e-08
Minuit parameter uncertainties:
  1  0.00139574
  2  3.94876e-05
  3  18.9977
  4  6.57449
  5  5.82943e-07
  6  4.25918e-06
  7  5.47019e-05
  8  24.2956
  9  0.00213625
  10  2.02908
  11  0.000110935
  12  25.1585
  13  1.24099
  14  0.0102581
  15  1.60713e-05
  16  10.6998
  17  15.0534
  18  3.45115e-07
  19  1.05817e-07
  20  49.083
  21  1.06441e-05
  22  3.51714e-05
  23  0.00539802
  24  0.237014
  25  0.106199
Done.

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

Extracting fit parameters...

4FGL J2358.3+3830
   Spectrum: PowerLaw
488    Prefactor:  1.000e-04  3.517e-05  1.000e-04  1.000e+04 ( 1.000e-14)
489        Index:  2.175e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
490        Scale:  2.145e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
502    Prefactor:  8.231e-01  1.062e-01  0.000e+00  1.000e+01 ( 1.000e+00)
503        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
504        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
497   Normalization:  1.435e+00  2.370e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 359.588 38.510
Photon Flux Upper Limit: 4.91e-08 ph cm-2 s-1
Energy Flux Upper Limit: 3.73e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/219107/likelihoodResults_264988801_265248001_4FGL_J2358.3+3830_daily_bin99.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) = 8182.71462597
delta logL = -0.000343527995938

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 8182.71428236
delta logL = 8.37080733618e-08

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10009E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.1503       1.0000          .0000       10.000    
     3 'Normalizat'    1.4348       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .82315       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5050E+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=   8182.714     FROM MIGRAD    STATUS=CONVERGED     89 CALLS      244 TOTAL
                     EDM=   .35E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10230E-03    6.3042        .18142E-01** at limit **
   2  Index         2.0693        8.2461        .50000        .11883E-04
   3  Normalizat    1.4348        .34035E-02    .30035E-03    .18439E-03
   4  Prefactor     .82315        .15844E-02    .17761E-03   -.27364E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000102297
  Index      = 2.06926
  Normalizat = 1.43482
  Prefactor  = 0.823148
 **********
 **   18 **HESSE 
 **********

 FCN=   8182.714     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      273 TOTAL
                     EDM=   .41E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10230E-03    73.990        .34565E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.0693        5.8625        .50000       -.62630    
   3  Normalizat    1.4348        .11722E-01    .60071E-04   -.79627    
   4  Prefactor     .82315        .54565E-02    .35522E-04   -.98881    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 4.12165e-09
Minuit parameter uncertainties:
  1  0.0261058
  2  307.754
  3  0.0117217
  4  0.00545648
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/219107': 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) = 8182.71428218
delta logL = 2.66653842118e-07

Extracting fit parameters...

4FGL J2358.3+3830
   Spectrum: PowerLaw
488    Prefactor:  1.023e-04  2.611e-02  1.000e-04  1.000e+04 ( 1.000e-14)
489        Index:  2.069e+00  3.078e+02  0.000e+00  1.000e+01 (-1.000e+00)
490        Scale:  2.145e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
502    Prefactor:  8.231e-01  5.456e-03  0.000e+00  1.000e+01 ( 1.000e+00)
503        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
504        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
497   Normalization:  1.435e+00  1.172e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 359.588 38.510

Creating a high resolution counts map...
INFO: Auto-setting vmin to -1.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  1.110e+00 [aplpy.core]
Saving /scratch/kocevski/219107/cmap_HighResolution_264988801_265248001_4FGL_J2358.3+3830_daily_bin99.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='3.73e-03', job_status='DONE', photon_flux_upper_limit='4.91e-08', time_completed='2021-09-30 10:55:57.484286', job_id='219107', GAL2='0.82', fit_tolerance='1e-08', EG2='1.43', EG='1.43', time_epoch_completed='1633024557.48', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.82', dlogl='2.67e-07', ts2='-0.00', photon_index_error='0.00', photon_index='2.17' WHERE bin_id='99' AND source_name='4FGL J2358.3+3830' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep 30 10:55:57 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0070>
Subject: Job 219107: <4FGL_J2358.3+3830_daily_bin99> in cluster <slac> Done

Job <4FGL_J2358.3+3830_daily_bin99> was submitted from host <rhel6-64p> by user <kocevski> in cluster <slac> at Thu Sep 30 10:40:45 2021
Job was executed on host(s) <bullet0070>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep 30 10:40:46 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Thu Sep 30 10:40:46 2021
Terminated at Thu Sep 30 10:55:58 2021
Results reported at Thu Sep 30 10:55:58 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2358.3+3830_daily_bin99 359.588 38.5097 264988801 265248001 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J2358.3+3830 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   768.00 sec.
    Max Memory :                                 1093 MB
    Average Memory :                             281.00 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   911 sec.
    Turnaround time :                            913 sec.

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

