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


Performing analysis on: 4FGL_J0958.4+5042_monthly_bin66
RA = 149.606, Dec = 50.7
tmin = 408067201, tmax = 410659201
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='960956', job_status='RUN', time_executed='2021-10-21 08:47:33.091849', time_epoch_executed='1634831253.09' WHERE source_name='4FGL J0958.4+5042' and cadence='monthly' and bin_id='66'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/960956

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

Retrieving the FT1 file...

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

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

Retrieving 455 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/960956/ft1_4FGL_J0958.4+5042_monthly_bin66.fits


Retrieving the FT1 file...

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

Retrieving 455 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/960956/ft2_4FGL_J0958.4+5042_monthly_bin66.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/960956/ft1_4FGL_J0958.4+5042_monthly_bin66.fits outfile=/scratch/kocevski/960956/ft1_filteredMKT_4FGL_J0958.4+5042_monthly_bin66.fits ra=149.606 dec=50.7 rad=12.0 tmin=408067201.0 tmax=410659201.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 48.49
user 47.26
sys 1.11

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/960956/ft2_4FGL_J0958.4+5042_monthly_bin66.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/960956/ft2_4FGL_J0958.4+5042_monthly_bin66.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/960956/ft1_filteredMKT_4FGL_J0958.4+5042_monthly_bin66.fits evtable="EVENTS" outfile="/scratch/kocevski/960956/ft1_filtered_4FGL_J0958.4+5042_monthly_bin66.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.84
user 0.65
sys 0.17

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/960956/ft1_filtered_4FGL_J0958.4+5042_monthly_bin66.fits" evtable="EVENTS" scfile=/scratch/kocevski/960956/ft2_4FGL_J0958.4+5042_monthly_bin66.fits sctable="SC_DATA" outfile=/scratch/kocevski/960956/ltcube_408067201_410659201_4FGL_J0958.4+5042_monthly_bin66.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/960956/ft2_4FGL_J0958.4+5042_monthly_bin66.fits
.....................!
real 121.27
user 120.68
sys 0.33

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/960956/ft1_filtered_4FGL_J0958.4+5042_monthly_bin66.fits evtable="EVENTS" scfile=/scratch/kocevski/960956/ft2_4FGL_J0958.4+5042_monthly_bin66.fits sctable="SC_DATA" expcube=/scratch/kocevski/960956/ltcube_408067201_410659201_4FGL_J0958.4+5042_monthly_bin66.fits outfile=/scratch/kocevski/960956/expmap_408067201_410659201_4FGL_J0958.4+5042_monthly_bin66.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/960956/ltcube_408067201_410659201_4FGL_J0958.4+5042_monthly_bin66.fits
.....................!
real 192.85
user 187.60
sys 4.81

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
Added 231 point sources and 0 extended sources

Setting source of interest to:
4FGL J0958.4+5042 @ 149.606 50.7

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/960956/ft1_filtered_4FGL_J0958.4+5042_monthly_bin66.fits scfile=/scratch/kocevski/960956/ft2_4FGL_J0958.4+5042_monthly_bin66.fits outfile=/scratch/kocevski/960956/cmap_408067201_410659201_4FGL_J0958.4+5042_monthly_bin66.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=149.606 yref=50.7 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.78
user 0.60
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/960956/ft1_filtered_4FGL_J0958.4+5042_monthly_bin66.fits scfile=/scratch/kocevski/960956/ft2_4FGL_J0958.4+5042_monthly_bin66.fits outfile=/scratch/kocevski/960956/cmap_HighResolution_408067201_410659201_4FGL_J0958.4+5042_monthly_bin66.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=149.606 yref=50.7 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.78
user 0.61
sys 0.16

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/960956/ft1_filtered_4FGL_J0958.4+5042_monthly_bin66.fits evtable="EVENTS" scfile=/scratch/kocevski/960956/ft2_4FGL_J0958.4+5042_monthly_bin66.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/960956/Model_4FGL_J0958.4+5042_monthly_bin66.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 GAL_V02
Working on...
/scratch/kocevski/960956/ft1_filtered_4FGL_J0958.4+5042_monthly_bin66.fits.....................!
real 308.51
user 305.68
sys 1.17

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/960956/ft1_filtered_4FGL_J0958.4+5042_monthly_bin66.fits', '/scratch/kocevski/960956/ft2_4FGL_J0958.4+5042_monthly_bin66.fits', expMap='/scratch/kocevski/960956/expmap_408067201_410659201_4FGL_J0958.4+5042_monthly_bin66.fits', expCube='/scratch/kocevski/960956/ltcube_408067201_410659201_4FGL_J0958.4+5042_monthly_bin66.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/960956/Model_4FGL_J0958.4+5042_monthly_bin66.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J0958.4+5042'

