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


Performing analysis on: 4FGL_J2043.7+2741_weekly_bin730
RA = 310.933, Dec = 27.6936
tmin = 680486401, tmax = 681091201
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='695604', job_status='RUN', time_executed='2022-08-02 02:52:30.220527', time_epoch_executed='1659433950.22' WHERE source_name='4FGL J2043.7+2741' and cadence='weekly' and bin_id='730'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/695604

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

Retrieving the FT1 file...

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

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

Retrieving 107 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/695604/ft1_4FGL_J2043.7+2741_weekly_bin730.fits


Retrieving the FT1 file...

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

Retrieving 107 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/695604/ft2_4FGL_J2043.7+2741_weekly_bin730.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/695604/ft1_4FGL_J2043.7+2741_weekly_bin730.fits outfile=/scratch/kocevski/695604/ft1_filteredMKT_4FGL_J2043.7+2741_weekly_bin730.fits ra=310.933 dec=27.6936 rad=12.0 tmin=680486401.0 tmax=681091201.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 6.30
user 5.90
sys 0.33

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/695604/ft2_4FGL_J2043.7+2741_weekly_bin730.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/695604/ft2_4FGL_J2043.7+2741_weekly_bin730.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/695604/ft1_filteredMKT_4FGL_J2043.7+2741_weekly_bin730.fits evtable="EVENTS" outfile="/scratch/kocevski/695604/ft1_filtered_4FGL_J2043.7+2741_weekly_bin730.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.56
user 0.38
sys 0.17

Number of photons that the gtmktime cut: 9697

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/695604/ft1_filtered_4FGL_J2043.7+2741_weekly_bin730.fits" evtable="EVENTS" scfile=/scratch/kocevski/695604/ft2_4FGL_J2043.7+2741_weekly_bin730.fits sctable="SC_DATA" outfile=/scratch/kocevski/695604/ltcube_680486401_681091201_4FGL_J2043.7+2741_weekly_bin730.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/695604/ft2_4FGL_J2043.7+2741_weekly_bin730.fits
.....................!
real 32.04
user 31.45
sys 0.41

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/695604/ft1_filtered_4FGL_J2043.7+2741_weekly_bin730.fits evtable="EVENTS" scfile=/scratch/kocevski/695604/ft2_4FGL_J2043.7+2741_weekly_bin730.fits sctable="SC_DATA" expcube=/scratch/kocevski/695604/ltcube_680486401_681091201_4FGL_J2043.7+2741_weekly_bin730.fits outfile=/scratch/kocevski/695604/expmap_680486401_681091201_4FGL_J2043.7+2741_weekly_bin730.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/695604/ltcube_680486401_681091201_4FGL_J2043.7+2741_weekly_bin730.fits
.....................!
real 193.92
user 187.23
sys 5.95

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 Cygnus Loop in ROI, make sure /nfs/farm/g/glast/g/LCRepository/Likelihood/ExtendedSources/Extended_archive_v18/Templates/CygnusLoop.fits is the correct path to the extended template.
Extended source gamma Cygni in ROI with RadialDisk spatial model.
Extended source Cygnus Cocoon in ROI with RadialGaussian spatial model.
Added 223 point sources and 3 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 J2043.7+2741 @ 310.933 27.6936

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/695604/ft1_filtered_4FGL_J2043.7+2741_weekly_bin730.fits scfile=/scratch/kocevski/695604/ft2_4FGL_J2043.7+2741_weekly_bin730.fits outfile=/scratch/kocevski/695604/cmap_680486401_681091201_4FGL_J2043.7+2741_weekly_bin730.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=310.933 yref=27.6936 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.60
user 0.43
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/695604/ft1_filtered_4FGL_J2043.7+2741_weekly_bin730.fits scfile=/scratch/kocevski/695604/ft2_4FGL_J2043.7+2741_weekly_bin730.fits outfile=/scratch/kocevski/695604/cmap_HighResolution_680486401_681091201_4FGL_J2043.7+2741_weekly_bin730.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=310.933 yref=27.6936 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.61
user 0.42
sys 0.18

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/695604/ft1_filtered_4FGL_J2043.7+2741_weekly_bin730.fits evtable="EVENTS" scfile=/scratch/kocevski/695604/ft2_4FGL_J2043.7+2741_weekly_bin730.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/695604/Model_4FGL_J2043.7+2741_weekly_bin730.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 Cygnus Cocoon
adding source Cygnus Loop
adding source EG_v02
adding source GAL_V02
adding source gamma Cygni
Working on...
/scratch/kocevski/695604/ft1_filtered_4FGL_J2043.7+2741_weekly_bin730.fits.....................!
real 2103.06
user 2094.32
sys 1.34

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/695604/ft1_filtered_4FGL_J2043.7+2741_weekly_bin730.fits', '/scratch/kocevski/695604/ft2_4FGL_J2043.7+2741_weekly_bin730.fits', expMap='/scratch/kocevski/695604/expmap_680486401_681091201_4FGL_J2043.7+2741_weekly_bin730.fits', expCube='/scratch/kocevski/695604/ltcube_680486401_681091201_4FGL_J2043.7+2741_weekly_bin730.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/695604/Model_4FGL_J2043.7+2741_weekly_bin730.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J2043.7+2741'

