aklog: Couldn't determine realm of user:aklog: No credentials cache found  while getting realm
/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 92 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 make4FGLDR3xml version 01r09.
The default diffuse model files and names are for P8R3, 4FGL DRs, and the default fermitools directory locations.

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 = 7395
number of fields = 31
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J0402.0-2616_daily_bin1722
RA = 60.5103, Dec = -26.273
tmin = 685670401, tmax = 685929601
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='229489', job_status='RUN', time_executed='2022-09-27 00:07:23.732313', time_epoch_executed='1664262443.73' WHERE source_name='4FGL J0402.0-2616' and cadence='daily' and bin_id='1722'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/229489

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/229489/ft1_4FGL_J0402.0-2616_daily_bin1722.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/229489/ft2_4FGL_J0402.0-2616_daily_bin1722.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/229489/ft1_4FGL_J0402.0-2616_daily_bin1722.fits outfile=/scratch/kocevski/229489/ft1_filteredMKT_4FGL_J0402.0-2616_daily_bin1722.fits ra=60.5103 dec=-26.273 rad=12.0 tmin=685670401.0 tmax=685929601.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 3.70
user 3.42
sys 0.21

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/229489/ft2_4FGL_J0402.0-2616_daily_bin1722.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/229489/ft2_4FGL_J0402.0-2616_daily_bin1722.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/229489/ft1_filteredMKT_4FGL_J0402.0-2616_daily_bin1722.fits evtable="EVENTS" outfile="/scratch/kocevski/229489/ft1_filtered_4FGL_J0402.0-2616_daily_bin1722.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.51
user 0.34
sys 0.16

Number of photons that the gtmktime cut: 459

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/229489/ft1_filtered_4FGL_J0402.0-2616_daily_bin1722.fits" evtable="EVENTS" scfile=/scratch/kocevski/229489/ft2_4FGL_J0402.0-2616_daily_bin1722.fits sctable="SC_DATA" outfile=/scratch/kocevski/229489/ltcube_685670401_685929601_4FGL_J0402.0-2616_daily_bin1722.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/229489/ft2_4FGL_J0402.0-2616_daily_bin1722.fits
.....................!
real 12.82
user 12.41
sys 0.37

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/229489/ft1_filtered_4FGL_J0402.0-2616_daily_bin1722.fits evtable="EVENTS" scfile=/scratch/kocevski/229489/ft2_4FGL_J0402.0-2616_daily_bin1722.fits sctable="SC_DATA" expcube=/scratch/kocevski/229489/ltcube_685670401_685929601_4FGL_J0402.0-2616_daily_bin1722.fits outfile=/scratch/kocevski/229489/expmap_685670401_685929601_4FGL_J0402.0-2616_daily_bin1722.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/229489/ltcube_685670401_685929601_4FGL_J0402.0-2616_daily_bin1722.fits
.....................!
real 193.37
user 186.81
sys 6.16

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 Fornax A in ROI, make sure /nfs/farm/g/glast/g/LCRepository/Likelihood/ExtendedSources/Extended_8years/Templates/FornaxA.fits is the correct path to the extended template.
Added 156 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 J0402.0-2616 @ 60.5103 -26.273

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/229489/ft1_filtered_4FGL_J0402.0-2616_daily_bin1722.fits scfile=/scratch/kocevski/229489/ft2_4FGL_J0402.0-2616_daily_bin1722.fits outfile=/scratch/kocevski/229489/cmap_685670401_685929601_4FGL_J0402.0-2616_daily_bin1722.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=60.5103 yref=-26.273 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.55
user 0.37
sys 0.17

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/229489/ft1_filtered_4FGL_J0402.0-2616_daily_bin1722.fits scfile=/scratch/kocevski/229489/ft2_4FGL_J0402.0-2616_daily_bin1722.fits outfile=/scratch/kocevski/229489/cmap_HighResolution_685670401_685929601_4FGL_J0402.0-2616_daily_bin1722.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=60.5103 yref=-26.273 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.56
user 0.38
sys 0.17

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/229489/ft1_filtered_4FGL_J0402.0-2616_daily_bin1722.fits evtable="EVENTS" scfile=/scratch/kocevski/229489/ft2_4FGL_J0402.0-2616_daily_bin1722.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/229489/Model_4FGL_J0402.0-2616_daily_bin1722.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 Fornax A
adding source GAL_V02
Working on...
/scratch/kocevski/229489/ft1_filtered_4FGL_J0402.0-2616_daily_bin1722.fits.....................!
real 117.70
user 116.14
sys 1.32

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/229489/ft1_filtered_4FGL_J0402.0-2616_daily_bin1722.fits', '/scratch/kocevski/229489/ft2_4FGL_J0402.0-2616_daily_bin1722.fits', expMap='/scratch/kocevski/229489/expmap_685670401_685929601_4FGL_J0402.0-2616_daily_bin1722.fits', expCube='/scratch/kocevski/229489/ltcube_685670401_685929601_4FGL_J0402.0-2616_daily_bin1722.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/229489/Model_4FGL_J0402.0-2616_daily_bin1722.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J0402.0-2616'

