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


Performing analysis on: 4FGL_J1304.0+3704_daily_bin816
RA = 196.008, Dec = 37.071
tmin = 450835201, tmax = 451094401
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='190878', job_status='RUN', time_executed='2021-09-06 19:51:12.168101', time_epoch_executed='1630983072.17' WHERE source_name='4FGL J1304.0+3704' and cadence='daily' and bin_id='816'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/190878

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/190878/ft1_4FGL_J1304.0+3704_daily_bin816.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/190878/ft2_4FGL_J1304.0+3704_daily_bin816.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/190878/ft1_4FGL_J1304.0+3704_daily_bin816.fits outfile=/scratch/kocevski/190878/ft1_filteredMKT_4FGL_J1304.0+3704_daily_bin816.fits ra=196.008 dec=37.071 rad=12.0 tmin=450835201.0 tmax=451094401.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.31
sys 0.18

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/190878/ft2_4FGL_J1304.0+3704_daily_bin816.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/190878/ft1_filteredMKT_4FGL_J1304.0+3704_daily_bin816.fits evtable="EVENTS" outfile="/scratch/kocevski/190878/ft1_filtered_4FGL_J1304.0+3704_daily_bin816.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.52
user 0.33
sys 0.18

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/190878/ft1_filtered_4FGL_J1304.0+3704_daily_bin816.fits" evtable="EVENTS" scfile=/scratch/kocevski/190878/ft2_4FGL_J1304.0+3704_daily_bin816.fits sctable="SC_DATA" outfile=/scratch/kocevski/190878/ltcube_450835201_451094401_4FGL_J1304.0+3704_daily_bin816.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/190878/ft2_4FGL_J1304.0+3704_daily_bin816.fits
.....................!
real 16.86
user 16.46
sys 0.32

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/190878/ft1_filtered_4FGL_J1304.0+3704_daily_bin816.fits evtable="EVENTS" scfile=/scratch/kocevski/190878/ft2_4FGL_J1304.0+3704_daily_bin816.fits sctable="SC_DATA" expcube=/scratch/kocevski/190878/ltcube_450835201_451094401_4FGL_J1304.0+3704_daily_bin816.fits outfile=/scratch/kocevski/190878/expmap_450835201_451094401_4FGL_J1304.0+3704_daily_bin816.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/190878/ltcube_450835201_451094401_4FGL_J1304.0+3704_daily_bin816.fits
.....................!
real 193.38
user 187.31
sys 5.23

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/190878/ft1_filtered_4FGL_J1304.0+3704_daily_bin816.fits scfile=/scratch/kocevski/190878/ft2_4FGL_J1304.0+3704_daily_bin816.fits outfile=/scratch/kocevski/190878/cmap_450835201_451094401_4FGL_J1304.0+3704_daily_bin816.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.56
user 0.39
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/190878/ft1_filtered_4FGL_J1304.0+3704_daily_bin816.fits scfile=/scratch/kocevski/190878/ft2_4FGL_J1304.0+3704_daily_bin816.fits outfile=/scratch/kocevski/190878/cmap_HighResolution_450835201_451094401_4FGL_J1304.0+3704_daily_bin816.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.58
user 0.41
sys 0.16

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

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/190878/ft1_filtered_4FGL_J1304.0+3704_daily_bin816.fits', '/scratch/kocevski/190878/ft2_4FGL_J1304.0+3704_daily_bin816.fits', expMap='/scratch/kocevski/190878/expmap_450835201_451094401_4FGL_J1304.0+3704_daily_bin816.fits', expCube='/scratch/kocevski/190878/ltcube_450835201_451094401_4FGL_J1304.0+3704_daily_bin816.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/190878/Model_4FGL_J1304.0+3704_daily_bin816.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/190878/ft1_filtered_4FGL_J1304.0+3704_daily_bin816.fits
Spacecraft file(s): /scratch/kocevski/190878/ft2_4FGL_J1304.0+3704_daily_bin816.fits
Exposure map: /scratch/kocevski/190878/expmap_450835201_451094401_4FGL_J1304.0+3704_daily_bin816.fits
Exposure cube: /scratch/kocevski/190878/ltcube_450835201_451094401_4FGL_J1304.0+3704_daily_bin816.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/190878/Model_4FGL_J1304.0+3704_daily_bin816.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) = 6576.94269664

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    5.4111       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    17.435       1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10007E-03   1.0000         .10000E-03   10000.    
     9 'norm      '    1.9494       1.0000         .10000E-03   10000.    
    10 'Prefactor '    5.2080       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .19830       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10012E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    18.816       1.0000         .10000E-03   10000.    
    14 'norm      '    18.886       1.0000         .10000E-03   10000.    
    15 'norm      '    6.2300       1.0000         .10000E-03   10000.    
    16 'norm      '    .10119E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    .10184E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    2.7172       1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10015E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    35.397       1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10014E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    9.3092       1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10163E-03   1.0000         .10000E-03   10000.    
    25 'Prefactor '    .10834E-03   1.0000         .10000E-03   10000.    
    26 'norm      '    5.0422       1.0000         .10000E-03   10000.    
    27 'Prefactor '    .25747E-03   1.0000         .10000E-03   10000.    
    28 'norm      '    8.3057       1.0000         .10000E-03   10000.    
    29 'Normalizat'    1.3261       1.0000         .10000E-01   10.000    
    30 'Prefactor '    .72730       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=   6576.902     FROM MIGRAD    STATUS=CONVERGED    818 CALLS     4039 TOTAL
                     EDM=   .30E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .2%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          5.4113        3.4002        .31392E-07    .35255E-04
   2  Prefactor     .10000E-03    10.616        .82461E-06** at limit **
   3  Prefactor     .10000E-03    .69061       -.13401E-07** at limit **
   4  Prefactor     .10000E-03    3.9467       -.86194E-07** at limit **
   5  Prefactor     .10000E-03    6.8495       -.20057E-05** at limit **
   6  Prefactor     .10000E-03    10.800       -.13538E-05** at limit **
   7  Prefactor     17.422        35.676       -.80742E-05    .93672E-05
   8  Prefactor     .10000E-03    3.0837       -.19856E-07** at limit **
   9  norm          1.9351        2.7552        .93421E-07    .30442E-04
  10  Prefactor     5.2230        63.777        .10012E-04   -.12673E-04
  11  Prefactor     .57622        18.564       -.17193E-05    .51756E-04
  12  Prefactor     .10000E-03    6.9610        .42533E-05** at limit **
  13  norm          18.804        6.6542        .97973E-07    .13127E-03
  14  norm          18.888        12.494        .16086E-05    .13861E-06
  15  norm          6.2240        3.2326        .13552E-06    .82080E-03
  16  norm          .10000E-03    7.0970       -.27907E-05** at limit **
  17  norm          .10000E-03    .98856       -.70624E-07** at limit **
  18  Prefactor     2.7158        2.8532       -.14188E-06   -.26285E-03
  19  Prefactor     .10000E-03    7.8881        .72570E-06** at limit **
  20  Prefactor     35.420        36.165        .16596E-04    .59244E-04
  21  Prefactor     .10000E-03    43.424        .87682E-06** at limit **
  22  Prefactor     .10000E-03    4.2708        .86051E-07** at limit **
  23  Prefactor     9.2124        43.802       -.38595E-04   -.33147E-04
  24  Prefactor     .10000E-03    76.903       -.21597E-05** at limit **
  25  Prefactor     .10000E-03    154.64        .11584E-05** at limit **
  26  norm          5.0436        1.8026        .27761E-06    .11393E-03
  27  Prefactor     .10004E-03    2.7396        .69155E-06** at limit **
  28  norm          8.3067        10.250       -.79571E-05   -.24091E-04
  29  Normalizat    1.3259        .16349        .42294E-06   -.62973E-05
  30  Prefactor     .72718        .19740        .52306E-07    .10666E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 5.41126
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 17.4222
  Prefactor  = 0.0001
  norm       = 1.93511
  Prefactor  = 5.223
  Prefactor  = 0.57622
  Prefactor  = 0.0001
  norm       = 18.8043
  norm       = 18.8885
  norm       = 6.22399
  norm       = 0.0001
  norm       = 0.0001
  Prefactor  = 2.7158
  Prefactor  = 0.0001
  Prefactor  = 35.42
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 9.21242
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 5.04356
  Prefactor  = 0.000100035
  norm       = 8.30668
  Normalizat = 1.32591
  Prefactor  = 0.727177
 **********
 **   18 **HESSE 
 **********

 FCN=   6576.902     FROM HESSE     STATUS=OK           584 CALLS     4623 TOTAL
                     EDM=   .28E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          5.4113        3.3989        .11526E-03   -1.5243    
   2  Prefactor     .10000E-03    10.879        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .10000E-03    .69251        .65771E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    3.9538        .15734E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    6.8529        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    10.832        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     17.422        35.644        .95921E-04   -1.4873    
   8  Prefactor     .10000E-03    3.1094        .13903E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          1.9351        2.8244        .14905E-03   -1.5430    
  10  Prefactor     5.2230        63.527        .17614E-03   -1.5251    
  11  Prefactor     .57622        196.08        .61766E-02   -1.5556    
  12  Prefactor     .10000E-03    6.9764        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          18.804        6.6566        .92334E-04   -1.4840    
  14  norm          18.888        12.489        .92162E-04   -1.4838    
  15  norm          6.2240        3.1974        .98544E-04   -1.5209    
  16  norm          .10000E-03    7.1733        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          .10000E-03    .99029        .78737E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     2.7158        2.8421        .13191E-03   -1.5378    
  19  Prefactor     .10000E-03    7.9226        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     35.420        36.175        .67358E-04   -1.4517    
  21  Prefactor     .10000E-03    43.507        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     .10000E-03    4.2754        .16368E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     9.2124        43.954        .13135E-03   -1.5101    
  24  Prefactor     .10000E-03    78.871        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     .10000E-03    156.59        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  norm          5.0436        1.8018        .62227E-04   -1.5259    
  27  Prefactor     .10004E-03    15.961        .25784E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  norm          8.3067        10.243        .13911E-03   -1.5131    
  29  Normalizat    1.3259        .19133        .20911E-03   -.82796    
  30  Prefactor     .72718        .23072        .33802E-03   -1.0247    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.84144e-09
