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


Performing analysis on: 4FGL_J2142.8+1958_daily_bin1605
RA = 325.701, Dec = 19.982
tmin = 655344001, tmax = 655603201
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='474920', job_status='RUN', time_executed='2021-12-08 07:56:30.140340', time_epoch_executed='1638978990.14' WHERE source_name='4FGL J2142.8+1958' and cadence='daily' and bin_id='1605'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/474920

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/474920/ft1_4FGL_J2142.8+1958_daily_bin1605.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/474920/ft2_4FGL_J2142.8+1958_daily_bin1605.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/474920/ft1_4FGL_J2142.8+1958_daily_bin1605.fits outfile=/scratch/kocevski/474920/ft1_filteredMKT_4FGL_J2142.8+1958_daily_bin1605.fits ra=325.701 dec=19.982 rad=12.0 tmin=655344001.0 tmax=655603201.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.77
user 2.54
sys 0.22

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/474920/ft2_4FGL_J2142.8+1958_daily_bin1605.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/474920/ft2_4FGL_J2142.8+1958_daily_bin1605.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/474920/ft1_filteredMKT_4FGL_J2142.8+1958_daily_bin1605.fits evtable="EVENTS" outfile="/scratch/kocevski/474920/ft1_filtered_4FGL_J2142.8+1958_daily_bin1605.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.33
sys 0.17

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/474920/ft1_filtered_4FGL_J2142.8+1958_daily_bin1605.fits" evtable="EVENTS" scfile=/scratch/kocevski/474920/ft2_4FGL_J2142.8+1958_daily_bin1605.fits sctable="SC_DATA" outfile=/scratch/kocevski/474920/ltcube_655344001_655603201_4FGL_J2142.8+1958_daily_bin1605.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/474920/ft2_4FGL_J2142.8+1958_daily_bin1605.fits
.....................!
real 14.62
user 14.04
sys 0.44

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/474920/ft1_filtered_4FGL_J2142.8+1958_daily_bin1605.fits evtable="EVENTS" scfile=/scratch/kocevski/474920/ft2_4FGL_J2142.8+1958_daily_bin1605.fits sctable="SC_DATA" expcube=/scratch/kocevski/474920/ltcube_655344001_655603201_4FGL_J2142.8+1958_daily_bin1605.fits outfile=/scratch/kocevski/474920/expmap_655344001_655603201_4FGL_J2142.8+1958_daily_bin1605.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/474920/ltcube_655344001_655603201_4FGL_J2142.8+1958_daily_bin1605.fits
.....................!
real 191.65
user 186.29
sys 4.96

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.
Added 163 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 J2142.8+1958 @ 325.701 19.982

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/474920/ft1_filtered_4FGL_J2142.8+1958_daily_bin1605.fits scfile=/scratch/kocevski/474920/ft2_4FGL_J2142.8+1958_daily_bin1605.fits outfile=/scratch/kocevski/474920/cmap_655344001_655603201_4FGL_J2142.8+1958_daily_bin1605.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=325.701 yref=19.982 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.39
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/474920/ft1_filtered_4FGL_J2142.8+1958_daily_bin1605.fits scfile=/scratch/kocevski/474920/ft2_4FGL_J2142.8+1958_daily_bin1605.fits outfile=/scratch/kocevski/474920/cmap_HighResolution_655344001_655603201_4FGL_J2142.8+1958_daily_bin1605.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=325.701 yref=19.982 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.41
sys 0.14

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/474920/ft1_filtered_4FGL_J2142.8+1958_daily_bin1605.fits evtable="EVENTS" scfile=/scratch/kocevski/474920/ft2_4FGL_J2142.8+1958_daily_bin1605.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/474920/Model_4FGL_J2142.8+1958_daily_bin1605.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 Loop
adding source EG_v02
adding source GAL_V02
Working on...
/scratch/kocevski/474920/ft1_filtered_4FGL_J2142.8+1958_daily_bin1605.fits.....................!
real 84.03
user 82.54
sys 1.28

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/474920/ft1_filtered_4FGL_J2142.8+1958_daily_bin1605.fits', '/scratch/kocevski/474920/ft2_4FGL_J2142.8+1958_daily_bin1605.fits', expMap='/scratch/kocevski/474920/expmap_655344001_655603201_4FGL_J2142.8+1958_daily_bin1605.fits', expCube='/scratch/kocevski/474920/ltcube_655344001_655603201_4FGL_J2142.8+1958_daily_bin1605.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/474920/Model_4FGL_J2142.8+1958_daily_bin1605.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J2142.8+1958'

