/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 4 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 = 7354
number of fields = 30
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J0401.9-2034_daily_bin1498
RA = 60.4867, Dec = -20.5804
tmin = 627609601, tmax = 627868801
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='165936', job_status='RUN', time_executed='2021-08-19 23:40:56.666727', time_epoch_executed='1629441656.67' WHERE source_name='4FGL J0401.9-2034' and cadence='daily' and bin_id='1498'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/165936

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/165936/ft1_4FGL_J0401.9-2034_daily_bin1498.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/165936/ft2_4FGL_J0401.9-2034_daily_bin1498.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/165936/ft1_4FGL_J0401.9-2034_daily_bin1498.fits outfile=/scratch/kocevski/165936/ft1_filteredMKT_4FGL_J0401.9-2034_daily_bin1498.fits ra=60.4867 dec=-20.5804 rad=12.0 tmin=627609601.0 tmax=627868801.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.40
user 2.30
sys 1.09

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/165936/ft2_4FGL_J0401.9-2034_daily_bin1498.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/165936/ft2_4FGL_J0401.9-2034_daily_bin1498.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/165936/ft1_filteredMKT_4FGL_J0401.9-2034_daily_bin1498.fits evtable="EVENTS" outfile="/scratch/kocevski/165936/ft1_filtered_4FGL_J0401.9-2034_daily_bin1498.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 1.39
user 0.34
sys 1.04

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/165936/ft1_filtered_4FGL_J0401.9-2034_daily_bin1498.fits" evtable="EVENTS" scfile=/scratch/kocevski/165936/ft2_4FGL_J0401.9-2034_daily_bin1498.fits sctable="SC_DATA" outfile=/scratch/kocevski/165936/ltcube_627609601_627868801_4FGL_J0401.9-2034_daily_bin1498.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/165936/ft2_4FGL_J0401.9-2034_daily_bin1498.fits
.....................!
real 13.20
user 11.87
sys 1.30

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/165936/ft1_filtered_4FGL_J0401.9-2034_daily_bin1498.fits evtable="EVENTS" scfile=/scratch/kocevski/165936/ft2_4FGL_J0401.9-2034_daily_bin1498.fits sctable="SC_DATA" expcube=/scratch/kocevski/165936/ltcube_627609601_627868801_4FGL_J0401.9-2034_daily_bin1498.fits outfile=/scratch/kocevski/165936/expmap_627609601_627868801_4FGL_J0401.9-2034_daily_bin1498.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/165936/ltcube_627609601_627868801_4FGL_J0401.9-2034_daily_bin1498.fits
.....................!
real 192.69
user 186.04
sys 6.21

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_archive_v18/Templates/FornaxA.fits is the correct path to the extended template.
Added 146 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 J0401.9-2034 @ 60.4867 -20.5804

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/165936/ft1_filtered_4FGL_J0401.9-2034_daily_bin1498.fits scfile=/scratch/kocevski/165936/ft2_4FGL_J0401.9-2034_daily_bin1498.fits outfile=/scratch/kocevski/165936/cmap_627609601_627868801_4FGL_J0401.9-2034_daily_bin1498.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.4867 yref=-20.5804 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 1.42
user 0.37
sys 1.02

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/165936/ft1_filtered_4FGL_J0401.9-2034_daily_bin1498.fits scfile=/scratch/kocevski/165936/ft2_4FGL_J0401.9-2034_daily_bin1498.fits outfile=/scratch/kocevski/165936/cmap_HighResolution_627609601_627868801_4FGL_J0401.9-2034_daily_bin1498.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.4867 yref=-20.5804 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 1.41
user 0.39
sys 1.02

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/165936/ft1_filtered_4FGL_J0401.9-2034_daily_bin1498.fits evtable="EVENTS" scfile=/scratch/kocevski/165936/ft2_4FGL_J0401.9-2034_daily_bin1498.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/165936/Model_4FGL_J0401.9-2034_daily_bin1498.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/165936/ft1_filtered_4FGL_J0401.9-2034_daily_bin1498.fits.....................!
real 125.10
user 122.52
sys 2.38

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/165936/ft1_filtered_4FGL_J0401.9-2034_daily_bin1498.fits', '/scratch/kocevski/165936/ft2_4FGL_J0401.9-2034_daily_bin1498.fits', expMap='/scratch/kocevski/165936/expmap_627609601_627868801_4FGL_J0401.9-2034_daily_bin1498.fits', expCube='/scratch/kocevski/165936/ltcube_627609601_627868801_4FGL_J0401.9-2034_daily_bin1498.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/165936/Model_4FGL_J0401.9-2034_daily_bin1498.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J0401.9-2034'

