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


Performing analysis on: 4FGL_J1204.8+0407_daily_bin1545
RA = 181.203, Dec = 4.12
tmin = 639792001, tmax = 640051201
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='312170', job_status='RUN', time_executed='2021-09-04 23:23:06.505542', time_epoch_executed='1630822986.51' WHERE source_name='4FGL J1204.8+0407' and cadence='daily' and bin_id='1545'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/312170

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/312170/ft1_4FGL_J1204.8+0407_daily_bin1545.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/312170/ft2_4FGL_J1204.8+0407_daily_bin1545.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/312170/ft1_4FGL_J1204.8+0407_daily_bin1545.fits outfile=/scratch/kocevski/312170/ft1_filteredMKT_4FGL_J1204.8+0407_daily_bin1545.fits ra=181.203 dec=4.12 rad=12.0 tmin=639792001.0 tmax=640051201.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.51
user 3.29
sys 0.19

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/312170/ft2_4FGL_J1204.8+0407_daily_bin1545.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/312170/ft2_4FGL_J1204.8+0407_daily_bin1545.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/312170/ft1_filteredMKT_4FGL_J1204.8+0407_daily_bin1545.fits evtable="EVENTS" outfile="/scratch/kocevski/312170/ft1_filtered_4FGL_J1204.8+0407_daily_bin1545.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.53
user 0.33
sys 0.16

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/312170/ft1_filtered_4FGL_J1204.8+0407_daily_bin1545.fits" evtable="EVENTS" scfile=/scratch/kocevski/312170/ft2_4FGL_J1204.8+0407_daily_bin1545.fits sctable="SC_DATA" outfile=/scratch/kocevski/312170/ltcube_639792001_640051201_4FGL_J1204.8+0407_daily_bin1545.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/312170/ft2_4FGL_J1204.8+0407_daily_bin1545.fits
.....................!
real 12.01
user 11.63
sys 0.35

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/312170/ft1_filtered_4FGL_J1204.8+0407_daily_bin1545.fits evtable="EVENTS" scfile=/scratch/kocevski/312170/ft2_4FGL_J1204.8+0407_daily_bin1545.fits sctable="SC_DATA" expcube=/scratch/kocevski/312170/ltcube_639792001_640051201_4FGL_J1204.8+0407_daily_bin1545.fits outfile=/scratch/kocevski/312170/expmap_639792001_640051201_4FGL_J1204.8+0407_daily_bin1545.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/312170/ltcube_639792001_640051201_4FGL_J1204.8+0407_daily_bin1545.fits
.....................!
real 191.75
user 186.68
sys 4.47

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

Setting source of interest to:
4FGL J1204.8+0407 @ 181.203 4.12

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/312170/ft1_filtered_4FGL_J1204.8+0407_daily_bin1545.fits scfile=/scratch/kocevski/312170/ft2_4FGL_J1204.8+0407_daily_bin1545.fits outfile=/scratch/kocevski/312170/cmap_639792001_640051201_4FGL_J1204.8+0407_daily_bin1545.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=181.203 yref=4.12 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.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/312170/ft1_filtered_4FGL_J1204.8+0407_daily_bin1545.fits scfile=/scratch/kocevski/312170/ft2_4FGL_J1204.8+0407_daily_bin1545.fits outfile=/scratch/kocevski/312170/cmap_HighResolution_639792001_640051201_4FGL_J1204.8+0407_daily_bin1545.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=181.203 yref=4.12 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.38
sys 0.15

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/312170/ft1_filtered_4FGL_J1204.8+0407_daily_bin1545.fits evtable="EVENTS" scfile=/scratch/kocevski/312170/ft2_4FGL_J1204.8+0407_daily_bin1545.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/312170/Model_4FGL_J1204.8+0407_daily_bin1545.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/312170/ft1_filtered_4FGL_J1204.8+0407_daily_bin1545.fits.....................!
real 54.87
user 53.43
sys 1.20

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/312170/ft1_filtered_4FGL_J1204.8+0407_daily_bin1545.fits', '/scratch/kocevski/312170/ft2_4FGL_J1204.8+0407_daily_bin1545.fits', expMap='/scratch/kocevski/312170/expmap_639792001_640051201_4FGL_J1204.8+0407_daily_bin1545.fits', expCube='/scratch/kocevski/312170/ltcube_639792001_640051201_4FGL_J1204.8+0407_daily_bin1545.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/312170/Model_4FGL_J1204.8+0407_daily_bin1545.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1204.8+0407'