Minuit parameter uncertainties:
  1  3.39907
  2  1.64348e-05
  3  1.94626e-07
  4  5.74306e-07
  5  4.65043e-06
  6  1.42396e-06
  7  35.6874
  8  9.49975e-07
  9  2.82461
  10  36.4787
  11  21.328
  12  4.385e-06
  13  6.65691
  14  12.4907
  15  3.19753
  16  8.66981e-06
  17  8.06962e-06
  18  2.84225
  19  1.05596e-06
  20  36.1975
  21  1.20307e-06
  22  1.39e-06
  23  40.2935
  24  6.05466e-05
  25  0.000339197
  26  1.80181
  27  0.00150005
  28  10.2449
  29  0.191436
  30  0.23102
Done.

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

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  1.000e-04  4.385e-06  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:  7.272e-01  2.310e-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.326e+00  1.914e-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: 5.58e-08 ph cm-2 s-1
Energy Flux Upper Limit: 4.32e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/190878/likelihoodResults_450835201_451094401_4FGL_J1304.0+3704_daily_bin816.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) = 6576.90244371
delta logL = -0.000682093928845

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 6576.90176162
delta logL = -5.14774001203e-09

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.4366       1.0000          .0000       10.000    
     3 'Normalizat'    1.3259       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .72718       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=   6576.902     FROM MIGRAD    STATUS=CONVERGED     56 CALLS      210 TOTAL
                     EDM=   .16E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    1317.0        .90712E-02** at limit **
   2  Index         2.4374        5.9088        .50000       -.11607E-05
   3  Normalizat    1.3259        .86864E-01    .47303E-01   -.34556E-05
   4  Prefactor     .72718        .10708        .76359E-01    .27543E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 2.43736
  Normalizat = 1.32591
  Prefactor  = 0.727177
 **********
 **   18 **HESSE 
 **********

 FCN=   6576.902     FROM HESSE     STATUS=NOT POSDEF    31 CALLS      241 TOTAL
                     EDM=   .16E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    1329.4        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.4374        5.8517        .50000       -.53813    
   3  Normalizat    1.3259        .89478E-01    .20911E-03   -.82796    
   4  Prefactor     .72718        .11083        .33802E-03   -1.0247    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 1.56992e-10