4FGL J0958.4+5042
   Spectrum: PowerLaw
369    Prefactor:  1.235e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-12)
370        Index:  2.663e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
371        Scale:  5.744e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/960956/ft1_filtered_4FGL_J0958.4+5042_monthly_bin66.fits
Spacecraft file(s): /scratch/kocevski/960956/ft2_4FGL_J0958.4+5042_monthly_bin66.fits
Exposure map: /scratch/kocevski/960956/expmap_408067201_410659201_4FGL_J0958.4+5042_monthly_bin66.fits
Exposure cube: /scratch/kocevski/960956/ltcube_408067201_410659201_4FGL_J0958.4+5042_monthly_bin66.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/960956/Model_4FGL_J0958.4+5042_monthly_bin66.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) = 43524.8626352

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    4.5506       1.0000         .10000E-03   10000.    
     2 'norm      '    7.0721       1.0000         .10000E-03   10000.    
     3 'norm      '    8.4787       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .22155E-01   1.0000         .10000E-03   10000.    
     5 'Prefactor '    1.6339       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    14.999       1.0000         .10000E-03   10000.    
     8 'norm      '    .40029       1.0000         .10000E-03   10000.    
     9 'Prefactor '    3.5228       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .13601       1.0000         .10000E-03   10000.    
    11 'Prefactor '    1.6129       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10008E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    4.9324       1.0000         .10000E-03   10000.    
    14 'Prefactor '    10.138       1.0000         .10000E-03   10000.    
    15 'norm      '    1.5343       1.0000         .10000E-03   10000.    
    16 'Prefactor '    5.0681       1.0000         .10000E-03   10000.    
    17 'Prefactor '    .10044E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    19 'norm      '    .88240       1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10008E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    2.6726       1.0000         .10000E-03   10000.    
    22 'norm      '    1.5822       1.0000         .10000E-03   10000.    
    23 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10171E-03   1.0000         .10000E-03   10000.    
    25 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    26 'norm      '    11.858       1.0000         .10000E-03   10000.    
    27 'Prefactor '    .10009E-03   1.0000         .10000E-03   10000.    
    28 'norm      '    8.7329       1.0000         .10000E-03   10000.    
    29 'Prefactor '    26.551       1.0000         .10000E-03   10000.    
    30 'Prefactor '    .23530E-03   1.0000         .10000E-03   10000.    
    31 'norm      '    1.9138       1.0000         .10000E-03   10000.    
    32 'norm      '    .60679       1.0000         .10000E-03   10000.    
    33 'Prefactor '    .26073       1.0000         .10000E-03   10000.    
    34 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    35 'norm      '    2.0597       1.0000         .10000E-03   10000.    
    36 'Prefactor '    .28771E-03   1.0000         .10000E-03   10000.    
    37 'Prefactor '    8.7663       1.0000         .10000E-03   10000.    
    38 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    39 'Normalizat'    .93121       1.0000         .10000E-01   10.000    
    40 'Prefactor '    1.0240       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .7370E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   43524.78     FROM MIGRAD    STATUS=CONVERGED   1279 CALLS     5678 TOTAL
                     EDM=   .75E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.3%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     4.5500        2.0559        .11626E-06   -.88367E-03
   2  norm          7.0721        2.0403        .16710E-08   -.83022E-04
   3  norm          8.4784        2.3042       -.61592E-08   -.93640E-04
   4  Prefactor     .38862E-01    1.0187       -.16823E-06    .25759E-03
   5  Prefactor     1.6340        .72095        .10503E-07   -.49016E-03
   6  Prefactor     .10000E-03    8.6592       -.34226E-06** at limit **
   7  Prefactor     14.998        15.506       -.13051E-06   -.36405E-05
   8  norm          .40025        .21738       -.57167E-09   -.18960E-02
   9  Prefactor     3.5229        1.5069       -.26142E-08   -.99110E-03
  10  Prefactor     .13600        .26529        .14497E-06   -.31863E-02
  11  Prefactor     1.6130        1.6884        .20221E-06   -.49821E-03
  12  Prefactor     .10000E-03    .28443        .25605E-07** at limit **
  13  Prefactor     4.9326        3.5927       -.67061E-06   -.41397E-03
  14  Prefactor     10.135        4.0276       -.39979E-06   -.72441E-03
  15  norm          1.5341        3.1432        .34939E-06   -.49278E-03
  16  Prefactor     5.0678        8.1465       -.45258E-06   -.11060E-03
  17  Prefactor     .10000E-03    .74454        .16151E-06** at limit **
  18  Prefactor     .10000E-03    1.0152        .21823E-07** at limit **
  19  norm          .88515        1.4417        .47211E-06    .11469E-03
  20  Prefactor     .10000E-03    7.1066        .16421E-06** at limit **
  21  Prefactor     2.6601        9.3940       -.20743E-05   -.20595E-03
  22  norm          1.5822        .21226        .44557E-08   -.19163E-03
  23  norm          .10000E-03    1.5370        .24421E-07** at limit **
  24  Prefactor     .10000E-03    .54470        .47483E-07** at limit **
  25  Prefactor     .10000E-03    2.9558       -.14083E-07** at limit **
  26  norm          11.859        1.4433       -.39243E-08    .89300E-04
  27  Prefactor     .10000E-03    5.1589       -.27544E-07** at limit **
  28  norm          8.7326        3.5069        .40316E-06    .39202E-03
  29  Prefactor     26.551        8.0543        .33610E-07   -.25312E-05
  30  Prefactor     .10000E-03    .32986       -.37265E-07** at limit **
  31  norm          1.9139        .94430        .14615E-07   -.54156E-03
  32  norm          .60681        .30227       -.39259E-08    .36744E-03
  33  Prefactor     .16098        6.0274       -.34642E-06    .61686E-04
  34  Prefactor     .10000E-03    15.196        .16511E-06** at limit **
  35  norm          2.0597        .70727        .20971E-07    .22200E-03
  36  Prefactor     .10039E-03    5.5586       -.97080E-06** at limit **
  37  Prefactor     8.7671        11.455       -.45592E-06   -.10699E-04
  38  Prefactor     .10000E-03    8.9053       -.11000E-08** at limit **
  39  Normalizat    .93124        .62493E-01    .66650E-07    .28083E-03
  40  Prefactor     1.0240        .73206E-01   -.36424E-07    .21672E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 4.54997
  norm       = 7.07208
  norm       = 8.47839
  Prefactor  = 0.038862
  Prefactor  = 1.63398
  Prefactor  = 0.0001
  Prefactor  = 14.9978
  norm       = 0.400247
  Prefactor  = 3.52293
  Prefactor  = 0.136001
  Prefactor  = 1.613
  Prefactor  = 0.0001
  Prefactor  = 4.93258
  Prefactor  = 10.1346
  norm       = 1.53405
  Prefactor  = 5.06782
  Prefactor  = 0.000100001
  Prefactor  = 0.0001
  norm       = 0.885148
  Prefactor  = 0.0001
  Prefactor  = 2.66015
  norm       = 1.58224
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 11.8586
  Prefactor  = 0.0001
  norm       = 8.73257
  Prefactor  = 26.5511
  Prefactor  = 0.000100001
  norm       = 1.91387
  norm       = 0.60681
  Prefactor  = 0.160977
  Prefactor  = 0.0001
  norm       = 2.05973
  Prefactor  = 0.000100393
  Prefactor  = 8.76708
  Prefactor  = 0.0001
  Normalizat = 0.931236
  Prefactor  = 1.02401
 **********
 **   18 **HESSE 
 **********

 FCN=   43524.78     FROM HESSE     STATUS=OK          1043 CALLS     6721 TOTAL
                     EDM=   .18E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     4.5500        2.0979        .94356E-03   -1.5281    
   2  norm          7.0721        2.0389        .15085E-03   -1.5176    
   3  norm          8.4784        2.3018        .13767E-03   -1.5126    
   4  Prefactor     .38862E-01    1.2823        .73046E-01   -1.5669    
   5  Prefactor     1.6340        .71645        .11285E-03   -1.5452    
   6  Prefactor     .10000E-03    8.9749        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     14.998        15.484        .10342E-03   -1.4933    
   8  norm          .40025        .20652        .49519E-03   -1.5581    
   9  Prefactor     3.5229        1.4959        .11261E-03   -1.5333    
  10  Prefactor     .13600        .34113        .16143E-02   -1.5634    
  11  Prefactor     1.6130        1.6879        .26976E-03   -1.5454    
  12  Prefactor     .10000E-03    .67454        .21361E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     4.9326        3.5620        .18110E-03   -1.5264    
  14  Prefactor     10.135        3.9309        .12585E-03   -1.5071    
  15  norm          1.5341        3.2093        .34444E-03   -1.5460    
  16  Prefactor     5.0678        8.0486        .17861E-03   -1.5258    
  17  Prefactor     .10000E-03    2.2598        .33295E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10000E-03    1.0486        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  norm          .88515        1.2940        .31775E-02   -1.5520    
  20  Prefactor     .10000E-03    7.1716        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     2.6601        9.4801        .24928E-03   -1.5382    
  22  norm          1.5822        .21196        .33700E-04   -1.5456    
  23  norm          .10000E-03    1.5681        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     .10000E-03    2.0489        .29313E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     .10000E-03    2.9660        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  norm          11.859        1.4401        .84238E-04   -1.5019    
  27  Prefactor     .10000E-03    5.2347        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  norm          8.7326        3.4952        .13564E-03   -1.5117    
  29  Prefactor     26.551        7.9913        .77745E-04   -1.4677    
  30  Prefactor     .10000E-03    .55022        .42096E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  31  norm          1.9139        .93619        .11563E-03   -1.5431    
  32  norm          .60681        .30593        .78740E-04   -1.5552    
  33  Prefactor     .16098        6.1149        .19311       -1.5628    
  34  Prefactor     .10000E-03    15.230        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  35  norm          2.0597        .70526        .96381E-04   -1.5421    
  36  Prefactor     .10039E-03    5.4523        .15590       -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  37  Prefactor     8.7671        11.449        .13538E-03   -1.5116    
  38  Prefactor     .10000E-03    8.9088        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  39  Normalizat    .93124        .73307E-01    .23275E-03   -.95371    
  40  Prefactor     1.0240        .86688E-01    .27911E-03   -.91933    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.76752e-07