4FGL J1204.8+0407
   Spectrum: PowerLaw
316    Prefactor:  3.692e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-13)
317        Index:  2.578e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
318        Scale:  7.480e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/312170/ft1_filtered_4FGL_J1204.8+0407_daily_bin1545.fits
Spacecraft file(s): /scratch/kocevski/312170/ft2_4FGL_J1204.8+0407_daily_bin1545.fits
Exposure map: /scratch/kocevski/312170/expmap_639792001_640051201_4FGL_J1204.8+0407_daily_bin1545.fits
Exposure cube: /scratch/kocevski/312170/ltcube_639792001_640051201_4FGL_J1204.8+0407_daily_bin1545.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/312170/Model_4FGL_J1204.8+0407_daily_bin1545.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) = 5712.44747654

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    1.3493       1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
     3 'Prefactor '    22.101       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10294E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10016E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    86.329       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10092E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .18135E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    2.0957       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    32.677       1.0000         .10000E-03   10000.    
    12 'Prefactor '    9.8037       1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10055E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10052E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    .10033E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    7.1071       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    19 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    21 'norm      '    1.7960       1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    8.2467       1.0000         .10000E-03   10000.    
    25 'norm      '    1.8399       1.0000         .10000E-03   10000.    
    26 'Prefactor '    10.710       1.0000         .10000E-03   10000.    
    27 'Prefactor '    14.973       1.0000         .10000E-03   10000.    
    28 'Normalizat'    1.0384       1.0000         .10000E-01   10.000    
    29 'Prefactor '    1.1256       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6140E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   5712.423     FROM MIGRAD    STATUS=CONVERGED    717 CALLS     3696 TOTAL
                     EDM=   .19E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .3%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     1.3494        1.9161       -.65395E-06   -.55169E-03
   2  Prefactor     .10000E-03    24.694        .10452E-04** at limit **
   3  Prefactor     22.095        31.493       -.25876E-05    .52290E-04
   4  Prefactor     .10000E-03    143.02        .31784E-04** at limit **
   5  Prefactor     .10000E-03    16.057       -.79543E-05** at limit **
   6  Prefactor     86.291        69.744       -.26720E-04   -.78607E-04
   7  Prefactor     .10001E-03    19.797       -.80851E-05** at limit **
   8  Prefactor     .10000E-03    42.624       -.73061E-05** at limit **
   9  Prefactor     2.1132        43.188        .22705E-04    .74702E-04
  10  Prefactor     .10000E-03    36.470       -.16686E-04** at limit **
  11  Prefactor     32.628        53.540       -.42554E-04   -.56777E-04
  12  Prefactor     9.7457        50.854       -.80210E-04    .28523E-04
  13  Prefactor     .10000E-03    23.536        .78305E-05** at limit **
  14  Prefactor     .10000E-03    9.6017        .14955E-09** at limit **
  15  Prefactor     .10000E-03    14.945        .85334E-05** at limit **
  16  norm          .10000E-03    2.3054        .39529E-07** at limit **
  17  norm          7.1078        4.0639        .32726E-06    .28098E-04
  18  Prefactor     .10000E-03    12.453       -.12178E-05** at limit **
  19  norm          .10000E-03    30.167        .96369E-06** at limit **
  20  Prefactor     .10000E-03    49.070        .14387E-04** at limit **
  21  norm          1.7960        .73101        .15698E-06    .34923E-03
  22  Prefactor     .10000E-03    2.8658       -.14842E-07** at limit **
  23  Prefactor     .10000E-03    7.3942       -.25320E-06** at limit **
  24  Prefactor     8.2454        10.694       -.24091E-05   -.14112E-02
  25  norm          1.8398        1.6323       -.95357E-07    .11944E-04
  26  Prefactor     10.710        10.798        .73908E-06    .16046E-04
  27  Prefactor     14.938        46.135       -.43511E-04    .28281E-05
  28  Normalizat    1.0383        .21309        .55551E-05    .10015E-03
  29  Prefactor     1.1257        .17735        .50605E-05    .43032E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 1.34937
  Prefactor  = 0.0001
  Prefactor  = 22.0949
  Prefactor  = 0.000100002
  Prefactor  = 0.0001
  Prefactor  = 86.2907
  Prefactor  = 0.000100011
  Prefactor  = 0.000100002
  Prefactor  = 2.11323
  Prefactor  = 0.0001
  Prefactor  = 32.6284
  Prefactor  = 9.74573
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 7.10782
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 1.79598
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 8.24537
  norm       = 1.83978
  Prefactor  = 10.7098
  Prefactor  = 14.9384
  Normalizat = 1.03833
  Prefactor  = 1.12566
 **********
 **   18 **HESSE 
 **********

 FCN=   5712.423     FROM HESSE     STATUS=OK           547 CALLS     4243 TOTAL
                     EDM=   .38E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     1.3494        1.8838        .12033E-03   -1.5476    
   2  Prefactor     .10000E-03    24.750        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     22.095        31.490        .85201E-04   -1.4768    
   4  Prefactor     .10000E-03    143.40        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    16.271        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     86.291        69.512        .21619E-03   -1.3847    
   7  Prefactor     .10001E-03    20.354        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    44.329        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     2.1132        42.259        .28512E-03   -1.5417    
  10  Prefactor     .10000E-03    36.483        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     32.628        53.457        .70098E-04   -1.4565    
  12  Prefactor     9.7457        50.849        .12798E-03   -1.5084    
  13  Prefactor     .10000E-03    23.618        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10000E-03    9.6072        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .10000E-03    15.119        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          .10000E-03    2.4020        .22386E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          7.1078        4.0640        .10614E-03   -1.5175    
  18  Prefactor     .10000E-03    12.466        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  norm          .10000E-03    30.213        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .10000E-03    49.063        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  norm          1.7960        .72654        .37141E-04   -1.5440    
  22  Prefactor     .10000E-03    2.8686        .12496E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10000E-03    7.3955        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     8.2454        10.735        .69803E-03   -1.5134    
  25  norm          1.8398        1.6253        .86306E-04   -1.5437    
  26  Prefactor     10.710        10.789        .12243E-03   -1.5053    
  27  Prefactor     14.938        46.054        .10351E-03   -1.4935    
  28  Normalizat    1.0383        .25052        .29050E-03   -.91757    
  29  Prefactor     1.1257        .20932        .24073E-03   -.88651    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.80944e-09