4FGL J2142.8+1958
   Spectrum: PowerLaw
276    Prefactor:  4.708e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-15)
277        Index:  1.795e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
278        Scale:  6.137e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/474920/ft1_filtered_4FGL_J2142.8+1958_daily_bin1605.fits
Spacecraft file(s): /scratch/kocevski/474920/ft2_4FGL_J2142.8+1958_daily_bin1605.fits
Exposure map: /scratch/kocevski/474920/expmap_655344001_655603201_4FGL_J2142.8+1958_daily_bin1605.fits
Exposure cube: /scratch/kocevski/474920/ltcube_655344001_655603201_4FGL_J2142.8+1958_daily_bin1605.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/474920/Model_4FGL_J2142.8+1958_daily_bin1605.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) = 4616.76034321

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

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 'Prefactor '    .10006E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    147.55       1.0000         .10000E-03   10000.    
     4 'Prefactor '    8.7720       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10015E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    5.5191       1.0000         .10000E-03   10000.    
     9 'norm      '    1.6073       1.0000         .10000E-03   10000.    
    10 'Prefactor '    4.2581       1.0000         .10000E-03   10000.    
    11 'Prefactor '    12.372       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    3.5760       1.0000         .10000E-03   10000.    
    14 'Prefactor '    5.6894       1.0000         .10000E-03   10000.    
    15 'Prefactor '    136.55       1.0000         .10000E-03   10000.    
    16 'norm      '    1.2871       1.0000         .10000E-03   10000.    
    17 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    18 'norm      '    .41910       1.0000         .10000E-03   10000.    
    19 'Prefactor '    .14830E-03   1.0000         .10000E-03   10000.    
    20 'norm      '    .33942       1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    22 'norm      '    16.403       1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    25 'Normalizat'    1.7372       1.0000         .10000E-01   10.000    
    26 'Prefactor '    .55552       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5500E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   4616.734     FROM MIGRAD    STATUS=CONVERGED    636 CALLS     3129 TOTAL
                     EDM=   .33E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  5.1%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    17.864       -.74174E-06** at limit **
   2  Prefactor     .10000E-03    8.3979       -.14965E-07** at limit **
   3  Prefactor     147.56        83.210       -.32141E-06   -.25653E-05
   4  Prefactor     8.7741        18.182       -.10062E-06    .40811E-05
   5  Prefactor     .10000E-03    19.144        .58099E-06** at limit **
   6  Prefactor     .10000E-03    3.1521        .84419E-08** at limit **
   7  Prefactor     .10000E-03    14.977        .16428E-06** at limit **
   8  norm          5.5190        5.6027        .28858E-07   -.52064E-07
   9  norm          1.6070        5.9300        .56480E-06   -.11378E-04
  10  Prefactor     4.2611        12.775        .39070E-05   -.19827E-04
  11  Prefactor     12.371        16.730       -.11028E-05    .16947E-04
  12  Prefactor     .10000E-03    110.35       -.88928E-05** at limit **
  13  norm          3.5760        3.5761        .12217E-06    .26182E-04
  14  Prefactor     5.6897        11.004        .90230E-07   -.97098E-05
  15  Prefactor     136.53        137.17        .22725E-05    .11341E-04
  16  norm          1.2879        3.5916       -.34065E-06   -.78134E-04
  17  Prefactor     .10000E-03    10.358       -.10731E-07** at limit **
  18  norm          .41780        2.3076        .34733E-06   -.11465E-03
  19  Prefactor     .10000E-03    280.74        .51625E-05** at limit **
  20  norm          .34023        .99604       -.42160E-07   -.26529E-03
  21  Prefactor     .10000E-03    25.537       -.64104E-06** at limit **
  22  norm          16.401        14.118        .18976E-06    .99919E-05
  23  Prefactor     .10000E-03    95.517        .65444E-05** at limit **
  24  Prefactor     .10000E-03    22.697        .46712E-06** at limit **
  25  Normalizat    1.7369        .33065       -.86592E-06    .19370E-04
  26  Prefactor     .55560        .11413        .69536E-07   -.68740E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 147.56
  Prefactor  = 8.77408
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 5.51895
  norm       = 1.60701
  Prefactor  = 4.26106
  Prefactor  = 12.3708
  Prefactor  = 0.0001
  norm       = 3.57601
  Prefactor  = 5.6897
  Prefactor  = 136.533
  norm       = 1.28787
  Prefactor  = 0.0001
  norm       = 0.417795
  Prefactor  = 0.0001
  norm       = 0.340235
  Prefactor  = 0.0001
  norm       = 16.4013
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Normalizat = 1.73689
  Prefactor  = 0.555603
 **********
 **   18 **HESSE 
 **********

 FCN=   4616.734     FROM HESSE     STATUS=OK           462 CALLS     3591 TOTAL
                     EDM=   .23E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    17.931        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    8.4226        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     147.56        83.250        .33175E-04   -1.3272    
   4  Prefactor     8.7741        18.254        .13534E-03   -1.5115    
   5  Prefactor     .10000E-03    19.171        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    3.1760        .11762E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    14.983        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          5.5190        5.5971        .15593E-03   -1.5238    
   9  norm          1.6070        5.9024        .29655E-03   -1.5454    
  10  Prefactor     4.2611        12.847        .97628E-03   -1.5295    
  11  Prefactor     12.371        16.898        .11389E-03   -1.5004    
  12  Prefactor     .10000E-03    110.01        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          3.5760        3.5624        .12019E-03   -1.5330    
  14  Prefactor     5.6897        10.904        .16840E-03   -1.5231    
  15  Prefactor     136.53        135.05        .17233E-03   -1.3366    
  16  norm          1.2879        3.4860        .17674E-03   -1.5481    
  17  Prefactor     .10000E-03    10.359        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  norm          .41780        3.9695        .18635E-02   -1.5579    
  19  Prefactor     .10000E-03    281.63        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  norm          .34023        .87829        .11241E-02   -1.5591    
  21  Prefactor     .10000E-03    25.578        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  norm          16.401        14.123        .98890E-04   -1.4898    
  23  Prefactor     .10000E-03    95.296        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     .10000E-03    22.732        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Normalizat    1.7369        .39784        .30836E-03   -.71322    
  26  Prefactor     .55560        .13731        .18682E-03   -1.0949    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.28648e-08