Minuit parameter uncertainties:
  1  2.09792
  2  2.03892
  3  2.30184
  4  0.445908
  5  0.71645
  6  5.0034e-06
  7  15.4879
  8  0.206517
  9  1.49588
  10  0.341133
  11  1.68794
  12  2.61176e-06
  13  3.56216
  14  3.93096
  15  3.20966
  16  8.05036
  17  7.65113e-05
  18  2.34321e-06
  19  1.29408
  20  6.83475e-06
  21  9.48548
  22  0.211958
  23  1.72956e-07
  24  4.47457e-07
  25  4.58852e-06
  26  1.44007
  27  1.32507e-06
  28  3.49527
  29  7.9916
  30  5.44988e-05
  31  0.936195
  32  0.305932
  33  1.9839
  34  1.00729e-05
  35  0.705259
  36  0.00292627
  37  11.452
  38  2.77867e-07
  39  0.0733149
  40  0.0866993
Done.

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

Extracting fit parameters...

4FGL J0958.4+5042
   Spectrum: PowerLaw
369    Prefactor:  1.000e-04  4.475e-07  1.000e-04  1.000e+04 ( 1.000e-12)
370        Index:  2.663e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
371        Scale:  5.744e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
734    Prefactor:  1.024e+00  8.670e-02  0.000e+00  1.000e+01 ( 1.000e+00)
735        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
736        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
733   Normalization:  9.312e-01  7.331e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 149.606 50.700
Photon Flux Upper Limit: 2.03e-08 ph cm-2 s-1
Energy Flux Upper Limit: 1.59e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/960956/likelihoodResults_408067201_410659201_4FGL_J0958.4+5042_monthly_bin66.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) = 43524.7862126
delta logL = -0.00230753974029

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 43524.7839092
delta logL = -4.11329529015e-06

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .11742E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.6911       1.0000          .0000       10.000    
     3 'Normalizat'    .93131       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0240       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .7370E+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=   43524.78     FROM MIGRAD    STATUS=FAILED       103 CALLS      272 TOTAL
                     EDM=   .76E-05    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10559E-03    24.340        .23759E-02** at limit **
   2  Index         2.9638        5.0051        .50000       -.38495E-04
   3  Normalizat    .93124        .45032E-02    .23275E-03    .21266E-02
   4  Prefactor     1.0240        .56610E-02    .27911E-03    .11542E-02
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   43524.78     FROM SIMPLEX   STATUS=PROGRESS     123 CALLS      395 TOTAL
                     EDM=   .74E-05    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    24.340        .22655E-03** at limit **
   2  Index         2.9585        5.0051        .16071E-02   -.38495E-04
   3  Normalizat    .93123        .45032E-02    .45293E-05    .21266E-02
   4  Prefactor     1.0240        .56610E-02    .60368E-05    .11542E-02
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   43524.78     FROM MIGRAD    STATUS=CONVERGED     51 CALLS      446 TOTAL
                     EDM=   .15E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    117.07        .47518E-03** at limit **
   2  Index         3.0704        8.2105        .50000        .37180E-06
   3  Normalizat    .93124        .10038E-01    .46551E-04    .19577E-03
   4  Prefactor     1.0240        .12618E-01    .11164E-04   -.22973E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 3.07039
  Normalizat = 0.931236
  Prefactor  = 1.02401
 **********
 **   18 **HESSE 
 **********

 FCN=   43524.78     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      475 TOTAL
                     EDM=   .56E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    437.79        .95036E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         3.0704        6.2866        .50000       -.39621    
   3  Normalizat    .93124        .24794E-01    .93102E-05   -.95371    
   4  Prefactor     1.0240        .30998E-01    .22329E-05   -.91933    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 5.63047e-09
