/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 196 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 = 7473
number of fields = 27
No RA_SUN column yet. Adding RA_SUN/DEC_SUN columns.
Done.


Performing analysis on: 4FGL_J2142.8+1958_daily_bin377
RA = 325.701, Dec = 19.982
tmin = 337046401, tmax = 337305601
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='694292', job_status='RUN', time_executed='2021-09-27 01:00:18.090773', time_epoch_executed='1632729618.09' WHERE source_name='4FGL J2142.8+1958' and cadence='daily' and bin_id='377'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/694292

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/694292/ft1_4FGL_J2142.8+1958_daily_bin377.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/694292/ft2_4FGL_J2142.8+1958_daily_bin377.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/694292/ft1_4FGL_J2142.8+1958_daily_bin377.fits outfile=/scratch/kocevski/694292/ft1_filteredMKT_4FGL_J2142.8+1958_daily_bin377.fits ra=325.701 dec=19.982 rad=12.0 tmin=337046401.0 tmax=337305601.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 11.11
user 10.46
sys 0.40

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/694292/ft2_4FGL_J2142.8+1958_daily_bin377.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/694292/ft1_filteredMKT_4FGL_J2142.8+1958_daily_bin377.fits evtable="EVENTS" outfile="/scratch/kocevski/694292/ft1_filtered_4FGL_J2142.8+1958_daily_bin377.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.94
user 0.33
sys 0.16

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/694292/ft1_filtered_4FGL_J2142.8+1958_daily_bin377.fits" evtable="EVENTS" scfile=/scratch/kocevski/694292/ft2_4FGL_J2142.8+1958_daily_bin377.fits sctable="SC_DATA" outfile=/scratch/kocevski/694292/ltcube_337046401_337305601_4FGL_J2142.8+1958_daily_bin377.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/694292/ft2_4FGL_J2142.8+1958_daily_bin377.fits
.....................!
real 13.88
user 12.64
sys 0.38

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/694292/ft1_filtered_4FGL_J2142.8+1958_daily_bin377.fits evtable="EVENTS" scfile=/scratch/kocevski/694292/ft2_4FGL_J2142.8+1958_daily_bin377.fits sctable="SC_DATA" expcube=/scratch/kocevski/694292/ltcube_337046401_337305601_4FGL_J2142.8+1958_daily_bin377.fits outfile=/scratch/kocevski/694292/expmap_337046401_337305601_4FGL_J2142.8+1958_daily_bin377.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/694292/ltcube_337046401_337305601_4FGL_J2142.8+1958_daily_bin377.fits
.....................!
real 191.13
user 185.79
sys 4.65

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/694292/ft1_filtered_4FGL_J2142.8+1958_daily_bin377.fits scfile=/scratch/kocevski/694292/ft2_4FGL_J2142.8+1958_daily_bin377.fits outfile=/scratch/kocevski/694292/cmap_337046401_337305601_4FGL_J2142.8+1958_daily_bin377.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.54
user 0.38
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/694292/ft1_filtered_4FGL_J2142.8+1958_daily_bin377.fits scfile=/scratch/kocevski/694292/ft2_4FGL_J2142.8+1958_daily_bin377.fits outfile=/scratch/kocevski/694292/cmap_HighResolution_337046401_337305601_4FGL_J2142.8+1958_daily_bin377.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.87
user 0.39
sys 0.17

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/694292/ft1_filtered_4FGL_J2142.8+1958_daily_bin377.fits evtable="EVENTS" scfile=/scratch/kocevski/694292/ft2_4FGL_J2142.8+1958_daily_bin377.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/694292/Model_4FGL_J2142.8+1958_daily_bin377.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/694292/ft1_filtered_4FGL_J2142.8+1958_daily_bin377.fits.....................!
real 78.19
user 76.79
sys 1.19

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/694292/ft1_filtered_4FGL_J2142.8+1958_daily_bin377.fits', '/scratch/kocevski/694292/ft2_4FGL_J2142.8+1958_daily_bin377.fits', expMap='/scratch/kocevski/694292/expmap_337046401_337305601_4FGL_J2142.8+1958_daily_bin377.fits', expCube='/scratch/kocevski/694292/ltcube_337046401_337305601_4FGL_J2142.8+1958_daily_bin377.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/694292/Model_4FGL_J2142.8+1958_daily_bin377.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/694292/ft1_filtered_4FGL_J2142.8+1958_daily_bin377.fits
Spacecraft file(s): /scratch/kocevski/694292/ft2_4FGL_J2142.8+1958_daily_bin377.fits
Exposure map: /scratch/kocevski/694292/expmap_337046401_337305601_4FGL_J2142.8+1958_daily_bin377.fits
Exposure cube: /scratch/kocevski/694292/ltcube_337046401_337305601_4FGL_J2142.8+1958_daily_bin377.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/694292/Model_4FGL_J2142.8+1958_daily_bin377.xml
Optimizer: MINUIT
Statistic: UNBINNED