4FGL J0401.9-2034
   Spectrum: PowerLaw
250    Prefactor:  1.016e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-12)
251        Index:  2.309e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
252        Scale:  9.282e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/165936/ft1_filtered_4FGL_J0401.9-2034_daily_bin1498.fits
Spacecraft file(s): /scratch/kocevski/165936/ft2_4FGL_J0401.9-2034_daily_bin1498.fits
Exposure map: /scratch/kocevski/165936/expmap_627609601_627868801_4FGL_J0401.9-2034_daily_bin1498.fits
Exposure cube: /scratch/kocevski/165936/ltcube_627609601_627868801_4FGL_J0401.9-2034_daily_bin1498.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/165936/Model_4FGL_J0401.9-2034_daily_bin1498.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) = 5440.81853672

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .11412E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    8.5383       1.0000         .10000E-03   10000.    
     4 'Prefactor '    52.374       1.0000         .10000E-03   10000.    
     5 'Prefactor '    78.046       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .13728E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    3.3493       1.0000         .10000E-03   10000.    
     8 'Prefactor '    .98283       1.0000         .10000E-03   10000.    
     9 'Prefactor '    5.9170       1.0000         .10000E-03   10000.    
    10 'norm      '    22.598       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .19061       1.0000         .10000E-03   10000.    
    12 'norm      '    .10007E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    .11940E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10022E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10051E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    10.070       1.0000         .10000E-03   10000.    
    19 'Prefactor '    .11642E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10014E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    7.4090       1.0000         .10000E-03   10000.    
    23 'Normalizat'    .62841       1.0000         .10000E-01   10.000    
    24 'Prefactor '    .97510       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .4710E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   5440.813     FROM MIGRAD    STATUS=CONVERGED    613 CALLS     2802 TOTAL
                     EDM=   .12E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .5%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    198.01        .13919E-03** at limit **
   2  Prefactor     .10000E-03    1.9082        .19463E-06** at limit **
   3  Prefactor     8.5649        22.769       -.43962E-04    .88678E-04
   4  Prefactor     52.406        32.375       -.72089E-05    .61095E-04
   5  Prefactor     78.071        53.485       -.19567E-04    .24691E-04
   6  Prefactor     .10003E-03    167.22       -.12206E-03** at limit **
   7  Prefactor     3.3493        3.5683        .12034E-05    .47930E-03
   8  Prefactor     .99669        9.3101       -.13020E-05   -.26069E-03
   9  Prefactor     5.9029        7.3158       -.93605E-07    .24042E-03
  10  norm          22.596        2.5839        .19402E-06    .12576E-02
  11  Prefactor     .30980E-01    28.960        .33431E-06    .31378E-03
  12  norm          .10000E-03    .89061       -.82175E-07** at limit **
  13  Prefactor     .10000E-03    19.425        .32062E-06** at limit **
  14  Prefactor     .10000E-03    1.6599       -.39669E-06** at limit **
  15  norm          .10000E-03    3.4249       -.24085E-06** at limit **
  16  Prefactor     .10000E-03    7.2359       -.16163E-06** at limit **
  17  Prefactor     .10000E-03    7.6362        .29810E-06** at limit **
  18  Prefactor     10.067        6.1874       -.32965E-07    .88519E-04
  19  Prefactor     .10000E-03    49.312       -.81357E-06** at limit **
  20  Prefactor     .10000E-03    10.354        .67109E-07** at limit **
  21  Prefactor     .10000E-03    2.5544       -.15070E-06** at limit **
  22  Prefactor     7.3914        36.246        .10552E-04   -.83371E-05
  23  Normalizat    .62833        .21428        .70793E-05    .26438E-03
  24  Prefactor     .97516        .16538        .74989E-06    .55719E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100001
  Prefactor  = 0.0001
  Prefactor  = 8.56491
  Prefactor  = 52.4058
  Prefactor  = 78.071
  Prefactor  = 0.00010003
  Prefactor  = 3.3493
  Prefactor  = 0.996692
  Prefactor  = 5.90286
  norm       = 22.5963
  Prefactor  = 0.0309804
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 10.0674
  Prefactor  = 0.000100005
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 7.39139
  Normalizat = 0.628327
  Prefactor  = 0.975165
 **********
 **   18 **HESSE 
 **********

 FCN=   5440.813     FROM HESSE     STATUS=OK           405 CALLS     3207 TOTAL
                     EDM=   .26E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    198.85        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    1.9101        .99496E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     8.5649        22.775        .13719E-03   -1.5123    
   4  Prefactor     52.406        32.381        .55420E-04   -1.4259    
   5  Prefactor     78.071        53.474        .22728E-03   -1.3939    
   6  Prefactor     .10003E-03    166.78        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     3.3493        3.4809        .12824E-03   -1.5342    
   8  Prefactor     .99669        13.121        .30220E-02   -1.5508    
   9  Prefactor     5.9029        6.6108        .15914E-03   -1.5222    
  10  norm          22.596        2.5077        .34711E-04   -1.4757    
  11  Prefactor     .30980E-01    33.527        .11626       -1.5673    
  12  norm          .10000E-03    1.3292        .13057E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .10000E-03    19.467        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10000E-03    3.0865        .18278E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          .10000E-03    3.4257        .13332E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     .10000E-03    7.2421        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     .10000E-03    7.7012        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     10.067        6.2014        .12627E-03   -1.5073    
  19  Prefactor     .10000E-03    50.615        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10000E-03    10.362        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .10000E-03    2.5635        .11513E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     7.3914        36.195        .14735E-03   -1.5164    
  23  Normalizat    .62833        .24068        .34213E-03   -1.0679    
  24  Prefactor     .97516        .18818        .23535E-03   -.93562    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.63434e-09