Minuit parameter uncertainties:
  1  7.88976e-06
  2  1.0915e-06
  3  83.3158
  4  18.2653
  5  3.8857e-06
  6  1.22535e-06
  7  5.27621e-07
  8  5.59762
  9  5.90451
  10  12.8557
  11  16.9047
  12  0.000277113
  13  3.56263
  14  10.9076
  15  135.359
  16  3.48655
  17  9.64835e-07
  18  2.57553
  19  8.72444e-05
  20  0.878318
  21  1.41139e-05
  22  14.1258
  23  0.000183832
  24  3.02828e-07
  25  0.398576
  26  0.137395
Done.

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

Extracting fit parameters...

4FGL J2142.8+1958
   Spectrum: PowerLaw
276    Prefactor:  1.000e-04  2.771e-04  1.000e-04  1.000e+04 ( 1.000e-15)
277        Index:  1.795e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
278        Scale:  6.137e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
547    Prefactor:  5.556e-01  1.374e-01  0.000e+00  1.000e+01 ( 1.000e+00)
548        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
549        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
546   Normalization:  1.737e+00  3.986e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 325.701 19.982
Photon Flux Upper Limit: 8.66e-08 ph cm-2 s-1
Energy Flux Upper Limit: 6.37e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/474920/likelihoodResults_655344001_655603201_4FGL_J2142.8+1958_daily_bin1605.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) = 4616.73402069
delta logL = -4.31786711488e-05

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 4616.73402069
delta logL = -4.317357525e-05

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .96345E-02   1.0000         .10000E-03   10000.    
     2 'Index     '    1.7948       1.0000          .0000       10.000    
     3 'Normalizat'    1.7369       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .55560       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5500E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   4616.734     FROM MIGRAD    STATUS=CONVERGED     57 CALLS      203 TOTAL
                     EDM=   .17E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10001E-03    43.582        .90714E-02** at limit **
   2  Index         1.7781        5.2942        .50000        .10872E-05
   3  Normalizat    1.7369        .49078E-02    .69708E-01   -.95117E-04
   4  Prefactor     .55560        .18031E-02    .40445E-01   -.18949E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100012
  Index      = 1.77812
  Normalizat = 1.73689
  Prefactor  = 0.555603
 **********
 **   18 **HESSE 
 **********

 FCN=   4616.734     FROM HESSE     STATUS=NOT POSDEF    31 CALLS      234 TOTAL
                     EDM=   .21E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10001E-03    533.33        .18143E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         1.7781        8.7186        .50000       -.70021    
   3  Normalizat    1.7369        .17369E-01    .30836E-03   -.71322    
   4  Prefactor     .55560        .63828E-02    .18682E-03   -1.0949    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 2.08396e-08