Performing an iterative likelihood fit...

Fit tolerance = 1

Performing likelihood fit...
Done.

MINUIT Return Code (Fixed Index): 102
logL (Fixed Index) = 4429.04973911

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    24.526       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    88.895       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    26.043       1.0000         .10000E-03   10000.    
     6 'Prefactor '    4.1245       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10008E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    5.5562       1.0000         .10000E-03   10000.    
     9 'norm      '    4.8239       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    9.2279       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10295E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .10005E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    12.001       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10006E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    9.2376       1.0000         .10000E-03   10000.    
    17 'Prefactor '    .10242E-03   1.0000         .10000E-03   10000.    
    18 'norm      '    1.5239       1.0000         .10000E-03   10000.    
    19 'Prefactor '    109.84       1.0000         .10000E-03   10000.    
    20 'norm      '    .17413       1.0000         .10000E-03   10000.    
    21 'Prefactor '    18.371       1.0000         .10000E-03   10000.    
    22 'norm      '    6.8780       1.0000         .10000E-03   10000.    
    23 'Prefactor '    .58463E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    11.677       1.0000         .10000E-03   10000.    
    25 'Normalizat'    .12404       1.0000         .10000E-01   10.000    
    26 'Prefactor '    1.3600       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5500E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   4429.023     FROM MIGRAD    STATUS=CONVERGED     88 CALLS     3035 TOTAL
                     EDM=   .61E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  6.7%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     24.524        1.0451       -.34220E-07    .33221E-03
   2  Prefactor     .10001E-03    21.147       -.31524E-05** at limit **
   3  Prefactor     88.895        1.0009        .55352E-09    .12116E-03
   4  Prefactor     .10249E-03    27.544       -.11486E-04** at limit **
   5  Prefactor     26.045        1.0252        .18708E-07   -.74448E-03
   6  Prefactor     4.1245        2.6643        .18747E-05    .82439E-03
   7  Prefactor     .10000E-03    16.477        .27206E-05** at limit **
   8  norm          5.5564        5.6468        .34640E-05    .20956E-02
   9  norm          4.8229        4.1268       -.28493E-05   -.24732E-02
  10  Prefactor     .10000E-03    3.9409        .22474E-05** at limit **
  11  Prefactor     9.2287        1.0262       -.14398E-06   -.13570E-03
  12  Prefactor     .11248E-03    88.696        .70507E-05** at limit **
  13  norm          .10000E-03    2.3432        .44065E-05** at limit **
  14  Prefactor     12.000        1.0112       -.81841E-07    .17076E-03
  15  Prefactor     .10282E-03    26.650        .22323E-05** at limit **
  16  norm          9.2379        4.8672       -.90199E-06   -.95728E-04
  17  Prefactor     .10814E-03    92.982        .12260E-04** at limit **
  18  norm          1.5239        1.3514       -.18151E-06   -.30136E-04
  19  Prefactor     109.85        1.1685        .53181E-07   -.25013E-02
  20  norm          .16817        5.0342       -.19384E-05   -.72855E-04
  21  Prefactor     18.386        1.8855        .41146E-08   -.91969E-03
  22  norm          6.8802        5.8520        .40021E-05    .25943E-02
  23  Prefactor     .20604E-03    2.5207       -.16225E-05** at limit **
  24  Prefactor     11.681        1.0423       -.12255E-06    .79491E-03
  25  Normalizat    .12374        .42138        .45787E-04   -.32778E-05
  26  Prefactor     1.3602        .17842       -.67817E-05   -.41652E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 24.5237
  Prefactor  = 0.000100007
  Prefactor  = 88.8948
  Prefactor  = 0.000102495
  Prefactor  = 26.0451
  Prefactor  = 4.12451
  Prefactor  = 0.000100002
  norm       = 5.55644
  norm       = 4.82293
  Prefactor  = 0.0001
  Prefactor  = 9.22866
  Prefactor  = 0.000112476
  norm       = 0.0001
  Prefactor  = 12
  Prefactor  = 0.00010282
  norm       = 9.23788
  Prefactor  = 0.000108141
  norm       = 1.52388
  Prefactor  = 109.846
  norm       = 0.168166
  Prefactor  = 18.3861
  norm       = 6.88016
  Prefactor  = 0.000206037
  Prefactor  = 11.6806
  Normalizat = 0.123744
  Prefactor  = 1.36016
 **********
 **   18 **HESSE 
 **********

 FCN=   4429.023     FROM HESSE     STATUS=NOT POSDEF   520 CALLS     3555 TOTAL
                     EDM=   .78E-06    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     24.524        47.551        .20221E-02   -1.4717    
   2  Prefactor     .10001E-03    18.488        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     88.895        232.55        .10654E-02   -1.3819    
   4  Prefactor     .10249E-03    42.011        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     26.045        111.36        .19624E-02   -1.4687    
   6  Prefactor     4.1245        10.445        .49622E-02   -1.5302    
   7  Prefactor     .10000E-03    14.417        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          5.5564        6.3302        .42610E-02   -1.5236    
   9  norm          4.8229        8.2267        .45791E-02   -1.5269    
  10  Prefactor     .10000E-03    3.4506        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     9.2287        25.621        .32983E-02   -1.5100    
  12  Prefactor     .11248E-03    172.34        .90712E-02   -1.5707    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .10000E-03    2.0622        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     12.000        11.306        .28909E-02   -1.5015    
  15  Prefactor     .10282E-03    45.468        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          9.2379        7.8281        .32966E-02   -1.5100    
  17  Prefactor     .10814E-03    153.13        .90712E-02   -1.5709    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  norm          1.5239        1.4744        .86497E-02   -1.5461    
  19  Prefactor     109.85        169.75        .95944E-03   -1.3608    
  20  norm          .16817        6.9714        .40201E-01   -1.5626    
  21  Prefactor     18.386        69.394        .23361E-02   -1.4850    
  22  norm          6.8802        8.9828        .38245E-02   -1.5183    
  23  Prefactor     .20604E-03    555.73        .10539E-01   -1.5706    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     11.681        29.868        .29309E-02   -1.5024    
  25  Normalizat    .12374        8.7697        .27608       -1.3570    
  26  Prefactor     1.3602        .87808        .31638E-01   -.81535    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 7.76937e-07
