/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 5 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 = 7407
number of fields = 27
No RA_SUN column yet. Adding RA_SUN/DEC_SUN columns.
Done.


Performing analysis on: 4FGL_J2359.0+3922_daily_bin309
RA = 359.755, Dec = 39.3669
tmin = 319420801, tmax = 319680001
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='234762', job_status='RUN', time_executed='2021-09-30 11:35:59.033547', time_epoch_executed='1633026959.03' WHERE source_name='4FGL J2359.0+3922' and cadence='daily' and bin_id='309'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/234762

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/234762/ft1_4FGL_J2359.0+3922_daily_bin309.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/234762/ft2_4FGL_J2359.0+3922_daily_bin309.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/234762/ft1_4FGL_J2359.0+3922_daily_bin309.fits outfile=/scratch/kocevski/234762/ft1_filteredMKT_4FGL_J2359.0+3922_daily_bin309.fits ra=359.755 dec=39.3669 rad=12.0 tmin=319420801.0 tmax=319680001.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 2.71
user 2.47
sys 0.20

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/234762/ft2_4FGL_J2359.0+3922_daily_bin309.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/234762/ft2_4FGL_J2359.0+3922_daily_bin309.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/234762/ft1_filteredMKT_4FGL_J2359.0+3922_daily_bin309.fits evtable="EVENTS" outfile="/scratch/kocevski/234762/ft1_filtered_4FGL_J2359.0+3922_daily_bin309.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.41
user 0.27
sys 0.13

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/234762/ft1_filtered_4FGL_J2359.0+3922_daily_bin309.fits" evtable="EVENTS" scfile=/scratch/kocevski/234762/ft2_4FGL_J2359.0+3922_daily_bin309.fits sctable="SC_DATA" outfile=/scratch/kocevski/234762/ltcube_319420801_319680001_4FGL_J2359.0+3922_daily_bin309.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/234762/ft2_4FGL_J2359.0+3922_daily_bin309.fits
.....................!
real 9.12
user 8.80
sys 0.30

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/234762/ft1_filtered_4FGL_J2359.0+3922_daily_bin309.fits evtable="EVENTS" scfile=/scratch/kocevski/234762/ft2_4FGL_J2359.0+3922_daily_bin309.fits sctable="SC_DATA" expcube=/scratch/kocevski/234762/ltcube_319420801_319680001_4FGL_J2359.0+3922_daily_bin309.fits outfile=/scratch/kocevski/234762/expmap_319420801_319680001_4FGL_J2359.0+3922_daily_bin309.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/234762/ltcube_319420801_319680001_4FGL_J2359.0+3922_daily_bin309.fits
.....................!
real 146.24
user 142.49
sys 3.51

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.
Extended source CTB 109 in ROI with RadialDisk spatial model.
Added 160 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 J2359.0+3922 @ 359.755 39.3669

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/234762/ft1_filtered_4FGL_J2359.0+3922_daily_bin309.fits scfile=/scratch/kocevski/234762/ft2_4FGL_J2359.0+3922_daily_bin309.fits outfile=/scratch/kocevski/234762/cmap_319420801_319680001_4FGL_J2359.0+3922_daily_bin309.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.755 yref=39.3669 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.45
user 0.29
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/234762/ft1_filtered_4FGL_J2359.0+3922_daily_bin309.fits scfile=/scratch/kocevski/234762/ft2_4FGL_J2359.0+3922_daily_bin309.fits outfile=/scratch/kocevski/234762/cmap_HighResolution_319420801_319680001_4FGL_J2359.0+3922_daily_bin309.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.755 yref=39.3669 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.45
user 0.30
sys 0.14

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/234762/ft1_filtered_4FGL_J2359.0+3922_daily_bin309.fits evtable="EVENTS" scfile=/scratch/kocevski/234762/ft2_4FGL_J2359.0+3922_daily_bin309.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/234762/Model_4FGL_J2359.0+3922_daily_bin309.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 CTB 109
adding source EG_v02
adding source FHES J2304.0+5406
adding source GAL_V02
Working on...
/scratch/kocevski/234762/ft1_filtered_4FGL_J2359.0+3922_daily_bin309.fits.....................!
real 85.11
user 83.96
sys 0.99

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/234762/ft1_filtered_4FGL_J2359.0+3922_daily_bin309.fits', '/scratch/kocevski/234762/ft2_4FGL_J2359.0+3922_daily_bin309.fits', expMap='/scratch/kocevski/234762/expmap_319420801_319680001_4FGL_J2359.0+3922_daily_bin309.fits', expCube='/scratch/kocevski/234762/ltcube_319420801_319680001_4FGL_J2359.0+3922_daily_bin309.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/234762/Model_4FGL_J2359.0+3922_daily_bin309.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J2359.0+3922'