4FGL J2043.7+2741
   Spectrum: PLSuperExpCutoff2
489    Prefactor:  1.624e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-11)
490       Index1:  7.518e-01  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
491        Scale:  1.085e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed
492    Expfactor:  2.108e+01  0.000e+00 -1.000e+00  1.000e+02 ( 1.000e-03) fixed
493       Index2:  6.667e-01  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/695604/ft1_filtered_4FGL_J2043.7+2741_weekly_bin730.fits
Spacecraft file(s): /scratch/kocevski/695604/ft2_4FGL_J2043.7+2741_weekly_bin730.fits
Exposure map: /scratch/kocevski/695604/expmap_680486401_681091201_4FGL_J2043.7+2741_weekly_bin730.fits
Exposure cube: /scratch/kocevski/695604/ltcube_680486401_681091201_4FGL_J2043.7+2741_weekly_bin730.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/695604/Model_4FGL_J2043.7+2741_weekly_bin730.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) = 91434.8687893

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    5.7734       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     5 'norm      '    .73320       1.0000         .10000E-03   10000.    
     6 'norm      '    .72655E-03   1.0000         .10000E-03   10000.    
     7 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .11027       1.0000         .10000E-03   10000.    
     9 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    10 'norm      '    33.517       1.0000         .10000E-03   10000.    
    11 'Prefactor '    6.8648       1.0000         .10000E-03   10000.    
    12 'Prefactor '    67.267       1.0000         .10000E-03   10000.    
    13 'Prefactor '    33.660       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10007E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10012E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    4.8708       1.0000         .10000E-03   10000.    
    17 'norm      '    1.1267       1.0000         .10000E-03   10000.    
    18 'Normalizat'    .96575       1.0000         .10000E-01   10.000    
    19 'Prefactor '    .99376       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .8130E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
 MACHINE ACCURACY LIMITS FURTHER IMPROVEMENT.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   91434.87     FROM MIGRAD    STATUS=CONVERGED    404 CALLS     2011 TOTAL
                     EDM=   .13E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .10000E-03    3.5025         .0000    ** at limit **
   2  Prefactor     .10000E-03    6.1535         .0000    ** at limit **
   3  norm          5.7735        2.7912         .0000        .33362E-01
   4  Prefactor     .10000E-03    4.8550         .0000    ** at limit **
   5  norm          .73473        .86626         .0000        .63522E-02
   6  norm          .10000E-03    .83125         .0000    ** at limit **
   7  norm          .10000E-03    1.2310         .0000    ** at limit **
   8  Prefactor     .10985        .44821         .0000        .49300E-02
   9  norm          .10000E-03    41.798         .0000    ** at limit **
  10  norm          33.517        18.568         .0000       -.11458E-04
  11  Prefactor     6.8603        12.873         .0000       -.27136E-03
  12  Prefactor     67.267        49.884         .0000       -.57733E-03
  13  Prefactor     33.661        18.485         .0000       -.15054E-03
  14  Prefactor     .10000E-03    14.170         .0000    ** at limit **
  15  Prefactor     .10000E-03    1.5799         .0000    ** at limit **
  16  norm          4.8698        2.8620         .0000        .23334E-01
  17  norm          1.1266        .76677         .0000        .43356E-02
  18  Normalizat    .96571        .17182         .0000        .42243E-03
  19  Prefactor     .99376        .18218E-01     .0000       -.25004E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 5.77345
  Prefactor  = 0.0001
  norm       = 0.734729
  norm       = 0.0001
  norm       = 0.0001
  Prefactor  = 0.109852
  norm       = 0.0001
  norm       = 33.5172
  Prefactor  = 6.86026
  Prefactor  = 67.2674
  Prefactor  = 33.6611
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 4.86982
  norm       = 1.12657
  Normalizat = 0.965712
  Prefactor  = 0.993757
 **********
 **   18 **HESSE 
 **********

 FCN=   91434.87     FROM HESSE     STATUS=OK           284 CALLS     2295 TOTAL
                     EDM=   .24E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .10000E-03    3.5170        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    6.1729        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          5.7735        2.7923        .83578E-03   -1.5227    
   4  Prefactor     .10000E-03    4.8680        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          .73473        1.6141        .28280E-02   -1.5537    
   6  norm          .10000E-03    .93599        .94099E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  norm          .10000E-03    1.2328        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10985        .52860        .77909E-01   -1.5642    
   9  norm          .10000E-03    41.905        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          33.517        18.568        .69216E-04   -1.4549    
  11  Prefactor     6.8603        12.845        .15313E-03   -1.5184    
  12  Prefactor     67.267        49.847        .48937E-04   -1.4066    
  13  Prefactor     33.661        18.390        .69069E-04   -1.4547    
  14  Prefactor     .10000E-03    14.250        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .10000E-03    1.6356        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          4.8698        2.8410        .91131E-03   -1.5267    
  17  norm          1.1266        .75730        .21149E-03   -1.5496    
  18  Normalizat    .96571        .16461        .11291E-02   -.94188    
  19  Prefactor     .99376        .17886E-01    .12553E-03   -.92938    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.38164e-07