Minuit parameter uncertainties:
  1  47.6248
  2  0.000741406
  3  235.001
  4  0.0204899
  5  108.052
  6  10.45
  7  0.000318425
  8  6.33099
  9  8.22866
  10  5.13449e-06
  11  25.6514
  12  0.0930068
  13  6.04806e-06
  14  11.3084
  15  0.0226628
  16  7.82895
  17  0.0707972
  18  1.47441
  19  170.512
  20  2.16512
  21  69.7013
  22  8.9846
  23  0.490115
  24  29.9067
  25  2.48876
  26  0.88798
Done.

MINUIT Return Code (Fixed Index): 102
logL (Fixed Index) = 4429.02285428

Extracting fit parameters...

4FGL J2142.8+1958
   Spectrum: PowerLaw
276    Prefactor:  1.125e-04  9.301e-02  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:  1.360e+00  8.880e-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.237e-01  2.489e+00  1.000e-02  1.000e+01 ( 1.000e+00)


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

Saving results to:
/scratch/kocevski/694292/likelihoodResults_337046401_337305601_4FGL_J2142.8+1958_daily_bin377.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) = 4429.02287829
delta logL = -2.40086083068e-05

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 4429.02285427
delta logL = 1.60125637194e-08

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10684E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    1.8234       1.0000          .0000       10.000    
     3 'Normalizat'    .12374       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.3602       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=   4429.023     FROM MIGRAD    STATUS=CONVERGED     53 CALLS      240 TOTAL
                     EDM=   .88E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10002E-03    9659.4        .90712E-02** at limit **
   2  Index         1.8303        8.4834        .50000       -.28031E-06
   3  Normalizat    .12375        .85704E-01    .27608       -.18754E-04
   4  Prefactor     1.3602        .40769E-01    .31636E-01   -.10210E-02
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100019
  Index      = 1.8303
  Normalizat = 0.123748
  Prefactor  = 1.36016
 **********
 **   18 **HESSE 
 **********

 FCN=   4429.023     FROM HESSE     STATUS=NOT POSDEF    33 CALLS      273 TOTAL
                     EDM=   .53E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10002E-03    8885.3        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         1.8303        5.2301        .50000       -.68664    
   3  Normalizat    .12375        .74728E-01    .10903E-01   -1.3570    
   4  Prefactor     1.3602        .31815E-01    .15804E-03   -.81535    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 5.3447e-09
