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


Performing analysis on: 4FGL_J0156.5+3914_monthly_bin118
RA = 29.1325, Dec = 39.2493
tmin = 542851201, tmax = 545443201
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='697142', job_status='RUN', time_executed='2021-10-09 20:06:57.748908', time_epoch_executed='1633835217.75' WHERE source_name='4FGL J0156.5+3914' and cadence='monthly' and bin_id='118'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/697142

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

Retrieving the FT1 file...

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

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

Retrieving 176 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/697142/ft1_4FGL_J0156.5+3914_monthly_bin118.fits


Retrieving the FT1 file...

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

Retrieving 178 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/697142/ft2_4FGL_J0156.5+3914_monthly_bin118.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/697142/ft1_4FGL_J0156.5+3914_monthly_bin118.fits outfile=/scratch/kocevski/697142/ft1_filteredMKT_4FGL_J0156.5+3914_monthly_bin118.fits ra=29.1325 dec=39.2493 rad=12.0 tmin=542851201.0 tmax=545443201.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 18.33
user 17.85
sys 0.44

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/697142/ft2_4FGL_J0156.5+3914_monthly_bin118.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/697142/ft2_4FGL_J0156.5+3914_monthly_bin118.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/697142/ft1_filteredMKT_4FGL_J0156.5+3914_monthly_bin118.fits evtable="EVENTS" outfile="/scratch/kocevski/697142/ft1_filtered_4FGL_J0156.5+3914_monthly_bin118.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.58
user 0.43
sys 0.15

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/697142/ft1_filtered_4FGL_J0156.5+3914_monthly_bin118.fits" evtable="EVENTS" scfile=/scratch/kocevski/697142/ft2_4FGL_J0156.5+3914_monthly_bin118.fits sctable="SC_DATA" outfile=/scratch/kocevski/697142/ltcube_542851201_545443201_4FGL_J0156.5+3914_monthly_bin118.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/697142/ft2_4FGL_J0156.5+3914_monthly_bin118.fits
.....................!
real 39.86
user 39.41
sys 0.35

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/697142/ft1_filtered_4FGL_J0156.5+3914_monthly_bin118.fits evtable="EVENTS" scfile=/scratch/kocevski/697142/ft2_4FGL_J0156.5+3914_monthly_bin118.fits sctable="SC_DATA" expcube=/scratch/kocevski/697142/ltcube_542851201_545443201_4FGL_J0156.5+3914_monthly_bin118.fits outfile=/scratch/kocevski/697142/expmap_542851201_545443201_4FGL_J0156.5+3914_monthly_bin118.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/697142/ltcube_542851201_545443201_4FGL_J0156.5+3914_monthly_bin118.fits
.....................!
real 192.97
user 187.42
sys 5.19

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

Setting source of interest to:
4FGL J0156.5+3914 @ 29.1325 39.2493

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/697142/ft1_filtered_4FGL_J0156.5+3914_monthly_bin118.fits scfile=/scratch/kocevski/697142/ft2_4FGL_J0156.5+3914_monthly_bin118.fits outfile=/scratch/kocevski/697142/cmap_542851201_545443201_4FGL_J0156.5+3914_monthly_bin118.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=29.1325 yref=39.2493 axisrot=0.0 rafield="RA" decfield="DEC" proj="AIT" hpx_ordering_scheme="RING" hpx_order=3 hpx_ebin=yes hpx_region="" evtable="EVENTS" sctable="SC_DATA" efield="ENERGY" tfield="TIME" chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

This is gtbin version HEAD
real 0.60
user 0.43
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/697142/ft1_filtered_4FGL_J0156.5+3914_monthly_bin118.fits scfile=/scratch/kocevski/697142/ft2_4FGL_J0156.5+3914_monthly_bin118.fits outfile=/scratch/kocevski/697142/cmap_HighResolution_542851201_545443201_4FGL_J0156.5+3914_monthly_bin118.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=29.1325 yref=39.2493 axisrot=0.0 rafield="RA" decfield="DEC" proj="AIT" hpx_ordering_scheme="RING" hpx_order=3 hpx_ebin=yes hpx_region="" evtable="EVENTS" sctable="SC_DATA" efield="ENERGY" tfield="TIME" chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