Minuit parameter uncertainties:
  1  0.00519422
  2  425.92
  3  0.0173695
  4  0.00638278
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/474920': 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) = 4616.73397751
delta logL = 4.7730281949e-09

Extracting fit parameters...

4FGL J2142.8+1958
   Spectrum: PowerLaw
276    Prefactor:  1.000e-04  5.194e-03  1.000e-04  1.000e+04 ( 1.000e-15)
277        Index:  1.778e+00  4.259e+02  0.000e+00  1.000e+01 (-1.000e+00)
278        Scale:  6.137e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
547    Prefactor:  5.556e-01  6.383e-03  0.000e+00  1.000e+01 ( 1.000e+00)
548        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
549        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
546   Normalization:  1.737e+00  1.737e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 325.701 19.982

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/474920/cmap_HighResolution_655344001_655603201_4FGL_J2142.8+1958_daily_bin1605.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='6.37e-03', job_status='DONE', photon_flux_upper_limit='8.66e-08', time_completed='2021-12-08 08:07:14.604789', job_id='474920', GAL2='0.56', fit_tolerance='1e-08', EG2='1.74', EG='1.74', time_epoch_completed='1638979634.6', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.56', dlogl='4.77e-09', ts2='-0.00', photon_index_error='0.00', photon_index='1.79' WHERE bin_id='1605' AND source_name='4FGL J2142.8+1958' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Wed Dec  8 08:07:14 PST 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0303>
Subject: Job 474920: <4FGL_J2142.8+1958_daily_bin1605> in cluster <slac> Done

Job <4FGL_J2142.8+1958_daily_bin1605> was submitted from host <rhel6-64p> by user <kocevski> in cluster <slac> at Wed Dec  8 07:55:21 2021
Job was executed on host(s) <bullet0303>, in queue <medium>, as user <kocevski> in cluster <slac> at Wed Dec  8 07:56:23 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Wed Dec  8 07:56:23 2021
Terminated at Wed Dec  8 08:07:15 2021
Results reported at Wed Dec  8 08:07:15 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2142.8+1958_daily_bin1605 325.701 19.982 655344001 655603201 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J2142.8+1958 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   643.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             399.45 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   651 sec.
    Turnaround time :                            714 sec.

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

