aklog: Couldn't determine realm of user:aklog: unknown RPC error (-1765328189)  while getting realm
/nfs/farm/g/glast/g/LCRepository/bin/miniconda2/envs/fermitools_v1.0.5/lib/python2.7/site-packages/matplotlib/font_manager.py:281: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment.
  'Matplotlib is building the font cache using fc-list. '
/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 100 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 = 17214
number of fields = 22
No RA_SUN column yet. Adding RA_SUN/DEC_SUN columns.
Done.


Performing analysis on: 4FGL_J0407.5+0741_weekly_bin6
RA = 61.8921, Dec = 7.6998
tmin = 242611201, tmax = 243216001
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='459095', job_status='RUN', time_executed='2021-07-07 10:37:37.043430', time_epoch_executed='1625679457.04' WHERE source_name='4FGL J0407.5+0741' and cadence='weekly' and bin_id='6'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/459095

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

Retrieving the FT1 file...

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

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

Retrieving 108 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/459095/ft1_4FGL_J0407.5+0741_weekly_bin6.fits


Retrieving the FT1 file...

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

Retrieving 108 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/459095/ft2_4FGL_J0407.5+0741_weekly_bin6.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/459095/ft1_4FGL_J0407.5+0741_weekly_bin6.fits outfile=/scratch/kocevski/459095/ft1_filteredMKT_4FGL_J0407.5+0741_weekly_bin6.fits ra=61.8921 dec=7.6998 rad=12.0 tmin=242611201.0 tmax=243216001.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.92
user 2.48
sys 0.37

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/459095/ft2_4FGL_J0407.5+0741_weekly_bin6.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/459095/ft2_4FGL_J0407.5+0741_weekly_bin6.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/459095/ft1_filteredMKT_4FGL_J0407.5+0741_weekly_bin6.fits evtable="EVENTS" outfile="/scratch/kocevski/459095/ft1_filtered_4FGL_J0407.5+0741_weekly_bin6.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.71
user 0.36
sys 0.33

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/459095/ft1_filtered_4FGL_J0407.5+0741_weekly_bin6.fits" evtable="EVENTS" scfile=/scratch/kocevski/459095/ft2_4FGL_J0407.5+0741_weekly_bin6.fits sctable="SC_DATA" outfile=/scratch/kocevski/459095/ltcube_242611201_243216001_4FGL_J0407.5+0741_weekly_bin6.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/459095/ft2_4FGL_J0407.5+0741_weekly_bin6.fits
.....................!
real 29.26
user 28.57
sys 0.48

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/459095/ft1_filtered_4FGL_J0407.5+0741_weekly_bin6.fits evtable="EVENTS" scfile=/scratch/kocevski/459095/ft2_4FGL_J0407.5+0741_weekly_bin6.fits sctable="SC_DATA" expcube=/scratch/kocevski/459095/ltcube_242611201_243216001_4FGL_J0407.5+0741_weekly_bin6.fits outfile=/scratch/kocevski/459095/expmap_242611201_243216001_4FGL_J0407.5+0741_weekly_bin6.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/459095/ltcube_242611201_243216001_4FGL_J0407.5+0741_weekly_bin6.fits
.....................!
real 193.26
user 186.18
sys 5.25

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
Added 140 point sources and 0 extended sources

Setting source of interest to:
4FGL J0407.5+0741 @ 61.8921 7.6998

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/459095/ft1_filtered_4FGL_J0407.5+0741_weekly_bin6.fits scfile=/scratch/kocevski/459095/ft2_4FGL_J0407.5+0741_weekly_bin6.fits outfile=/scratch/kocevski/459095/cmap_242611201_243216001_4FGL_J0407.5+0741_weekly_bin6.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=61.8921 yref=7.6998 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.73
user 0.41
sys 0.31

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/459095/ft1_filtered_4FGL_J0407.5+0741_weekly_bin6.fits scfile=/scratch/kocevski/459095/ft2_4FGL_J0407.5+0741_weekly_bin6.fits outfile=/scratch/kocevski/459095/cmap_HighResolution_242611201_243216001_4FGL_J0407.5+0741_weekly_bin6.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=61.8921 yref=7.6998 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.74
user 0.40
sys 0.33

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/459095/ft1_filtered_4FGL_J0407.5+0741_weekly_bin6.fits evtable="EVENTS" scfile=/scratch/kocevski/459095/ft2_4FGL_J0407.5+0741_weekly_bin6.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/459095/Model_4FGL_J0407.5+0741_weekly_bin6.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
Working on...
/scratch/kocevski/459095/ft1_filtered_4FGL_J0407.5+0741_weekly_bin6.fits.....................!
real 465.71
user 458.67
sys 1.66

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/459095/ft1_filtered_4FGL_J0407.5+0741_weekly_bin6.fits', '/scratch/kocevski/459095/ft2_4FGL_J0407.5+0741_weekly_bin6.fits', expMap='/scratch/kocevski/459095/expmap_242611201_243216001_4FGL_J0407.5+0741_weekly_bin6.fits', expCube='/scratch/kocevski/459095/ltcube_242611201_243216001_4FGL_J0407.5+0741_weekly_bin6.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/459095/Model_4FGL_J0407.5+0741_weekly_bin6.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J0407.5+0741'