Minuit parameter uncertainties:
  1  5.44299e-05
  2  60.7413
  3  0.089488
  4  0.110863
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/190878': 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) = 6576.90176161
delta logL = 3.77440301236e-10

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  1.000e-04  5.443e-05  1.000e-04  1.000e+04 ( 1.000e-13)
314        Index:  2.437e+00  6.074e+01  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:  7.272e-01  1.109e-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.326e+00  8.949e-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 -2.500e-04 [aplpy.core]
INFO: Auto-setting vmax to  2.775e-03 [aplpy.core]
Saving /scratch/kocevski/190878/cmap_HighResolution_450835201_451094401_4FGL_J1304.0+3704_daily_bin816.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='4.32e-03', job_status='DONE', photon_flux_upper_limit='5.58e-08', time_completed='2021-09-06 20:07:00.887750', job_id='190878', GAL2='0.73', fit_tolerance='1e-08', EG2='1.33', EG='1.33', time_epoch_completed='1630984020.89', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.73', dlogl='3.77e-10', ts2='-0.00', photon_index_error='0.00', photon_index='2.44' WHERE bin_id='816' AND source_name='4FGL J1304.0+3704' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 20:07:00 PDT 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0010>
Subject: Job 190878: <4FGL_J1304.0+3704_daily_bin816> in cluster <slac> Done

Job <4FGL_J1304.0+3704_daily_bin816> was submitted from host <rhel6-64j> by user <kocevski> in cluster <slac> at Mon Sep  6 19:50:26 2021
Job was executed on host(s) <bullet0010>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep  6 19:50:57 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:50:57 2021
Terminated at Mon Sep  6 20:07:01 2021
Results reported at Mon Sep  6 20:07:01 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1304.0+3704_daily_bin816 196.008 37.071 450835201 451094401 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 :                                   944.10 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             308.24 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   964 sec.
    Turnaround time :                            995 sec.

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