Minuit parameter uncertainties:
  1  0.00104264
  2  4.74401e-05
  3  22.7981
  4  32.3917
  5  53.507
  6  0.00449066
  7  3.48113
  8  7.23415
  9  6.61162
  10  2.50773
  11  2.03617
  12  7.7516e-06
  13  2.38351e-05
  14  4.64279e-05
  15  4.20991e-06
  16  1.37527e-05
  17  4.07919e-05
  18  6.20176
  19  0.000977332
  20  1.92234e-05
  21  8.82651e-06
  22  32.7443
  23  0.241086
  24  0.188308
Done.

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

Extracting fit parameters...

4FGL J0401.9-2034
   Spectrum: PowerLaw
250    Prefactor:  1.000e-04  4.643e-05  1.000e-04  1.000e+04 ( 1.000e-12)
251        Index:  2.309e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
252        Scale:  9.282e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
468    Prefactor:  9.752e-01  1.883e-01  0.000e+00  1.000e+01 ( 1.000e+00)
469        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
470        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
464   Normalization:  6.283e-01  2.411e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 60.487 -20.580
Photon Flux Upper Limit: 8.06e-08 ph cm-2 s-1
Energy Flux Upper Limit: 6.19e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/165936/likelihoodResults_627609601_627868801_4FGL_J0401.9-2034_daily_bin1498.txt

Performing a free index iterative likelihood fit...

Freezing all point sources, except source of interest...

Done.

Freeing candidate source...
Done.