4FGL J0407.5+0741
   Spectrum: PowerLaw
217    Prefactor:  5.499e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-13)
218        Index:  2.311e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
219        Scale:  1.332e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/459095/ft1_filtered_4FGL_J0407.5+0741_weekly_bin6.fits
Spacecraft file(s): /scratch/kocevski/459095/ft2_4FGL_J0407.5+0741_weekly_bin6.fits
Exposure map: /scratch/kocevski/459095/expmap_242611201_243216001_4FGL_J0407.5+0741_weekly_bin6.fits
Exposure cube: /scratch/kocevski/459095/ltcube_242611201_243216001_4FGL_J0407.5+0741_weekly_bin6.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/459095/Model_4FGL_J0407.5+0741_weekly_bin6.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) = 36553.1979744

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
     2 'norm      '    1.1346       1.0000         .10000E-03   10000.    
     3 'norm      '    1.1413       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .69125E-01   1.0000         .10000E-03   10000.    
     5 'Prefactor '    10.433       1.0000         .10000E-03   10000.    
     6 'norm      '    2.7770       1.0000         .10000E-03   10000.    
     7 'Prefactor '    5.6549       1.0000         .10000E-03   10000.    
     8 'norm      '    2.1277       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    10 'norm      '    4.4956       1.0000         .10000E-03   10000.    
    11 'norm      '    2.4589       1.0000         .10000E-03   10000.    
    12 'Prefactor '    3.1164       1.0000         .10000E-03   10000.    
    13 'Prefactor '    4.0998       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    6.2786       1.0000         .10000E-03   10000.    
    16 'norm      '    .30023       1.0000         .10000E-03   10000.    
    17 'Prefactor '    .10006E-03   1.0000         .10000E-03   10000.    
    18 'norm      '    2.4033       1.0000         .10000E-03   10000.    
    19 'Prefactor '    1.4072       1.0000         .10000E-03   10000.    
    20 'norm      '    .56080       1.0000         .10000E-03   10000.    
    21 'Normalizat'    .99874       1.0000         .10000E-01   10.000    
    22 'Prefactor '    1.0131       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .4600E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   36553.04     FROM MIGRAD    STATUS=CONVERGED    518 CALLS     2162 TOTAL
                     EDM=   .11E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  4.3%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    4.2976        .12284E-06** at limit **
   2  norm          1.1349        2.1139        .61396E-06    .38183E-04
   3  norm          1.1414        .71520        .71016E-07    .34182E-04
   4  Prefactor     .10047E-03    11.217        .46348E-06** at limit **
   5  Prefactor     10.430        7.6035       -.10942E-06   -.18860E-03
   6  norm          2.7773        4.9817        .59302E-07    .10348E-04
   7  Prefactor     5.6540        10.614       -.97409E-07   -.68930E-04
   8  norm          2.1278        1.8503        .16097E-06   -.13282E-04
   9  Prefactor     .10000E-03    12.320        .35493E-06** at limit **
  10  norm          4.4951        11.801        .13663E-05   -.77711E-04
  11  norm          2.4589        .68076        .81745E-08   -.59163E-03
  12  Prefactor     3.1163        1.0294       -.68091E-07   -.92053E-03
  13  Prefactor     4.0904        11.430        .40673E-05   -.15083E-03
  14  Prefactor     .10000E-03    11.087        .14889E-06** at limit **
  15  Prefactor     6.2793        6.6996        .65833E-06   -.12353E-03
  16  norm          .29789        .69993       -.39478E-06   -.92443E-04
  17  Prefactor     .10000E-03    11.864       -.19138E-06** at limit **
  18  norm          2.4034        1.5238        .12412E-06   -.12635E-03
  19  Prefactor     1.4073        2.8342        .78739E-06   -.12145E-04
  20  norm          .56116        .94676        .57213E-06    .31198E-04
  21  Normalizat    .99871        .13740       -.17250E-05   -.37015E-03
  22  Prefactor     1.0131        .36755E-01    .50337E-07   -.92965E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  norm       = 1.13493
  norm       = 1.14136
  Prefactor  = 0.00010047
  Prefactor  = 10.43
  norm       = 2.7773
  Prefactor  = 5.65398
  norm       = 2.1278
  Prefactor  = 0.0001
  norm       = 4.49511
  norm       = 2.45894
  Prefactor  = 3.11633
  Prefactor  = 4.09036
  Prefactor  = 0.0001
  Prefactor  = 6.27925
  norm       = 0.297889
  Prefactor  = 0.0001
  norm       = 2.40335
  Prefactor  = 1.40734
  norm       = 0.561164
  Normalizat = 0.998712
  Prefactor  = 1.01314
 **********
 **   18 **HESSE 
 **********

 FCN=   36553.04     FROM HESSE     STATUS=OK           364 CALLS     2526 TOTAL
                     EDM=   .14E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    4.3542        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  norm          1.1349        2.0680        .37050E-03   -1.5495    
   3  norm          1.1414        .71239        .12377E-03   -1.5494    
   4  Prefactor     .10047E-03    9.7787        .16715       -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     10.430        7.6033        .12405E-03   -1.5062    
   6  norm          2.7773        4.9629        .24420E-03   -1.5375    
   7  Prefactor     5.6540        10.591        .16892E-03   -1.5232    
   8  norm          2.1278        1.8375        .23226E-03   -1.5416    
   9  Prefactor     .10000E-03    12.520        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          4.4951        11.780        .18989E-03   -1.5284    
  11  norm          2.4589        .67741        .76629E-04   -1.5394    
  12  Prefactor     3.1163        1.0253        .10152E-03   -1.5355    
  13  Prefactor     4.0904        11.932        .99551E-03   -1.5303    
  14  Prefactor     .10000E-03    11.121        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     6.2793        6.7019        .16020E-03   -1.5207    
  16  norm          .29789        1.5475        .19818E-02   -1.5599    
  17  Prefactor     .10000E-03    11.968        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  norm          2.4034        1.5189        .17984E-03   -1.5398    
  19  Prefactor     1.4073        2.7976        .36540E-03   -1.5471    
  20  norm          .56116        .94053        .22987E-03   -1.5558    
  21  Normalizat    .99871        .14763        .49197E-03   -.93074    
  22  Prefactor     1.0131        .40046E-01    .14101E-03   -.92293    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.38256e-07