4FGL J0402.0-2616
   Spectrum: LogParabola
255         norm:  2.550e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-13)
256        alpha:  1.995e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
257         beta:  1.705e-01  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
258           Eb:  1.630e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/229489/ft1_filtered_4FGL_J0402.0-2616_daily_bin1722.fits
Spacecraft file(s): /scratch/kocevski/229489/ft2_4FGL_J0402.0-2616_daily_bin1722.fits
Exposure map: /scratch/kocevski/229489/expmap_685670401_685929601_4FGL_J0402.0-2616_daily_bin1722.fits
Exposure cube: /scratch/kocevski/229489/ltcube_685670401_685929601_4FGL_J0402.0-2616_daily_bin1722.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/229489/Model_4FGL_J0402.0-2616_daily_bin1722.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) = 5113.27192312

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    46.017       1.0000          .0000       .10000E+07
     2 'Prefactor '    10.432       1.0000          .0000       .10000E+07
     3 'Prefactor '    .17718E-04   1.0000          .0000       .10000E+07
     4 'Prefactor '    .14834E-02   1.0000          .0000       .10000E+07
     5 'Prefactor '    2.1085       1.0000          .0000       .10000E+07
     6 'Prefactor '    3.5327       1.0000          .0000       .10000E+07
     7 'Prefactor '    .33701E-06   1.0000          .0000       .10000E+07
     8 'Prefactor '    38.873       1.0000          .0000       .10000E+07
     9 'norm      '    1.7326       1.0000          .0000       .10000E+07
    10 'Prefactor '    19.752       1.0000          .0000       .10000E+07
    11 'norm      '    .15321E-07   1.0000          .0000       .10000E+07
    12 'Prefactor '    .44354E-04   1.0000          .0000       .10000E+07
    13 'Prefactor '    .12185E-02   1.0000          .0000       .10000E+07
    14 'Prefactor '    5.8108       1.0000          .0000       .10000E+07
    15 'norm      '    4.8519       1.0000          .0000       .10000E+07
    16 'Prefactor '    10.963       1.0000          .0000       .10000E+07
    17 'norm      '    .82953       1.0000          .0000       .10000E+07
    18 'Prefactor '    .78729E-05   1.0000          .0000       .10000E+07
    19 'Prefactor '    .21156E-05   1.0000          .0000       .10000E+07
    20 'norm      '    105.17       1.0000          .0000       .10000E+07
    21 'Prefactor '    30.180       1.0000          .0000       .10000E+07
    22 'norm      '    30.589       1.0000          .0000       .10000E+07
    23 'Normalizat'    1.0326       1.0000         .10000E-01   10.000    
    24 'Prefactor '    .82174       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5030E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   5113.242     FROM MIGRAD    STATUS=CONVERGED    208 CALLS     2021 TOTAL
                     EDM=   .53E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.4%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     62.196        157.27       -.16974E-06   -.59809E-01
   2  Prefactor     10.292        19.893       -.54815E-07    .52185E-02
   3  Prefactor     .22204E-09    19.568       -.52557E-07** at limit **
   4  Prefactor     .33307E-09    23.775        .51173E-08** at limit **
   5  Prefactor     2.1046        2.3358       -.18344E-07   -.92342E-03
   6  Prefactor     3.5372        4.3380       -.26436E-07   -.97970E-03
   7  Prefactor      .0000        2.0532        .17444E-08** at limit **
   8  Prefactor     38.940        22.282        .37860E-07    .30091E-01
   9  norm          1.7340        .96088        .70415E-08    .10855E-02
  10  Prefactor     19.891        30.537       -.18849E-06   -.11510E-01
  11  norm           .0000        .47989        .40506E-08** at limit **
  12  Prefactor     .14756E-05    73.601        .29085E-06** at limit **
  13  Prefactor     .30816E-05    82.401        .71769E-06** at limit **
  14  Prefactor     5.8188        3.3302        .19659E-07    .13557E-02
  15  norm          4.9082        12.535       -.10150E-06   -.44239E-03
  16  Prefactor     10.949        12.785       -.10954E-06   -.10198E-02
  17  norm          .83044        .40055       -.68762E-08   -.49788E-02
  18  Prefactor      .0000        2.3625        .20859E-07** at limit **
  19  Prefactor     .16653E-09    7.3079        .14911E-06** at limit **
  20  norm          110.61        51.231       -.51099E-07    .26110    
  21  Prefactor     31.411        58.301       -.13194E-06   -.36814E-01
  22  norm          30.610        7.9501       -.40729E-08   -.53160E-03
  23  Normalizat    1.0328        .23210       -.18626E-05   -.34542E-04
  24  Prefactor     .81954        .21850        .26379E-05    .23542E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 62.1956
  Prefactor  = 10.2917
  Prefactor  = 2.22045e-10
  Prefactor  = 3.33067e-10
  Prefactor  = 2.10457
  Prefactor  = 3.5372
  Prefactor  = 0
  Prefactor  = 38.9397
  norm       = 1.73397
  Prefactor  = 19.8913
  norm       = 0
  Prefactor  = 1.4756e-06
  Prefactor  = 3.08165e-06
  Prefactor  = 5.81876
  norm       = 4.90815
  Prefactor  = 10.9492
  norm       = 0.83044
  Prefactor  = 0
  Prefactor  = 1.66533e-10
  norm       = 110.608
  Prefactor  = 31.4113
  norm       = 30.6104
  Normalizat = 1.03279
  Prefactor  = 0.819545
 **********
 **   18 **HESSE 
 **********

 FCN=   5113.242     FROM HESSE     STATUS=OK           445 CALLS     2466 TOTAL
                     EDM=   .14E-04    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     62.196        166.61        .14743E-03   -1.5550    
   2  Prefactor     10.292        19.881        .30997E-03   -1.5644    
   3  Prefactor     .22204E-09    19.590        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .33307E-09    23.778        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     2.1046        2.3531        .71024E-03   -1.5679    
   6  Prefactor     3.5372        4.3379        .53757E-03   -1.5670    
   7  Prefactor      .0000        2.0448        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     38.940        22.275        .16041E-03   -1.5583    
   9  norm          1.7340        .96277        .79715E-03   -1.5682    
  10  Prefactor     19.891        30.546        .22508E-03   -1.5619    
  11  norm           .0000        .47941        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .14756E-05    73.747        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .30816E-05    82.609        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     5.8188        3.3292        .41640E-03   -1.5660    
  15  norm          4.9082        12.526        .45645E-03   -1.5664    
  16  Prefactor     10.949        12.785        .30233E-03   -1.5642    
  17  norm          .83044        .40200        .50760E-03   -1.5690    
  18  Prefactor      .0000        2.3623        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     .16653E-09    7.3014        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  norm          110.61        141.37        .97515E-04   -1.5498    
  21  Prefactor     31.411        58.765        .18206E-03   -1.5596    
  22  norm          30.610        7.9644        .18084E-03   -1.5597    
  23  Normalizat    1.0328        .20424        .41909E-01   -.91940    
  24  Prefactor     .81954        .19256        .43999E-01   -.99012    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.41391e-05