This is gtbin version HEAD
real 0.61
user 0.43
sys 0.16

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/697142/ft1_filtered_4FGL_J0156.5+3914_monthly_bin118.fits evtable="EVENTS" scfile=/scratch/kocevski/697142/ft2_4FGL_J0156.5+3914_monthly_bin118.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/697142/Model_4FGL_J0156.5+3914_monthly_bin118.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/697142/ft1_filtered_4FGL_J0156.5+3914_monthly_bin118.fits.........................!
real 24.76
user 23.42
sys 1.23

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/697142/ft1_filtered_4FGL_J0156.5+3914_monthly_bin118.fits', '/scratch/kocevski/697142/ft2_4FGL_J0156.5+3914_monthly_bin118.fits', expMap='/scratch/kocevski/697142/expmap_542851201_545443201_4FGL_J0156.5+3914_monthly_bin118.fits', expCube='/scratch/kocevski/697142/ltcube_542851201_545443201_4FGL_J0156.5+3914_monthly_bin118.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/697142/Model_4FGL_J0156.5+3914_monthly_bin118.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J0156.5+3914'

4FGL J0156.5+3914
   Spectrum: PowerLaw
273    Prefactor:  1.010e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-12)
274        Index:  2.447e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
275        Scale:  8.289e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/697142/ft1_filtered_4FGL_J0156.5+3914_monthly_bin118.fits
Spacecraft file(s): /scratch/kocevski/697142/ft2_4FGL_J0156.5+3914_monthly_bin118.fits
Exposure map: /scratch/kocevski/697142/expmap_542851201_545443201_4FGL_J0156.5+3914_monthly_bin118.fits
Exposure cube: /scratch/kocevski/697142/ltcube_542851201_545443201_4FGL_J0156.5+3914_monthly_bin118.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/697142/Model_4FGL_J0156.5+3914_monthly_bin118.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) = 1035.52547948

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    28.966       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10043E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    252.39       1.0000         .10000E-03   10000.    
     4 'norm      '    6.2400       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10008E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    255.89       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .24948E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    75.598       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    .59968E-03   1.0000         .10000E-03   10000.    
    14 'norm      '    .10004E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10145E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    23.637       1.0000         .10000E-03   10000.    
    17 'Prefactor '    .45821E-03   1.0000         .10000E-03   10000.    
    18 'norm      '    .11382E-03   1.0000         .10000E-03   10000.    
    19 'norm      '    .65396       1.0000         .10000E-03   10000.    
    20 'Prefactor '    .27775E-02   1.0000         .10000E-03   10000.    
    21 'norm      '    34.346       1.0000         .10000E-03   10000.    
    22 'Prefactor '    151.68       1.0000         .10000E-03   10000.    
    23 'Normalizat'    .27950       1.0000         .10000E-01   10.000    
    24 'Prefactor '    1.0004       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5740E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   1034.637     FROM MIGRAD    STATUS=CONVERGED    323 CALLS     2384 TOTAL
                     EDM=   .18E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.6%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     2.3957        561.01        .26866E-04   -.28407E-05
   2  Prefactor     .10000E-03    29.637       -.15209E-05** at limit **
   3  Prefactor     457.62        461.73        .13080E-05   -.28248E-05
   4  norm          6.2242        6.3067        .54956E-07   -.34396E-05
   5  Prefactor     .10000E-03    10.150        .91746E-06** at limit **
   6  Prefactor     251.76        167.42        .19914E-06    .27458E-05
   7  Prefactor     .10000E-03    59.715       -.18478E-05** at limit **
   8  norm          .10000E-03    2.7932        .97029E-07** at limit **
   9  norm          .10000E-03    2.5745        .53576E-06** at limit **
  10  Prefactor     73.133        58.412       -.89177E-06    .93681E-05
  11  Prefactor     .10000E-03    4.7354        .14449E-06** at limit **
  12  Prefactor     .10000E-03    28.823       -.13000E-05** at limit **
  13  Prefactor     .10000E-03    107.68       -.50683E-06** at limit **
  14  norm          .10000E-03    23.150       -.51092E-05** at limit **
  15  Prefactor     .10000E-03    16.052       -.15053E-06** at limit **
  16  norm          24.476        15.884       -.49158E-06    .65846E-04
  17  Prefactor     .10000E-03    86.611       -.65601E-05** at limit **
  18  norm          .10000E-03    12.088        .75233E-06** at limit **
  19  norm          .65274        .77321        .54741E-07    .99713E-04
  20  Prefactor     .10000E-03    169.09        .97093E-05** at limit **
  21  norm          35.216        26.756        .44402E-06    .26507E-04
  22  Prefactor     116.49        175.45        .22325E-05    .13677E-04
  23  Normalizat    .30537        .69018        .15428E-04    .97110E-05
  24  Prefactor     .99045        .31336       -.14636E-05    .20072E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 2.39566
  Prefactor  = 0.0001
  Prefactor  = 457.618
  norm       = 6.22419
  Prefactor  = 0.0001
  Prefactor  = 251.76
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 0.0001
  Prefactor  = 73.1329
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 24.4759
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 0.652739
  Prefactor  = 0.0001
  norm       = 35.216
  Prefactor  = 116.494
  Normalizat = 0.305368
  Prefactor  = 0.990445
 **********
 **   18 **HESSE 
 **********

 FCN=   1034.637     FROM HESSE     STATUS=OK           459 CALLS     2843 TOTAL
                     EDM=   .71E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     2.3957        631.20        .18610E-02   -1.5398    
   2  Prefactor     .10000E-03    29.480        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     457.62        479.49        .63756E-03   -1.1396    
   4  norm          6.2242        6.4361        .40175E-02   -1.5209    
   5  Prefactor     .10000E-03    10.173        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     251.76        169.28        .63329E-03   -1.2521    
   7  Prefactor     .10000E-03    59.550        .10733E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .10000E-03    2.7843        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          .10000E-03    2.5037        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     73.133        60.559        .11545E-02   -1.3996    
  11  Prefactor     .10000E-03    4.7223        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    28.927        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .10000E-03    108.47        .10532E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          .10000E-03    22.904        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .10000E-03    16.357        .90712E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          24.476        19.636        .20597E-02   -1.4718    
  17  Prefactor     .10000E-03    87.260        .10600E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  norm          .10000E-03    4.5051        .29686E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  norm          .65274        .78829        .67378E-02   -1.5546    
  20  Prefactor     .10000E-03    68.808        .69401E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  norm          35.216        28.308        .17094E-02   -1.4520    
  22  Prefactor     116.49        189.05        .81820E-03   -1.3545    
  23  Normalizat    .30537        .87288        .13690       -1.2252    
  24  Prefactor     .99045        .37049        .45723E-01   -.93049    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 7.06463e-11
