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


Performing analysis on: 4FGL_J1304.0+3704_daily_bin830
RA = 196.008, Dec = 37.071
tmin = 454464001, tmax = 454723201
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='190897', job_status='RUN', time_executed='2021-09-06 19:51:20.158796', time_epoch_executed='1630983080.16' WHERE source_name='4FGL J1304.0+3704' and cadence='daily' and bin_id='830'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/190897

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/190897/ft1_4FGL_J1304.0+3704_daily_bin830.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/190897/ft2_4FGL_J1304.0+3704_daily_bin830.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/190897/ft1_4FGL_J1304.0+3704_daily_bin830.fits outfile=/scratch/kocevski/190897/ft1_filteredMKT_4FGL_J1304.0+3704_daily_bin830.fits ra=196.008 dec=37.071 rad=12.0 tmin=454464001.0 tmax=454723201.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 3.57
user 3.34
sys 0.20

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/190897/ft2_4FGL_J1304.0+3704_daily_bin830.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/190897/ft2_4FGL_J1304.0+3704_daily_bin830.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/190897/ft1_filteredMKT_4FGL_J1304.0+3704_daily_bin830.fits evtable="EVENTS" outfile="/scratch/kocevski/190897/ft1_filtered_4FGL_J1304.0+3704_daily_bin830.fits" apply_filter=yes overwrite=yes header_obstimes=yes tstart=0.0 tstop=0.0 gtifile="default" chatter=3 clobber=yes debug=no gui=no mode="ql"

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

This is gtmktime version HEAD
Applying GTI filter:
IN_SAA!=T && LIVETIME>0 && gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nogrb.gti',(START+STOP)/2) && (angsep(RA_SUN,DEC_SUN,RA_ZENITH,DEC_ZENITH)>115 || gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nosolarflares.gti',(START+STOP)/2))
real 0.51
user 0.35
sys 0.14

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/190897/ft1_filtered_4FGL_J1304.0+3704_daily_bin830.fits" evtable="EVENTS" scfile=/scratch/kocevski/190897/ft2_4FGL_J1304.0+3704_daily_bin830.fits sctable="SC_DATA" outfile=/scratch/kocevski/190897/ltcube_454464001_454723201_4FGL_J1304.0+3704_daily_bin830.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/190897/ft2_4FGL_J1304.0+3704_daily_bin830.fits
.....................!
real 13.94
user 13.54
sys 0.33

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/190897/ft1_filtered_4FGL_J1304.0+3704_daily_bin830.fits evtable="EVENTS" scfile=/scratch/kocevski/190897/ft2_4FGL_J1304.0+3704_daily_bin830.fits sctable="SC_DATA" expcube=/scratch/kocevski/190897/ltcube_454464001_454723201_4FGL_J1304.0+3704_daily_bin830.fits outfile=/scratch/kocevski/190897/expmap_454464001_454723201_4FGL_J1304.0+3704_daily_bin830.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/190897/ltcube_454464001_454723201_4FGL_J1304.0+3704_daily_bin830.fits
.....................!
real 190.54
user 185.50
sys 4.20

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