4FGL J2359.0+3922
   Spectrum: PowerLaw
518    Prefactor:  1.197e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-13)
519        Index:  2.348e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
520        Scale:  1.622e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/234762/ft1_filtered_4FGL_J2359.0+3922_daily_bin309.fits
Spacecraft file(s): /scratch/kocevski/234762/ft2_4FGL_J2359.0+3922_daily_bin309.fits
Exposure map: /scratch/kocevski/234762/expmap_319420801_319680001_4FGL_J2359.0+3922_daily_bin309.fits
Exposure cube: /scratch/kocevski/234762/ltcube_319420801_319680001_4FGL_J2359.0+3922_daily_bin309.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/234762/Model_4FGL_J2359.0+3922_daily_bin309.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) = 10173.6413342

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10031E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    13.158       1.0000         .10000E-03   10000.    
     3 'norm      '    16.709       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     5 'norm      '    1.4755       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .12237E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10655E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    1.5364       1.0000         .10000E-03   10000.    
     9 'Prefactor '    12.733       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    11 'norm      '    1.7167       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    4.1941       1.0000         .10000E-03   10000.    
    14 'norm      '    15.358       1.0000         .10000E-03   10000.    
    15 'Prefactor '    11.579       1.0000         .10000E-03   10000.    
    16 'norm      '    5.3194       1.0000         .10000E-03   10000.    
    17 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .68114E-02   1.0000         .10000E-03   10000.    
    19 'norm      '    1.2102       1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    1.7485       1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    4.8025       1.0000         .10000E-03   10000.    
    25 'Normalizat'    1.7251       1.0000         .10000E-01   10.000    
    26 'Prefactor '    .76959       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5320E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   10173.58     FROM MIGRAD    STATUS=CONVERGED    614 CALLS     2706 TOTAL
                     EDM=   .14E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.8%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    46.519       -.29728E-05** at limit **
   2  Prefactor     13.164        21.592        .61844E-05    .14118E-03
   3  norm          16.710        19.663        .28776E-06   -.65648E-06
   4  Prefactor     .10000E-03    3.7161        .30842E-07** at limit **
   5  norm          1.4755        1.2746       -.41922E-07    .34310E-03
   6  Prefactor     .10000E-03    2.5916       -.77527E-07** at limit **
   7  Prefactor     .10000E-03    2.3038       -.38564E-06** at limit **
   8  Prefactor     1.5277        4.3287        .22326E-05   -.14016E-02
   9  Prefactor     12.733        28.048       -.22161E-06   -.87109E-05
  10  Prefactor     .10000E-03    11.801        .75211E-06** at limit **
  11  norm          1.7167        1.6139        .54606E-07    .55294E-04
  12  Prefactor     .10000E-03    3.0536        .56375E-07** at limit **
  13  Prefactor     4.1926        30.272       -.19436E-05   -.12101E-04
  14  norm          15.358        2.8590        .17947E-07   -.32919E-03
  15  Prefactor     11.578        12.435        .33579E-06   -.22886E-03
  16  norm          5.3194        4.7812       -.15983E-07   -.58616E-03
  17  norm          .10000E-03    2.6910       -.69401E-08** at limit **
  18  Prefactor     .69010E-02    12.683        .10928E-05   -.21197E-03
  19  norm          1.2100        1.4421       -.10482E-07   -.16306E-04
  20  Prefactor     .10000E-03    5.0509       -.29708E-07** at limit **
  21  Prefactor     1.7276        100.05       -.53359E-04   -.37608E-04
  22  Prefactor     .10000E-03    45.901        .50624E-05** at limit **
  23  Prefactor     .10000E-03    15.001       -.10488E-05** at limit **
  24  Prefactor     4.8019        5.5187       -.14344E-07   -.20170E-04
  25  Normalizat    1.7251        .20449       -.14061E-05    .97809E-04
  26  Prefactor     .76963        .85289E-01    .68843E-06   -.58790E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100001
  Prefactor  = 13.1641
  norm       = 16.7099
  Prefactor  = 0.0001
  norm       = 1.4755
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 1.5277
  Prefactor  = 12.7327
  Prefactor  = 0.0001
  norm       = 1.71669
  Prefactor  = 0.0001
  Prefactor  = 4.19261
  norm       = 15.3582
  Prefactor  = 11.5781
  norm       = 5.31937
  norm       = 0.0001
  Prefactor  = 0.00690105
  norm       = 1.21001
  Prefactor  = 0.0001
  Prefactor  = 1.72763
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 4.80193
  Normalizat = 1.72511
  Prefactor  = 0.769629
 **********
 **   18 **HESSE 
 **********

 FCN=   10173.58     FROM HESSE     STATUS=OK           474 CALLS     3180 TOTAL
                     EDM=   .13E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    47.030        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     13.164        21.767        .11042E-03   -1.4982    
   3  norm          16.710        19.662        .97981E-04   -1.4890    
   4  Prefactor     .10000E-03    3.7342        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          1.4755        1.2831        .51544E-03   -1.5465    
   6  Prefactor     .10000E-03    8.5257        .31481E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    2.4078        .29866E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     1.5277        15.717        .17206E-02   -1.5461    
   9  Prefactor     12.733        28.248        .11226E-03   -1.4994    
  10  Prefactor     .10000E-03    11.811        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  norm          1.7167        1.6290        .12090E-03   -1.5446    
  12  Prefactor     .10000E-03    3.0829        .17208E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     4.1926        30.280        .19678E-03   -1.5298    
  14  norm          15.358        2.8589        .69657E-04   -1.4924    
  15  Prefactor     11.578        12.476        .58865E-03   -1.5027    
  16  norm          5.3194        4.7985        .87129E-03   -1.5247    
  17  norm          .10000E-03    2.6930        .16159E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .69010E-02    15.578        .10065       -1.5691    
  19  norm          1.2100        1.4241        .12829E-03   -1.5488    
  20  Prefactor     .10000E-03    5.0526        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     1.7276        101.21        .31712E-03   -1.5445    
  22  Prefactor     .10000E-03    46.158        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10000E-03    15.003        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     4.8019        5.5017        .18358E-03   -1.5270    
  25  Normalizat    1.7251        .23510        .31528E-03   -.71635    
  26  Prefactor     .76963        .97796E-01    .19604E-03   -1.0086    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.29877e-08