Minuit parameter uncertainties:
  1  1.88393
  2  0.000117269
  3  31.5134
  4  0.000990554
  5  8.37534e-05
  6  69.5778
  7  0.000956585
  8  0.000543753
  9  18.9151
  10  5.09125e-05
  11  53.5359
  12  44.5819
  13  1.41343e-05
  14  2.7426e-05
  15  8.67858e-05
  16  3.80051e-05
  17  4.06421
  18  2.36677e-05
  19  4.793e-05
  20  2.68345e-05
  21  0.726542
  22  8.91192e-06
  23  1.04787e-05
  24  10.7376
  25  1.62538
  26  10.7913
  27  46.1642
  28  0.250802
  29  0.209471
Done.

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

Extracting fit parameters...

4FGL J1204.8+0407
   Spectrum: PowerLaw
316    Prefactor:  9.746e+00  4.458e+01  1.000e-04  1.000e+04 ( 1.000e-13)
317        Index:  2.578e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
318        Scale:  7.480e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
611    Prefactor:  1.126e+00  2.095e-01  0.000e+00  1.000e+01 ( 1.000e+00)
612        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
613        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
610   Normalization:  1.038e+00  2.508e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 0.05
Ra Dec: 181.203 4.120
Photon Flux Upper Limit: 1.30e-07 ph cm-2 s-1
Energy Flux Upper Limit: 1.02e-02 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/312170/likelihoodResults_639792001_640051201_4FGL_J1204.8+0407_daily_bin1545.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) = 5712.41431478
delta logL = 0.00851226191298

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 5712.41067832
delta logL = 0.0121487289716

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    14.149       1.0000         .10000E-03   10000.    
     2 'Index     '    2.2782       1.0000          .0000       10.000    
     3 'Normalizat'    1.0410       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.1228       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6140E+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.
 MIGRAD TERMINATED WITHOUT CONVERGENCE.

 FCN=   5712.411     FROM MIGRAD    STATUS=FAILED        95 CALLS      288 TOTAL
                     EDM=   .46E-07    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     14.216        55.295        .10648E-03   -.50984E-03
   2  Index         2.2902        1.5894        .10200E-01   -.56273E-03
   3  Normalizat    1.0405        .24160        .29022E-03   -.25595E-03
   4  Prefactor     1.1232        .20733        .24096E-03   -.59842E-03
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   5712.411     FROM SIMPLEX   STATUS=UNCHANGED     71 CALLS      359 TOTAL
                     EDM=   .17E-04    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     14.216        55.295        .95369E-03   -1.4954    
   2  Index         2.2902        1.5894        .19045E-02   -.57276    
   3  Normalizat    1.0405        .24160        .26036E-03   -.91685    
   4  Prefactor     1.1232        .20733        .31836E-03   -.88730    
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   5712.411     FROM MIGRAD    STATUS=CONVERGED     28 CALLS      387 TOTAL
                     EDM=   .20E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     14.217        54.482        .21297E-04   -.99932E-04
   2  Index         2.2906        1.5671        .40802E-03   -.34272E-05
   3  Normalizat    1.0405        .24183        .58044E-04   -.20683E-04
   4  Prefactor     1.1232        .20742        .48193E-04   -.16324E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 14.2169
  Index      = 2.29057
  Normalizat = 1.04051
  Prefactor  = 1.12316
 **********
 **   18 **HESSE 
 **********

 FCN=   5712.411     FROM HESSE     STATUS=OK            23 CALLS      410 TOTAL
                     EDM=   .20E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     14.217        54.475        .42594E-05   -1.4954    
   2  Index         2.2906        1.5670        .16321E-04   -.57268    
   3  Normalizat    1.0405        .24187        .11609E-04   -.91685    
   4  Prefactor     1.1232        .20747        .96385E-05   -.88730    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.00188e-10
