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


Performing analysis on: 4FGL_J0128.5+4440_monthly_bin146
RA = 22.1438, Dec = 44.6777
tmin = 615427201, tmax = 618019201
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='582885', job_status='RUN', time_executed='2021-10-09 12:46:49.048835', time_epoch_executed='1633808809.05' WHERE source_name='4FGL J0128.5+4440' and cadence='monthly' and bin_id='146'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/582885

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

Retrieving the FT1 file...

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

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

Retrieving 457 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/582885/ft1_4FGL_J0128.5+4440_monthly_bin146.fits


Retrieving the FT1 file...

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

Retrieving 457 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/582885/ft2_4FGL_J0128.5+4440_monthly_bin146.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/582885/ft1_4FGL_J0128.5+4440_monthly_bin146.fits outfile=/scratch/kocevski/582885/ft1_filteredMKT_4FGL_J0128.5+4440_monthly_bin146.fits ra=22.1438 dec=44.6777 rad=12.0 tmin=615427201.0 tmax=618019201.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 27.54
user 26.82
sys 0.65

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/582885/ft2_4FGL_J0128.5+4440_monthly_bin146.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/582885/ft2_4FGL_J0128.5+4440_monthly_bin146.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/582885/ft1_filteredMKT_4FGL_J0128.5+4440_monthly_bin146.fits evtable="EVENTS" outfile="/scratch/kocevski/582885/ft1_filtered_4FGL_J0128.5+4440_monthly_bin146.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.86
user 0.66
sys 0.17

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/582885/ft1_filtered_4FGL_J0128.5+4440_monthly_bin146.fits" evtable="EVENTS" scfile=/scratch/kocevski/582885/ft2_4FGL_J0128.5+4440_monthly_bin146.fits sctable="SC_DATA" outfile=/scratch/kocevski/582885/ltcube_615427201_618019201_4FGL_J0128.5+4440_monthly_bin146.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/582885/ft2_4FGL_J0128.5+4440_monthly_bin146.fits
.....................!
real 110.79
user 110.20
sys 0.39

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/582885/ft1_filtered_4FGL_J0128.5+4440_monthly_bin146.fits evtable="EVENTS" scfile=/scratch/kocevski/582885/ft2_4FGL_J0128.5+4440_monthly_bin146.fits sctable="SC_DATA" expcube=/scratch/kocevski/582885/ltcube_615427201_618019201_4FGL_J0128.5+4440_monthly_bin146.fits outfile=/scratch/kocevski/582885/expmap_615427201_618019201_4FGL_J0128.5+4440_monthly_bin146.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/582885/ltcube_615427201_618019201_4FGL_J0128.5+4440_monthly_bin146.fits
.....................!
real 191.60
user 185.86
sys 5.38

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 HB 3 in ROI with RadialDisk spatial model.
Extended source W 3 in ROI, make sure /nfs/farm/g/glast/g/LCRepository/Likelihood/ExtendedSources/Extended_archive_v18/Templates/W3.fits is the correct path to the extended template.
Added 171 point sources and 2 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 J0128.5+4440 @ 22.1438 44.6777

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/582885/ft1_filtered_4FGL_J0128.5+4440_monthly_bin146.fits scfile=/scratch/kocevski/582885/ft2_4FGL_J0128.5+4440_monthly_bin146.fits outfile=/scratch/kocevski/582885/cmap_615427201_618019201_4FGL_J0128.5+4440_monthly_bin146.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=22.1438 yref=44.6777 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.79
user 0.63
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/582885/ft1_filtered_4FGL_J0128.5+4440_monthly_bin146.fits scfile=/scratch/kocevski/582885/ft2_4FGL_J0128.5+4440_monthly_bin146.fits outfile=/scratch/kocevski/582885/cmap_HighResolution_615427201_618019201_4FGL_J0128.5+4440_monthly_bin146.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=22.1438 yref=44.6777 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.80
user 0.63
sys 0.16

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/582885/ft1_filtered_4FGL_J0128.5+4440_monthly_bin146.fits evtable="EVENTS" scfile=/scratch/kocevski/582885/ft2_4FGL_J0128.5+4440_monthly_bin146.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/582885/Model_4FGL_J0128.5+4440_monthly_bin146.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
adding source HB 3
adding source W 3
Working on...
/scratch/kocevski/582885/ft1_filtered_4FGL_J0128.5+4440_monthly_bin146.fits.....................!
real 1576.41
user 1572.30
sys 1.49

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/582885/ft1_filtered_4FGL_J0128.5+4440_monthly_bin146.fits', '/scratch/kocevski/582885/ft2_4FGL_J0128.5+4440_monthly_bin146.fits', expMap='/scratch/kocevski/582885/expmap_615427201_618019201_4FGL_J0128.5+4440_monthly_bin146.fits', expCube='/scratch/kocevski/582885/ltcube_615427201_618019201_4FGL_J0128.5+4440_monthly_bin146.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/582885/Model_4FGL_J0128.5+4440_monthly_bin146.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J0128.5+4440'