Minuit parameter uncertainties:
  1  1.4183e-05
  2  2.06817
  3  0.7124
  4  0.00428906
  5  7.60404
  6  4.96366
  7  10.5946
  8  1.83758
  9  2.29532e-05
  10  11.786
  11  0.677415
  12  1.0253
  13  11.9388
  14  1.22032e-05
  15  6.70266
  16  1.35776
  17  3.75302e-05
  18  1.51894
  19  2.7979
  20  0.940552
  21  0.147689
  22  0.0400473
Done.

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

Extracting fit parameters...

4FGL J0407.5+0741
   Spectrum: PowerLaw
217    Prefactor:  1.043e+01  7.604e+00  1.000e-04  1.000e+04 ( 1.000e-13)
218        Index:  2.311e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
219        Scale:  1.332e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
457    Prefactor:  1.013e+00  4.005e-02  0.000e+00  1.000e+01 ( 1.000e+00)
458        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
459        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
456   Normalization:  9.987e-01  1.477e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 3.07
Ra Dec: 61.892 7.700
Photon Index (Fixed Index): 2.31 +/- 0.00
Photon Flux (Fixed Index): 3.16e-08 +/- 2.30e-08
Energy Flux (Fixed Index): 1.18e-05 +/- 8.58e-06

TS (Fixed Index): 3.07
Ra Dec: 61.892 7.700
Photon Flux Upper Limit: 7.75e-08 ph cm-2 s-1
Energy Flux Upper Limit: 5.95e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/459095/likelihoodResults_242611201_243216001_4FGL_J0407.5+0741_weekly_bin6.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) = 36552.5556043
delta logL = 0.480825682607

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 36552.5383623
delta logL = 0.498067611268

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    5.0778       1.0000         .10000E-03   10000.    
     2 'Index     '    3.0079       1.0000          .0000       10.000    
     3 'Normalizat'    .96453       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0180       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .4600E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   36552.54     FROM MIGRAD    STATUS=CONVERGED     67 CALLS      324 TOTAL
                     EDM=   .17E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     5.0804        34.776        .44608E-02    .15000E-02
   2  Index         3.0078        1.8658        .14348        .73256E-03
   3  Normalizat    .96490        .43029E-01    .11268        .14463E-03
   4  Prefactor     1.0179        .11345E-01    .31841E-01   -.48891E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 5.08038
  Index      = 3.00784
  Normalizat = 0.964905
  Prefactor  = 1.0179
 **********
 **   18 **HESSE 
 **********

 FCN=   36552.54     FROM HESSE     STATUS=NOT POSDEF    33 CALLS      357 TOTAL
                     EDM=   .72E-05    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     5.0804        74.518        .17843E-03   -1.5257    
   2  Index         3.0078        3.6291        .80411E-02   -.40981    
   3  Normalizat    .96490        .17834        .49961E-03   -.94216    
   4  Prefactor     1.0179        .44572E-01    .14071E-03   -.92135    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 7.15956e-06