Fit tolerance = 1

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 5440.81487613
delta logL = -0.0015441420619

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 5440.81333314
delta logL = -1.15025341074e-06

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10372E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.3239       1.0000          .0000       10.000    
     3 'Normalizat'    .62813       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .97538       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .4710E+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=   5440.813     FROM MIGRAD    STATUS=FAILED        94 CALLS      263 TOTAL
                     EDM=   .73E-06    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10174E-03    44.376        .18213E-02** at limit **
   2  Index         2.4226        5.3223        .50000       -.28322E-04
   3  Normalizat    .62833        .19059E-01    .34213E-03    .30329E-03
   4  Prefactor     .97516        .16194E-01    .23535E-03    .40862E-03
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   5440.813     FROM SIMPLEX   STATUS=UNCHANGED    133 CALLS      396 TOTAL
                     EDM=   .13E-04    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10174E-03    44.376        .31876E-03** at limit **
   2  Index         2.4226        5.3223        .24892E-03   -.28322E-04
   3  Normalizat    .62833        .19059E-01    .20619E-05    .30329E-03
   4  Prefactor     .97516        .16194E-01    .10260E-05    .40862E-03
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   5440.813     FROM MIGRAD    STATUS=CONVERGED     56 CALLS      452 TOTAL
                     EDM=   .97E-10    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    9.4823        .36426E-02** at limit **
   2  Index         2.6524        5.5853        .50000        .30032E-06
   3  Normalizat    .62833        .86075E-02    .13685E-04   -.12461E-04
   4  Prefactor     .97516        .73133E-02    .47070E-04   -.47098E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 2.65238
  Normalizat = 0.628327
  Prefactor  = 0.975162
 **********
 **   18 **HESSE 
 **********

 FCN=   5440.813     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      481 TOTAL
                     EDM=   .35E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    344.07        .14570E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.6524        8.3719        .50000       -.48875    
   3  Normalizat    .62833        .58885E-01    .27370E-05   -1.0679    
   4  Prefactor     .97516        .49801E-01    .94140E-05   -.93562    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 3.47353e-09
Minuit parameter uncertainties:
  1  9.92781e-05
  2  654.421
  3  0.0588909
  4  0.0498035
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/165936': 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) = 5440.81333031
delta logL = 1.67758753378e-06

Extracting fit parameters...

4FGL J0401.9-2034
   Spectrum: PowerLaw
250    Prefactor:  1.000e-04  9.928e-05  1.000e-04  1.000e+04 ( 1.000e-12)
251        Index:  2.652e+00  6.544e+02  0.000e+00  1.000e+01 (-1.000e+00)
252        Scale:  9.282e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
468    Prefactor:  9.752e-01  4.980e-02  0.000e+00  1.000e+01 ( 1.000e+00)
469        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
470        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
464   Normalization:  6.283e-01  5.889e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 60.487 -20.580

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/165936/cmap_HighResolution_627609601_627868801_4FGL_J0401.9-2034_daily_bin1498.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='6.19e-03', job_status='DONE', photon_flux_upper_limit='8.06e-08', time_completed='2021-08-19 23:52:21.261988', job_id='165936', GAL2='0.98', fit_tolerance='1e-08', EG2='0.63', EG='0.63', time_epoch_completed='1629442341.26', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.98', dlogl='1.68e-06', ts2='-0.00', photon_index_error='0.00', photon_index='2.31' WHERE bin_id='1498' AND source_name='4FGL J0401.9-2034' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Aug 19 23:52:21 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0077>
Subject: Job 165936: <4FGL_J0401.9-2034_daily_bin1498> in cluster <slac> Done

Job <4FGL_J0401.9-2034_daily_bin1498> was submitted from host <rhel6-64f> by user <kocevski> in cluster <slac> at Thu Aug 19 23:40:29 2021
Job was executed on host(s) <bullet0077>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Aug 19 23:40:30 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Thu Aug 19 23:40:30 2021
Terminated at Thu Aug 19 23:52:22 2021
Results reported at Thu Aug 19 23:52:22 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J0401.9-2034_daily_bin1498 60.4867 -20.5804 627609601 627868801 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J0401.9-2034 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   684.00 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             335.30 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   711 sec.
    Turnaround time :                            713 sec.

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