Minuit parameter uncertainties:
  1  1.69798e-06
  2  2.96691e-06
  3  2.79236
  4  3.73396e-06
  5  1.61423
  6  1.20768e-05
  7  2.35978e-06
  8  0.481733
  9  1.56404e-05
  10  18.5707
  11  12.8503
  12  49.878
  13  18.3931
  14  2.03023e-05
  15  2.32246e-07
  16  2.84112
  17  0.757302
  18  0.164699
  19  0.0178858
Done.

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

Extracting fit parameters...

4FGL J2043.7+2741
   Spectrum: PLSuperExpCutoff2
489    Prefactor:  1.099e-01  4.817e-01  1.000e-04  1.000e+04 ( 1.000e-11)
490       Index1:  7.518e-01  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
491        Scale:  1.085e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed
492    Expfactor:  2.108e+01  0.000e+00 -1.000e+00  1.000e+02 ( 1.000e-03) fixed
493       Index2:  6.667e-01  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
806    Prefactor:  9.938e-01  1.789e-02  0.000e+00  1.000e+01 ( 1.000e+00)
807        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
808        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
805   Normalization:  9.657e-01  1.647e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.01
Ra Dec: 310.933 27.694
Photon Flux Upper Limit: 3.26e-08 ph cm-2 s-1
Energy Flux Upper Limit: 1.52e-05 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/695604/likelihoodResults_680486401_681091201_4FGL_J2043.7+2741_weekly_bin730.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) = 91434.859306
delta logL = 0.00861558323959

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 91434.8523093
delta logL = 0.0156122538028

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .27532       1.0000         .10000E-03   10000.    
     2 'Index1    '    .40737E-03   1.0000          .0000       10.000    
     3 'Normalizat'    .96588       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .99375       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .8130E+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.
 MIGRAD TERMINATED WITHOUT CONVERGENCE.

 FCN=   91434.85     FROM MIGRAD    STATUS=FAILED       113 CALLS      294 TOTAL
                     EDM=   .11E-05    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .27987        2.5373        .41390E-02    .32521E-01
   2  Index1        .10790E-10    9.9542        .50000    ** at limit **
   3  Normalizat    .96586        .14735        .11290E-02   -.19334E-04
   4  Prefactor     .99371        .16920E-01    .12554E-03   -.42744E-03
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   91434.07     FROM SIMPLEX   STATUS=PROGRESS     343 CALLS      637 TOTAL
                     EDM=   .13E-04    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .60880E-03    2.5373        .80602E-05   -1.5703    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index1        5.7014        9.9542        .26713E-02   -7143.8    
   3  Normalizat    .96249        .14735        .14208E-08   -.94298    
   4  Prefactor     .99353        .16920E-01    .19453E-10   -.92945    
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
 MIGRAD TERMINATED WITHOUT CONVERGENCE.

 FCN=   91434.00     FROM MIGRAD    STATUS=FAILED        95 CALLS      732 TOTAL
                     EDM=   .12E-05    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .98170E-03    .31477E-01    .63377E-04** at limit **
   2  Index1        5.5324        4.0666        .10911E-01    .46109E-02
   3  Normalizat    .90600        .10859        .18064E-04   -.10070E-03
   4  Prefactor     .99616        .12168E-01    .10043E-05   -.37137E-02
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000981704
  Index1     = 5.53245
  Normalizat = 0.905997
  Prefactor  = 0.996162
 **********
 **   18 **HESSE 
 **********

 FCN=   91434.00     FROM HESSE     STATUS=NOT POSDEF    27 CALLS      759 TOTAL
                     EDM=   .86E-05    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .98170E-03    .35190E-01    .12675E-04   -1.5702    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index1        5.5324        7.2358        .21823E-02   -7143.9    
   3  Normalizat    .90600        .14168        .36128E-05   -.96250    
   4  Prefactor     .99616        .15542E-01    .22139E-06   -.92858    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 8.62719e-06