Minuit parameter uncertainties:
  1  0.0298477
  2  30.648
  3  0.0747901
  4  0.0318159
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/694292': 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) = 4429.02285425
delta logL = 3.34230207955e-08

Extracting fit parameters...

4FGL J2142.8+1958
   Spectrum: PowerLaw
276    Prefactor:  1.000e-04  2.985e-02  1.000e-04  1.000e+04 ( 1.000e-15)
277        Index:  1.830e+00  3.065e+01  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:  1.360e+00  3.182e-02  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.237e-01  7.479e-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/694292/cmap_HighResolution_337046401_337305601_4FGL_J2142.8+1958_daily_bin377.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='7.99e-03', job_status='DONE', photon_flux_upper_limit='1.08e-07', time_completed='2021-09-27 01:11:22.926218', job_id='694292', GAL2='1.36', fit_tolerance='1e-08', EG2='0.12', EG='0.12', time_epoch_completed='1632730282.93', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='102', GAL='1.36', dlogl='3.34e-08', ts2='-0.00', photon_index_error='0.00', photon_index='1.79' WHERE bin_id='377' AND source_name='4FGL J2142.8+1958' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep 27 01:11:22 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0124>
Subject: Job 694292: <4FGL_J2142.8+1958_daily_bin377> in cluster <slac> Done

Job <4FGL_J2142.8+1958_daily_bin377> was submitted from host <rhel6-64j> by user <kocevski> in cluster <slac> at Mon Sep 27 00:55:19 2021
Job was executed on host(s) <bullet0124>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep 27 00:56:48 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Mon Sep 27 00:56:48 2021
Terminated at Mon Sep 27 01:11:23 2021
Results reported at Mon Sep 27 01:11:23 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2142.8+1958_daily_bin377 325.701 19.982 337046401 337305601 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 :                                   658.00 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             278.86 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   877 sec.
    Turnaround time :                            964 sec.

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