Minuit parameter uncertainties:
  1  78.6231
  2  4.66992e-05
  3  483.8
  4  6.43678
  5  9.69523e-06
  6  169.61
  7  4.10586e-05
  8  1.14941e-06
  9  2.35891e-06
  10  60.6099
  11  3.42304e-06
  12  3.30284e-05
  13  0.000131584
  14  4.37466e-05
  15  3.73308e-06
  16  19.641
  17  0.000250485
  18  5.38508e-05
  19  0.788307
  20  0.000204362
  21  28.319
  22  190.046
  23  0.917126
  24  0.371443
Done.

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

Extracting fit parameters...

4FGL J0156.5+3914
   Spectrum: PowerLaw
273    Prefactor:  1.000e-04  3.423e-06  1.000e-04  1.000e+04 ( 1.000e-12)
274        Index:  2.447e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
275        Scale:  8.289e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
571    Prefactor:  9.904e-01  3.714e-01  0.000e+00  1.000e+01 ( 1.000e+00)
572        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
573        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
570   Normalization:  3.054e-01  9.171e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 29.133 39.249
Photon Flux Upper Limit: 2.89e-07 ph cm-2 s-1
Energy Flux Upper Limit: 2.24e-02 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/697142/likelihoodResults_542851201_545443201_4FGL_J0156.5+3914_monthly_bin118.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) = 1034.63778755
delta logL = -0.00094114275521

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 1034.63684861
delta logL = -2.20232436732e-06

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10049E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.4331       1.0000          .0000       10.000    
     3 'Normalizat'    .30665       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .98991       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5740E+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.

 FCN=   1034.637     FROM MIGRAD    STATUS=CONVERGED     98 CALLS      247 TOTAL
                     EDM=   .67E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    59.336        .68839E-02** at limit **
   2  Index         1.8905        5.5001        .50000        .22291E-06
   3  Normalizat    .30539        .47538E-01    .60497E-03    .55610E-03
   4  Prefactor     .99045        .23492E-01    .16938E-03    .19846E-02
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 1.89046
  Normalizat = 0.305386
  Prefactor  = 0.990455
 **********
 **   18 **HESSE 
 **********

 FCN=   1034.637     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      276 TOTAL
                     EDM=   .55E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    472.94        .74996E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         1.8905        8.5388        .50000       -.67118    
   3  Normalizat    .30539        .14863        .12099E-03   -1.2252    
   4  Prefactor     .99045        .73527E-01    .33876E-04   -.93048    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 5.47362e-09