Minuit parameter uncertainties:
  1  166.619
  2  19.8812
  3  0.000132608
  4  0.000172219
  5  2.35309
  6  4.33786
  7  3.75194e-07
  8  22.2752
  9  0.962767
  10  30.5465
  11  3.49136e-07
  12  0.0208636
  13  0.031911
  14  3.32921
  15  12.5262
  16  12.7854
  17  0.402004
  18  5.28689e-06
  19  6.47022e-05
  20  141.377
  21  58.7656
  22  7.96436
  23  0.204394
  24  0.192716
Done.

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

Extracting fit parameters...

4FGL J0402.0-2616
   Spectrum: LogParabola
255         norm:  4.908e+00  1.253e+01  0.000e+00  1.000e+06 ( 1.000e-13)
256        alpha:  1.995e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
257         beta:  1.705e-01  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
258           Eb:  1.630e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
500    Prefactor:  8.195e-01  1.927e-01  0.000e+00  1.000e+01 ( 1.000e+00)
501        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
502        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
496   Normalization:  1.033e+00  2.044e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.19
Ra Dec: 60.510 -26.273
Photon Flux Upper Limit: 5.56e-08 ph cm-2 s-1
Energy Flux Upper Limit: 4.24e-05 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/229489/likelihoodResults_685670401_685929601_4FGL_J0402.0-2616_daily_bin1722.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) = 5113.23646473
delta logL = 0.00569505077237

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5113.23465162
delta logL = 0.00750816128857

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    4.1121       1.0000          .0000       .10000E+07
     2 'alpha     '    2.2136       1.0000          .0000       5.0000    
     3 'Normalizat'    1.0307       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .82106       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5030E+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=   5113.235     FROM MIGRAD    STATUS=CONVERGED     79 CALLS      231 TOTAL
                     EDM=   .12E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          4.1068        15.632        .19875E-04   -.80653E-04
   2  alpha         2.2139        1.9389        .27191E-01    .10420E-03
   3  Normalizat    1.0307        .22171        .25500E-03   -.93739E-03
   4  Prefactor     .82109        .21503        .27170E-03   -.13746E-02
                               ERR DEF=  .500    