Setting source of interest to:
4FGL J1304.0+3704 @ 196.008 37.071

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/190897/ft1_filtered_4FGL_J1304.0+3704_daily_bin830.fits scfile=/scratch/kocevski/190897/ft2_4FGL_J1304.0+3704_daily_bin830.fits outfile=/scratch/kocevski/190897/cmap_454464001_454723201_4FGL_J1304.0+3704_daily_bin830.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=196.008 yref=37.071 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.63
user 0.38
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/190897/ft1_filtered_4FGL_J1304.0+3704_daily_bin830.fits scfile=/scratch/kocevski/190897/ft2_4FGL_J1304.0+3704_daily_bin830.fits outfile=/scratch/kocevski/190897/cmap_HighResolution_454464001_454723201_4FGL_J1304.0+3704_daily_bin830.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=196.008 yref=37.071 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.56
user 0.40
sys 0.14

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/190897/ft1_filtered_4FGL_J1304.0+3704_daily_bin830.fits evtable="EVENTS" scfile=/scratch/kocevski/190897/ft2_4FGL_J1304.0+3704_daily_bin830.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/190897/Model_4FGL_J1304.0+3704_daily_bin830.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/190897/ft1_filtered_4FGL_J1304.0+3704_daily_bin830.fits.....................!
real 48.99
user 47.51
sys 1.25

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/190897/ft1_filtered_4FGL_J1304.0+3704_daily_bin830.fits', '/scratch/kocevski/190897/ft2_4FGL_J1304.0+3704_daily_bin830.fits', expMap='/scratch/kocevski/190897/expmap_454464001_454723201_4FGL_J1304.0+3704_daily_bin830.fits', expCube='/scratch/kocevski/190897/ltcube_454464001_454723201_4FGL_J1304.0+3704_daily_bin830.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/190897/Model_4FGL_J1304.0+3704_daily_bin830.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1304.0+3704'

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  2.111e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-13)
314        Index:  2.436e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
315        Scale:  1.032e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/190897/ft1_filtered_4FGL_J1304.0+3704_daily_bin830.fits
Spacecraft file(s): /scratch/kocevski/190897/ft2_4FGL_J1304.0+3704_daily_bin830.fits
Exposure map: /scratch/kocevski/190897/expmap_454464001_454723201_4FGL_J1304.0+3704_daily_bin830.fits
Exposure cube: /scratch/kocevski/190897/ltcube_454464001_454723201_4FGL_J1304.0+3704_daily_bin830.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/190897/Model_4FGL_J1304.0+3704_daily_bin830.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) = 5798.10094597

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10006E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    3.3292       1.0000         .10000E-03   10000.    
     4 'Prefactor '    4.5590       1.0000         .10000E-03   10000.    
     5 'Prefactor '    6.5873       1.0000         .10000E-03   10000.    
     6 'Prefactor '    1.3352       1.0000         .10000E-03   10000.    
     7 'Prefactor '    108.77       1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10019E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    .10018E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10025E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    14 'norm      '    8.8979       1.0000         .10000E-03   10000.    
    15 'norm      '    3.5376       1.0000         .10000E-03   10000.    
    16 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    5.6765       1.0000         .10000E-03   10000.    
    19 'Prefactor '    .45408       1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    28.704       1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10007E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    12.037       1.0000         .10000E-03   10000.    
    25 'Prefactor '    66.065       1.0000         .10000E-03   10000.    
    26 'norm      '    4.2360       1.0000         .10000E-03   10000.    
    27 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    28 'norm      '    4.5472       1.0000         .10000E-03   10000.    
    29 'Normalizat'    1.1429       1.0000         .10000E-01   10.000    
    30 'Prefactor '    .96649       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5990E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   5798.091     FROM MIGRAD    STATUS=CONVERGED    764 CALLS     3892 TOTAL
                     EDM=   .12E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  6.4%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .10000E-03    2.2819       -.66281E-07** at limit **
   2  Prefactor     .10000E-03    5.8871       -.12242E-06** at limit **
   3  Prefactor     3.3291        2.4477       -.23534E-07    .11062E-04
   4  Prefactor     4.5585        7.8550        .10281E-05    .16992E-04
   5  Prefactor     6.6491        61.553       -.14025E-04   -.67192E-05
   6  Prefactor     1.3180        75.096        .19825E-04    .21304E-06
   7  Prefactor     108.74        86.272        .27486E-05    .34440E-05
   8  Prefactor     .10000E-03    4.0206        .14732E-06** at limit **
   9  norm          .10000E-03    1.7095       -.20430E-06** at limit **
  10  Prefactor     .10000E-03    14.355       -.22364E-05** at limit **
  11  Prefactor     .10000E-03    7.5624       -.36176E-06** at limit **
  12  Prefactor     .10000E-03    23.192        .11576E-05** at limit **
  13  norm          .10000E-03    2.7139       -.73060E-07** at limit **
  14  norm          8.8963        11.778        .70199E-07    .91993E-05
  15  norm          3.5390        3.1527        .21974E-06   -.49444E-04
  16  norm          .10000E-03    3.2669        .27047E-07** at limit **
  17  norm          .10000E-03    3.5182        .35589E-06** at limit **
  18  Prefactor     5.6871        4.6004        .60786E-08   -.11932E-03
  19  Prefactor     .32478        10.887        .78112E-06   -.18684E-03
  20  Prefactor     .10000E-03    21.876        .83897E-06** at limit **
  21  Prefactor     .10000E-03    32.453       -.17612E-05** at limit **
  22  Prefactor     28.714        22.150       -.56082E-06   -.43518E-05
  23  Prefactor     .10000E-03    12.109        .14971E-05** at limit **
  24  Prefactor     12.035        23.518        .54509E-06    .22682E-05
  25  Prefactor     66.081        76.159       -.13450E-05    .41841E-05
  26  norm          4.2361        1.8585        .24040E-07    .25693E-04
  27  Prefactor     .10000E-03    2.0155       -.33100E-07** at limit **
  28  norm          4.5459        16.448        .25213E-06    .35832E-05
  29  Normalizat    1.1424        .18425       -.12531E-06   -.68096E-04
  30  Prefactor     .96710        .22017        .28614E-06    .26634E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 3.32911
  Prefactor  = 4.55851
  Prefactor  = 6.64907
  Prefactor  = 1.31802
  Prefactor  = 108.743
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 8.89631
  norm       = 3.539
  norm       = 0.0001
  norm       = 0.0001
  Prefactor  = 5.68705
  Prefactor  = 0.324779
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 28.7138
  Prefactor  = 0.0001
  Prefactor  = 12.035
  Prefactor  = 66.0809
  norm       = 4.23608
  Prefactor  = 0.0001
  norm       = 4.54585
  Normalizat = 1.14244
  Prefactor  = 0.967105
 **********
 **   18 **HESSE 
 **********

 FCN=   5798.091     FROM HESSE     STATUS=OK           588 CALLS     4480 TOTAL
                     EDM=   .15E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .10000E-03    2.3004        .11201E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    5.9407        .18039E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     3.3291        2.4377        .98873E-04   -1.5343    
   4  Prefactor     4.5585        7.8547        .94267E-03   -1.5281    
   5  Prefactor     6.6491        61.763        .15636E-03   -1.5192    
   6  Prefactor     1.3180        76.041        .18986E-02   -1.5478    
   7  Prefactor     108.74        86.376        .19282E-03   -1.3619    
   8  Prefactor     .10000E-03    4.0598        .14918E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          .10000E-03    1.7182        .97197E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    14.344        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    7.5700        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    23.409        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .10000E-03    2.7288        .12244E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          8.8963        11.780        .13437E-03   -1.5111    
  15  norm          3.5390        3.1353        .60197E-03   -1.5332    
  16  norm          .10000E-03    3.2736        .13402E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .10000E-03    3.5895        .13951E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     5.6871        4.6101        .12506E-03   -1.5231    
  19  Prefactor     .32478        142.62        .42934E-02   -1.5594    
  20  Prefactor     .10000E-03    21.924        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .10000E-03    32.478        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     28.714        22.103        .74779E-04   -1.4636    
  23  Prefactor     .10000E-03    12.112        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     12.035        23.491        .11546E-03   -1.5014    
  25  Prefactor     66.081        76.450        .49377E-04   -1.4080    
  26  norm          4.2361        1.8588        .66147E-04   -1.5296    
  27  Prefactor     .10000E-03    2.0259        .10556E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  norm          4.5459        16.436        .18878E-03   -1.5282    
  29  Normalizat    1.1424        .22451        .23129E-03   -.88400    
  30  Prefactor     .96710        .26829        .30488E-03   -.93834    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.47665e-09