Minuit parameter uncertainties:
  1  0.000323935
  2  21.7796
  3  19.6694
  4  1.21464e-07
  5  1.28309
  6  0.000111891
  7  9.12882e-06
  8  9.80317
  9  28.2778
  10  9.56474e-06
  11  1.62905
  12  2.05389e-06
  13  22.5504
  14  2.8589
  15  12.4784
  16  4.79887
  17  2.23539e-07
  18  0.651164
  19  1.42417
  20  6.09861e-08
  21  26.4929
  22  0.00012637
  23  1.38067e-05
  24  5.50226
  25  0.235256
  26  0.0978178
Done.

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

Extracting fit parameters...

4FGL J2359.0+3922
   Spectrum: PowerLaw
518    Prefactor:  4.802e+00  5.502e+00  1.000e-04  1.000e+04 ( 1.000e-13)
519        Index:  2.348e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
520        Scale:  1.622e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
529    Prefactor:  7.696e-01  9.782e-02  0.000e+00  1.000e+01 ( 1.000e+00)
530        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
531        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
524   Normalization:  1.725e+00  2.353e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 1.47
Ra Dec: 359.755 39.367
Photon Index (Fixed Index): 2.35 +/- 0.00
Photon Flux (Fixed Index): 2.47e-08 +/- 2.83e-08
Energy Flux (Fixed Index): 8.71e-06 +/- 9.98e-06