Final values: 
  norm       = 4.10677
  alpha      = 2.21394
  Normalizat = 1.03068
  Prefactor  = 0.821088
 **********
 **   18 **HESSE 
 **********

 FCN=   5113.235     FROM HESSE     STATUS=OK            25 CALLS      256 TOTAL
                     EDM=   .35E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          4.1068        13.537        .79501E-06   -1.5667    
   2  alpha         2.2139        1.7407        .54382E-02   -.11468    
   3  Normalizat    1.0307        .22132        .51001E-04   -.92010    
   4  Prefactor     .82109        .21455        .54341E-04   -.98956    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.53574e-09
Minuit parameter uncertainties:
  1  13.5372
  2  1.9289
  3  0.221522
  4  0.214773
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/229489': 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) = 5113.23465152
delta logL = 0.00750826298918

Extracting fit parameters...

4FGL J0402.0-2616
   Spectrum: LogParabola
255         norm:  4.107e+00  1.354e+01  0.000e+00  1.000e+06 ( 1.000e-13)
256        alpha:  2.214e+00  1.929e+00  0.000e+00  5.000e+00 ( 1.000e+00)
257         beta:  1.705e-01  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
258           Eb:  1.630e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
500    Prefactor:  8.211e-01  2.148e-01  0.000e+00  1.000e+01 ( 1.000e+00)
501        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
502        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
496   Normalization:  1.031e+00  2.215e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.19
Ra Dec: 60.510 -26.273

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/229489/cmap_HighResolution_685670401_685929601_4FGL_J0402.0-2616_daily_bin1722.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='4.24e-05', job_status='DONE', photon_flux_upper_limit='5.56e-08', time_completed='2022-09-27 00:17:26.195608', job_id='229489', GAL2='0.82', fit_tolerance='1e-08', EG2='1.03', EG='1.03', time_epoch_completed='1664263046.2', return_code2='0', ts='0.19', comment='SUCCESS', return_code='0', GAL='0.82', dlogl='7.51e-03', ts2='0.21', photon_index_error='0.00', photon_index='2.00' WHERE bin_id='1722' AND source_name='4FGL J0402.0-2616' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Tue Sep 27 00:17:26 PDT 2022



------------------------------------------------------------
Sender: LSF System <lsf@bullet0248>
Subject: Job 229574: <4FGL_J0402.0-2616_daily_bin1722> in cluster <slac> Done

Job <4FGL_J0402.0-2616_daily_bin1722> was submitted from host <rhel6-64k> by user <kocevski> in cluster <slac> at Tue Sep 27 00:05:21 2022
Job was executed on host(s) <bullet0248>, in queue <medium>, as user <kocevski> in cluster <slac> at Tue Sep 27 00:06:12 2022
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Tue Sep 27 00:06:12 2022
Terminated at Tue Sep 27 00:17:06 2022
Results reported at Tue Sep 27 00:17:06 2022

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J0402.0-2616_daily_bin1722 60.5103 -26.273 685670401 685929601 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J0402.0-2616 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   606.63 sec.
    Max Memory :                                 1259 MB
    Average Memory :                             371.57 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   2929 MB
    Max Processes :                              6
    Max Threads :                                21
    Run time :                                   654 sec.
    Turnaround time :                            705 sec.

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


------------------------------------------------------------
Sender: LSF System <lsf@bullet0050>
Subject: Job 229489: <4FGL_J0402.0-2616_daily_bin1722> in cluster <slac> Done

Job <4FGL_J0402.0-2616_daily_bin1722> was submitted from host <rhel6-64f> by user <kocevski> in cluster <slac> at Tue Sep 27 00:05:15 2022
Job was executed on host(s) <bullet0050>, in queue <medium>, as user <kocevski> in cluster <slac> at Tue Sep 27 00:05:43 2022
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Tue Sep 27 00:05:43 2022
Terminated at Tue Sep 27 00:17:27 2022
Results reported at Tue Sep 27 00:17:27 2022

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J0402.0-2616_daily_bin1722 60.5103 -26.273 685670401 685929601 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J0402.0-2616 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   604.46 sec.
    Max Memory :                                 1093 MB
    Average Memory :                             325.25 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   703 sec.
    Turnaround time :                            732 sec.

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

