/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 = 7406
number of fields = 27
No RA_SUN column yet. Adding RA_SUN/DEC_SUN columns.
Done.


Performing analysis on: 4FGL_J1304.0+3704_daily_bin202
RA = 196.008, Dec = 37.071
tmin = 291686401, tmax = 291945601
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='186634', job_status='RUN', time_executed='2021-09-06 19:35:52.384049', time_epoch_executed='1630982152.38' WHERE source_name='4FGL J1304.0+3704' and cadence='daily' and bin_id='202'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/186634

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/186634/ft1_4FGL_J1304.0+3704_daily_bin202.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/186634/ft2_4FGL_J1304.0+3704_daily_bin202.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/186634/ft1_4FGL_J1304.0+3704_daily_bin202.fits outfile=/scratch/kocevski/186634/ft1_filteredMKT_4FGL_J1304.0+3704_daily_bin202.fits ra=196.008 dec=37.071 rad=12.0 tmin=291686401.0 tmax=291945601.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.56
user 3.29
sys 0.21

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

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

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

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/186634/ft1_filtered_4FGL_J1304.0+3704_daily_bin202.fits evtable="EVENTS" scfile=/scratch/kocevski/186634/ft2_4FGL_J1304.0+3704_daily_bin202.fits sctable="SC_DATA" expcube=/scratch/kocevski/186634/ltcube_291686401_291945601_4FGL_J1304.0+3704_daily_bin202.fits outfile=/scratch/kocevski/186634/expmap_291686401_291945601_4FGL_J1304.0+3704_daily_bin202.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/186634/ltcube_291686401_291945601_4FGL_J1304.0+3704_daily_bin202.fits
.....................!
real 191.41
user 186.05
sys 4.87

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/186634/ft1_filtered_4FGL_J1304.0+3704_daily_bin202.fits scfile=/scratch/kocevski/186634/ft2_4FGL_J1304.0+3704_daily_bin202.fits outfile=/scratch/kocevski/186634/cmap_291686401_291945601_4FGL_J1304.0+3704_daily_bin202.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.55
user 0.37
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/186634/ft1_filtered_4FGL_J1304.0+3704_daily_bin202.fits scfile=/scratch/kocevski/186634/ft2_4FGL_J1304.0+3704_daily_bin202.fits outfile=/scratch/kocevski/186634/cmap_HighResolution_291686401_291945601_4FGL_J1304.0+3704_daily_bin202.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.55
user 0.41
sys 0.13

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

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

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    3.5407       1.0000         .10000E-03   10000.    
     2 'Prefactor '    3.0831       1.0000         .10000E-03   10000.    
     3 'Prefactor '    5.0515       1.0000         .10000E-03   10000.    
     4 'Prefactor '    13.284       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10113E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10052E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    1.8528       1.0000         .10000E-03   10000.    
     9 'norm      '    .10195E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    43.179       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .51337       1.0000         .10000E-03   10000.    
    13 'norm      '    2.0906       1.0000         .10000E-03   10000.    
    14 'norm      '    7.6872       1.0000         .10000E-03   10000.    
    15 'norm      '    1.9160       1.0000         .10000E-03   10000.    
    16 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    14.913       1.0000         .10000E-03   10000.    
    18 'Prefactor '    3.9831       1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    6.6368       1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    .15854E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10616E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    13.547       1.0000         .10000E-03   10000.    
    25 'Prefactor '    .10007E-03   1.0000         .10000E-03   10000.    
    26 'norm      '    1.7566       1.0000         .10000E-03   10000.    
    27 'Prefactor '    3.8402       1.0000         .10000E-03   10000.    
    28 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    29 'Normalizat'    1.1299       1.0000         .10000E-01   10.000    
    30 'Prefactor '    .75231       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=   5981.307     FROM MIGRAD    STATUS=CONVERGED    791 CALLS     3927 TOTAL
                     EDM=   .55E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.1%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          3.5408        3.7570        .44380E-08   -.21314E-04
   2  Prefactor     3.0828        6.5237       -.13701E-06   -.31300E-04
   3  Prefactor     5.0512        2.8589       -.18891E-07    .54583E-05
   4  Prefactor     13.283        9.4136       -.61030E-07    .22426E-05
   5  Prefactor     .10000E-03    8.2378       -.79637E-07** at limit **
   6  Prefactor     .10000E-03    21.177       -.58133E-05** at limit **
   7  Prefactor     .10000E-03    31.161        .12594E-04** at limit **
   8  Prefactor     1.8531        11.531       -.29201E-06    .27363E-03
   9  norm          .10000E-03    2.3102       -.67879E-07** at limit **
  10  Prefactor     .10000E-03    19.160        .81122E-05** at limit **
  11  Prefactor     43.167        26.043        .25282E-05    .17967E-03
  12  Prefactor     .44118        23.757       -.22109E-05    .25030E-03
  13  norm          2.0885        1.8321        .34301E-06   -.16964E-02
  14  norm          7.6869        7.6547       -.23784E-07    .17632E-03
  15  norm          1.9162        3.1290       -.29244E-06    .49626E-04
  16  norm          .10000E-03    2.9265        .44962E-08** at limit **
  17  norm          14.913        5.7109        .39664E-06    .17470E-04
  18  Prefactor     3.9786        3.8075       -.77245E-07    .39906E-03
  19  Prefactor     .10000E-03    13.188       -.59861E-06** at limit **
  20  Prefactor     6.6063        43.513       -.34450E-05   -.58580E-05
  21  Prefactor     .10000E-03    21.895       -.72264E-05** at limit **
  22  Prefactor     .10000E-03    45.703       -.19505E-04** at limit **
  23  Prefactor     .10000E-03    25.790        .83923E-06** at limit **
  24  Prefactor     13.561        21.819       -.36278E-05    .11047E-03
  25  Prefactor     .10000E-03    63.079        .15522E-04** at limit **
  26  norm          1.7564        1.4286       -.12956E-07   -.41993E-04
  27  Prefactor     3.8410        4.4799        .73108E-07    .10471E-03
  28  norm          .10000E-03    9.5986        .29913E-06** at limit **
  29  Normalizat    1.1299        .16359        .14739E-06    .43331E-03
  30  Prefactor     .75240        .19654        .50716E-06    .23980E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 3.54078
  Prefactor  = 3.08281
  Prefactor  = 5.05121
  Prefactor  = 13.2834
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 1.85313
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 43.1667
  Prefactor  = 0.441179
  norm       = 2.08846
  norm       = 7.68688
  norm       = 1.91617
  norm       = 0.0001
  norm       = 14.9131
  Prefactor  = 3.97858
  Prefactor  = 0.0001
  Prefactor  = 6.60629
  Prefactor  = 0.0001
  Prefactor  = 0.000100002
  Prefactor  = 0.0001
  Prefactor  = 13.5612
  Prefactor  = 0.0001
  norm       = 1.75644
  Prefactor  = 3.841
  norm       = 0.0001
  Normalizat = 1.12987
  Prefactor  = 0.752396
 **********
 **   18 **HESSE 
 **********

 FCN=   5981.307     FROM HESSE     STATUS=OK           590 CALLS     4517 TOTAL
                     EDM=   .33E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          3.5408        3.7742        .13809E-03   -1.5332    
   2  Prefactor     3.0828        6.5093        .23099E-03   -1.5357    
   3  Prefactor     5.0512        2.8783        .87947E-04   -1.5258    
   4  Prefactor     13.283        9.4130        .10990E-03   -1.4979    
   5  Prefactor     .10000E-03    8.2448        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    21.302        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    31.235        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     1.8531        24.200        .30626E-03   -1.5436    
   9  norm          .10000E-03    2.3519        .11468E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    19.198        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     43.167        26.203        .61009E-04   -1.4393    
  12  Prefactor     .44118        789.90        .51320E-02   -1.5575    
  13  norm          2.0885        6.6942        .14192E-02   -1.5419    
  14  norm          7.6869        7.6678        .72317E-03   -1.5153    
  15  norm          1.9162        3.0777        .16088E-03   -1.5431    
  16  norm          .10000E-03    2.9298        .12884E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          14.913        5.7054        .10372E-03   -1.4935    
  18  Prefactor     3.9786        3.8454        .13366E-03   -1.5309    
  19  Prefactor     .10000E-03    13.269        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     6.6063        43.404        .15577E-03   -1.5194    
  21  Prefactor     .10000E-03    21.935        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     .10000E-03    46.153        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10000E-03    25.826        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     13.561        21.705        .10883E-03   -1.4971    
  25  Prefactor     .10000E-03    63.263        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  norm          1.7564        1.4167        .79852E-04   -1.5443    
  27  Prefactor     3.8410        4.4766        .17096E-03   -1.5316    
  28  norm          .10000E-03    9.6478        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  29  Normalizat    1.1299        .19136        .20931E-03   -.88798    
  30  Prefactor     .75240        .22695        .31182E-03   -1.0151    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.31111e-08