4FGL J0128.5+4440
   Spectrum: PowerLaw
246    Prefactor:  2.926e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-14)
247        Index:  2.132e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
248        Scale:  2.341e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/582885/ft1_filtered_4FGL_J0128.5+4440_monthly_bin146.fits
Spacecraft file(s): /scratch/kocevski/582885/ft2_4FGL_J0128.5+4440_monthly_bin146.fits
Exposure map: /scratch/kocevski/582885/expmap_615427201_618019201_4FGL_J0128.5+4440_monthly_bin146.fits
Exposure cube: /scratch/kocevski/582885/ltcube_615427201_618019201_4FGL_J0128.5+4440_monthly_bin146.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/582885/Model_4FGL_J0128.5+4440_monthly_bin146.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) = 165716.406225

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    2.3561       1.0000         .10000E-03   10000.    
     2 'Prefactor '    3.6358       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    4.4299       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10065E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    3.4484       1.0000         .10000E-03   10000.    
     7 'norm      '    8.1495       1.0000         .10000E-03   10000.    
     8 'Prefactor '    4.5547       1.0000         .10000E-03   10000.    
     9 'Prefactor '    6.8168       1.0000         .10000E-03   10000.    
    10 'norm      '    .71615       1.0000         .10000E-03   10000.    
    11 'Prefactor '    2.7195       1.0000         .10000E-03   10000.    
    12 'Prefactor '    5.9130       1.0000         .10000E-03   10000.    
    13 'norm      '    1.0689       1.0000         .10000E-03   10000.    
    14 'norm      '    .89444       1.0000         .10000E-03   10000.    
    15 'Prefactor '    2.5808       1.0000         .10000E-03   10000.    
    16 'Prefactor '    3.5005       1.0000         .10000E-03   10000.    
    17 'Prefactor '    1.3154       1.0000         .10000E-03   10000.    
    18 'Prefactor '    20.356       1.0000         .10000E-03   10000.    
    19 'norm      '    .42805       1.0000         .10000E-03   10000.    
    20 'Normalizat'    .99668       1.0000         .10000E-01   10.000    
    21 'Prefactor '    1.0531       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5820E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
 MACHINE ACCURACY LIMITS FURTHER IMPROVEMENT.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   165716.3     FROM MIGRAD    STATUS=CONVERGED    428 CALLS     2258 TOTAL
                     EDM=   .16E-05    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     2.3562        .66381         .0000        .63421E-02
   2  Prefactor     3.6358        3.1935         .0000        .31613E-01
   3  Prefactor     .10000E-03    3.8566         .0000    ** at limit **
   4  Prefactor     4.4299        4.1148         .0000       -.20801E-03
   5  Prefactor     .10000E-03    .15506         .0000    ** at limit **
   6  Prefactor     3.4484        2.1456         .0000        .95475E-01
   7  norm          8.1495        5.6755         .0000        .39291E-03
   8  Prefactor     4.5550        3.3942         .0000        .33247E-02
   9  Prefactor     6.8170        12.297         .0000       -.51210E-03
  10  norm          .71616        .44706         .0000        .82879E-02
  11  Prefactor     2.7197        6.3110         .0000        .12107E-02
  12  Prefactor     5.9129        6.9304         .0000        .18654E-02
  13  norm          1.0689        .24194         .0000       -.67932E-04
  14  norm          .89446        .18897         .0000        .14659E-01
  15  Prefactor     2.5808        3.1454         .0000        .53137E-01
  16  Prefactor     3.5005        2.5243         .0000        .52615E-01
  17  Prefactor     1.3155        .64225         .0000        .14909E-01
  18  Prefactor     20.356        11.275         .0000        .19892E-02
  19  norm          .42806        .67095E-01     .0000        .14836E-01
  20  Normalizat    .99667        .50052E-01     .0000        .98668E-03
  21  Prefactor     1.0531        .18879E-01     .0000        .34963E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 2.35617
  Prefactor  = 3.6358
  Prefactor  = 0.0001
  Prefactor  = 4.42991
  Prefactor  = 0.0001
  Prefactor  = 3.44837
  norm       = 8.14945
  Prefactor  = 4.55496
  Prefactor  = 6.81703
  norm       = 0.716157
  Prefactor  = 2.71974
  Prefactor  = 5.91287
  norm       = 1.0689
  norm       = 0.894462
  Prefactor  = 2.5808
  Prefactor  = 3.50048
  Prefactor  = 1.31546
  Prefactor  = 20.3558
  norm       = 0.428061
  Normalizat = 0.996673
  Prefactor  = 1.05309
 **********
 **   18 **HESSE 
 **********

 FCN=   165716.3     FROM HESSE     STATUS=OK           337 CALLS     2595 TOTAL
                     EDM=   .24E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     2.3562        .66040        .16813E-03   -1.5401    
   2  Prefactor     3.6358        3.1818        .10594E-02   -1.5327    
   3  Prefactor     .10000E-03    3.9450        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     4.4299        4.1159        .19133E-03   -1.5287    
   5  Prefactor     .10000E-03    1.4272        .30860E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     3.4484        2.1345        .10890E-02   -1.5337    
   7  norm          8.1495        5.6790        .14044E-03   -1.5137    
   8  Prefactor     4.5550        3.3866        .18862E-03   -1.5281    
   9  Prefactor     6.8170        12.254        .15367E-03   -1.5186    
  10  norm          .71616        .45006        .20753E-03   -1.5539    
  11  Prefactor     2.7197        6.2199        .24696E-03   -1.5378    
  12  Prefactor     5.9129        6.9226        .16514E-03   -1.5222    
  13  norm          1.0689        .24376        .92754E-04   -1.5501    
  14  norm          .89446        .18056        .75180E-03   -1.5519    
  15  Prefactor     2.5808        3.1489        .12702E-02   -1.5387    
  16  Prefactor     3.5005        2.5099        .10805E-02   -1.5334    
  17  Prefactor     1.3155        .63215        .21314E-03   -1.5479    
  18  Prefactor     20.356        11.261        .88775E-04   -1.4805    
  19  norm          .42806        .67024E-01    .40443E-04   -1.5577    
  20  Normalizat    .99667        .54459E-01    .40120E-03   -.93142    
  21  Prefactor     1.0531        .20854E-01    .15733E-03   -.90980    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.39437e-08