Minuit parameter uncertainties:
  1  0.000471453
  2  1415.55
  3  0.148823
  4  0.0735348
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/697142': 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) = 1034.63684461
delta logL = 1.79816629498e-06

Extracting fit parameters...

4FGL J0156.5+3914
   Spectrum: PowerLaw
273    Prefactor:  1.000e-04  4.715e-04  1.000e-04  1.000e+04 ( 1.000e-12)
274        Index:  1.890e+00  1.416e+03  0.000e+00  1.000e+01 (-1.000e+00)
275        Scale:  8.289e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
571    Prefactor:  9.905e-01  7.353e-02  0.000e+00  1.000e+01 ( 1.000e+00)
572        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
573        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
570   Normalization:  3.054e-01  1.488e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 29.133 39.249

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/697142/cmap_HighResolution_542851201_545443201_4FGL_J0156.5+3914_monthly_bin118.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='2.24e-02', job_status='DONE', photon_flux_upper_limit='2.89e-07', time_completed='2021-10-09 20:16:04.831989', job_id='697142', GAL2='0.99', fit_tolerance='1e-08', EG2='0.31', EG='0.31', time_epoch_completed='1633835764.83', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.99', dlogl='1.80e-06', ts2='-0.00', photon_index_error='0.00', photon_index='2.45' WHERE bin_id='118' AND source_name='4FGL J0156.5+3914' AND cadence='monthly';

Database successfully updated.


Analysis Complete.


Sat Oct  9 20:16:04 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0203>
Subject: Job 697142: <4FGL_J0156.5+3914_monthly_bin118> in cluster <slac> Done

Job <4FGL_J0156.5+3914_monthly_bin118> was submitted from host <rhel6-64k> by user <kocevski> in cluster <slac> at Sat Oct  9 20:05:12 2021
Job was executed on host(s) <bullet0203>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Oct  9 20:05:14 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Sat Oct  9 20:05:14 2021
Terminated at Sat Oct  9 20:16:09 2021
Results reported at Sat Oct  9 20:16:09 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J0156.5+3914_monthly_bin118 29.1325 39.2493 542851201 545443201 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J0156.5+3914 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   514.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             263.14 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   653 sec.
    Turnaround time :                            657 sec.

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