Minuit parameter uncertainties:
  1  3.77444
  2  6.5108
  3  2.8784
  4  9.41402
  5  2.87236e-06
  6  5.42709e-06
  7  2.90743e-05
  8  13.3996
  9  1.25185e-05
  10  2.54363e-05
  11  26.2103
  12  37.8422
  13  6.69661
  14  7.66876
  15  3.07795
  16  5.11077e-07
  17  5.70565
  18  3.84561
  19  6.17821e-06
  20  33.9025
  21  2.80553e-05
  22  0.000567355
  23  2.71038e-05
  24  21.7178
  25  7.04754e-05
  26  1.41671
  27  4.47697
  28  4.25894e-06
  29  0.191478
  30  0.227233
Done.

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

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  4.412e-01  3.784e+01  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.524e-01  2.272e-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.130e+00  1.915e-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.59e-08 ph cm-2 s-1
Energy Flux Upper Limit: 6.66e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/186634/likelihoodResults_291686401_291945601_4FGL_J1304.0+3704_daily_bin202.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) = 5981.30084462
delta logL = 0.00624859719755

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5981.29328191
delta logL = 0.013811305369

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    1.5078       1.0000         .10000E-03   10000.    
     2 'Index     '    2.9458       1.0000          .0000       10.000    
     3 'Normalizat'    1.1233       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .75564       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.
 MACHINE ACCURACY LIMITS FURTHER IMPROVEMENT.

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   5981.293     FROM MIGRAD    STATUS=CONVERGED     98 CALLS      291 TOTAL
                     EDM=   .32E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     1.5081        27.025        .17422E-02   -.47862E-03
   2  Index         2.9481        2.8267        .48383E-02    .12933E-04
   3  Normalizat    1.1232        .18612        .20984E-03    .15387E-04
   4  Prefactor     .75567        .22566        .31116E-03    .77458E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 1.50812
  Index      = 2.94805
  Normalizat = 1.12323
  Prefactor  = 0.755674
 **********
 **   18 **HESSE 
 **********

 FCN=   5981.293     FROM HESSE     STATUS=OK            23 CALLS      314 TOTAL
                     EDM=   .23E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     1.5081        19.270        .69689E-04   -1.5462    
   2  Index         2.9481        2.4452        .19353E-03   -.42288    
   3  Normalizat    1.1232        .18624        .83935E-05   -.89009    
   4  Prefactor     .75567        .22595        .12446E-04   -1.0138    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.29327e-09