Minuit parameter uncertainties:
  1  7.42767e-05
  2  766.795
  3  0.0247944
  4  0.0309982
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/960956': 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) = 43524.783899
delta logL = 6.11081486568e-06

Extracting fit parameters...

4FGL J0958.4+5042
   Spectrum: PowerLaw
369    Prefactor:  1.000e-04  7.428e-05  1.000e-04  1.000e+04 ( 1.000e-12)
370        Index:  3.070e+00  7.668e+02  0.000e+00  1.000e+01 (-1.000e+00)
371        Scale:  5.744e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
734    Prefactor:  1.024e+00  3.100e-02  0.000e+00  1.000e+01 ( 1.000e+00)
735        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
736        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
733   Normalization:  9.312e-01  2.479e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 149.606 50.700

Creating a high resolution counts map...
INFO: Auto-setting vmin to -1.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  1.110e+00 [aplpy.core]
Saving /scratch/kocevski/960956/cmap_HighResolution_408067201_410659201_4FGL_J0958.4+5042_monthly_bin66.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.59e-03', job_status='DONE', photon_flux_upper_limit='2.03e-08', time_completed='2021-10-21 11:24:55.180437', job_id='960956', GAL2='1.02', fit_tolerance='1e-08', EG2='0.93', EG='0.93', time_epoch_completed='1634840695.18', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.02', dlogl='6.11e-06', ts2='-0.00', photon_index_error='0.00', photon_index='2.66' WHERE bin_id='66' AND source_name='4FGL J0958.4+5042' AND cadence='monthly';

Database successfully updated.


Analysis Complete.


Thu Oct 21 11:24:55 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0304>
Subject: Job 960956: <4FGL_J0958.4+5042_monthly_bin66> in cluster <slac> Done

Job <4FGL_J0958.4+5042_monthly_bin66> was submitted from host <rhel6-64c> by user <kocevski> in cluster <slac> at Thu Oct 21 08:15:14 2021
Job was executed on host(s) <bullet0304>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Oct 21 08:47:14 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Thu Oct 21 08:47:14 2021
Terminated at Thu Oct 21 11:24:55 2021
Results reported at Thu Oct 21 11:24:55 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J0958.4+5042_monthly_bin66 149.606 50.7 408067201 410659201 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J0958.4+5042 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   8381.00 sec.
    Max Memory :                                 1261 MB
    Average Memory :                             345.15 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   9461 sec.
    Turnaround time :                            11381 sec.

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