Minuit parameter uncertainties:
  1  0.0111404
  2  5.04099
  3  0.141736
  4  0.0155418
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/695604': 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): 1
logL (Free Index) = 91433.9960473
delta logL = 0.871874297023

Extracting fit parameters...

4FGL J2043.7+2741
   Spectrum: PLSuperExpCutoff2
489    Prefactor:  9.817e-04  1.114e-02  1.000e-04  1.000e+04 ( 1.000e-11)
490       Index1:  5.532e+00  5.041e+00  0.000e+00  1.000e+01 (-1.000e+00)
491        Scale:  1.085e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed
492    Expfactor:  2.108e+01  0.000e+00 -1.000e+00  1.000e+02 ( 1.000e-03) fixed
493       Index2:  6.667e-01  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
806    Prefactor:  9.962e-01  1.554e-02  0.000e+00  1.000e+01 ( 1.000e+00)
807        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
808        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
805   Normalization:  9.060e-01  1.417e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.91
Ra Dec: 310.933 27.694
Photon Index (Free Index): 5.53 +/- 5.04
Photon Flux (Free Index): 6.90e-08 +/- 5.77e-08
Energy Flux (Free Index): 8.62e-06 +/- 8.29e-06

Creating a high resolution counts map...
INFO: Auto-setting vmin to -2.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  2.220e+00 [aplpy.core]
Saving /scratch/kocevski/695604/cmap_HighResolution_680486401_681091201_4FGL_J2043.7+2741_weekly_bin730.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.52e-05', comment='SUCCESS', energy_flux2='8.62e-06', dlogl='8.72e-01', photon_flux2='6.90e-08', job_status='DONE', time_completed='2022-08-02 05:17:50.059840', photon_index_error2='5.04', photon_index2='5.53', ts='0.01', fit_tolerance='1e-08', GAL='0.99', photon_index_error='0.00', photon_flux_upper_limit='3.26e-08', energy_flux_error2='8.29e-06', EG='0.97', time_epoch_completed='1659442670.06', return_code='0', job_id='695604', GAL2='1.00', EG2='0.91', return_code2='1', photon_flux_error2='5.77e-08', ts2='1.91', photon_index='0.75' WHERE bin_id='730' AND source_name='4FGL J2043.7+2741' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Aug  2 05:17:50 PDT 2022


------------------------------------------------------------
Sender: LSF System <lsf@bullet0094>
Subject: Job 695604: <4FGL_J2043.7+2741_weekly_bin730> in cluster <slac> Done

Job <4FGL_J2043.7+2741_weekly_bin730> was submitted from host <rhel6-64k> by user <kocevski> in cluster <slac> at Tue Aug  2 02:25:27 2022
Job was executed on host(s) <bullet0094>, in queue <medium>, as user <kocevski> in cluster <slac> at Tue Aug  2 02:51:41 2022
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Tue Aug  2 02:51:41 2022
Terminated at Tue Aug  2 05:17:51 2022
Results reported at Tue Aug  2 05:17:51 2022

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2043.7+2741_weekly_bin730 310.933 27.6936 680486401 681091201 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J2043.7+2741 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   8694.00 sec.
    Max Memory :                                 1097 MB
    Average Memory :                             511.75 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   8769 sec.
    Turnaround time :                            10344 sec.

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