Minuit parameter uncertainties:
  1  10.7857
  2  2.58083
  3  0.186351
  4  0.226222
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/186634': 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) = 5981.29328125
delta logL = 0.0138119650574

Extracting fit parameters...

4FGL J1304.0+3704
   Spectrum: PowerLaw
313    Prefactor:  1.508e+00  1.079e+01  1.000e-04  1.000e+04 ( 1.000e-13)
314        Index:  2.948e+00  2.581e+00  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.557e-01  2.262e-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.123e+00  1.864e-01  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/186634/cmap_HighResolution_291686401_291945601_4FGL_J1304.0+3704_daily_bin202.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='6.66e-03', job_status='DONE', photon_flux_upper_limit='8.59e-08', time_completed='2021-09-06 19:50:23.336775', job_id='186634', GAL2='0.76', fit_tolerance='1e-08', EG2='1.12', EG='1.13', time_epoch_completed='1630983023.34', return_code2='0', ts='0.00', comment='SUCCESS', return_code='0', GAL='0.75', dlogl='1.38e-02', ts2='0.03', photon_index_error='0.00', photon_index='2.44' WHERE bin_id='202' AND source_name='4FGL J1304.0+3704' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Sep  6 19:50:23 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0235>
Subject: Job 186634: <4FGL_J1304.0+3704_daily_bin202> in cluster <slac> Done

Job <4FGL_J1304.0+3704_daily_bin202> was submitted from host <rhel6-64h> by user <kocevski> in cluster <slac> at Mon Sep  6 19:35:34 2021
Job was executed on host(s) <bullet0235>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Sep  6 19:35:38 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:35:38 2021
Terminated at Mon Sep  6 19:50:24 2021
Results reported at Mon Sep  6 19:50:24 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1304.0+3704_daily_bin202 196.008 37.071 291686401 291945601 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 :                                   864.04 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             321.93 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   885 sec.
    Turnaround time :                            890 sec.

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