Minuit parameter uncertainties:
  1  3.8415e-06
  2  1.98746e-05
  3  2.43775
  4  7.85645
  5  40.585
  6  20.0483
  7  86.4761
  8  1.89301e-05
  9  1.18678e-05
  10  9.05512e-06
  11  1.37796e-05
  12  0.000117366
  13  8.11865e-06
  14  11.7828
  15  3.13541
  16  2.20215e-06
  17  2.1414e-05
  18  4.6104
  19  13.6423
  20  4.06826e-06
  21  1.24484e-05
  22  22.1097
  23  1.3742e-06
  24  23.5088
  25  76.5644
  26  1.85881
  27  1.64894e-06
  28  16.4521
  29  0.224694
  30  0.268661
Done.

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

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  1.000e-04  1.174e-04  1.000e-04  1.000e+04 ( 1.000e-13)
314        Index:  2.436e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
315        Scale:  1.032e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
596    Prefactor:  9.671e-01  2.687e-01  0.000e+00  1.000e+01 ( 1.000e+00)
597        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
598        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
595   Normalization:  1.142e+00  2.247e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 196.008 37.071
Photon Flux Upper Limit: 8.04e-08 ph cm-2 s-1
Energy Flux Upper Limit: 6.23e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/190897/likelihoodResults_454464001_454723201_4FGL_J1304.0+3704_daily_bin830.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) = 5798.09101745
delta logL = -0.000203538959795

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 5798.09081406
delta logL = -1.52142092702e-07

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.7395       1.0000          .0000       10.000    
     3 'Normalizat'    1.1424       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .96711       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5990E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   5798.091     FROM MIGRAD    STATUS=CONVERGED     57 CALLS      255 TOTAL
                     EDM=   .20E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    13.706        .90712E-02** at limit **
   2  Index         2.7203        6.3597        .50000        .73334E-05
   3  Normalizat    1.1424        .35066E-02    .52312E-01    .11390E-03
   4  Prefactor     .96710        .43137E-02    .68922E-01    .74455E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100001
  Index      = 2.72033
  Normalizat = 1.14245
  Prefactor  = 0.967103
 **********
 **   18 **HESSE 
 **********

 FCN=   5798.091     FROM HESSE     STATUS=NOT POSDEF    33 CALLS      288 TOTAL
                     EDM=   .89E-06    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    626.62        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.7203        5.6517        .50000       -.47342    
   3  Normalizat    1.1424        .24364E-01    .23129E-03   -.88400    
   4  Prefactor     .96710        .29945E-01    .30488E-03   -.93834    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 8.93149e-07