Minuit parameter uncertainties:
  1  38.9724
  2  4.187
  3  0.178453
  4  0.0445732
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/459095': 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) = 36552.5383564
delta logL = 0.498073559378

Extracting fit parameters...

4FGL J0407.5+0741
   Spectrum: PowerLaw
217    Prefactor:  5.080e+00  3.897e+01  1.000e-04  1.000e+04 ( 1.000e-13)
218        Index:  3.008e+00  4.187e+00  0.000e+00  1.000e+01 (-1.000e+00)
219        Scale:  1.332e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
457    Prefactor:  1.018e+00  4.457e-02  0.000e+00  1.000e+01 ( 1.000e+00)
458        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
459        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
456   Normalization:  9.649e-01  1.785e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 4.17
Ra Dec: 61.892 7.700
Photon Index (Free Index): 3.01 +/- 4.19
Photon Flux (Free Index): 6.11e-08 +/- 7.54e-08
Energy Flux (Free Index): 1.22e-05 +/- 1.32e-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/459095/cmap_HighResolution_242611201_243216001_4FGL_J0407.5+0741_weekly_bin6.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='5.95e-03', comment='SUCCESS', photon_flux='3.16e-08', energy_flux2='1.22e-05', photon_flux_error='2.30e-08', dlogl='4.98e-01', energy_flux='1.18e-05', photon_flux2='6.11e-08', job_status='DONE', time_completed='2021-07-07 11:12:53.618534', photon_index_error2='4.19', photon_index2='3.01', ts='3.07', fit_tolerance='1e-08', GAL='1.01', photon_index_error='0.00', photon_flux_upper_limit='7.75e-08', energy_flux_error2='1.32e-05', EG='1.00', time_epoch_completed='1625681573.62', return_code='0', job_id='459095', GAL2='1.02', EG2='0.96', return_code2='102', energy_flux_error='8.58e-06', photon_flux_error2='7.54e-08', ts2='4.17', photon_index='2.31' WHERE bin_id='6' AND source_name='4FGL J0407.5+0741' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Wed Jul  7 11:12:53 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0279>
Subject: Job 459095: <4FGL_J0407.5+0741_weekly_bin6> in cluster <slac> Done

Job <4FGL_J0407.5+0741_weekly_bin6> was submitted from host <rhel6-64m> by user <kocevski> in cluster <slac> at Wed Jul  7 00:46:33 2021
Job was executed on host(s) <bullet0279>, in queue <medium>, as user <kocevski> in cluster <slac> at Wed Jul  7 00:49:15 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Wed Jul  7 00:49:15 2021
Terminated at Wed Jul  7 11:12:54 2021
Results reported at Wed Jul  7 11:12:54 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J0407.5+0741_weekly_bin6 61.8921 7.6998 242611201 243216001 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J0407.5+0741 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   2107.00 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             67.75 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   37419 sec.
    Turnaround time :                            37581 sec.

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