Minuit parameter uncertainties:
  1  0.660403
  2  3.18197
  3  2.37835e-06
  4  4.11618
  5  3.06234e-06
  6  2.13455
  7  5.67936
  8  3.38671
  9  12.2588
  10  0.45006
  11  6.22137
  12  6.92351
  13  0.243763
  14  0.180561
  15  3.1491
  16  2.50994
  17  0.632151
  18  11.2624
  19  0.0670244
  20  0.0544619
  21  0.0208542
Done.

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

Extracting fit parameters...

4FGL J0128.5+4440
   Spectrum: PowerLaw
246    Prefactor:  5.913e+00  6.924e+00  1.000e-04  1.000e+04 ( 1.000e-14)
247        Index:  2.132e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
248        Scale:  2.341e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
571    Prefactor:  1.053e+00  2.085e-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:  9.967e-01  5.446e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.93
Ra Dec: 22.144 44.678
Photon Flux Upper Limit: 1.54e-08 ph cm-2 s-1
Energy Flux Upper Limit: 1.17e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/582885/likelihoodResults_615427201_618019201_4FGL_J0128.5+4440_monthly_bin146.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): 0
logL (Free Index) = 165715.96563
delta logL = 0.358085849701

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 165715.939771
delta logL = 0.383945402195

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    2.2083       1.0000         .10000E-03   10000.    
     2 'Index     '    3.0004       1.0000          .0000       10.000    
     3 'Normalizat'    .98481       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0553       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5820E+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=   165715.9     FROM MIGRAD    STATUS=CONVERGED     92 CALLS      299 TOTAL
                     EDM=   .67E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     2.2082        65.665        .27682E-03   -.69654E-03
   2  Index         3.0004        6.4798        .86860E-02   -.19266E-03
   3  Normalizat    .98483        .51722E-01    .40339E-03   -.65294E-03
   4  Prefactor     1.0553        .17505E-01    .15718E-03   -.10277E-02
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 2.20822
  Index      = 3.0004
  Normalizat = 0.984825
  Prefactor  = 1.05533
 **********
 **   18 **HESSE 
 **********

 FCN=   165715.9     FROM HESSE     STATUS=OK            25 CALLS      324 TOTAL
                     EDM=   .42E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     2.2082        6.8554        .11073E-04   -1.5411    
   2  Index         3.0004        1.3317        .34744E-03   -.41143    
   3  Normalizat    .98483        .53078E-01    .16136E-04   -.93541    
   4  Prefactor     1.0553        .20671E-01    .62872E-05   -.90907    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.17889e-09