Minuit parameter uncertainties:
  1  0.00180788
  2  598.171
  3  0.0243643
  4  0.0299455
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/190897': 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) = 5798.09081403
delta logL = -1.18659045256e-07

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  1.000e-04  1.808e-03  1.000e-04  1.000e+04 ( 1.000e-13)
314        Index:  2.720e+00  5.982e+02  0.000e+00  1.000e+01 (-1.000e+00)
315        Scale:  1.032e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
596    Prefactor:  9.671e-01  2.995e-02  0.000e+00  1.000e+01 ( 1.000e+00)
597        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
598        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
595   Normalization:  1.142e+00  2.436e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 196.008 37.071

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/190897/cmap_HighResolution_454464001_454723201_4FGL_J1304.0+3704_daily_bin830.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='6.23e-03', job_status='DONE', photon_flux_upper_limit='8.04e-08', time_completed='2021-09-06 20:05:13.806652', job_id='190897', GAL2='0.97', fit_tolerance='1e-08', EG2='1.14', EG='1.14', time_epoch_completed='1630983913.81', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.97', dlogl='-1.19e-07', ts2='-0.00', photon_index_error='0.00', photon_index='2.44' WHERE bin_id='830' AND source_name='4FGL J1304.0+3704' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 20:05:13 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0298>
Subject: Job 190897: <4FGL_J1304.0+3704_daily_bin830> in cluster <slac> Done

Job <4FGL_J1304.0+3704_daily_bin830> was submitted from host <rhel6-64j> by user <kocevski> in cluster <slac> at Mon Sep  6 19:50:28 2021
Job was executed on host(s) <bullet0298>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep  6 19:51:03 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Mon Sep  6 19:51:03 2021
Terminated at Mon Sep  6 20:05:14 2021
Results reported at Mon Sep  6 20:05:14 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1304.0+3704_daily_bin830 196.008 37.071 454464001 454723201 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1304.0+3704 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   829.01 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             301.27 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   851 sec.
    Turnaround time :                            886 sec.

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