TS (Fixed Index): 1.47
Ra Dec: 359.755 39.367
Photon Flux Upper Limit: 9.71e-08 ph cm-2 s-1
Energy Flux Upper Limit: 7.48e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/234762/likelihoodResults_319420801_319680001_4FGL_J2359.0+3922_daily_bin309.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) = 10173.1068372
delta logL = 0.47634684173

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 10173.1039094
delta logL = 0.479274564319

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    8.1166       1.0000         .10000E-03   10000.    
     2 'Index     '    1.5898       1.0000          .0000       10.000    
     3 'Normalizat'    1.7421       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .76522       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5320E+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=   10173.10     FROM MIGRAD    STATUS=CONVERGED     86 CALLS      281 TOTAL
                     EDM=   .13E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     8.1164        8.7050        .14073E-03    .61613E-03
   2  Index         1.5899        .65394        .13142E-01    .15806E-03
   3  Normalizat    1.7420        .21907        .31409E-03   -.83902E-04
   4  Prefactor     .76528        .96377E-01    .19652E-03   -.14798E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 8.11637
  Index      = 1.58987
  Normalizat = 1.74197
  Prefactor  = 0.765278
 **********
 **   18 **HESSE 
 **********

 FCN=   10173.10     FROM HESSE     STATUS=OK            23 CALLS      304 TOTAL
                     EDM=   .14E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     8.1164        8.7648        .28146E-04   -1.5138    
   2  Index         1.5899        .65863        .52569E-03   -.75053    
   3  Normalizat    1.7420        .21920        .12563E-04   -.71188    
   4  Prefactor     .76528        .96441E-01    .78606E-05   -1.0102    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.44863e-09
Minuit parameter uncertainties:
  1  8.76619
  2  0.662241
  3  0.219322
  4  0.0964622
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/234762': 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) = 10173.1039092
delta logL = 0.479274807678

Extracting fit parameters...

4FGL J2359.0+3922
   Spectrum: PowerLaw
518    Prefactor:  8.116e+00  8.766e+00  1.000e-04  1.000e+04 ( 1.000e-13)
519        Index:  1.590e+00  6.622e-01  0.000e+00  1.000e+01 (-1.000e+00)
520        Scale:  1.622e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
529    Prefactor:  7.653e-01  9.646e-02  0.000e+00  1.000e+01 ( 1.000e+00)
530        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
531        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
524   Normalization:  1.742e+00  2.193e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 2.43
Ra Dec: 359.755 39.367
Photon Index (Free Index): 1.59 +/- 0.66
Photon Flux (Free Index): 1.14e-08 +/- 1.65e-08
Energy Flux (Free Index): 2.66e-05 +/- 4.28e-05

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/234762/cmap_HighResolution_319420801_319680001_4FGL_J2359.0+3922_daily_bin309.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='7.48e-03', comment='SUCCESS', photon_flux='2.47e-08', energy_flux2='2.66e-05', photon_flux_error='2.83e-08', dlogl='4.79e-01', energy_flux='8.71e-06', photon_flux2='1.14e-08', job_status='DONE', time_completed='2021-09-30 11:47:52.705462', photon_index_error2='0.66', photon_index2='1.59', ts='1.47', fit_tolerance='1e-08', GAL='0.77', photon_index_error='0.00', photon_flux_upper_limit='9.71e-08', energy_flux_error2='4.28e-05', EG='1.73', time_epoch_completed='1633027672.71', return_code='0', job_id='234762', GAL2='0.77', EG2='1.74', return_code2='0', energy_flux_error='9.98e-06', photon_flux_error2='1.65e-08', ts2='2.43', photon_index='2.35' WHERE bin_id='309' AND source_name='4FGL J2359.0+3922' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep 30 11:47:52 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0071>
Subject: Job 234762: <4FGL_J2359.0+3922_daily_bin309> in cluster <slac> Done

Job <4FGL_J2359.0+3922_daily_bin309> was submitted from host <rhel6-64f> by user <kocevski> in cluster <slac> at Thu Sep 30 11:35:45 2021
Job was executed on host(s) <bullet0071>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep 30 11:35:47 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Thu Sep 30 11:35:47 2021
Terminated at Thu Sep 30 11:47:53 2021
Results reported at Thu Sep 30 11:47:53 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2359.0+3922_daily_bin309 359.755 39.3669 319420801 319680001 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J2359.0+3922 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   708.13 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             338.38 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   725 sec.
    Turnaround time :                            728 sec.

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