Minuit parameter uncertainties:
  1  6.85784
  2  1.35122
  3  0.0530807
  4  0.0206714
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/582885': 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): 0
logL (Free Index) = 165715.939771
delta logL = 0.383945448673

Extracting fit parameters...

4FGL J0128.5+4440
   Spectrum: PowerLaw
246    Prefactor:  2.208e+00  6.858e+00  1.000e-04  1.000e+04 ( 1.000e-14)
247        Index:  3.000e+00  1.351e+00  0.000e+00  1.000e+01 (-1.000e+00)
248        Scale:  2.341e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
571    Prefactor:  1.055e+00  2.067e-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:  9.848e-01  5.308e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.77
Ra Dec: 22.144 44.678
Photon Index (Free Index): 3.00 +/- 1.35
Photon Flux (Free Index): 1.42e-08 +/- 1.41e-08
Energy Flux (Free Index): 2.83e-06 +/- 2.29e-06

Creating a high resolution counts map...
INFO: Auto-setting vmin to -2.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  2.220e+00 [aplpy.core]
Saving /scratch/kocevski/582885/cmap_HighResolution_615427201_618019201_4FGL_J0128.5+4440_monthly_bin146.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.17e-03', comment='SUCCESS', energy_flux2='2.83e-06', dlogl='3.84e-01', photon_flux2='1.42e-08', job_status='DONE', time_completed='2021-10-09 15:32:48.468587', photon_index_error2='1.35', photon_index2='3.00', ts='0.93', fit_tolerance='1e-08', GAL='1.05', photon_index_error='0.00', photon_flux_upper_limit='1.54e-08', energy_flux_error2='2.29e-06', EG='1.00', time_epoch_completed='1633818768.47', return_code='0', job_id='582885', GAL2='1.06', EG2='0.98', return_code2='0', photon_flux_error2='1.41e-08', ts2='1.77', photon_index='2.13' WHERE bin_id='146' AND source_name='4FGL J0128.5+4440' AND cadence='monthly';

Database successfully updated.


Analysis Complete.


Sat Oct  9 15:32:48 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0250>
Subject: Job 582885: <4FGL_J0128.5+4440_monthly_bin146> in cluster <slac> Done

Job <4FGL_J0128.5+4440_monthly_bin146> was submitted from host <rhel6-64l> by user <kocevski> in cluster <slac> at Sat Oct  9 12:45:23 2021
Job was executed on host(s) <bullet0250>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Oct  9 12:45:24 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Sat Oct  9 12:45:24 2021
Terminated at Sat Oct  9 15:32:49 2021
Results reported at Sat Oct  9 15:32:49 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J0128.5+4440_monthly_bin146 22.1438 44.6777 615427201 618019201 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J0128.5+4440 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   9635.00 sec.
    Max Memory :                                 645 MB
    Average Memory :                             510.81 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              7
    Max Threads :                                21
    Run time :                                   10045 sec.
    Turnaround time :                            10046 sec.

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