Minuit parameter uncertainties:
  1  54.6671
  2  1.60582
  3  0.24213
  4  0.207616
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/312170': 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) = 5712.41064446
delta logL = 0.0121825892375

Extracting fit parameters...

4FGL J1204.8+0407
   Spectrum: PowerLaw
316    Prefactor:  1.422e+01  5.467e+01  1.000e-04  1.000e+04 ( 1.000e-13)
317        Index:  2.291e+00  1.606e+00  0.000e+00  1.000e+01 (-1.000e+00)
318        Scale:  7.480e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
611    Prefactor:  1.123e+00  2.076e-01  0.000e+00  1.000e+01 ( 1.000e+00)
612        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
613        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
610   Normalization:  1.041e+00  2.421e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 0.05
Ra Dec: 181.203 4.120

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/312170/cmap_HighResolution_639792001_640051201_4FGL_J1204.8+0407_daily_bin1545.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.02e-02', job_status='DONE', photon_flux_upper_limit='1.30e-07', time_completed='2021-09-04 23:36:47.843072', job_id='312170', GAL2='1.12', fit_tolerance='1e-08', EG2='1.04', EG='1.04', time_epoch_completed='1630823807.84', return_code2='0', ts='0.05', comment='SUCCESS', return_code='0', GAL='1.13', dlogl='1.22e-02', ts2='0.08', photon_index_error='0.00', photon_index='2.58' WHERE bin_id='1545' AND source_name='4FGL J1204.8+0407' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep  4 23:36:47 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0078>
Subject: Job 312170: <4FGL_J1204.8+0407_daily_bin1545> in cluster <slac> Done

Job <4FGL_J1204.8+0407_daily_bin1545> was submitted from host <rhel6-64j> by user <kocevski> in cluster <slac> at Sat Sep  4 23:20:54 2021
Job was executed on host(s) <bullet0078>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Sep  4 23:20:56 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Sat Sep  4 23:20:56 2021
Terminated at Sat Sep  4 23:36:48 2021
Results reported at Sat Sep  4 23:36:48 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1204.8+0407_daily_bin1545 181.203 4.12 639792001 640051201 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1204.8+0407 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   817.00 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             301.76 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   952 sec.
    Turnaround time :                            954 sec.

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

